summaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2.c
Commit message (Collapse)AuthorAgeFilesLines
* [PATCH] net drivers: fix section attributes for gccRandy Dunlap2006-04-121-1/+1
| | | | | | | | | | | | | | | If CONFIG_HOTPLUG=n, gcc doesn't like some __initdata to be const (rodata) and other __initdata not const, so make the non-const __initdata const. gcc errors: drivers/net/bnx2.c:66: error: version causes a section type conflict drivers/net/starfire.c:338: error: version causes a section type conflict drivers/net/typhoon.c:137: error: version causes a section type conflict drivers/net/natsemi.c:241: error: version causes a section type conflict Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* [BNX2]: Update version and reldateMichael Chan2006-03-231-2/+2
| | | | | | | Update version to 1.4.39. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: Separate tx producer and consumer fieldsMichael Chan2006-03-231-0/+1
| | | | | | | | Put the tx producer and consumer fields in separate cache lines in the device structure, similar to the VJ net channel queue structure. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: Move .h files to bnx2.cMichael Chan2006-03-231-0/+40
| | | | | | | Move all #include <> from bnx2.h to bnx2.c. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: Combine small mem allocationsMichael Chan2006-03-231-19/+15
| | | | | | | | | | | | Combine two small (56 byte and 320 byte) pci consistent memory allocations into one allocation. Jeff Garzik suggested to store the combined size in the bp structure for later use when freeing the memory. Use kzalloc() instead of kmalloc() + memset(). Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: Fix link change handlingMichael Chan2006-03-231-12/+17
| | | | | | | | | | | Fix some link-related problems by doing a coalesce_now after link change interrupt to flush out the transient link status. To facilitate this, the host coalesce cmd register value is cached in the device structure. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: include <linux/vmalloc.h>Michael Chan2006-03-201-2/+2
| | | | | | | | | Include <linux/vmalloc.h> so that it compiles properly on all archs. Update version to 1.4.38. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: Update versionMichael Chan2006-03-201-2/+3
| | | | | | | | | | Update version to 1.4.37. Add missing flush_scheduled_work() in bnx2_suspend as noted by Jeff Garzik. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: Support larger rx ring sizes (part 2)Michael Chan2006-03-201-2/+2
| | | | | | | Support bigger rx ring sizes (up to 1020) in the rx fast path. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: Support larger rx ring sizes (part 1)Michael Chan2006-03-201-32/+85
| | | | | | | | | | | | | | | | | | | | Increase maximum receive ring size from 255 to 1020 by supporting up to 4 linked pages of receive descriptors. To accomodate the higher memory usage, each physical descriptor page is allocated separately and the software ring that keeps track of the SKBs and the DMA addresses is allocated using vmalloc. Some of the receive-related fields in the bp structure are re- organized a bit for better locality of reference. The max. was reduced to 1020 from 4080 after discussion with David Miller. This patch contains ring init code changes only. This next patch contains rx data path code changes. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: Fix bug when rx ring is fullMichael Chan2006-03-201-16/+25
| | | | | | | | | | | Fix the rx code path that does not handle the full rx ring correctly. When the rx ring is set to the max. size (i.e. 255), the consumer and producer indices will be the same when completing an rx packet. Fix the rx code to handle this condition properly. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: Add ethtool -d supportMichael Chan2006-03-201-0/+60
| | | | | | | Add ETHTOOL_GREGS support. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: Reduce register test sizeMichael Chan2006-03-201-254/+0
| | | | | | | | Eliminate some of the registers in ethtool register test to reduce driver size. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Massive net driver const-ification.Arjan van de Ven2006-03-031-5/+5
|
* [BNX2]: Update version and copyright yearMichael Chan2006-01-231-6/+5
| | | | | | | | | Update version to 1.4.31 and add 2006 copyright. Skip the last digit when reporting the firmware version. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: Add PHY loopback testMichael Chan2006-01-231-22/+79
| | | | | | | Enhance the ethtool loopback test with PHY loopback test. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: Use netdev_priv()Michael Chan2006-01-231-40/+40
| | | | | | | Replace dev->priv with netdev_priv(dev) Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: Fix nvram sizingMichael Chan2006-01-231-3/+10
| | | | | | | Add code to correctly determine nvram size. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: Workaround hw interrupt bugMichael Chan2006-01-231-2/+17
| | | | | | | | | Add workaround for a hardware interrupt issue. When using INTA, unmasking of the interrupt and the tag update should be done separately to avoid some spurious interrupts, Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: Fix UDP checksum verificationMichael Chan2006-01-231-7/+5
| | | | | | | | | | | | Fix TCP/UDP checksum verification. Use status bits in the buffer descriptor instead of the checksum value to verify rx checksum. Using the checksum value will be incorrect if the UDP packet has zero in the UDP checksum field. Firmware update required for this fix. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: Misc. fixesMichael Chan2006-01-231-6/+14
| | | | | | | Some misc. fixes for WoL, 5708 B1, and a typo '=' instead of '=='. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: Improve handshake with firmwareMichael Chan2006-01-231-21/+23
| | | | | | | | | | | Improve handshake with bootcode with the following changes: 1. Increase timeout to 100msec and use msleep instead of udelay. 2. Add more error checking for timeouts and errors. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: Fix VLAN on ASFMichael Chan2006-01-231-3/+7
| | | | | | | | | Always set up the device to strip incoming VLAN tags when ASF is enabled. ASF firmware will not parse packets correctly if VLAN tags are not stripped. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: simplify parameter checks in bnx2_{get,set}_eepromJohn W. Linville2005-11-101-10/+2
| | | | | | | | Remove the superfluous parameter checking in bnx2_{get,set}_eeprom. The parameters are already validated in ethtool_{get,set}_eeprom. Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: check return of dev_alloc_skb in bnx2_test_loopbackJohn W. Linville2005-11-101-0/+2
| | | | | | | | Check return of dev_alloc_skb in bnx2_test_loopback, and handle appropriately. Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: output driver name as prefix in error messageJohn W. Linville2005-11-101-1/+1
| | | | | | | Output driver name as prefix to "Unknown flash/EEPROM type." message. Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [PATCH] bnx2: update version and minor fixesMichael Chan2005-11-051-4/+4
| | | | | | | Some book keeping and a style fix. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* [PATCH] bnx2: refine bnx2_pollMichael Chan2005-11-051-15/+40
| | | | | | | | | | | | | | | Refine bnx2_poll() logic to write back the most up-to-date status tag when all work has been processed. This eliminates some occasional extra interrupts when a older status tag is written even though all work has been processed. The idea is to read the status tag just before exiting bnx2_poll() and then check again for any new work. If no new work is pending, the status tag written back will not generate any extra interrupt. This logic is similar to the changes David Miller did to tg3_poll(). Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* [PATCH] bnx2: update firmware handshake for 5708Michael Chan2005-11-051-15/+79
| | | | | | | | | | | | Dynamically determine the shared memory location where eeprom parameters are stored instead of using a fixed location. Add speed reporting to management firmware. This allows management firmware to know the current speed without contending for MII registers. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* [PATCH] bnx2: update nvram code for 5708Michael Chan2005-11-051-22/+78
| | | | | | | Update bnx2 nvram code with support for 5708. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* [PATCH] bnx2: add 5708 supportMichael Chan2005-11-051-25/+192
| | | | | | | | Add 5708 copper and serdes basic support, including 2.5 Gbps support on 5708 serdes. SPEED_2500 is also added to ethtool.h Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* drivers/net: Remove pointless checks for NULL prior to calling kfree()Jesper Juhl2005-10-281-8/+4
|
* [BNX2]: Add support for ETHTOOL_GPERMADDR.John W. Linville2005-09-121-0/+2
| | | | | Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: Fix bug in irq handler and add prefetchMichael Chan2005-09-081-3/+4
| | | | | | | | | | | | | | | | Fix bug in bnx2_interrupt() that caused an unnecessary register read. The BNX2_PCICFG_MISC_STATUS should only be read when the status tag has not changed. Add prefetch of the status block in bnx2_msi() similar to tg3_msi(). The status block is not touched in bnx2_msi() and prefetching it will speed up bnx2_poll() that will run on the same CPU that received the MSI. Update version. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [PATCH] swsusp: fix remaining u32 vs. pm_message_t confusionPavel Machek2005-09-051-9/+9
| | | | | | | | | | Fix remaining bits of u32 vs. pm_message confusion. Should not break anything. Signed-off-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [BNX2]: update version and minor fixesMichael Chan2005-08-291-17/+15
| | | | | | | | | | | | | | Update version and add 4 minor fixes, the last 2 were suggested by Jeff Garzik: 1. check for a valid ethernet address before setting it 2. zero out bp->regview if init_one encounters an error and unmaps the IO address. This prevents remove_one from unmapping again. 3. use netif_rx_schedule() instead of hand coding the same. 4. use IRQ_HANDLED and IRQ_NONE. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: change irq locks to bh locksMichael Chan2005-08-291-32/+24
| | | | | | | | Change all locks from spin_lock_irqsave() to spin_lock_bh(). All places that require spinlocks are in BH context. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: remove atomics in txMichael Chan2005-08-291-18/+17
| | | | | | | | | | | | | Remove atomic operations in the fast tx path. Expensive atomic operations were used to keep track of the number of available tx descriptors. The new code uses the difference between the consumer and producer index to determine the number of free tx descriptors. As suggested by Jeff Garzik, the name of the inline function is changed to all lower case. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: speedup serdes linkupMichael Chan2005-08-291-12/+40
| | | | | | | | | | | | | | | | | | | | | | This speeds up link-up time on 5706 SerDes if the link partner does not autoneg, a rather common scenario in blade servers. Some blade servers use IPMI for keyboard input and it's important to minimize link disruptions. The speedup is achieved by shortening the timer to (HZ / 3) during the transient period right after initiating a SerDes autoneg. If autoneg does not complete, parallel detect can be done sooner. After the transient period is over, the timer goes back to its normal HZ interval. As suggested by Jeff Garzik, the timer initialization is moved to bnx2_init_board() from bnx2_open(). An eeprom bit is also added to allow default forced SerDes speed for even faster link-up time. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: Fix rtnl deadlock in bnx2_closeMichael Chan2005-08-291-1/+14
| | | | | | | | | | | | | | | | | | This fixes an rtnl deadlock problem when flush_scheduled_work() is called from bnx2_close(). In rare cases, linkwatch_event() may be on the workqueue from a previous close of a different device and it will try to get the rtnl lock which is already held by dev_close(). The fix is to set a flag if we are in the reset task which is run from the workqueue. bnx2_close() will loop until the flag is cleared. As suggested by Jeff Garzik, the loop is changed to call msleep(1) instead of yield() in the original patch. flush_scheduled_work() is also moved to bnx2_remove_one() before the netdev is freed. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: Possible sparse fixes, take twoPeter Hagervall2005-08-291-20/+19
| | | | | | | | | | | | | | This patch contains the following possible cleanups/fixes: - use C99 struct initializers - make a few arrays and structs static - remove a few uses of literal 0 as NULL pointer - use convenience function instead of cast+dereference in bnx2_ioctl() - remove superfluous casts to u8 * in calls to readl/writel Signed-off-by: Peter Hagervall <hager@cs.umu.se> Acked-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: New Broadcom gigabit network driver.Michael Chan2005-05-261-0/+5530
A new driver bnx2 for Broadcom bcm5706 is available. The patch also includes new 1000BASE-X advertisement bit definitions in mii.h Thanks to David Miller and Jeff Garzik for reviewing and their valuable feedback. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
OpenPOWER on IntegriCloud