home *** CD-ROM | disk | FTP | other *** search
/ PC-Online 1996 May / PCOnline_05_1996.bin / linux / source / kernel-s / v1.2 / patch-1.003 / patch-1.2.10
Text File  |  1995-06-12  |  35KB  |  961 lines

  1. diff -u --recursive --new-file v1.2.9/linux/Makefile linux/Makefile
  2. --- v1.2.9/linux/Makefile    Thu Jun  1 13:16:23 1995
  3. +++ linux/Makefile    Mon Jun 12 19:23:35 1995
  4. @@ -1,6 +1,6 @@
  5.  VERSION = 1
  6.  PATCHLEVEL = 2
  7. -SUBLEVEL = 9
  8. +SUBLEVEL = 10
  9.  
  10.  ARCH = i386
  11.  
  12. diff -u --recursive --new-file v1.2.9/linux/drivers/block/Makefile linux/drivers/block/Makefile
  13. --- v1.2.9/linux/drivers/block/Makefile    Wed Mar 29 06:52:57 1995
  14. +++ linux/drivers/block/Makefile    Mon Jun 12 16:27:43 1995
  15. @@ -100,6 +100,9 @@
  16.  
  17.  dep:
  18.      $(CPP) -M $(SRCS) > .depend
  19. +ifdef BLOCK_MODULE_OBJS
  20. +    $(CPP) -M -DMODULE $(BLOCK_MODULE_OBJS:.o=.c) >> .depend
  21. +endif
  22.  
  23.  modules: $(BLOCK_MODULE_OBJS)
  24.      echo $(BLOCK_MODULE_OBJS) > ../../modules/BLOCK_MODULES
  25. diff -u --recursive --new-file v1.2.9/linux/drivers/block/README.ide linux/drivers/block/README.ide
  26. --- v1.2.9/linux/drivers/block/README.ide    Thu Jun  1 13:16:23 1995
  27. +++ linux/drivers/block/README.ide    Fri Jun  2 13:46:26 1995
  28. @@ -25,7 +25,7 @@
  29.          - use kernel command line option:   hda=serialize
  30.  NEW!    - experimental support for DTC-2278D interfaces
  31.          - use kernel command line option:  hda=dtc2278
  32. -NEW!    - run-time selectible 32bit interface support (using hdparm-2.3)
  33. +NEW!    - run-time selectable 32bit interface support (using hdparm-2.3)
  34.  
  35.  Under construction:
  36.  
  37. diff -u --recursive --new-file v1.2.9/linux/drivers/block/README.sbpcd linux/drivers/block/README.sbpcd
  38. --- v1.2.9/linux/drivers/block/README.sbpcd    Mon May 29 11:16:04 1995
  39. +++ linux/drivers/block/README.sbpcd    Fri Jun  2 08:16:16 1995
  40. @@ -1,9 +1,9 @@
  41. -This README belongs to release 3.5 or newer of the SoundBlaster Pro
  42. -(Matsushita, Kotobuki, Panasonic, CreativeLabs, Longshine and soon TEAC, too)
  43. +This README belongs to release 3.7 or newer of the SoundBlaster Pro
  44. +(Matsushita, Kotobuki, Panasonic, CreativeLabs, Longshine and TEAC)
  45.  CD-ROM driver for Linux.
  46.  
  47.  The driver is able to drive the whole family of "traditional" IDE-style (that
  48. -has nothing to do with the new "Enhanced IDE" drive standard) Matsushita,
  49. +is NOT the new "Enhanced IDE" or "ATAPI" drive standard) Matsushita,
  50.  Kotobuki, Panasonic drives, sometimes labelled as "CreativeLabs". The
  51.  well-known drives are CR-521, CR-522, CR-523, CR-562, CR-563.
  52.  
  53. @@ -42,6 +42,10 @@
  54.  The interface type has to get configured in /usr/include/linux/sbpcd.h, 
  55.  because the behavior of some sound card interfaces is different.
  56.  
  57. +With some TEAC drives I have seen interface cards which seem to lack the
  58. +"drive select" lines; always drive 0 gets addressed. To avoid "mirror drives"
  59. +with such interface cards, set MAX_DRIVES to 1 and jumper your drive to ID 0.
  60. +
  61.  The driver respects all known drive firmware releases - my old drive is a 2.11,
  62.  but it should work with CR-52x drives <2.01 ... >3.00 and with CR-56x drives
  63.  <0.75 .. 5.00.
  64. @@ -79,9 +83,8 @@
  65.  CDplayer and WorkBone - tell me if it is not compatible with other software.
  66.  
  67.  With the CR-562 and CR-563 drives, the reading of audio frames is possible.
  68. -This is implemented by an IOCTL function which per default reads only up to
  69. -4 frames of 2352 bytes at once (configurable with the "READ_AUDIO" define,
  70. -"55" is the maximum if you use sbpcd as a "module").
  71. +This is implemented by an IOCTL function which reads READ_AUDIO frames of
  72. +2352 bytes at once (configurable with the "READ_AUDIO" define, default is 0).
  73.  Reading the same frame a second time gives different data; the frame data 
  74.  start at a different position, but all read bytes are valid, and we always
  75.  read 98 consecutive chunks (of 24 Bytes) as a frame. Reading more than 1 frame
  76. @@ -89,8 +92,8 @@
  77.  get corrected by external, "higher level" software which reads the same frame 
  78.  again and tries to find and eliminate overlapping chunks (24-byte-pieces).
  79.  
  80. -The transfer rate with reading audio (1-frame-pieces) is as slow as 32 kB/sec.
  81. -This could be better reading bigger chunks, but the "missing" chunks possibly
  82. +The transfer rate with reading audio (1-frame-pieces) currently is very slow.
  83. +This can be better reading bigger chunks, but the "missing" chunks possibly
  84.  occur at the beginning of each single frame.
  85.  The software interface possibly may change a bit the day the SCSI driver
  86.  supports it too.
  87. diff -u --recursive --new-file v1.2.9/linux/drivers/block/README.sonycd535 linux/drivers/block/README.sonycd535
  88. --- v1.2.9/linux/drivers/block/README.sonycd535    Wed Feb 15 10:51:06 1995
  89. +++ linux/drivers/block/README.sonycd535    Mon Jun 12 12:06:46 1995
  90. @@ -58,13 +58,17 @@
  91.  ======
  92.  
  93.  Many thanks to Ron Jeppesen (ronj.an@site007.saic.com) for getting
  94. -this project off the ground.  He wrote the initial release and
  95. -the first two patches to this driver (0.1, 0.2, and 0.3).
  96. +this project off the ground.  He wrote the initial release
  97. +and the first two patches to this driver (0.1, 0.2, and 0.3).
  98.  Thanks also to Eberhard Moenkeberg (emoenke@gwdg.de) for prodding
  99. -me to place this code into the mainstream Linux source tree (as
  100. -of Linux version 1.1.91), as well as some patches to make it a
  101. -better device citizen.  Further thanks to "S. Joel Katz"
  102. -<stimpson@panix.com> for his MODULE patches (see details below).
  103. +me to place this code into the mainstream Linux source tree
  104. +(as of Linux version 1.1.91), as well as some patches to make
  105. +it a better device citizen.  Further thanks to "S. Joel Katz"
  106. +<stimpson@panix.com> for his MODULE patches (see details below),
  107. +Porfiri Claudio <C.Porfiri@nisms.tei.ericsson.se> for patches
  108. +to make the driver work with the older CDU-510/515 series, and
  109. +Heiko Eissfeldt <heiko@colossus.escape.de> for pointing out that
  110. +the verify_area() checks were ignoring the results of said checks.
  111.  
  112.  (Acknowledgments from Ron Jeppesen in the 0.3 release:)
  113.  Thanks to Corey Minyard who wrote the original CDU-31A driver on which
  114. diff -u --recursive --new-file v1.2.9/linux/drivers/block/sbpcd.c linux/drivers/block/sbpcd.c
  115. --- v1.2.9/linux/drivers/block/sbpcd.c    Mon May 29 11:16:05 1995
  116. +++ linux/drivers/block/sbpcd.c    Fri Jun  2 08:16:16 1995
  117. @@ -11,7 +11,7 @@
  118.   *            Also for the TEAC CD-55A drive.
  119.   *            Not for Funai or Sanyo drives.
  120.   *
  121. - *  NOTE:     This is release 3.6.
  122. + *  NOTE:     This is release 3.7.
  123.   *
  124.   *  VERSION HISTORY
  125.   *
  126. @@ -207,6 +207,13 @@
  127.   *       Initial size of the READ_AUDIO buffer is 0. Can get set to any size
  128.   *       during runtime.
  129.   *
  130. + *  3.7  Introduced MAX_DRIVES for some poor interface cards (seen with TEAC
  131. + *       drives) which allow only one drive (ID 0); this avoids repetitive
  132. + *       detection under IDs 1..3. 
  133. + *       Elongated cmd_out_T response waiting; necessary for photo CDs with
  134. + *       a lot of sessions.
  135. + *       Bettered the sbpcd_open() behavior with TEAC drives.
  136. + *
  137.   *  TODO
  138.   *
  139.   *     disk change detection
  140. @@ -288,13 +295,7 @@
  141.  
  142.  #include "blk.h"
  143.  
  144. -#define VERSION "v3.6-1 Eberhard Moenkeberg <emoenke@gwdg.de>"
  145. -
  146. -#if 0
  147. -#define INLINE
  148. -#else
  149. -#define INLINE inline
  150. -#endif
  151. +#define VERSION "v3.7 Eberhard Moenkeberg <emoenke@gwdg.de>"
  152.  
  153.  /*==========================================================================*/
  154.  /*
  155. @@ -406,6 +407,9 @@
  156.  #endif
  157.  
  158.  /*==========================================================================*/
  159. +
  160. +#define INLINE inline
  161. +
  162.  /*==========================================================================*/
  163.  /*
  164.   * the forward references:
  165. @@ -533,8 +537,9 @@
  166.  static u_char xa_head_buf[CD_XA_HEAD];
  167.  static u_char xa_tail_buf[CD_XA_TAIL];
  168.  
  169. +static volatile u_char busy_data=0;
  170. +static volatile u_char busy_audio=0; /* true semaphores would be safer */
  171.  static u_long timeout;
  172. -static u_char busy_data=0, busy_audio=0; /* true semaphores would be safer */
  173.  static volatile u_char timed_out_delay=0;
  174.  static volatile u_char timed_out_data=0;
  175.  #if 0
  176. @@ -1017,21 +1022,29 @@
  177.                      st=inb(CDi_status);
  178.                      if (!(st&s_not_result_ready)) break;
  179.                  }
  180. -                if (j != 0 || timeout <= jiffies) break;
  181. -                sbp_sleep(0);
  182. +                if ((j!=0)||(timeout<=jiffies)) break;
  183. +                sbp_sleep(1);
  184.                  j = 1;
  185.              }
  186. -            if (timeout <= jiffies) break;
  187. +            if (timeout<=jiffies) break;
  188.              infobuf[i]=inb(CDi_info);
  189.          }
  190.      }
  191. +#if 000
  192. +    while (!(inb(CDi_status)&s_not_result_ready))
  193. +    {
  194. +        infobuf[i++]=inb(CDi_info);
  195. +    }
  196. +    j=i-response_count;
  197. +    if (j>0) msg(DBG_INF,"ResponseInfo: got %d trailing bytes.\n",j);
  198. +#endif 000
  199.      for (j=0;j<i;j++)
  200.          sprintf(&msgbuf[j*3]," %02X",infobuf[j]);
  201.      msgbuf[j*3]=0;
  202.      msg(DBG_CMD,"ResponseInfo:%s (%d,%d)\n",msgbuf,response_count,i);
  203. -    st=response_count-i;
  204. -    if (st>0) st=-st;
  205. -    return (st);
  206. +    j=response_count-i;
  207. +    if (j>0) return (-j);
  208. +    else return (i);
  209.  }
  210.  /*==========================================================================*/
  211.  static void EvaluateStatus(int st)
  212. @@ -1253,7 +1266,7 @@
  213.  static int cmd_out_T(void)
  214.  {
  215.  #undef CMDT_TRIES
  216. -#define CMDT_TRIES 100
  217. +#define CMDT_TRIES 1000
  218.      
  219.      static int cc_DriveReset(void);
  220.      int i, j, l, ntries;
  221. @@ -1358,7 +1371,7 @@
  222.              return (-D_S[d].error_state-400);
  223.          }
  224.          if (drvcmd[0]==CMDT_READ) return (0); /* handled elsewhere */
  225. -        sbp_sleep(1);
  226. +        sbp_sleep(10);
  227.          if (ntries>(CMDT_TRIES-50)) continue;
  228.          msg(DBG_TEA,"cmd_out_T: next CMDT_TRIES (%02X): %d.\n", drvcmd[0], ntries-1);
  229.      }
  230. @@ -1414,7 +1427,7 @@
  231.          if (D_S[d].in_SpinUp) msg(DBG_SPI,"in_SpinUp: to ResponseStatus.\n");
  232.          i=ResponseStatus();
  233.          /* builds status_bits, returns orig. status or p_busy_new */
  234. -        if (i<0) return (-9);
  235. +        if (i<0) return (i);
  236.          if (flags_cmd_out&(f_bit1|f_wait_if_busy))
  237.          {
  238.              if (!st_check)
  239. @@ -2083,15 +2096,18 @@
  240.          sbp_sleep(1);
  241.      }
  242.      while ((i<0)&&(j));
  243. -    if (j==0) cc_DriveReset();
  244. -    j=20;
  245. -    do
  246. -    {
  247. -        i=cc_LockDoor(1);
  248. -        --j;
  249. -        sbp_sleep(1);
  250. +    if (j==0)
  251. +    {        
  252. +        cc_DriveReset();
  253. +        j=20;
  254. +        do
  255. +        {
  256. +            i=cc_LockDoor(1);
  257. +            --j;
  258. +            sbp_sleep(1);
  259. +        }
  260. +        while ((i<0)&&(j));
  261.      }
  262. -    while ((i<0)&&(j));
  263.      return (i);
  264.  }
  265.  /*==========================================================================*/
  266. @@ -2243,7 +2259,7 @@
  267.      else if (famT_drive)
  268.      {
  269.          D_S[d].sense_byte=0;
  270. -        if (infobuf[4]==0x01) D_S[d].xa_byte=0x20;
  271. +        if (infobuf[4]==0x01) D_S[d].xa_byte=0x20; /* wrong!!!! */
  272.          i=2;
  273.      }
  274.      D_S[d].frame_size=make16(infobuf[i],infobuf[i+1]);
  275. @@ -3204,7 +3220,7 @@
  276.              if (D_S[d].firmware_version[j]!=lcs_firm_f4[j]) break;
  277.          if (j==4) D_S[d].drv_type=drv_f4;
  278.  
  279. -        if (!D_S[d].drv_type) ask_mail();
  280. +        if (D_S[d].drv_type==drv_famL) ask_mail();
  281.      }
  282.      else if (famT_drive)
  283.      {
  284. @@ -3382,7 +3398,7 @@
  285.      
  286.      msg(DBG_INI,"check_drives entered.\n");
  287.      ndrives=0;
  288. -    for (j=0;j<NR_SBPCD;j++)
  289. +    for (j=0;j<MAX_DRIVES;j++)
  290.      {
  291.          D_S[ndrives].drv_id=j;
  292.          if (sbpro_type==1) D_S[ndrives].drv_sel=(j&0x01)<<1|(j&0x02)>>1;
  293. @@ -3624,7 +3640,7 @@
  294.          return (i);
  295.      }
  296.      if (D_S[d].f_multisession) D_S[d].sbp_bufsiz=1;  /* possibly a weird PhotoCD */
  297. -    
  298. +    else D_S[d].sbp_bufsiz=SBP_BUFFER_FRAMES;
  299.      i=cc_ReadTocEntry(D_S[d].n_first_track);
  300.      if (i<0)
  301.      {
  302. @@ -4823,6 +4839,7 @@
  303.      {
  304.          cc_DriveReset();
  305.          i=ResponseStatus();
  306. +        i=ResponseStatus();
  307.      }
  308.      if (i<0)
  309.      {
  310. @@ -5065,12 +5082,12 @@
  311.          msg(DBG_INF,"Auto-Probing can cause a hang (f.e. touching an ethernet card).\n");
  312.          msg(DBG_INF,"If that happens, you have to reboot and use the\n");
  313.          msg(DBG_INF,"LILO (kernel) command line feature like:\n");
  314. -        msg(DBG_INF,"\n   LILO boot: ... sbpcd=0x230,SoundBlaster\n");
  315. +        msg(DBG_INF,"   LILO boot: ... sbpcd=0x230,SoundBlaster\n");
  316.          msg(DBG_INF,"or like:\n");
  317.          msg(DBG_INF,"   LILO boot: ... sbpcd=0x300,LaserMate\n");
  318.          msg(DBG_INF,"or like:\n");
  319.          msg(DBG_INF,"   LILO boot: ... sbpcd=0x330,SPEA\n");
  320. -        msg(DBG_INF,"\nwith your REAL address.\n");
  321. +        msg(DBG_INF,"with your REAL address.\n");
  322.          msg(DBG_INF,"= = = = = = = = = = END of WARNING = = = = = = = = = =\n\n");
  323.      }
  324.  #endif DISTRIBUTION
  325. @@ -5153,8 +5170,10 @@
  326.          
  327.          cc_ReadStatus();
  328.          i=ResponseStatus();  /* returns orig. status or p_busy_new */
  329. +        if (famT_drive) i=ResponseStatus();  /* returns orig. status or p_busy_new */
  330.          if (i<0)
  331. -            msg(DBG_INF,"init: ResponseStatus returns %02X\n",i);
  332. +            if (i!=-402)
  333. +                msg(DBG_INF,"init: ResponseStatus returns %d.\n",i);
  334.          else
  335.          {
  336.              if (st_check)
  337. diff -u --recursive --new-file v1.2.9/linux/drivers/block/sonycd535.c linux/drivers/block/sonycd535.c
  338. --- v1.2.9/linux/drivers/block/sonycd535.c    Thu Mar  9 20:37:33 1995
  339. +++ linux/drivers/block/sonycd535.c    Mon Jun 12 12:06:47 1995
  340. @@ -12,14 +12,24 @@
  341.   * I tried polling without the sony_sleep during the data transfers but
  342.   * it did not speed things up any.
  343.   *
  344. - *  5/23/93 (rgj) changed the major number to 21 to get rid of conflict
  345. + * 1993-05-23 (rgj) changed the major number to 21 to get rid of conflict
  346.   * with CDU-31A driver.  This is the also the number from the Linux
  347.   * Device Driver Registry for the Sony Drive.  Hope nobody else is using it.
  348.   *
  349. - *  8/29/93 (rgj) remove the configuring of the interface board address
  350. + * 1993-08-29 (rgj) remove the configuring of the interface board address
  351.   * from the top level configuration, you have to modify it in this file.
  352.   *
  353. - * 1/26/95 Made module-capable (Joel Katz <Stimpson@Panix.COM>)
  354. + * 1995-01-26 Made module-capable (Joel Katz <Stimpson@Panix.COM>)
  355. + *
  356. + * 1995-05-20
  357. + *  Modified to support CDU-510/515 series
  358. + *      (Claudio Porfiri<C.Porfiri@nisms.tei.ericsson.se>)
  359. + *  Fixed to report verify_area() failures
  360. + *      (Heiko Eissfeldt <heiko@colossus.escape.de>)
  361. + *
  362. + * 1995-06-01
  363. + *  More chages to support CDU-510/515 series
  364. + *      (Claudio Porfiri<C.Porfiri@nisms.tei.ericsson.se>)
  365.   *
  366.   * Things to do:
  367.   *  - handle errors and status better, put everything into a single word
  368. @@ -131,7 +141,7 @@
  369.  #define MAJOR_NR CDU535_CDROM_MAJOR
  370.  
  371.  #ifdef MODULE
  372. -# include "/usr/src/linux/drivers/block/blk.h"
  373. +# include "blk.h"
  374.  #else
  375.  # include "blk.h"
  376.  # define MOD_INC_USE_COUNT
  377. @@ -157,6 +167,13 @@
  378.  # define CDU535_MESSAGE_NAME    "Sony CDU-535"
  379.  #endif
  380.  
  381. +#ifndef MAX_SPINUP_RETRY
  382. +# define MAX_SPINUP_RETRY        3    /* 1 is sufficient for most drives... */
  383. +#endif
  384. +#ifndef RETRY_FOR_BAD_STATUS
  385. +# define RETRY_FOR_BAD_STATUS    100    /* in 10th of second */
  386. +#endif
  387. +
  388.  #ifndef DEBUG
  389.  # define DEBUG    1
  390.  #endif
  391. @@ -811,7 +828,6 @@
  392.      Byte status[2];
  393.      Byte cmd[2];
  394.  
  395. -
  396.      if (!sony_inuse) {
  397.          cdu_open(NULL, NULL);
  398.      }
  399. @@ -870,36 +886,56 @@
  400.  
  401.                      /*
  402.                       * Read the data.  If the drive was not spinning,
  403. -                     * spin it up and try once more.
  404. +                     * spin it up and try some more.
  405.                       */
  406. -                    spin_up_retry = 0;
  407. -                    for (;;) {
  408. -#if DEBUG > 1
  409. -                        if (check_drive_status() != 0) {
  410. -                            /* drive not ready */
  411. -                            sony_first_block = -1;
  412. -                            sony_last_block = -1;
  413. -                            end_request(0);
  414. -                            return;
  415. -                        }
  416. -#endif
  417. -                        if (0 <= seek_and_read_N_blocks(params, read_size,
  418. -                                    status, sony_buffer, (read_size * 2048)))
  419. +                    for (spin_up_retry=0 ;; ++spin_up_retry) {
  420. +                        /* This loop has been modified to support the Sony
  421. +                         * CDU-510/515 series, thanks to Claudio Porfiri 
  422. +                         * <C.Porfiri@nisms.tei.ericsson.se>.
  423. +                         */
  424. +                        /*
  425. +                         * This part is to deal with very slow hardware.  We
  426. +                         * try at most MAX_SPINUP_RETRY times to read the same
  427. +                         * block.  A check for seek_and_read_N_blocks' result is
  428. +                         * performed; if the result is wrong, the CDROM's engine
  429. +                         * is restarted and the operation is tried again.
  430. +                         */
  431. +                        /*
  432. +                         * 1995-06-01: The system got problems when downloading
  433. +                         * from Slackware CDROM, the problem seems to be:
  434. +                         * seek_and_read_N_blocks returns BAD_STATUS and we
  435. +                         * should wait for a while before retrying, so a new
  436. +                         * part was added to discriminate the return value from
  437. +                         * seek_and_read_N_blocks for the various cases.
  438. +                         */
  439. +                        int readStatus = seek_and_read_N_blocks(params, read_size,
  440. +                                    status, sony_buffer, (read_size * 2048));
  441. +                        if (0 <= readStatus)    /* Good data; common case, placed first */
  442.                              break;
  443. -                        if (!(status[0] & SONY535_STATUS1_NOT_SPINNING) ||
  444. -                                                            spin_up_retry) {
  445. -                            printk(CDU535_MESSAGE_NAME " Read error: 0x%.2x\n",
  446. -                                    status[0]);
  447. +                        if (readStatus == NO_ROOM || spin_up_retry == MAX_SPINUP_RETRY) {
  448. +                            /* give up */
  449. +                            if (readStatus == NO_ROOM)
  450. +                                printk(CDU535_MESSAGE_NAME " No room to read from CD\n");
  451. +                            else
  452. +                                printk(CDU535_MESSAGE_NAME " Read error: 0x%.2x\n",
  453. +                                        status[0]);
  454.                              sony_first_block = -1;
  455.                              sony_last_block = -1;
  456.                              end_request(0);
  457.                              return;
  458.                          }
  459. +                        if (readStatus == BAD_STATUS) {
  460. +                            /* Sleep for a while, then retry */
  461. +                            current->state = TASK_INTERRUPTIBLE;
  462. +                            current->timeout = jiffies + RETRY_FOR_BAD_STATUS;
  463. +                            schedule();
  464. +                        }
  465. +#if DEBUG > 0
  466.                          printk(CDU535_MESSAGE_NAME
  467.                              " debug: calling spin up when reading data!\n");
  468. +#endif
  469.                          cmd[0] = SONY535_SPIN_UP;
  470.                          do_sony_cmd(cmd, 1, status, NULL, 0, 0);
  471. -                        spin_up_retry = 1;
  472.                      }
  473.                  }
  474.                  /*
  475. @@ -1008,7 +1044,7 @@
  476.  sony_get_subchnl_info(long arg)
  477.  {
  478.      struct cdrom_subchnl schi;
  479. -
  480. +    int err;
  481.  
  482.      /* Get attention stuff */
  483.      if (check_drive_status() != 0)
  484. @@ -1018,7 +1054,9 @@
  485.      if (!sony_toc_read) {
  486.          return -EIO;
  487.      }
  488. -    verify_area(VERIFY_WRITE /* and read */ , (char *)arg, sizeof schi);
  489. +    err = verify_area(VERIFY_WRITE /* and read */ , (char *)arg, sizeof schi);
  490. +    if (err)
  491. +        return err;
  492.  
  493.      memcpy_fromfs(&schi, (char *)arg, sizeof schi);
  494.  
  495. @@ -1079,8 +1117,9 @@
  496.      unsigned int dev;
  497.      Byte status[2];
  498.      Byte cmd_buff[10], params[10];
  499. -    int  i, dsc_status;
  500. -
  501. +    int  i;
  502. +    int  dsc_status;
  503. +    int  err;
  504.  
  505.      if (!inode) {
  506.          return -EINVAL;
  507. @@ -1170,7 +1209,9 @@
  508.          break;
  509.  
  510.      case CDROMPLAYMSF:            /* Play starting at the given MSF address. */
  511. -        verify_area(VERIFY_READ, (char *)arg, 6);
  512. +        err = verify_area(VERIFY_READ, (char *)arg, 6);
  513. +        if (err)
  514. +            return err;
  515.          spin_up_drive(status);
  516.          set_drive_mode(SONY535_AUDIO_DRIVE_MODE, status);
  517.          memcpy_fromfs(params, (void *)arg, 6);
  518. @@ -1209,7 +1250,9 @@
  519.              if (!sony_toc_read)
  520.                  return -EIO;
  521.              hdr = (struct cdrom_tochdr *)arg;
  522. -            verify_area(VERIFY_WRITE, hdr, sizeof *hdr);
  523. +            err = verify_area(VERIFY_WRITE, hdr, sizeof *hdr);
  524. +            if (err)
  525. +                return err;
  526.              loc_hdr.cdth_trk0 = bcd_to_int(sony_toc->first_track_num);
  527.              loc_hdr.cdth_trk1 = bcd_to_int(sony_toc->last_track_num);
  528.              memcpy_tofs(hdr, &loc_hdr, sizeof *hdr);
  529. @@ -1229,7 +1272,9 @@
  530.                  return -EIO;
  531.              }
  532.              entry = (struct cdrom_tocentry *)arg;
  533. -            verify_area(VERIFY_WRITE /* and read */ , entry, sizeof *entry);
  534. +            err = verify_area(VERIFY_WRITE /* and read */ , entry, sizeof *entry);
  535. +            if (err)
  536. +                return err;
  537.  
  538.              memcpy_fromfs(&loc_entry, entry, sizeof loc_entry);
  539.  
  540. @@ -1268,7 +1313,9 @@
  541.              sony_get_toc();
  542.              if (!sony_toc_read)
  543.                  return -EIO;
  544. -            verify_area(VERIFY_READ, (char *)arg, sizeof ti);
  545. +            err = verify_area(VERIFY_READ, (char *)arg, sizeof ti);
  546. +            if (err)
  547. +                return err;
  548.  
  549.              memcpy_fromfs(&ti, (char *)arg, sizeof ti);
  550.              if ((ti.cdti_trk0 < sony_toc->first_track_num)
  551. @@ -1337,7 +1384,9 @@
  552.          {
  553.              struct cdrom_volctrl volctrl;
  554.  
  555. -            verify_area(VERIFY_READ, (char *)arg, sizeof volctrl);
  556. +            err = verify_area(VERIFY_READ, (char *)arg, sizeof volctrl);
  557. +            if (err)
  558. +                return err;
  559.  
  560.              memcpy_fromfs(&volctrl, (char *)arg, sizeof volctrl);
  561.              cmd_buff[0] = SONY535_SET_VOLUME;
  562. diff -u --recursive --new-file v1.2.9/linux/drivers/char/cyclades.c linux/drivers/char/cyclades.c
  563. --- v1.2.9/linux/drivers/char/cyclades.c    Thu Jun  1 13:16:23 1995
  564. +++ linux/drivers/char/cyclades.c    Fri Jun  2 13:46:26 1995
  565. @@ -2643,7 +2643,7 @@
  566.  
  567.          /* The Cyclom-16Y does not decode address bit 9 and therefore
  568.             cannot distinguish between references to chip 0 and a non-
  569. -           existent chip 4.  If the preceeding clearing of the supposed
  570. +           existent chip 4.  If the preceding clearing of the supposed
  571.             chip 4 GFRCR register appears at chip 0, there is no chip 4
  572.             and this must be a Cyclom-16Y, not a Cyclom-32Ye.
  573.          */
  574. diff -u --recursive --new-file v1.2.9/linux/drivers/scsi/fdomain.c linux/drivers/scsi/fdomain.c
  575. --- v1.2.9/linux/drivers/scsi/fdomain.c    Mon Jan 16 07:17:37 1995
  576. +++ linux/drivers/scsi/fdomain.c    Fri Jun  9 08:03:10 1995
  577. @@ -1,10 +1,10 @@
  578.  /* fdomain.c -- Future Domain TMC-16x0 SCSI driver
  579.   * Created: Sun May  3 18:53:19 1992 by faith@cs.unc.edu
  580. - * Revised: Sat Jan 14 21:39:15 1995 by faith@cs.unc.edu
  581. + * Revised: Mon Jun  5 09:21:54 1995 by faith@cs.unc.edu
  582.   * Author: Rickard E. Faith, faith@cs.unc.edu
  583.   * Copyright 1992, 1993, 1994, 1995 Rickard E. Faith
  584.   *
  585. - * $Id: fdomain.c,v 5.26 1995/01/15 02:39:19 root Exp $
  586. + * $Id: fdomain.c,v 5.28 1995/06/05 13:21:57 faith Exp $
  587.  
  588.   * This program is free software; you can redistribute it and/or modify it
  589.   * under the terms of the GNU General Public License as published by the
  590. @@ -41,7 +41,7 @@
  591.   The following BIOS versions are supported: 2.0, 3.0, 3.2, 3.4, and 3.5.
  592.   The following chips are supported: TMC-1800, TMC-18C50, TMC-18C30.
  593.   Reports suggest that the driver will also work with the 36C70 chip and
  594. - with the Quantum ISA-200S SCSI adapter.
  595. + with the Quantum ISA-200S and ISA-250MG SCSI adapters.
  596.  
  597.   Please note that the drive ordering that Future Domain implemented in BIOS
  598.   versions 3.4 and 3.5 is the opposite of the order (currently) used by the
  599. @@ -141,6 +141,10 @@
  600.   and to Martin Andrews (andrewm@ccfadm.eeg.ccf.org) for the signature to
  601.   some random TMC-1680 repackaged by IBM.
  602.  
  603. + Thanks for Mark Singer (elf@netcom.com) and Richard Simpson
  604. + (rsimpson@ewrcsdra.demon.co.uk) for more Quantum signatures and detective
  605. + work on the Quantum RAM layout.
  606. +
  607.   All of the alpha testers deserve much thanks.
  608.  
  609.  
  610. @@ -190,7 +194,7 @@
  611.  #include <linux/string.h>
  612.  #include <linux/ioport.h>
  613.  
  614. -#define VERSION          "$Revision: 5.26 $"
  615. +#define VERSION          "$Revision: 5.28 $"
  616.  
  617.  /* START OF USER DEFINABLE OPTIONS */
  618.  
  619. @@ -281,7 +285,7 @@
  620.  static int               bios_major        = 0;
  621.  static int               bios_minor        = 0;
  622.  static int               PCI_bus           = 0;
  623. -static int               ISA_200S          = 0;    /* Quantum ISA-200S */
  624. +static int               Quantum           = 0;    /* Quantum board variant */
  625.  static int               interrupt_level   = 0;
  626.  static volatile int      in_command        = 0;
  627.  static Scsi_Cmnd         *current_SC       = NULL;
  628. @@ -357,18 +361,22 @@
  629.     int  sig_length;
  630.     int  major_bios_version;
  631.     int  minor_bios_version;
  632. -   int  flag;            /* 1 == PCI_bus, 2 == ISA_200S */
  633. +   int  flag; /* 1 == PCI_bus, 2 == ISA_200S, 3 == ISA_250MG, 4 == ISA_200S */
  634.  } signatures[] = {
  635.     /*          1         2         3         4         5         6 */
  636.     /* 123456789012345678901234567890123456789012345678901234567890 */
  637.     { "FUTURE DOMAIN CORP. (C) 1986-1990 1800-V2.07/28/89",  5, 50,  2,  0, 0 },
  638.     { "FUTURE DOMAIN CORP. (C) 1986-1990 1800-V1.07/28/89",  5, 50,  2,  0, 0 },
  639.     { "FUTURE DOMAIN CORP. (C) 1986-1990 1800-V2.07/28/89", 72, 50,  2,  0, 2 },
  640. +   { "FUTURE DOMAIN CORP. (C) 1986-1990 1800-V2.0",        73, 43,  2,  0, 3 },
  641. +   { "FUTURE DOMAIN CORP. (C) 1991 1800-V2.0.",            72, 39,  2,  0, 4 },
  642.     { "FUTURE DOMAIN CORP. (C) 1992 V3.00.004/02/92",        5, 44,  3,  0, 0 },
  643.     { "FUTURE DOMAIN TMC-18XX (C) 1993 V3.203/12/93",        5, 44,  3,  2, 0 },
  644.     { "IBM F1 P2 BIOS v1.0104/29/93",                        5, 28,  3, -1, 0 },
  645.     { "Future Domain Corp. V1.0008/18/93",                   5, 33,  3,  4, 0 },
  646.     { "Future Domain Corp. V1.0008/18/93",                  26, 33,  3,  4, 1 },
  647. +                /* This next signature may not be a 3.5 bios */
  648. +   { "Future Domain Corp. V2.0108/18/93",                   5, 33,  3,  5, 0 },
  649.     { "FUTURE DOMAIN CORP.  V3.5008/18/93",                  5, 34,  3,  5, 0 },
  650.     { "FUTURE DOMAIN 18c30/18c50/1800 (C) 1994 V3.5",        5, 44,  3,  5, 0 },
  651.     { "FUTURE DOMAIN TMC-18XX",                              5, 22, -1, -1, 0 },
  652. @@ -558,7 +566,7 @@
  653.          bios_major = signatures[j].major_bios_version;
  654.          bios_minor = signatures[j].minor_bios_version;
  655.          PCI_bus    = (signatures[j].flag == 1);
  656. -        ISA_200S   = (signatures[j].flag == 2);
  657. +        Quantum    = (signatures[j].flag > 1) ? signatures[j].flag : 0;
  658.          bios_base  = addresses[i];
  659.       }
  660.        }
  661. @@ -580,12 +588,20 @@
  662.       DOS (this geometry has nothing to do with physical geometry).
  663.         */
  664.  
  665. -      if (ISA_200S) {        /* The Quantum board is slightly different. */
  666. +      switch (Quantum) {
  667. +      case 2:            /* ISA_200S */
  668. +      case 3:            /* ISA_250MG */
  669.       port_base = *((char *)bios_base + 0x1fa2)
  670.             + (*((char *)bios_base + 0x1fa3) << 8);
  671. -      } else {
  672. +     break;
  673. +      case 4:            /* ISA_200S (another one) */
  674. +     port_base = *((char *)bios_base + 0x1fa3)
  675. +           + (*((char *)bios_base + 0x1fa4) << 8);
  676. +     break;
  677. +      default:
  678.       port_base = *((char *)bios_base + 0x1fcc)
  679.             + (*((char *)bios_base + 0x1fcd) << 8);
  680. +     break;
  681.        }
  682.     
  683.  #if DEBUG_DETECT
  684. @@ -648,7 +664,7 @@
  685.          scan more addresses.  If you have to modify this section for
  686.          your installation, please send mail to faith@cs.unc.edu. */
  687.  
  688. -     for (i = 0xff00; !flag && i > 0xf000; i -= 8) {
  689. +     for (i = 0xfff8; !flag && i > 0xe000; i -= 8) {
  690.          port_base = i;
  691.          if (check_region( port_base, 0x10 )) {
  692.  #if DEBUG_DETECT
  693. @@ -1603,10 +1619,21 @@
  694.     drive = MINOR(dev) / 16;
  695.  
  696.     if (bios_major == 2) {
  697. -      if (ISA_200S) {
  698. +      switch (Quantum) {
  699. +      case 2:            /* ISA_200S */
  700. +                /* The value of 25 has never been verified.
  701. +                   It should probably be 15. */
  702.       i = (struct drive_info *)( (char *)bios_base + 0x1f33 + drive * 25 );
  703. -      } else {
  704. +     break;
  705. +      case 3:            /* ISA_250MG */
  706. +     i = (struct drive_info *)( (char *)bios_base + 0x1f36 + drive * 15 );
  707. +     break;
  708. +      case 4:            /* ISA_200S (another one) */
  709. +     i = (struct drive_info *)( (char *)bios_base + 0x1f34 + drive * 15 );
  710. +     break;
  711. +      default:
  712.       i = (struct drive_info *)( (char *)bios_base + 0x1f31 + drive * 25 );
  713. +     break;
  714.        }
  715.        info_array[0] = i->heads;
  716.        info_array[1] = i->sectors;
  717. diff -u --recursive --new-file v1.2.9/linux/drivers/scsi/st.c linux/drivers/scsi/st.c
  718. --- v1.2.9/linux/drivers/scsi/st.c    Thu Jun  1 13:16:24 1995
  719. +++ linux/drivers/scsi/st.c    Sun Jun 11 19:45:10 1995
  720. @@ -119,8 +119,8 @@
  721.  #ifdef DEBUG
  722.    if (debugging) {
  723.      printk("st%d: Error: %x, cmd: %x %x %x %x %x %x Len: %d\n", dev, result,
  724. -       SCpnt->cmnd[0], SCpnt->cmnd[1], SCpnt->cmnd[2],
  725. -       SCpnt->cmnd[3], SCpnt->cmnd[4], SCpnt->cmnd[5],
  726. +       SCpnt->data_cmnd[0], SCpnt->data_cmnd[1], SCpnt->data_cmnd[2],
  727. +       SCpnt->data_cmnd[3], SCpnt->data_cmnd[4], SCpnt->data_cmnd[5],
  728.         SCpnt->request_bufflen);
  729.      if (driver_byte(result) & DRIVER_SENSE)
  730.        print_sense("st", SCpnt);
  731. @@ -144,15 +144,15 @@
  732.    if ((sense[0] & 0x70) == 0x70 &&
  733.        scode == RECOVERED_ERROR
  734.  #ifdef ST_RECOVERED_WRITE_FATAL
  735. -      && SCpnt->cmnd[0] != WRITE_6
  736. -      && SCpnt->cmnd[0] != WRITE_FILEMARKS
  737. +      && SCpnt->data_cmnd[0] != WRITE_6
  738. +      && SCpnt->data_cmnd[0] != WRITE_FILEMARKS
  739.  #endif
  740.        ) {
  741.      scsi_tapes[dev].recover_count++;
  742.      scsi_tapes[dev].mt_status->mt_erreg += (1 << MT_ST_SOFTERR_SHIFT);
  743. -    if (SCpnt->cmnd[0] == READ_6)
  744. +    if (SCpnt->data_cmnd[0] == READ_6)
  745.        stp = "read";
  746. -    else if (SCpnt->cmnd[0] == WRITE_6)
  747. +    else if (SCpnt->data_cmnd[0] == WRITE_6)
  748.        stp = "write";
  749.      else
  750.        stp = "ioctl";
  751. @@ -640,6 +640,12 @@
  752.        if (debugging)
  753.      printk( "st%d: Write protected\n", dev);
  754.  #endif
  755. +      if ((flags & O_ACCMODE) == O_WRONLY || (flags & O_ACCMODE) == O_RDWR) {
  756. +    (STp->buffer)->in_use = 0;
  757. +    STp->buffer = 0;
  758. +    STp->in_use = 0;
  759. +    return (-EROFS);
  760. +      }
  761.      }
  762.  
  763.      if (scsi_tapes[dev].device->host->hostt->usage_count)
  764. diff -u --recursive --new-file v1.2.9/linux/fs/binfmt_elf.c linux/fs/binfmt_elf.c
  765. --- v1.2.9/linux/fs/binfmt_elf.c    Wed Feb 15 10:51:06 1995
  766. +++ linux/fs/binfmt_elf.c    Sun Jun 11 19:45:10 1995
  767. @@ -208,10 +208,13 @@
  768.      eppnt = elf_phdata;
  769.      for(i=0; i<interp_elf_ex->e_phnum; i++, eppnt++)
  770.        if(eppnt->p_type == PT_LOAD) {
  771. +        int elf_prot = (eppnt->p_flags & PF_R) ? PROT_READ : 0;
  772. +        if (eppnt->p_flags & PF_W) elf_prot |= PROT_WRITE;
  773. +        if (eppnt->p_flags & PF_X) elf_prot |= PROT_EXEC;
  774.          error = do_mmap(file, 
  775.                  eppnt->p_vaddr & 0xfffff000,
  776.                  eppnt->p_filesz + (eppnt->p_vaddr & 0xfff),
  777. -                PROT_READ | PROT_WRITE | PROT_EXEC,
  778. +                elf_prot,
  779.                  MAP_PRIVATE | MAP_DENYWRITE | (interp_elf_ex->e_type == ET_EXEC ? MAP_FIXED : 0),
  780.                  eppnt->p_offset & 0xfffff000);
  781.          
  782. @@ -530,10 +533,13 @@
  783.          
  784.          
  785.          if(elf_ppnt->p_type == PT_LOAD) {
  786. +            int elf_prot = (elf_ppnt->p_flags & PF_R) ? PROT_READ : 0;
  787. +            if (elf_ppnt->p_flags & PF_W) elf_prot |= PROT_WRITE;
  788. +            if (elf_ppnt->p_flags & PF_X) elf_prot |= PROT_EXEC;
  789.              error = do_mmap(file,
  790.                      elf_ppnt->p_vaddr & 0xfffff000,
  791.                      elf_ppnt->p_filesz + (elf_ppnt->p_vaddr & 0xfff),
  792. -                    PROT_READ | PROT_WRITE | PROT_EXEC,
  793. +                    elf_prot,
  794.                      MAP_FIXED | MAP_PRIVATE | MAP_DENYWRITE | MAP_EXECUTABLE,
  795.                      elf_ppnt->p_offset & 0xfffff000);
  796.              
  797. @@ -615,12 +621,15 @@
  798.      printk("(brk) %x\n" , current->mm->brk);
  799.  #endif
  800.  
  801. -    /* Why this, you ask???  Well SVr4 maps page 0 as read-only,
  802. -       and some applications "depend" upon this behavior.
  803. -       Since we do not have the power to recompile these, we
  804. -       emulate the SVr4 behavior.  Sigh.  */
  805. -    error = do_mmap(NULL, 0, 4096, PROT_READ | PROT_EXEC,
  806. -            MAP_FIXED | MAP_PRIVATE, 0);
  807. +    if( current->personality == PER_SVR4 )
  808. +    {
  809. +        /* Why this, you ask???  Well SVr4 maps page 0 as read-only,
  810. +           and some applications "depend" upon this behavior.
  811. +           Since we do not have the power to recompile these, we
  812. +           emulate the SVr4 behavior.  Sigh.  */
  813. +        error = do_mmap(NULL, 0, 4096, PROT_READ | PROT_EXEC,
  814. +                MAP_FIXED | MAP_PRIVATE, 0);
  815. +    }
  816.  
  817.      start_thread(regs, elf_entry, bprm->p);
  818.      if (current->flags & PF_PTRACED)
  819. diff -u --recursive --new-file v1.2.9/linux/include/linux/elf.h linux/include/linux/elf.h
  820. --- v1.2.9/linux/include/linux/elf.h    Sat Mar 18 12:45:46 1995
  821. +++ linux/include/linux/elf.h    Mon Jun  5 14:37:46 1995
  822. @@ -148,6 +148,12 @@
  823.    Elf32_Half    e_shstrndx;
  824.  } Elf32_Ehdr;
  825.  
  826. +/* These constants define the permissions on sections in the program
  827. +   header, p_flags. */
  828. +#define PF_R        0x4
  829. +#define PF_W        0x2
  830. +#define PF_X        0x1
  831. +
  832.  typedef struct elf_phdr{
  833.    Elf32_Word    p_type;
  834.    Elf32_Off    p_offset;
  835. @@ -234,6 +240,19 @@
  836.  #define EV_NONE        0        /* e_version, EI_VERSION */
  837.  #define EV_CURRENT    1
  838.  #define EV_NUM        2
  839. +
  840. +/* Notes used in ET_CORE */
  841. +#define NT_PRSTATUS    1
  842. +#define NT_PRFPREG    2
  843. +#define NT_PRPSINFO    3
  844. +#define NT_TASKSTRUCT    4
  845. +
  846. +/* Note header in a PT_NOTE section */
  847. +typedef struct elf_note {
  848. +  Elf32_Word    n_namesz;    /* Name size */
  849. +  Elf32_Word    n_descsz;    /* Content size */
  850. +  Elf32_Word    n_type;        /* Content type */
  851. +} Elf32_Nhdr;
  852.  
  853.  #define ELF_START_MMAP 0x80000000
  854.  
  855. diff -u --recursive --new-file v1.2.9/linux/include/linux/sbpcd.h linux/include/linux/sbpcd.h
  856. --- v1.2.9/linux/include/linux/sbpcd.h    Mon May 29 11:16:09 1995
  857. +++ linux/include/linux/sbpcd.h    Fri Jun  2 08:16:17 1995
  858. @@ -70,21 +70,25 @@
  859.  #if !(SBPCD_ISSUE-1)     /* first (or if you have only one) interface board: */
  860.  #define CDROM_PORT 0x340 /* <-----------<< port address                      */
  861.  #define SBPRO      0     /* <-----------<< interface type                    */
  862. +#define MAX_DRIVES 4     /* set to 1 if the card does not use "drive select" */
  863.  #define SOUND_BASE 0x220 /* <-----------<< sound address of this card or 0   */
  864.  #endif
  865.  #if !(SBPCD_ISSUE-2)     /* ==================== second interface board: === */
  866.  #define CDROM_PORT 0x344 /* <-----------<< port address                      */
  867.  #define SBPRO      0     /* <-----------<< interface type                    */
  868. +#define MAX_DRIVES 4     /* set to 1 if the card does not use "drive select" */
  869.  #define SOUND_BASE 0x000 /* <-----------<< sound address of this card or 0   */
  870.  #endif
  871.  #if !(SBPCD_ISSUE-3)     /* ===================== third interface board: === */
  872.  #define CDROM_PORT 0x634 /* <-----------<< port address                      */
  873.  #define SBPRO      1     /* <-----------<< interface type                    */
  874. +#define MAX_DRIVES 4     /* set to 1 if the card does not use "drive select" */
  875.  #define SOUND_BASE 0x240 /* <-----------<< sound address of this card or 0   */
  876.  #endif
  877.  #if !(SBPCD_ISSUE-4)     /* ==================== fourth interface board: === */
  878.  #define CDROM_PORT 0x634 /* <-----------<< port address                      */
  879.  #define SBPRO      0     /* <-----------<< interface type                    */
  880. +#define MAX_DRIVES 4     /* set to 1 if the card does not use "drive select" */
  881.  #define SOUND_BASE 0x000 /* <-----------<< sound address of this card or 0   */
  882.  #endif
  883.  
  884. @@ -606,10 +610,11 @@
  885.  #define CMD1_SUBCHANINF    0x11
  886.  #define CMD2_SUBCHANINF    0x??
  887.  
  888. +#define CMD1_ABORT    0x08
  889. +#define CMD2_ABORT    0x08
  890. +#define CMDT_ABORT    0x08
  891. +
  892.  #define CMD2_x02    0x02
  893. -#define CMD1_x08    0x08
  894. -#define CMD2_x08    0x08
  895. -#define CMDT_x08    0x08
  896.  
  897.  #define CMD2_SETSPEED    0xda
  898.  
  899. @@ -668,6 +673,7 @@
  900.  #define CMDL_PLAY_MSF    0x???
  901.  
  902.  #define CMD0_PLAY_TI    0x0c
  903. +#define CMD1_PLAY_TI    0x0f
  904.  
  905.  #define CMD0_STATUS    0x81
  906.  #define CMD1_STATUS    0x05
  907. diff -u --recursive --new-file v1.2.9/linux/include/linux/tcp.h linux/include/linux/tcp.h
  908. --- v1.2.9/linux/include/linux/tcp.h    Fri Apr 28 11:10:56 1995
  909. +++ linux/include/linux/tcp.h    Mon Jun 12 12:27:39 1995
  910. @@ -37,15 +37,15 @@
  911.          urg:1,
  912.          res2:2;
  913.  #elif defined(BIG_ENDIAN_BITFIELD)
  914. -    __u16    res2:2,
  915. +    __u16    doff:4,
  916. +        res1:4,
  917. +        res2:2,
  918.          urg:1,
  919.          ack:1,
  920.          psh:1,
  921.          rst:1,
  922.          syn:1,
  923. -        fin:1,
  924. -        doff:4,
  925. -        res1:4;
  926. +        fin:1;
  927.  #else
  928.  #error    "Adjust your <asm/byteorder.h> defines"
  929.  #endif    
  930. diff -u --recursive --new-file v1.2.9/linux/net/inet/af_inet.c linux/net/inet/af_inet.c
  931. --- v1.2.9/linux/net/inet/af_inet.c    Thu Jun  1 13:16:25 1995
  932. +++ linux/net/inet/af_inet.c    Mon Jun  5 12:25:55 1995
  933. @@ -941,9 +941,12 @@
  934.  
  935.      if (sock->state == SS_CONNECTING && sk->protocol == IPPROTO_TCP && (flags & O_NONBLOCK)) {
  936.          if (sk->err != 0)
  937. -            return -sk->err;    /* Connection must have failed */
  938. -        else
  939. -            return -EALREADY;    /* Connecting is currently in progress */
  940. +        {
  941. +            err=sk->err;
  942. +            sk->err=0;
  943. +            return -err;
  944. +        }
  945. +        return -EALREADY;    /* Connecting is currently in progress */
  946.      }
  947.        
  948.      if (sock->state != SS_CONNECTING) 
  949. diff -u --recursive --new-file v1.2.9/linux/net/inet/ip_fw.c linux/net/inet/ip_fw.c
  950. --- v1.2.9/linux/net/inet/ip_fw.c    Sat Mar 18 12:45:46 1995
  951. +++ linux/net/inet/ip_fw.c    Sun Jun 11 19:45:10 1995
  952. @@ -961,7 +961,7 @@
  953.              ntohl(i->fw_src.s_addr),ntohl(i->fw_smsk.s_addr),
  954.              ntohl(i->fw_dst.s_addr),ntohl(i->fw_dmsk.s_addr),
  955.              ntohl(i->fw_via.s_addr),i->fw_flg);
  956. -        len+=sprintf(buffer+len,"%u %u %lu %lu",
  957. +        len+=sprintf(buffer+len,"%u %u %10lu %10lu",
  958.              i->fw_nsp,i->fw_ndp, i->fw_pcnt,i->fw_bcnt);
  959.          for (p = 0; p < IP_FW_MAX_PORTS; p++)
  960.              len+=sprintf(buffer+len, " %u", i->fw_pts[p]);
  961.