1
0
Fork 0
Commit Graph

2225 Commits (a6b2c5d4754dc539a560fdf0d3fb78a14174394a)

Author SHA1 Message Date
Linus Torvalds 9cfe864842 Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [NETFILTER]: SNMP NAT: fix memory corruption
  [IRDA]: fixup type of ->lsap_state
  [IRDA]: fix 16/32 bit confusion
  [NET]: Fix "ntohl(ntohs" bugs
  [BNX2]: Use kmalloc instead of array
  [BNX2]: Fix bug in bnx2_nvram_write()
  [TG3]: Add some missing rx error counters
2006-05-23 10:40:19 -07:00
Florin Malita bb6e093da2 [PATCH] orinoco: possible null pointer dereference in orinoco_rx_monitor()
If the skb allocation fails, the current error path calls
dev_kfree_skb_irq() with a NULL argument.  Also, 'err' is not being used.

Coverity CID: 275.

Signed-off-by: Florin Malita <fmalita@gmail.com>
Cc: "John W. Linville" <linville@tuxdriver.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-23 10:35:32 -07:00
Michael Chan ae181bc44c [BNX2]: Use kmalloc instead of array
Use kmalloc() instead of a local array in bnx2_nvram_write().

Update version to 1.4.40.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-05-22 16:39:20 -07:00
Michael Chan bae25761c9 [BNX2]: Fix bug in bnx2_nvram_write()
Fix a bug in bnx2_nvram_write() caused by a counter variable not
correctly incremented by 4.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-05-22 16:38:38 -07:00
Michael Chan 463d305bc5 [TG3]: Add some missing rx error counters
Add some missing rx error counters for 5705 and newer chips.

Update version to 3.58.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-05-22 16:36:27 -07:00
Ayaz Abdulla 84b3932bf0 [PATCH] forcedeth: fix multi irq issues
With Manfred Spraul <manfred@colorfullife.com> and
     Andrew Morton <akpm@osdl.org>

Bring back this recently-reverted patch, only fixed.

Original changelog:

    From: Ayaz Abdulla <aabdulla@nvidia.com>

    This patch fixes the issues with multiple irqs.

    I am resending based on feedback. I decoupled the dma mask for
    consistent memory and fixed leak with multiple irq in error path.

    Thanks to Manfred for catching the spin lock problem.

Fix it:

    From: Manfred Spraul <manfred@colorfullife.com>

    Fix bug introduced by ebf34c9b6f, covered in
    http://bugzilla.kernel.org/show_bug.cgi?id=6568.

    Remove second instance of the request_irq() calls: they were moved
    from nv_open into nv_request_irq.

    Thanks to Alistair Strachan <alistair@devzero.co.uk> for reporting and
    persisting.

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: Manfred Spraul <manfred@colorfullife.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-21 12:59:16 -07:00
Erling A. Jacobsen bb02aacc02 [PATCH] winbond-840-remove-badness-in-pci_map_single
Call pci_map_single() with the actual size of the receive
buffers, not 0 (which skb->len is initialized to by dev_alloc_skb()).

Signed-off-by: Erling A. Jacobsen <linuxcub@email.dk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-05-20 00:20:29 -04:00
Komuro f905703a93 [PATCH] network: axnet_cs: bug fix multicast code (support older ax88190 chipset)
Dear Jeff

axnet_cs: bug fix multicast code (support older ax88190 chipset)

Signed-off-by: komurojun-mbn@nifty.com

Best Regards
Komuro
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-05-20 00:20:29 -04:00
Stephen Hemminger a06631cbdc [PATCH] skge: don't allow transmit ring to be too small
The driver will get stuck (permanent transmit timeout), if the transmit
ring size is set too small.  It needs to have enough ring elements to
hold one maximum size transmit.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-05-20 00:17:07 -04:00
Stephen Hemminger 20e777a2a7 [PATCH] skge: bad checksums on big-endian platforms
Skge driver always causes  bad checksums on big-endian.
The checksum in the receive control block was being swapped
when it doesn't need to be.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-05-20 00:17:07 -04:00
Jeff Garzik e988bcdbe9 Merge branch 'upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into upstream-fixes 2006-05-20 00:16:17 -04:00
Stephen Hemminger c9b84dcac6 [PATCH] sky2 version 1.4
Need to track impact of this group of changes.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-05-20 00:15:39 -04:00
Stephen Hemminger 86fba6342d [PATCH] sky2: force NAPI repoll if busy
If the status ring processing can't keep up with the incoming frames,
it is more efficient to have NAPI keep scheduling the poll routine
rather than causing another interrupt.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-05-20 00:15:39 -04:00
Stephen Hemminger 86a31a759f [PATCH] sky2: more fixes for Yukon Ultra
Logic error in the phy initialization code. Also, turn on wake on lan
bit in status control.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-05-20 00:15:39 -04:00
Stephen Hemminger 2d2a387199 [PATCH] Subjec: sky2, skge: correct PCI id for DGE-560T
The Dlink DGE-560T uses Yukon2 chipset so it needs sky2 driver; and
the DGE-530T uses Yukon1 so it uses skge driver.

