summaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2.c
Commit message (Collapse)AuthorAgeFilesLines
* [BNX2]: Fix driver phy_flags name space.Michael Chan2008-01-281-72/+74
| | | | | | | Prefix "bp->phy_flags" names with BNX2_PHY_FLAG_* for consistency. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: Fix driver software flag namespace.David S. Miller2008-01-281-46/+46
| | | | | | Prefix "bnx2->flags" names with BNX2_* for consistency. Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2] Update version to 1.7.2.Michael Chan2008-01-281-3/+3
| | | | | Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: Add link-down workaround on 5706 serdes.Michael Chan2008-01-281-16/+80
| | | | | | | | | | | | | In some blade systems using the 5706 serdes, the hardware sometimes does not properly generate link down interrupts. We add a workaround in the driver's timer to force a link-down when some PHY registers report loss of SYNC. The parallel detect logic is cleaned up slightly to better integrate the workaround. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: Fix minor bug in bnx2_has_work().Michael Chan2008-01-281-2/+1
| | | | | | | | | It is more correct to get the status block from the bnx2_napi struct instead of the bnx2 struct. It happens that they are the same in this case because we are using the first MSIX vector. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: Disable jumbo rx paging on 5709 Ax.Michael Chan2008-01-281-1/+3
| | | | | | | The chip has problem running in this mode and needs to be disabled. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* NULL noise in drivers/netAl Viro2008-01-281-2/+2
| | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: Fix compiler warning.Michael Chan2008-01-281-1/+1
| | | | | | | | | Change bnx2_init_napi() to void. Warning was noted by DaveM. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: Update version to 1.7.1.Michael Chan2008-01-281-2/+2
| | | | | Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: Enable new tx ring.Michael Chan2008-01-281-7/+80
| | | | | | | | Enable new tx ring and add new MSIX handler and NAPI poll function for the new tx ring. Enable MSIX when the hardware supports it. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: Add support for a new tx ring.Michael Chan2008-01-281-18/+60
| | | | | | | | | To separate TX IRQs into a different MSIX vector, we need to support a new tx ring. The original tx ring will still be used when not using MSIX. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: Support multiple MSIX IRQs.Michael Chan2008-01-281-36/+125
| | | | | | | | Change bnx2_napi struct into an array and add code to manage multiple IRQs. MSIX hardware structures and new registers are also added. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: Move rx indexes into bnx2_napi struct.Michael Chan2008-01-281-49/+56
| | | | | | | | Rx related fields used in NAPI polling are moved from the main bnx2 struct to the bnx2_napi struct. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: Move tx indexes into bnx2_napi struct.Michael Chan2008-01-281-14/+17
| | | | | | | | Tx related fields used in NAPI polling are moved from the main bnx2 struct to the bnx2_napi struct. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: Introduce new bnx2_napi structure.Michael Chan2008-01-281-57/+89
| | | | | | | | | | | | | Introduce a bnx2_napi structure that will hold a napi_struct and other fields to handle NAPI polling for the napi_struct. Various tx and rx indexes and status block pointers will be moved from the main bnx2 structure to this bnx2_napi structure. Most NAPI path functions are modified to be passed this bnx2_napi struct pointer. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: Restructure IRQ datastructures.Michael Chan2008-01-281-22/+33
| | | | | | | | | Add a table to keep track of multiple IRQs and restructure the IRQ request and free functions so that they can be easily expanded to handle multiple IRQs. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: Add function to fetch hardware tx index.Michael Chan2008-01-281-17/+20
| | | | | | | This makes the code cleaner and easier to support different tx rings. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: Update version to 1.6.9.Michael Chan2008-01-281-2/+2
| | | | | Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: Enable S/G for jumbo RX.Michael Chan2008-01-281-2/+19
| | | | | | | | | | | | If the MTU requires more than 1 page for the SKB, enable the page ring and calculate the size of the page ring. This will guarantee order-0 allocation regardless of the MTU size. Fixup loopback test packet size so that we don't deal with the pages during loopback test. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: Add fast path code to handle RX pages.Michael Chan2008-01-281-6/+138
| | | | | | | | | Add function to reuse a page in case of allocation or other errors. Add code to construct the completed SKB with the additional data in the pages. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: Add init. code to handle RX pages.Michael Chan2008-01-281-2/+102
| | | | | | | | Add new fields to keep track of the pages and the page rings. Add functions to allocate and free pages. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: Update firmware to support S/G RX buffers.Michael Chan2008-01-281-11/+25
| | | | | Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: Restructure RX ring init. code.Michael Chan2008-01-281-63/+78
| | | | | | | | | | | | Factor out the common functions that will be used to initialize the normal RX rings and the page rings. Change the copybreak constant RX_COPY_THRESH to 128. This same constant will be used for the max. size of the linear SKB when pages are used. Copybreak will be turned off when pages are used. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: Restructure RX fast path handling.Michael Chan2008-01-281-16/+30
| | | | | | | | | Add a new function to handle new SKB allocation and to prepare the completed SKB. This makes it easier to add support for non-linear SKB. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: Add ring constants.Michael Chan2008-01-281-15/+7
| | | | | | | Define the various ring constants to make the code cleaner. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: Update version to 1.6.9.Michael Chan2007-12-111-2/+2
| | | | | Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: Fix RX packet rot.Michael Chan2007-12-111-12/+14
| | | | | | | | | | | | | | | Packets can be left in the RX ring if the NAPI budget is reached. This is caused by storing the latest rx index at the beginning of bnx2_rx_int(). We may not process all the work up to this index if the budget is reached and so some packets in the RX ring may rot when we later check for more work using this stored rx index. The fix is to not store this latest hw index and only store the processed rx index. We use a new function bnx2_get_hw_rx_cons() to fetch the latest hw rx index. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: Add PHY_DIS_EARLY_DAC workaround.Michael Chan2007-12-111-2/+3
| | | | | | | 5709 Ax and Bx chips all need this workaround. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* remove asm/bitops.h includesJiri Slaby2007-10-191-1/+1
| | | | | | | | | | | | | remove asm/bitops.h includes including asm/bitops directly may cause compile errors. don't include it and include linux/bitops instead. next patch will deny including asm header directly. Cc: Adrian Bunk <bunk@kernel.org> Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge branch 'master' of ↵Linus Torvalds2007-10-181-11/+21
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 * 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (51 commits) [IPV6]: Fix again the fl6_sock_lookup() fixed locking [NETFILTER]: nf_conntrack_tcp: fix connection reopening fix [IPV6]: Fix race in ipv6_flowlabel_opt() when inserting two labels [IPV6]: Lost locking in fl6_sock_lookup [IPV6]: Lost locking when inserting a flowlabel in ipv6_fl_list [NETFILTER]: xt_sctp: fix mistake to pass a pointer where array is required [NET]: Fix OOPS due to missing check in dev_parse_header(). [TCP]: Remove lost_retrans zero seqno special cases [NET]: fix carrier-on bug? [NET]: Fix uninitialised variable in ip_frag_reasm() [IPSEC]: Rename mode to outer_mode and add inner_mode [IPSEC]: Disallow combinations of RO and AH/ESP/IPCOMP [IPSEC]: Use the top IPv4 route's peer instead of the bottom [IPSEC]: Store afinfo pointer in xfrm_mode [IPSEC]: Add missing BEET checks [IPSEC]: Move type and mode map into xfrm_state.c [IPSEC]: Fix length check in xfrm_parse_spi [IPSEC]: Move ip_summed zapping out of xfrm6_rcv_spi [IPSEC]: Get nexthdr from caller in xfrm6_rcv_spi [IPSEC]: Move tunnel parsing for IPv4 out of xfrm4_input ...
| * [BNX2]: Update version to 1.6.8.Michael Chan2007-10-171-2/+2
| | | | | | | | | | Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * [BNX2]: Fix Serdes WoL bug.Michael Chan2007-10-171-9/+19
| | | | | | | | | | | | | | | | | | The bug is in the code in bnx2_set_power_state() that assumes copper devices when setting up WoL. This is no longer true after adding WoL support for Serdes devices. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | Add missing newlines to some uses of dev_<level> messagesJoe Perches2007-10-181-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found these while looking at printk uses. Add missing newlines to dev_<level> uses Add missing KERN_<level> prefixes to multiline dev_<level>s Fixed a wierd->weird spelling typo Added a newline to a printk Signed-off-by: Joe Perches <joe@perches.com> Cc: "Luck, Tony" <tony.luck@intel.com> Cc: Jens Axboe <jens.axboe@oracle.com> Cc: Mark M. Hoffman <mhoffman@lightlink.com> Cc: Roland Dreier <rolandd@cisco.com> Cc: Tilman Schmidt <tilman@imap.cc> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Jeff Garzik <jeff@garzik.org> Cc: Stephen Hemminger <shemminger@linux-foundation.org> Cc: Greg KH <greg@kroah.com> Cc: Jeremy Fitzhardinge <jeremy@goop.org> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: David Brownell <david-b@pacbell.net> Cc: James Smart <James.Smart@Emulex.Com> Cc: Andrew Vasquez <andrew.vasquez@qlogic.com> Cc: "Antonino A. Daplas" <adaplas@pol.net> Cc: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Cc: Russell King <rmk@arm.linux.org.uk> Cc: Jaroslav Kysela <perex@suse.cz> Cc: Takashi Iwai <tiwai@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [BNX2]: Refine napi poll loop.Michael Chan2007-10-121-6/+10
| | | | | | | | | | | | | | Need to read and store sblk->status_idx before checking for more work. The status idx is later written back to the hardware when enabling interrupts to acknowledge how much work has been processed. If the order is reversed, we can end up acknowledging work we haven't processed. When completing bnx2_poll(), we should always break out of the while loop and return work_done instead of returning 0. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NET]: Fix NAPI completion handling in some drivers.David S. Miller2007-10-111-20/+32
| | | | | | | | | | | | | | | | | | | | | In order for the list handling in net_rx_action() to be correct, drivers must follow certain rules as stated by this comment in net_rx_action(): /* Drivers must not modify the NAPI state if they * consume the entire weight. In such cases this code * still "owns" the NAPI instance and therefore can * move the instance around on the list at-will. */ A few drivers do not do this because they mix the budget checks with reading hardware state, resulting in crashes like the one reported by takano@axe-inc.co.jp. BNX2 and TG3 are taken care of here, SKY2 fix is from Stephen Hemminger. Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: Update version to 1.6.7.Michael Chan2007-10-101-2/+2
| | | | | Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: Fix default WoL setting.Michael Chan2007-10-101-6/+14
| | | | | | | | | Change the default WoL setting to match the NVRAM's setting. It always defaulted to WoL disabled before and caused a lot of confusion for users. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: Fix remote PHY media detection problems.Michael Chan2007-10-101-7/+27
| | | | | | | | | | | | | The remote PHY media type and link status can change between ->probe() and ->open(). For correct operation, we need to get the new status again during ->open(). The ethtool link test and loopback test are also fixed to work with remote PHY. PHY loopback is simply skipped when remote PHY is present. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: Update version to 1.6.6.Michael Chan2007-10-101-2/+2
| | | | | Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: Optimize firmware loading.Michael Chan2007-10-101-21/+19
| | | | | | | | | | | | | | This is a follow up to the patches from Denys Vlasenkos <vda.linux@googlemail.com> to further optimize firmware loading. 1. In bnx2_init_cpus(), we allocate memory for decompression once and use it repeatedly instead of doing this for every firmware image. 2. We eliminate the BSS and SBSS firmware sections in bnx2_fw*.h since these are always zeros. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [ZLIB]: Move bnx2 driver gzip unpacker into zlib.Denys Vlasenko2007-10-101-45/+3
| | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> Acked-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: factor out gzip unpackerDenys Vlasenko2007-10-101-102/+58
| | | | | | | | | | | | | | | | This patch modifies gzip unpacking code in bnx2 driver so that it does not depend on bnx2 internals. I will move this code out of the driver and into zlib in follow-on patch. It can be useful in other drivers which need to store firmwares or any other relatively big binary blobs - fonts, cursor bitmaps, whatever. Patch is run tested by Michael Chan (driver author). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> Acked-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [netdrvr] Stop using legacy hooks ->self_test_count, ->get_stats_countJeff Garzik2007-10-101-10/+10
| | | | | | | These have been superceded by the new ->get_sset_count() hook. Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NET]: Introduce and use print_mac() and DECLARE_MAC_BUF()Joe Perches2007-10-101-8/+4
| | | | | | | This is nicer than the MAC_FMT stuff. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [ETHTOOL] Provide default behaviors for a few ethtool sub-ioctlsJeff Garzik2007-10-101-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | For the operations get-tx-csum get-sg get-tso get-ufo the default ethtool_op_xxx behavior is fine for all drivers, so we permit op==NULL to imply the default behavior. This provides a more uniform behavior across all drivers, eliminating ethtool(8) "ioctl not supported" errors on older drivers that had not been updated for the latest sub-ioctls. The ethtool_op_xxx() functions are left exported, in case anyone wishes to call them directly from a driver-private implementation -- a not-uncommon case. Should an ethtool_op_xxx() helper remain unused for a while, except by net/core/ethtool.c, we can un-export it at a later date. [ Resolved conflicts with set/get value ethtool patch... -DaveM ] Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* drivers/net/: all drivers/net/ cleanup with ARRAY_SIZEDenis Cheng2007-10-101-1/+1
| | | | | Signed-off-by: Denis Cheng <crquan@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* [NET]: Nuke SET_MODULE_OWNER macro.Ralf Baechle2007-10-101-1/+0
| | | | | | | | | | | | It's been a useless no-op for long enough in 2.6 so I figured it's time to remove it. The number of people that could object because they're maintaining unified 2.4 and 2.6 drivers is probably rather small. [ Handled drivers added by netdev tree and some missed IRDA cases... -DaveM ] Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NET]: Make NAPI polling independent of struct net_device objects.Stephen Hemminger2007-10-101-25/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several devices have multiple independant RX queues per net device, and some have a single interrupt doorbell for several queues. In either case, it's easier to support layouts like that if the structure representing the poll is independant from the net device itself. The signature of the ->poll() call back goes from: int foo_poll(struct net_device *dev, int *budget) to int foo_poll(struct napi_struct *napi, int budget) The caller is returned the number of RX packets processed (or the number of "NAPI credits" consumed if you want to get abstract). The callee no longer messes around bumping dev->quota, *budget, etc. because that is all handled in the caller upon return. The napi_struct is to be embedded in the device driver private data structures. Furthermore, it is the driver's responsibility to disable all NAPI instances in it's ->stop() device close handler. Since the napi_struct is privatized into the driver's private data structures, only the driver knows how to get at all of the napi_struct instances it may have per-device. With lots of help and suggestions from Rusty Russell, Roland Dreier, Michael Chan, Jeff Garzik, and Jamal Hadi Salim. Bug fixes from Thomas Graf, Roland Dreier, Peter Zijlstra, Joseph Fannin, Scott Wood, Hans J. Koch, and Michael Chan. [ Ported to current tree and all drivers converted. Integrated Stephen's follow-on kerneldoc additions, and restored poll_list handling to the old style to fix mutual exclusion issues. -DaveM ] Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: Add PHY workaround for 5709 A1.Michael Chan2007-09-201-3/+4
| | | | | | | | | | Add the DIS_EARLY_DAC PHY workaround for 5709 A1. Without it, link sometimes does not come up. Update version to 1.6.5. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BNX2]: Add write posting comment.Michael Chan2007-08-281-0/+4
| | | | | | | | Add comment to explain why we cannot read back after chip reset before delaying. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
OpenPOWER on IntegriCloud