]> git.neil.brown.name Git - history.git/commitdiff
Linux 2.0.36pre1 2.0.36pre1
authorAlan Cox <alan@lxorguk.ukuu.org.uk>
Fri, 23 Nov 2007 20:11:53 +0000 (15:11 -0500)
committerAlan Cox <alan@lxorguk.ukuu.org.uk>
Fri, 23 Nov 2007 20:11:53 +0000 (15:11 -0500)
I've put Linux 2.0.36 pre-patch-1 on ftp.uk.linux.org:/pub/linux/alan
This contains the following changes

o       The minicom beeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeep bug fix
o       non atomic kmalloc from IRQ in the lance error handler
o       3c59x update
o       Thunderlan update
o       The lp slowdown should be gone I hope
o       Amateur radio non module inits fix
o       vfat ... bug fix
o       obscure memory leak fix

and if you thought the last one was too big then you'll like this one. Its
4939 bytes compressed

Alan

13 files changed:
CREDITS
Documentation/networking/tlan.README
drivers/char/lp.c
drivers/char/tty_io.c
drivers/char/vt.c
drivers/net/3c59x.c
drivers/net/Changelog.tlan
drivers/net/lance.c
drivers/net/tlan.c
fs/super.c
fs/vfat/namei.c
net/core/dev.c
net/core/skbuff.c

diff --git a/CREDITS b/CREDITS
index 1780cb1514d75ee27925171d02d77c82113eafdd..eb38b247c9482ae1972363f5b562cf4f0d8a13fe 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -383,8 +383,8 @@ E: bj0rn@blox.se
 W: http://www.pi.se/blox/
 D: Extended support for loadable modules
 D: D-Link pocket adapter drivers
-S: Myrstuguv. 83
-S: S-143 32 VARBY
+S: Grevgatan 11
+S: S-114 53 Stockholm
 S: Sweden
 
 N: Fritz Elfert
index 5e9b68e63f3f2082058673d877f93ff869f66469..270fb0d63fe5b29d7961203665432e658160801d 100644 (file)
@@ -1,10 +1,11 @@
-TLAN driver for Linux, version 0.43
+TLAN driver for Linux, version 1.0
 README
 
-Note: I (James) am not maintaining this driver anymore, as I no longer
-       have the equipment to do so.  So it is available to anyone who
-       wishes to take it over ;)  If someone needs to reach me about
-       it, my new email address is james@sovereign.org.
+Well, I'm back.  The TLAN driver seems pretty stable, so I'm
+declaring this cycle of development finished, and calling the
+driver 1.0.  I will, of course continue to work on improving
+the driver, and work towards a 2.0 release.
+
 
 
 I.  Supported Devices.
index 6035bf7de57c1e3a636473a370f9b083350d0dca..96fe95824f821f88327a05877c3a038d1cfb095f 100644 (file)
@@ -94,8 +94,6 @@ static inline int lp_char_polled(char lpchar, int minor)
        do {
                status = LP_S(minor);
                count++;
-               if (need_resched)
-                       schedule();
        } while (LP_READY(minor, status) && (count<LP_CHAR(minor)));
        /* take strobe low */
        outb_p(( LP_PSELECP | LP_PINITP ), ( LP_C( minor )));
index 90051a4396da8f3aba0f90229361ff53e2b589e9..58c1b5528b7296ec1690d0c7e921a4aef2322bbc 100644 (file)
@@ -2049,9 +2049,6 @@ int tty_init(void)
 #ifdef CONFIG_RISCOM8
        riscom8_init();
 #endif
-#ifdef CONFIG_BAYCOM
-       baycom_init();
-#endif
 #ifdef CONFIG_SPECIALIX
        specialix_init();
 #endif
@@ -2059,4 +2056,3 @@ int tty_init(void)
        vcs_init();
        return 0;
 }
-
index af8992844d1562fe0d1f81b03b14c5ec57eedabf..8c9b2390b467c231cdbf8ed39e654b322aee3459 100644 (file)
@@ -172,8 +172,10 @@ _kd_mksound(unsigned int hz, unsigned int ticks)
        if (hz > 20 && hz < 32767)
                count = 1193180 / hz;
         
+        if (!count)
+               kd_nosound(0);
         /* ignore multiple simultaneous requests for sound */
