1. 20 8月, 2006 21 次提交
    • A
      [PATCH] sundance section fix · 3418e469
      Andrew Morton 提交于
      drivers/net/sundance.c:110: error: version causes a section type conflict
      
      I don't understand this error.  It's referred to from both __init and
      __devinit code.  With CONFIG_HOTPLUG=n, version[] is placed in .init.data and
      is referred to from .init.text.
      
      Cc: Jeff Garzik <jeff@garzik.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      3418e469
    • A
      [PATCH] fealnx section fix · 90d5aed2
      Andrew Morton 提交于
      With CONFIG_HOTPLUG=n it won't compile:
      
      distcc[25607] ERROR: compile drivers/net/fealnx.c on g5/64 failed
      
      version[] is referred to from both __init code and from __devinit code, so
      move it out of __init altogether.
      
      Cc: Jeff Garzik <jeff@garzik.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      90d5aed2
    • A
      [PATCH] winbond-840 section fix · c9d26c97
      Andrew Morton 提交于
      With CONFIG_HOTPLUG=n it won't compile:
      
      drivers/net/tulip/winbond-840.c:141: error: version causes a section type conflict
      
      (For some reason it gets the same error if marked __initdata.  Give up.)
      
      Cc: Valerie Henson <val_henson@linux.intel.com>
      Cc: Jeff Garzik <jeff@garzik.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      c9d26c97
    • A
      [PATCH] seeq8005 section fix · c971ef46
      Andrew Morton 提交于
      WARNING: drivers/net/seeq8005.o - Section mismatch: reference to .init.text:seeq8005_probe from .text between 'init_module' (at offset 0x106) and 'seeq8005_open'
      
      Cc: Jeff Garzik <jeff@garzik.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      c971ef46
    • A
      [PATCH] ni65 section fix · 1e13b0d8
      Andrew Morton 提交于
      WARNING: drivers/net/ni65.o - Section mismatch: reference to .init.text:ni65_probe from .text between 'init_module' (at offset 0x54a) and 'ni65_stop_start'
      
      Cc: Jeff Garzik <jeff@garzik.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      1e13b0d8
    • A
      [PATCH] wd section fix · 5e5fa01d
      Andrew Morton 提交于
      WARNING: drivers/net/wd.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0xfd) and 'wd_open'
      WARNING: drivers/net/wd.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0x14b) and 'wd_open'
      WARNING: drivers/net/wd.o - Section mismatch: reference to .init.data:wd_portlist from .text between 'init_module' (at offset 0x17f) and 'wd_open'
      
      Cc: Jeff Garzik <jeff@garzik.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      5e5fa01d
    • A
      [PATCH] smctr section fix · daca7cd7
      Andrew Morton 提交于
      WARNING: drivers/net/tokenring/smctr.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0x2ba0) and 'smctr_reset_adapter'
      WARNING: drivers/net/tokenring/smctr.o - Section mismatch: reference to .init.text:smctr_probe from .text between 'init_module' (at offset 0x2bf4) and 'smctr_reset_adapter'
      
      Cc: Jeff Garzik <jeff@garzik.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      daca7cd7
    • A
      [PATCH] ibmtr section fix · 6d2cdb4f
      Andrew Morton 提交于
      WARNING: drivers/net/tokenring/ibmtr.o - Section mismatch: reference to .init.data:ibmtr_mem_base from .text between 'ibmtr_probe1' (at offset 0x6e6) and 'ibmtr_probe_card'
      WARNING: drivers/net/tokenring/ibmtr.o - Section mismatch: reference to .init.data:ibmtr_mem_base from .text between 'ibmtr_probe1' (at offset 0x74a) and 'ibmtr_probe_card'
      WARNING: drivers/net/tokenring/ibmtr.o - Section mismatch: reference to .init.data:ibmtr_mem_base from .text between 'ibmtr_probe1' (at offset 0x7fd) and 'ibmtr_probe_card'
      
      Cc: Jeff Garzik <jeff@garzik.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      6d2cdb4f
    • A
      [PATCH] ni52 section fix · 19a8664d
      Andrew Morton 提交于
      WARNING: drivers/net/ni52.o - Section mismatch: reference to .init.text:ni52_probe from .text between 'init_module' (at offset 0x997) and 'ni52_close'
      WARNING: drivers/net/ni65.o - Section mismatch: reference to .init.text:ni65_probe from .text between 'init_module' (at offset 0x54a) and 'ni65_stop_start'
      
      Cc: Jeff Garzik <jeff@garzik.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      19a8664d
    • A
      [PATCH] lne390 section fix · dab3d02e
      Andrew Morton 提交于
      WARNING: drivers/net/lne390.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0x100) and 'lne390_close'
      
      Cc: Jeff Garzik <jeff@garzik.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      dab3d02e
    • A
      [PATCH] lance section fix · 3805f0e2
      Andrew Morton 提交于
      WARNING: drivers/net/lance.o - Section mismatch: reference to .init.data:lance_portlist from .text between 'init_module' (at offset 0x8d3) and 'lance_purge_ring'
      Cc: Jeff Garzik <jeff@garzik.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      3805f0e2
    • A
      [PATCH] eth16i section fix · 58f149fc
      Andrew Morton 提交于
      WARNING: drivers/net/eth16i.o - Section mismatch: reference to .init.data:cardname from .text between 'init_module' (at offset 0x6d2) and 'eth16i_multicast'
      WARNING: drivers/net/eth16i.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0x6ef) and 'eth16i_multicast'
      WARNING: drivers/net/eth16i.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0x702) and 'eth16i_multicast'
      WARNING: drivers/net/eth16i.o - Section mismatch: reference to .init.data:cardname from .text between 'init_module' (at offset 0x70e) and 'eth16i_multicast'
      WARNING: drivers/net/eth16i.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0x71d) and 'eth16i_multicast'
      WARNING: drivers/net/eth16i.o - Section mismatch: reference to .init.data:cardname from .text between 'init_module' (at offset 0x729) and 'eth16i_multicast'
      
      Cc: Jeff Garzik <jeff@garzik.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      58f149fc
    • A
      [PATCH] es3210 section fix · 5757f5c6
      Andrew Morton 提交于
      WARNING: drivers/net/es3210.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0xdf) and 'es_close'
      WARNING: drivers/net/es3210.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0x100) and 'es_close'
      
      Cc: Jeff Garzik <jeff@garzik.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      5757f5c6
    • A
      [PATCH] eexpress section fix · b1176b95
      Andrew Morton 提交于
      WARNING: drivers/net/eexpress.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0x6c3) and 'eexp_hw_lasttxstat'
      WARNING: drivers/net/eexpress.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0x74f) and 'eexp_hw_lasttxstat'
      
      Cc: Jeff Garzik <jeff@garzik.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      b1176b95
    • A
      [PATCH] eepro section fix · 02a3245f
      Andrew Morton 提交于
      WARNING: drivers/net/eepro.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0x284) and 'eepro_ethtool_get_drvinfo'
      WARNING: drivers/net/eepro.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0x2a7) and 'eepro_ethtool_get_drvinfo'
      WARNING: drivers/net/eepro.o - Section mismatch: reference to .init.data:eepro_portlist from .text between 'init_module' (at offset 0x2b3) and 'eepro_ethtool_get_drvinfo'
      
      Cc: Jeff Garzik <jeff@garzik.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      02a3245f
    • A
      [PATCH] e2100 section fix · d543cbb6
      Andrew Morton 提交于
      WARNING: drivers/net/e2100.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0xd9) and 'e21_reset_8390'
      
      Cc: Jeff Garzik <jeff@garzik.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      d543cbb6
    • A
      [PATCH] at1700 section fix · 5d930108
      Andrew Morton 提交于
      WARNING: drivers/net/at1700.o - Section mismatch: reference to .init.text:at1700_probe from .text between 'init_module' (at offset 0x75) and 'net_get_stats'
      
      Cc: Jeff Garzik <jeff@garzik.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      5d930108
    • A
      [PATCH] cs89x0 section fix · e26c129a
      Andrew Morton 提交于
      WARNING: drivers/net/cs89x0.o - Section mismatch: reference to .init.data:version from .text between 'init_module' (at offset 0x13d8) and 'net_get_stats'
      WARNING: drivers/net/cs89x0.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0x1634) and 'net_get_stats'
      WARNING: drivers/net/cs89x0.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0x1a1f) and 'net_get_stats'
      
      Cc: Jeff Garzik <jeff@garzik.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      e26c129a
    • A
      [PATCH] cops section fix · 5f3bc456
      Andrew Morton 提交于
      WARNING: drivers/net/appletalk/cops.o - Section mismatch: reference to .init.text:cops_probe from .text between 'init_module' (at offset 0xae) and 'cops_rx'
      
      Cc: "David S. Miller" <davem@davemloft.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      5f3bc456
    • A
      [PATCH] ac3200 section fixes · 62a87b80
      Andrew Morton 提交于
      WARNING: drivers/net/ac3200.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0xf9) and 'ac_close_card'
      
      Cc: Jeff Garzik <jeff@garzik.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      62a87b80
    • A
      [PATCH] 82596 section fixes · 864fe05d
      Andrew Morton 提交于
      WARNING: drivers/net/82596.o - Section mismatch: reference to .init.text:i82596_probe from .text between 'init_module' (at offset 0x141) and 'i596_add_cmd'
      
      Also nail a couple of crazy inlines.
      
      Cc: Jeff Garzik <jeff@garzik.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      864fe05d
  2. 18 8月, 2006 3 次提交
    • P
      [PPP]: handle kmalloc failures and convert to using kzalloc · d4274b51
      Panagiotis Issaris 提交于
      The PPP code contains two kmalloc()s followed by memset()s without
      handling a possible memory allocation failure.  (Suggested by Joe
      Perches).
      
      And furthermore, conversions from kmalloc+memset to kzalloc.
      
      [akpm@osdl.org: fix error-path leak]
      [akpm@osdl.org: cleanups]
      [paulus@samba.org: don't add useless printk and cardmap_destroy calls]
      Signed-off-by: NPanagiotis Issaris <takis@issaris.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d4274b51
    • M
      [BNX2]: Convert to netdev_alloc_skb() · 932f3772
      Michael Chan 提交于
      Convert dev_alloc_skb() to netdev_alloc_skb() and increase default
      rx ring size to 255. The old ring size of 100 was too small.
      
      Update version to 1.4.44.
      Signed-off-by: NMichael Chan <mchan@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      932f3772
    • M
      [BNX2]: Fix tx race condition. · 2f8af120
      Michael Chan 提交于
      Fix a subtle race condition between bnx2_start_xmit() and bnx2_tx_int()
      similar to the one in tg3 discovered by Herbert Xu:
      
      CPU0					CPU1
      bnx2_start_xmit()
      	if (tx_ring_full) {
      		tx_lock
      					bnx2_tx()
      						if (!netif_queue_stopped)
      		netif_stop_queue()
      		if (!tx_ring_full)
      						update_tx_ring
      			netif_wake_queue()
      		tx_unlock
      	}
      
      Even though tx_ring is updated before the if statement in bnx2_tx_int() in
      program order, it can be re-ordered by the CPU as shown above.  This
      scenario can cause the tx queue to be stopped forever if bnx2_tx_int() has
      just freed up the entire tx_ring.  The possibility of this happening
      should be very rare though.
      
      The following changes are made, very much identical to the tg3 fix:
      
      1. Add memory barrier to fix the above race condition.
      
      2. Eliminate the private tx_lock altogether and rely solely on
      netif_tx_lock.  This eliminates one spinlock in bnx2_start_xmit()
      when the ring is full.
      
      3. Because of 2, use netif_tx_lock in bnx2_tx_int() before calling
      netif_wake_queue().
      
      4. Add memory barrier to bnx2_tx_avail().
      
      5. Add bp->tx_wake_thresh which is set to half the tx ring size.
      
      6. Check for the full wake queue condition before getting
      netif_tx_lock in tg3_tx().  This reduces the number of unnecessary
      spinlocks when the tx ring is full in a steady-state condition.
      Signed-off-by: NMichael Chan <mchan@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2f8af120
  3. 15 8月, 2006 1 次提交
  4. 10 8月, 2006 1 次提交
  5. 09 8月, 2006 1 次提交
  6. 08 8月, 2006 2 次提交
    • M
      [TG3]: Fix tx race condition · 1b2a7205
      Michael Chan 提交于
      Fix a subtle race condition between tg3_start_xmit() and tg3_tx()
      discovered by Herbert Xu <herbert@gondor.apana.org.au>:
      
      CPU0					CPU1
      tg3_start_xmit()
      	if (tx_ring_full) {
      		tx_lock
      					tg3_tx()
      						if (!netif_queue_stopped)
      		netif_stop_queue()
      		if (!tx_ring_full)
      						update_tx_ring 
      			netif_wake_queue()
      		tx_unlock
      	}
      
      Even though tx_ring is updated before the if statement in tg3_tx() in
      program order, it can be re-ordered by the CPU as shown above.  This
      scenario can cause the tx queue to be stopped forever if tg3_tx() has
      just freed up the entire tx_ring.  The possibility of this happening
      should be very rare though.
      
      The following changes are made:
      
      1. Add memory barrier to fix the above race condition.
      
      2. Eliminate the private tx_lock altogether and rely solely on
      netif_tx_lock.  This eliminates one spinlock in tg3_start_xmit()
      when the ring is full.
      
      3. Because of 2, use netif_tx_lock in tg3_tx() before calling
      netif_wake_queue().
      
      4. Change TX_BUFFS_AVAIL to an inline function with a memory barrier.
      Herbert and David suggested using the memory barrier instead of
      volatile.
      
      5. Check for the full wake queue condition before getting
      netif_tx_lock in tg3_tx().  This reduces the number of unnecessary
      spinlocks when the tx ring is full in a steady-state condition.
      
      6. Update version to 3.65.
      Signed-off-by: NMichael Chan <mchan@broadcom.com>
      Acked-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1b2a7205
    • C
      [TG3]: skb->dev assignment is done by netdev_alloc_skb · d14cc9a3
      Christoph Hellwig 提交于
      All caller of netdev_alloc_skb need to assign skb->dev shortly
      afterwards.  Move it into common code.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d14cc9a3
  7. 04 8月, 2006 5 次提交
  8. 03 8月, 2006 6 次提交