home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 4 / DATAFILE_PDCD4.iso / unix / armlinux / kernel_src / LINUX-1_002 / linux-1.3.35pl1.diff
Encoding:
Text File  |  1996-03-05  |  7.1 KB  |  235 lines

  1. diff -ubBwr linux.store/linux.arm/arch/arm/drivers/net/ether3.c linux/arch/arm/drivers/net/ether3.c
  2. --- linux.store/linux.arm/arch/arm/drivers/net/ether3.c    Sat Mar  2 18:11:39 1996
  3. +++ linux/arch/arm/drivers/net/ether3.c    Tue Mar  5 12:52:29 1996
  4. @@ -89,7 +89,7 @@
  5.      outw (priv->regs.command | CMD_FIFOWRITE, REG_COMMAND);
  6.      while ((inw (REG_STATUS) & STAT_FIFOEMPTY) == 0)
  7.          if (!timeout--) {
  8. -        printk ("settxlim_16 broken\n");
  9. +        printk ("%s: writebuf broken\n", dev->name);
  10.          priv->broken = 1;
  11.          return;
  12.          }
  13. @@ -114,7 +114,7 @@
  14.      outw (priv->regs.command | CMD_FIFOWRITE, REG_COMMAND);
  15.      while ((inw( REG_STATUS) & STAT_FIFOEMPTY) == 0)
  16.          if (!timeout--) {
  17. -        printk ("setrxlim_16 broken\n");
  18. +        printk ("%s: readbuf broken\n", dev->name);
  19.          priv->broken = 1;
  20.          return;
  21.          }
  22. @@ -562,7 +562,8 @@
  23.      if (priv->broken) {
  24.          dev_kfree_skb(skb, FREE_WRITE);
  25.          priv->stats.tx_dropped ++;
  26. -        return 1;
  27. +        dev->tbusy = 0;
  28. +        return 0;
  29.      }
  30.  
  31.      thisstart = priv->txinsert;
  32. @@ -584,9 +585,9 @@
  33.  
  34.      save_flags(flags);
  35.      cli();
  36. -    ether3_ledincrementuse (dev);
  37. -    ether3_writebuffer(dev, skb->data, thisdata, length&1?(length+1):length);
  38. +    ether3_writebuffer(dev, skb->data, thisdata, (length & 1) ? (length + 1) : length);
  39.      ether3_writebuffer(dev, &nexthdr, -1, 4);
  40. +    ether3_ledincrementuse (dev);
  41.      ether3_writebuffer(dev, &thishdr, thisstart, 4);
  42.  
  43.      if ((inw (REG_STATUS) & STAT_TXON) == 0) {
  44. @@ -609,11 +610,11 @@
  45.  {
  46.      struct device *dev = (struct device *)(irq2dev_map[irq]);
  47.      struct dev_priv *priv;
  48. -    int boguscount = 20, done = 0;
  49. +    int boguscount = 20, done;
  50.  
  51.  #if NET_DEBUG > 1
  52.      if(net_debug & DEBUG_INT)
  53. -    printk("ether3_interrupt: irq %d\n", irq);
  54. +    printk("eth3irq: %d ", irq);
  55.  #endif
  56.  
  57.      if (dev == NULL) {
  58. @@ -627,6 +628,8 @@
  59.  
  60.      do {
  61.          unsigned int status;
  62. +
  63. +        done = 0;
  64.      status = inw(REG_STATUS);
  65.      outw ((status & (STAT_INTRX|STAT_INTTX|STAT_INTBUFWIN))
  66.          | priv->regs.command, REG_COMMAND);
  67. @@ -645,7 +648,7 @@
  68.  
  69.  #if NET_DEBUG > 1
  70.      if(net_debug & DEBUG_INT)
  71. -    printk("ether3_interrupt: done\n", irq);
  72. +    printk("done\n");
  73.  #endif
  74.  }
  75.  
  76. @@ -763,16 +767,17 @@
  77.  {
  78.      unsigned long txhdr;
  79.      unsigned char *buffer = (unsigned char *)&txhdr;
  80. -    unsigned int txptr;
  81. +    unsigned int txptr, marked;
  82.  
  83.      txptr = priv->regs.transmitptr;
  84. +    marked = 0;
  85.  
  86.      do {
  87.          /*
  88.           * Read the packet header
  89.           */
  90.      if (txptr + 4 > TX_END) {
  91. -        int len = TX_END - priv->regs.transmitptr;
  92. +        int len = TX_END - txptr;
  93.          if (len)
  94.          ether3_readbuffer (dev, buffer, txptr, len);
  95.          ether3_readbuffer (dev, buffer + len, 0, 4 - len);
  96. @@ -814,6 +819,7 @@
  97.      if (txptr != ntohs (txhdr & TX_NEXT)) {
  98.          printk ("%s: TX: bad next pointer - %04X instead of %04X\n",
  99.          dev->name, ntohs (txhdr & TX_NEXT), txptr);
  100. +        priv->regs.transmitptr = txptr;
  101.          return;
  102.      }
  103.  
  104. @@ -827,6 +833,9 @@
  105.  
  106.      ether3_leddecrementuse (dev);
  107.  
  108. +    if (marked)
  109. +        continue;
  110. +    marked = 1;
  111.      mark_bh (NET_BH);    /* Inform upper layers. */
  112.      } while (1);
  113.  }
  114. diff -ubBwr linux.store/linux.arm/arch/arm/kernel/ecard.c linux/arch/arm/kernel/ecard.c
  115. --- linux.store/linux.arm/arch/arm/kernel/ecard.c    Sat Feb 24 18:16:01 1996
  116. +++ linux/arch/arm/kernel/ecard.c    Mon Mar  4 14:03:19 1996
  117. @@ -69,7 +69,7 @@
  118.  
  119.  static void expansioncard_irq_expmask (int intr_no, struct pt_regs *regs)
  120.  {
  121. -    int i;
  122. +    int i, ns = 0;
  123.  #if 0
  124.      int oldexpmask;
  125.  #endif
  126. @@ -99,6 +99,7 @@
  127.              sti ();
  128.  #endif
  129.              do_fast_IRQ (expcard[i].irq);
  130. +            ns ++;
  131.  #if 0
  132.              cli ();
  133.              ioc[0x28] &= ~(1 << 5);
  134. @@ -115,6 +116,8 @@
  135.          }
  136.      }
  137.      }
  138. +    if (ns == 0)
  139. +    printk ("ecard: unknown interrupt\n");
  140.  }
  141.  
  142.  void ecard_enableirq (unsigned int intr_no)
  143. diff -ubBwr linux.store/linux.arm/arch/arm/kernel/process.c linux/arch/arm/kernel/process.c
  144. --- linux.store/linux.arm/arch/arm/kernel/process.c    Thu Feb 22 13:45:02 1996
  145. +++ linux/arch/arm/kernel/process.c    Sun Mar  3 22:41:05 1996
  146. @@ -119,7 +119,7 @@
  147.  
  148.  /* changed the size calculations - should hopefully work better. lbt */
  149.      dump->magic = CMAGIC;
  150. -    dump->start_code = 0;
  151. +    dump->start_code = 32768;
  152.      dump->start_stack = regs->ARM_sp & ~(PAGE_SIZE - 1);
  153.      dump->u_tsize = (((unsigned long) current->mm->end_code) - 32768) >> PAGE_SHIFT;
  154.      dump->u_dsize = (((unsigned long) (current->mm->brk + (PAGE_SIZE-1))) - 32768) >> PAGE_SHIFT;
  155. diff -ubBwr linux.store/linux.arm/arch/arm/kernel/sys-arm.c linux/arch/arm/kernel/sys-arm.c
  156. --- linux.store/linux.arm/arch/arm/kernel/sys-arm.c    Sun Mar  3 13:07:31 1996
  157. +++ linux/arch/arm/kernel/sys-arm.c    Sun Mar  3 16:34:10 1996
  158. @@ -182,6 +179,8 @@
  159.  asmlinkage int
  160.  sys_arm_init_module (char *module_name, char *code, unsigned codesize, unsigned long *__p)
  161.  {
  162. +    extern int sys_init_module (char *, char *, unsigned, struct mod_routes *,
  163. +            struct symbol_table *);
  164.      return sys_init_module (module_name, code, codesize, (struct mod_routines *)__p[0],
  165.              (struct symbol_table *)__p[1]);
  166.  }
  167. @@ -190,11 +189,13 @@
  168.  sys_arm_llseek (unsigned int fd, unsigned long offset_high, unsigned long offset_low,
  169.          unsigned long *__p)
  170.  {
  171. +    extern int sys_llseek (unsigned int, unsigned long, unsigned long, loff_t *, unsigned int);
  172.      return sys_llseek (fd, offset_high, offset_low, (loff_t *)__p[0], (unsigned int)__p[1]);
  173.  }
  174.  
  175.  asmlinkage int
  176.  sys_arm_mount (char *devname, char *dirname, char *type, unsigned long *__p)
  177.  {
  178. +    extern int sys_mount (char *, char *, char *, unsigned long, void *);
  179.      return sys_mount (devname, dirname, type, __p[0], (void *)__p[1]);
  180.  }
  181. diff -ubBwr linux.store/linux.arm/arch/arm/kernel/traps.c linux/arch/arm/kernel/traps.c
  182. --- linux.store/linux.arm/arch/arm/kernel/traps.c    Mon Mar  4 13:12:41 1996
  183. +++ linux/arch/arm/kernel/traps.c    Tue Mar  5 12:53:07 1996
  184. @@ -94,6 +94,11 @@
  185.      died = 1;
  186.  
  187.      mode = regs->ARM_pc & 3;
  188. +    if (mode == 0) {    /* if user mode, we don't do anything */
  189. +        died = 0;
  190. +        return;
  191. +    }
  192. +
  193.      pc = regs->ARM_pc & ~0xfc000003;
  194.  
  195.      switch (mode) {
  196. @@ -170,6 +175,7 @@
  197.  {
  198.      current->tss.error_code = 0;
  199.      current->tss.trap_no = 6;
  200. +    send_sig (SIGILL, current, 1);
  201.      die_if_kernel("Oops - undefined instruction", regs, mode, SIGILL);
  202.  }
  203.  
  204. @@ -177,6 +183,7 @@
  205.  {
  206.      current->tss.error_code = 0;
  207.      current->tss.trap_no = 11;
  208. +    send_sig (SIGBUS, current, 1);
  209.      die_if_kernel("Oops - address exception", regs, mode, SIGBUS);
  210.  }
  211.  
  212. diff -ubBwr linux.store/linux.arm/fs/exec.c linux/fs/exec.c
  213. --- linux.store/linux.arm/fs/exec.c    Sun Feb 11 13:50:43 1996
  214. +++ linux/fs/exec.c    Sun Mar  3 22:44:54 1996
  215. @@ -178,6 +178,8 @@
  216.      struct user dump;
  217.  #ifdef __alpha__
  218.  #       define START_DATA(u)    (u.start_data)
  219. +#elif defined(__arm__)
  220. +#    define START_DATA(u)    ((u.u_tsize << PAGE_SHIFT) + u.start_code)
  221.  #else
  222.  #       define START_DATA(u)    (u.u_tsize << PAGE_SHIFT)
  223.  #endif
  224. diff -ubBwr linux.store/linux.arm/kernel/fork.c linux/kernel/fork.c
  225. --- linux.store/linux.arm/kernel/fork.c    Sun Feb 11 09:33:02 1996
  226. +++ linux/kernel/fork.c    Mon Mar  4 14:50:31 1996
  227. @@ -214,6 +214,7 @@
  228.      new_stack = get_free_page(GFP_KERNEL);
  229.  #else
  230.      new_stack = (unsigned long) kmalloc(4096, GFP_KERNEL);
  231. +    memset ((void *)new_stack, 0, 4096);
  232.  #endif
  233.      if (!new_stack)
  234.          goto bad_fork_free_p;
  235.