-        if (!set_bit(0, &mksound_lock)) {
+        else if (!set_bit(0, &mksound_lock)) {
         /* set_bit in 2.0.x is same as test-and-set in 2.1.x */
                 del_timer(&sound_timer);
                 if (count) {
@@ -189,9 +191,7 @@ _kd_mksound(unsigned int hz, unsigned int ticks)
                                 sound_timer.expires = jiffies+ticks;
                                 add_timer(&sound_timer);
                         }
-                } else
-                        kd_nosound(0);
+               } 
                 mksound_lock = 0;
         }      
        return;
index b9331e60d431ea61fb76fe571b81bed1fea2d6be..889229892ab6ade92a6333536898e01558c1ca50 100644 (file)
@@ -20,9 +20,9 @@ static char *version =
 /* "Knobs" that adjust features and parameters. */
 /* Set the copy breakpoint for the copy-only-tiny-frames scheme.
    Setting to > 1512 effectively disables this feature. */
-static const int rx_copybreak = 200;
+static const rx_copybreak = 200;
 /* Allow setting MTU to a larger size, bypassing the normal ethernet setup. */
-static const int mtu = 1500;
+static const mtu = 1500;
 /* Maximum events (Rx packets, etc.) to handle at each interrupt. */
 static int max_interrupt_work = 20;
 
@@ -44,9 +44,7 @@ static int rx_nocopy = 0, rx_copy = 0, queued_packet = 0, rx_csumhits;
    programmed-I/O for Vortex cards.  Full-bus-master transfers are always
    enabled by default on Boomerang cards.  If VORTEX_BUS_MASTER is defined,
    the feature may be turned on using 'options'. */
-#if YOU_ARE_BRAVER_THAN_ME
 #define VORTEX_BUS_MASTER
-#endif
 
 /* A few values that may be tweaked. */
 /* Time in jiffies before concluding the transmitter is hung. */
@@ -194,7 +192,7 @@ XL, 3Com's PCI to 10/100baseT adapters.  It also works with the 10Mbs
 versions of the FastEtherLink cards.  The supported product IDs are
   3c590, 3c592, 3c595, 3c597, 3c900, 3c905
 
-The ISA 3c515 is supported with a separate driver, 3c515.c, included with
+The ISA 3c515 is supported with a seperate driver, 3c515.c, included with
 the kernel source or available from
     cesdis.gsfc.nasa.gov:/pub/linux/drivers/3c515.html
 
@@ -212,7 +210,7 @@ The 3c59x series use an interface that's very similar to the previous 3c5x9
 series.  The primary interface is two programmed-I/O FIFOs, with an
 alternate single-contiguous-region bus-master transfer (see next).
 
-The 3c900 "Boomerang" series uses a full-bus-master interface with separate
+The 3c900 "Boomerang" series uses a full-bus-master interface with seperate
 lists of transmit and receive descriptors, similar to the AMD LANCE/PCnet,
 DEC Tulip and Intel Speedo3.  The first chip version retains a compatible
 programmed-I/O interface that will be removed in the 'B' and subsequent
@@ -1342,7 +1340,7 @@ static void vortex_tx_timeout(struct device *dev)
 }
 
 /*
- * Handle uncommon interrupt sources.  This is a separate routine to minimize
+ * Handle uncommon interrupt sources.  This is a seperate routine to minimize
  * the cache impact.
  */
 static void
@@ -1761,7 +1759,8 @@ boomerang_rx(struct device *dev)
                printk(KERN_DEBUG "  In boomerang_rx(), status %4.4x, rx_status "
                           "%4.4x.\n",
                           inw(ioaddr+EL3_STATUS), inw(ioaddr+RxStatus));