Bug: http://bugzilla.kernel.org/show_bug.cgi?id=6544

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-05-20 00:15:39 -04:00
Stephen Hemminger ee7abb04df [PATCH] sky2: allow dual port usage
If both ports are receiving on the SysKonnect dual port cards,
then it appears the bus interface unit can give an interrupt status
for frame before DMA has completed.  This leads to bogus frames
and general confusion. This is why receive checksumming is also
messed up on dual port cards.

A workaround for the out of order receive problem is to eliminating
split transactions on PCI-X.

This version is based of the current linux-2.6.git including earlier
patch to disable dual ports.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-05-20 00:15:39 -04:00
John W. Linville 38bb6b288b [PATCH] via-rhine: revert "change mdelay to msleep and remove from ISR path"
Revert previous patch with subject "change mdelay to msleep and remove
from ISR path".  This patch seems to have caused bigger problems than
it solved, and it didn't solve much of a problem to begin with...

Discussion about backing-out this patch can be found here:

	http://marc.theaimsgroup.com/?l=linux-netdev&m=114321570402396&w=2

The git commit associated w/ the original patch is:

	6ba98d311d

Signed-off-by: John W. Linville <linville@tuxdriver.com
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-05-20 00:14:49 -04:00
Andrew Morton f34ba4e1ed [PATCH] revert "forcedeth: fix multi irq issues"
Revert ebf34c9b6f.  Maybe.  Due to crashes
at shutdown - see http://bugzilla.kernel.org/show_bug.cgi?id=6568.

Cc: Ayaz Abdulla <aabdulla@nvidia.com>
Cc: Manfred Spraul <manfred@colorfullife.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-05-20 00:13:05 -04:00
Linus Torvalds 9676489866 Merge git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/netdev-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/netdev-2.6:
  sky2: prevent dual port receiver problems
  x86_64: Check for bad dma address in b44 1GB DMA workaround
  The ixp2000 driver for the enp2611 was developed on a board with
2006-05-17 16:13:25 -07:00
David Woodhouse bc519f30eb [PATCH] bcm43xx: associate on 'ifconfig up'
I still need this hack to work around the fact that softmac doesn't
attempt to associate when we bring the device up...

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-05-17 14:53:19 -04:00
Andi Kleen 639b421b91 [PATCH] x86_64: Check for bad dma address in b44 1GB DMA workaround
Needed for interaction with the nommu code in x86-64 which
will return bad_dma_address if the address exceeds dma_mask.

Cc: netdev@vger.kernel.org
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-16 07:59:31 -07:00
Stephen Hemminger 843a46f423 sky2: prevent dual port receiver problems
When both ports are receiving simultaneously, the receive logic gets confused
and may pass up a packet before it is full. This causes hangs, and IP will see
lots of garbage packets. There is even the potential for data corruption if
a later arriving packet DMA's into freed memory.

It looks like a hardware bug because status arrives for a packet but no
data is there. Until this bug is worked out, block the user from bringing
up both ports at once.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-05-15 12:35:01 -07:00
Andi Kleen de54bc0f00 x86_64: Check for bad dma address in b44 1GB DMA workaround
Needed for interaction with the nommu code in x86-64 which
will return bad_dma_address if the address exceeds dma_mask.

Cc: netdev@vger.kernel.org

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-05-15 12:26:00 -07:00
Lennert Buytenhek 1ea739a5f9 The ixp2000 driver for the enp2611 was developed on a board with
three gigabit ports, but some enp2611 models only have two ports
(and only one onboard PM3386.)  The current driver assumes there
are always three ports and so it doesn't work on the two-port
version of the board at all.

This patch adds a bit of logic to the enp2611 driver to limit the
number of ports to 2 if the second PM3386 isn't detected.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-05-15 12:25:29 -07:00
Andrew Morton c4694c76ce [PATCH] dl2k needs dma-mapping.h
On alpha:

