summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom/bnx2x
Commit message (Collapse)AuthorAgeFilesLines
* bnx2x: Fix SFP+ misconfiguration in iSCSI boot scenarioYaniv Rosner2013-03-082-1/+6
| | | | | | | | | | Fix a problem in which iSCSI-boot installation fails when switching SFP+ boot port and moving the SFP+ module prior to boot. The SFP+ insertion triggers an interrupt which configures the SFP+ module wrongly before interface is loaded. Signed-off-by: Yaniv Rosner <yanivr@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bnx2x: Fix intermittent long KR2 link up timeYaniv Rosner2013-03-082-1/+13
| | | | | | | | | | | | | When a KR2 device is connected to a KR link-partner, sometimes it requires disabling KR2 for the link to come up. To get a KR2 link up later, in case no base pages are seen, the KR2 is restored. The problem was that some link partners cleared their advertised BP/NP after around two seconds, causing the driver to disable/enable KR2 link all the time. The fix was to wait at least 5 seconds before checking KR2 recovery. Signed-off-by: Yaniv Rosner <yanivr@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bnx2x: Fix KR2 work-around conditionYaniv Rosner2013-02-281-1/+1
| | | | | | | | | Fix condition typo for running KR2 work-around though it doesn't have real effect since the typo bits matched by chance. Signed-off-by: Yaniv Rosner <yanivr@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bnx2x: Fix KR2 linkYaniv Rosner2013-02-282-0/+8
| | | | | | | | | | Fix KR2 link down problem after reboot when link speed is reconfigured via ethtool. Since 1G/10G support link speed were missing by default, 1G/10G link speed were not advertised. Signed-off-by: Yaniv Rosner <yanivr@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bnx2x: Fix port identification for the 84834Yaniv Rosner2013-02-282-1/+62
| | | | | | | | | | Fix the "ethtool -p" for boards with BCM84834, by using LED4 of the PHY to toggle the link LED while keeping interrupt disabled to avoid NIG attentions, and at the end restore NIG to previous state. Signed-off-by: Yaniv Rosner <yanivr@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bnx2x: fix UDP checksum for 57710/57711.Dmitry Kravkov2013-02-271-1/+1
| | | | | | | | | | Since commit 86564c3f "bnx2x: Remove many sparse warnings" UDP csum offload is broken for 57710/57711. Fix return value. Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> CC: Ariel Elior <ariele@broadcom.com> CC: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netLinus Torvalds2013-02-262-60/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull networking fixes from David Miller: 1) ping_err() ICMP error handler looks at wrong ICMP header, from Li Wei. 2) TCP socket hash function on ipv6 is too weak, from Eric Dumazet. 3) netif_set_xps_queue() forgets to drop mutex on errors, fix from Alexander Duyck. 4) sum_frag_mem_limit() can deadlock due to lack of BH disabling, fix from Eric Dumazet. 5) TCP SYN data is miscalculated in tcp_send_syn_data(), because the amount of TCP option space was not taken into account properly in this code path. Fix from yuchung Cheng. 6) MLX4 driver allocates device queues with the wrong size, from Kleber Sacilotto. 7) sock_diag can access past the end of the sock_diag_handlers[] array, from Mathias Krause. 8) vlan_set_encap_proto() makes incorrect assumptions about where skb->data points, rework the logic so that it works regardless of where skb->data happens to be. From Jesse Gross. 9) Fix gianfar build failure with NET_POLL enabled, from Paul Gortmaker. 10) Fix Ipv4 ID setting and checksum calculations in GRE driver, from Pravin B Shelar. 11) bgmac driver does: int i; for (i = 0; ...; ...) { ... for (i = 0; ...; ...) { effectively corrupting the outer loop index, use a seperate variable for the inner loops. From Rafał Miłecki. 12) Fix suspend bugs in smsc95xx driver, from Ming Lei. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (35 commits) usbnet: smsc95xx: rename FEATURE_AUTOSUSPEND usbnet: smsc95xx: fix broken runtime suspend usbnet: smsc95xx: fix suspend failure bgmac: fix indexing of 2nd level loops b43: Fix lockdep splat on module unload Revert "ip_gre: propogate target device GSO capability to the tunnel device" IP_GRE: Fix GRE_CSUM case. VXLAN: Use tunnel_ip_select_ident() for tunnel IP-Identification. IP_GRE: Fix IP-Identification. net/pasemi: Fix missing coding style vmxnet3: fix ethtool ring buffer size setting vmxnet3: make local function static bnx2x: remove dead code and make local funcs static gianfar: fix compile fail for NET_POLL=y due to struct packing vlan: adjust vlan_set_encap_proto() for its callers sock_diag: Simplify sock_diag_handlers[] handling in __sock_diag_rcv_msg sock_diag: Fix out-of-bounds access to sock_diag_handlers[] vxlan: remove depends on CONFIG_EXPERIMENTAL mlx4_en: fix allocation of CPU affinity reverse-map mlx4_en: fix allocation of device tx_cq ...
| * bnx2x: remove dead code and make local funcs staticstephen hemminger2013-02-242-60/+2
| | | | | | | | | | | | | | | | | | | | | | Sparse warned about several functions that were unnecessarily global. After making them static, discovered that several functions were actually never used. Compile tested only. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Eilon Greenstein <eilong@broadcomo.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | Merge branch 'for-linus' of ↵Linus Torvalds2013-02-211-1/+1
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial Pull trivial tree from Jiri Kosina: "Assorted tiny fixes queued in trivial tree" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (22 commits) DocBook: update EXPORT_SYMBOL entry to point at export.h Documentation: update top level 00-INDEX file with new additions ARM: at91/ide: remove unsused at91-ide Kconfig entry percpu_counter.h: comment code for better readability x86, efi: fix comment typo in head_32.S IB: cxgb3: delay freeing mem untill entirely done with it net: mvneta: remove unneeded version.h include time: x86: report_lost_ticks doesn't exist any more pcmcia: avoid static analysis complaint about use-after-free fs/jfs: Fix typo in comment : 'how may' -> 'how many' of: add missing documentation for of_platform_populate() btrfs: remove unnecessary cur_trans set before goto loop in join_transaction sound: soc: Fix typo in sound/codecs treewide: Fix typo in various drivers btrfs: fix comment typos Update ibmvscsi module name in Kconfig. powerpc: fix typo (utilties -> utilities) of: fix spelling mistake in comment h8300: Fix home page URL in h8300/README xtensa: Fix home page URL in Kconfig ...
| * Merge branch 'master' into for-nextJiri Kosina2013-01-2916-1154/+2358
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: drivers/devfreq/exynos4_bus.c Sync with Linus' tree to be able to apply patches that are against newer code (mvneta).
| * | treewide: Replace incomming with incoming in all comments and stringsJorrit Schippers2013-01-031-1/+1
| | | | | | | | | | | | | | | Signed-off-by: Jorrit Schippers <jorrit@ncode.nl> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | | bnx2x: Force link UP when the interface is in LOOPBACK modeMahesh Bandewar2013-02-021-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the interface does not have carrier but when it's put into loopback mode (for tests), it does not make sense to not have the carrier. So force it! Signed-off-by: Mahesh Bandewar <maheshb@google.com> Acked-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | bnx2x: SR-IOV version compatibility bugfixAriel Elior2013-01-233-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When posting a message on the bulletin board, the PF calculates crc over the message and places the result in the message. When the VF samples the Bulletin Board it copies the message aside and validates this crc. The length of the message is crucial here and must be the same in both parties. Since the PF is running in the Hypervisor and the VF is running in a Vm, they can possibly be of different versions. As the Bulletin Board is designed to grow forward in future versions, in the VF the length must not be the size of the message structure but instead it should be a field in the message itself. Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | bnx2x: Fix compilation with stop-on-errorYuval Mintz2013-01-232-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 823e1d9 caused bnx2x to fail once BNX2X_STOP_ON_ERROR is set. Fixes compilation by moving function declarations between header files. Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | cnic, bnx2x: Add CNIC_DRV_STATE_HANDLES_IRQ to ethdev->drv_stateMichael Chan2013-01-231-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In INTA mode, cnic and bnx2x share the same IRQ. During chip reset, for example, cnic will stop servicing IRQs after it has shutdown the cnic hardware resources. However, the shared IRQ is still active as bnx2x needs to finish the reset. There is a window when bnx2x does not know that cnic is no longer handling IRQ and things don't always work properly. Add a flag to tell bnx2x that cnic is handling IRQ. The flag is set before the first cnic IRQ is expected and cleared when no more cnic IRQs are expected, so there should be no race conditions. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | bnx2x: correct memory release schemeYuval Mintz2013-01-232-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix an incorrect SR-IOV memory release which was committed in 1ab4434. Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | bnx2x: Remove many sparse warningsYuval Mintz2013-01-239-159/+195
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove most of the sparse warnings in the bnx2x compilation (i.e., thus resulting when compiling with `C=2 CF=-D__CHECK_ENDIAN__'). Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | bnx2x: Modify unload conditionsYuval Mintz2013-01-231-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't unload the bnx2x driver if its in a recovery process, or if the previous load have failed. Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | bnx2x: Correct memory preparation and releaseDmitry Kravkov2013-01-232-44/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 15192a8cf there have been a memory leak upon rmmod of the bnx2x driver. This corrects the memory leak and corrects the zeroing of internal memories upon driver load. Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | bnx2x: Add missing VFs reference in macrosYuval Mintz2013-01-231-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add missing 57712_VF and 57800_VF to CHIP_IS_E2 and CHIP_IS_E3 macros (missing from commit 8395be5). Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | bnx2x: Add additional debug informationYuval Mintz2013-01-234-6/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add/Revise several debug prints in the bnx2x driver - on regular flows as well as error flows. Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | bnx2x: correct usleep_range usageYuval Mintz2013-01-234-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the incorrect usage of `usleep_range(1000, 1000)' into `usleep_range(1000, 2000)'. Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | bnx2x: reorganization and beautificationYuval Mintz2013-01-235-139/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Slightly changes the bnx2x code without `true' functional changes. Changes include: 1. Gathering macros into a single macro when combination is used multiple times. 2. Exporting parts of functions into their own functions. 3. Return values after if-else instead of only on the else condition (where current flow would simply return same value later in the code) 4. Removing some unnecessary code (either dead-code or incorrect conditions) Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | bnx2x: Semantic renovationYuval Mintz2013-01-239-105/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | Mostly corrects white spaces, indentations, and comments. Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | bnx2x: fix GRO parametersYuval Mintz2013-01-171-24/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bnx2x does an internal GRO pass but doesn't provide gso_segs, thus breaking qdisc_pkt_len_init() in case ingress qdisc is used. We store gso_segs in NAPI_GRO_CB(skb)->count, where tcp_gro_complete() expects to find the number of aggregated segments. Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | bnx2x: Introduce 2013 and advance version to 1.78.02Yuval Mintz2013-01-1524-26/+26
| | | | | | | | | | | | | | | | | | | | | Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | bnx2x: Added FW GRO bridging supportYuval Mintz2013-01-151-2/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since submit 621b4d6 the bnx2x driver support FW GRO. However, when using the device with GRO enabled in bridging scenarios throughput is very low, as the bridge expects all incoming packets to be passed with CHECKSUM_PARTIAL - a demand which is satisfied by the SW GRO implementation, but was missed in the bnx2x driver implementation (which returned CHECKSUM_UNNECESSARY). Now, given that the traffic is supported by FW GRO (TCP/IP), the bnx2x driver calculates the pseudo checksum by itself, passing skbs with CHECKSUM_PARTIAL and giving a much better throughput when receiving GRO traffic. Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | bnx2x: Clean previous IGU status before ackYuval Mintz2013-01-152-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When enabling interrupts, acknowledge the interrupt only after configuring the IGU to the correct interrupt mode (otherwise it would dirty selftests) Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | bnx2x: improve stop-on-errorYuval Mintz2013-01-155-76/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Get better control over interrupts during panic, and allow FW to test outgoing Tx packets when stop-on-error is allowed. Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | bnx2x: add `ethtool -w' support.Miriam Shitrit2013-01-154-1176/+2494
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This revises and enhances the bnx2x register dump facilities, adding support for `ethtool -w' on top of `ethtool -d'. Signed-off-by: Miriam Shitrit <miris@broadcom.com> Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | bnx2x: Added nvram personalities supportYuval Mintz2013-01-152-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a device is configured to act as either iscsi or fcoe device in its nvram, prevent the other from being misused by preventing its activation in the driver. Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | bnx2x: Fix rare self-test failuresYaniv Rosner2013-01-151-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On rare occasions, self test link may fail since the link is being sampled while it's still being stabilized. To correct this behaviour, try to sample the link for 2 seconds prior to declaring a failure. Signed-off-by: Yaniv Rosner <yanivr@broadcom.com> Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | bnx2x: use SAN Mac for FCoE.Dmitry Kravkov2013-01-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current logic causes chips running in switch dependent multi-function FCoE mode not to configure their MAC, leading to an all 0s MAC. This patch configures the interface with the SAN Mac instead. Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | bnx2x: Add an additional fatal hw assertion - BRB_HW_INTERRUPTDmitry Kravkov2013-01-152-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | bnx2x: Clear dirty status when booting after UNDIYuval Mintz2013-01-152-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Self-tests following boot from SAN have failed as the UNDI driver might leave some NIG interrupt indications. This patch does the clean-up, clearing those indications and allowing the test to pass. Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller2013-01-153-11/+81
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Documentation/networking/ip-sysctl.txt drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c Both conflicts were simply overlapping context. A build fix for qlcnic is in here too, simply removing the added devinit annotations which no longer exist. Signed-off-by: David S. Miller <davem@davemloft.net>
| * | bnx2x: Allow management traffic after boot from SANBarak Witkowski2013-01-101-8/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As part of the previous driver unload flow, whenever bnx2x is loaded after the UNDI driver it closes all Rx traffic. However, this leads to management traffic also being stopped until the network interface associated with one of its functions gets loaded. To remedy this, management traffic is re-opened once the 'cleaning' after the previous driver ends. Signed-off-by: Barak Witkowski <barak@broadcom.com> Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | bnx2x: Fix fastpath structures when memory allocation failsYuval Mintz2013-01-101-2/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When allocating Tx queues, if for some reason (e.g., lack of memory) allocation fails, driver will incorrectly calculate the pointers of the various queues. This patch repositions all pointers in such a case to point at sequential structures in memory, allowing the bnx2x macros to be used correctly when accessing them. Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | bnx2x: move debugging code before the returnDan Carpenter2013-01-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | I move the return down a line after the debugging printk. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | bnx2x: align define usage to satisfy static checkersAriel Elior2013-01-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Static checkers complained that the E1H_FUNC_MAX define is used incorrectly in bnx2x_pretend_func(). The complaint was justified, although its not a real bug, as the first part of the conditional protects us in this case (a real bug would happen if a VF tried to use the pretend func, but there are no VFs in E1H chips). Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | bnx2x: NULL dereference on error in debug codeDan Carpenter2013-01-091-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | "vfop" is NULL here. I've changed the debugging to not use it. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Ariel Elior <ariele@broadcom.com> Acked-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | remove init of dev->perm_addr in driversJiri Pirko2013-01-081-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | perm_addr is initialized correctly in register_netdevice() so to init it in drivers is no longer needed. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | bnx2x: Segregate SR-IOV codeAriel Elior2013-01-079-844/+944
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In this patch the SR-IOV code is segregated from the main bulk of the bnx2x code. The CONFIG_BNX2X_SRIOV define is added to Broadcom's Kconfig, and allows the elision of the building of all the SR-IOV support code in the driver. The define is dependant on the kernel CONFIG_PCI_IOV configuration define. Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | net: remove unnecessary NET_ADDR_RANDOM "bitclean"Jiri Pirko2013-01-031-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | NET_ADDR_SET is set in dev_set_mac_address() no need to alter dev->addr_assign_type value in drivers. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | bnx2x: Add VF device ids and enable featureAriel Elior2013-01-023-10/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the various VF device ids (of all supported hardware) Add the calls to enable_sriov and disable_sriov to enable the SR-IOV feature. This patch also advances the version and release date of the bnx2x module. Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | bnx2x: Support PF <-> VF Bulletin BoardAriel Elior2013-01-028-2/+320
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The PF <-> VF Bulletin Board is a simple interface between the PF and the VF. The main reason for the Bulletin Board is to allow the PF to be the initiator. The VF publishes at 'acquire' stage the GPA of a Bulletin Board structure it has allocated. The PF notes this GPA in the VF database. The VF samples the Bulletin Board periodically for new messages. The latest version of the BB is always used. Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | bnx2x: Support VF FLRAriel Elior2013-01-026-7/+321
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The FLR indication arrives as an attention from the management processor. Upon VF flr all FLRed function in the indication have already been released by Firmware and now we basically need to free the resources allocated to those VFs, and clean any remainders from the device (FLR final cleanup). Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | bnx2x: Support of PF driver of a VF release requestAriel Elior2013-01-025-1/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 'release' request is the opposite of the 'acquire' request. At release, all the resources allocated to the VF are reclaimed. The release flow applies the close flow if applicable. Note that there are actually two types of release: 1. The VF has been removed, and so issued a 'release' request over the VF <-> PF Channel. 2. The PF is going down and so has to release all of it's VFs. Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | bnx2x: Support of PF driver of a VF close requestAriel Elior2013-01-023-0/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 'close' command is the opposite of an init request. Here the queues of the VF are closed (if any are opened) and released. This flow applies the 'q_teardown' flow on all the queues. The VF state is changed by this request. Interrupts are disabled for the VF when closed. Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | bnx2x: Support of PF driver of a VF q_teardown requestAriel Elior2013-01-023-0/+295
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 'q_teardown' request is basically the opposite of the 'q_setup'. Here the PF driver removes from the device the queue it opened against the VF fastpath ring at 'setup_q' stage, along with all related rx_mode info. Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
OpenPOWER on IntegriCloud