-       while ((rx_status = vp->rx_ring[entry].status) & RxDComplete) {
+       while ((--rx_work_limit >= 0) &&
+                       ((rx_status = vp->rx_ring[entry].status) & RxDComplete)) {
                if (rx_status & RxDError) { /* Error, update stats. */
                        unsigned char rx_error = rx_status >> 16;
                        if (vortex_debug > 2)
@@ -1801,6 +1800,10 @@ boomerang_rx(struct device *dev)
                                void *temp;
                                /* Pass up the skbuff already on the Rx ring. */
                                skb = vp->rx_skbuff[entry];
+                               if (skb == NULL) {
+                                       printk(KERN_WARNING "%s: in boomerang_rx -- attempt to use NULL skb caught\n", dev->name);
+                                       break;
+                               }
                                vp->rx_skbuff[entry] = NULL;
 #if LINUX_VERSION_CODE >= 0x10300
                                temp = skb_put(skb, pkt_len);
@@ -1833,8 +1836,6 @@ boomerang_rx(struct device *dev)
                        vp->stats.rx_packets++;
                }
                entry = (++vp->cur_rx) % RX_RING_SIZE;
-               if (--rx_work_limit < 0)
-                       break;
        }
        /* Refill the Rx ring buffers. */
        for (; vp->dirty_rx < vp->cur_rx; vp->dirty_rx++) {
@@ -1842,8 +1843,10 @@ boomerang_rx(struct device *dev)
                entry = vp->dirty_rx % RX_RING_SIZE;
                if (vp->rx_skbuff[entry] == NULL) {
                        skb = DEV_ALLOC_SKB(PKT_BUF_SZ);
-                       if (skb == NULL)
+                       if (skb == NULL) {
+                               printk(KERN_DEBUG "%s: in boomerang_rx -- could not allocate skbuff\n", dev->name);
                                break;                  /* Bad news!  */
+                       }
                        skb->dev = dev;                 /* Mark as being used by this device. */
 #if LINUX_VERSION_CODE > 0x10300
                        skb_reserve(skb, 2);    /* Align IP on 16 byte boundaries */
@@ -1856,6 +1859,12 @@ boomerang_rx(struct device *dev)
                vp->rx_ring[entry].status = 0;  /* Clear complete bit. */
                outw(UpUnstall, ioaddr + EL3_CMD);
        }
+
+       if (vp->dirty_rx >= RX_RING_SIZE ) {
+               vp->cur_rx -= RX_RING_SIZE;
+               vp->dirty_rx -= RX_RING_SIZE;
+       }
+
        return 0;
 }
 
index 33e3b81f0c48432bccc95392940208bf6a9e9173..846c1dd9d72b4b20a905f04dac40f1a7f6ed9362 100644 (file)
@@ -1,5 +1,8 @@
 TLan Device Driver change log.
 
+1.0    - Stopped ignoring devices that didn't has the bus master
+         flag set.
+
 0.43   - Changed the id strings of the Compaq devices to their real
          names.
        - Added 2 other Olicom devices with a patch provided by
index d33808c1dc2a6f642fd138893f67e69b7ba55e8b..ac5f0aef6654857fc073a85d3ba92b91627696f8 100644 (file)
@@ -297,7 +297,7 @@ static unsigned char lance_need_isa_bounce_buffers = 1;
 
 static int lance_open(struct device *dev);
 static int lance_open_fail(struct device *dev);
-static void lance_init_ring(struct device *dev);
+static void lance_init_ring(struct device *dev, int mode);
 static int lance_start_xmit(struct sk_buff *skb, struct device *dev);
 static int lance_rx(struct device *dev);
 static void lance_interrupt(int irq, void *dev_id, struct pt_regs *regs);
@@ -746,7 +746,7 @@ lance_open(struct device *dev)
                           (u32) virt_to_bus(lp->rx_ring),
                           (u32) virt_to_bus(&lp->init_block));
 
-       lance_init_ring(dev);
+       lance_init_ring(dev, GFP_KERNEL);
        /* Re-initialize the LANCE, and start it when done. */
        outw(0x0001, ioaddr+LANCE_ADDR);
        outw((short) (u32) virt_to_bus(&lp->init_block), ioaddr+LANCE_DATA);
@@ -808,7 +808,7 @@ lance_purge_tx_ring(struct device *dev)
 
 /* Initialize the LANCE Rx and Tx rings. */
 static void