drivers/net/dl2k.c: In function `rio_free_tx':
drivers/net/dl2k.c:768: error: `DMA_48BIT_MASK' undeclared (first use in this function)
drivers/net/dl2k.c:768: error: (Each undeclared identifier is reported only once
drivers/net/dl2k.c:768: error: for each function it appears in.)
drivers/net/dl2k.c: In function `receive_packet':
drivers/net/dl2k.c:896: error: `DMA_48BIT_MASK' undeclared (first use in this function)
drivers/net/dl2k.c: In function `rio_close':
drivers/net/dl2k.c:1803: error: `DMA_48BIT_MASK' undeclared (first use in this function)

Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-15 11:20:58 -07:00
Karsten Keil ef34814426 [TG3]: ethtool always report port is TP.
Even with fiber cards ethtool reports that the connected port is TP,
the patch fix this.

Signed-off-by: Karsten Keil <kkeil@suse.de>
Acked-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-05-12 12:49:08 -07:00
Linus Torvalds 6572b2064a Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [NET_SCHED]: HFSC: fix thinko in hfsc_adjust_levels()
  [IPV6]: skb leakage in inet6_csk_xmit
  [BRIDGE]: Do sysfs registration inside rtnl.
  [NET]: Do sysfs registration as part of register_netdevice.
  [TG3]: Fix possible NULL deref in tg3_run_loopback().
  [NET] linkwatch: Handle jiffies wrap-around
  [IRDA]: Switching to a workqueue for the SIR work
  [IRDA]: smsc-ircc: Minimal hotplug support.
  [IRDA]: Removing unused EXPORT_SYMBOLs
  [IRDA]: New maintainer.
  [NET]: Make netdev_chain a raw notifier.
  [IPV4]: ip_options_fragment() has no effect on fragmentation
  [NET]: Add missing operstates documentation.
2006-05-11 15:35:54 -07:00
Linus Torvalds 6314410dd1 Merge branch 'upstream' of master.kernel.org:/pub/scm/linux/kernel/git/shemminger/netdev-2.6
* 'upstream' of master.kernel.org:/pub/scm/linux/kernel/git/shemminger/netdev-2.6:
  sis900: phy for FoxCon motherboard
  dl2k: use DMA_48BIT_MASK constant
  phy: mdiobus_register(): initialize all phy_map entries
  sky2: ifdown kills irq mask
2006-05-10 14:59:29 -07:00
James Cameron d8e95e52a9 sis900: phy for FoxCon motherboard
661FX7MI-S motherboard which uses the SiS 661FX chipset.  The patch adds
an entry to mii_chip_info for the transceiver.

The PHY ids were found using the sis900_c_122.diff patch from
http://brownhat.org/sis900.html but that patch didn't solve the problem,
because the PHY at address 1 was already being chosen.

Without my patch, when bursts of packets arrive from other hosts on a
LAN, the interface dropped one roughly 10% of the time, causing
retransmits.  There were fifth second pauses in refresh of large xterms,
and it made Netrek suck.  I can provide further test data.

Workaround in lieu of patch is to use mii-tool to advertise
100baseTx-HD, then force renegotiation.

I wasn't able to identify the actual transceiver, so the description
field is a guess.

This patch is similar to Artur Skawina's patch:
http://marc.theaimsgroup.com/?l=linux-netdev&m=114297516729079&w=2

I'm not sure, but I wonder if it means the default behaviour should be
changed, so as to better handle future transceivers.

Diff is against 2.6.16.13.

Signed-off-by: James Cameron <james.cameron@hp.com>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-05-10 14:04:52 -07:00
Francois Romieu 4c1b46226c dl2k: use DMA_48BIT_MASK constant
Typo will be harder with this one.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-05-10 14:04:22 -07:00
Herbert Valerio Riedel 64b1c2b42b phy: mdiobus_register(): initialize all phy_map entries
make sure phy_map entries whose PHY address is masked are initialized
to NULL, given that other code (such as mdiobus_unregister for
instance) assumes that non-NULL phy_map entries are allocated
phy_devices

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-05-10 14:03:57 -07:00
Stephen Hemminger f4ea431bb7 sky2: ifdown kills irq mask
Bringing down a port also masks off the status and other IRQ's
needed for device to function due to missing paren's.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-05-10 14:03:41 -07:00
Jesper Juhl a50bb7b9af [TG3]: Fix possible NULL deref in tg3_run_loopback().
tg3_run_loopback doesn't check that dev_alloc_skb() returns anything
useful.

