home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / KERNEL-S / V1.0 / PATCH5.GZ / patch5
Encoding:
Text File  |  1994-03-28  |  20.8 KB  |  690 lines

  1. diff -u --recursive --new-file v1.0.4/linux/Makefile linux/Makefile
  2. --- v1.0.4/linux/Makefile    Mon Mar 28 17:43:13 1994
  3. +++ linux/Makefile    Sat Mar 26 14:14:50 1994
  4. @@ -1,6 +1,6 @@
  5.  VERSION = 1
  6.  PATCHLEVEL = 0
  7. -SUBLEVEL = 4
  8. +SUBLEVEL = 5
  9.  
  10.  all:    Version zImage
  11.  
  12. @@ -74,6 +74,7 @@
  13.  
  14.  AS    =as
  15.  LD    =ld
  16. +LDFLAGS    =#-qmagic
  17.  HOSTCC    =gcc
  18.  CC    =gcc -D__KERNEL__
  19.  MAKE    =make
  20. diff -u --recursive --new-file v1.0.4/linux/drivers/FPU-emu/README linux/drivers/FPU-emu/README
  21. --- v1.0.4/linux/drivers/FPU-emu/README    Mon Feb 14 13:10:44 1994
  22. +++ linux/drivers/FPU-emu/README    Sat Mar 26 14:04:23 1994
  23. @@ -47,7 +47,7 @@
  24.  
  25.  
  26.  --Bill Metzenthen
  27. -  Feb 1994
  28. +  March 1994
  29.  
  30.  
  31.  ----------------------- Internals of wm-FPU-emu -----------------------
  32. @@ -92,7 +92,7 @@
  33.  ----------------------- Limitations of wm-FPU-emu -----------------------
  34.  
  35.  There are a number of differences between the current wm-FPU-emu
  36. -(version beta 1.10) and the 80486 FPU (apart from bugs). Some of the
  37. +(version beta 1.11) and the 80486 FPU (apart from bugs). Some of the
  38.  more important differences are listed below:
  39.  
  40.  The Roundup flag does not have much meaning for the transcendental
  41. @@ -144,6 +144,17 @@
  42.  exception. For this case, the emulator cannot emulate the behaviour of
  43.  an 80486DX.
  44.  
  45. +Handling of the address size override prefix byte (0x67) has not been
  46. +extensively tested yet. A major problem exists because using it in
  47. +vm86 mode can cause a general protection fault. Address offsets
  48. +greater than 0xffff appear to be illegal in vm86 mode but are quite
  49. +acceptable (and work) in real mode. A small test program developed to
  50. +check the addressing, and which runs successfully in real mode,
  51. +crashes dosemu under Linux and also brings Windows down with a general
  52. +protection fault message when run under the MS-DOS prompt of Windows
  53. +3.1. (The program simply reads data from a valid address).
  54. +
  55. +
  56.  ----------------------- Performance of wm-FPU-emu -----------------------
  57.  
  58.  Speed.
  59. @@ -310,6 +321,7 @@
  60.  Hamish Coleman, t933093@minyos.xx.rmit.oz.au
  61.  Bruce Evans, bde@kralizec.zeta.org.au
  62.  Timo Korvola, Timo.Korvola@hut.fi
  63. +Rick Lyons, rick@razorback.brisnet.org.au
  64.   
  65.  ...and numerous others who responded to my request for help with
  66.  a real 80486.
  67. diff -u --recursive --new-file v1.0.4/linux/drivers/FPU-emu/fpu_emu.h linux/drivers/FPU-emu/fpu_emu.h
  68. --- v1.0.4/linux/drivers/FPU-emu/fpu_emu.h    Wed Feb 16 13:07:55 1994
  69. +++ linux/drivers/FPU-emu/fpu_emu.h    Sat Mar 26 14:04:23 1994
  70. @@ -87,6 +87,7 @@
  71.  #define PREFIX_FS_ 4
  72.  #define PREFIX_GS_ 5
  73.  #define PREFIX_SS_ 6
  74. +#define PREFIX_DEFAULT 7
  75.  
  76.  /* These are to defeat the default action, giving the instruction
  77.     no net effect: */
  78. diff -u --recursive --new-file v1.0.4/linux/drivers/FPU-emu/fpu_entry.c linux/drivers/FPU-emu/fpu_entry.c
  79. --- v1.0.4/linux/drivers/FPU-emu/fpu_entry.c    Fri Mar 18 10:21:32 1994
  80. +++ linux/drivers/FPU-emu/fpu_entry.c    Sat Mar 26 14:04:24 1994
  81. @@ -239,7 +239,7 @@
  82.  
  83.    RE_ENTRANT_CHECK_OFF;
  84.    FPU_code_verify_area(1);
  85. -  FPU_modrm = get_fs_byte((unsigned short *) FPU_EIP);
  86. +  FPU_modrm = get_fs_byte((unsigned char *) FPU_EIP);
  87.    RE_ENTRANT_CHECK_ON;
  88.    FPU_EIP++;
  89.  
  90. @@ -281,6 +281,9 @@
  91.  
  92.        FPU_EIP = FPU_ORIG_EIP;    /* Point to current FPU instruction. */
  93.  
  94. +      if ( addr_modes.vm86 )
  95. +        FPU_EIP -= FPU_CS << 4;
  96. +
  97.        RE_ENTRANT_CHECK_OFF;
  98.        current->tss.trap_no = 16;
  99.        current->tss.error_code = 0;
  100. @@ -303,6 +306,7 @@
  101.      get_address_16(FPU_modrm, &FPU_EIP, addr_modes);
  102.        else
  103.      get_address(FPU_modrm, &FPU_EIP, addr_modes);
  104. +
  105.        if ( !(byte1 & 1) )
  106.      {
  107.        unsigned short status1 = partial_status;
  108. @@ -563,7 +567,7 @@
  109.    unsigned char byte;
  110.    unsigned char *ip = *fpu_eip;
  111.  
  112. -  *override = (overrides) { 0, 0, PREFIX_DS_ };       /* defaults */
  113. +  *override = (overrides) { 0, 0, PREFIX_DEFAULT };       /* defaults */
  114.  
  115.    RE_ENTRANT_CHECK_OFF;
  116.    FPU_code_verify_area(1);
  117. @@ -597,9 +601,9 @@
  118.      case PREFIX_GS:
  119.        override->segment = PREFIX_GS_;
  120.        goto do_next_byte;
  121. -
  122. -    case PREFIX_DS:   /* Redundant unless preceded by another override. */
  123. +    case PREFIX_DS:
  124.        override->segment = PREFIX_DS_;
  125. +      goto do_next_byte;
  126.  
  127.  /* lock is not a valid prefix for FPU instructions,
  128.     let the cpu handle it to generate a SIGILL. */
  129. diff -u --recursive --new-file v1.0.4/linux/drivers/FPU-emu/get_address.c linux/drivers/FPU-emu/get_address.c
  130. --- v1.0.4/linux/drivers/FPU-emu/get_address.c    Wed Feb 16 13:07:56 1994
  131. +++ linux/drivers/FPU-emu/get_address.c    Sat Mar 26 14:04:24 1994
  132. @@ -45,7 +45,8 @@
  133.      offsetof(struct info,___vm86_es),
  134.      offsetof(struct info,___vm86_fs),
  135.      offsetof(struct info,___vm86_gs),
  136. -    offsetof(struct info,___ss)
  137. +    offsetof(struct info,___ss),
  138. +    offsetof(struct info,___vm86_ds)
  139.        };
  140.  
  141.  #define VM86_REG_(x) (*(unsigned short *) \
  142. @@ -285,9 +286,13 @@
  143.        break;
  144.      case 2:
  145.        offset += FPU_info->___ebp + FPU_info->___esi;
  146. +      if ( addr_modes.override.segment == PREFIX_DEFAULT )
  147. +    addr_modes.override.segment = PREFIX_SS_;
  148.        break;
  149.      case 3:
  150.        offset += FPU_info->___ebp + FPU_info->___edi;
  151. +      if ( addr_modes.override.segment == PREFIX_DEFAULT )
  152. +    addr_modes.override.segment = PREFIX_SS_;
  153.        break;
  154.      case 4:
  155.        offset += FPU_info->___esi;
  156. @@ -297,6 +302,8 @@
  157.        break;
  158.      case 6:
  159.        offset += FPU_info->___ebp;
  160. +      if ( addr_modes.override.segment == PREFIX_DEFAULT )
  161. +    addr_modes.override.segment = PREFIX_SS_;
  162.        break;
  163.      case 7:
  164.        offset += FPU_info->___ebx;
  165. @@ -313,4 +320,3 @@
  166.  
  167.    FPU_data_address = (void *)offset ;
  168.  }
  169. -
  170. diff -u --recursive --new-file v1.0.4/linux/drivers/FPU-emu/version.h linux/drivers/FPU-emu/version.h
  171. --- v1.0.4/linux/drivers/FPU-emu/version.h    Mon Feb 14 13:10:47 1994
  172. +++ linux/drivers/FPU-emu/version.h    Sat Mar 26 14:04:24 1994
  173. @@ -9,5 +9,5 @@
  174.   |                                                                           |
  175.   +---------------------------------------------------------------------------*/
  176.  
  177. -#define FPU_VERSION "wm-FPU-emu version Beta 1.10"
  178. +#define FPU_VERSION "wm-FPU-emu version Beta 1.11"
  179.  
  180. diff -u --recursive --new-file v1.0.4/linux/drivers/char/tty_ioctl.c linux/drivers/char/tty_ioctl.c
  181. --- v1.0.4/linux/drivers/char/tty_ioctl.c    Tue Mar  1 19:00:15 1994
  182. +++ linux/drivers/char/tty_ioctl.c    Sat Mar 26 15:13:09 1994
  183. @@ -487,7 +487,10 @@
  184.                           sizeof (pid_t));
  185.              if (retval)
  186.                  return retval;
  187. -            if (current->tty != termios_dev)
  188. +            /* If a master pty, return the slave's tpgid.
  189. +               If not, only return the tpgid if this is
  190. +               the controlling tty. */
  191. +            if (tty == termios_tty && current->tty != dev)
  192.                  return -ENOTTY;
  193.              put_fs_long(termios_tty->pgrp, (pid_t *) arg);
  194.              return 0;
  195. diff -u --recursive --new-file v1.0.4/linux/drivers/scsi/Makefile linux/drivers/scsi/Makefile
  196. --- v1.0.4/linux/drivers/scsi/Makefile    Wed Dec  1 14:44:15 1993
  197. +++ linux/drivers/scsi/Makefile    Sat Mar 26 15:08:15 1994
  198. @@ -9,7 +9,7 @@
  199.  #AHA152X    = -DDEBUG -DAUTOCONF -DIRQ=11 -DSCSI_ID=7 -DRECONNECT=0 \
  200.  #          -DPORTBASE=0x340 -DSKIP_BIOSTEST -DDONT_SNARF
  201.  
  202. -AHA152X    = -DDEBUG -DAUTOCONF
  203. +AHA152X    = -DDEBUG_AHA152X -DAUTOCONF
  204.  
  205.  SCSI_OBJS =
  206.  SCSI_SRCS =
  207. diff -u --recursive --new-file v1.0.4/linux/drivers/scsi/aha152x.c linux/drivers/scsi/aha152x.c
  208. --- v1.0.4/linux/drivers/scsi/aha152x.c    Mon Jan  3 07:45:32 1994
  209. +++ linux/drivers/scsi/aha152x.c    Sat Mar 26 15:08:16 1994
  210. @@ -1,6 +1,6 @@
  211.  /* aha152x.c -- Adaptec AHA-152x driver
  212.   * Author: Juergen E. Fischer, fischer@server.et-inf.fho-emden.de
  213. - * Copyright 1993 Juergen E. Fischer
  214. + * Copyright 1993, 1994 Juergen E. Fischer
  215.   *
  216.   *
  217.   * This driver is based on
  218. @@ -20,10 +20,17 @@
  219.   * General Public License for more details.
  220.   
  221.   *
  222. - * $Id: aha152x.c,v 0.101 1993/12/13 01:16:27 root Exp $
  223. + * $Id: aha152x.c,v 1.0 1994/03/25 12:52:00 root Exp $
  224.   *
  225.  
  226.   * $Log: aha152x.c,v $
  227. + * Revision 1.0  1994/03/25  12:52:00  root
  228. + * - Fixed "more data than expected" problem
  229. + * - added new BIOS signatures
  230. + *
  231. + * Revision 0.102  1994/01/31  20:44:12  root
  232. + * - minor changes in insw/outsw handling
  233. + *
  234.   * Revision 0.101  1993/12/13  01:16:27  root
  235.   * - fixed STATUS phase (non-GOOD stati were dropped sometimes;
  236.   *   fixes problems with CD-ROM sector size detection & media change)
  237. @@ -189,7 +196,7 @@
  238.  /* I use this when I'm looking for weird bugs */
  239.  #define DEBUG_TIMING 
  240.  
  241. -#if defined(DEBUG)
  242. +#if defined(DEBUG_AHA152X)
  243.  
  244.  #undef  SKIP_PORTS              /* don't display ports */
  245.  
  246. @@ -228,7 +235,7 @@
  247.  #define P_BUSFREE  1
  248.  #define P_PARITY   2
  249.  
  250. -char *aha152x_id = "Adaptec 152x SCSI driver; $Revision: 0.101 $\n";
  251. +static char *aha152x_id = AHA152X_REVID;
  252.  
  253.  static int port_base      = 0;
  254.  static int this_host      = 0;
  255. @@ -308,27 +315,26 @@
  256.  /* possible interrupt channels */
  257.  static unsigned short ints[] = { 9, 10, 11, 12 };
  258.  
  259. -/* signatures for various AIC-6260 based controllers */
  260. +/* signatures for various AIC-6[23]60 based controllers.
  261. +   The point in detecting signatures is to avoid useless
  262. +   and maybe harmful probes on ports. I'm not sure that
  263. +   all listed boards pass auto-configuration. For those
  264. +   which fail the BIOS signature is obsolete, because
  265. +   user intervention to supply the configuration is 
  266. +   needed anyway. */
  267.  static struct signature {
  268.    char *signature;
  269.    int  sig_offset;
  270.    int  sig_length;
  271.  } signatures[] =
  272.  {
  273. -  {
  274. -    "Adaptec AHA-1520 BIOS\r\n\0\
  275. -Version 1.4      \r\n\0\
  276. -Copyright 1990 Adaptec, Inc.\r\n\
  277. -All Rights Reserved\r\n \r\n \r\n", 0x102e, 101
  278. -  },                                                          /* Adaptec 152x */
  279. -  {
  280. -    "Adaptec ASW-B626 BIOS\r\n\0\
  281. -Version 1.0      \r\n\0\
  282. -Copyright 1990 Adaptec, Inc.\r\n\
  283. -All Rights Reserved\r\n\0 \r\n \r\n", 0x1029, 102
  284. -  },                                                   /* on-board controller */
  285. -  { "Adaptec BIOS: ASW-B626", 0x0F, 22},               /* on-board controller */
  286. -  { "Adaptec ASW-B626 S2 BIOS", 0x2e6c, 24},           /* on-board controller */
  287. +  { "Adaptec AHA-1520 BIOS",      0x102e, 21 },  /* Adaptec 152x */
  288. +  { "Adaptec ASW-B626 BIOS",      0x1029, 21 },  /* on-board controller */
  289. +  { "Adaptec BIOS: ASW-B626",       0x0f, 22 },  /* on-board controller */
  290. +  { "Adaptec ASW-B626 S2",        0x2e6c, 19 },  /* on-board controller */
  291. +  { "Adaptec BIOS:AIC-6360",         0xc, 21 },  /* on-board controller */
  292. +  { "ScsiPro SP-360 BIOS",        0x2873, 19 },  /* ScsiPro-Controller with AIC-6360 */
  293. +  { "GA-400 LOCAL BUS SCSI BIOS", 0x102e, 26 },  /* Gigabyte Local-Bus-SCSI */
  294.  };
  295.  #define SIGNATURE_COUNT (sizeof( signatures ) / sizeof( struct signature ))
  296.  
  297. @@ -498,11 +504,9 @@
  298.    enter_driver("detect");
  299.  #endif
  300.    
  301. -  printk("aha152x: Probing: ");
  302. -
  303.    if(setup_called)
  304.      {
  305. -      printk("processing commandline: ");
  306. +      printk("aha152x: processing commandline: ");
  307.     
  308.        if(setup_called!=4)
  309.          {
  310. @@ -551,12 +555,11 @@
  311.            printk("reconnect %d should be 0 or 1\n", can_disconnect);
  312.            panic("aha152x panics in line %d", __LINE__);
  313.          }
  314. -      printk("ok, ");
  315. +      printk("ok\n");
  316.      }
  317.    else
  318.      {
  319.  #if !defined(SKIP_BIOSTEST)
  320. -      printk("BIOS test: ");
  321.        ok=0;
  322.        for( i=0; i < ADDRESS_COUNT && !ok; i++)
  323.          for( j=0; (j < SIGNATURE_COUNT) && !ok; j++)
  324. @@ -572,7 +575,9 @@
  325.            printk("failed\n");
  326.            return 0;
  327.          }
  328. -      printk("ok, ");
  329. +      printk("aha152x: BIOS test: passed, ");
  330. +#else
  331. +      printk("aha152x: ");
  332.  #endif /* !SKIP_BIOSTEST */
  333.   
  334.  #if !defined(PORTBASE)
  335. @@ -685,14 +690,6 @@
  336.   */
  337.  const char *aha152x_info(void)
  338.  {
  339. -#if defined(DEBUG_RACE)
  340. -  enter_driver("info");
  341. -  leave_driver("info");
  342. -#else
  343. -#if defined(DEBUG_INFO)
  344. -  printk("\naha152x: info()\n");
  345. -#endif
  346. -#endif
  347.    return(aha152x_id);
  348.  }
  349.  
  350. @@ -791,7 +788,7 @@
  351.    cli();
  352.  
  353.  #if defined(DEBUG_ABORT)
  354. -  printk("aha152x: abort(), SCpnt=0x%08x, ", (unsigned long) SCpnt );
  355. +  printk("aha152x: abort(), SCpnt=0x%08x, ", (unsigned int) SCpnt );
  356.  #endif
  357.  
  358.    show_queues();
  359. @@ -962,16 +959,8 @@
  360.   */
  361.  int aha152x_biosparam( int size, int dev, int *info_array )
  362.  {
  363. -#if defined(DEBUG_RACE)
  364. -  enter_driver("biosparam");
  365. -#else
  366. -#if defined(DEBUG_BIOSPARAM)
  367. -  printk("\naha152x: biosparam(), ");
  368. -#endif
  369. -#endif
  370. -
  371.  #if defined(DEBUG_BIOSPARAM)
  372. -  printk("dev=%x, size=%d, ", dev, size);
  373. +  printk("aha152x_biosparam: dev=%x, size=%d, ", dev, size);
  374.  #endif
  375.    
  376.  /* I took this from other SCSI drivers, since it provides
  377. @@ -986,9 +975,6 @@
  378.    printk("WARNING: check, if the bios geometry is correct.\n");
  379.  #endif
  380.  
  381. -#if defined(DEBUG_RACE)
  382. -  leave_driver("biosparam");
  383. -#endif
  384.    return 0;
  385.  }
  386.  
  387. @@ -1708,7 +1694,7 @@
  388.                ;
  389.  
  390.              if( TESTHI( DMASTAT, DFIFOFULL ) )
  391. -              fifodata=132;
  392. +              fifodata=GETPORT(FIFOSTAT);
  393.              else
  394.                {
  395.                  /* wait for SCSI fifo to get empty */
  396. @@ -1786,13 +1772,18 @@
  397.                    } 
  398.                }
  399.   
  400. -            /* rare (but possible) status bytes (probably also DISCONNECT 
  401. -               messages) get transfered in the data phase, so I assume 1
  402. -               additional byte is ok */
  403. -            if(fifodata>1)
  404. +            /*
  405. +             * Fifo should be empty
  406. +             */
  407. +            if(fifodata>0)
  408.                {
  409.                  printk("aha152x: more data than expected (%d bytes)\n",
  410.                         GETPORT(FIFOSTAT));
  411. +                SETBITS(DMACNTRL0, _8BIT );
  412. +                printk("aha152x: data ( ");
  413. +                while(fifodata--)
  414. +                  printk("%2x ", GETPORT( DATAPORT ));
  415. +                printk(")\n");
  416.                }
  417.  
  418.  #if defined(DEBUG_DATAI)
  419. @@ -2302,7 +2293,7 @@
  420.    int i;
  421.  
  422.    printk("0x%08x: target=%d; lun=%d; cmnd=( ",
  423. -         (unsigned long) ptr, ptr->target, ptr->lun);
  424. +         (unsigned int) ptr, ptr->target, ptr->lun);
  425.    
  426.    for(i=0; i<COMMAND_SIZE(ptr->cmnd[0]); i++)
  427.      printk("%02x ", ptr->cmnd[i]);
  428. @@ -2346,7 +2337,7 @@
  429.        if(ptr->SCp.phase & (1<<16))
  430.          printk("; phaseend");
  431.      }
  432. -  printk("; next=0x%08x\n", (unsigned long) ptr->host_scribble);
  433. +  printk("; next=0x%08x\n", (unsigned int) ptr->host_scribble);
  434.  }
  435.   
  436.  /*
  437. diff -u --recursive --new-file v1.0.4/linux/drivers/scsi/aha152x.h linux/drivers/scsi/aha152x.h
  438. --- v1.0.4/linux/drivers/scsi/aha152x.h    Wed Dec  1 14:44:16 1993
  439. +++ linux/drivers/scsi/aha152x.h    Sat Mar 26 15:08:16 1994
  440. @@ -2,7 +2,7 @@
  441.  #define _AHA152X_H
  442.  
  443.  /*
  444. - * $Id: aha152x.h,v 0.2 1993/10/03 00:58:03 root Exp $
  445. + * $Id: aha152x.h,v 1.0 1994/03/25 12:52:00 root Exp $
  446.   */
  447.  
  448.  #include "../block/blk.h"
  449. @@ -22,8 +22,10 @@
  450.     (unless we support more than 1 cmd_per_lun this should do) */
  451.  #define AHA152X_MAXQUEUE    7        
  452.  
  453. +#define AHA152X_REVID    "Adaptec 152x SCSI driver; $Revision: 1.0 $"
  454. +
  455.  /* Initial value of Scsi_Host entry */
  456. -#define AHA152X       { /* name */        "Adaptec 152x SCSI driver", \
  457. +#define AHA152X       { /* name */        AHA152X_REVID, \
  458.              /* detect */        aha152x_detect,             \
  459.              /* info */        aha152x_info,               \
  460.              /* command */        aha152x_command,            \
  461. diff -u --recursive --new-file v1.0.4/linux/drivers/scsi/aha1542.c linux/drivers/scsi/aha1542.c
  462. --- v1.0.4/linux/drivers/scsi/aha1542.c    Mon Feb 14 22:06:26 1994
  463. +++ linux/drivers/scsi/aha1542.c    Sat Mar 26 15:58:41 1994
  464. @@ -95,28 +95,51 @@
  465.    printk("status=%x intrflags=%x\n", s, i, WAITnexttimeout-WAITtimeout); */
  466.  }
  467.  
  468. +/* This is a bit complicated, but we need to make sure that an interrupt
  469. +   routine does not send something out while we are in the middle of this.
  470. +   Fortunately, it is only at boot time that multi-byte messages
  471. +   are ever sent. */
  472.  static int aha1542_out(unsigned int base, unchar *cmdp, int len)
  473.  {
  474. +  if(len == 1) {
  475. +    while(1==1){
  476. +    WAIT(STATUS(base), CDF, 0, CDF);
  477. +    cli();
  478. +    if(inb(STATUS(base)) & CDF) {sti(); continue;}
  479. +    outb(*cmdp, DATA(base));
  480. +    sti();
  481. +    return 0;
  482. +      }
  483. +  } else {
  484. +    cli();
  485.      while (len--)
  486.        {
  487. -      WAIT(STATUS(base), CDF, 0, CDF);
  488. -      outb(*cmdp++, DATA(base));
  489. +    WAIT(STATUS(base), CDF, 0, CDF);
  490. +    outb(*cmdp++, DATA(base));
  491.        }
  492. +    sti();
  493. +  }
  494.      return 0;
  495.    fail:
  496. +  sti();
  497.      printk("aha1542_out failed(%d): ", len+1); aha1542_stat();
  498.      return 1;
  499.  }
  500.  
  501. +/* Only used at boot time, so we do not need to worry about latency as much
  502. +   here */
  503.  static int aha1542_in(unsigned int base, unchar *cmdp, int len)
  504.  {
  505. +    cli();
  506.      while (len--)
  507.        {
  508.        WAIT(STATUS(base), DF, DF, 0);
  509.        *cmdp++ = inb(DATA(base));
  510.        }
  511. +    sti();
  512.      return 0;
  513.    fail:
  514. +    sti();
  515.      printk("aha1542_in failed(%d): ", len+1); aha1542_stat();
  516.      return 1;
  517.  }
  518. diff -u --recursive --new-file v1.0.4/linux/drivers/scsi/fdomain.c linux/drivers/scsi/fdomain.c
  519. --- v1.0.4/linux/drivers/scsi/fdomain.c    Mon Jan 24 13:31:37 1994
  520. +++ linux/drivers/scsi/fdomain.c    Thu Mar 24 06:29:50 1994
  521. @@ -510,7 +510,7 @@
  522.       port_base = ports[i];
  523.       if (check_region( port_base, 0x10 )) {
  524.  #if DEBUG_DETECT
  525. -        printf( " (%x inuse),", port_base );
  526. +        printk( " (%x inuse),", port_base );
  527.  #endif
  528.          continue;
  529.       }
  530. diff -u --recursive --new-file v1.0.4/linux/fs/proc/array.c linux/fs/proc/array.c
  531. --- v1.0.4/linux/fs/proc/array.c    Thu Feb 17 10:36:54 1994
  532. +++ linux/fs/proc/array.c    Mon Mar 28 11:40:19 1994
  533. @@ -88,28 +88,38 @@
  534.  
  535.  static int get_kstat(char * buffer)
  536.  {
  537. -        return sprintf(buffer,    "cpu  %u %u %u %lu\n"
  538. -                    "disk %u %u %u %u\n"
  539. -                    "page %u %u\n"
  540. -                    "swap %u %u\n"
  541. -                    "intr %u\n"
  542. -                    "ctxt %u\n"
  543. -                    "btime %lu\n",
  544. -                kstat.cpu_user,
  545. -                kstat.cpu_nice,
  546. -                kstat.cpu_system,
  547. -                jiffies - (kstat.cpu_user + kstat.cpu_nice + kstat.cpu_system),
  548. -                kstat.dk_drive[0],
  549. -                kstat.dk_drive[1],
  550. -                kstat.dk_drive[2],
  551. -                kstat.dk_drive[3],
  552. -                kstat.pgpgin,
  553. -                kstat.pgpgout,
  554. -                kstat.pswpin,
  555. -                kstat.pswpout,
  556. -                kstat.interrupts,
  557. -                kstat.context_swtch,
  558. -                xtime.tv_sec - jiffies / HZ);
  559. +    int i, len;
  560. +    unsigned sum = 0;
  561. +
  562. +    for (i = 0 ; i < 16 ; i++)
  563. +        sum += kstat.interrupts[i];
  564. +    len = sprintf(buffer,
  565. +        "cpu  %u %u %u %lu\n"
  566. +        "disk %u %u %u %u\n"
  567. +        "page %u %u\n"
  568. +        "swap %u %u\n"
  569. +        "%u",
  570. +        kstat.cpu_user,
  571. +        kstat.cpu_nice,
  572. +        kstat.cpu_system,
  573. +        jiffies - (kstat.cpu_user + kstat.cpu_nice + kstat.cpu_system),
  574. +        kstat.dk_drive[0],
  575. +        kstat.dk_drive[1],
  576. +        kstat.dk_drive[2],
  577. +        kstat.dk_drive[3],
  578. +        kstat.pgpgin,
  579. +        kstat.pgpgout,
  580. +        kstat.pswpin,
  581. +        kstat.pswpout,
  582. +        sum);
  583. +    for (i = 0 ; i < 16 ; i++)
  584. +        len += sprintf(buffer + len, " %u", kstat.interrupts[i]);
  585. +    len += sprintf(buffer + len,
  586. +        "\nctxt %u\n"
  587. +        "btime %lu\n",
  588. +        kstat.context_swtch,
  589. +        xtime.tv_sec - jiffies / HZ);
  590. +    return len;
  591.  }
  592.  
  593.  
  594. diff -u --recursive --new-file v1.0.4/linux/include/linux/fs.h linux/include/linux/fs.h
  595. --- v1.0.4/linux/include/linux/fs.h    Wed Feb 16 09:29:36 1994
  596. +++ linux/include/linux/fs.h    Sat Mar 26 14:44:57 1994
  597. @@ -200,6 +200,7 @@
  598.          struct nfs_inode_info nfs_i;
  599.          struct xiafs_inode_info xiafs_i;
  600.          struct sysv_inode_info sysv_i;
  601. +        void * generic_ip;
  602.      } u;
  603.  };
  604.  
  605. @@ -260,6 +261,7 @@
  606.          struct nfs_sb_info nfs_sb;
  607.          struct xiafs_sb_info xiafs_sb;
  608.          struct sysv_sb_info sysv_sb;
  609. +        void *generic_sbp;
  610.      } u;
  611.  };
  612.  
  613. diff -u --recursive --new-file v1.0.4/linux/include/linux/kernel_stat.h linux/include/linux/kernel_stat.h
  614. --- v1.0.4/linux/include/linux/kernel_stat.h    Tue Feb  1 09:19:34 1994
  615. +++ linux/include/linux/kernel_stat.h    Mon Mar 28 11:21:52 1994
  616. @@ -14,7 +14,7 @@
  617.      unsigned int dk_drive[DK_NDRIVE];
  618.      unsigned int pgpgin, pgpgout;
  619.      unsigned int pswpin, pswpout;
  620. -    unsigned int interrupts;
  621. +    unsigned int interrupts[16];
  622.      unsigned int ipackets, opackets;
  623.      unsigned int ierrors, oerrors;
  624.      unsigned int collisions;
  625. diff -u --recursive --new-file v1.0.4/linux/init/main.c linux/init/main.c
  626. --- v1.0.4/linux/init/main.c    Mon Feb  7 16:07:01 1994
  627. +++ linux/init/main.c    Sat Mar 26 14:33:31 1994
  628. @@ -120,6 +120,7 @@
  629.  #define MAX_INIT_ARGS 8
  630.  #define MAX_INIT_ENVS 8
  631.  #define COMMAND_LINE ((char *) (PARAM+2048))
  632. +#define COMMAND_LINE_SIZE 256
  633.  
  634.  extern void time_init(void);
  635.  
  636. @@ -149,7 +150,7 @@
  637.  
  638.  static char fpu_error = 0;
  639.  
  640. -static char command_line[80] = { 0, };
  641. +static char command_line[COMMAND_LINE_SIZE] = { 0, };
  642.  
  643.  char *get_options(char *str, int *ints) 
  644.  {
  645. @@ -329,12 +330,19 @@
  646.  static void copy_options(char * to, char * from)
  647.  {
  648.      char c = ' ';
  649. +    int len = 0;
  650.  
  651. -    do {
  652. -        if (c == ' ' && !memcmp("mem=", from, 4))
  653. +    for (;;) {
  654. +        if (c == ' ' && *(unsigned long *)from == *(unsigned long *)"mem=")
  655.              memory_end = simple_strtoul(from+4, &from, 0);
  656. -        c = *(to++) = *(from++);
  657. -    } while (c);
  658. +        c = *(from++);
  659. +        if (!c)
  660. +            break;
  661. +        if (COMMAND_LINE_SIZE <= ++len)
  662. +            break;
  663. +        *(to++) = c;
  664. +    }
  665. +    *to = '\0';
  666.  }
  667.  
  668.  static void copro_timeout(void)
  669. diff -u --recursive --new-file v1.0.4/linux/kernel/irq.c linux/kernel/irq.c
  670. --- v1.0.4/linux/kernel/irq.c    Tue Feb  1 09:05:00 1994
  671. +++ linux/kernel/irq.c    Mon Mar 28 11:21:52 1994
  672. @@ -201,7 +201,7 @@
  673.  {
  674.      struct sigaction * sa = irq + irq_sigaction;
  675.  
  676. -    kstat.interrupts++;
  677. +    kstat.interrupts[irq]++;
  678.      sa->sa_handler((int) regs);
  679.  }
  680.  
  681. @@ -214,7 +214,7 @@
  682.  {
  683.      struct sigaction * sa = irq + irq_sigaction;
  684.  
  685. -    kstat.interrupts++;
  686. +    kstat.interrupts[irq]++;
  687.      sa->sa_handler(irq);
  688.  }
  689.  
  690.