-lance_init_ring(struct device *dev)
+lance_init_ring(struct device *dev, int gfp)
 {
        struct lance_private *lp = (struct lance_private *)dev->priv;
        int i;
@@ -821,13 +821,13 @@ lance_init_ring(struct device *dev)
                struct sk_buff *skb;
                void *rx_buff;
 
-               skb = alloc_skb(PKT_BUF_SZ, GFP_DMA | GFP_KERNEL);
+               skb = alloc_skb(PKT_BUF_SZ, GFP_DMA | gfp);
                lp->rx_skbuff[i] = skb;
                if (skb) {
                        skb->dev = dev;
                        rx_buff = skb->tail;
                } else
-                       rx_buff = kmalloc(PKT_BUF_SZ, GFP_DMA | GFP_KERNEL);
+                       rx_buff = kmalloc(PKT_BUF_SZ, GFP_DMA | gfp);
                if (rx_buff == NULL)
                        lp->rx_ring[i].base = 0;
                else
@@ -858,7 +858,7 @@ lance_restart(struct device *dev, unsigned int csr0_bits, int must_reinit)
        if (must_reinit ||
                (chip_table[lp->chip_version].flags & LANCE_MUST_REINIT_RING)) {
                lance_purge_tx_ring(dev);
-               lance_init_ring(dev);
+               lance_init_ring(dev, GFP_ATOMIC);
        }
        outw(0x0000,    dev->base_addr + LANCE_ADDR);
        outw(csr0_bits, dev->base_addr + LANCE_DATA);
index 128f0683fee10710902aee32554a7c8a8178201a..c25e97a0727ab2e34beb62e3b566f3b6df66fc2d 100644 (file)
@@ -6,6 +6,7 @@
  *  by James Banks
  *
  *  (C) 1997-1998 Caldera, Inc.
+ *  (C) 1998 James Banks
  *
  *  This software may be used and distributed according to the terms
  *  of the GNU Public License, incorporated herein by reference.
@@ -58,8 +59,8 @@ static        int             duplex = 0;
 static int             speed = 0;
 static u8              *TLanPadBuffer;
 static char            TLanSignature[] = "TLAN";
-static int             TLanVersionMajor = 0;
-static int             TLanVersionMinor = 43;
+static int             TLanVersionMajor = 1;
+static int             TLanVersionMinor = 0;
 
 
 static TLanAdapterEntry TLanAdapterList[] = {
@@ -582,10 +583,7 @@ int TLan_PciProbe( u8 *pci_bus, u8 *pci_dfn, u8 *pci_irq, u8 *pci_rev, u32 *pci_
 
                        if ( ! ( pci_command & PCI_COMMAND_MASTER ) ) {
                                pcibios_write_config_word ( *pci_bus,  *pci_dfn, PCI_COMMAND, pci_command | PCI_COMMAND_MASTER );
-                               printk( "TLAN:  Attempting to activate busmastering.\n" );
-                               printk( "TLAN:    You may need to set busmastering to on in the CMOS\n" );
-                               printk( "TLAN:    before this card will work.\n" );
-                               *pci_io_base = 0;
+                               printk( "TLAN:  Activating PCI bus mastering for this device.\n" );
                        }
 
                        pci_index++;
index bbfbd20e0205c291b6866cd7cdefc9bff080ff0a..944fefd3dc2c1450860962351445ababaf9c4469 100644 (file)
@@ -973,7 +973,9 @@ static void do_mount_root(void)
 
 #ifdef CONFIG_BLK_DEV_FD
        if (MAJOR(ROOT_DEV) == FLOPPY_MAJOR) {
+#ifdef CONFIG_BLK_DEV_INITRD
                extern int rd_doload;
+#endif
                floppy_eject();
 #ifndef CONFIG_BLK_DEV_RAM
                printk(KERN_NOTICE "(Warning, this kernel has no ramdisk support)\n");
index ba8556cc7d17b8eea6272f272db59a0e04c1a54b..76d2b570a7fbcb4467096d3dc43b283224b7a325 100644 (file)
@@ -832,6 +832,9 @@ static int vfat_readdir_cb(
                if ((vf->len != name_len + 1) || (vf->name[name_len] != '.')) {
                        return 0;
                }
+               if (name_len == 2 && name[0] == '.' && name[1] == '.') {
+                       return 0;
+               }
        }
 
        s1 = name; s2 = vf->name;
index 1c9bbfc6fad7781aebb18233f2213b9f6c8fb929..4e46f9fe942a4696d1d1269add77375c575e9ca2 100644 (file)
@@ -1507,6 +1507,8 @@ extern int pt_init(void);
 extern int bpq_init(void);
 extern void sdla_setup(void);
 extern int dlci_setup(void);
+extern int sm_init(void);
+extern int baycom_init(void);
 
 int net_dev_init(void)
 {
@@ -1545,6 +1547,12 @@ int net_dev_init(void)
 #endif
 #if defined(CONFIG_SDLA)
        sdla_setup();
+#endif
+#if defined(CONFIG_BAYCOM)
+        baycom_init();
+#endif
+#if defined(CONFIG_SOUNDMODEM)
+        sm_init();
 #endif
        /*
         *      SLHC if present needs attaching so other people see it
index 8a40ca1e30c3774efc0100f4a8f90f4533506a62..1f74aedba5dcf2dcdff86a8abe501ac030fd8beb 100644 (file)
@@ -865,6 +865,11 @@ void skb_device_unlock(struct sk_buff *skb)
        if(skb->lock==0)
                net_locked--;
        restore_flags(flags);
+
+        if (skb->free == 3) {
+            skb->free = 1;
+            kfree_skb(skb, FREE_WRITE);
+        }
 }
 
 void dev_kfree_skb(struct sk_buff *skb, int mode)