Even if dev_alloc_skb() fails to return an skb to us we'll happily go
on and assume it did, so we risk dereferencing a NULL pointer.  Much
better to fail gracefully by returning -ENOMEM than crashing here.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-05-09 23:14:35 -07:00
Christoph Hellwig 788252e661 [IRDA]: Switching to a workqueue for the SIR work
Since sir_kthread.c pretty much duplicates the workqueue
functionality, we'd better switch.  The SIR fsm has been merged into
sir_dev.c and thus sir_kthread.c is deleted.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Samuel Ortiz <samuel.ortiz@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-05-09 15:27:04 -07:00
David Brownell d94c77b9b5 [IRDA]: smsc-ircc: Minimal hotplug support.
Minimal PNP hotplug support for the smsc-ircc2 driver.  A modular
driver will be modprobed via hotplug, but still bypasses driver model
probing.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Samuel Ortiz <samuel.ortiz@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-05-09 15:26:11 -07:00
Stephen Hemminger 23aee82e75 Merge branch 'upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 2006-05-08 16:01:20 -07:00
Jens Osterkamp 8ec9345965 spidernet: enable support for bcm5461 ethernet phy
A newer board revision changed the type of ethernet phy.
Moreover, this generalizes the way that a phy gets switched
into fiber mode when autodetection is not available.

Signed-off-by: Jens Osterkamp <Jens.Osterkamp@de.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-05-08 16:01:12 -07:00
Jens Osterkamp b636d17a3b spidernet: introduce new setting
We found a new chip setting that we need in order
to make the driver work more reliable.

Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-05-08 16:01:11 -07:00
Sergei Shtylyov aedc0e520e Fix RTL8019AS init for Toshiba RBTX49xx boards
Ensure that 8-bit mode is selected for the on-board Realtek RTL8019AS chip
on Toshiba RBHMA4x00, get rid of the duplicate #ifdef's when setting
ei_status.word16.
    The chip's datasheet says that the PSTOP register shouldn't exceed 0x60 in
8-bit mode -- ensure this too.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-05-08 16:00:58 -07:00
Herbert Valerio Riedel 8cd35da094 au1000_eth.c: use ether_crc() from <linux/crc32.h>
since the au1000 driver already selects the CRC32 routines, simply replace
the internal ether_crc() implementation with the semantically equivalent
one from <linux/crc32.h>

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-05-08 16:00:47 -07:00
Stephen Hemminger 6d4b0f617d sky2: version 1.3
Update version number, to track changes.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-05-08 16:00:28 -07:00
Stephen Hemminger ed6d32c7a9 Add more support for the Yukon Ultra chip found in dual core centino laptops.
The newest Yukon Ultra chipset's require more special tweaks.
They seem to be like the Yukon XL chipsets. This code is transliterated
from the latest SysKonnect driver; I don't have any Ultra hardware.

Signed-off-by: Stephe Hemminger <shemminger@osdl.org>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-05-08 16:00:27 -07:00
Stephen Hemminger 72cb852920 sky2: synchronize irq on remove
Need to make sure interrupt is not racing with unregister of
network device.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-05-08 16:00:27 -07:00
Stephen Hemminger e71ebd7327 sky2: dont write status ring
It is more efficient not to write the status ring from the
processor and just read the active portion.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-05-08 16:00:27 -07:00
Stephen Hemminger 01bd75645f sky2: edge triggered workaround enhancement
Need to make the edge-triggered workaround timer faster to get marginally
better peformance. The test_and_set_bit in schedule_prep() acts as a barrier
already. Make it a module parameter so that laptops who are concerned
about power can set it to 0; and user's stuck with broken BIOS's
can turn the driver into pure polling.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-05-08 16:00:27 -07:00
Stephen Hemminger cb5d954730 sky2: use mask instead of modulo operation
Gcc isn't smart enough to know that it can do a modulo
operation with power of 2 constant by doing a mask.
So add macro to do it for us.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-05-08 16:00:27 -07:00
Stephen Hemminger f55925d7eb sky2: tx ring index mask fix
Mask for transmit ring status was picking up bits from the
unused sync ring.  They were always zero, so far...
Also, make sure to remind self not to make tx ring too big.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-05-08 16:00:25 -07:00
Stephen Hemminger 1e5f1283a2 sky2: status irq hang fix
The status interrupt flag should be cleared before processing,
not afterwards to avoid race. Need to process in poll routine
even if no new interrupt status. This is a normal occurrence when
more than 64 frames (NAPI weight) are processed in one poll routine.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-05-08 16:00:24 -07:00
Stephen Hemminger d324031245 sky2: backout NAPI reschedule
This is a backout of earlier patch.

The whole rescheduling hack was a bad idea. It doesn't really solve
the problem and it makes the code more complicated for no good reason.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-05-08 16:00:23 -07:00
Randy Dunlap 0eb1bd210d [IRDA] irda-usb: use NULL instead of 0
Use NULL instead of 0 for a null pointer value (sparse warning):

drivers/net/irda/irda-usb.c:1781:30: warning: Using plain integer as NULL pointer

Also, correct timeout argument to use milliseconds instead of jiffies.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-05-06 18:34:10 -07:00