home *** CD-ROM | disk | FTP | other *** search
/ PC-Online 1996 May / PCOnline_05_1996.bin / linux / source / kernel-s / v1.3 / patch-1.000 / patch-1
Text File  |  1995-09-05  |  116KB  |  4,014 lines

  1. diff -u --recursive --new-file v1.3.23/linux/Makefile linux/Makefile
  2. --- v1.3.23/linux/Makefile    Sun Sep  3 16:12:48 1995
  3. +++ linux/Makefile    Mon Sep  4 14:59:53 1995
  4. @@ -1,6 +1,6 @@
  5.  VERSION = 1
  6.  PATCHLEVEL = 3
  7. -SUBLEVEL = 23
  8. +SUBLEVEL = 24
  9.  
  10.  ARCH = i386
  11.  
  12. diff -u --recursive --new-file v1.3.23/linux/arch/alpha/kernel/ptrace.c linux/arch/alpha/kernel/ptrace.c
  13. --- v1.3.23/linux/arch/alpha/kernel/ptrace.c    Sun Sep  3 12:26:49 1995
  14. +++ linux/arch/alpha/kernel/ptrace.c    Mon Sep  4 13:40:47 1995
  15. @@ -160,7 +160,8 @@
  16.   * and that it is in the task area before calling this: this routine does
  17.   * no checking.
  18.   */
  19. -static unsigned long get_long(struct vm_area_struct * vma, unsigned long addr)
  20. +static unsigned long get_long(struct task_struct * tsk,
  21. +    struct vm_area_struct * vma, unsigned long addr)
  22.  {
  23.      pgd_t * pgdir;
  24.      pmd_t * pgmiddle;
  25. @@ -169,9 +170,9 @@
  26.  
  27.      DBG(DBG_MEM_ALL, ("getting long at 0x%lx\n", addr));
  28.  repeat:
  29. -    pgdir = pgd_offset(vma->vm_task, addr);
  30. +    pgdir = pgd_offset(vma->vm_mm, addr);
  31.      if (pgd_none(*pgdir)) {
  32. -        do_no_page(vma, addr, 0);
  33. +        do_no_page(tsk, vma, addr, 0);
  34.          goto repeat;
  35.      }
  36.      if (pgd_bad(*pgdir)) {
  37. @@ -181,7 +182,7 @@
  38.      }
  39.      pgmiddle = pmd_offset(pgdir, addr);
  40.      if (pmd_none(*pgmiddle)) {
  41. -        do_no_page(vma, addr, 0);
  42. +        do_no_page(tsk, vma, addr, 0);
  43.          goto repeat;
  44.      }
  45.      if (pmd_bad(*pgmiddle)) {
  46. @@ -191,7 +192,7 @@
  47.      }
  48.      pgtable = pte_offset(pgmiddle, addr);
  49.      if (!pte_present(*pgtable)) {
  50. -        do_no_page(vma, addr, 0);
  51. +        do_no_page(tsk, vma, addr, 0);
  52.          goto repeat;
  53.      }
  54.      page = pte_page(*pgtable);
  55. @@ -211,8 +212,8 @@
  56.   * Now keeps R/W state of page so that a text page stays readonly
  57.   * even if a debugger scribbles breakpoints into it.  -M.U-
  58.   */
  59. -static void put_long(struct vm_area_struct * vma, unsigned long addr,
  60. -             unsigned long data)
  61. +static void put_long(struct task_struct * tsk, struct vm_area_struct * vma,
  62. +    unsigned long addr, unsigned long data)
  63.  {
  64.      pgd_t *pgdir;
  65.      pmd_t *pgmiddle;
  66. @@ -220,9 +221,9 @@
  67.      unsigned long page;
  68.  
  69.  repeat:
  70. -    pgdir = pgd_offset(vma->vm_task, addr);
  71. +    pgdir = pgd_offset(vma->vm_mm, addr);
  72.      if (!pgd_present(*pgdir)) {
  73. -        do_no_page(vma, addr, 1);
  74. +        do_no_page(tsk, vma, addr, 1);
  75.          goto repeat;
  76.      }
  77.      if (pgd_bad(*pgdir)) {
  78. @@ -232,7 +233,7 @@
  79.      }
  80.      pgmiddle = pmd_offset(pgdir, addr);
  81.      if (pmd_none(*pgmiddle)) {
  82. -        do_no_page(vma, addr, 1);
  83. +        do_no_page(tsk, vma, addr, 1);
  84.          goto repeat;
  85.      }
  86.      if (pmd_bad(*pgmiddle)) {
  87. @@ -242,12 +243,12 @@
  88.      }
  89.      pgtable = pte_offset(pgmiddle, addr);
  90.      if (!pte_present(*pgtable)) {
  91. -        do_no_page(vma, addr, 1);
  92. +        do_no_page(tsk, vma, addr, 1);
  93.          goto repeat;
  94.      }
  95.      page = pte_page(*pgtable);
  96.      if (!pte_write(*pgtable)) {
  97. -        do_wp_page(vma, addr, 1);
  98. +        do_wp_page(tsk, vma, addr, 1);
  99.          goto repeat;
  100.      }
  101.  /* this is a hack for non-kernel-mapped video buffers and similar */
  102. @@ -304,17 +305,17 @@
  103.          }
  104.          align = addr & (sizeof(long) - 1);
  105.          addr -= align;
  106. -        low = get_long(vma, addr);
  107. +        low = get_long(tsk, vma, addr);
  108.          if (align) {
  109.              unsigned long high;
  110.  
  111. -            high = get_long(vma_high, addr + sizeof(long));
  112. +            high = get_long(tsk, vma_high, addr + sizeof(long));
  113.              low >>= align * 8;
  114.              low  |= high << (64 - align * 8);
  115.          }
  116.          *result = low;
  117.      } else {
  118. -            long l = get_long(vma, addr);
  119. +            long l = get_long(tsk, vma, addr);
  120.  
  121.          DBG(DBG_MEM_ALL, ("value is 0x%lx\n", l));
  122.          *result = l;
  123. @@ -344,16 +345,16 @@
  124.          }
  125.          align = addr & (sizeof(long) - 1);
  126.          addr -= align;
  127. -        low  = get_long(vma, addr);
  128. -        high = get_long(vma_high, addr + sizeof(long));
  129. +        low  = get_long(tsk, vma, addr);
  130. +        high = get_long(tsk, vma_high, addr + sizeof(long));
  131.          low  &= ~0UL >> (64 - align * 8);
  132.          high &= ~0UL << (align * 8);
  133.          low  |= data << (align * 8);
  134.          high |= data >> (64 - align * 8);
  135. -        put_long(vma, addr, low);
  136. -        put_long(vma_high, addr + sizeof(long), high);
  137. +        put_long(tsk, vma, addr, low);
  138. +        put_long(tsk, vma_high, addr + sizeof(long), high);
  139.      } else
  140. -        put_long(vma, addr, data);
  141. +        put_long(tsk, vma, addr, data);
  142.      return 0;
  143.  }
  144.  
  145. diff -u --recursive --new-file v1.3.23/linux/arch/i386/config.in linux/arch/i386/config.in
  146. --- v1.3.23/linux/arch/i386/config.in    Sun Sep  3 12:26:49 1995
  147. +++ linux/arch/i386/config.in    Tue Sep  5 10:25:36 1995
  148. @@ -6,7 +6,7 @@
  149.  comment 'General setup'
  150.  
  151.  bool 'Kernel math emulation' CONFIG_MATH_EMULATION n
  152. -bool 'Normal floppy disk support' CONFIG_BLK_DEV_FD y
  153. +tristate 'Normal floppy disk support' CONFIG_BLK_DEV_FD y
  154.  bool 'Normal (MFM/RLL) disk and IDE disk/cdrom support' CONFIG_ST506 y
  155.  if [ "$CONFIG_ST506" = "y" ]; then
  156.    comment 'Please see drivers/block/README.ide for help/info on IDE drives'
  157. @@ -32,7 +32,7 @@
  158.    fi
  159.  fi
  160.  bool 'System V IPC' CONFIG_SYSVIPC y
  161. -bool 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF y
  162. +tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF y
  163.  if [ "$CONFIG_BINFMT_ELF" = "y" ]; then
  164.  bool 'Compile kernel as ELF - if your GCC is ELF-GCC' CONFIG_KERNEL_ELF n
  165.  fi
  166. @@ -52,7 +52,7 @@
  167.  bool 'IP: multicasting' CONFIG_IP_MULTICAST n
  168.  bool 'IP: firewalling' CONFIG_IP_FIREWALL n
  169.  bool 'IP: accounting' CONFIG_IP_ACCT n
  170. -bool 'IP: tunneling' CONFIG_NET_IPIP n
  171. +tristate 'IP: tunneling' CONFIG_NET_IPIP n
  172.  if [ "$CONFIG_IP_FORWARD" = "y" -a "$CONFIG_IP_FIREWALL" = "y" ]; then
  173.    bool 'IP: firewall packet logging' CONFIG_IP_FIREWALL_VERBOSE y
  174.    bool 'IP: masquerading (ALPHA)' CONFIG_IP_MASQUERADE n
  175. @@ -62,7 +62,7 @@
  176.  fi
  177.  comment '(it is safe to leave these untouched)'
  178.  bool 'IP: PC/TCP compatibility mode' CONFIG_INET_PCTCP n
  179. -bool 'IP: Reverse ARP' CONFIG_INET_RARP n
  180. +tristate 'IP: Reverse ARP' CONFIG_INET_RARP n
  181.  bool 'IP: Assume subnets are local' CONFIG_INET_SNARL y
  182.  bool 'IP: Disable NAGLE algorithm (normally enabled)' CONFIG_TCP_NAGLE_OFF n
  183.  bool 'IP: Drop source routed frames' CONFIG_IP_NOSR y
  184. @@ -88,10 +88,10 @@
  185.  
  186.  comment 'SCSI support type (disk, tape, CDrom)'
  187.  
  188. -bool 'SCSI disk support' CONFIG_BLK_DEV_SD y
  189. -bool 'SCSI tape support' CONFIG_CHR_DEV_ST n
  190. -bool 'SCSI CDROM support' CONFIG_BLK_DEV_SR y
  191. -bool 'SCSI generic support' CONFIG_CHR_DEV_SG n
  192. +tristate 'SCSI disk support' CONFIG_BLK_DEV_SD y
  193. +tristate 'SCSI tape support' CONFIG_CHR_DEV_ST n
  194. +tristate 'SCSI CDROM support' CONFIG_BLK_DEV_SR y
  195. +tristate 'SCSI generic support' CONFIG_CHR_DEV_SG n
  196.  
  197.  comment 'Some SCSI devices (e.g. CD jukebox) support multiple LUNs'
  198.  
  199. @@ -99,28 +99,28 @@
  200.  
  201.  comment 'SCSI low-level drivers'
  202.  
  203. -bool 'Adaptec AHA152X support' CONFIG_SCSI_AHA152X y
  204. -bool 'Adaptec AHA1542 support' CONFIG_SCSI_AHA1542 n
  205. -bool 'Adaptec AHA1740 support' CONFIG_SCSI_AHA1740 n
  206. -bool 'Adaptec AHA274X/284X/294X support' CONFIG_SCSI_AIC7XXX n
  207. -bool 'BusLogic SCSI support' CONFIG_SCSI_BUSLOGIC n
  208. -bool 'EATA-DMA (DPT, NEC, ATT, Olivetti) support' CONFIG_SCSI_EATA_DMA n
  209. -bool 'EATA-PIO (old DPT PM2001, PM2012A) support' CONFIG_SCSI_EATA_PIO n
  210. -bool 'UltraStor 14F/34F support' CONFIG_SCSI_U14_34F n
  211. -bool 'Future Domain 16xx SCSI support' CONFIG_SCSI_FUTURE_DOMAIN n
  212. +tristate 'Adaptec AHA152X support' CONFIG_SCSI_AHA152X y
  213. +tristate 'Adaptec AHA1542 support' CONFIG_SCSI_AHA1542 n
  214. +tristate 'Adaptec AHA1740 support' CONFIG_SCSI_AHA1740 n
  215. +tristate 'Adaptec AHA274X/284X/294X support' CONFIG_SCSI_AIC7XXX n
  216. +tristate 'BusLogic SCSI support' CONFIG_SCSI_BUSLOGIC n
  217. +tristate 'EATA-DMA (DPT, NEC, ATT, Olivetti) support' CONFIG_SCSI_EATA_DMA n
  218. +tristate 'EATA-PIO (old DPT PM2001, PM2012A) support' CONFIG_SCSI_EATA_PIO n
  219. +tristate 'UltraStor 14F/34F support' CONFIG_SCSI_U14_34F n
  220. +tristate 'Future Domain 16xx SCSI support' CONFIG_SCSI_FUTURE_DOMAIN n
  221.  bool 'Generic NCR5380 SCSI support' CONFIG_SCSI_GENERIC_NCR5380 n
  222.  if [ "$CONFIG_PCI" = "y" ]; then
  223. -  bool 'NCR53c7,8xx SCSI support'  CONFIG_SCSI_NCR53C7xx n
  224. +  tristate 'NCR53c7,8xx SCSI support'  CONFIG_SCSI_NCR53C7xx n
  225.  fi
  226. -bool 'Always IN2000 SCSI support (test release)' CONFIG_SCSI_IN2000 n
  227. +tristate 'Always IN2000 SCSI support (test release)' CONFIG_SCSI_IN2000 n
  228.  bool 'PAS16 SCSI support' CONFIG_SCSI_PAS16 n
  229. -bool 'QLOGIC SCSI support' CONFIG_SCSI_QLOGIC n
  230. -bool 'Seagate ST-02 and Future Domain TMC-8xx SCSI support' CONFIG_SCSI_SEAGATE n
  231. +tristate 'QLOGIC SCSI support' CONFIG_SCSI_QLOGIC n
  232. +tristate 'Seagate ST-02 and Future Domain TMC-8xx SCSI support' CONFIG_SCSI_SEAGATE n
  233.  bool 'Trantor T128/T128F/T228 SCSI support' CONFIG_SCSI_T128 n
  234. -bool 'UltraStor SCSI support' CONFIG_SCSI_ULTRASTOR n
  235. -bool '7000FASST SCSI support' CONFIG_SCSI_7000FASST n
  236. -bool 'EATA ISA/EISA (DPT PM2011/021/012/022/122/322) support' CONFIG_SCSI_EATA n
  237. -#bool 'SCSI debugging host adapter' CONFIG_SCSI_DEBUG n
  238. +tristate 'UltraStor SCSI support' CONFIG_SCSI_ULTRASTOR n
  239. +tristate '7000FASST SCSI support' CONFIG_SCSI_7000FASST n
  240. +tristate 'EATA ISA/EISA (DPT PM2011/021/012/022/122/322) support' CONFIG_SCSI_EATA n
  241. +#tristate 'SCSI debugging host adapter' CONFIG_SCSI_DEBUG n
  242.  fi
  243.  
  244.  
  245. @@ -134,13 +134,13 @@
  246.  comment 'Skipping network driver configuration options...'
  247.  
  248.  else
  249. -bool 'Dummy net driver support' CONFIG_DUMMY y
  250. -bool 'SLIP (serial line) support' CONFIG_SLIP n
  251. -if [ "$CONFIG_SLIP" = "y" ]; then
  252. +tristate 'Dummy net driver support' CONFIG_DUMMY y
  253. +tristate 'SLIP (serial line) support' CONFIG_SLIP n
  254. +if [ "$CONFIG_SLIP" != "n" ]; then
  255.    bool ' CSLIP compressed headers' CONFIG_SLIP_COMPRESSED y
  256.  fi
  257. -bool 'PPP (point-to-point) support' CONFIG_PPP n
  258. -if [ "$CONFIG_PPP" = "y" ]; then
  259. +tristate 'PPP (point-to-point) support' CONFIG_PPP n
  260. +if [ "$CONFIG_PPP" != "n" ]; then
  261.    bool ' 16 channels instead of 4' CONFIG_PPP_LOTS n
  262.  fi
  263.  if [ "$CONFIG_AX25" = "y" ]; then
  264. @@ -148,57 +148,57 @@
  265.  else
  266.      bool 'Z8530 SCC kiss emulation driver for AX.25' CONFIG_SCC n
  267.  fi
  268. -bool 'PLIP (parallel port) support' CONFIG_PLIP n
  269. -bool 'EQL (serial line load balancing) support' CONFIG_EQUALIZER n
  270. +tristate 'PLIP (parallel port) support' CONFIG_PLIP n
  271. +tristate 'EQL (serial line load balancing) support' CONFIG_EQUALIZER n
  272.  bool 'Do you want to be offered ALPHA test drivers' CONFIG_NET_ALPHA n
  273.  bool 'Western Digital/SMC cards' CONFIG_NET_VENDOR_SMC n
  274.  if [ "$CONFIG_NET_VENDOR_SMC" = "y" ]; then
  275. -    bool 'WD80*3 support' CONFIG_WD80x3 n
  276. -    bool 'SMC Ultra support' CONFIG_ULTRA n
  277. +    tristate 'WD80*3 support' CONFIG_WD80x3 n
  278. +    tristate 'SMC Ultra support' CONFIG_ULTRA n
  279.  fi
  280.  bool 'AMD LANCE and PCnet (AT1500 and NE2100) support' CONFIG_LANCE n
  281.  bool '3COM cards' CONFIG_NET_VENDOR_3COM y
  282.  if [ "$CONFIG_NET_VENDOR_3COM" = "y" ]; then
  283. -    bool '3c501 support' CONFIG_EL1 n
  284. -    bool '3c503 support' CONFIG_EL2 n
  285. +    tristate '3c501 support' CONFIG_EL1 n
  286. +    tristate '3c503 support' CONFIG_EL2 n
  287.      if [ "$CONFIG_NET_ALPHA" = "y" ]; then
  288. -        bool '3c505 support' CONFIG_ELPLUS n
  289. -        bool '3c507 support' CONFIG_EL16 n
  290. +        tristate '3c505 support' CONFIG_ELPLUS n
  291. +        tristate '3c507 support' CONFIG_EL16 n
  292.      fi
  293. -    bool '3c509/3c579 support' CONFIG_EL3 y
  294. +    tristate '3c509/3c579 support' CONFIG_EL3 y
  295.  fi
  296.  bool 'Other ISA cards' CONFIG_NET_ISA n
  297.  if [ "$CONFIG_NET_ISA" = "y" ]; then
  298. -    bool 'Arcnet support' CONFIG_ARCNET n
  299. -    bool 'Cabletron E21xx support' CONFIG_E2100 n
  300. -    bool 'DEPCA support' CONFIG_DEPCA n
  301. -    bool 'EtherWorks 3 support' CONFIG_EWRK3 n
  302. +    tristate 'Arcnet support' CONFIG_ARCNET n
  303. +    tristate 'Cabletron E21xx support' CONFIG_E2100 n
  304. +    tristate 'DEPCA support' CONFIG_DEPCA n
  305. +    tristate 'EtherWorks 3 support' CONFIG_EWRK3 n
  306.      if [ "$CONFIG_NET_ALPHA" = "y" ]; then
  307.          bool 'SEEQ8005 support' CONFIG_SEEQ8005 n
  308. -        bool 'AT1700 support' CONFIG_AT1700 n
  309. -        bool 'EtherExpressPro support' CONFIG_EEXPRESS_PRO n
  310. -        bool 'EtherExpress support' CONFIG_EEXPRESS n
  311. +        tristate 'AT1700 support' CONFIG_AT1700 n
  312. +        tristate 'EtherExpressPro support' CONFIG_EEXPRESS_PRO n
  313. +        tristate 'EtherExpress support' CONFIG_EEXPRESS n
  314.          bool 'NI5210 support' CONFIG_NI52 n
  315.          bool 'NI6510 support' CONFIG_NI65 n
  316.          if [ "$CONFIG_AX25" = "y" ]; then
  317.              bool 'Ottawa PI and PI/2 support' CONFIG_PI y
  318.          fi
  319. -        bool 'WaveLAN support' CONFIG_WAVELAN n
  320. +        tristate 'WaveLAN support' CONFIG_WAVELAN n
  321.      fi
  322. -    bool 'HP PCLAN+ (27247B and 27252A) support' CONFIG_HPLAN_PLUS n
  323. -    bool 'HP PCLAN (27245 and other 27xxx series) support' CONFIG_HPLAN n
  324. -    bool 'HP 10/100VG PCLAN (ISA, EISA, PCI) support' CONFIG_HP100 y
  325. -    bool 'NE2000/NE1000 support' CONFIG_NE2000 y
  326. +    tristate 'HP PCLAN+ (27247B and 27252A) support' CONFIG_HPLAN_PLUS n
  327. +    tristate 'HP PCLAN (27245 and other 27xxx series) support' CONFIG_HPLAN n
  328. +    tristate 'HP 10/100VG PCLAN (ISA, EISA, PCI) support' CONFIG_HP100 y
  329. +    tristate 'NE2000/NE1000 support' CONFIG_NE2000 y
  330.      bool 'SK_G16 support' CONFIG_SK_G16 n
  331.  fi
  332.  bool 'EISA, VLB, PCI and on board controllers' CONFIG_NET_EISA n
  333.  if [ "$CONFIG_NET_EISA" = "y" ]; then
  334.      if [ "$CONFIG_NET_ALPHA" = "y" ]; then
  335. -        bool 'Ansel Communications EISA 3200 support' CONFIG_AC3200 n
  336. +        tristate 'Ansel Communications EISA 3200 support' CONFIG_AC3200 n
  337.      fi
  338. -    bool 'Apricot Xen-II on board ethernet' CONFIG_APRICOT n
  339. -    bool 'DE425, DE434, DE435, DE500 support' CONFIG_DE4X5 n
  340. -#    bool 'DEC 21040 PCI support' CONFIG_DEC_ELCP n
  341. +    tristate 'Apricot Xen-II on board ethernet' CONFIG_APRICOT n
  342. +    tristate 'DE425, DE434, DE435, DE500 support' CONFIG_DE4X5 n
  343. +#    tristate 'DEC 21040 PCI support' CONFIG_DEC_ELCP n
  344.  #    bool 'LPL T100V 100Mbs support' CONFIG_LPL_T100 n
  345.  #    bool 'PCnet32 (32 bit VLB and PCI LANCE) support' CONFIG_PCNET32 n
  346.      bool 'Zenith Z-Note support' CONFIG_ZNET y
  347. @@ -206,26 +206,26 @@
  348.  bool 'Pocket and portable adaptors' CONFIG_NET_POCKET n
  349.  if [ "$CONFIG_NET_POCKET" = "y" ]; then
  350.      bool 'AT-LAN-TEC/RealTek pocket adaptor support' CONFIG_ATP n
  351. -    bool 'D-Link DE600 pocket adaptor support' CONFIG_DE600 n
  352. -    bool 'D-Link DE620 pocket adaptor support' CONFIG_DE620 n
  353. +    tristate 'D-Link DE600 pocket adaptor support' CONFIG_DE600 n
  354. +    tristate 'D-Link DE620 pocket adaptor support' CONFIG_DE620 n
  355.  #    bool 'Silicom pocket adaptor support' CONFIG_SILICOM_PEA n
  356.  #    bool 'WaveLAN PCMCIA support' CONFIG_WaveLAN n
  357.  #    bool '3 Com 3c589 PCMCIA support' CONFIG_3C589 n
  358.  fi
  359.  bool 'Token Ring driver support' CONFIG_TR n
  360.  if [ "$CONFIG_TR" = "y" ]; then
  361. -    bool 'IBM Tropic chipset based adaptor support' CONFIG_IBMTR y
  362. +    tristate 'IBM Tropic chipset based adaptor support' CONFIG_IBMTR y
  363.  fi
  364.  fi
  365.  fi
  366.  
  367.  comment 'CD-ROM drivers (not for SCSI or IDE/ATAPI drives)'
  368.  
  369. -bool 'Sony CDU31A/CDU33A CDROM support' CONFIG_CDU31A n
  370. -bool 'Standard Mitsumi [no XA/Multisession] CDROM support' CONFIG_MCD n
  371. -bool 'Experimental Mitsumi [XA/MultiSession] support' CONFIG_MCDX n
  372. -bool 'Matsushita/Panasonic CDROM support' CONFIG_SBPCD n
  373. -if [ "$CONFIG_SBPCD" = "y" ]; then
  374. +tristate 'Sony CDU31A/CDU33A CDROM support' CONFIG_CDU31A n
  375. +tristate 'Standard Mitsumi [no XA/Multisession] CDROM support' CONFIG_MCD n
  376. +tristate 'Experimental Mitsumi [XA/MultiSession] support' CONFIG_MCDX n
  377. +tristate 'Matsushita/Panasonic CDROM support' CONFIG_SBPCD n
  378. +if [ "$CONFIG_SBPCD" != "n" ]; then
  379.    bool 'Matsushita/Panasonic second CDROM controller support' CONFIG_SBPCD2 n
  380.    if [ "$CONFIG_SBPCD2" = "y" ]; then
  381.      bool 'Matsushita/Panasonic third CDROM controller support' CONFIG_SBPCD3 n
  382. @@ -234,44 +234,40 @@
  383.      fi
  384.    fi
  385.  fi
  386. -bool 'Aztech/Orchid/Okano/Wearnes (non IDE) CDROM support' CONFIG_AZTCD n
  387. -bool 'Sony CDU535 CDROM support' CONFIG_CDU535 n
  388. -bool 'Goldstar R420 CDROM support' CONFIG_GSCD n
  389. -bool 'Philips/LMS CM206 CDROM support' CONFIG_CM206 n
  390. -bool 'Experimental Optics Storage DOLPHIN 8000AT CDROM support' CONFIG_OPTCD n
  391. +tristate 'Aztech/Orchid/Okano/Wearnes (non IDE) CDROM support' CONFIG_AZTCD n
  392. +tristate 'Sony CDU535 CDROM support' CONFIG_CDU535 n
  393. +tristate 'Goldstar R420 CDROM support' CONFIG_GSCD n
  394. +tristate 'Philips/LMS CM206 CDROM support' CONFIG_CM206 n
  395. +tristate 'Experimental Optics Storage DOLPHIN 8000AT CDROM support' CONFIG_OPTCD n
  396.  bool 'Experimental Sanyo H94A CDROM support' CONFIG_SJCD n
  397.  
  398.  comment 'Filesystems'
  399.  
  400. -bool 'Standard (minix) fs support' CONFIG_MINIX_FS y
  401. +tristate 'Standard (minix) fs support' CONFIG_MINIX_FS y
  402.  bool 'Extended fs support' CONFIG_EXT_FS n
  403.  bool 'Second extended fs support' CONFIG_EXT2_FS y
  404. -bool 'xiafs filesystem support' CONFIG_XIA_FS n
  405. -bool 'msdos fs support' CONFIG_MSDOS_FS y
  406. -if [ "$CONFIG_MSDOS_FS" = "y" ]; then
  407. -bool 'umsdos: Unix like fs on top of std MSDOS FAT fs' CONFIG_UMSDOS_FS n
  408. +tristate 'xiafs filesystem support' CONFIG_XIA_FS n
  409. +tristate 'msdos fs support' CONFIG_MSDOS_FS y
  410. +if [ "$CONFIG_MSDOS_FS" != "n" ]; then
  411. +  tristate 'umsdos: Unix like fs on top of std MSDOS FAT fs' CONFIG_UMSDOS_FS n
  412.  fi
  413.  bool '/proc filesystem support' CONFIG_PROC_FS y
  414.  if [ "$CONFIG_INET" = "y" ]; then
  415. -bool 'NFS filesystem support' CONFIG_NFS_FS y
  416. +  tristate 'NFS filesystem support' CONFIG_NFS_FS y
  417.  fi
  418. -if [ "$CONFIG_BLK_DEV_SR" = "y" -o "$CONFIG_BLK_DEV_IDECD" = "y" -o "$CONFIG_CDU31A" = "y" -o "$CONFIG_MCDX" = "y" -o "$CONFIG_MCD" = "y" -o "$CONFIG_SBPCD" = "y" -o "$CONFIG_AZTCD" = "y" -o "$CONFIG_CDU535" = "y" -o "$CONFIG_GSCD" = "y" -o "$CONFIG_CM206" = "y" -o "$CONFIG_OPTCD" = "y" -o "$CONFIG_SJCD" = "y" ]; then
  419. -    bool 'ISO9660 cdrom filesystem support' CONFIG_ISO9660_FS y
  420. -else
  421. -    bool 'ISO9660 cdrom filesystem support' CONFIG_ISO9660_FS n
  422. -fi
  423. -bool 'OS/2 HPFS filesystem support (read only)' CONFIG_HPFS_FS n
  424. -bool 'System V and Coherent filesystem support' CONFIG_SYSV_FS n
  425. -bool 'SMB filesystem (to mount WfW shares etc..) support' CONFIG_SMB_FS n
  426. +tristate 'ISO9660 cdrom filesystem support' CONFIG_ISO9660_FS y
  427. +tristate 'OS/2 HPFS filesystem support (read only)' CONFIG_HPFS_FS n
  428. +tristate 'System V and Coherent filesystem support' CONFIG_SYSV_FS n
  429. +tristate 'SMB filesystem (to mount WfW shares etc..) support' CONFIG_SMB_FS n
  430.  
  431.  comment 'character devices'
  432.  
  433.  bool 'Cyclades async mux support' CONFIG_CYCLADES n
  434. -bool 'Parallel printer support' CONFIG_PRINTER n
  435. +tristate 'Parallel printer support' CONFIG_PRINTER n
  436.  bool 'Logitech busmouse support' CONFIG_BUSMOUSE n
  437.  bool 'PS/2 mouse (aka "auxiliary device") support' CONFIG_PSMOUSE n
  438.  if [ "$CONFIG_PSMOUSE" = "y" ]; then
  439. -bool 'C&T 82C710 mouse port support (as on TI Travelmate)' CONFIG_82C710_MOUSE y
  440. +  bool 'C&T 82C710 mouse port support (as on TI Travelmate)' CONFIG_82C710_MOUSE y
  441.  fi
  442.  bool 'Microsoft busmouse support' CONFIG_MS_BUSMOUSE n
  443.  bool 'ATIXL busmouse support' CONFIG_ATIXL_BUSMOUSE n
  444. @@ -279,7 +275,7 @@
  445.  
  446.  bool 'QIC-02 tape support' CONFIG_QIC02_TAPE n
  447.  if [ "$CONFIG_QIC02_TAPE" = "y" ]; then
  448. -bool 'Do you want runtime configuration for QIC-02' CONFIG_QIC02_DYNCONF y
  449. +  bool 'Do you want runtime configuration for QIC-02' CONFIG_QIC02_DYNCONF y
  450.  if [ "$CONFIG_QIC02_DYNCONF" != "y" ]; then
  451.  
  452.  comment '>>> Edit configuration parameters in ./include/linux/tpqic02.h!'
  453. @@ -294,7 +290,7 @@
  454.  
  455.  bool 'QIC-117 tape support' CONFIG_FTAPE n
  456.  if [ "$CONFIG_FTAPE" = "y" ]; then
  457. -int ' number of ftape buffers' NR_FTAPE_BUFFERS 3
  458. +  int ' number of ftape buffers' NR_FTAPE_BUFFERS 3
  459.  fi
  460.  
  461.  comment 'Sound'
  462. @@ -304,7 +300,7 @@
  463.  comment 'Kernel hacking'
  464.  
  465.  #bool 'Debug kmalloc/kfree' CONFIG_DEBUG_MALLOC n
  466. -bool 'Kernel profiling support' CONFIG_PROFILE y
  467. +bool 'Kernel profiling support' CONFIG_PROFILE n
  468.  if [ "$CONFIG_PROFILE" = "y" ]; then
  469.    int ' Profile shift count' CONFIG_PROFILE_SHIFT 2
  470.  fi
  471. diff -u --recursive --new-file v1.3.23/linux/arch/i386/kernel/ptrace.c linux/arch/i386/kernel/ptrace.c
  472. --- v1.3.23/linux/arch/i386/kernel/ptrace.c    Sun Sep  3 12:26:49 1995
  473. +++ linux/arch/i386/kernel/ptrace.c    Mon Sep  4 13:35:16 1995
  474. @@ -83,7 +83,8 @@
  475.   * and that it is in the task area before calling this: this routine does
  476.   * no checking.
  477.   */
  478. -static unsigned long get_long(struct vm_area_struct * vma, unsigned long addr)
  479. +static unsigned long get_long(struct task_struct * tsk, 
  480. +    struct vm_area_struct * vma, unsigned long addr)
  481.  {
  482.      pgd_t * pgdir;
  483.      pmd_t * pgmiddle;
  484. @@ -91,9 +92,9 @@
  485.      unsigned long page;
  486.  
  487.  repeat:
  488. -    pgdir = pgd_offset(vma->vm_task, addr);
  489. +    pgdir = pgd_offset(vma->vm_mm, addr);
  490.      if (pgd_none(*pgdir)) {
  491. -        do_no_page(vma, addr, 0);
  492. +        do_no_page(tsk, vma, addr, 0);
  493.          goto repeat;
  494.      }
  495.      if (pgd_bad(*pgdir)) {
  496. @@ -103,7 +104,7 @@
  497.      }
  498.      pgmiddle = pmd_offset(pgdir, addr);
  499.      if (pmd_none(*pgmiddle)) {
  500. -        do_no_page(vma, addr, 0);
  501. +        do_no_page(tsk, vma, addr, 0);
  502.          goto repeat;
  503.      }
  504.      if (pmd_bad(*pgmiddle)) {
  505. @@ -113,7 +114,7 @@
  506.      }
  507.      pgtable = pte_offset(pgmiddle, addr);
  508.      if (!pte_present(*pgtable)) {
  509. -        do_no_page(vma, addr, 0);
  510. +        do_no_page(tsk, vma, addr, 0);
  511.          goto repeat;
  512.      }
  513.      page = pte_page(*pgtable);
  514. @@ -133,7 +134,7 @@
  515.   * Now keeps R/W state of page so that a text page stays readonly
  516.   * even if a debugger scribbles breakpoints into it.  -M.U-
  517.   */
  518. -static void put_long(struct vm_area_struct * vma, unsigned long addr,
  519. +static void put_long(struct task_struct * tsk, struct vm_area_struct * vma, unsigned long addr,
  520.      unsigned long data)
  521.  {
  522.      pgd_t *pgdir;
  523. @@ -142,9 +143,9 @@
  524.      unsigned long page;
  525.  
  526.  repeat:
  527. -    pgdir = pgd_offset(vma->vm_task, addr);
  528. +    pgdir = pgd_offset(vma->vm_mm, addr);
  529.      if (!pgd_present(*pgdir)) {
  530. -        do_no_page(vma, addr, 1);
  531. +        do_no_page(tsk, vma, addr, 1);
  532.          goto repeat;
  533.      }
  534.      if (pgd_bad(*pgdir)) {
  535. @@ -154,7 +155,7 @@
  536.      }
  537.      pgmiddle = pmd_offset(pgdir, addr);
  538.      if (pmd_none(*pgmiddle)) {
  539. -        do_no_page(vma, addr, 1);
  540. +        do_no_page(tsk, vma, addr, 1);
  541.          goto repeat;
  542.      }
  543.      if (pmd_bad(*pgmiddle)) {
  544. @@ -164,12 +165,12 @@
  545.      }
  546.      pgtable = pte_offset(pgmiddle, addr);
  547.      if (!pte_present(*pgtable)) {
  548. -        do_no_page(vma, addr, 1);
  549. +        do_no_page(tsk, vma, addr, 1);
  550.          goto repeat;
  551.      }
  552.      page = pte_page(*pgtable);
  553.      if (!pte_write(*pgtable)) {
  554. -        do_wp_page(vma, addr, 1);
  555. +        do_wp_page(tsk, vma, addr, 1);
  556.          goto repeat;
  557.      }
  558.  /* this is a hack for non-kernel-mapped video buffers and similar */
  559. @@ -220,8 +221,8 @@
  560.              if (!vma_high || vma_high->vm_start != vma->vm_end)
  561.                  return -EIO;
  562.          }
  563. -        low = get_long(vma, addr & ~(sizeof(long)-1));
  564. -        high = get_long(vma_high, (addr+sizeof(long)) & ~(sizeof(long)-1));
  565. +        low = get_long(tsk, vma, addr & ~(sizeof(long)-1));
  566. +        high = get_long(tsk, vma_high, (addr+sizeof(long)) & ~(sizeof(long)-1));
  567.          switch (addr & (sizeof(long)-1)) {
  568.              case 1:
  569.                  low >>= 8;
  570. @@ -238,7 +239,7 @@
  571.          }
  572.          *result = low;
  573.      } else
  574. -        *result = get_long(vma, addr);
  575. +        *result = get_long(tsk, vma, addr);
  576.      return 0;
  577.  }
  578.  
  579. @@ -262,8 +263,8 @@
  580.              if (!vma_high || vma_high->vm_start != vma->vm_end)
  581.                  return -EIO;
  582.          }
  583. -        low = get_long(vma, addr & ~(sizeof(long)-1));
  584. -        high = get_long(vma_high, (addr+sizeof(long)) & ~(sizeof(long)-1));
  585. +        low = get_long(tsk, vma, addr & ~(sizeof(long)-1));
  586. +        high = get_long(tsk, vma_high, (addr+sizeof(long)) & ~(sizeof(long)-1));
  587.          switch (addr & (sizeof(long)-1)) {
  588.              case 0: /* shouldn't happen, but safety first */
  589.                  low = data;
  590. @@ -287,10 +288,10 @@
  591.                  high |= data >> 8;
  592.                  break;
  593.          }
  594. -        put_long(vma, addr & ~(sizeof(long)-1),low);
  595. -        put_long(vma_high, (addr+sizeof(long)) & ~(sizeof(long)-1),high);
  596. +        put_long(tsk, vma, addr & ~(sizeof(long)-1),low);
  597. +        put_long(tsk, vma_high, (addr+sizeof(long)) & ~(sizeof(long)-1),high);
  598.      } else
  599. -        put_long(vma, addr, data);
  600. +        put_long(tsk, vma, addr, data);
  601.      return 0;
  602.  }
  603.  
  604. diff -u --recursive --new-file v1.3.23/linux/arch/i386/kernel/signal.c linux/arch/i386/kernel/signal.c
  605. --- v1.3.23/linux/arch/i386/kernel/signal.c    Fri Jun 16 22:02:54 1995
  606. +++ linux/arch/i386/kernel/signal.c    Mon Sep  4 13:52:30 1995
  607. @@ -90,7 +90,7 @@
  608.  #define __CODE ((unsigned long)(frame+24))
  609.  #define CODE(x) ((unsigned long *) ((x)+__CODE))
  610.      frame = *fp;
  611. -    if (regs->ss != USER_DS)
  612. +    if (regs->ss != USER_DS && sa->sa_restorer)
  613.          frame = (unsigned long *) sa->sa_restorer;
  614.      frame -= 32;
  615.      if (verify_area(VERIFY_WRITE,frame,32*4))
  616. diff -u --recursive --new-file v1.3.23/linux/arch/i386/kernel/sys_i386.c linux/arch/i386/kernel/sys_i386.c
  617. --- v1.3.23/linux/arch/i386/kernel/sys_i386.c    Tue Jun 27 14:11:30 1995
  618. +++ linux/arch/i386/kernel/sys_i386.c    Mon Sep  4 14:35:43 1995
  619. @@ -59,10 +59,10 @@
  620.          if (fd >= NR_OPEN || !(file = current->files->fd[fd]))
  621.              return -EBADF;
  622.      }
  623. +    flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
  624.      return do_mmap(file, get_user(buffer), get_user(buffer+1),
  625.                 get_user(buffer+2), flags, get_user(buffer+5));
  626.  }
  627. -
  628.  
  629.  extern asmlinkage int sys_select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
  630.  
  631. diff -u --recursive --new-file v1.3.23/linux/arch/i386/kernel/vm86.c linux/arch/i386/kernel/vm86.c
  632. --- v1.3.23/linux/arch/i386/kernel/vm86.c    Sun Sep  3 12:26:49 1995
  633. +++ linux/arch/i386/kernel/vm86.c    Mon Sep  4 13:32:21 1995
  634. @@ -74,7 +74,7 @@
  635.      pte_t *pte;
  636.      int i;
  637.  
  638. -    pgd = pgd_offset(tsk, 0xA0000);
  639. +    pgd = pgd_offset(tsk->mm, 0xA0000);
  640.      if (pgd_none(*pgd))
  641.          return;
  642.      if (pgd_bad(*pgd)) {
  643. diff -u --recursive --new-file v1.3.23/linux/arch/i386/mm/fault.c linux/arch/i386/mm/fault.c
  644. --- v1.3.23/linux/arch/i386/mm/fault.c    Sun Sep  3 16:12:48 1995
  645. +++ linux/arch/i386/mm/fault.c    Mon Sep  4 13:36:26 1995
  646. @@ -92,10 +92,10 @@
  647.          if (regs->cs == KERNEL_CS)
  648.              printk("WP fault at %08x\n", regs->eip);
  649.  #endif
  650. -        do_wp_page(vma, address, error_code & 2);
  651. +        do_wp_page(current, vma, address, error_code & 2);
  652.          return;
  653.      }
  654. -    do_no_page(vma, address, error_code & 2);
  655. +    do_no_page(current, vma, address, error_code & 2);
  656.      return;
  657.  
  658.  /*
  659. diff -u --recursive --new-file v1.3.23/linux/arch/mips/kernel/ptrace.c linux/arch/mips/kernel/ptrace.c
  660. --- v1.3.23/linux/arch/mips/kernel/ptrace.c    Sun Sep  3 12:26:49 1995
  661. +++ linux/arch/mips/kernel/ptrace.c    Mon Sep  4 11:27:21 1995
  662. @@ -89,7 +89,7 @@
  663.      unsigned long page;
  664.  
  665.  repeat:
  666. -    pgdir = PAGE_DIR_OFFSET(vma->vm_task, addr);
  667. +    pgdir = PAGE_DIR_OFFSET(vma->vm_mm, addr);
  668.      if (pgd_none(*pgdir)) {
  669.          do_no_page(vma, addr, 0);
  670.          goto repeat;
  671. @@ -129,7 +129,7 @@
  672.      unsigned long page;
  673.  
  674.  repeat:
  675. -    pgdir = PAGE_DIR_OFFSET(vma->vm_task, addr);
  676. +    pgdir = PAGE_DIR_OFFSET(vma->vm_mm, addr);
  677.      if (!pgd_present(*pgdir)) {
  678.          do_no_page(vma, addr, 1);
  679.          goto repeat;
  680. diff -u --recursive --new-file v1.3.23/linux/drivers/block/Makefile linux/drivers/block/Makefile
  681. --- v1.3.23/linux/drivers/block/Makefile    Mon Aug 28 14:52:18 1995
  682. +++ linux/drivers/block/Makefile    Mon Sep  4 07:31:53 1995
  683. @@ -20,101 +20,123 @@
  684.  M_OBJS   :=
  685.  MOD_LIST_NAME := BLOCK_MODULES
  686.  
  687. -ifdef CONFIG_BLK_DEV_FD
  688. +ifeq ($(CONFIG_BLK_DEV_FD),y)
  689.  L_OBJS += floppy.o
  690.  else
  691. -M_OBJS += floppy.o
  692. +  ifeq ($(CONFIG_BLK_DEV_FD),m)
  693. +  M_OBJS += floppy.o
  694. +  endif
  695.  endif
  696.  
  697. -ifdef CONFIG_AZTCD
  698. +ifeq ($(CONFIG_AZTCD),y)
  699.  L_OBJS += aztcd.o
  700.  else
  701. -M_OBJS += aztcd.o
  702. +  ifeq ($(CONFIG_AZTCD),m)
  703. +  M_OBJS += aztcd.o
  704. +  endif
  705.  endif #CONFIG_AZTCD
  706.  
  707. -ifdef CONFIG_CDU31A
  708. +ifeq ($(CONFIG_CDU31A),y)
  709.  L_OBJS += cdu31a.o
  710.  else
  711. -M_OBJS += cdu31a.o
  712. +  ifeq ($(CONFIG_CDU31A),m)
  713. +  M_OBJS += cdu31a.o
  714. +  endif
  715.  endif #CONFIG_CDU31A
  716.  
  717. -ifdef CONFIG_MCD
  718. +ifeq ($(CONFIG_MCD),y)
  719.  L_OBJS += mcd.o
  720.  else
  721. -M_OBJS += mcd.o
  722. +  ifeq ($(CONFIG_MCD),m)
  723. +  M_OBJS += mcd.o
  724. +  endif
  725.  endif #CONFIG_MCD
  726.  
  727. -ifdef CONFIG_MCDX
  728. +ifeq ($(CONFIG_MCDX),y)
  729.  L_OBJS += mcdx.o
  730.  else
  731. -M_OBJS += mcdx.o
  732. +  ifeq ($(CONFIG_MCDX),m)
  733. +  M_OBJS += mcdx.o
  734. +  endif
  735.  endif #CONFIG_MCDX
  736.  
  737. -ifdef CONFIG_SBPCD
  738. +ifeq ($(CONFIG_SBPCD),y)
  739.  L_OBJS += sbpcd.o
  740.  else
  741. -M_OBJS += sbpcd.o
  742. +  ifeq ($(CONFIG_SBPCD),m)
  743. +  M_OBJS += sbpcd.o
  744. +  endif
  745.  endif #CONFIG_SBPCD
  746.  
  747. -ifdef CONFIG_SBPCD2
  748. +ifeq ($(CONFIG_SBPCD2),y)
  749.  L_OBJS += sbpcd2.o
  750.  endif #CONFIG_SBPCD2
  751.  
  752. -ifdef CONFIG_SBPCD3
  753. +ifeq ($(CONFIG_SBPCD3),y)
  754.  L_OBJS += sbpcd3.o
  755.  endif #CONFIG_SBPCD3
  756.  
  757. -ifdef CONFIG_SBPCD4
  758. +ifeq ($(CONFIG_SBPCD4),y)
  759.  L_OBJS += sbpcd4.o
  760.  endif #CONFIG_SBPCD4
  761.  
  762. -ifdef CONFIG_CDU535
  763. +ifeq ($(CONFIG_CDU535),y)
  764.  L_OBJS += sonycd535.o
  765.  else
  766. -M_OBJS += sonycd535.o
  767. +  ifeq ($(CONFIG_CDU535),m)
  768. +  M_OBJS += sonycd535.o
  769. +  endif
  770.  endif #CONFIG_CDU535
  771.  
  772. -ifdef CONFIG_GSCD
  773. +ifeq ($(CONFIG_GSCD),y)
  774.  L_OBJS += gscd.o
  775.  else
  776. -M_OBJS += gscd.o
  777. +  ifeq ($(CONFIG_GSCD),m)
  778. +  M_OBJS += gscd.o
  779. +  endif
  780.  endif #CONFIG_GSCD
  781.  
  782. -ifdef CONFIG_CM206
  783. +ifeq ($(CONFIG_CM206),y)
  784.  L_OBJS += cm206.o
  785.  else
  786. -M_OBJS += cm206.o
  787. +  ifeq ($(CONFIG_CM206),m)
  788. +  M_OBJS += cm206.o
  789. +  endif
  790.  endif #CONFIG_CM206
  791.  
  792. -ifdef CONFIG_OPTCD
  793. +ifeq ($(CONFIG_OPTCD),y)
  794.  L_OBJS += optcd.o
  795.  else
  796. -M_OBJS += optcd.o
  797. +  ifeq ($(CONFIG_OPTCD),m)
  798. +  M_OBJS += optcd.o
  799. +  endif
  800.  endif #CONFIG_OPTCD
  801.  
  802. -ifdef CONFIG_SJCD
  803. +ifeq ($(CONFIG_SJCD),y)
  804.  L_OBJS += sjcd.o
  805.  #else
  806. -#M_OBJS += sjcd.o
  807. +#  ifeq ($(CONFIG_SJCD),m)
  808. +#  M_OBJS += sjcd.o
  809. +#  endif
  810.  endif #CONFIG_SJCD
  811.  
  812. -ifdef CONFIG_BLK_DEV_HD
  813. +ifeq ($(CONFIG_BLK_DEV_HD),y)
  814.  L_OBJS += hd.o
  815.  endif
  816.  
  817. -ifdef CONFIG_BLK_DEV_IDE
  818. +ifeq ($(CONFIG_BLK_DEV_IDE),y)
  819.  L_OBJS += ide.o
  820.  endif
  821.  
  822. -ifdef CONFIG_BLK_DEV_TRITON
  823. +ifeq ($(CONFIG_BLK_DEV_TRITON),y)
  824.  L_OBJS += triton.o
  825.  endif
  826.  
  827. -ifdef CONFIG_BLK_DEV_IDECD
  828. +ifeq ($(CONFIG_BLK_DEV_IDECD),y)
  829.  L_OBJS += ide-cd.o
  830.  endif
  831.  
  832. -ifdef CONFIG_BLK_DEV_XD
  833. +ifeq ($(CONFIG_BLK_DEV_XD),y)
  834.  L_OBJS += xd.o
  835.  endif
  836.  
  837. diff -u --recursive --new-file v1.3.23/linux/drivers/block/ide.c linux/drivers/block/ide.c
  838. --- v1.3.23/linux/drivers/block/ide.c    Sun Sep  3 16:12:48 1995
  839. +++ linux/drivers/block/ide.c    Tue Sep  5 09:02:52 1995
  840. @@ -1,5 +1,5 @@
  841.  /*
  842. - *  linux/drivers/block/ide.c    Version 5.12  Sep 1, 1995
  843. + *  linux/drivers/block/ide.c    Version 5.13  Sep 4, 1995
  844.   *
  845.   *  Copyright (C) 1994, 1995  Linus Torvalds & authors (see below)
  846.   */
  847. @@ -37,6 +37,8 @@
  848.   *    Petri Mattila    (ptjmatti@kruuna.helsinki.fi)    (EIDE stuff)
  849.   *    Scott Snyder    (snyder@fnald0.fnal.gov)    (ATAPI IDE cd-rom)
  850.   *
  851. + *  Maintained by Mark Lord (mlord@bnr.ca):  ide.c, ide.h, triton.c, hd.c, ..
  852. + *
  853.   *  This was a rewrite of just about everything from hd.c, though some original
  854.   *  code is still sprinkled about.  Think of it as a major evolution, with 
  855.   *  inspiration from lots of linux users, esp.  hamish@zot.apana.org.au
  856. @@ -136,6 +138,8 @@
  857.   *            driver now forces "serialize" again for all cmd640 chips
  858.   *            noticed REALLY_SLOW_IO had no effect, moved it to ide.c
  859.   *            made do_drive_cmd() into public ide_do_drive_cmd()
  860. + *  Version 5.13    fixed typo ('B'), thanks to houston@boyd.geog.mcgill.ca
  861. + *            fixed ht6560b support
  862.   *
  863.   *  Driver compile-time options are in ide.h
  864.   *
  865. @@ -352,18 +356,18 @@
  866.  
  867.  void ide_hwif_select (ide_hwif_t *hwif)
  868.  {
  869. -    static ide_hwif_t *current_hwif = NULL;
  870. +    static byte current_select = 0;
  871.  
  872. -    if (hwif != current_hwif) {
  873. +    if (hwif->select != current_select) {
  874.          unsigned long flags;
  875.          save_flags (flags);
  876.          cli();
  877. +        current_select = hwif->select;
  878.          (void) inb(0x3e6);
  879.          (void) inb(0x3e6);
  880.          (void) inb(0x3e6);
  881.          (void) inb(0x3e6);
  882. -        outb(0x1c,hwif->select);
  883. -        current_hwif = hwif;
  884. +        outb(current_select,0x3e6);
  885.          restore_flags (flags);
  886.      }
  887.  }
  888. @@ -1724,7 +1728,8 @@
  889.      };
  890.  
  891.      drive->part[0].nr_sects = current_capacity(drive);
  892. -    resetup_one_dev(HWIF(drive)->gd, drive->select.b.unit);
  893. +    if (drive->media == disk)
  894. +        resetup_one_dev(HWIF(drive)->gd, drive->select.b.unit);
  895.  
  896.      drive->busy = 0;
  897.      wake_up(&drive->wqueue);
  898. @@ -2582,6 +2587,11 @@
  899.                   *
  900.                   * Need to add an ioctl to select between them.
  901.                   */
  902. +                if (check_region(0x3e6,1)) {
  903. +                    printk(" -- HT6560 PORT 0x3e6 ALREADY IN USE");
  904. +                    goto done;
  905. +                }
  906. +                request_region(0x3e6, 1, hwif->name);
  907.                  ide_hwifs[0].select = 0x3c;
  908.                  ide_hwifs[1].select = 0x3d;
  909.                  goto do_serialize;
  910. @@ -2921,7 +2931,6 @@
  911.              if (hwif->irq == HD_IRQ && hwif->io_base != HD_DATA) {
  912.                  printk("%s: CANNOT SHARE IRQ WITH OLD HARDDISK DRIVER (hd.c)\n", hwif->name);
  913.                  hwif->present = 0;
  914. -B
  915.              }
  916.  #endif /* CONFIG_BLK_DEV_HD */
  917.          }
  918. diff -u --recursive --new-file v1.3.23/linux/drivers/block/ide.h linux/drivers/block/ide.h
  919. --- v1.3.23/linux/drivers/block/ide.h    Sun Sep  3 16:12:49 1995
  920. +++ linux/drivers/block/ide.h    Tue Sep  5 14:15:12 1995
  921. @@ -20,7 +20,7 @@
  922.   * 
  923.   * REALLY_SLOW_IO can be defined in ide.c and ide-cd.c, if necessary
  924.   */
  925. -#define REALLY_FAST_IO            /* define if ide ports are perfect */
  926. +#undef REALLY_FAST_IO            /* define if ide ports are perfect */
  927.  #define INITIAL_MULT_COUNT    0    /* off=0; on=2,4,8,16,32, etc.. */
  928.  
  929.  #ifndef DISK_RECOVERY_TIME        /* off=0; on=access_delay_time */
  930. diff -u --recursive --new-file v1.3.23/linux/drivers/block/ramdisk.c linux/drivers/block/ramdisk.c
  931. --- v1.3.23/linux/drivers/block/ramdisk.c    Sun Aug 13 14:45:28 1995
  932. +++ linux/drivers/block/ramdisk.c    Mon Sep  4 07:55:16 1995
  933. @@ -216,7 +216,7 @@
  934.          return;
  935.  
  936.      /* for Slackware install disks */
  937. -    printk(KERN_NOTICE "VFS: Insert ramdisk floppy and press ENTER\n");
  938. +    printk(KERN_NOTICE "VFS: Insert root floppy to be loaded into ramdisk and press ENTER\n");
  939.      wait_for_keypress();
  940.  
  941.      memset(&filp, 0, sizeof(filp));
  942. diff -u --recursive --new-file v1.3.23/linux/drivers/char/Makefile linux/drivers/char/Makefile
  943. --- v1.3.23/linux/drivers/char/Makefile    Tue Aug 15 20:39:02 1995
  944. +++ linux/drivers/char/Makefile    Mon Sep  4 07:31:53 1995
  945. @@ -34,10 +34,12 @@
  946.  L_OBJS += busmouse.o
  947.  endif
  948.  
  949. -ifdef CONFIG_PRINTER
  950. +ifeq ($(CONFIG_PRINTER),y)
  951.  L_OBJS += lp.o
  952.  else
  953. -M_OBJS += lp.o
  954. +  ifeq ($(CONFIG_PRINTER),m)
  955. +  M_OBJS += lp.o
  956. +  endif
  957.  endif
  958.  
  959.  ifdef CONFIG_MS_BUSMOUSE
  960. diff -u --recursive --new-file v1.3.23/linux/drivers/char/psaux.c linux/drivers/char/psaux.c
  961. --- v1.3.23/linux/drivers/char/psaux.c    Sun Sep  3 12:26:52 1995
  962. +++ linux/drivers/char/psaux.c    Tue Sep  5 12:21:27 1995
  963. @@ -84,7 +84,7 @@
  964.  #define QP_DATA         0x310        /* Data Port I/O Address */
  965.  #define QP_STATUS       0x311        /* Status Port I/O Address */
  966.  
  967. -#define QP_DEV_IDLE     0x01            /* Device Idle */
  968. +#define QP_DEV_IDLE     0x01        /* Device Idle */
  969.  #define QP_RX_FULL      0x02        /* Device Char received */
  970.  #define QP_TX_IDLE      0x04        /* Device XMIT Idle */
  971.  #define QP_RESET        0x08        /* Device Reset */
  972. @@ -140,11 +140,10 @@
  973.  /*
  974.   * Write to device & handle returned ack
  975.   */
  976.  #if defined INITIALIZE_DEVICE
  977.  static int aux_write_ack(int val)
  978.  {
  979. -        int retries = 0;
  980. +    int retries = 0;
  981.  
  982.      poll_aux_status_nosleep();
  983.      outb_p(AUX_MAGIC_WRITE,AUX_COMMAND);
  984. @@ -261,11 +260,11 @@
  985.      unsigned char status;
  986.  
  987.      if (!poll_qp_status())
  988. -            printk("Warning: Mouse device busy in release_qp()\n");
  989. +        printk("Warning: Mouse device busy in release_qp()\n");
  990.      status = inb_p(qp_status);
  991.      outb_p(status & ~(QP_ENABLE|QP_INTS_ON), qp_status);
  992.      if (!poll_qp_status())
  993. -            printk("Warning: Mouse device busy in release_qp()\n");
  994. +        printk("Warning: Mouse device busy in release_qp()\n");
  995.      free_irq(QP_IRQ);
  996.      fasync_aux(inode, file, 0);
  997.      qp_busy = 0;
  998. @@ -275,6 +274,7 @@
  999.  static int fasync_aux(struct inode *inode, struct file *filp, int on)
  1000.  {
  1001.      struct fasync_struct *fa, *prev;
  1002. +    unsigned long flags;
  1003.  
  1004.      for (fa = queue->fasync, prev = 0; fa; prev= fa, fa = fa->fa_next) {
  1005.          if (fa->fa_file == filp)
  1006. @@ -287,21 +287,27 @@
  1007.          fa = (struct fasync_struct *)kmalloc(sizeof(struct fasync_struct), GFP_KERNEL);
  1008.          if (!fa)
  1009.              return -ENOMEM;
  1010. +        save_flags(flags);
  1011. +        cli();
  1012.          fa->magic = FASYNC_MAGIC;
  1013.          fa->fa_file = filp;
  1014.          fa->fa_next = queue->fasync;
  1015.          queue->fasync = fa;
  1016. +        restore_flags(flags);
  1017.      }
  1018.      else {
  1019.          if (!fa)
  1020.              return 0;
  1021. +        save_flags(flags);
  1022. +        cli();
  1023.          if (prev)
  1024.              prev->fa_next = fa->fa_next;
  1025.          else
  1026.              queue->fasync = fa->fa_next;
  1027. +        restore_flags(flags);
  1028.          kfree_s(fa, sizeof(struct fasync_struct));
  1029.      }
  1030. -    return 0;    
  1031. +    return 0;
  1032.  }
  1033.  
  1034.  /*
  1035. @@ -318,7 +324,7 @@
  1036.      if (!poll_aux_status())
  1037.          return -EBUSY;
  1038.      aux_busy = 1;
  1039. -    queue->head = queue->tail = 0;            /* Flush input queue */
  1040. +    queue->head = queue->tail = 0;        /* Flush input queue */
  1041.      if (request_irq(AUX_IRQ, aux_interrupt, 0, "PS/2 Mouse")) {
  1042.          aux_busy = 0;
  1043.          return -EBUSY;
  1044. @@ -341,7 +347,7 @@
  1045.  
  1046.  static int open_qp(struct inode * inode, struct file * file)
  1047.  {
  1048. -        unsigned char status;
  1049. +    unsigned char status;
  1050.  
  1051.      if (!qp_present)
  1052.          return -EINVAL;
  1053. @@ -365,9 +371,9 @@
  1054.      outb_p(status, qp_status);              /* Enable interrupts */
  1055.  
  1056.      while (!poll_qp_status()) {
  1057. -            printk("Error: Mouse device busy in open_qp()\n");
  1058. +        printk("Error: Mouse device busy in open_qp()\n");
  1059.          return -EBUSY;
  1060. -        }
  1061. +    }
  1062.  
  1063.      outb_p(AUX_ENABLE_DEV, qp_data);    /* Wake up mouse */
  1064.  
  1065. @@ -437,8 +443,8 @@
  1066.              goto repeat;
  1067.          }
  1068.          current->state = TASK_RUNNING;
  1069. -        remove_wait_queue(&queue->proc_list, &wait);            
  1070. -    }        
  1071. +        remove_wait_queue(&queue->proc_list, &wait);
  1072. +    }
  1073.      while (i > 0 && !queue_empty()) {
  1074.          c = get_from_queue();
  1075.          put_user(c, buffer++);
  1076. @@ -488,11 +494,11 @@
  1077.  
  1078.  unsigned long psaux_init(unsigned long kmem_start)
  1079.  {
  1080. -        int qp_found = 0;
  1081. +    int qp_found = 0;
  1082.  
  1083.  #ifdef CONFIG_82C710_MOUSE
  1084. -        if ((qp_found = probe_qp())) {
  1085. -            printk("82C710 type pointing device detected -- driver installed.\n");
  1086. +    if ((qp_found = probe_qp())) {
  1087. +        printk("82C710 type pointing device detected -- driver installed.\n");
  1088.  /*        printk("82C710 address = %x (should be 0x310)\n", qp_data); */
  1089.          qp_present = 1;
  1090.          psaux_fops.write = write_qp;
  1091. @@ -501,8 +507,8 @@
  1092.      } else
  1093.  #endif
  1094.      if (aux_device_present == 0xaa) {
  1095. -            printk("PS/2 auxiliary pointing device detected -- driver installed.\n");
  1096. -             aux_present = 1;
  1097. +        printk("PS/2 auxiliary pointing device detected -- driver installed.\n");
  1098. +         aux_present = 1;
  1099.          kbd_read_mask = AUX_OBUF_FULL;
  1100.      } else {
  1101.          return kmem_start;              /* No mouse at all */
  1102. @@ -514,15 +520,15 @@
  1103.      queue->proc_list = NULL;
  1104.      if (!qp_found) {
  1105.  #if defined INITIALIZE_DEVICE
  1106. -                outb_p(AUX_ENABLE,AUX_COMMAND);        /* Enable Aux */
  1107. -            aux_write_ack(AUX_SET_SAMPLE);
  1108. -            aux_write_ack(100);            /* 100 samples/sec */
  1109. -            aux_write_ack(AUX_SET_RES);
  1110. -            aux_write_ack(3);            /* 8 counts per mm */
  1111. -            aux_write_ack(AUX_SET_SCALE21);        /* 2:1 scaling */
  1112. -            poll_aux_status_nosleep();
  1113. +        outb_p(AUX_ENABLE,AUX_COMMAND);        /* Enable Aux */
  1114. +        aux_write_ack(AUX_SET_SAMPLE);
  1115. +        aux_write_ack(100);            /* 100 samples/sec */
  1116. +        aux_write_ack(AUX_SET_RES);
  1117. +        aux_write_ack(3);            /* 8 counts per mm */
  1118. +        aux_write_ack(AUX_SET_SCALE21);        /* 2:1 scaling */
  1119. +        poll_aux_status_nosleep();
  1120.  #endif /* INITIALIZE_DEVICE */
  1121. -            outb_p(AUX_DISABLE,AUX_COMMAND);   /* Disable Aux device */
  1122. +        outb_p(AUX_DISABLE,AUX_COMMAND);   /* Disable Aux device */
  1123.          poll_aux_status_nosleep();
  1124.          outb_p(AUX_CMD_WRITE,AUX_COMMAND);
  1125.          poll_aux_status_nosleep();             /* Disable interrupts */
  1126. @@ -568,11 +574,11 @@
  1127.      int retries=0;
  1128.  
  1129.      while ((inb(qp_status)&(QP_RX_FULL|QP_TX_IDLE|QP_DEV_IDLE))
  1130. -                   != (QP_DEV_IDLE|QP_TX_IDLE)
  1131. -                   && retries < MAX_RETRIES) {
  1132. +               != (QP_DEV_IDLE|QP_TX_IDLE)
  1133. +               && retries < MAX_RETRIES) {
  1134.  
  1135. -            if (inb_p(qp_status)&(QP_RX_FULL))
  1136. -                inb_p(qp_data);
  1137. +        if (inb_p(qp_status)&(QP_RX_FULL))
  1138. +            inb_p(qp_data);
  1139.          current->state = TASK_INTERRUPTIBLE;
  1140.          current->timeout = jiffies + (5*HZ + 99) / 100;
  1141.          schedule();
  1142. @@ -587,7 +593,7 @@
  1143.  
  1144.  static inline unsigned char read_710(unsigned char index)
  1145.  {
  1146. -        outb_p(index, 0x390);            /* Write index */
  1147. +    outb_p(index, 0x390);            /* Write index */
  1148.      return inb_p(0x391);            /* Read the data */
  1149.  }
  1150.  
  1151. @@ -597,7 +603,7 @@
  1152.  
  1153.  static int probe_qp(void)
  1154.  {
  1155. -        outb_p(0x55, 0x2fa);            /* Any value except 9, ff or 36 */
  1156. +    outb_p(0x55, 0x2fa);            /* Any value except 9, ff or 36 */
  1157.      outb_p(0xaa, 0x3fa);            /* Inverse of 55 */
  1158.      outb_p(0x36, 0x3fa);            /* Address the chip */
  1159.      outb_p(0xe4, 0x3fa);            /* 390/4; 390 = config address */
  1160. diff -u --recursive --new-file v1.3.23/linux/drivers/net/Makefile linux/drivers/net/Makefile
  1161. --- v1.3.23/linux/drivers/net/Makefile    Sun Sep  3 16:12:49 1995
  1162. +++ linux/drivers/net/Makefile    Mon Sep  4 07:38:03 1995
  1163. @@ -12,262 +12,342 @@
  1164.  M_OBJS   :=
  1165.  MOD_LIST_NAME := NET_MODULES
  1166.  
  1167. -ifdef CONFIG_SEEQ8005
  1168. +ifeq ($(CONFIG_SEEQ8005),y)
  1169.  L_OBJS += seeq8005.o
  1170.  endif
  1171.  
  1172. -ifdef CONFIG_IBMTR
  1173. +ifeq ($(CONFIG_IBMTR),y)
  1174.  L_OBJS += ibmtr.o
  1175.  else
  1176. -M_OBJS += ibmtr.o
  1177. +  ifeq ($(CONFIG_IBMTR),m)
  1178. +  M_OBJS += ibmtr.o
  1179. +  endif
  1180.  endif
  1181.  
  1182. -ifdef CONFIG_SK_G16
  1183. +ifeq ($(CONFIG_SK_G16),y)
  1184.  L_OBJS += sk_g16.o
  1185.  endif
  1186.  
  1187. -ifdef CONFIG_NET_IPIP
  1188. +ifeq ($(CONFIG_NET_IPIP),y)
  1189.  L_OBJS += tunnel.o
  1190.  else
  1191. -M_OBJS += tunnel.o
  1192. +  ifeq ($(CONFIG_NET_IPIP),m)
  1193. +  M_OBJS += tunnel.o
  1194. +  endif
  1195.  endif
  1196.  
  1197. -ifdef CONFIG_HP100
  1198. +ifeq ($(CONFIG_HP100),y)
  1199.  L_OBJS += hp100.o
  1200.  else
  1201. -M_OBJS += hp100.o
  1202. +  ifeq ($(CONFIG_HP100),m)
  1203. +  M_OBJS += hp100.o
  1204. +  endif
  1205.  endif
  1206.  
  1207. -ifdef CONFIG_WD80x3
  1208. +ifeq ($(CONFIG_WD80x3),y)
  1209.  L_OBJS += wd.o
  1210. -CONFIG_8390 = CONFIG_8390
  1211. +CONFIG_8390 = y
  1212.  else
  1213. -M_OBJS += wd.o
  1214. +  ifeq ($(CONFIG_WD80x3),m)
  1215. +  CONFIG_8390 = m
  1216. +  M_OBJS += wd.o
  1217. +  endif
  1218.  endif
  1219.  
  1220. -ifdef CONFIG_EL2
  1221. +ifeq ($(CONFIG_EL2),y)
  1222.  L_OBJS += 3c503.o
  1223. -CONFIG_8390 = CONFIG_8390
  1224. +CONFIG_8390 = y
  1225.  else
  1226. -M_OBJS += 3c503.o
  1227. +  ifeq ($(CONFIG_EL2),m)
  1228. +  CONFIG_8390 = m
  1229. +  M_OBJS += 3c503.o
  1230. +  endif
  1231.  endif
  1232.  
  1233. -ifdef CONFIG_NE2000
  1234. +ifeq ($(CONFIG_NE2000),y)
  1235.  L_OBJS += ne.o
  1236. -CONFIG_8390 = CONFIG_8390
  1237. +CONFIG_8390 = y
  1238.  else
  1239. -M_OBJS += ne.o
  1240. +  ifeq ($(CONFIG_NE2000),m)
  1241. +  CONFIG_8390 = m
  1242. +  M_OBJS += ne.o
  1243. +  endif
  1244.  endif
  1245.  
  1246. -ifdef CONFIG_HPLAN
  1247. +ifeq ($(CONFIG_HPLAN),y)
  1248.  L_OBJS += hp.o
  1249. -CONFIG_8390 = CONFIG_8390
  1250. +CONFIG_8390 = y
  1251.  else
  1252. -M_OBJS += hp.o
  1253. +  ifeq ($(CONFIG_HPLAN),m)
  1254. +  CONFIG_8390 = m
  1255. +  M_OBJS += hp.o
  1256. +  endif
  1257.  endif
  1258.  
  1259. -ifdef CONFIG_HPLAN_PLUS
  1260. +ifeq ($(CONFIG_HPLAN_PLUS),y)
  1261.  L_OBJS += hp-plus.o
  1262. -CONFIG_8390 = CONFIG_8390
  1263. +CONFIG_8390 = y
  1264.  else
  1265. -M_OBJS += hp-plus.o
  1266. +  ifeq ($(CONFIG_HPLAN_PLUS),m)
  1267. +  CONFIG_8390 = m
  1268. +  M_OBJS += hp-plus.o
  1269. +  endif
  1270.  endif
  1271.  
  1272. -ifdef CONFIG_ULTRA
  1273. +ifeq ($(CONFIG_ULTRA),y)
  1274.  L_OBJS += smc-ultra.o
  1275. -CONFIG_8390 = CONFIG_8390
  1276. +CONFIG_8390 = y
  1277.  else
  1278. -M_OBJS += smc-ultra.o
  1279. +  ifeq ($(CONFIG_ULTRA),m)
  1280. +  CONFIG_8390 = m
  1281. +  M_OBJS += smc-ultra.o
  1282. +  endif
  1283.  endif
  1284.  
  1285. -ifdef CONFIG_E2100
  1286. +ifeq ($(CONFIG_E2100),y)
  1287.  L_OBJS += e2100.o
  1288. -CONFIG_8390 = CONFIG_8390
  1289. +CONFIG_8390 = y
  1290.  else
  1291. -M_OBJS += e2100.o
  1292. +  ifeq ($(CONFIG_E2100),m)
  1293. +  CONFIG_8390 = m
  1294. +  M_OBJS += e2100.o
  1295. +  endif
  1296.  endif
  1297.  
  1298. -ifdef CONFIG_PLIP
  1299. +ifeq ($(CONFIG_PLIP),y)
  1300.  L_OBJS += plip.o
  1301.  else
  1302. -M_OBJS += plip.o
  1303. +  ifeq ($(CONFIG_PLIP),m)
  1304. +  M_OBJS += plip.o
  1305. +  endif
  1306.  endif
  1307.  
  1308. -ifdef CONFIG_PPP
  1309. +ifeq ($(CONFIG_PPP),y)
  1310.  L_OBJS += ppp.o
  1311. -CONFIG_SLHC = CONFIG_SLHC
  1312. +CONFIG_SLHC = y
  1313.  else
  1314. -M_OBJS += ppp.o
  1315. +  ifeq ($(CONFIG_PPP),m)
  1316. +  CONFIG_SLHC = m
  1317. +  M_OBJS += ppp.o
  1318. +  endif
  1319.  endif
  1320.  
  1321. -ifdef CONFIG_SLIP
  1322. +ifeq ($(CONFIG_SLIP),y)
  1323.  L_OBJS += slip.o
  1324. -CONFIG_SLHC = CONFIG_SLHC
  1325. +CONFIG_SLHC = y
  1326.  else
  1327. -M_OBJS += slip.o
  1328. +  ifeq ($(CONFIG_SLIP),m)
  1329. +  CONFIG_SLHC = m
  1330. +  M_OBJS += slip.o
  1331. +  endif
  1332.  endif
  1333.  
  1334. -ifdef CONFIG_DE650
  1335. +ifeq ($(CONFIG_DE650),y)
  1336.  ETDRV_OBJS := $(L_OBJS) de650.o
  1337. -CONFIG_8390 = CONFIG_8390
  1338. +CONFIG_8390 = y
  1339.  endif
  1340.  
  1341. -ifdef CONFIG_3C589
  1342. +ifeq ($(CONFIG_3C589),y)
  1343.  L_OBJS += 3c589.o
  1344.  endif
  1345.  
  1346. -ifdef CONFIG_DUMMY
  1347. +ifeq ($(CONFIG_DUMMY),y)
  1348.  L_OBJS += dummy.o
  1349.  else
  1350. -M_OBJS += dummy.o
  1351. +  ifeq ($(CONFIG_DUMMY),m)
  1352. +  M_OBJS += dummy.o
  1353. +  endif
  1354.  endif
  1355.  
  1356. -ifdef CONFIG_DE600
  1357. +ifeq ($(CONFIG_DE600),y)
  1358.  L_OBJS += de600.o
  1359.  else
  1360. -M_OBJS += de600.o
  1361. +  ifeq ($(CONFIG_DE600),m)
  1362. +  M_OBJS += de600.o
  1363. +  endif
  1364.  endif
  1365.  
  1366. -ifdef CONFIG_DE620
  1367. +ifeq ($(CONFIG_DE620),y)
  1368.  L_OBJS += de620.o
  1369.  else
  1370. -M_OBJS += de620.o
  1371. +  ifeq ($(CONFIG_DE620),m)
  1372. +  M_OBJS += de620.o
  1373. +  endif
  1374.  endif
  1375.  
  1376. -ifdef CONFIG_AT1500
  1377. +ifeq ($(CONFIG_AT1500),y)
  1378.  L_OBJS += lance.o
  1379.  endif
  1380.  
  1381. -ifdef CONFIG_LANCE
  1382. +ifeq ($(CONFIG_LANCE),y)
  1383.  L_OBJS += lance.o
  1384.  endif
  1385.  
  1386. -ifdef CONFIG_AT1700
  1387. +ifeq ($(CONFIG_AT1700),y)
  1388.  L_OBJS += at1700.o
  1389.  else
  1390. -M_OBJS += at1700.o
  1391. +  ifeq ($(CONFIG_AT1700),m)
  1392. +  M_OBJS += at1700.o
  1393. +  endif
  1394.  endif
  1395.  
  1396. -ifdef CONFIG_EL1
  1397. +ifeq ($(CONFIG_EL1),y)
  1398.  L_OBJS += 3c501.o
  1399.  else
  1400. -M_OBJS += 3c501.o
  1401. +  ifeq ($(CONFIG_EL1),m)
  1402. +  M_OBJS += 3c501.o
  1403. +  endif
  1404.  endif
  1405.  
  1406. -ifdef CONFIG_EL16
  1407. +ifeq ($(CONFIG_EL16),y)
  1408.  L_OBJS += 3c507.o
  1409.  else
  1410. -M_OBJS += 3c507.o
  1411. +  ifeq ($(CONFIG_EL16),m)
  1412. +  M_OBJS += 3c507.o
  1413. +  endif
  1414.  endif
  1415.  
  1416. -ifdef CONFIG_EL3
  1417. +ifeq ($(CONFIG_EL3),y)
  1418.  L_OBJS += 3c509.o
  1419.  else
  1420. -M_OBJS += 3c509.o
  1421. +  ifeq ($(CONFIG_EL3),m)
  1422. +  M_OBJS += 3c509.o
  1423. +  endif
  1424.  endif
  1425.  
  1426. -ifdef CONFIG_EEXPRESS
  1427. +ifeq ($(CONFIG_EEXPRESS),y)
  1428.  L_OBJS += eexpress.o
  1429.  else
  1430. -M_OBJS += eexpress.o
  1431. +  ifeq ($(CONFIG_EEXPRESS),m)
  1432. +  M_OBJS += eexpress.o
  1433. +  endif
  1434.  endif
  1435.  
  1436. -ifdef CONFIG_EEXPRESS_PRO
  1437. +ifeq ($(CONFIG_EEXPRESS_PRO),y)
  1438.  L_OBJS += eepro.o
  1439.  else
  1440. -M_OBJS += eepro.o
  1441. +  ifeq ($(CONFIG_EEXPRESS_PRO),m)
  1442. +  M_OBJS += eepro.o
  1443. +  endif
  1444.  endif
  1445.  
  1446. -ifdef CONFIG_WAVELAN
  1447. +ifeq ($(CONFIG_WAVELAN),y)
  1448.  L_OBJS += wavelan.o
  1449.  else
  1450. -M_OBJS += wavelan.o
  1451. +  ifeq ($(CONFIG_WAVELAN),m)
  1452. +  M_OBJS += wavelan.o
  1453. +  endif
  1454.  endif
  1455.  
  1456. -ifdef CONFIG_ZNET
  1457. +ifeq ($(CONFIG_ZNET),y)
  1458.  L_OBJS += znet.o
  1459.  endif
  1460.  
  1461. -ifdef CONFIG_DEPCA
  1462. +ifeq ($(CONFIG_DEPCA),y)
  1463.  L_OBJS += depca.o
  1464.  else
  1465. -M_OBJS += depca.o
  1466. +  ifeq ($(CONFIG_DEPCA),m)
  1467. +  M_OBJS += depca.o
  1468. +  endif
  1469.  endif
  1470.  
  1471. -ifdef CONFIG_EWRK3
  1472. +ifeq ($(CONFIG_EWRK3),y)
  1473.  L_OBJS += ewrk3.o
  1474.  else
  1475. -M_OBJS += ewrk3.o
  1476. +  ifeq ($(CONFIG_EWRK3),m)
  1477. +  M_OBJS += ewrk3.o
  1478. +  endif
  1479.  endif
  1480.  
  1481. -ifdef CONFIG_ATP
  1482. +ifeq ($(CONFIG_ATP),y)
  1483.  L_OBJS += atp.o
  1484.  endif
  1485.  
  1486. -ifdef CONFIG_DE4X5
  1487. +ifeq ($(CONFIG_DE4X5),y)
  1488.  L_OBJS += de4x5.o
  1489.  else
  1490. -M_OBJS += de4x5.o
  1491. +  ifeq ($(CONFIG_DE4X5),m)
  1492. +  M_OBJS += de4x5.o
  1493. +  endif
  1494.  endif
  1495.  
  1496. -ifdef CONFIG_NI52
  1497. +ifeq ($(CONFIG_NI52),y)
  1498.  L_OBJS += ni52.o
  1499.  endif
  1500.  
  1501. -ifdef CONFIG_NI65
  1502. +ifeq ($(CONFIG_NI65),y)
  1503.  L_OBJS += ni65.o
  1504.  endif
  1505.  
  1506. -ifdef CONFIG_ELPLUS
  1507. +ifeq ($(CONFIG_ELPLUS),y)
  1508.  L_OBJS += 3c505.o
  1509.  else
  1510. -M_OBJS += 3c505.o
  1511. +  ifeq ($(CONFIG_ELPLUS),m)
  1512. +  M_OBJS += 3c505.o
  1513. +  endif
  1514.  endif
  1515.  
  1516. -ifdef CONFIG_AC3200
  1517. +ifeq ($(CONFIG_AC3200),y)
  1518.  L_OBJS += ac3200.o
  1519. -CONFIG_8390 = CONFIG_8390
  1520. +CONFIG_8390 = y
  1521.  else
  1522. -M_OBJS += ac3200.o
  1523. +  ifeq ($(CONFIG_AC3200),m)
  1524. +  CONFIG_8390 = m
  1525. +  M_OBJS += ac3200.o
  1526. +  endif
  1527.  endif
  1528.  
  1529. -ifdef CONFIG_APRICOT
  1530. +ifeq ($(CONFIG_APRICOT),y)
  1531.  L_OBJS += apricot.o
  1532.  else
  1533. -M_OBJS += apricot.o
  1534. +  ifeq ($(CONFIG_APRICOT),m)
  1535. +  M_OBJS += apricot.o
  1536. +  endif
  1537.  endif
  1538.  
  1539. -ifdef CONFIG_DEC_ELCP
  1540. +ifeq ($(CONFIG_DEC_ELCP),y)
  1541.  L_OBJS += tulip.o
  1542.  else
  1543. -M_OBJS += tulip.o
  1544. +  ifeq ($(CONFIG_DEC_ELCP),m)
  1545. +  M_OBJS += tulip.o
  1546. +  endif
  1547.  endif
  1548.  
  1549. -ifdef CONFIG_ARCNET
  1550. +ifeq ($(CONFIG_ARCNET),y)
  1551.  L_OBJS += arcnet.o
  1552. +else
  1553. +  ifeq ($(CONFIG_ARCNET),m)
  1554. +  M_OBJS += arcnet.o
  1555. +  endif
  1556.  endif
  1557.  
  1558. -ifdef CONFIG_PI
  1559. +ifeq ($(CONFIG_PI),y)
  1560.  L_OBJS += pi2.o
  1561.  CONFIG_PI = CONFIG_PI
  1562.  endif
  1563.  
  1564. -ifdef CONFIG_SLHC
  1565. +ifeq ($(CONFIG_SLHC),y)
  1566.  L_OBJS += slhc.o
  1567.  else
  1568. -M_OBJS += slhc.o
  1569. +  ifeq ($(CONFIG_SLHC),m)
  1570. +  M_OBJS += slhc.o
  1571. +  endif
  1572.  endif
  1573.  
  1574. -ifdef CONFIG_8390
  1575. +ifeq ($(CONFIG_8390),y)
  1576.  L_OBJS += 8390.o
  1577.  else
  1578. -M_OBJS += 8390.o
  1579. +  ifeq ($(CONFIG_8390),m)
  1580. +  M_OBJS += 8390.o
  1581. +  endif
  1582.  endif
  1583.  
  1584. -ifdef CONFIG_EQUALIZER
  1585. +ifeq ($(CONFIG_EQUALIZER),y)
  1586.  L_OBJS += eql.o
  1587.  else
  1588. -M_OBJS += eql.o
  1589. +  ifeq ($(CONFIG_EQUALIZER),m)
  1590. +  M_OBJS += eql.o
  1591. +  endif
  1592.  endif
  1593.  
  1594.  include $(TOPDIR)/Rules.make
  1595. diff -u --recursive --new-file v1.3.23/linux/drivers/net/net_init.c linux/drivers/net/net_init.c
  1596. --- v1.3.23/linux/drivers/net/net_init.c    Sun Sep  3 12:26:54 1995
  1597. +++ linux/drivers/net/net_init.c    Mon Sep  4 14:48:37 1995
  1598. @@ -15,6 +15,9 @@
  1599.      Modifications/additions by Bjorn Ekwall <bj0rn@blox.se>:
  1600.          ethdev_index[MAX_ETH_CARDS]
  1601.          register_netdev() / unregister_netdev()
  1602. +        
  1603. +    Modifications by Wolfgang Walter
  1604. +        Use dev_close cleanly so we always shut things down tidily.
  1605.  */
  1606.  
  1607.  #include <linux/config.h>
  1608. diff -u --recursive --new-file v1.3.23/linux/drivers/scsi/Makefile linux/drivers/scsi/Makefile
  1609. --- v1.3.23/linux/drivers/scsi/Makefile    Mon Aug 28 14:52:20 1995
  1610. +++ linux/drivers/scsi/Makefile    Mon Sep  4 07:31:54 1995
  1611. @@ -43,146 +43,193 @@
  1612.  M_OBJS += scsi_mod.o
  1613.  endif
  1614.  
  1615. -ifdef CONFIG_CHR_DEV_ST
  1616. +ifeq ($(CONFIG_CHR_DEV_ST),y)
  1617.  L_OBJS += st.o
  1618.  else
  1619. -M_OBJS += st.o
  1620. +  ifeq ($(CONFIG_CHR_DEV_ST),m)
  1621. +  M_OBJS += st.o
  1622. +  endif
  1623.  endif
  1624.  
  1625. -ifdef CONFIG_BLK_DEV_SD
  1626. +ifeq ($(CONFIG_BLK_DEV_SD),y)
  1627.  L_OBJS += sd.o sd_ioctl.o
  1628.  else
  1629. -M_OBJS += sd_mod.o
  1630. +  ifeq ($(CONFIG_BLK_DEV_SD),m)
  1631. +  M_OBJS += sd_mod.o
  1632. +  endif
  1633.  endif
  1634.  
  1635. -ifdef CONFIG_BLK_DEV_SR
  1636. +ifeq ($(CONFIG_BLK_DEV_SR),y)
  1637.  L_OBJS += sr.o sr_ioctl.o
  1638.  else
  1639. -M_OBJS += sr_mod.o
  1640. +  ifeq ($(CONFIG_BLK_DEV_SR),m)
  1641. +  M_OBJS += sr_mod.o
  1642. +  endif
  1643.  endif
  1644.  
  1645. -ifdef CONFIG_CHR_DEV_SG
  1646. +ifeq ($(CONFIG_CHR_DEV_SG),y)
  1647.  L_OBJS += sg.o
  1648.  else
  1649. -M_OBJS += sg.o
  1650. +  ifeq ($(CONFIG_CHR_DEV_SG),m)
  1651. +  M_OBJS += sg.o
  1652. +  endif
  1653.  endif
  1654.  
  1655. -ifdef CONFIG_SCSI_QLOGIC
  1656. +ifeq ($(CONFIG_SCSI_QLOGIC),y)
  1657.  L_OBJS += qlogic.o
  1658.  else
  1659. -M_OBJS += qlogic.o
  1660. +  ifeq ($(CONFIG_SCSI_QLOGIC),m)
  1661. +  M_OBJS += qlogic.o
  1662. +  endif
  1663.  endif
  1664.  
  1665. -ifdef CONFIG_SCSI_AHA152X
  1666. +ifeq ($(CONFIG_SCSI_AHA152X),y)
  1667.  L_OBJS += aha152x.o
  1668.  else
  1669. -M_OBJS += aha152x.o
  1670. +  ifeq ($(CONFIG_SCSI_AHA152X),m)
  1671. +  M_OBJS += aha152x.o
  1672. +  endif
  1673.  endif
  1674.  
  1675. -ifdef CONFIG_SCSI_AHA1542
  1676. +ifeq ($(CONFIG_SCSI_AHA1542),y)
  1677.  L_OBJS += aha1542.o
  1678.  else
  1679. -M_OBJS += aha1542.o
  1680. +  ifeq ($(CONFIG_SCSI_AHA1542),m)
  1681. +  M_OBJS += aha1542.o
  1682. +  endif
  1683.  endif
  1684.  
  1685. -ifdef CONFIG_SCSI_AHA1740
  1686. +ifeq ($(CONFIG_SCSI_AHA1740),y)
  1687.  L_OBJS += aha1740.o
  1688.  else
  1689. -M_OBJS += aha1740.o
  1690. +  ifeq ($(CONFIG_SCSI_AHA1740),m)
  1691. +  M_OBJS += aha1740.o
  1692. +  endif
  1693.  endif
  1694.  
  1695. -ifdef CONFIG_SCSI_AIC7XXX
  1696. +ifeq ($(CONFIG_SCSI_AIC7XXX),y)
  1697.  L_OBJS += aic7xxx.o
  1698.  else
  1699. -M_OBJS += aic7xxx.o
  1700. +  ifeq ($(CONFIG_SCSI_AIC7XXX),m)
  1701. +  M_OBJS += aic7xxx.o
  1702. +  endif
  1703.  endif
  1704.  
  1705. -ifdef CONFIG_SCSI_BUSLOGIC
  1706. +ifeq ($(CONFIG_SCSI_BUSLOGIC),y)
  1707.  L_OBJS += buslogic.o
  1708.  else
  1709. -M_OBJS += buslogic.o
  1710. +  ifeq ($(CONFIG_SCSI_BUSLOGIC),m)
  1711. +  M_OBJS += buslogic.o
  1712. +  endif
  1713.  endif
  1714.  
  1715. -ifdef CONFIG_SCSI_EATA_DMA
  1716. +ifeq ($(CONFIG_SCSI_EATA_DMA),y)
  1717.  L_OBJS += eata_dma.o
  1718.  else
  1719. -M_OBJS += eata_dma.o
  1720. +  ifeq ($(CONFIG_SCSI_EATA_DMA),m)
  1721. +  M_OBJS += eata_dma.o
  1722. +  endif
  1723.  endif
  1724.  
  1725. -ifdef CONFIG_SCSI_EATA_PIO
  1726. +ifeq ($(CONFIG_SCSI_EATA_PIO),y)
  1727.  L_OBJS += eata_pio.o
  1728.  else
  1729. -M_OBJS += eata_pio.o
  1730. +  ifeq ($(CONFIG_SCSI_EATA_PIO),m)
  1731. +  M_OBJS += eata_pio.o
  1732. +  endif
  1733.  endif
  1734.  
  1735. -ifdef CONFIG_SCSI_U14_34F
  1736. +ifeq ($(CONFIG_SCSI_U14_34F),y)
  1737.  L_OBJS += u14-34f.o
  1738.  else
  1739. -M_OBJS += u14-34f.o
  1740. +  ifeq ($(CONFIG_SCSI_U14_34F),m)
  1741. +  M_OBJS += u14-34f.o
  1742. +  endif
  1743.  endif
  1744.  
  1745. -ifdef CONFIG_SCSI_DEBUG
  1746. +ifeq ($(CONFIG_SCSI_DEBUG),y)
  1747.  L_OBJS += scsi_debug.o
  1748.  else
  1749. -M_OBJS += scsi_debug.o
  1750. +  ifeq ($(CONFIG_SCSI_DEBUG),m)
  1751. +  M_OBJS += scsi_debug.o
  1752. +  endif
  1753.  endif
  1754.  
  1755. -ifdef CONFIG_SCSI_FUTURE_DOMAIN
  1756. +ifeq ($(CONFIG_SCSI_FUTURE_DOMAIN),y)
  1757.  L_OBJS += fdomain.o
  1758.  else
  1759. -M_OBJS += fdomain.o
  1760. +  ifeq ($(CONFIG_SCSI_FUTURE_DOMAIN),m)
  1761. +  M_OBJS += fdomain.o
  1762. +  endif
  1763.  endif
  1764.  
  1765. -ifdef CONFIG_SCSI_IN2000
  1766. +ifeq ($(CONFIG_SCSI_IN2000),y)
  1767.  L_OBJS += in2000.o
  1768.  else
  1769. -M_OBJS += in2000.o
  1770. +  ifeq ($(CONFIG_SCSI_IN2000),m)
  1771. +  M_OBJS += in2000.o
  1772. +  endif
  1773.  endif
  1774.  
  1775. -ifdef CONFIG_SCSI_GENERIC_NCR5380
  1776. +ifeq ($(CONFIG_SCSI_GENERIC_NCR5380),y)
  1777.  L_OBJS += g_NCR5380.o
  1778.  endif
  1779.  
  1780. -ifdef CONFIG_SCSI_NCR53C7xx
  1781. +ifeq ($(CONFIG_SCSI_NCR53C7xx),y)
  1782.  L_OBJS += 53c7,8xx.o 
  1783.  else
  1784. -M_OBJS += 53c7,8xx.o
  1785. +  ifeq ($(CONFIG_SCSI_NCR53C7xx),m)
  1786. +  M_OBJS += 53c7,8xx.o
  1787. +  endif
  1788.  endif
  1789.  
  1790. -ifdef CONFIG_SCSI_PAS16
  1791. +ifeq ($(CONFIG_SCSI_PAS16),y)
  1792.  L_OBJS += pas16.o
  1793.  endif
  1794.  
  1795. -ifdef CONFIG_SCSI_SEAGATE
  1796. +ifeq ($(CONFIG_SCSI_SEAGATE),y)
  1797.  L_OBJS += seagate.o
  1798.  else
  1799. -ifdef CONFIG_SCSI_FD_8xx
  1800. -L_OBJS += seagate.o
  1801. -else
  1802. -M_OBJS += seagate.o
  1803. -endif
  1804. +  ifeq ($(CONFIG_SCSI_SEAGATE),m)
  1805. +  M_OBJS += seagate.o
  1806. +  endif
  1807. +endif
  1808. +ifndef CONFIG_SCSI_SEAGATE
  1809. +  ifeq ($(CONFIG_SCSI_FD_8xx),y)
  1810. +  L_OBJS += seagate.o
  1811. +  else
  1812. +    ifeq ($(CONFIG_SCSI_FD_8xx),m)
  1813. +    M_OBJS += seagate.o
  1814. +    endif
  1815. +  endif
  1816.  endif
  1817.  
  1818. -ifdef CONFIG_SCSI_7000FASST
  1819. +ifeq ($(CONFIG_SCSI_7000FASST),y)
  1820.  L_OBJS += wd7000.o
  1821.  else
  1822. -M_OBJS += wd7000.o
  1823. +  ifeq ($(CONFIG_SCSI_7000FASST),m)
  1824. +  M_OBJS += wd7000.o
  1825. +  endif
  1826.  endif
  1827.  
  1828. -ifdef CONFIG_SCSI_T128
  1829. +ifeq ($(CONFIG_SCSI_T128),y)
  1830.  L_OBJS += t128.o
  1831.  endif
  1832.  
  1833. -ifdef CONFIG_SCSI_ULTRASTOR
  1834. +ifeq ($(CONFIG_SCSI_ULTRASTOR),y)
  1835.  L_OBJS += ultrastor.o
  1836.  else
  1837. -M_OBJS += ultrastor.o
  1838. +  ifeq ($(CONFIG_SCSI_ULTRASTOR),m)
  1839. +  M_OBJS += ultrastor.o
  1840. +  endif
  1841.  endif
  1842.  
  1843. -ifdef CONFIG_SCSI_EATA
  1844. +ifeq ($(CONFIG_SCSI_EATA),y)
  1845.  L_OBJS += eata.o
  1846.  else
  1847. -M_OBJS += eata.o
  1848. +  ifeq ($(CONFIG_SCSI_EATA),m)
  1849. +  M_OBJS += eata.o
  1850. +  endif
  1851.  endif
  1852.  
  1853.  include $(TOPDIR)/Rules.make
  1854. diff -u --recursive --new-file v1.3.23/linux/drivers/scsi/st.c linux/drivers/scsi/st.c
  1855. --- v1.3.23/linux/drivers/scsi/st.c    Sun Sep  3 12:27:00 1995
  1856. +++ linux/drivers/scsi/st.c    Mon Sep  4 09:46:50 1995
  1857. @@ -11,7 +11,7 @@
  1858.    Copyright 1992, 1993, 1994, 1995 Kai Makisara
  1859.           email Kai.Makisara@metla.fi
  1860.  
  1861. -  Last modified: Thu Aug 31 00:04:12 1995 by root@kai.makisara.fi
  1862. +  Last modified: Sat Sep  2 11:50:15 1995 by root@kai.makisara.fi
  1863.  */
  1864.  #ifdef MODULE
  1865.  #include <linux/autoconf.h>
  1866. @@ -249,13 +249,12 @@
  1867.    unsigned char cmd[10];
  1868.    unsigned int flags;
  1869.  
  1870. +  SCpnt = allocate_device(NULL, STp->device, 1);
  1871.    cmd[0] = SPACE;
  1872. -  cmd[1] = 0x01; /* Space FileMarks */
  1873. +  cmd[1] = ((SCpnt->lun << 5) & 0xe0) | 0x01; /* Space FileMarks */
  1874.    cmd[2] = cmd[3] = cmd[4] = 0xff;  /* -1 filemarks */
  1875.    cmd[5] = 0;
  1876.  
  1877. -  SCpnt = allocate_device(NULL, STp->device, 1);
  1878. -  SCpnt->sense_buffer[0] = 0;
  1879.    SCpnt->request.dev = dev;
  1880.    scsi_do_cmd(SCpnt,
  1881.            (void *) cmd, (void *) (STp->buffer)->b_data, 0,
  1882. @@ -320,10 +319,9 @@
  1883.  #endif
  1884.      memset((STp->buffer)->b_data + offset, 0, transfer - offset);
  1885.  
  1886. -    SCpnt->sense_buffer[0] = 0;
  1887.      memset(cmd, 0, 10);
  1888.      cmd[0] = WRITE_6;
  1889. -    cmd[1] = 1;
  1890. +    cmd[1] = ((SCpnt->lun << 5) & 0xe0) | 1;
  1891.      blks = transfer / STp->block_size;
  1892.      cmd[2] = blks >> 16;
  1893.      cmd[3] = blks >> 8;
  1894. @@ -465,9 +463,9 @@
  1895.        return (-EBUSY);
  1896.      }
  1897.  
  1898. -    SCpnt->sense_buffer[0]=0;
  1899.      memset ((void *) &cmd[0], 0, 10);
  1900.      cmd[0] = TEST_UNIT_READY;
  1901. +    cmd[1] = (SCpnt->lun << 5) & 0xe0;
  1902.      SCpnt->request.dev = dev;
  1903.      scsi_do_cmd(SCpnt,
  1904.          (void *) cmd, (void *) (STp->buffer)->b_data,
  1905. @@ -483,9 +481,9 @@
  1906.      if ((SCpnt->sense_buffer[0] & 0x70) == 0x70 &&
  1907.      (SCpnt->sense_buffer[2] & 0x0f) == UNIT_ATTENTION) { /* New media? */
  1908.        (STp->mt_status)->mt_fileno = 0 ;
  1909. -      SCpnt->sense_buffer[0]=0;
  1910.        memset ((void *) &cmd[0], 0, 10);
  1911.        cmd[0] = TEST_UNIT_READY;
  1912. +      cmd[1] = (SCpnt->lun << 5) & 0xe0;
  1913.        SCpnt->request.dev = dev;
  1914.        scsi_do_cmd(SCpnt,
  1915.            (void *) cmd, (void *) (STp->buffer)->b_data,
  1916. @@ -525,9 +523,9 @@
  1917.        return 0;
  1918.      }
  1919.  
  1920. -    SCpnt->sense_buffer[0]=0;
  1921.      memset ((void *) &cmd[0], 0, 10);
  1922.      cmd[0] = READ_BLOCK_LIMITS;
  1923. +    cmd[1] = (SCpnt->lun << 5) & 0xe0;
  1924.      SCpnt->request.dev = dev;
  1925.      scsi_do_cmd(SCpnt,
  1926.          (void *) cmd, (void *) (STp->buffer)->b_data,
  1927. @@ -558,9 +556,9 @@
  1928.  #endif
  1929.      }
  1930.  
  1931. -    SCpnt->sense_buffer[0]=0;
  1932.      memset ((void *) &cmd[0], 0, 10);
  1933.      cmd[0] = MODE_SENSE;
  1934. +    cmd[1] = (SCpnt->lun << 5) & 0xe0;
  1935.      cmd[4] = 12;
  1936.      SCpnt->request.dev = dev;
  1937.      scsi_do_cmd(SCpnt,
  1938. @@ -687,9 +685,9 @@
  1939.        if (result == 0 || result == (-ENOSPC)) {
  1940.      SCpnt = allocate_device(NULL, STp->device, 1);
  1941.  
  1942. -    SCpnt->sense_buffer[0] = 0;
  1943.      memset(cmd, 0, 10);
  1944.      cmd[0] = WRITE_FILEMARKS;
  1945. +    cmd[1] = (SCpnt->lun << 5) & 0xe0;
  1946.      cmd[4] = 1 + STp->two_fm;
  1947.      SCpnt->request.dev = dev;
  1948.      scsi_do_cmd( SCpnt,
  1949. @@ -833,7 +831,7 @@
  1950.  
  1951.      memset(cmd, 0, 10);
  1952.      cmd[0] = WRITE_6;
  1953. -    cmd[1] = (STp->block_size != 0);
  1954. +    cmd[1] = ((SCpnt->lun << 5) & 0xe0) | (STp->block_size != 0);
  1955.  
  1956.      STp->rw = ST_WRITING;
  1957.  
  1958. @@ -863,7 +861,6 @@
  1959.        cmd[2] = blks >> 16;
  1960.        cmd[3] = blks >> 8;
  1961.        cmd[4] = blks;
  1962. -      SCpnt->sense_buffer[0] = 0;
  1963.        SCpnt->request.dev = dev;
  1964.        scsi_do_cmd (SCpnt,
  1965.             (void *) cmd, (STp->buffer)->b_data, transfer,
  1966. @@ -978,7 +975,6 @@
  1967.        cmd[2] = blks >> 16;
  1968.        cmd[3] = blks >> 8;
  1969.        cmd[4] = blks;
  1970. -      SCpnt->sense_buffer[0] = 0;
  1971.        SCpnt->request.dev = dev;
  1972.        STp->write_pending = 1;
  1973.        scsi_do_cmd (SCpnt,
  1974. @@ -1057,7 +1053,7 @@
  1975.  
  1976.      memset(cmd, 0, 10);
  1977.      cmd[0] = READ_6;
  1978. -    cmd[1] = (STp->block_size != 0);
  1979. +    cmd[1] = ((SCpnt->lun << 5) & 0xe0) | (STp->block_size != 0);
  1980.      if (STp->block_size == 0)
  1981.        blks = bytes = count;
  1982.      else {
  1983. @@ -1077,7 +1073,6 @@
  1984.      cmd[3] = blks >> 8;
  1985.      cmd[4] = blks;
  1986.  
  1987. -    SCpnt->sense_buffer[0] = 0;
  1988.      SCpnt->request.dev = dev;
  1989.      scsi_do_cmd (SCpnt,
  1990.               (void *) cmd, (STp->buffer)->b_data,
  1991. @@ -1643,7 +1638,7 @@
  1992.       }
  1993.  
  1994.     SCpnt = allocate_device(NULL, STp->device, 1);
  1995. -   SCpnt->sense_buffer[0] = 0;
  1996. +   cmd[1] |= (SCpnt->lun << 5) & 0xe0;
  1997.     SCpnt->request.dev = dev;
  1998.     scsi_do_cmd(SCpnt,
  1999.             (void *) cmd, (void *) (STp->buffer)->b_data, datalen,
  2000. @@ -1900,7 +1895,6 @@
  2001.  
  2002.       SCpnt = allocate_device(NULL, STp->device, 1);
  2003.  
  2004. -     SCpnt->sense_buffer[0]=0;
  2005.       memset (scmd, 0, 10);
  2006.       if ((STp->device)->scsi_level < SCSI_2) {
  2007.         scmd[0] = QFA_REQUEST_BLOCK;
  2008. @@ -1911,7 +1905,7 @@
  2009.         scmd[1] = 1;
  2010.       }
  2011.       SCpnt->request.dev = dev;
  2012. -     SCpnt->sense_buffer[0] = 0;
  2013. +     scmd[1] |= (SCpnt->lun << 5) & 0xe0;
  2014.       scsi_do_cmd(SCpnt,
  2015.           (void *) scmd, (void *) (STp->buffer)->b_data,
  2016.           20, st_sleep_done, ST_TIMEOUT, MAX_READY_RETRIES);
  2017. diff -u --recursive --new-file v1.3.23/linux/fs/Makefile linux/fs/Makefile
  2018. --- v1.3.23/linux/fs/Makefile    Sun Sep  3 12:27:00 1995
  2019. +++ linux/fs/Makefile    Tue Sep  5 07:50:31 1995
  2020. @@ -18,10 +18,12 @@
  2021.  MOD_LIST_NAME := FS_MODULES
  2022.  ALL_SUB_DIRS = minix ext ext2 msdos proc isofs nfs xiafs umsdos hpfs sysv smbfs
  2023.  
  2024. -ifdef CONFIG_MINIX_FS
  2025. +ifeq ($(CONFIG_MINIX_FS),y)
  2026.  SUB_DIRS += minix
  2027.  else
  2028. -MOD_SUB_DIRS += minix
  2029. +  ifeq ($(CONFIG_MINIX_FS),m)
  2030. +  MOD_SUB_DIRS += minix
  2031. +  endif
  2032.  endif
  2033.  
  2034.  ifdef CONFIG_EXT_FS
  2035. @@ -32,62 +34,80 @@
  2036.  SUB_DIRS += ext2
  2037.  endif
  2038.  
  2039. -ifdef CONFIG_MSDOS_FS
  2040. +ifeq ($(CONFIG_MSDOS_FS),y)
  2041.  SUB_DIRS += msdos
  2042.  else
  2043. -MOD_SUB_DIRS += msdos
  2044. +  ifeq ($(CONFIG_MSDOS_FS),m)
  2045. +  MOD_SUB_DIRS += msdos
  2046. +  endif
  2047.  endif
  2048.  
  2049.  ifdef CONFIG_PROC_FS
  2050.  SUB_DIRS += proc
  2051.  endif
  2052.  
  2053. -ifdef CONFIG_ISO9660_FS
  2054. +ifeq ($(CONFIG_ISO9660_FS),y)
  2055.  SUB_DIRS += isofs
  2056.  else
  2057. -MOD_SUB_DIRS += isofs
  2058. +  ifeq ($(CONFIG_ISO9660_FS),m)
  2059. +  MOD_SUB_DIRS += isofs
  2060. +  endif
  2061.  endif
  2062.  
  2063. -ifdef CONFIG_NFS_FS
  2064. +ifeq ($(CONFIG_NFS_FS),y)
  2065.  SUB_DIRS += nfs
  2066.  else
  2067. -MOD_SUB_DIRS += nfs
  2068. +  ifeq ($(CONFIG_NFS_FS),m)
  2069. +  MOD_SUB_DIRS += nfs
  2070. +  endif
  2071.  endif
  2072.  
  2073. -ifdef CONFIG_XIA_FS
  2074. +ifeq ($(CONFIG_XIA_FS),y)
  2075.  SUB_DIRS += xiafs
  2076.  else
  2077. -MOD_SUB_DIRS += xiafs
  2078. +  ifeq ($(CONFIG_XIA_FS),m)
  2079. +  MOD_SUB_DIRS += xiafs
  2080. +  endif
  2081.  endif
  2082.  
  2083. -ifdef CONFIG_UMSDOS_FS
  2084. +ifeq ($(CONFIG_UMSDOS_FS),y)
  2085.  SUB_DIRS += umsdos
  2086.  else
  2087. -MOD_SUB_DIRS += umsdos
  2088. +  ifeq ($(CONFIG_UMSDOS_FS),m)
  2089. +  MOD_SUB_DIRS += umsdos
  2090. +  endif
  2091.  endif
  2092.  
  2093. -ifdef CONFIG_SYSV_FS
  2094. +ifeq ($(CONFIG_SYSV_FS),y)
  2095.  SUB_DIRS += sysv
  2096.  else
  2097. -MOD_SUB_DIRS += sysv
  2098. +  ifeq ($(CONFIG_SYSV_FS),m)
  2099. +  MOD_SUB_DIRS += sysv
  2100. +  endif
  2101.  endif
  2102.  
  2103. -ifdef CONFIG_SMB_FS
  2104. +ifeq ($(CONFIG_SMB_FS),y)
  2105.  SUB_DIRS += smbfs
  2106.  else
  2107. -MOD_SUB_DIRS += smbfs
  2108. +  ifeq ($(CONFIG_SMB_FS),m)
  2109. +  MOD_SUB_DIRS += smbfs
  2110. +  endif
  2111.  endif
  2112.  
  2113. -ifdef CONFIG_HPFS_FS
  2114. +ifeq ($(CONFIG_HPFS_FS),y)
  2115.  SUB_DIRS += hpfs
  2116.  else
  2117. -MOD_SUB_DIRS += hpfs
  2118. +  ifeq ($(CONFIG_HPFS_FS),m)
  2119. +  MOD_SUB_DIRS += hpfs
  2120. +  endif
  2121.  endif
  2122.  
  2123. -ifdef CONFIG_BINFMT_ELF
  2124. +ifeq ($(CONFIG_BINFMT_ELF),y)
  2125.  BINFMTS += binfmt_elf.o
  2126.  else
  2127. -MOD_SUB_DIRS += binfmt_elf.o
  2128. +  ifeq ($(CONFIG_BINFMT_ELF),m)
  2129. +  M_OBJS += binfmt_elf.o
  2130. +  endif
  2131.  endif
  2132.  
  2133.  include $(TOPDIR)/Rules.make
  2134. diff -u --recursive --new-file v1.3.23/linux/fs/binfmt_elf.c linux/fs/binfmt_elf.c
  2135. --- v1.3.23/linux/fs/binfmt_elf.c    Sun Sep  3 12:27:00 1995
  2136. +++ linux/fs/binfmt_elf.c    Mon Sep  4 13:52:30 1995
  2137. @@ -97,7 +97,7 @@
  2138.  
  2139.      mpnt = (struct vm_area_struct *)kmalloc(sizeof(*mpnt), GFP_KERNEL);
  2140.      if (mpnt) {
  2141. -        mpnt->vm_task = current;
  2142. +        mpnt->vm_mm = current->mm;
  2143.          mpnt->vm_start = PAGE_MASK & (unsigned long) p;
  2144.          mpnt->vm_end = TASK_SIZE;
  2145.          mpnt->vm_page_prot = PAGE_COPY;
  2146. @@ -235,7 +235,7 @@
  2147.          
  2148.          error = do_mmap(file, 
  2149.                  vaddr & 0xfffff000,
  2150. -                eppnt->p_filesz + (vaddr & 0xfff),
  2151. +                eppnt->p_filesz + (eppnt->p_vaddr & 0xfff),
  2152.                  elf_prot,
  2153.                  elf_type,
  2154.                  eppnt->p_offset & 0xfffff000);
  2155. diff -u --recursive --new-file v1.3.23/linux/fs/exec.c linux/fs/exec.c
  2156. --- v1.3.23/linux/fs/exec.c    Sun Sep  3 12:27:00 1995
  2157. +++ linux/fs/exec.c    Tue Sep  5 11:09:25 1995
  2158. @@ -305,7 +305,7 @@
  2159.  
  2160.      mpnt = (struct vm_area_struct *)kmalloc(sizeof(*mpnt), GFP_KERNEL);
  2161.      if (mpnt) {
  2162. -        mpnt->vm_task = current;
  2163. +        mpnt->vm_mm = current->mm;
  2164.          mpnt->vm_start = PAGE_MASK & (unsigned long) p;
  2165.          mpnt->vm_end = STACK_TOP;
  2166.          mpnt->vm_page_prot = PAGE_COPY;
  2167. @@ -542,7 +542,7 @@
  2168.      current->comm[i] = '\0';
  2169.  
  2170.      /* Release all of the old mmap stuff. */
  2171. -    exit_mmap(current);
  2172. +    exit_mmap(current->mm);
  2173.  
  2174.      flush_thread();
  2175.  
  2176. diff -u --recursive --new-file v1.3.23/linux/fs/proc/array.c linux/fs/proc/array.c
  2177. --- v1.3.23/linux/fs/proc/array.c    Sun Sep  3 12:27:01 1995
  2178. +++ linux/fs/proc/array.c    Mon Sep  4 13:30:18 1995
  2179. @@ -293,7 +293,7 @@
  2180.  
  2181.      if (!p || ptr >= TASK_SIZE)
  2182.          return 0;
  2183. -    page_dir = pgd_offset(p,ptr);
  2184. +    page_dir = pgd_offset(p->mm,ptr);
  2185.      if (pgd_none(*page_dir))
  2186.          return 0;
  2187.      if (pgd_bad(*page_dir)) {
  2188. @@ -556,7 +556,7 @@
  2189.          struct vm_area_struct * vma = (*p)->mm->mmap;
  2190.  
  2191.          while (vma) {
  2192. -            pgd_t *pgd = pgd_offset(*p, vma->vm_start);
  2193. +            pgd_t *pgd = pgd_offset((*p)->mm, vma->vm_start);
  2194.              int pages = 0, shared = 0, dirty = 0, total = 0;
  2195.  
  2196.              statm_pgd_range(pgd, vma->vm_start, vma->vm_end, &pages, &shared, &dirty, &total);
  2197. diff -u --recursive --new-file v1.3.23/linux/fs/proc/mem.c linux/fs/proc/mem.c
  2198. --- v1.3.23/linux/fs/proc/mem.c    Sun Sep  3 12:27:01 1995
  2199. +++ linux/fs/proc/mem.c    Mon Sep  4 12:58:55 1995
  2200. @@ -81,7 +81,7 @@
  2201.      while (count > 0) {
  2202.          if (current->signal & ~current->blocked)
  2203.              break;
  2204. -        page_dir = pgd_offset(tsk,addr);
  2205. +        page_dir = pgd_offset(tsk->mm,addr);
  2206.          if (pgd_none(*page_dir))
  2207.              break;
  2208.          if (pgd_bad(*page_dir)) {
  2209. @@ -236,7 +236,7 @@
  2210.          if (!src_vma || (src_vma->vm_flags & VM_SHM))
  2211.              return -EINVAL;
  2212.  
  2213. -        src_dir = pgd_offset(tsk, stmp);
  2214. +        src_dir = pgd_offset(tsk->mm, stmp);
  2215.          if (pgd_none(*src_dir))
  2216.              return -EINVAL;
  2217.          if (pgd_bad(*src_dir)) {
  2218. @@ -271,11 +271,11 @@
  2219.          while (src_vma && stmp > src_vma->vm_end)
  2220.              src_vma = src_vma->vm_next;
  2221.  
  2222. -        src_dir = pgd_offset(tsk, stmp);
  2223. +        src_dir = pgd_offset(tsk->mm, stmp);
  2224.          src_middle = pmd_offset(src_dir, stmp);
  2225.          src_table = pte_offset(src_middle, stmp);
  2226.  
  2227. -        dest_dir = pgd_offset(current, dtmp);
  2228. +        dest_dir = pgd_offset(current->mm, dtmp);
  2229.          dest_middle = pmd_alloc(dest_dir, dtmp);
  2230.          if (!dest_middle)
  2231.              return -ENOMEM;
  2232. @@ -284,10 +284,10 @@
  2233.              return -ENOMEM;
  2234.  
  2235.          if (!pte_present(*src_table))
  2236. -            do_no_page(src_vma, stmp, 1);
  2237. +            do_no_page(tsk, src_vma, stmp, 1);
  2238.  
  2239.          if ((vma->vm_flags & VM_WRITE) && !pte_write(*src_table))
  2240. -            do_wp_page(src_vma, stmp, 1);
  2241. +            do_wp_page(tsk, src_vma, stmp, 1);
  2242.  
  2243.          set_pte(src_table, pte_mkdirty(*src_table));
  2244.          set_pte(dest_table, *src_table);
  2245. diff -u --recursive --new-file v1.3.23/linux/include/asm-alpha/processor.h linux/include/asm-alpha/processor.h
  2246. --- v1.3.23/linux/include/asm-alpha/processor.h    Fri Jun  2 13:53:58 1995
  2247. +++ linux/include/asm-alpha/processor.h    Mon Sep  4 13:00:38 1995
  2248. @@ -37,7 +37,7 @@
  2249.      unsigned long res1, res2;
  2250.  };
  2251.  
  2252. -#define INIT_MMAP { &init_task, 0xfffffc0000000000,  0xfffffc0010000000, \
  2253. +#define INIT_MMAP { &init_mm, 0xfffffc0000000000,  0xfffffc0010000000, \
  2254.      PAGE_SHARED, VM_READ | VM_WRITE | VM_EXEC }
  2255.  
  2256.  #define INIT_TSS  { \
  2257. diff -u --recursive --new-file v1.3.23/linux/include/asm-i386/pgtable.h linux/include/asm-i386/pgtable.h
  2258. --- v1.3.23/linux/include/asm-i386/pgtable.h    Tue Aug  8 12:31:41 1995
  2259. +++ linux/include/asm-i386/pgtable.h    Mon Sep  4 09:01:07 1995
  2260. @@ -219,9 +219,9 @@
  2261.  { return pmd_val(pmd) & PAGE_MASK; }
  2262.  
  2263.  /* to find an entry in a page-table-directory */
  2264. -extern inline pgd_t * pgd_offset(struct task_struct * tsk, unsigned long address)
  2265. +extern inline pgd_t * pgd_offset(struct mm_struct * mm, unsigned long address)
  2266.  {
  2267. -    return (pgd_t *) tsk->tss.cr3 + (address >> PGDIR_SHIFT);
  2268. +    return mm->pgd + (address >> PGDIR_SHIFT);
  2269.  }
  2270.  
  2271.  /* Find an entry in the second-level page table.. */
  2272. diff -u --recursive --new-file v1.3.23/linux/include/asm-i386/processor.h linux/include/asm-i386/processor.h
  2273. --- v1.3.23/linux/include/asm-i386/processor.h    Fri Jun 16 22:02:55 1995
  2274. +++ linux/include/asm-i386/processor.h    Mon Sep  4 13:00:28 1995
  2275. @@ -106,7 +106,7 @@
  2276.      unsigned long v86flags, v86mask, v86mode;
  2277.  };
  2278.  
  2279. -#define INIT_MMAP { &init_task, 0, 0x40000000, PAGE_SHARED, VM_READ | VM_WRITE | VM_EXEC }
  2280. +#define INIT_MMAP { &init_mm, 0, 0x40000000, PAGE_SHARED, VM_READ | VM_WRITE | VM_EXEC }
  2281.  
  2282.  #define INIT_TSS  { \
  2283.      0,0, \
  2284. diff -u --recursive --new-file v1.3.23/linux/include/linux/igmp.h linux/include/linux/igmp.h
  2285. --- v1.3.23/linux/include/linux/igmp.h    Sun Sep  3 16:12:49 1995
  2286. +++ linux/include/linux/igmp.h    Mon Sep  4 14:48:36 1995
  2287. @@ -4,6 +4,8 @@
  2288.   *    Authors:
  2289.   *        Alan Cox <Alan.Cox@linux.org>    
  2290.   *
  2291. + *    Extended to talk the BSD extended IGMP protocol of mrouted 3.6
  2292. + *
  2293.   *
  2294.   *    This program is free software; you can redistribute it and/or
  2295.   *    modify it under the terms of the GNU General Public License
  2296. @@ -24,30 +26,37 @@
  2297.   
  2298.  struct igmphdr
  2299.  {
  2300. -    unsigned char type;
  2301. -    unsigned char code;
  2302. -    unsigned short csum;
  2303. -    unsigned long group;
  2304. +    __u8 type;
  2305. +    __u8 code;        /* For newer IGMP */
  2306. +    __u16 csum;
  2307. +    __u32 group;
  2308.  };
  2309.  
  2310. +#define IGMP_HOST_MEMBERSHIP_QUERY    0x11    /* From RFC1112 */
  2311. +#define IGMP_HOST_MEMBERSHIP_REPORT    0x12    /* Ditto */
  2312. +#define IGMP_DVMRP            0x13    /* DVMRP routing */
  2313. +#define IGMP_PIM            0x14    /* PIM routing */
  2314. +#define IGMP_HOST_NEW_MEMBERSHIP_REPORT    0x16    /* New version of 0x11 */
  2315. +#define IGMP_HOST_LEAVE_MESSAGE        0x17    /* An extra BSD seems to send */
  2316. +
  2317. +#define IGMP_MTRACE_RESP        0x1e
  2318. +#define IGMP_MTRACE            0x1f
  2319. +
  2320.  /*
  2321. - *    Header in host convenient format
  2322. + *    Use the BSD names for these for compatibility
  2323.   */
  2324.  
  2325. -struct igmp_header
  2326. -{
  2327. -    unsigned char type;
  2328. -    unsigned char code;
  2329. -    unsigned short csum;
  2330. -    unsigned long group;
  2331. -};
  2332. +#define IGMP_DELAYING_MEMBER        0x01
  2333. +#define IGMP_IDLE_MEMBER        0x02
  2334. +#define IGMP_LAZY_MEMBER        0x03
  2335. +#define IGMP_SLEEPING_MEMBER        0x04
  2336. +#define IGMP_AWAKENING_MEMBER        0x05
  2337. +
  2338. +#define IGMP_OLD_ROUTER            0x00
  2339. +#define IGMP_NEW_ROUTER            0x01
  2340.  
  2341.  
  2342. -#define IGMP_HOST_MEMBERSHIP_QUERY    0x11    /* From RFC1112 */
  2343. -#define IGMP_HOST_MEMBERSHIP_REPORT    0x12    /* Ditto */
  2344. -#define IGMP_HOST_LEAVE_MESSAGE        0x17    /* An extra BSD seems to send */
  2345.  
  2346. -                /* 224.0.0.1 */
  2347.  #define IGMP_ALL_HOSTS        htonl(0xE0000001L)
  2348.  
  2349.  /*
  2350. diff -u --recursive --new-file v1.3.23/linux/include/linux/mm.h linux/include/linux/mm.h
  2351. --- v1.3.23/linux/include/linux/mm.h    Mon Aug 28 14:52:23 1995
  2352. +++ linux/include/linux/mm.h    Tue Sep  5 10:14:01 1995
  2353. @@ -33,7 +33,7 @@
  2354.   * library, the executable area etc).
  2355.   */
  2356.  struct vm_area_struct {
  2357. -    struct task_struct * vm_task;        /* VM area parameters */
  2358. +    struct mm_struct * vm_mm;    /* VM area parameters */
  2359.      unsigned long vm_start;
  2360.      unsigned long vm_end;
  2361.      pgprot_t vm_page_prot;
  2362. @@ -181,8 +181,8 @@
  2363.  extern int zeromap_page_range(unsigned long from, unsigned long size, pgprot_t prot);
  2364.  
  2365.  extern void handle_mm_fault(struct vm_area_struct *vma, unsigned long address, int write_access);
  2366. -extern void do_wp_page(struct vm_area_struct * vma, unsigned long address, int write_access);
  2367. -extern void do_no_page(struct vm_area_struct * vma, unsigned long address, int write_access);
  2368. +extern void do_wp_page(struct task_struct * tsk, struct vm_area_struct * vma, unsigned long address, int write_access);
  2369. +extern void do_no_page(struct task_struct * tsk, struct vm_area_struct * vma, unsigned long address, int write_access);
  2370.  
  2371.  extern unsigned long paging_init(unsigned long start_mem, unsigned long end_mem);
  2372.  extern void mem_init(unsigned long start_mem, unsigned long end_mem);
  2373. @@ -201,7 +201,7 @@
  2374.  
  2375.  extern void swap_free(unsigned long);
  2376.  extern void swap_duplicate(unsigned long);
  2377. -extern void swap_in(struct vm_area_struct *, pte_t *, unsigned long id, int write_access);
  2378. +extern void swap_in(struct task_struct *, struct vm_area_struct *, pte_t *, unsigned long id, int write_access);
  2379.  
  2380.  extern void si_swapinfo(struct sysinfo * val);
  2381.  extern void rw_swap_page(int rw, unsigned long nr, char * buf);
  2382. @@ -214,8 +214,8 @@
  2383.  extern void merge_segments(struct task_struct *, unsigned long, unsigned long);
  2384.  extern void insert_vm_struct(struct task_struct *, struct vm_area_struct *);
  2385.  extern void remove_shared_vm_struct(struct vm_area_struct *);
  2386. -extern void build_mmap_avl(struct task_struct *);
  2387. -extern void exit_mmap(struct task_struct *);
  2388. +extern void build_mmap_avl(struct mm_struct *);
  2389. +extern void exit_mmap(struct mm_struct *);
  2390.  extern int do_munmap(unsigned long, size_t);
  2391.  extern unsigned long get_unmapped_area(unsigned long, unsigned long);
  2392.  
  2393. diff -u --recursive --new-file v1.3.23/linux/include/linux/pci.h linux/include/linux/pci.h
  2394. --- v1.3.23/linux/include/linux/pci.h    Sun Sep  3 12:27:03 1995
  2395. +++ linux/include/linux/pci.h    Mon Sep  4 15:12:50 1995
  2396. @@ -132,7 +132,7 @@
  2397.  #define PCI_CLASS_STORAGE_IDE        0x0101
  2398.  #define PCI_CLASS_STORAGE_FLOPPY    0x0102
  2399.  #define PCI_CLASS_STORAGE_IPI        0x0103
  2400. -#define PCI_CLASS_STORAGE_RAID        0x0104 
  2401. +#define PCI_CLASS_STORAGE_RAID        0x0104
  2402.  #define PCI_CLASS_STORAGE_OTHER        0x0180
  2403.  
  2404.  #define PCI_BASE_CLASS_NETWORK        0x02
  2405. diff -u --recursive --new-file v1.3.23/linux/include/linux/sched.h linux/include/linux/sched.h
  2406. --- v1.3.23/linux/include/linux/sched.h    Sun Sep  3 12:27:03 1995
  2407. +++ linux/include/linux/sched.h    Mon Sep  4 13:02:29 1995
  2408. @@ -19,6 +19,7 @@
  2409.  #include <linux/tasks.h>
  2410.  #include <linux/kernel.h>
  2411.  #include <asm/system.h>
  2412. +#include <asm/page.h>
  2413.  
  2414.  /*
  2415.   * These are the constant used to fake the fixed-point load-average
  2416. @@ -114,6 +115,7 @@
  2417.  
  2418.  struct mm_struct {
  2419.      int count;
  2420. +    pgd_t * pgd;
  2421.      unsigned long start_code, end_code, start_data, end_data;
  2422.      unsigned long start_brk, brk, start_stack, start_mmap;
  2423.      unsigned long arg_start, arg_end, env_start, env_end;
  2424. @@ -130,6 +132,7 @@
  2425.  
  2426.  #define INIT_MM { \
  2427.          1, \
  2428. +        swapper_pg_dir, \
  2429.          0, 0, 0, 0, \
  2430.          0, 0, 0, 0, \
  2431.          0, 0, 0, 0, \
  2432. @@ -261,6 +264,7 @@
  2433.  
  2434.  #ifdef __KERNEL__
  2435.  
  2436. +extern struct   mm_struct init_mm;
  2437.  extern struct task_struct init_task;
  2438.  extern struct task_struct *task[NR_TASKS];
  2439.  extern struct task_struct *last_task_used_math;
  2440. diff -u --recursive --new-file v1.3.23/linux/include/net/sock.h linux/include/net/sock.h
  2441. --- v1.3.23/linux/include/net/sock.h    Sun Sep  3 12:27:03 1995
  2442. +++ linux/include/net/sock.h    Tue Sep  5 14:16:35 1995
  2443. @@ -352,6 +352,7 @@
  2444.                          int *optlen);
  2445.  extern struct sk_buff         *sock_alloc_send_skb(struct sock *skb,
  2446.                               unsigned long size,
  2447. +                             unsigned long fallback,
  2448.                               int noblock,
  2449.                               int *errcode);
  2450.  
  2451. diff -u --recursive --new-file v1.3.23/linux/ipc/shm.c linux/ipc/shm.c
  2452. --- v1.3.23/linux/ipc/shm.c    Sun Sep  3 12:27:03 1995
  2453. +++ linux/ipc/shm.c    Mon Sep  4 13:31:26 1995
  2454. @@ -393,8 +393,8 @@
  2455.          if (shp->attaches != shmd) {
  2456.              printk("shm_close: shm segment (id=%ld) attach list inconsistent\n",
  2457.                     SWP_OFFSET(shmd->vm_pte) & SHM_ID_MASK);
  2458. -            printk("shm_close: %d %08lx-%08lx %c%c%c%c %08lx %08lx\n",
  2459. -                shmd->vm_task->pid, shmd->vm_start, shmd->vm_end,
  2460. +            printk("shm_close: %08lx-%08lx %c%c%c%c %08lx %08lx\n",
  2461. +                shmd->vm_start, shmd->vm_end,
  2462.                  shmd->vm_flags & VM_READ ? 'r' : '-',
  2463.                  shmd->vm_flags & VM_WRITE ? 'w' : '-',
  2464.                  shmd->vm_flags & VM_EXEC ? 'x' : '-',
  2465. @@ -435,7 +435,7 @@
  2466.           tmp < shmd->vm_end;
  2467.           tmp += PAGE_SIZE, shm_sgn += SWP_ENTRY(0, 1 << SHM_IDX_SHIFT))
  2468.      {
  2469. -        page_dir = pgd_offset(shmd->vm_task,tmp);
  2470. +        page_dir = pgd_offset(shmd->vm_mm,tmp);
  2471.          page_middle = pmd_alloc(page_dir,tmp);
  2472.          if (!page_middle)
  2473.              return -ENOMEM;
  2474. @@ -514,7 +514,7 @@
  2475.      shmd->vm_pte = SWP_ENTRY(SHM_SWP_TYPE, id);
  2476.      shmd->vm_start = addr;
  2477.      shmd->vm_end = addr + shp->shm_npages * PAGE_SIZE;
  2478. -    shmd->vm_task = current;
  2479. +    shmd->vm_mm = current->mm;
  2480.      shmd->vm_page_prot = (shmflg & SHM_RDONLY) ? PAGE_READONLY : PAGE_SHARED;
  2481.      shmd->vm_flags = VM_SHM | VM_MAYSHARE | VM_SHARED
  2482.               | VM_MAYREAD | VM_MAYEXEC | VM_READ | VM_EXEC
  2483. @@ -738,7 +738,7 @@
  2484.          tmp = shmd->vm_start + (idx << PAGE_SHIFT) - shmd->vm_offset;
  2485.          if (!(tmp >= shmd->vm_start && tmp < shmd->vm_end))
  2486.              continue;
  2487. -        page_dir = pgd_offset(shmd->vm_task,tmp);
  2488. +        page_dir = pgd_offset(shmd->vm_mm,tmp);
  2489.          if (pgd_none(*page_dir) || pgd_bad(*page_dir)) {
  2490.              printk("shm_swap: bad pgtbl! id=%ld start=%lx idx=%ld\n",
  2491.                      id, shmd->vm_start, idx);
  2492. @@ -765,8 +765,8 @@
  2493.          set_pte(page_table,
  2494.            __pte(shmd->vm_pte + SWP_ENTRY(0, idx << SHM_IDX_SHIFT)));
  2495.          mem_map[MAP_NR(pte_page(pte))]--;
  2496. -        if (shmd->vm_task->mm->rss > 0)
  2497. -            shmd->vm_task->mm->rss--;
  2498. +        if (shmd->vm_mm->rss > 0)
  2499. +            shmd->vm_mm->rss--;
  2500.          invalid++;
  2501.          /* continue looping through circular list */
  2502.          } while (0);
  2503. diff -u --recursive --new-file v1.3.23/linux/kernel/exit.c linux/kernel/exit.c
  2504. --- v1.3.23/linux/kernel/exit.c    Sun Sep  3 12:27:03 1995
  2505. +++ linux/kernel/exit.c    Tue Sep  5 10:19:16 1995
  2506. @@ -97,6 +97,10 @@
  2507.              if (STACK_MAGIC != *(unsigned long *)p->kernel_stack_page)
  2508.                  printk(KERN_ALERT "release: %s kernel stack corruption. Aiee\n", p->comm);
  2509.              free_page(p->kernel_stack_page);
  2510. +            free_page((long) p->mm);
  2511. +            free_page((long) p->files);
  2512. +            free_page((long) p->fs);
  2513. +            free_page((long) p->sigaction);
  2514.              free_page((long) p);
  2515.              return;
  2516.          }
  2517. @@ -363,7 +367,6 @@
  2518.              if (current->files->fd[i])
  2519.                  sys_close(i);
  2520.      }
  2521. -    free_page((long) current->files);
  2522.  }
  2523.  
  2524.  static void exit_fs(void)
  2525. @@ -374,20 +377,15 @@
  2526.          iput(current->fs->root);
  2527.          current->fs->root = NULL;
  2528.      }
  2529. -    free_page((long) current->fs);
  2530.  }
  2531.  
  2532.  static void exit_mm(void)
  2533.  {
  2534. -    if (!--current->mm->count)
  2535. -        exit_mmap(current);
  2536. +    if (!--current->mm->count) {
  2537. +        current->mm->rss = 0;
  2538. +        exit_mmap(current->mm);
  2539. +    }
  2540.      free_page_tables(current);
  2541. -    free_page((long) current->mm);
  2542. -}
  2543. -
  2544. -static void exit_signal(void)
  2545. -{
  2546. -    free_page((long) current->sigaction);
  2547.  }
  2548.  
  2549.  NORET_TYPE void do_exit(long code)
  2550. @@ -405,7 +403,6 @@
  2551.      exit_mm();
  2552.      exit_files();
  2553.      exit_fs();
  2554. -    exit_signal();
  2555.      exit_thread();
  2556.      forget_original_parent(current);
  2557.      /* 
  2558. @@ -468,7 +465,6 @@
  2559.          last_task_used_math = NULL;
  2560.      current->state = TASK_ZOMBIE;
  2561.      current->exit_code = code;
  2562. -    current->mm->rss = 0;
  2563.  #ifdef DEBUG_PROC_TREE
  2564.      audit_ptree();
  2565.  #endif
  2566. diff -u --recursive --new-file v1.3.23/linux/kernel/fork.c linux/kernel/fork.c
  2567. --- v1.3.23/linux/kernel/fork.c    Sun Sep  3 12:27:03 1995
  2568. +++ linux/kernel/fork.c    Tue Sep  5 10:30:29 1995
  2569. @@ -79,20 +79,20 @@
  2570.      return free_task;
  2571.  }
  2572.  
  2573. -static int dup_mmap(struct task_struct * tsk)
  2574. +static int dup_mmap(struct mm_struct * mm)
  2575.  {
  2576.      struct vm_area_struct * mpnt, **p, *tmp;
  2577.  
  2578. -    tsk->mm->mmap = NULL;
  2579. -    p = &tsk->mm->mmap;
  2580. +    mm->mmap = NULL;
  2581. +    p = &mm->mmap;
  2582.      for (mpnt = current->mm->mmap ; mpnt ; mpnt = mpnt->vm_next) {
  2583.          tmp = (struct vm_area_struct *) kmalloc(sizeof(struct vm_area_struct), GFP_KERNEL);
  2584.          if (!tmp) {
  2585. -            exit_mmap(tsk);
  2586. +            exit_mmap(mm);
  2587.              return -ENOMEM;
  2588.          }
  2589.          *tmp = *mpnt;
  2590. -        tmp->vm_task = tsk;
  2591. +        tmp->vm_mm = mm;
  2592.          tmp->vm_next = NULL;
  2593.          if (tmp->vm_inode) {
  2594.              tmp->vm_inode->i_count++;
  2595. @@ -106,7 +106,7 @@
  2596.          *p = tmp;
  2597.          p = &tmp->vm_next;
  2598.      }
  2599. -    build_mmap_avl(tsk);
  2600. +    build_mmap_avl(mm);
  2601.      return 0;
  2602.  }
  2603.  
  2604. @@ -126,7 +126,7 @@
  2605.      u->mm.cmin_flt = u->mm.cmaj_flt = 0;
  2606.      if (copy_page_tables(&u->tsk))
  2607.          return -1;
  2608. -    if (dup_mmap(&u->tsk))
  2609. +    if (dup_mmap(&u->mm))
  2610.          return -1;
  2611.      mem_map[MAP_NR(u)]++;
  2612.      return 0;
  2613. diff -u --recursive --new-file v1.3.23/linux/kernel/sched.c linux/kernel/sched.c
  2614. --- v1.3.23/linux/kernel/sched.c    Sun Sep  3 12:27:03 1995
  2615. +++ linux/kernel/sched.c    Mon Sep  4 13:01:49 1995
  2616. @@ -81,10 +81,11 @@
  2617.  static unsigned long init_kernel_stack[1024] = { STACK_MAGIC, };
  2618.  unsigned long init_user_stack[1024] = { STACK_MAGIC, };
  2619.  static struct vm_area_struct init_mmap = INIT_MMAP;
  2620. -static struct mm_struct init_mm = INIT_MM;
  2621.  static struct fs_struct init_fs = INIT_FS;
  2622.  static struct files_struct init_files = INIT_FILES;
  2623.  static struct sigaction init_sigaction[32] = { {0,}, };
  2624. +
  2625. +struct mm_struct init_mm = INIT_MM;
  2626.  struct task_struct init_task = INIT_TASK;
  2627.  
  2628.  unsigned long volatile jiffies=0;
  2629. diff -u --recursive --new-file v1.3.23/linux/mm/filemap.c linux/mm/filemap.c
  2630. --- v1.3.23/linux/mm/filemap.c    Sun Sep  3 12:27:04 1995
  2631. +++ linux/mm/filemap.c    Mon Sep  4 12:30:08 1995
  2632. @@ -260,7 +260,7 @@
  2633.      unsigned long end = address + size;
  2634.      int error = 0;
  2635.  
  2636. -    dir = pgd_offset(current, address);
  2637. +    dir = pgd_offset(current->mm, address);
  2638.      while (address < end) {
  2639.          error |= filemap_sync_pmd_range(dir, address, end - address, vma, flags);
  2640.          address = (address + PGDIR_SIZE) & PGDIR_MASK;
  2641. diff -u --recursive --new-file v1.3.23/linux/mm/kmalloc.c linux/mm/kmalloc.c
  2642. --- v1.3.23/linux/mm/kmalloc.c    Sun Sep  3 12:27:04 1995
  2643. +++ linux/mm/kmalloc.c    Tue Sep  5 12:28:14 1995
  2644. @@ -10,6 +10,8 @@
  2645.  /*
  2646.   * Modified by Alex Bligh (alex@cconcepts.co.uk) 4 Apr 1994 to use multiple
  2647.   * pages. So for 'page' throughout, read 'area'.
  2648. + *
  2649. + * Largely rewritten.. Linus
  2650.   */
  2651.  
  2652.  #include <linux/mm.h>
  2653. @@ -17,17 +19,6 @@
  2654.  #include <asm/system.h>
  2655.  #include <asm/dma.h>
  2656.  
  2657. -/* I want this low enough for a while to catch errors.
  2658. -   I want this number to be increased in the near future:
  2659. -        loadable device drivers should use this function to get memory */
  2660. -
  2661. -#define MAX_KMALLOC_K ((PAGE_SIZE<<(NUM_AREA_ORDERS-1))>>10)
  2662. -
  2663. -
  2664. -/* This defines how many times we should try to allocate a free page before
  2665. -   giving up. Normally this shouldn't happen at all. */
  2666. -#define MAX_GET_FREE_PAGE_TRIES 4
  2667. -
  2668.  
  2669.  /* Private flags. */
  2670.  
  2671. @@ -229,17 +220,18 @@
  2672.      }
  2673.  
  2674.      /* We need to get a new free page..... */
  2675. +    /* This can be done with ints on: This is private to this invocation */
  2676. +    restore_flags(flags);
  2677.  
  2678.      /* sz is the size of the blocks we're dealing with */
  2679.      sz = BLOCKSIZE(order);
  2680.  
  2681. -    /* This can be done with ints on: This is private to this invocation */
  2682. -    page = (struct page_descriptor *) __get_free_pages(priority & GFP_LEVEL_MASK,
  2683. +    page = (struct page_descriptor *) __get_free_pages(priority,
  2684.              sizes[order].gfporder, max_addr);
  2685.  
  2686.      if (!page) {
  2687.          static unsigned long last = 0;
  2688. -        if (last + 10 * HZ < jiffies) {
  2689. +        if (priority != GFP_BUFFER && (last + 10 * HZ < jiffies)) {
  2690.              last = jiffies;
  2691.              printk("Couldn't get a free page.....\n");
  2692.          }
  2693. diff -u --recursive --new-file v1.3.23/linux/mm/memory.c linux/mm/memory.c
  2694. --- v1.3.23/linux/mm/memory.c    Sun Sep  3 12:27:04 1995
  2695. +++ linux/mm/memory.c    Mon Sep  4 12:22:45 1995
  2696. @@ -154,7 +154,7 @@
  2697.          return;
  2698.      if (tsk == task[0])
  2699.          panic("task[0] (swapper) doesn't support exec()\n");
  2700. -    page_dir = pgd_offset(tsk, 0);
  2701. +    page_dir = pgd_offset(tsk->mm, 0);
  2702.      if (!page_dir || page_dir == swapper_pg_dir) {
  2703.          printk("%s trying to clear kernel page-directory: not good\n", tsk->comm);
  2704.          return;
  2705. @@ -169,6 +169,7 @@
  2706.          for (i = USER_PTRS_PER_PGD ; i < PTRS_PER_PGD ; i++)
  2707.              new_pg[i] = page_dir[i];
  2708.          SET_PAGE_DIR(tsk, new_pg);
  2709. +        tsk->mm->pgd = new_pg;
  2710.          pgd_free(page_dir);
  2711.          return;
  2712.      }
  2713. @@ -192,12 +193,13 @@
  2714.          printk("task[0] (swapper) killed: unable to recover\n");
  2715.          panic("Trying to free up swapper memory space");
  2716.      }
  2717. -    page_dir = pgd_offset(tsk, 0);
  2718. +    page_dir = pgd_offset(tsk->mm, 0);
  2719.      if (!page_dir || page_dir == swapper_pg_dir) {
  2720.          printk("%s trying to free kernel page-directory: not good\n", tsk->comm);
  2721.          return;
  2722.      }
  2723.      SET_PAGE_DIR(tsk, swapper_pg_dir);
  2724. +    tsk->mm->pgd = swapper_pg_dir;
  2725.      if (pgd_inuse(page_dir)) {
  2726.          pgd_free(page_dir);
  2727.          return;
  2728. @@ -218,9 +220,10 @@
  2729.  {
  2730.      pgd_t * pg_dir;
  2731.  
  2732. -    pg_dir = pgd_offset(current, 0);
  2733. +    pg_dir = pgd_offset(current->mm, 0);
  2734.      pgd_reuse(pg_dir);
  2735.      SET_PAGE_DIR(tsk, pg_dir);
  2736. +    tsk->mm->pgd = pg_dir;
  2737.      return 0;
  2738.  }
  2739.  
  2740. @@ -323,7 +326,8 @@
  2741.      if (!new_pgd)
  2742.          return -ENOMEM;
  2743.      SET_PAGE_DIR(tsk, new_pgd);
  2744. -    old_pgd = pgd_offset(current, 0);
  2745. +    tsk->mm->pgd = new_pgd;
  2746. +    old_pgd = pgd_offset(current->mm, 0);
  2747.      for (i = 0 ; i < PTRS_PER_PGD ; i++) {
  2748.          int errno = copy_one_pgd(old_pgd, new_pgd);
  2749.          if (errno) {
  2750. @@ -413,7 +417,7 @@
  2751.      pgd_t * dir;
  2752.      unsigned long end = address + size;
  2753.  
  2754. -    dir = pgd_offset(current, address);
  2755. +    dir = pgd_offset(current->mm, address);
  2756.      while (address < end) {
  2757.          unmap_pmd_range(dir, address, end - address);
  2758.          address = (address + PGDIR_SIZE) & PGDIR_MASK;
  2759. @@ -467,7 +471,7 @@
  2760.      pte_t zero_pte;
  2761.  
  2762.      zero_pte = pte_wrprotect(mk_pte(ZERO_PAGE, prot));
  2763. -    dir = pgd_offset(current, address);
  2764. +    dir = pgd_offset(current->mm, address);
  2765.      while (address < end) {
  2766.          pmd_t *pmd = pmd_alloc(dir, address);
  2767.          error = -ENOMEM;
  2768. @@ -537,7 +541,7 @@
  2769.      unsigned long end = from + size;
  2770.  
  2771.      offset -= from;
  2772. -    dir = pgd_offset(current, from);
  2773. +    dir = pgd_offset(current->mm, from);
  2774.      while (from < end) {
  2775.          pmd_t *pmd = pmd_alloc(dir, from);
  2776.          error = -ENOMEM;
  2777. @@ -581,7 +585,7 @@
  2778.          printk("put_dirty_page: trying to put page %08lx at %08lx\n",page,address);
  2779.      if (mem_map[MAP_NR(page)] != 1)
  2780.          printk("mem_map disagrees with %08lx at %08lx\n",page,address);
  2781. -    pgd = pgd_offset(tsk,address);
  2782. +    pgd = pgd_offset(tsk->mm,address);
  2783.      pmd = pmd_alloc(pgd, address);
  2784.      if (!pmd) {
  2785.          free_page(page);
  2786. @@ -621,8 +625,8 @@
  2787.   * change only once the write actually happens. This avoids a few races,
  2788.   * and potentially makes it more efficient.
  2789.   */
  2790. -void do_wp_page(struct vm_area_struct * vma, unsigned long address,
  2791. -    int write_access)
  2792. +void do_wp_page(struct task_struct * tsk, struct vm_area_struct * vma,
  2793. +    unsigned long address, int write_access)
  2794.  {
  2795.      pgd_t *page_dir;
  2796.      pmd_t *page_middle;
  2797. @@ -630,7 +634,7 @@
  2798.      unsigned long old_page, new_page;
  2799.  
  2800.      new_page = __get_free_page(GFP_KERNEL);
  2801. -    page_dir = pgd_offset(vma->vm_task,address);
  2802. +    page_dir = pgd_offset(vma->vm_mm, address);
  2803.      if (pgd_none(*page_dir))
  2804.          goto end_wp_page;
  2805.      if (pgd_bad(*page_dir))
  2806. @@ -649,14 +653,14 @@
  2807.      old_page = pte_page(pte);
  2808.      if (old_page >= high_memory)
  2809.          goto bad_wp_page;
  2810. -    vma->vm_task->mm->min_flt++;
  2811. +    vma->vm_mm->min_flt++;
  2812.      /*
  2813.       * Do we need to copy?
  2814.       */
  2815.      if (mem_map[MAP_NR(old_page)] != 1) {
  2816.          if (new_page) {
  2817.              if (mem_map[MAP_NR(old_page)] & MAP_PAGE_RESERVED)
  2818. -                ++vma->vm_task->mm->rss;
  2819. +                ++vma->vm_mm->rss;
  2820.              copy_page(old_page,new_page);
  2821.              set_pte(page_table, pte_mkwrite(pte_mkdirty(mk_pte(new_page, vma->vm_page_prot))));
  2822.              free_page(old_page);
  2823. @@ -665,7 +669,7 @@
  2824.          }
  2825.          set_pte(page_table, BAD_PAGE);
  2826.          free_page(old_page);
  2827. -        oom(vma->vm_task);
  2828. +        oom(tsk);
  2829.          invalidate();
  2830.          return;
  2831.      }
  2832. @@ -676,15 +680,15 @@
  2833.      return;
  2834.  bad_wp_page:
  2835.      printk("do_wp_page: bogus page at address %08lx (%08lx)\n",address,old_page);
  2836. -    send_sig(SIGKILL, vma->vm_task, 1);
  2837. +    send_sig(SIGKILL, tsk, 1);
  2838.      goto end_wp_page;
  2839.  bad_wp_pagemiddle:
  2840.      printk("do_wp_page: bogus page-middle at address %08lx (%08lx)\n", address, pmd_val(*page_middle));
  2841. -    send_sig(SIGKILL, vma->vm_task, 1);
  2842. +    send_sig(SIGKILL, tsk, 1);
  2843.      goto end_wp_page;
  2844.  bad_wp_pagedir:
  2845.      printk("do_wp_page: bogus page-dir entry at address %08lx (%08lx)\n", address, pgd_val(*page_dir));
  2846. -    send_sig(SIGKILL, vma->vm_task, 1);
  2847. +    send_sig(SIGKILL, tsk, 1);
  2848.  end_wp_page:
  2849.      if (new_page)
  2850.          free_page(new_page);
  2851. @@ -754,7 +758,7 @@
  2852.      start &= PAGE_MASK;
  2853.  
  2854.      for (;;) {
  2855. -        do_wp_page(vma, start, 1);
  2856. +        do_wp_page(current, vma, start, 1);
  2857.          if (!size)
  2858.              break;
  2859.          size--;
  2860. @@ -773,12 +777,12 @@
  2861.      return -EFAULT;
  2862.  }
  2863.  
  2864. -static inline void get_empty_page(struct vm_area_struct * vma, pte_t * page_table)
  2865. +static inline void get_empty_page(struct task_struct * tsk, struct vm_area_struct * vma, pte_t * page_table)
  2866.  {
  2867.      unsigned long tmp;
  2868.  
  2869.      if (!(tmp = get_free_page(GFP_KERNEL))) {
  2870. -        oom(vma->vm_task);
  2871. +        oom(tsk);
  2872.          put_page(page_table, BAD_PAGE);
  2873.          return;
  2874.      }
  2875. @@ -802,7 +806,7 @@
  2876.      pte_t * from_table, * to_table;
  2877.      pte_t from, to;
  2878.  
  2879. -    from_dir = pgd_offset(from_area->vm_task,from_address);
  2880. +    from_dir = pgd_offset(from_area->vm_mm,from_address);
  2881.  /* is there a page-directory at from? */
  2882.      if (pgd_none(*from_dir))
  2883.          return 0;
  2884. @@ -836,7 +840,7 @@
  2885.      if (mem_map[MAP_NR(pte_page(from))] & MAP_PAGE_RESERVED)
  2886.          return 0;
  2887.  /* is the destination ok? */
  2888. -    to_dir = pgd_offset(to_area->vm_task,to_address);
  2889. +    to_dir = pgd_offset(to_area->vm_mm,to_address);
  2890.  /* is there a page-directory at to? */
  2891.      if (pgd_none(*to_dir))
  2892.          return 0;
  2893. @@ -958,7 +962,7 @@
  2894.      pmd_t *pmd;
  2895.      pte_t *pte;
  2896.  
  2897. -    pgd = pgd_offset(tsk, address);
  2898. +    pgd = pgd_offset(tsk->mm, address);
  2899.      pmd = pmd_alloc(pgd, address);
  2900.      if (!pmd) {
  2901.          oom(tsk);
  2902. @@ -972,13 +976,14 @@
  2903.      return pte;
  2904.  }
  2905.  
  2906. -static inline void do_swap_page(struct vm_area_struct * vma, unsigned long address,
  2907. +static inline void do_swap_page(struct task_struct * tsk, 
  2908. +    struct vm_area_struct * vma, unsigned long address,
  2909.      pte_t * page_table, pte_t entry, int write_access)
  2910.  {
  2911.      pte_t page;
  2912.  
  2913.      if (!vma->vm_ops || !vma->vm_ops->swapin) {
  2914. -        swap_in(vma, page_table, pte_val(entry), write_access);
  2915. +        swap_in(tsk, vma, page_table, pte_val(entry), write_access);
  2916.          return;
  2917.      }
  2918.      page = vma->vm_ops->swapin(vma, address - vma->vm_start + vma->vm_offset, pte_val(entry));
  2919. @@ -988,8 +993,8 @@
  2920.      }
  2921.      if (mem_map[MAP_NR(pte_page(page))] > 1 && !(vma->vm_flags & VM_SHARED))
  2922.          page = pte_wrprotect(page);
  2923. -    ++vma->vm_task->mm->rss;
  2924. -    ++vma->vm_task->mm->maj_flt;
  2925. +    ++vma->vm_mm->rss;
  2926. +    ++vma->vm_mm->maj_flt;
  2927.      set_pte(page_table, page);
  2928.      return;
  2929.  }
  2930. @@ -1000,43 +1005,43 @@
  2931.   * the "write_access" parameter is true in order to avoid the next
  2932.   * page fault.
  2933.   */
  2934. -void do_no_page(struct vm_area_struct * vma, unsigned long address,
  2935. -    int write_access)
  2936. +void do_no_page(struct task_struct * tsk, struct vm_area_struct * vma,
  2937. +    unsigned long address, int write_access)
  2938.  {
  2939.      pte_t * page_table;
  2940.      pte_t entry;
  2941.      unsigned long page;
  2942.  
  2943. -    page_table = get_empty_pgtable(vma->vm_task,address);
  2944. +    page_table = get_empty_pgtable(tsk, address);
  2945.      if (!page_table)
  2946.          return;
  2947.      entry = *page_table;
  2948.      if (pte_present(entry))
  2949.          return;
  2950.      if (!pte_none(entry)) {
  2951. -        do_swap_page(vma, address, page_table, entry, write_access);
  2952. +        do_swap_page(tsk, vma, address, page_table, entry, write_access);
  2953.          return;
  2954.      }
  2955.      address &= PAGE_MASK;
  2956.      if (!vma->vm_ops || !vma->vm_ops->nopage) {
  2957. -        ++vma->vm_task->mm->rss;
  2958. -        ++vma->vm_task->mm->min_flt;
  2959. -        get_empty_page(vma, page_table);
  2960. +        ++vma->vm_mm->rss;
  2961. +        ++vma->vm_mm->min_flt;
  2962. +        get_empty_page(tsk, vma, page_table);
  2963.          return;
  2964.      }
  2965.      page = __get_free_page(GFP_KERNEL);
  2966.      if (share_page(vma, address, write_access, page)) {
  2967. -        ++vma->vm_task->mm->min_flt;
  2968. -        ++vma->vm_task->mm->rss;
  2969. +        ++vma->vm_mm->min_flt;
  2970. +        ++vma->vm_mm->rss;
  2971.          return;
  2972.      }
  2973.      if (!page) {
  2974. -        oom(current);
  2975. +        oom(tsk);
  2976.          put_page(page_table, BAD_PAGE);
  2977.          return;
  2978.      }
  2979. -    ++vma->vm_task->mm->maj_flt;
  2980. -    ++vma->vm_task->mm->rss;
  2981. +    ++vma->vm_mm->maj_flt;
  2982. +    ++vma->vm_mm->rss;
  2983.      /*
  2984.       * The fourth argument is "no_share", which tells the low-level code
  2985.       * to copy, not share the page even if sharing is possible.  It's
  2986. @@ -1083,7 +1088,7 @@
  2987.      int write_access, pte_t * pte)
  2988.  {
  2989.      if (!pte_present(*pte)) {
  2990. -        do_no_page(vma, address, write_access);
  2991. +        do_no_page(current, vma, address, write_access);
  2992.          return;
  2993.      }
  2994.      set_pte(pte, pte_mkyoung(*pte));
  2995. @@ -1093,7 +1098,7 @@
  2996.          set_pte(pte, pte_mkdirty(*pte));
  2997.          return;
  2998.      }
  2999. -    do_wp_page(vma, address, write_access);
  3000. +    do_wp_page(current, vma, address, write_access);
  3001.  }
  3002.  
  3003.  void handle_mm_fault(struct vm_area_struct * vma, unsigned long address,
  3004. @@ -1103,7 +1108,7 @@
  3005.      pmd_t *pmd;
  3006.      pte_t *pte;
  3007.  
  3008. -    pgd = pgd_offset(vma->vm_task, address);
  3009. +    pgd = pgd_offset(vma->vm_mm, address);
  3010.      pmd = pmd_alloc(pgd, address);
  3011.      if (!pmd)
  3012.          goto no_memory;
  3013. @@ -1114,5 +1119,5 @@
  3014.      update_mmu_cache(vma, address, *pte);
  3015.      return;
  3016.  no_memory:
  3017. -    oom(vma->vm_task);
  3018. +    oom(current);
  3019.  }
  3020. diff -u --recursive --new-file v1.3.23/linux/mm/mmap.c linux/mm/mmap.c
  3021. --- v1.3.23/linux/mm/mmap.c    Tue Jun 27 14:11:47 1995
  3022. +++ linux/mm/mmap.c    Tue Sep  5 10:13:32 1995
  3023. @@ -77,8 +77,10 @@
  3024.          default:
  3025.              return -EINVAL;
  3026.          }
  3027. -        if ((flags & MAP_DENYWRITE) && (file->f_inode->i_wcount > 0))
  3028. -            return -ETXTBSY;
  3029. +        if (flags & MAP_DENYWRITE) {
  3030. +            if (file->f_inode->i_wcount > 0)
  3031. +                return -ETXTBSY;
  3032. +        }
  3033.      } else if ((flags & MAP_TYPE) != MAP_PRIVATE)
  3034.          return -EINVAL;
  3035.  
  3036. @@ -111,7 +113,7 @@
  3037.      if (!vma)
  3038.          return -ENOMEM;
  3039.  
  3040. -    vma->vm_task = current;
  3041. +    vma->vm_mm = current->mm;
  3042.      vma->vm_start = addr;
  3043.      vma->vm_end = addr + len;
  3044.      vma->vm_flags = prot & (VM_READ | VM_WRITE | VM_EXEC);
  3045. @@ -772,23 +774,23 @@
  3046.  }
  3047.  
  3048.  /* Build the AVL tree corresponding to the VMA list. */
  3049. -void build_mmap_avl(struct task_struct * task)
  3050. +void build_mmap_avl(struct mm_struct * mm)
  3051.  {
  3052.      struct vm_area_struct * vma;
  3053.  
  3054. -    task->mm->mmap_avl = NULL;
  3055. -    for (vma = task->mm->mmap; vma; vma = vma->vm_next)
  3056. -        avl_insert(vma, &task->mm->mmap_avl);
  3057. +    mm->mmap_avl = NULL;
  3058. +    for (vma = mm->mmap; vma; vma = vma->vm_next)
  3059. +        avl_insert(vma, &mm->mmap_avl);
  3060.  }
  3061.  
  3062.  /* Release all mmaps. */
  3063. -void exit_mmap(struct task_struct * task)
  3064. +void exit_mmap(struct mm_struct * mm)
  3065.  {
  3066.      struct vm_area_struct * mpnt;
  3067.  
  3068. -    mpnt = task->mm->mmap;
  3069. -    task->mm->mmap = NULL;
  3070. -    task->mm->mmap_avl = NULL;
  3071. +    mpnt = mm->mmap;
  3072. +    mm->mmap = NULL;
  3073. +    mm->mmap_avl = NULL;
  3074.      while (mpnt) {
  3075.          struct vm_area_struct * next = mpnt->vm_next;
  3076.          if (mpnt->vm_ops && mpnt->vm_ops->close)
  3077. diff -u --recursive --new-file v1.3.23/linux/mm/mprotect.c linux/mm/mprotect.c
  3078. --- v1.3.23/linux/mm/mprotect.c    Sun Sep  3 12:27:04 1995
  3079. +++ linux/mm/mprotect.c    Mon Sep  4 12:30:19 1995
  3080. @@ -73,7 +73,7 @@
  3081.  {
  3082.      pgd_t *dir;
  3083.  
  3084. -    dir = pgd_offset(current, start);
  3085. +    dir = pgd_offset(current->mm, start);
  3086.      while (start < end) {
  3087.          change_pmd_range(dir, start, end - start, newprot);
  3088.          start = (start + PGDIR_SIZE) & PGDIR_MASK;
  3089. diff -u --recursive --new-file v1.3.23/linux/mm/swap.c linux/mm/swap.c
  3090. --- v1.3.23/linux/mm/swap.c    Sun Sep  3 12:27:04 1995
  3091. +++ linux/mm/swap.c    Mon Sep  4 12:29:42 1995
  3092. @@ -310,8 +310,8 @@
  3093.   * Also, don't bother to add to the swap cache if this page-in
  3094.   * was due to a write access.
  3095.   */
  3096. -void swap_in(struct vm_area_struct * vma, pte_t * page_table,
  3097. -    unsigned long entry, int write_access)
  3098. +void swap_in(struct task_struct * tsk, struct vm_area_struct * vma,
  3099. +    pte_t * page_table, unsigned long entry, int write_access)
  3100.  {
  3101.      unsigned long page = __get_free_page(GFP_KERNEL);
  3102.  
  3103. @@ -322,7 +322,7 @@
  3104.      if (!page) {
  3105.          set_pte(page_table, BAD_PAGE);
  3106.          swap_free(entry);
  3107. -        oom(current);
  3108. +        oom(tsk);
  3109.          return;
  3110.      }
  3111.      read_swap_page(entry, (char *) page);
  3112. @@ -330,8 +330,8 @@
  3113.          free_page(page);
  3114.          return;
  3115.      }
  3116. -    vma->vm_task->mm->rss++;
  3117. -    vma->vm_task->mm->maj_flt++;
  3118. +    vma->vm_mm->rss++;
  3119. +    vma->vm_mm->maj_flt++;
  3120.      if (!write_access && add_to_swap_cache(page, entry)) {
  3121.          set_pte(page_table, mk_pte(page, vma->vm_page_prot));
  3122.          return;
  3123. @@ -352,7 +352,8 @@
  3124.   * using a process that no longer actually exists (it might
  3125.   * have died while we slept).
  3126.   */
  3127. -static inline int try_to_swap_out(struct vm_area_struct* vma, unsigned long address, pte_t * page_table, unsigned long limit)
  3128. +static inline int try_to_swap_out(struct task_struct * tsk, struct vm_area_struct* vma,
  3129. +    unsigned long address, pte_t * page_table, unsigned long limit)
  3130.  {
  3131.      pte_t pte;
  3132.      unsigned long entry;
  3133. @@ -374,8 +375,8 @@
  3134.      }    
  3135.      if (pte_dirty(pte)) {
  3136.          if (vma->vm_ops && vma->vm_ops->swapout) {
  3137. -            pid_t pid = vma->vm_task->pid;
  3138. -            vma->vm_task->mm->rss--;
  3139. +            pid_t pid = tsk->pid;
  3140. +            vma->vm_mm->rss--;
  3141.              if (vma->vm_ops->swapout(vma, address - vma->vm_start + vma->vm_offset, page_table))
  3142.                  kill_proc(pid, SIGBUS, 1);
  3143.          } else {
  3144. @@ -383,7 +384,7 @@
  3145.                  return 0;
  3146.              if (!(entry = get_swap_page()))
  3147.                  return 0;
  3148. -            vma->vm_task->mm->rss--;
  3149. +            vma->vm_mm->rss--;
  3150.              set_pte(page_table, __pte(entry));
  3151.              invalidate();
  3152.              write_swap_page(entry, (char *) page);
  3153. @@ -397,13 +398,13 @@
  3154.              printk("Aiee.. duplicated cached swap-cache entry\n");
  3155.              return 0;
  3156.          }
  3157. -        vma->vm_task->mm->rss--;
  3158. +        vma->vm_mm->rss--;
  3159.          set_pte(page_table, __pte(entry));
  3160.          invalidate();
  3161.          free_page(page);
  3162.          return 1;
  3163.      } 
  3164. -    vma->vm_task->mm->rss--;
  3165. +    vma->vm_mm->rss--;
  3166.      pte_clear(page_table);
  3167.      invalidate();
  3168.      entry = mem_map[MAP_NR(page)];
  3169. @@ -438,8 +439,8 @@
  3170.   */
  3171.  #define SWAP_RATIO    128
  3172.  
  3173. -static inline int swap_out_pmd(struct vm_area_struct * vma, pmd_t *dir,
  3174. -    unsigned long address, unsigned long end, unsigned long limit)
  3175. +static inline int swap_out_pmd(struct task_struct * tsk, struct vm_area_struct * vma,
  3176. +    pmd_t *dir, unsigned long address, unsigned long end, unsigned long limit)
  3177.  {
  3178.      pte_t * pte;
  3179.      unsigned long pmd_end;
  3180. @@ -460,8 +461,8 @@
  3181.  
  3182.      do {
  3183.          int result;
  3184. -        vma->vm_task->mm->swap_address = address + PAGE_SIZE;
  3185. -        result = try_to_swap_out(vma, address, pte, limit);
  3186. +        vma->vm_mm->swap_address = address + PAGE_SIZE;
  3187. +        result = try_to_swap_out(tsk, vma, address, pte, limit);
  3188.          if (result)
  3189.              return result;
  3190.          address += PAGE_SIZE;
  3191. @@ -470,8 +471,8 @@
  3192.      return 0;
  3193.  }
  3194.  
  3195. -static inline int swap_out_pgd(struct vm_area_struct * vma, pgd_t *dir,
  3196. -    unsigned long address, unsigned long end, unsigned long limit)
  3197. +static inline int swap_out_pgd(struct task_struct * tsk, struct vm_area_struct * vma,
  3198. +    pgd_t *dir, unsigned long address, unsigned long end, unsigned long limit)
  3199.  {
  3200.      pmd_t * pmd;
  3201.      unsigned long pgd_end;
  3202. @@ -491,7 +492,7 @@
  3203.          end = pgd_end;
  3204.      
  3205.      do {
  3206. -        int result = swap_out_pmd(vma, pmd, address, end, limit);
  3207. +        int result = swap_out_pmd(tsk, vma, pmd, address, end, limit);
  3208.          if (result)
  3209.              return result;
  3210.          address = (address + PMD_SIZE) & PMD_MASK;
  3211. @@ -500,8 +501,8 @@
  3212.      return 0;
  3213.  }
  3214.  
  3215. -static int swap_out_vma(struct vm_area_struct * vma, pgd_t *pgdir,
  3216. -    unsigned long start, unsigned long limit)
  3217. +static int swap_out_vma(struct task_struct * tsk, struct vm_area_struct * vma,
  3218. +    pgd_t *pgdir, unsigned long start, unsigned long limit)
  3219.  {
  3220.      unsigned long end;
  3221.  
  3222. @@ -512,7 +513,7 @@
  3223.  
  3224.      end = vma->vm_end;
  3225.      while (start < end) {
  3226. -        int result = swap_out_pgd(vma, pgdir, start, end, limit);
  3227. +        int result = swap_out_pgd(tsk, vma, pgdir, start, end, limit);
  3228.          if (result)
  3229.              return result;
  3230.          start = (start + PGDIR_SIZE) & PGDIR_MASK;
  3231. @@ -542,7 +543,7 @@
  3232.          address = vma->vm_start;
  3233.  
  3234.      for (;;) {
  3235. -        int result = swap_out_vma(vma, pgd_offset(p, address), address, limit);
  3236. +        int result = swap_out_vma(p, vma, pgd_offset(p->mm, address), address, limit);
  3237.          if (result)
  3238.              return result;
  3239.          vma = vma->vm_next;
  3240. @@ -871,7 +872,7 @@
  3241.          return 1;
  3242.      }
  3243.      set_pte(dir, pte_mkwrite(pte_mkdirty(mk_pte(page, vma->vm_page_prot))));
  3244. -    ++vma->vm_task->mm->rss;
  3245. +    ++vma->vm_mm->rss;
  3246.      swap_free(pte_val(pte));
  3247.      return 1;
  3248.  }
  3249. @@ -956,7 +957,7 @@
  3250.       */
  3251.      vma = p->mm->mmap;
  3252.      while (vma) {
  3253. -        pgd_t * pgd = pgd_offset(p, vma->vm_start);
  3254. +        pgd_t * pgd = pgd_offset(p->mm, vma->vm_start);
  3255.          if (unuse_vma(vma, pgd, vma->vm_start, vma->vm_end, type, page))
  3256.              return 1;
  3257.          vma = vma->vm_next;
  3258. diff -u --recursive --new-file v1.3.23/linux/mm/vmalloc.c linux/mm/vmalloc.c
  3259. --- v1.3.23/linux/mm/vmalloc.c    Sun Sep  3 12:27:04 1995
  3260. +++ linux/mm/vmalloc.c    Mon Sep  4 13:03:05 1995
  3261. @@ -32,7 +32,7 @@
  3262.      struct task_struct * p;
  3263.  
  3264.      for_each_task(p)
  3265. -        *pgd_offset(p,address) = entry;
  3266. +        *pgd_offset(p->mm,address) = entry;
  3267.  }
  3268.  
  3269.  static inline void free_area_pte(pmd_t * pmd, unsigned long address, unsigned long size)
  3270. @@ -96,7 +96,7 @@
  3271.      pgd_t * dir;
  3272.      unsigned long end = address + size;
  3273.  
  3274. -    dir = pgd_offset(&init_task, address);
  3275. +    dir = pgd_offset(&init_mm, address);
  3276.      while (address < end) {
  3277.          free_area_pmd(dir, address, end - address);
  3278.          address = (address + PGDIR_SIZE) & PGDIR_MASK;
  3279. @@ -152,7 +152,7 @@
  3280.      pgd_t * dir;
  3281.      unsigned long end = address + size;
  3282.  
  3283. -    dir = pgd_offset(&init_task, address);
  3284. +    dir = pgd_offset(&init_mm, address);
  3285.      while (address < end) {
  3286.          pmd_t *pmd = pmd_alloc_kernel(dir, address);
  3287.          if (!pmd)
  3288. @@ -213,7 +213,7 @@
  3289.      unsigned long end = address + size;
  3290.  
  3291.      offset -= address;
  3292. -    dir = pgd_offset(&init_task, address);
  3293. +    dir = pgd_offset(&init_mm, address);
  3294.      while (address < end) {
  3295.          pmd_t *pmd = pmd_alloc_kernel(dir, address);
  3296.          if (!pmd)
  3297. diff -u --recursive --new-file v1.3.23/linux/net/Changes linux/net/Changes
  3298. --- v1.3.23/linux/net/Changes    Sun Sep  3 12:27:04 1995
  3299. +++ linux/net/Changes    Mon Sep  4 14:48:37 1995
  3300. @@ -95,7 +95,7 @@
  3301.  o    Appletalk router fixes [Michael Callahan]    [TESTED]
  3302.  o    TCP state error fixes [Mark Tamsky]        [TESTED]
  3303.  o    Verify area fixes [Heiko Eissfeldt]        [TESTED]
  3304. -o    Routes use metric field    [John Naylor]        [TESTED/NOT YET AS BSD]
  3305. +o    Routes use metric field    [John Naylor]        [TESTED]
  3306.  o    Major AX.25/NetROM fixes [John Nalor]        [TESTED]
  3307.  
  3308.  ------->>>>>  NET3 030  <<<<<----------
  3309. @@ -177,16 +177,44 @@
  3310.  o    Datagram generic iovec support            [IN]
  3311.  o    Misc minor bug fixes                [IN]
  3312.  
  3313. --------->>>>> 1.3.22 I expect <<<<<-------
  3314. +-------->>>>> 1.3.22  <<<<<-------
  3315.  
  3316. -o    Device lock against page fault            [IN]
  3317. +o    Device lock against page fault            [TESTED]
  3318.  o    IP_HDRINCL                    [TESTED]
  3319.  o    IP firewalling spoofing protection        [IN]
  3320.  o    IGMP bug fixes and workarounds            [TESTED]
  3321.  o    IFF_ALLMULTI protocol layer support        [TESTED]
  3322.  o    First parts of IP multicast routing code    [IN]
  3323. -o    Generate BSD ENETDOWN errors            [IN]
  3324. +o    Generate BSD ENETDOWN errors            [TESTED]
  3325. +o    Clean device unload bug<Walter Wolfgang>    [IN]
  3326.  
  3327. +-------->>>>> 1.3.23 <<<<<-------
  3328. +
  3329. +o    Missing IGMP includes fixes            [TESTED]
  3330. +o    Smarter buffer use options for sockets        [IN]
  3331. +o    AF_UNIX smarter buffer driving            [IN]
  3332. +o    AF_UNIX full BSD semantics on STREAM writes    [IN]
  3333. +o    IOVEC's support repeated calls to copy more    [IN]
  3334. +o    Zero fragment 'solaris nfs' bug fixed <Werner>  [IN]
  3335. +o    NetROM supports sendmsg/recvmsg            [IN]
  3336. +
  3337. +---------- Things Linus had for a while and not merged ----------------
  3338. +
  3339. +o    Paul Gortmakers 8390 Copy and checksum        [PLEASE ADD 8)]
  3340. +
  3341. +---------- Things pending from other people to chase -------------
  3342. +
  3343. +o    Tom May's insw_and_checksum()
  3344. +
  3345. +---------- Things pending for me to merge --------------
  3346. +
  3347. +o    IPFW support for TOS changing (Al Longyear)
  3348. +o    /dev/skip /dev/ipah etc - Kernel/Usermode communications module (me)
  3349. +o    AF_UNIX garbage collect code
  3350. +o    Closing socket change (Marc Tamsky)
  3351. +o    Faster closedown option for heavy use sites (me)
  3352. +
  3353. +--------------- Tbings That Need Doing Before 1.4 ------------------
  3354.  
  3355.  o    Finish merging the bridge code
  3356.  o    SIOCSLEEPRT patch
  3357. @@ -202,11 +230,14 @@
  3358.  o    Clean up RAW AX.25 sockets.
  3359.  o    Finish 802.2 Class I code to be compliant to the oddities of 802.2
  3360.  o    Full variable length AX.25 support        [JSN doing]
  3361. -o    Tidy BPQ support
  3362. +o    Tidy BPQ support to use an bpqip tunnel device
  3363.  o    Strange eth0-eth3 bug 
  3364.  o    Finish IPIP bug fixes
  3365.  o    Why doesnt the PROTO_UNREACH get sent ?
  3366. -
  3367. +o    IP protocols using sendmsg()
  3368. +o    Kill off old ip_queue_xmit/ip_send stuff.
  3369. +o    Remove kernel RARP and replace with user mode daemon.
  3370. +o    Throw out existing firewall ioctl()'s and use a single table load.
  3371.  
  3372.  0.2
  3373.  ---
  3374. @@ -222,7 +253,7 @@
  3375.  
  3376.  0.3
  3377.  ---
  3378. -o    Merge the layered protocol support.
  3379. +o    Merge the layered protocol support.        [ABANDONED TOO SLOW]
  3380.  o    IP firewalling performance - caching and radix trees.
  3381.  o    Zebedee
  3382.  o    802.2 Class 2 services (eg netbios).
  3383. @@ -279,7 +310,7 @@
  3384.  
  3385.  10.    Frame Relay/WAN/ISDN drivers [I'm working on the sonix EuroISDN board
  3386.  driver but thats for an internal project and its general release is still
  3387. -a maybe (so is finishing it ;))][Someone is working on Frame Relay].
  3388. +a maybe (so is finishing it ;))][Jim Freeman is working on Frame Relay].
  3389.  
  3390.  11.    IP over SCSI.
  3391.  
  3392. @@ -307,6 +338,9 @@
  3393.  
  3394.  19.    IPv4 IP-AH and IP-ESP.
  3395.  [Taken]
  3396. +
  3397. +20.    SKIP IP security using ENskip-0.10 - started
  3398. +[Me]
  3399.  
  3400.  BTW: Don't let the magic words 'kernel programming' worry you. Its like DOS
  3401.  - you make a mistake you have to reboot. You do at least get dumps and a
  3402. diff -u --recursive --new-file v1.3.23/linux/net/appletalk/ddp.c linux/net/appletalk/ddp.c
  3403. --- v1.3.23/linux/net/appletalk/ddp.c    Mon Aug 28 14:52:25 1995
  3404. +++ linux/net/appletalk/ddp.c    Mon Sep  4 14:48:36 1995
  3405. @@ -1545,7 +1545,7 @@
  3406.      
  3407.      size += dev->hard_header_len;
  3408.  
  3409. -    skb = sock_alloc_send_skb(sk, size, 0 , &err);
  3410. +    skb = sock_alloc_send_skb(sk, size, 0, 0 , &err);
  3411.      if(skb==NULL)
  3412.          return err;
  3413.  
  3414. diff -u --recursive --new-file v1.3.23/linux/net/ax25/af_ax25.c linux/net/ax25/af_ax25.c
  3415. --- v1.3.23/linux/net/ax25/af_ax25.c    Mon Aug 28 14:52:25 1995
  3416. +++ linux/net/ax25/af_ax25.c    Mon Sep  4 14:48:36 1995
  3417. @@ -1720,7 +1720,7 @@
  3418.      /* Assume the worst case */
  3419.      size = len + 3 + size_ax25_addr(dp) + AX25_BPQ_HEADER_LEN;
  3420.  
  3421. -    if ((skb = sock_alloc_send_skb(sk, size, 0, &err)) == NULL)
  3422. +    if ((skb = sock_alloc_send_skb(sk, size, 0, 0, &err)) == NULL)
  3423.          return err;
  3424.  
  3425.      skb->sk   = sk;
  3426. diff -u --recursive --new-file v1.3.23/linux/net/ax25/ax25_out.c linux/net/ax25/ax25_out.c
  3427. --- v1.3.23/linux/net/ax25/ax25_out.c    Fri Aug 18 08:44:59 1995
  3428. +++ linux/net/ax25/ax25_out.c    Mon Sep  4 14:48:36 1995
  3429. @@ -71,7 +71,7 @@
  3430.  
  3431.          while (skb->len > 0) {
  3432.              if (skb->sk != NULL) {
  3433. -                if ((skbn = sock_alloc_send_skb(skb->sk, mtu + 2 + frontlen, 0, &err)) == NULL)
  3434. +                if ((skbn = sock_alloc_send_skb(skb->sk, mtu + 2 + frontlen, 0, 0, &err)) == NULL)
  3435.                      return;
  3436.              } else {
  3437.                  if ((skbn = alloc_skb(mtu + 2 + frontlen, GFP_ATOMIC)) == NULL)
  3438. diff -u --recursive --new-file v1.3.23/linux/net/core/iovec.c linux/net/core/iovec.c
  3439. --- v1.3.23/linux/net/core/iovec.c    Mon Aug 28 14:52:25 1995
  3440. +++ linux/net/core/iovec.c    Mon Sep  4 14:56:40 1995
  3441. @@ -6,6 +6,9 @@
  3442.   *        modify it under the terms of the GNU General Public License
  3443.   *        as published by the Free Software Foundation; either version
  3444.   *        2 of the License, or (at your option) any later version.
  3445. + *
  3446. + *    Fixes:
  3447. + *        Andrew Lunn    :    Errors in iovec copying.
  3448.   */
  3449.  
  3450.  
  3451. @@ -64,10 +67,15 @@
  3452.  {
  3453.      while(len>0)
  3454.      {
  3455. -        int copy = min(iov->iov_len,len);
  3456. -        memcpy_tofs(iov->iov_base,kdata,copy);
  3457. -        kdata+=copy;
  3458. -        len-=copy;
  3459. +        if(iov->iov_len)
  3460. +        {
  3461. +            int copy = min(iov->iov_len,len);
  3462. +            memcpy_tofs(iov->iov_base,kdata,copy);
  3463. +            kdata+=copy;
  3464. +            len-=copy;
  3465. +            iov->iov_len-=copy;
  3466. +            iov->iov_base+=copy;
  3467. +        }
  3468.          iov++;
  3469.      }
  3470.  }
  3471. @@ -78,13 +86,17 @@
  3472.   
  3473.  void memcpy_fromiovec(unsigned char *kdata, struct iovec *iov, int len)
  3474.  {
  3475. -    int copy;
  3476.      while(len>0)
  3477.      {
  3478. -        copy=min(len,iov->iov_len);
  3479. -        memcpy_fromfs(kdata, iov->iov_base, copy);
  3480. -        len-=copy;
  3481. -        kdata+=copy;
  3482. +        if(iov->iov_len)
  3483. +        {
  3484. +            int copy=min(len,iov->iov_len);
  3485. +            memcpy_fromfs(kdata, iov->iov_base, copy);
  3486. +            len-=copy;
  3487. +            kdata+=copy;
  3488. +            iov->iov_base+=copy;
  3489. +            iov->iov_len-=copy;
  3490. +        }
  3491.          iov++;
  3492.      }
  3493.  }
  3494. diff -u --recursive --new-file v1.3.23/linux/net/core/sock.c linux/net/core/sock.c
  3495. --- v1.3.23/linux/net/core/sock.c    Fri Jul  7 13:42:58 1995
  3496. +++ linux/net/core/sock.c    Mon Sep  4 14:48:36 1995
  3497. @@ -64,6 +64,7 @@
  3498.   *        Alan Cox    :    Make SO_DEBUG superuser only.
  3499.   *        Alan Cox    :    Allow anyone to clear SO_DEBUG
  3500.   *                    (compatibility fix)
  3501. + *        Alan Cox    :    Added optimistic memory grabbing for AF_UNIX throughput.
  3502.   *
  3503.   * To Fix:
  3504.   *
  3505. @@ -421,7 +422,7 @@
  3506.   *    Generic send/receive buffer handlers
  3507.   */
  3508.  
  3509. -struct sk_buff *sock_alloc_send_skb(struct sock *sk, unsigned long size, int noblock, int *errcode)
  3510. +struct sk_buff *sock_alloc_send_skb(struct sock *sk, unsigned long size, unsigned long fallback, int noblock, int *errcode)
  3511.  {
  3512.      struct sk_buff *skb;
  3513.      int err;
  3514. @@ -446,8 +447,21 @@
  3515.              return NULL;
  3516.          }
  3517.          
  3518. -        skb = sock_wmalloc(sk, size, 0, GFP_KERNEL);
  3519. +        if(!fallback)
  3520. +            skb = sock_wmalloc(sk, size, 0, GFP_KERNEL);
  3521. +        else
  3522. +        {
  3523. +            /* The buffer get won't block, or use the atomic queue. It does
  3524. +               produce annoying no free page messages still.... */
  3525. +            skb = sock_wmalloc(sk, size, 0 , GFP_BUFFER);
  3526. +            if(!skb)
  3527. +                skb=sock_wmalloc(sk, fallback, 0, GFP_KERNEL);
  3528. +        }
  3529.          
  3530. +        /*
  3531. +         *    This means we have too many buffers for this socket already.
  3532. +         */
  3533. +         
  3534.          if(skb==NULL)
  3535.          {
  3536.              unsigned long tmp;
  3537. diff -u --recursive --new-file v1.3.23/linux/net/ipv4/Makefile linux/net/ipv4/Makefile
  3538. --- v1.3.23/linux/net/ipv4/Makefile    Sun Sep  3 12:27:05 1995
  3539. +++ linux/net/ipv4/Makefile    Mon Sep  4 07:38:03 1995
  3540. @@ -12,11 +12,13 @@
  3541.             arp.o ip.o raw.o icmp.o tcp.o udp.o devinet.o af_inet.o \
  3542.             igmp.o ip_fw.o ipip.o ipmr.o
  3543.  
  3544. -ifdef CONFIG_INET_RARP
  3545. +ifeq ($(CONFIG_INET_RARP),y)
  3546.  IPV4_OBJS := $(IPV4_OBJS) rarp.o
  3547.  else
  3548. -M_OBJS := rarp.o
  3549. -MOD_LIST_NAME := IPV4_MODULES
  3550. +  ifeq ($(CONFIG_INET_RARP),m)
  3551. +    M_OBJS := rarp.o
  3552. +    MOD_LIST_NAME := IPV4_MODULES
  3553. +   endif
  3554.  endif
  3555.  
  3556.  ifdef CONFIG_INET
  3557. diff -u --recursive --new-file v1.3.23/linux/net/ipv4/ip.c linux/net/ipv4/ip.c
  3558. --- v1.3.23/linux/net/ipv4/ip.c    Sun Sep  3 16:12:49 1995
  3559. +++ linux/net/ipv4/ip.c    Mon Sep  4 14:48:37 1995
  3560. @@ -90,6 +90,7 @@
  3561.   *    Gerhard Koerting    :    IP fragmentation forwarding fix
  3562.   *        Alan Cox    :    Device lock against page fault.
  3563.   *        Alan Cox    :    IP_HDRINCL facility.
  3564. + *    Werner Almesberger    :    Zero fragment bug
  3565.   *
  3566.   *  
  3567.   *
  3568. @@ -2531,7 +2532,7 @@
  3569.      if(length+20 <= dev->mtu && !MULTICAST(daddr) && daddr!=0xFFFFFFFF && daddr!=dev->pa_brdaddr)
  3570.      {    
  3571.          int error;
  3572. -        struct sk_buff *skb=sock_alloc_send_skb(sk, length+20+15+dev->hard_header_len,0,&error);
  3573. +        struct sk_buff *skb=sock_alloc_send_skb(sk, length+20+15+dev->hard_header_len,0, 0,&error);
  3574.          if(skb==NULL)
  3575.          {
  3576.              ip_statistics.IpOutDiscards++;
  3577. @@ -2614,7 +2615,7 @@
  3578.       
  3579.      fraglen = length - offset + fragheaderlen;
  3580.      
  3581. -    if(fraglen==0)
  3582. +    if(length-offset==0)
  3583.      {
  3584.          fraglen = maxfraglen;
  3585.          offset -= maxfraglen-fragheaderlen;
  3586. @@ -2660,7 +2661,7 @@
  3587.           *    Get the memory we require with some space left for alignment.
  3588.           */
  3589.  
  3590. -        skb = sock_alloc_send_skb(sk, fraglen+15, 0, &error);
  3591. +        skb = sock_alloc_send_skb(sk, fraglen+15, 0, 0, &error);
  3592.          if (skb == NULL)
  3593.          {
  3594.              ip_statistics.IpOutDiscards++;
  3595. diff -u --recursive --new-file v1.3.23/linux/net/ipv4/tcp.c linux/net/ipv4/tcp.c
  3596. --- v1.3.23/linux/net/ipv4/tcp.c    Sun Sep  3 12:27:06 1995
  3597. +++ linux/net/ipv4/tcp.c    Mon Sep  4 14:48:37 1995
  3598. @@ -141,7 +141,7 @@
  3599.   *        Alan Cox    :    Per route irtt.
  3600.   *        Matt Day    :    Select() match BSD precisely on error
  3601.   *        Alan Cox    :    New buffers
  3602. - *        Mark Tamsky    :    Various sk->prot->retransmits and 
  3603. + *        Marc Tamsky    :    Various sk->prot->retransmits and 
  3604.   *                    sk->retransmits misupdating fixed.
  3605.   *                    Fixed tcp_write_timeout: stuck close,
  3606.   *                    and TCP syn retries gets used now.
  3607. diff -u --recursive --new-file v1.3.23/linux/net/netrom/af_netrom.c linux/net/netrom/af_netrom.c
  3608. --- v1.3.23/linux/net/netrom/af_netrom.c    Mon Aug 28 14:52:26 1995
  3609. +++ linux/net/netrom/af_netrom.c    Mon Sep  4 14:48:37 1995
  3610. @@ -1019,11 +1019,10 @@
  3611.      return 1;
  3612.  }
  3613.  
  3614. -static int nr_sendto(struct socket *sock, const void *ubuf, int len, int noblock,
  3615. -    unsigned flags, struct sockaddr *usip, int addr_len)
  3616. +static int nr_sendmsg(struct socket *sock, struct msghdr *msg, int len, int noblock, int flags)
  3617.  {
  3618.      struct sock *sk = (struct sock *)sock->data;
  3619. -    struct sockaddr_ax25 *usax = (struct sockaddr_ax25 *)usip;
  3620. +    struct sockaddr_ax25 *usax = (struct sockaddr_ax25 *)msg->msg_name;
  3621.      int err;
  3622.      struct sockaddr_ax25 sax;
  3623.      struct sk_buff *skb;
  3624. @@ -1046,7 +1045,7 @@
  3625.          return -ENETUNREACH;
  3626.          
  3627.      if (usax) {
  3628. -        if (addr_len < sizeof(sax))
  3629. +        if (msg->msg_namelen < sizeof(sax))
  3630.              return -EINVAL;
  3631.          memcpy(&sax, usax, sizeof(sax));
  3632.          if (sk->type == SOCK_SEQPACKET && memcmp(&sk->nr->dest_addr, &sax.sax25_call, sizeof(ax25_address)) != 0)
  3633. @@ -1069,7 +1068,7 @@
  3634.  
  3635.      size = len + AX25_BPQ_HEADER_LEN + AX25_MAX_HEADER_LEN + 3 + NR_NETWORK_LEN + NR_TRANSPORT_LEN;
  3636.  
  3637. -    if ((skb = sock_alloc_send_skb(sk, size, 0, &err)) == NULL)
  3638. +    if ((skb = sock_alloc_send_skb(sk, size, 0, 0, &err)) == NULL)
  3639.          return err;
  3640.  
  3641.      skb->sk   = sk;
  3642. @@ -1110,7 +1109,7 @@
  3643.          printk("NET/ROM: Appending user data\n");
  3644.  
  3645.      /* User data follows immediately after the NET/ROM transport header */
  3646. -    memcpy_fromfs(asmptr, ubuf, len);
  3647. +    memcpy_fromiovec(asmptr, msg->msg_iov, len);
  3648.  
  3649.      if (sk->debug)
  3650.          printk("NET/ROM: Transmitting buffer\n");
  3651. @@ -1125,6 +1124,21 @@
  3652.      return len;
  3653.  }
  3654.  
  3655. +static int nr_sendto(struct socket *sock, const void *ubuf, int size, int noblock, unsigned flags,
  3656. +        struct sockaddr *sa, int addr_len)
  3657. +{
  3658. +    struct iovec iov;
  3659. +    struct msghdr msg;
  3660. +    iov.iov_base=(void *)ubuf;
  3661. +    iov.iov_len=size;
  3662. +    msg.msg_name=(void *)sa;
  3663. +    msg.msg_namelen=addr_len;
  3664. +    msg.msg_accrights=NULL;
  3665. +    msg.msg_iov=&iov;
  3666. +    msg.msg_iovlen=1;
  3667. +    return nr_sendmsg(sock,&msg,size,noblock,flags);    
  3668. +}
  3669. +
  3670.  static int nr_send(struct socket *sock, const void *ubuf, int size, int noblock, unsigned flags)
  3671.  {
  3672.      return nr_sendto(sock, ubuf, size, noblock, flags, NULL, 0);
  3673. @@ -1132,21 +1146,23 @@
  3674.  
  3675.  static int nr_write(struct socket *sock, const char *ubuf, int size, int noblock)
  3676.  {
  3677. -    return nr_send(sock, ubuf, size, noblock, 0);
  3678. +    return nr_sendto(sock, ubuf, size, noblock, 0, NULL, 0);
  3679.  }
  3680.  
  3681. -static int nr_recvfrom(struct socket *sock, void *ubuf, int size, int noblock,
  3682. -           unsigned flags, struct sockaddr *sip, int *addr_len)
  3683. +static int nr_recvmsg(struct socket *sock, struct msghdr *msg, int size, int noblock,
  3684. +           int flags, int *addr_len)
  3685.  {
  3686.      struct sock *sk = (struct sock *)sock->data;
  3687. -    struct sockaddr_ax25 *sax = (struct sockaddr_ax25 *)sip;
  3688. +    struct sockaddr_ax25 *sax = (struct sockaddr_ax25 *)msg->msg_name;
  3689.      int copied;
  3690.      struct sk_buff *skb;
  3691.      int er;
  3692.  
  3693.      if (sk->err) {
  3694. +        cli();
  3695.          er      = -sk->err;
  3696.          sk->err = 0;
  3697. +        sti();
  3698.          return er;
  3699.      }
  3700.      
  3701. @@ -1170,7 +1186,7 @@
  3702.      }
  3703.  
  3704.      copied = (size < skb->len) ? size : skb->len;
  3705. -    skb_copy_datagram(skb, 0, ubuf, copied);
  3706. +    skb_copy_datagram_iovec(skb, 0, msg->msg_iov, copied);
  3707.      
  3708.      if (sax != NULL) {
  3709.          struct sockaddr_ax25 addr;
  3710. @@ -1188,6 +1204,24 @@
  3711.      return copied;
  3712.  }        
  3713.  
  3714. +static int nr_recvfrom(struct socket *sock, void *ubuf, int size, int noblock, unsigned flags,
  3715. +        struct sockaddr *sa, int *addr_len)
  3716. +{
  3717. +    struct iovec iov;
  3718. +    struct msghdr msg;
  3719. +    iov.iov_base=ubuf;
  3720. +    iov.iov_len=size;
  3721. +    msg.msg_name=(void *)sa;
  3722. +    msg.msg_namelen=0;
  3723. +    if (addr_len)
  3724. +        msg.msg_namelen = *addr_len;
  3725. +    msg.msg_accrights=NULL;
  3726. +    msg.msg_iov=&iov;
  3727. +    msg.msg_iovlen=1;
  3728. +    return nr_recvmsg(sock,&msg,size,noblock,flags,addr_len);    
  3729. +}
  3730. +
  3731. +
  3732.  static int nr_recv(struct socket *sock, void *ubuf, int size , int noblock,
  3733.      unsigned flags)
  3734.  {
  3735. @@ -1387,6 +1421,8 @@
  3736.      nr_setsockopt,
  3737.      nr_getsockopt,
  3738.      nr_fcntl,
  3739. +    nr_sendmsg,
  3740. +    nr_recvmsg
  3741.  };
  3742.  
  3743.  static struct notifier_block nr_dev_notifier = {
  3744. diff -u --recursive --new-file v1.3.23/linux/net/netrom/nr_out.c linux/net/netrom/nr_out.c
  3745. --- v1.3.23/linux/net/netrom/nr_out.c    Mon Jul 31 15:59:05 1995
  3746. +++ linux/net/netrom/nr_out.c    Mon Sep  4 14:48:37 1995
  3747. @@ -61,7 +61,7 @@
  3748.          frontlen = skb_headroom(skb);
  3749.  
  3750.          while (skb->len > 0) {
  3751. -            if ((skbn = sock_alloc_send_skb(sk, frontlen + mtu, 0, &err)) == NULL)
  3752. +            if ((skbn = sock_alloc_send_skb(sk, frontlen + mtu, 0, 0, &err)) == NULL)
  3753.                  return;
  3754.  
  3755.              skbn->sk   = sk;
  3756. diff -u --recursive --new-file v1.3.23/linux/net/unix/af_unix.c linux/net/unix/af_unix.c
  3757. --- v1.3.23/linux/net/unix/af_unix.c    Sun Sep  3 12:27:06 1995
  3758. +++ linux/net/unix/af_unix.c    Mon Sep  4 15:31:37 1995
  3759. @@ -136,7 +136,6 @@
  3760.       *    Retry;
  3761.       */
  3762.       
  3763. -    init_timer(&sk->timer);
  3764.      sk->timer.expires=jiffies+10*HZ;    /* No real hurry try it every 10 seconds or so */
  3765.      add_timer(&sk->timer);
  3766.  }
  3767. @@ -144,7 +143,6 @@
  3768.       
  3769.  static void unix_delayed_delete(unix_socket *sk)
  3770.  {
  3771. -    init_timer(&sk->timer);
  3772.      sk->timer.data=(unsigned long)sk;
  3773.      sk->timer.expires=jiffies+HZ;        /* Normally 1 second after will clean up. After that we try every 10 */
  3774.      sk->timer.function=unix_destroy_timer;
  3775. @@ -275,6 +273,7 @@
  3776.              kfree_s(sk,sizeof(*sk));
  3777.              return -ESOCKTNOSUPPORT;
  3778.      }
  3779. +    init_timer(&sk->timer);
  3780.      skb_queue_head_init(&sk->write_queue);
  3781.      skb_queue_head_init(&sk->receive_queue);
  3782.      skb_queue_head_init(&sk->back_log);
  3783. @@ -473,7 +472,7 @@
  3784.           *    Now ready to connect
  3785.           */
  3786.       
  3787. -        skb=sock_alloc_send_skb(sk, 0, 0, &err); /* Marker object */
  3788. +        skb=sock_alloc_send_skb(sk, 0, 0, 0, &err); /* Marker object */
  3789.          if(skb==NULL)
  3790.              return err;
  3791.          skb->sk=sk;                /* So they know it is us */
  3792. @@ -658,6 +657,8 @@
  3793.      struct sockaddr_un *sun=msg->msg_name;
  3794.      int err,size;
  3795.      struct sk_buff *skb;
  3796. +    int limit=0;
  3797. +    int sent=0;
  3798.  
  3799.      if(sk->err)
  3800.      {
  3801. @@ -687,62 +688,91 @@
  3802.              return -ENOTCONN;
  3803.      }
  3804.  
  3805. -    /*
  3806. -     *    Optimisation for the fact that under 0.01% of X messages typically
  3807. -     *    need breaking up.
  3808. -     */
  3809.  
  3810. -    if(len>(sk->sndbuf-sizeof(struct sk_buff))/2)    /* Keep two messages in the pipe so it schedules better */
  3811. +    while(sent < len)
  3812.      {
  3813. -        if(sock->type==SOCK_DGRAM)
  3814. -            return -EMSGSIZE;
  3815. -        len=(sk->sndbuf-sizeof(struct sk_buff))/2;
  3816. +        /*
  3817. +         *    Optimisation for the fact that under 0.01% of X messages typically
  3818. +         *    need breaking up.
  3819. +         */
  3820. +         
  3821. +        size=len-sent;
  3822. +
  3823. +        if(size>(sk->sndbuf-sizeof(struct sk_buff))/2)    /* Keep two messages in the pipe so it schedules better */
  3824. +        {
  3825. +            if(sock->type==SOCK_DGRAM)
  3826. +                return -EMSGSIZE;
  3827. +            size=(sk->sndbuf-sizeof(struct sk_buff))/2;
  3828. +        }
  3829.          /*
  3830.           *    Keep to page sized kmalloc()'s as various people
  3831.           *    have suggested. Big mallocs stress the vm too
  3832.           *    much.
  3833.           */
  3834. -        if(len > 4000 && sock->type!=SOCK_DGRAM)
  3835. -            len = 4000;
  3836. -    }
  3837. -     
  3838. -    size=/*protocol_size(&proto_unix)+*/len;
  3839. -    skb=sock_alloc_send_skb(sk,size,nonblock, &err);
  3840. -    if(skb==NULL)
  3841. -        return err;
  3842. -/*    protocol_adjust(skb,&proto_unix);*/
  3843. -    skb->sk=sk;
  3844. -    skb->free=1;
  3845. -    memcpy_fromiovec(skb_put(skb,len),msg->msg_iov, len);
  3846.  
  3847. -    cli();
  3848. -    if(sun==NULL)
  3849. -    {
  3850. -        other=sk->protinfo.af_unix.other;
  3851. -        if(sock->type==SOCK_DGRAM && other->dead)
  3852. +        if(size > 4000 && sock->type!=SOCK_DGRAM)
  3853. +            limit = 4000;    /* Fall back to 4K if we can't grab a big buffer this instant */
  3854. +        else
  3855. +            limit = 0;    /* Otherwise just grab and wait */
  3856. +
  3857. +        /*
  3858. +         *    Grab a buffer
  3859. +         */
  3860. +         
  3861. +        skb=sock_alloc_send_skb(sk,size,limit,nonblock, &err);
  3862. +        
  3863. +        if(skb==NULL)
  3864.          {
  3865. -            other->protinfo.af_unix.locks--;
  3866. -            sk->protinfo.af_unix.other=NULL;
  3867. -            sock->state=SS_UNCONNECTED;
  3868. -            sti();
  3869. -            return -ECONNRESET;
  3870. +            if(sent)
  3871. +            {
  3872. +                sk->err=-err;
  3873. +                return sent;
  3874. +            }
  3875. +            return err;
  3876.          }
  3877. -    }
  3878. -    else
  3879. -    {
  3880. -        unix_mkname(sun, msg->msg_namelen);
  3881. -        other=unix_find_other(sun->sun_path, &err);
  3882. -        if(other==NULL)
  3883. +        size=skb_tailroom(skb);        /* If we dropped back on a limit then our skb is smaller */
  3884. +
  3885. +        skb->sk=sk;
  3886. +        skb->free=1;
  3887. +        
  3888. +        memcpy_fromiovec(skb_put(skb,size),msg->msg_iov, size);
  3889. +
  3890. +        cli();
  3891. +        if(sun==NULL)
  3892.          {
  3893. -            kfree_skb(skb, FREE_WRITE);
  3894. -            sti();
  3895. -            return err;
  3896. +            other=sk->protinfo.af_unix.other;
  3897. +            if(sock->type==SOCK_DGRAM && other->dead)
  3898. +            {
  3899. +                other->protinfo.af_unix.locks--;
  3900. +                sk->protinfo.af_unix.other=NULL;
  3901. +                sock->state=SS_UNCONNECTED;
  3902. +                sti();
  3903. +                if(!sent)
  3904. +                    return -ECONNRESET;
  3905. +                else
  3906. +                    return sent;
  3907. +            }
  3908. +        }
  3909. +        else
  3910. +        {
  3911. +            unix_mkname(sun, msg->msg_namelen);
  3912. +            other=unix_find_other(sun->sun_path, &err);
  3913. +            if(other==NULL)
  3914. +            {
  3915. +                kfree_skb(skb, FREE_WRITE);
  3916. +                sti();
  3917. +                if(sent)
  3918. +                    return sent;
  3919. +                else
  3920. +                    return err;
  3921. +            }
  3922.          }
  3923. +        skb_queue_tail(&other->receive_queue, skb);
  3924. +        sti();
  3925. +        other->data_ready(other,size);
  3926. +        sent+=size;
  3927.      }
  3928. -    skb_queue_tail(&other->receive_queue, skb);
  3929. -    sti();
  3930. -    other->data_ready(other,len);
  3931. -    return len;
  3932. +    return sent;
  3933.  }
  3934.          
  3935.  static int unix_recvmsg(struct socket *sock, struct msghdr *msg, int size, int noblock, int flags, int *addr_len)
  3936. diff -u --recursive --new-file v1.3.23/linux/scripts/Configure linux/scripts/Configure
  3937. --- v1.3.23/linux/scripts/Configure    Sun Sep  3 12:27:06 1995
  3938. +++ linux/scripts/Configure    Mon Sep  4 07:31:54 1995
  3939. @@ -13,6 +13,9 @@
  3940.  #
  3941.  # 050793 - use IFS='@' to get around a bug in a pre-version of bash-1.13
  3942.  # with an empty IFS.
  3943. +#
  3944. +# 030995 (storner@osiris.ping.dk) - added support for tri-state answers,
  3945. +# for selecting modules to compile.
  3946.  
  3947.  #
  3948.  # Make sure we're really running bash.
  3949. @@ -60,13 +63,22 @@
  3950.  #    define_bool define value
  3951.  #
  3952.  function define_bool () {
  3953. -    if [ "$2" = "y" ]; then
  3954. +        case "$2" in
  3955. +         "y" | "Y")
  3956.          echo "$1=y" >>$CONFIG
  3957.          echo "#define $1 1" >>$CONFIG_H
  3958. -    else
  3959. +        ;;
  3960. +
  3961. +         "m" | "M")
  3962. +        echo "$1=m" >>$CONFIG
  3963. +        echo "#undef  $1" >>$CONFIG_H
  3964. +        ;;
  3965. +
  3966. +         "n" | "N")
  3967.          echo "# $1 is not set" >>$CONFIG
  3968.          echo "#undef  $1" >>$CONFIG_H
  3969. -    fi
  3970. +                ;;
  3971. +    esac
  3972.      eval "$1=$2"
  3973.  }
  3974.  
  3975. @@ -78,8 +90,36 @@
  3976.  function bool () {
  3977.      ans=""
  3978.      def=$(eval echo "\${$2:-$3}")
  3979. +        case "$def" in
  3980. +         "y") defprompt="Y/n"
  3981. +              ;;
  3982. +         "n") defprompt="N/y"
  3983. +              ;;
  3984. +        esac
  3985.      while [ "$ans" != "y" -a "$ans" != "n" ]; do
  3986. -        readln "$1 ($2) [$def] " "$def"
  3987. +        readln "$1 ($2) [$defprompt] " "$def" 
  3988. +    done
  3989. +    define_bool "$2" "$ans"
  3990. +}
  3991. +
  3992. +#
  3993. +# tristate processes a tristate argument
  3994. +#
  3995. +#    tristate question define default
  3996. +#
  3997. +function tristate () {
  3998. +    ans=""
  3999. +    def=$(eval echo "\${$2:-$3}")
  4000. +        case "$def" in
  4001. +         "y") defprompt="Y/m/n"
  4002. +              ;;
  4003. +         "m") defprompt="M/n/y"
  4004. +              ;;
  4005. +         "n") defprompt="N/y/m"
  4006. +              ;;
  4007. +        esac
  4008. +    while [ "$ans" != "y" -a "$ans" != "n" -a "$ans" != "m" ]; do
  4009. +        readln "$1 ($2) [$defprompt] " "$def"
  4010.      done
  4011.      define_bool "$2" "$ans"
  4012.  }
  4013.