• Home
  • History
  • Annotate
  • only in /drivers/net/ethernet/broadcom/bnx2x/
History log of /drivers/net/ethernet/broadcom/bnx2x/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
8f530e3bc3af125ac013732b5c54a3af2ad791a2 13-Jun-2012 Eric Dumazet <edumazet@google.com> bnx2x: fix panic when TX ring is full

[ Upstream commit bc14786a100cc6a81cd060e8031ec481241b418c ]

There is a off by one error in the minimal number of BD in
bnx2x_start_xmit() and bnx2x_tx_int() before stopping/resuming tx queue.

A full size GSO packet, with data included in skb->head really needs
(MAX_SKB_FRAGS + 4) BDs, because of bnx2x_tx_split()

This error triggers if BQL is disabled and heavy TCP transmit traffic
occurs.

bnx2x_tx_split() definitely can be called, remove a wrong comment.

Reported-by: Tomas Hruby <thruby@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Eilon Greenstein <eilong@broadcom.com>
Cc: Yaniv Rosner <yanivr@broadcom.com>
Cc: Merav Sicron <meravs@broadcom.com>
Cc: Tom Herbert <therbert@google.com>
Cc: Robert Evans <evansr@google.com>
Cc: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
nx2x_cmn.c
9bfb2101d5f2dffbfcc9d15c57c56459ca61c967 13-Jun-2012 Eric Dumazet <edumazet@google.com> bnx2x: fix checksum validation

[ Upstream commit d6cb3e41386f20fb0777d0b59a2def82c65d37f7 ]

bnx2x driver incorrectly sets ip_summed to CHECKSUM_UNNECESSARY on
encapsulated segments. TCP stack happily accepts frames with bad
checksums, if they are inside a GRE or IPIP encapsulation.

Our understanding is that if no IP or L4 csum validation was done by the
hardware, we should leave ip_summed as is (CHECKSUM_NONE), since
hardware doesn't provide CHECKSUM_COMPLETE support in its cqe.

Then, if IP/L4 checksumming was done by the hardware, set
CHECKSUM_UNNECESSARY if no error was flagged.

Patch based on findings and analysis from Robert Evans

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Eilon Greenstein <eilong@broadcom.com>
Cc: Yaniv Rosner <yanivr@broadcom.com>
Cc: Merav Sicron <meravs@broadcom.com>
Cc: Tom Herbert <therbert@google.com>
Cc: Robert Evans <evansr@google.com>
Cc: Willem de Bruijn <willemb@google.com>
Acked-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
nx2x.h
nx2x_cmn.c
24f06716cd5dbfc3d737ec2a24ac58ef76f68dc7 06-May-2012 Ariel Elior <ariele@broadcom.com> bnx2x: bug fix when loading after SAN boot

This is a bug fix for an "interface fails to load" issue.
The issue occurs when bnx2x driver loads after UNDI driver was previously
loaded over the chip. In such a scenario the UNDI driver is loaded and operates
in the pre-boot kernel, within its own specific host memory address range.
When the pre-boot stage is complete, the real kernel is loaded, in a new and
distinct host memory address range. The transition from pre-boot stage to boot
is asynchronous from UNDI point of view.

A race condition occurs when UNDI driver triggers a DMAE transaction to valid
host addresses in the pre-boot stage, when control is diverted to the real
kernel. This results in access to illegal addresses by our HW as the addresses
which were valid in the preboot stage are no longer considered valid.
Specifically, the 'was_error' bit in the pci glue of our device is set. This
causes all following pci transactions from chip to host to timeout (in
accordance to the pci spec).

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>
nx2x_main.c
7e5998aa74065d3ab31d17e667f40ffebf4b8425 17-Apr-2012 Dan Carpenter <dan.carpenter@oracle.com> bnx2x: off by one in bnx2x_ets_e3b0_sp_pri_to_cos_set()

The sp_pri_to_cos[] array size depends on the config but lets say it is
BX_E3B0_MAX_NUM_COS_PORT0 and max_num_of_cos is also
DCBX_E3B0_MAX_NUM_COS_PORT0. In the original code
"pri == max_num_of_cos" was accepted but it is one past the end of the
array.

Also we used "pri" before capping it. It's a harmless read past the end
of the array, but it would affect which error message gets printed.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_link.c
ca7b91bbd1f150216e6354cc20818aa993f331f2 04-Apr-2012 Yaniv Rosner <yanivr@broadcom.com> bnx2x: Clear MDC/MDIO warning message

This patch clears a warning message of "MDC/MDIO access timeout" which may
appear when interface is loaded due to missing clock setting before resetting
the LED, and starting periodic function too early.

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>
nx2x_cmn.c
nx2x_link.c
f93fb01628c00d1f26e8b45d2f10b8feb650dd4b 04-Apr-2012 Yaniv Rosner <yanivr@broadcom.com> bnx2x: Fix BCM57711+BCM84823 link issue

Fix a link problem on the second port of BCM57711 + BCM84823 boards due to
incorrect macro usage.

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>
nx2x_link.c
99bf7f34368aac9b54dfa8801ae490a2326704f9 04-Apr-2012 Yaniv Rosner <yanivr@broadcom.com> bnx2x: Clear BCM84833 LED after fan failure

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>
nx2x_link.c
nx2x_reg.h
8267bbb01f005fa8d0c8d046ecc24ae0b52e4d70 04-Apr-2012 Yaniv Rosner <yanivr@broadcom.com> bnx2x: Fix BCM84833 PHY FW version presentation

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>
nx2x_link.c
59a2e53b826103be8c22d9820355320b749b38ef 04-Apr-2012 Yaniv Rosner <yanivr@broadcom.com> bnx2x: Fix link issue for BCM8727 boards.

This patch fixes a link problem on BCM57712 + BCM8727 designs in which the TX
laser is controller by GPIO, after 1.60.xx drivers were previously loaded.
On these designs the TX_LASER is enabled by logic AND between the PHY
(through MDIO), and the GPIO. When an old driver is used, it disables the
MDIO part, hence the GPIO control had no affect de facto.

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>
nx2x_link.c
9379c9be4b20d5cb7bde577f402b749cd7d3caa2 04-Apr-2012 Yaniv Rosner <yanivr@broadcom.com> bnx2x: Restore 1G LED on BCM57712+BCM8727 designs.

Fix no-LED problem when link speed is 1G on BCM57712 + BCM8727 designs, by
removing a logic error checking for a different PHY.

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>
nx2x_link.c
25182fc22237f0fb1789c7ac9a79e871a1898ae5 04-Apr-2012 Yaniv Rosner <yanivr@broadcom.com> bnx2x: Fix BCM578x0-SFI pre-emphasis settings

Fix 578x0-SFI pre-emphasis settings per HW recommendations to achieve better
link strength.

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>
nx2x_link.c
6a51c0d17b8fb6ae300ba5bc42a020160944e1b2 04-Apr-2012 Yaniv Rosner <yanivr@broadcom.com> bnx2x: Fix BCM57810-KR AN speed transition

BCM57810-KR link may not come up in 1G after running loopback test, so set
the relevant registers to their default values before starting KR autoneg.

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>
nx2x_link.c
ca05f29cf515ac4a8e162c8e0eee886727f5dcc7 04-Apr-2012 Yaniv Rosner <yanivr@broadcom.com> bnx2x: Fix BCM57810-KR FC

Fix 57810-KR flow-control handling link is achieved via CL37 AN.

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>
nx2x_link.c
nx2x_reg.h
27d9129f5ae830cc031a898e0c220e1cdda69b34 04-Apr-2012 Yaniv Rosner <yanivr@broadcom.com> bnx2x: PFC fix

Fix a problem in which PFC frames are not honored, due to incorrect link
attributes synchronization following PMF migration, and verify PFC XON is not
stuck from previous link change.

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>
nx2x_link.c
nx2x_reg.h
f2ed5ee1b050495be49e5a0d5df152663558ef08 03-Apr-2012 Yuval Mintz <yuvalmin@broadcom.com> bnx2x: correction to firmware interface

Commit 621b4d6 updated the bnx2x driver to a new FW version, but lacked
a commit to a header file with changes to the firmware's interface.
The missing interface change causes iscsi and fcoe to misbehave with the
updated firmware.

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
CC: Michael Chan <mchan@broadcom.com>
CC: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_fw_defs.h
c54e9bd38a06babf94fd45e5f1df9a1109e12818 26-Mar-2012 Dmitry Kravkov <dmitry@broadcom.com> bnx2x: fix vector traveling while looking for an empty entry

Fixes the bug that may prevent from mac to be configured,
while there is an empty slot for it.

Reported-by: Maciej Żenczykowski <zenczykowski@gmail.com>
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_sp.c
452427b015b1b0cbbef7b6207908726837d39d57 26-Mar-2012 Yuval Mintz <yuvalmin@broadcom.com> bnx2x: previous driver unload revised

The flow in which the bnx2x driver starts after a previous driver
has been terminated in an 'unclean' manner has several bugs and
FW risks, which makes it possible for the driver to fail after
boot-from-SAN or kdump.
This patch contains a revised flow which performs a safer
initialization, solving the possible crash scenarios.
Notice this patch contains lines with over 80 characters, as it
keeps print-strings in a single line.

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x.h
nx2x_cmn.c
nx2x_cmn.h
nx2x_hsi.h
nx2x_link.c
nx2x_link.h
nx2x_main.c
nx2x_reg.h
de1288041d01120559d53ebd98e0f92476ee56d3 18-Mar-2012 Dmitry Kravkov <dmitry@broadcom.com> bnx2x: validate FW trace prior to its printing

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_hsi.h
nx2x_main.c
cb4dca277694f6c53bf6daf0f5c609dda32e4656 18-Mar-2012 Yuval Mintz <yuvalmin@broadcom.com> bnx2x: consistent statistics for old FW

Previously applied patch making the bnx2x statistics consistent
did not apply to old FWs. This remedies it, extending the consistent
behaviour to all drivers.

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Reported-by: Michal Schmidt <mschmidt@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x.h
nx2x_stats.c
nx2x_stats.h
9e62e912e56742af7eb7e0eeba3c7af4bb2f8537 18-Mar-2012 Dmitry Kravkov <dmitry@broadcom.com> bnx2x: changed iscsi/fcoe mac init and macros

This includes changes in macros to better distinguish between the two
protocols, and slightly changed the way their macs are set.
Notice this file contains string print lines with more than 80 characters,
as to not break prints.

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x.h
nx2x_cmn.c
nx2x_cmn.h
nx2x_main.c
910b220290a4568ebf7ecc368bd3d1d8236d2335 18-Mar-2012 Dmitry Kravkov <dmitry@broadcom.com> bnx2x: added TLV_NOT_FOUND flags to the dcb

The new error flags are supported by the bnx2x FW.

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_dcb.c
nx2x_hsi.h
9d4884f9d470cd696d7a7cd7a6d7099d13909dd9 18-Mar-2012 Dmitry Kravkov <dmitry@broadcom.com> bnx2x: changed initial dcb configuration

The changes were mostly made to enable back-to-back data flow with dcb.
Other changes were simply deemed as a better 'clean' initial configuration.

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_dcb.c
c315a4ef55b9afa0373fbb10f8567d59f81247c9 18-Mar-2012 Yuval Mintz <yuvalmin@broadcom.com> bnx2x: removed dcb unused code

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_dcb.c
3b60306690569927951be09160e80a8af9c94db4 18-Mar-2012 Yuval Mintz <yuvalmin@broadcom.com> bnx2x: reduced sparse warnings

This patch reduces sparse warnings in the bnx2x code,
mostly by changing functions into static and changing
initialization of structures.

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_cmn.c
nx2x_cmn.h
nx2x_dcb.c
nx2x_ethtool.c
nx2x_fw_defs.h
nx2x_main.c
51c1a580b1e07d58eb063f9f4a70aea8ad32fe23 18-Mar-2012 Merav Sicron <meravs@broadcom.com> bnx2x: revised driver prints

We've revised driver prints, changing the mask of existing prints
to allow better control over the debug messages, added prints to
error scenarios, removed unnecessary prints and corrected some spelling.
Please note that this patch contains lines with over 80 characters,
as string messages were kept in a single line.

Signed-off-by: Merav Sicron <meravs@broadcom.com>
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x.h
nx2x_cmn.c
nx2x_cmn.h
nx2x_dcb.c
nx2x_ethtool.c
nx2x_main.c
nx2x_sp.c
nx2x_sp.h
nx2x_stats.c
d8290ae54c88cab9f199a84125bd5fda9f48b032 18-Mar-2012 Yuval Mintz <yuvalmin@broadcom.com> bnx2x: added 'likely' to fast-path skb existence

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_cmn.c
4da0bd736552e6377b407b3c3d3ae518ebbdd269 19-Mar-2012 David S. Miller <davem@davemloft.net> Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
c0ea452e422a1fc78ec8c639df64012d0b8dbb4a 15-Mar-2012 Michal Schmidt <mschmidt@redhat.com> bnx2x: fix memory leak in bnx2x_init_firmware()

When cycling the interface down and up, bnx2x_init_firmware() knows that
the firmware is already loaded, but nevertheless it allocates certain
arrays anew (init_data, init_ops, init_ops_offsets, iro_arr). The old
arrays are leaked.

Fix the leaks by returning early if the firmware was already loaded.
Because if the firmware is loaded, so are the arrays.

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Acked-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_main.c
127d0a198a310970b31866af8bbb6d4b1068e546 15-Mar-2012 Michal Schmidt <mschmidt@redhat.com> bnx2x: fix a crash on corrupt firmware file

If the requested firmware is deemed corrupt and then released, reset the
pointer to NULL in order to avoid double-freeing it in
bnx2x_release_firmware() or dereferencing it in bnx2x_init_firmware().

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Acked-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_main.c
f124488e4713dc9afa2028553261b1d399286e68 12-Mar-2012 Dmitry Kravkov <dmitry@broadcom.com> bnx2x: code doesn't use stats for allocating Rx BDs

Previously, allocation used queue statistics directly in its calcualtion.
This change causes these calculations to be summed into the statistics,
without being affected by them.

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_cmn.h
241fb5d2b4205a523a50a85f9c312e1eda8ec53d 12-Mar-2012 Yuval Mintz <yuvalmin@broadcom.com> bnx2x: ethtool returns req. AN even when AN fails

Previously, if autoneg failed, ethtool would return the achieved autoneg.
This patch corrects this, causing ethtool to return the requested autoneg
capabilities even if autoneg fails.

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_ethtool.c
382984618e847ad4621d7ccbd48f5ec702c6a78e 12-Mar-2012 Yuval Mintz <yuvalmin@broadcom.com> bnx2x: ethtool now returns unknown speed/duplex

Previously, unless both interface and link were up, ethtool returned
the requested speed/duplex when asked for the interface's settings.
This change will now enable the driver to answer correctly (i.e.,
return unknown as its answer).

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_ethtool.c
9ce392d4fa43c3abb9ab02a29e225084ed84451e 12-Mar-2012 Yuval Mintz <yuvalmin@broadcom.com> bnx2x: mark functions as loaded on shared memory

This change enables the FW to make more accurate decisions regarding the
active functions.

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_cmn.c
259afa1f725dc7ec1626835b9ac54827a46cdf80 12-Mar-2012 Yuval Mintz <yuvalmin@broadcom.com> bnx2x: use param's id instead of sp_obj's id

Previously, we've used the object's function id instead of using the
input's value. This is remedied, as in other flows.

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_main.c
nx2x_sp.c
nx2x_sp.h
33ac338cf97f5e225c62ebcb3ff1a40bf32c88ad 12-Mar-2012 Yuval Mintz <yuvalmin@broadcom.com> bnx2x: set_one_mac_e1x uses raw's state as input

Previously, we used a hard-coded value as paramater, instead of using the
input's value. This is now remedied, as in other flows.

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_sp.c
c121089d9769a404468749b31c52c4d284cb56be 12-Mar-2012 Yuval Mintz <yuvalmin@broadcom.com> bnx2x: removed unused function bnx2x_queue_set_cos_cid

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_sp.c
0a52fd019625867e766c0f6126b7a15b709f83ec 12-Mar-2012 Yuval Mintz <yuvalmin@broadcom.com> bnx2x: move LLH_CAM to header, apply naming conventions

These definitions are united into the header.

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_sp.c
nx2x_sp.h
de5c37414af10ac9305d4a3e9c1468347ca3ccaa 12-Mar-2012 Yuval Mintz <yuvalmin@broadcom.com> bnx2x: FCoE statistics id fixed

FCoE statistics ids were distinguished from the L2's statistics ids.
However, not all of the change was committed. This causes a possible
collision of indices when FCoE is present.

This patch fixes the issue.

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_cmn.h
e695a2dda1775dafc88174d2c0d71fab18db105a 12-Mar-2012 Yuval Mintz <yuvalmin@broadcom.com> bnx2x: dcb bit indices flags used as bits

DCB flags were updated using the flags' bit offsets instead of
the actual bits. This is now fixed.

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_cmn.c
nx2x_dcb.c
ab4a71392eb8a91061c63af1d506f5d4580073cf 12-Mar-2012 Ariel Elior <ariele@broadcom.com> bnx2x: added cpu_to_le16 when preparing ramrod's data

Fixed endianess issue when passing arguments to FW.

Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_sp.c
db0ea84845538f15ab1b44da4af4b4fd7adc4d85 12-Mar-2012 Yuval Mintz <yuvalmin@broadcom.com> bnx2x: pfc statistics counts pfc events twice

When pfc statistics were counted, the delta change from last count
was summed twice. This fixes the issue.

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_stats.c
2b88f2de30510c0f4e623d3cd5fcd85cdb70b51f 10-Feb-2012 John Fastabend <john.r.fastabend@intel.com> net: dcb: getnumtcs()/setnumtcs() should return an int

{g|s}etnumtcs() today returns a u8 that is only used by the DCB code
to verify no error occurred. Today the driver implementations return
negative error codes which end up being non-zero so the logic works
out but triggers some sparse warnings.

To fix the sparse warnings convert the return value to an int.

CC: Eilon Greenstein <eilong@broadcom.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
nx2x_dcb.c
0b0a635f79f91f3755b6518627ea06dd0dbfd523 20-Feb-2012 Dmitry Kravkov <dmitry@broadcom.com> bnx2x: update driver version to 1.72.10-0

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x.h
fe603b4d680a2bba9d8c6d4267450fcf295f30d1 20-Feb-2012 Dmitry Kravkov <dmitry@broadcom.com> bnx2x: add gro_check

The patch provides workaround for BUG in FW 7.2.16,
which in GRO mode may miscalculate buffer and
place on SGE one frag less than it could.
It may happen only for some MTUs, we mark these MTUs
with gro_check flag during device initialization or
MTU change.

Next FW should include fix for the issue and the
patch could be reverted.

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x.h
nx2x_cmn.c
nx2x_cmn.h
nx2x_main.c
621b4d66b27e70ba9a0e8fa4676d9c4f916c8343 20-Feb-2012 Dmitry Kravkov <dmitry@broadcom.com> use FW 7.2.16

The patch integrates FW 7.2.16 HSI and implements driver
part of GRO flow.

FW 7.2.16 adds the ability to aggregate packets for GRO
(and not just LRO) and also fixes some bugs.

1. Added new aggregation mode: GRO. In this mode packets are aggregated
such that the original packets can be reconstructed by the OS.
2. 57712 HW bug workaround - initialized all CAM TM registers to 0x32.
3. Adding the FCoE statistics structures to the BNX2X HSI.
4. Wrong configuration of TX HW input buffer size may cause theoretical
performance effect. Performed configuration fix.
5. FCOE - Arrival of packets beyond task IO size can lead to crash.
Fix firmware data-in flow.
6. iSCSI - In rare cases of on-chip termination the graceful termination
timer hangs, and the termination doesn't complete. Firmware fix to MSL
timer tolerance.
7. iSCSI - Chip hangs when target sends FIN out-of-order or with isles
open at the initiator side. Firmware implementation corrected to drop
FIN received out-of-order or with isles still open.
8. iSCSI - Chip hangs when in case of retransmission not aligned to 4-bytes
from the beginning of iSCSI PDU. Firmware implementation corrected
to support arbitrary aligned retransmissions.
9. iSCSI - Arrival of target-initiated NOP-IN during intense ISCSI traffic
might lead to crash. Firmware fix to relevant flow.

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x.h
nx2x_cmn.c
nx2x_cmn.h
nx2x_ethtool.c
nx2x_hsi.h
nx2x_main.c
nx2x_sp.c
nx2x_sp.h
56ad315250bec1cd239c18712e072d1ff1f4aaf3 16-Feb-2012 Michal Schmidt <mschmidt@redhat.com> bnx2x: make bnx2x_close() static again

Commit 8304859a "bnx2x: add fan failure event handling" made the function
bnx2x_close() non-static unnecessarily. The function is not called from
other sources. Make it static again.

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Acked-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x.h
nx2x_main.c
32efe08d77f5902ce7315fc9003c010ffffb8268 19-Feb-2012 David S. Miller <davem@davemloft.net> Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

Conflicts:
drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c

Small minor conflict in bnx2x, wherein one commit changed how
statistics were stored in software, and another commit
fixed endianness bugs wrt. reading the values provided by
the chip in memory.

Signed-off-by: David S. Miller <davem@davemloft.net>
7ce5d222190cb3ce3ae88bafde7c4fa52a5103e0 15-Feb-2012 Danny Kukawka <danny.kukawka@bisect.de> net: use eth_hw_addr_random() and reset addr_assign_type

Use eth_hw_addr_random() instead of calling random_ether_addr()
to set addr_assign_type correctly to NET_ADDR_RANDOM.

Reset the state to NET_ADDR_PERM as soon as the MAC get
changed via .ndo_set_mac_address.

v2: adapt to renamed eth_hw_addr_random()

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_cmn.c
nx2x_main.c
a1e785e02bb53573443c7e58a444cef1a049f6ce 15-Feb-2012 Mintz Yuval <yuvalmin@broadcom.com> bnx2x: allow all functions to display the phy FW version

The phy FW version is stored in regular memory, no MDC-MDIO access or
any special locks are required to read it in the current implementation.

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_ethtool.c
nx2x_link.c
nx2x_link.h
04f2d51313938d004983652ea6162d4940d83a04 15-Feb-2012 Mintz Yuval <yuvalmin@broadcom.com> bnx2x: removed code re-checking memory base after device open

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_main.c
10bd1f243c3a5ea1aebae88d21932e5614afa9cc 15-Feb-2012 Mintz Yuval <yuvalmin@broadcom.com> bnx2x: allow BCM84833 phy to advertise 100Base-T speeds

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_main.c
82fa848c117e57f0b3fd848f2aaf3f6859f42201 15-Feb-2012 Mintz Yuval <yuvalmin@broadcom.com> bnx2x: notify cnic of address of info-to-the-mcp

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_main.c
d760fc37b0f74502b3f748951f22c6683b079a8e 15-Feb-2012 Mintz Yuval <yuvalmin@broadcom.com> bnx2x: allocate smaller Rx rings for 1G functions

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_cmn.c
afa13b4b94bc4b3247fa46dd8698c8dbfe1a615c 15-Feb-2012 Mintz Yuval <yuvalmin@broadcom.com> bnx2x: allocate memory dynamically in ethtool self-test.

From: Merav Sicron <meravs@broadcom.com>

Current ethtool self tests usesa large buffer on stack. This patch replaces
that array by dynamically allocated memory

Signed-off-by: Merav Sicron <meravs@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_ethtool.c
817a8aa8cfa1ebfb7bf27afb53ebb1ec3d49b564 15-Feb-2012 Mintz Yuval <yuvalmin@broadcom.com> bnx2x: force 10G on 84833 phy should be autoneg with only 10G advertised

From: Yaniv Rosner <yaniv.rosner@broadcom.com>

Signed-off-by: Yaniv Rosner <yaniv.rosner@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_link.c
1b85ae52733b859e280035330e016731d4a62307 15-Feb-2012 Mintz Yuval <yuvalmin@broadcom.com> bnx2x: added autoneg-restart after link advertisement changes

From: Yaniv Rosner <yaniv.rosner@broadcom.com>

Signed-off-by: Yaniv Rosner <yaniv.rosner@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_link.c
9e7e8399c5d3c4dfaf84324a4a6b07a701d3e482 15-Feb-2012 Mintz Yuval <yuvalmin@broadcom.com> bnx2x: ethtool publishes link partners speed and FC

Following the changes in the ethtool source code, this patch enables
the bnx2x driver to publish the Link partner's capabilities s, when ethtool
is used on an interface which completed autoneg.

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Yaniv Rosner <yaniv.rosner@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_ethtool.c
nx2x_link.c
nx2x_reg.h
e18c56b2e94080982d4542987a6fcf80b12d9414 15-Feb-2012 Mintz Yuval <yuvalmin@broadcom.com> bnx2x: half duplex support added for several boards

From: Yaniv Rosner <yaniv.rosner@broadcom.com>

Several boards require an additional HW bit written in-order to enable
half duplex.

Signed-off-by: Yaniv Rosner <yaniv.rosner@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_link.c
nx2x_reg.h
1355b704b9ba44182a97c90b4480d79f0de8f040 15-Feb-2012 Mintz Yuval <yuvalmin@broadcom.com> bnx2x: consistent statistics after internal driver reload

Currently bnx2x statistics are reset by inner driver reload, e.g. by MTU
change. This patch fixes this issue - from now on statistics should only
be reset upon device closure.
Thanks to Michal Schmidt <mschmidt@redhat.com> for his initial patch
regarding this issue.

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x.h
nx2x_cmn.c
nx2x_cmn.h
nx2x_main.c
nx2x_stats.c
nx2x_stats.h
fc543637525b59af38af2ce09a4dbdd7d5eb27bf 14-Feb-2012 Michal Schmidt <mschmidt@redhat.com> bnx2x: remove the 'poll' module option

'poll' was a debugging option, but turning it on these days leads to
kernel panic. Remove it.

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_main.c
66d885cba670059396b2f9ed9d5f4cbead0baee0 13-Feb-2012 Eric Dumazet <eric.dumazet@gmail.com> bnx2x: fix bnx2x_storm_stats_update() on big endian

commit 619c5cb6885 (New 7.0 FW: bnx2x, cnic, bnx2i, bnx2fc) added new
sparse warnings.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Eilon Greenstein <eilong@broadcom.com>
Cc: Vladislav Zolotarov <vladz@broadcom.com>
Cc: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_stats.c
23677ce3172fcb93522a1df077d21019e73ee1e3 09-Feb-2012 Joe Perches <joe@perches.com> drivers/net: Remove boolean comparisons to true/false

Booleans should not be compared to true or false
but be directly tested or tested with !.

Done via cocci script:

@@
bool t;
@@
- t == true
+ t
@@
bool t;
@@
- t != true
+ !t
@@
bool t;
@@
- t == false
+ !t
@@
bool t;
@@
- t != false
+ t

Signed-off-by: Joe Perches <joe@perches.com>
Reviewed-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_cmn.h
d5ef8a4d87ab21d575ac86366599c9152a28028d 11-Feb-2012 David S. Miller <davem@davemloft.net> Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

Conflicts:
drivers/infiniband/hw/nes/nes_cm.c

Simple whitespace conflict.

Signed-off-by: David S. Miller <davem@davemloft.net>
3f61cd879c2f112c468e8849949b6fc88c739679 06-Feb-2012 Jesper Juhl <jj@chaosbits.net> bnx2x: Fix mem leak in bnx2x_tpa_stop() if build_skb() fails.

We allocate memory for 'new_data' with kmalloc(). If we get the memory
we then try to build_skb() and if that should fail (which it can) we
do not enter 'if (likely(skb)) {' and actually use 'new_data' but
instead fall through to the 'drop:' label and end up returning from
the function without ever assigning 'new'data' to anything or freeing
it. That leaks the memory allocated to 'new_data'.

This patch fixes the memory leak by doing a kfree(new_data) in the
case where build_skb() fails (or where allocation of 'new_data' itself
fails, but in taht case it's just a harmless kfree(NULL)).

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_cmn.c
41de8d4cff21a2e81e3d9ff66f5f7c903f9c3ab1 29-Jan-2012 Joe Perches <joe@perches.com> drivers/net: Remove alloc_etherdev error messages

alloc_etherdev has a generic OOM/unable to alloc message.
Remove the duplicative messages after alloc_etherdev calls.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_main.c
e404decb0fb017be80552adee894b35307b6c7b4 29-Jan-2012 Joe Perches <joe@perches.com> drivers/net: Remove unnecessary k.alloc/v.alloc OOM messages

alloc failures use dump_stack so emitting an additional
out-of-memory message is an unnecessary duplication.

Remove the allocation failure messages.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_main.c
85b26ea18ee63be83d65ec6db72ad7857980a04b 26-Jan-2012 Ariel Elior <ariele@broadcom.com> bnx2x: Update version to 1.72.0 and copyrights

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>
nx2x.h
nx2x_cmn.c
nx2x_cmn.h
nx2x_dcb.c
nx2x_dcb.h
nx2x_dump.h
nx2x_ethtool.c
nx2x_fw_defs.h
nx2x_fw_file_hdr.h
nx2x_hsi.h
nx2x_init.h
nx2x_init_ops.h
nx2x_link.c
nx2x_link.h
nx2x_main.c
nx2x_reg.h
nx2x_sp.c
nx2x_sp.h
nx2x_stats.c
nx2x_stats.h
7a752993fe90adf8e150cc1a85beef5f782429e7 26-Jan-2012 Ariel Elior <ariele@broadcom.com> bnx2x: Recoverable and unrecoverable error statistics

Add statistics for tracking parity errors from which we successfully
recovered and those which were deemed unrecoverable.

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>
nx2x_ethtool.c
nx2x_main.c
nx2x_stats.h
95c6c6165eaf5a031bcf31606e081c72e4acdeb8 26-Jan-2012 Ariel Elior <ariele@broadcom.com> bnx2x: Recovery flow bug fixes

1. Sample mcp pulse and mcp sequence in nic load instead of in init_one
as they may change by the time we want to use them.

2. Allow cnic to access device during nic load (by adding a new "LOADING" state
to recovery flow). This prevents the unnecessary cnic timeout which resulted
by cnic attempting to access because nic is loading, but being blocked because
of the Recovery state.

3. Issue 'fake' driver load command to mcp when last driver unloads to prevent
mcp from taking ownership. When recovery is complete unload fake driver to
allow mcp to initialize the hardware before first driver loads.

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>
nx2x.h
nx2x_cmn.c
nx2x_main.c
889b9af34f986138eebebfe781567cb950b3a22b 26-Jan-2012 Ariel Elior <ariele@broadcom.com> bnx2x: Track active PFs with bitmap

The recovery register (to which a hardware lock has been added in previous
patch) is used amongst other things to track the active PFs. The old
implementation which used a per path counter is not viable in a virtualized
environment where a pf may increment the counter and then have the kernel
crash around it preventing the counter from ever reaching zero.
In the new implementation the scenario described will result in the PF timing
out against the mcp, which will clear the PF's bit in the bitmask allowing
recovery process to proceed.

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>
nx2x_cmn.c
nx2x_cmn.h
nx2x_main.c
f16da43b5df947cef427f19b8f5c4b2f5d566231 26-Jan-2012 Ariel Elior <ariele@broadcom.com> bnx2x: Lock PF-common resources

Use hardware locks to protect resources common to several Physical Functions. In
a virtualized environment the RTNL lock only protects a PF's driver against
the PFs sharing it's VMs with regard to device resources. Other PFs may reside
in other VMs under other OSs, and are not subject to the lock. Such resources
which were previously protected implicitly by the RTNL lock must now be
protected explicitly with dedicated HW locks.

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>
nx2x_cmn.h
nx2x_ethtool.c
nx2x_main.c
nx2x_reg.h
d1e2d9660e6bca2f06606b4bc65ea669bf669b0a 26-Jan-2012 Ariel Elior <ariele@broadcom.com> bnx2x: Loaded Firmware Version Validation

In a virtualized environment it is possible for a loading driver to discover
that Firmware is already loaded to the device, and that this FW does not match
its own. This can happen for example if different Physical Functions are
Assigned to different VMs in which different driver versions are loaded. The
code in this patch ensures that only drivers with matching FW are loaded over
the device, and that in the case described above where the Firmware version
doesn't match the driver load is aborted.

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>
nx2x_cmn.c
89db4ad830fbdde9c2d990b88bbac8245718177d 26-Jan-2012 Ariel Elior <ariele@broadcom.com> bnx2x: Function Level Reset Final Cleanup

1. Fix bug where return value is ignored
2. Improve printouts
3. Fix typos

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>
nx2x_main.c
c22610d0001ebf3420d39f419056a56c5aa43096 26-Jan-2012 Ariel Elior <ariele@broadcom.com> bnx2x: Obtain Bus Device Function from register

BDF was obtained from kernel but since in virtualized environment
(e.g. physical device assigment in KVM) the function number may
not be the real one, the info must be obtained from the device.

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>
nx2x_main.c
nx2x_reg.h
127a425e8f05b9813879e8ca909ef4338ec8ec04 26-Jan-2012 Ariel Elior <ariele@broadcom.com> bnx2x: Removing indirect register access

In virtualized environments indirect access to the device may not be supported
(depending on the Hypervisor type). Indirect device access was used since in
some harware contexts (i.e. certain chipset and BIOS) every access the driver
makes across the pci is followed by a BIOS initiated Zero Length Read to the
same address. When accessing widebus registers this zero length read corrupts
the serialization of the read/write sequence resulting with errors. To avoid
this problem widebus registers are always accessed via the DMAE or the indirect
interface. However, the 57712x and 578xx devices intercept the zero length read
and so using the indirect interface with these devices is not necessary. Since
PDA is only supported for 57712x and 578xx the indirect access to device was
restricted to 57710 and 57711x.

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>
nx2x_init_ops.h
nx2x_main.c
8d7b02783bc2b05974f6e47c2be8157f3a9cd89e 26-Jan-2012 Ariel Elior <ariele@broadcom.com> bnx2x: Support Queue Per Cos in 5771xx devices

Enable the use of up to three hardware queues for transmission. The queues
are always dequed round robin (i.e. strict priority, PFC and ETS are not
supported). This does allow the allocation of a seperate HW queue for low
volume, high priority traffic which will be serviced more promptly.

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>
nx2x_cmn.h
nx2x_sp.h
a44acd551467d78a26bfa76ea348225575830efc 24-Jan-2012 Dan Carpenter <dan.carpenter@oracle.com> bnx2x: unlock before returning an error

We introduced a new return here but forgot to drop the lock.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_sp.c
44151acb9f13563e40d40d14c3e5c11ce21b59e1 23-Jan-2012 Yuval Mintz <yuvalmin@broadcom.com> bnx2x: fix compilation error with SOE in fw_dump

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_main.c
65087cfee50595185f6bbf3d78272eeb34186d2b 23-Jan-2012 Ariel Elior <ariele@broadcom.com> bnx2x: handle CHIP_REVISION during init_one

The macro `CHIP_IS_E1x' requires `bp' to be initialized.
As `bp' is not yet initialized during this phase of `bnx2x_init_dev',
it accessed uninitialized fields in the struct.

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>
nx2x_main.c
1fdf155158886514c82e5401ab7b1264beb375bf 23-Jan-2012 Dmitry Kravkov <dmitry@broadcom.com> bnx2x: allow user to change ring size in ISCSI SD mode

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_cmn.c
b0700b1e6b9556aa99bb9bf6ad6d830ae38344c7 23-Jan-2012 Dmitry Kravkov <dmitry@broadcom.com> bnx2x: fix Big-Endianess in ethtool -t

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_ethtool.c
d5e836329bd836d24b168004827532426cad2f39 23-Jan-2012 Yuval Mintz <yuvalmin@broadcom.com> bnx2x: fixed ethtool statistics for MF modes

Previosuly, in MF modes `ethtool -S' lacked some of the statistics
which appeared in non-MF modes. This has been fixed.

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_ethtool.c
460a25cdaef1a2b6b8e14e371d868aa91b0e72e8 23-Jan-2012 Yuval Mintz <yuvalmin@broadcom.com> bnx2x: credit-leakage fixup on vlan_mac_del_all

Upon insertion of elements into the execution queue, it is validated
that there are enough credits to support additional vlan-macs,
and the credits are consumed. However, when removing a pending
command in `bnx2x_vland_mac_del_all' the consumed credits are not
released, which might cause leakage and eventually the inability to
add new vlan-macs in certain scenarios.

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_sp.c
nx2x_sp.h
6ab48a5c86ce778188c173818cb2f1644526e962 17-Jan-2012 Yaniv Rosner <yanivr@broadcom.com> bnx2x: Disable AN KR work-around for BCM57810

Disable the work-around for the autoneg KR of the BCM57810 in case the Warpcore version is 0xD108 and above, which fixes this problem.

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>
nx2x_link.c
096b9527db77defb2501509f2517d2ab24300d9c 17-Jan-2012 Yaniv Rosner <yanivr@broadcom.com> bnx2x: Remove AutoGrEEEn for BCM84833

Disable the autoGrEEEn feature for BCM84833.

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>
nx2x_link.c
75318327802235ecd7e90b0760cceb994bf975ca 17-Jan-2012 Yaniv Rosner <yanivr@broadcom.com> bnx2x: Remove 100Mb force speed for BCM84833

Remove unsupported speed of 100Mb force for BCM84833 due to hardware
limitation.

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>
nx2x_ethtool.c
nx2x_link.c
127302bb42257eef5d357722d670c4ac53327088 17-Jan-2012 Yaniv Rosner <yanivr@broadcom.com> bnx2x: Fix PFC setting on BCM57840

This patch handles the second port of a path in a 4-port device of
BCM57840.

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>
nx2x_link.c
nx2x_reg.h
11b2ec6b739ee90211dc6f6942e2ba3a141434a8 17-Jan-2012 Yaniv Rosner <yanivr@broadcom.com> bnx2x: Fix Super-Isolate mode for BCM84833

The Super-Isolate mode comes to isolate the BCM84833 PHY from the
outside world. Not doing it correctly, made link partner see the link
before the driver was loaded.

This patch also involves SPIROM version fixes since it is used to
determine whether the common init of the PHY was already executed, and
the common init of this PHY is partially responsible for setting the
Super-Isolate mode.

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>
nx2x_link.c
278bc4296bd64ffd1d3913b487dc8a520e423a7a 15-Dec-2011 Ben Hutchings <bhutchings@solarflare.com> ethtool: Define and apply a default policy for RX flow hash indirection

All drivers that support modification of the RX flow hash indirection
table initialise it in the same way: RX rings are assigned to table
entries in rotation. Make that default policy explicit by having them
call a ethtool_rxfh_indir_default() function.

In the ethtool core, add support for a zero size value for
ETHTOOL_SRXFHINDIR, which resets the table to this default.

Partly-suggested-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Acked-by: Shreyas N Bhatewara <sbhatewara@vmware.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_cmn.c
7850f63f1620512631445b901ae11cd149e7375c 15-Dec-2011 Ben Hutchings <bhutchings@solarflare.com> ethtool: Centralise validation of ETHTOOL_{G, S}RXFHINDIR parameters

Add a new ethtool operation (get_rxfh_indir_size) to get the
indirectional table size. Use this to validate the user buffer size
before calling get_rxfh_indir or set_rxfh_indir. Use get_rxnfc to get
the number of RX rings, and validate the contents of the new
indirection table before calling set_rxfh_indir. Remove this
validation from drivers.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Acked-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_ethtool.c
fcdf95cb293603acdff910715c8aa2b19ed29df4 14-Dec-2011 Barak Witkowski <barak@broadcom.com> bnx2x: handle vpd data longer than 128 bytes

Signed-off-by: Barak Witkowski <barak@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_main.c
036d2df9b3167598a9c9f1c13d9039f7e6cb0083 13-Dec-2011 Dmitry Kravkov <dmitry@broadcom.com> bnx2x: properly update skb when mtu > 1500

Since commit e52fcb2462ac484e6dd6e68869536609f0216938 newly allocated
skb for small packets are not updated properly and dropped by stack.

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_cmn.c
7185bb335a1493f0ce27e9e94a1645a15db0fc0f 08-Dec-2011 Dmitry Kravkov <dmitry@broadcom.com> bnx2x: properly initialize L5 features

The code is missing initialization of NO_FCOE_FLAG and NO_ISCSI*FLAGS
when CONFIG_CNIC is not selected.
This causes panic during driver load since commit
1d187b34daaecbb87aa523ba46b92930a388cb21 where NO_FCOE tested
unconditionally (outside #ifdef BCM_CNIC structure) and
accessed fp[FCOE_IDX] which is not allocated.

Reported-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_cmn.h
nx2x_main.c
f33f1fccbf67b3d9b310a4b09114b7c670320ad4 07-Dec-2011 Barak Witkowski <barak@broadcom.com> bnx2x: fix typo in fcoe stats collection

Signed-off-by: Barak Witkowski <barak@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_main.c
f2fd5c3458ffcf4f9b4fbfa64980dffe1850f7de 06-Dec-2011 Michael Chan <mchan@broadcom.com> bnx2x: Fix compile errors if CONFIG_CNIC is not set

Don't provide FCoE and iSCSI statistics to management firmware if
CONFIG_CNIC is not set. Some needed structure fields are not defined
without CONFIG_CNIC.

Reported-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_main.c
73dbb5e1627a35c8ab81f3813c096e9e7aaabaaa 06-Dec-2011 Dmitry Kravkov <dmitry@broadcom.com> bnx2x: fix crash while ethtool -t

commit 2df1a70aaf70e8dff11b89b938a5f317556ee640 "bnx2x: Support
for byte queue limits" has introduced an asymmetry in usage of
netdev_tx_completed_queue and netdev_tx_sent_queue. Missing
call to netdev_tx_sent_queue causes the crash during ethtool -t.

The patch adds the missing call.

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_ethtool.c
1d187b34daaecbb87aa523ba46b92930a388cb21 05-Dec-2011 Barak Witkowski <barak@broadcom.com> bnx2x, cnic: support DRV_INFO upon FW request

Add support to send driver capabilities, settings and statistics to
management firmware.

[ Redone using many local variables, removed many unnecessary inlines,
and put #defines at the left margin suggested by Joe Perches ]

Signed-off-by: Barak Witkowski <barak@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x.h
nx2x_hsi.h
nx2x_main.c
nx2x_stats.c
ed5162a04f929f6298b6a3b6d7644ecae1933085 05-Dec-2011 Ariel Elior <ariele@broadcom.com> bnx2x: support classification config query

To support copying MAC addresses to firmware query structure.

[ Fixed up style and formatting errors noted by DaveM and Joe Perches ]

Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: Barak Witkowski <barak@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_sp.c
nx2x_sp.h
50f0a562f8cc9ed9d9f7f7380434c3c8646172d5 05-Dec-2011 Barak Witkowski <barak@broadcom.com> bnx2x: add fcoe statistics

Add FCoE statistics support for FCoE capable devices.

Signed-off-by: Barak Witkowski <barak@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x.h
nx2x_hsi.h
nx2x_main.c
nx2x_stats.c
0e898dd7a820c258270af36074427e0bed48c8db 05-Dec-2011 Barak Witkowski <barak@broadcom.com> bnx2x: add PFC statistics

Add Priority flow control counters for ethtool -S.

Signed-off-by: Barak Witkowski <barak@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x.h
nx2x_ethtool.c
nx2x_hsi.h
nx2x_main.c
nx2x_stats.c
nx2x_stats.h
01e23742b276cb8cb53bf727c4b1c50fae1860e7 29-Nov-2011 Thomas Meyer <thomas@m3y3r.de> bnx2x: Use kcalloc instead of kzalloc to allocate array

The advantage of kcalloc is, that will prevent integer overflows which could
result from the multiplication of number of elements and size and it is also
a bit nicer to read.

The semantic patch that makes this change is available
in https://lkml.org/lkml/2011/11/25/107

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_cmn.c
nx2x_sp.c
614c76df1d1224dc2eee8678fab6e0b95b49b7da 28-Nov-2011 Dmitry Kravkov <dmitry@broadcom.com> bnx2x: handle iSCSI SD mode

in iSCSI SD mode to bnx2x device assigned single mac address
which is supposted to be iscsi mac. If this mode is recognized
bnx2x will disable LRO, decrease number of queues to 1 and rx ring
size to the minumum allowed by FW, this in order minimize memory use.
It will tranfer mac for iscsi usage and zero primary mac of the netdev.

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x.h
nx2x_cmn.c
nx2x_cmn.h
nx2x_main.c
2df1a70aaf70e8dff11b89b938a5f317556ee640 28-Nov-2011 Tom Herbert <therbert@google.com> bnx2x: Support for byte queue limits

Changes to bnx2x to use byte queue limits.

Signed-off-by: Tom Herbert <therbert@google.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_cmn.c
de0396f4003a24a57875b35f2996fdaa47bc1d0d 28-Nov-2011 Yaniv Rosner <yanivr@broadcom.com> bnx2x: Change value comparison order

Change comparison order such that the variable will come before the compared value.

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>
nx2x_link.c
2f751a805e35dcf687473c27282a6602577df541 28-Nov-2011 Yaniv Rosner <yanivr@broadcom.com> bnx2x: Cosmetic changes

Fix spelling, alignment, empty lines, relocate the is_4_port_mode function, and split bnx2x_link_status_update function.

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>
nx2x_ethtool.c
nx2x_link.c
32911333e03210898709d4df40ba197aed427219 28-Nov-2011 Yaniv Rosner <yanivr@broadcom.com> bnx2x: Fix self test of BCM57800

Fix the MAC test of the 1G port of the BCM57800 to use the UMAC instead of the XMAC.

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>
nx2x_ethtool.c
6db5193b29642ab18e6343c8fcbc3417d6e80983 28-Nov-2011 Yaniv Rosner <yanivr@broadcom.com> bnx2x: Add known PHY type check

The populate function will fail in case an unknown external PHY is detected.

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>
nx2x_link.c
ec15b898a4a812e89a63b8e52bc11d4e84d74db1 28-Nov-2011 Yaniv Rosner <yanivr@broadcom.com> bnx2x: Change Warpcore MDIO work around mode

This patch enables the usage of simpler MDC/MDIO work-around when accessing Warpcore registers.

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>
nx2x_link.c
521683da84b824d36b6388d2e7ea96c81eafc699 28-Nov-2011 Yaniv Rosner <yanivr@broadcom.com> bnx2x: Fix BCM84833 link and LED behavior

This patch contain several fixes for the BCM84833. This PHY is still not in bnx2x production, hence this patch can be considered as enhancement.

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>
nx2x_link.c
nx2x_reg.h
b76070b4058c318dde17a495b2e2d83c456f5fa9 28-Nov-2011 Yaniv Rosner <yanivr@broadcom.com> bnx2x: Warpcore HW reset following fan failure

Put Warpcore in low power mode in case of fan failure to reduce heat.

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>
nx2x_link.c
nx2x_reg.h
870516e1733a36021ea3dd303c71adf3ce2c84d3 28-Nov-2011 Yaniv Rosner <yanivr@broadcom.com> bnx2x: ETS changes

Fix a problem when new traffic class is created with 0% BW, the ETS is not conforming.

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>
nx2x_link.c
nx2x_link.h
866cedae516e1d348fddc0a8782e2480c3169dba 28-Nov-2011 Yaniv Rosner <yanivr@broadcom.com> bnx2x: PFC changes

Change BRB to work in per class guaranteed mode and handle cases for BW 0%.

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>
nx2x_link.c
nx2x_reg.h
6dec4ac4ee1ad894dc0e9647cd3e180f93fc353c 26-Nov-2011 David S. Miller <davem@davemloft.net> Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

Conflicts:
net/ipv4/inet_diag.c
1d125bd52e1e1b9810a2d5a32a76147912fa4133 23-Nov-2011 Yaniv Rosner <yanivr@broadcom.com> bnx2x: Fix 5461x LED

Fix port identify test on 5461x PHY by driving LEDs through MDIO.

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>
nx2x_link.c
nx2x_reg.h
2cfa5a0471fef43fda0b7bd87e3a5e4dbadb7809 23-Nov-2011 Eric Dumazet <eric.dumazet@gmail.com> net: treewide use of RCU_INIT_POINTER

rcu_assign_pointer(ptr, NULL) can be safely replaced by
RCU_INIT_POINTER(ptr, NULL)

(old rcu_assign_pointer() macro was testing the NULL value and could
omit the smp_wmb(), but this had to be removed because of compiler
warnings)

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_main.c
efd0bf97deeddd9ba53daabfc470a1399c6b0b2d 21-Nov-2011 David S. Miller <davem@davemloft.net> Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

The forcedeth changes had a conflict with the conversion over
to atomic u64 statistics in net-next.

The libertas cfg.c code had a conflict with the bss reference
counting fix by John Linville in net-next.

Conflicts:
drivers/net/ethernet/nvidia/forcedeth.c
drivers/net/wireless/libertas/cfg.c
c8f44affb7244f2ac3e703cab13d55ede27621bb 15-Nov-2011 Michał Mirosław <mirq-linux@rere.qmqm.pl> net: introduce and use netdev_features_t for device features sets

v2: add couple missing conversions in drivers
split unexporting netdev_fix_features()
implemented %pNF
convert sock::sk_route_(no?)caps

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_cmn.c
nx2x_cmn.h
eb2afd4a622985eaccfa8c7fc83e890b8930e0ab 15-Nov-2011 Dmitry Kravkov <dmitry@broadcom.com> bnx2x: cache-in compressed fw image

Re-request fw from fs may fail for different reasons, once the fw was
loaded we won't release it until driver is removed.

This also resolves the boot problem when initial fw is located on initrd,
but rootfs is still unavailable, in this case device reset will fail due
to absence of fw files.

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_main.c
nx2x_sp.c
5219e4c93c281377700206ae2b3ba4d91653d2ba 14-Nov-2011 Dmitry Kravkov <dmitry@broadcom.com> bnx2x: add endline at end of message

Reported-by: Joe Perches <joe@perches.com>
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_main.c
e52fcb2462ac484e6dd6e68869536609f0216938 14-Nov-2011 Eric Dumazet <eric.dumazet@gmail.com> bnx2x: uses build_skb() in receive path

bnx2x uses following formula to compute its rx_buf_sz :

dev->mtu + 2*L1_CACHE_BYTES + 14 + 8 + 8 + 2

Then core network adds NET_SKB_PAD and SKB_DATA_ALIGN(sizeof(struct
skb_shared_info))

Final allocated size for skb head on x86_64 (L1_CACHE_BYTES = 64,
MTU=1500) : 2112 bytes : SLUB/SLAB round this to 4096 bytes.

Since skb truesize is then bigger than SK_MEM_QUANTUM, we have lot of
false sharing because of mem_reclaim in UDP stack.

One possible way to half truesize is to reduce the need by 64 bytes
(2112 -> 2048 bytes)

Instead of allocating a full cache line at the end of packet for
alignment, we can use the fact that skb_shared_info sits at the end of
skb->head, and we can use this room, if we convert bnx2x to new
build_skb() infrastructure.

skb_shared_info will be initialized after hardware finished its
transfert, so we can eventually overwrite the final padding.

Using build_skb() also reduces cache line misses in the driver, since we
use cache hot skb instead of cold ones. Number of in-flight sk_buff
structures is lower, they are recycled while still hot.

Performance results :

(820.000 pps on a rx UDP monothread benchmark, instead of 720.000 pps)

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Eilon Greenstein <eilong@broadcom.com>
CC: Ben Hutchings <bhutchings@solarflare.com>
CC: Tom Herbert <therbert@google.com>
CC: Jamal Hadi Salim <hadi@mojatatu.com>
CC: Stephen Hemminger <shemminger@vyatta.com>
CC: Thomas Graf <tgraf@infradead.org>
CC: Herbert Xu <herbert@gondor.apana.org.au>
CC: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Acked-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x.h
nx2x_cmn.c
nx2x_cmn.h
nx2x_ethtool.c
nx2x_main.c
5d70b88cd41ef0f2ac0caaab4fd492dd686feee6 13-Nov-2011 Dmitry Kravkov <dmitry@broadcom.com> bnx2x: update driver version to 1.70.35-0

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x.h
72754080d14feef1ca0b3ae383ddfdc5d9a71b1a 13-Nov-2011 Ariel Elior <ariele@broadcom.com> bnx2x: Remove on-stack napi struct variable

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>
nx2x_cmn.c
4a025f49d3f2f2f39b474af360c81a5587b41657 13-Nov-2011 Dmitry Kravkov <dmitry@broadcom.com> bnx2x: prevent race in statistics flow

The race may cause access of registers while MAC hw block is
in reset state. As a result syslog will show error messages.
We can prevent this by using state from local variable.

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_stats.c
8304859adc213df9f69a86e06164683f76cd5d49 13-Nov-2011 Ariel Elior <ariele@broadcom.com> bnx2x: add fan failure event handling

Shut down the device in case of fan failure to prevent HW damage.

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x.h
nx2x_main.c
46fa1309fe5b05249447df903ec256c3509eb985 13-Nov-2011 Dmitry Kravkov <dmitry@broadcom.com> bnx2x: remove unused #define

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x.h
b363782761eea7076619fe44063b915dae0b4cc7 13-Nov-2011 Dmitry Kravkov <dmitry@broadcom.com> bnx2x: simplify definition of RX_SGE_MASK_LEN and use it.

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x.h
nx2x_cmn.h
f9c058b633000e64fba05fc14ba94dd09a20e674 13-Nov-2011 Dmitry Kravkov <dmitry@broadcom.com> bnx2x: DCBX: use #define instead of magic

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_dcb.c
nx2x_dcb.h
00253a8cf3119af6cb07c9de2c08a50d39fc7201 13-Nov-2011 Dmitry Kravkov <dmitry@broadcom.com> bnx2x: propagate DCBX negotiation

We need propagate the DCBX results from PMF to other functions
on the same port, in order to properly update netdev structure
and allow following new ETS and PFC configurations.

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_cmn.c
nx2x_cmn.h
nx2x_dcb.c
nx2x_main.c
b306f5edf6615d3abeba16914872c24c9be29051 13-Nov-2011 Dmitry Kravkov <dmitry@broadcom.com> bnx2x: separate FCoE and iSCSI license initialization.

FCoE license info must be initialized at probe(), but
iSCSI at open().

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_cmn.c
nx2x_cmn.h
nx2x_main.c
ad756594a8d88ffc048d14b8d5c02971e08856ce 13-Nov-2011 Dmitry Kravkov <dmitry@broadcom.com> bnx2x: remove unused variable

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_cmn.c
f233cafe1a9df8de75f446bc6f5dc715cc564325 13-Nov-2011 Dmitry Kravkov <dmitry@broadcom.com> bnx2x: use rx_queue index for skb_record_rx_queue()

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x.h
nx2x_cmn.c
nx2x_cmn.h
nx2x_main.c
62ac0dc9ec0b90b83103ebb659e0696c344e4be4 13-Nov-2011 Dmitry Kravkov <dmitry@broadcom.com> bnx2x: allow FCoE and DCB for 578xx

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_dcb.c
nx2x_main.c
68aad78c5023b8aa82da99b47f9d8cf40e8ca453 07-Nov-2011 Rick Jones <rick.jones2@hp.com> sweep the floors and convert some .get_drvinfo routines to strlcpy

Per the mention made by Ben Hutchings that strlcpy is now the preferred
string copy routine for a .get_drvinfo routine, do a bit of floor
sweeping and convert some of the as-yet unconverted ethernet drivers to
it.

Signed-off-by: Rick Jones <rick.jones2@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_ethtool.c
6afc25c9a7197db24e1cbfa40140ee360d65141f 27-Oct-2011 Dmitry Kravkov <dmitry@broadcom.com> bnx2x: update driver version to 1.70.30-0

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x.h
5e5399d8741ca3667560c43365285f8c280b3181 27-Oct-2011 Dmitry Kravkov <dmitry@broadcom.com> bnx2x: use FW 7.0.29.0

The FW includes the following fixes:
1. (iSCSI) Arrival of un-solicited ASYNC message causes
firmware to abort the connection with RST.
2. (FCoE) There is a probability that truncated FCoE packet on
RX path won't get detected which might lead to FW assert.
3. (iSCSI) Arrival of target-initiated NOP-IN during intense
ISCSI traffic might lead to FW assert.
4. (iSCSI) Chip hangs when in case of retransmission not aligned
to 4-bytes from the beginning of iSCSI PDU.
5. (FCoE) Arrival of packets beyond task IO size can lead to crash.

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_hsi.h
bfdb58232f9227149cac89c17454edaf25f43136 27-Oct-2011 Yaniv Rosner <yanivr@broadcom.com> bnx2x: Enable changing speed when port type is PORT_DA

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>
nx2x_ethtool.c
001cea77b98f912050b8ea8995253fdbe7333fb6 27-Oct-2011 Yaniv Rosner <yanivr@broadcom.com> bnx2x: Fix 54618se LED behavior

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>
nx2x_link.c
ce7c048928473220394bb126b08596e92e998a36 27-Oct-2011 Yaniv Rosner <yanivr@broadcom.com> bnx2x: Fix RX/TX problem caused by the MAC layer

This patch fixes a problem in which the host stops receiving data after
restarting the interface. This issue is caused by combination of incorrect
data path tap closure, along with missing MAC reset.

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>
nx2x_link.c
a9077bfd0b3fdcd1051cc3d09bf8c28f9d4d506a 27-Oct-2011 Yaniv Rosner <yanivr@broadcom.com> bnx2x: Add link retry to 578xx-KR

This fix solves a problem of no link on 578xx-KR by retrying to link up to
four timer using the periodic function.

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>
nx2x_link.c
nx2x_link.h
26ffaf36c8e0a0eefb6ff031d6166b5ee82eb3de 27-Oct-2011 Yaniv Rosner <yanivr@broadcom.com> bnx2x: Fix LED blink rate for 578xx

Adjust blink rate on 578xx to fit its clock rate.

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>
nx2x_link.c
1805b2f04855f07afe3a71d620a68f483b0ed74f 25-Oct-2011 David S. Miller <davem@davemloft.net> Merge branch 'master' of ra.kernel.org:/pub/scm/linux/kernel/git/davem/net
e1ac50f64691de9a095ac5d73cb8ac73d3d17dba 20-Oct-2011 Eric Dumazet <eric.dumazet@gmail.com> bnx2x: fix skb truesize underestimation

bnx2x allocates a full page per fragment.

We must account in skb->truesize, the size of the fragment, not the used
part of it.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_cmn.c
9e903e085262ffbf1fc44a17ac06058aca03524a 18-Oct-2011 Eric Dumazet <eric.dumazet@gmail.com> net: add skb frag size accessors

To ease skb->truesize sanitization, its better to be able to localize
all references to skb frags size.

Define accessors : skb_frag_size() to fetch frag size, and
skb_frag_size_{set|add|sub}() to manipulate it.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_cmn.c
8b0c11679fd37522d8d34a76101319a085d80912 08-Oct-2011 Rick Jones <rick.jones2@hp.com> net: Remove unnecessary driver assignments of ethtool_ringparam fields to zero

Per comments from Ben Hutchings on a previous patch, sweep the floors
a little removing unnecessary assignments of zero to fields of struct
ethtool_ringparam in driver code supporting ethtool -g.

Signed-off-by: Rick Jones <rick.jones2@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_ethtool.c
88c5100c28b02c4b2b2c6f6fafbbd76d90f698b9 07-Oct-2011 David S. Miller <davem@davemloft.net> Merge branch 'master' of github.com:davem330/net

Conflicts:
net/batman-adv/soft-interface.c
f0cd7bdc042310b6b104f133bbfd520a72b3c08a 05-Oct-2011 Dan Carpenter <dan.carpenter@oracle.com> bnx2x: remove some dead code

This code is after the break statement so it never gets used. The
"vlan_mac_obj" variable does get initialized properly, so we can just
delete this.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_main.c
8decf868790b48a727d7e7ca164f2bcd3c1389c0 22-Sep-2011 David S. Miller <davem@davemloft.net> Merge branch 'master' of github.com:davem330/net

Conflicts:
MAINTAINERS
drivers/net/Kconfig
drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
drivers/net/ethernet/broadcom/tg3.c
drivers/net/wireless/iwlwifi/iwl-pci.c
drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c
drivers/net/wireless/rt2x00/rt2800usb.c
drivers/net/wireless/wl12xx/main.c
815c7db5c809ea3d5735de3131ecdf758b0e14ff 06-Sep-2011 Ben Hutchings <bhutchings@solarflare.com> ethtool: Clean up definitions of rule location arrays in RX NFC

Correct the description of ethtool_rxnfc::rule_locs; it is an array
of currently used locations, not all possible valid locations.

Add note that drivers must not use ethtool_rxnfc::rule_locs.

The rule_locs argument to ethtool_ops::get_rxnfc is either NULL or a
pointer to an array of u32, so change the parameter type accordingly.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_ethtool.c
3857e3ee2209b7289c434103e366f765ec82a22d 29-Aug-2011 Dmitry Kravkov <dmitry@broadcom.com> bnx2x: Fix build error

On Mon, 2011-08-29 at 13:28 -0700, Randy Dunlap wrote:
> (on i386 or x86_64)
>
> drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c:10148: error: 'bnx2x_fcoe_get_wwn' undeclared here (not in a function)

This should sync #define structures between definition and declaration
Acked-by: Randy Dunlap <rdunlap@xenotime.net>

Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_cmn.h
3756a89f3d039d8a6aa2556f8d57d4b2ec25d5dd 23-Aug-2011 Yaniv Rosner <yanivr@broadcom.com> bnx2x: Add new PHY BCM54616

The BCM54616 PHY is very similar to the 54618SE, only without EEE support, which will not be activated due to querying the actual PHY type.
This check is already done by reading a dedicated PHY register.

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>
nx2x_hsi.h
nx2x_link.c
6e68c912eee8f5ebc975cfb81d66d4a214b07d46 23-Aug-2011 Michal Schmidt <mschmidt@redhat.com> bnx2x: resurrect RX hashing

bnx2x used to be able to set rxhash, but this was lost in the conversion
to hw_features (commit 66371c441).
Restore it and enable it by default.

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
CC: Vladislav Zolotarov <vladz@broadcom.com>
CC: Eilon Greenstein <eilong@broadcom.com>
CC: Dmitry Kravkov <dmitry@broadcom.com>
CC: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_main.c
f55c95724789fccb412abef13c3f503e55148790 25-Aug-2011 Ian Campbell <Ian.Campbell@citrix.com> bnx2x: convert to SKB paged frag API.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Eilon Greenstein <eilong@broadcom.com>
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_cmn.c
823dcd2506fa369aeb8cbd26da5663efe2fda9a9 20-Aug-2011 David S. Miller <davem@davemloft.net> Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net
96b0accb8867627250e911f8929e6c01da1ffd40 19-Aug-2011 Michal Schmidt <mschmidt@redhat.com> bnx2x: downgrade Max BW error message to debug

There are valid configurations where Max BW is configured to zero for
some VNs.
Print the message only if debugging is enabled and do not call the
configuration "illegal".

[v2: use DP(), not BNX2X_DBG_ERR(); recommended by Eilon Greenstein.]

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Acked-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_cmn.h
01789349ee52e4a3faf376f1485303d9723c4f1f 16-Aug-2011 Jiri Pirko <jpirko@redhat.com> net: introduce IFF_UNICAST_FLT private flag

Use IFF_UNICAST_FTL to find out if driver handles unicast address
filtering. In case it does not, promisc mode is entered.

Patch also fixes following drivers:
stmmac, niu: support uc filtering and yet it propagated
ndo_set_multicast_list
bna, benet, pxa168_eth, ks8851, ks8851_mll, ksz884x : has set
ndo_set_rx_mode but do not support uc filtering

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_main.c
f1deab502206ab7e4470334b7738383c76e4ddd9 14-Aug-2011 Joe Perches <joe@perches.com> bnx2x: Use pr_fmt and message logging cleanups

Add pr_fmt(fmt) KBUILD_MODNAME ": " to prefix messages with "bnx2x: ".
Remove #define DP_LEVEL and use pr_notice.
Repeating KERN_<LEVEL> isn't necessary in multi-line printks.
printk macro neatening, use fmt and ##__VA_ARGS__.
Coalesce long formats.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x.h
nx2x_cmn.c
nx2x_dcb.c
nx2x_ethtool.c
nx2x_main.c
nx2x_sp.c
nx2x_stats.c
94f05b0f60de32e6efa19310bd142f1519e2abdb 14-Aug-2011 Joe Perches <joe@perches.com> bnx2x: Coalesce pr_cont uses and fix DP typos

Uses of pr_cont should be avoided where reasonably possible
because they can be interleaved by other threads and processes.

Coalesce pr_cont uses.

Fix typos, duplicated words and spacing in DP uses caused
by split multi-line formats. Coalesce some of these
split formats. Add missing terminating newlines to DP uses.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x_cmn.c
nx2x_cmn.h
nx2x_dcb.c
nx2x_link.c
nx2x_main.c
nx2x_sp.c
0f9dad10a040fa72c588db46a94c9e96545cc509 14-Aug-2011 Joe Perches <joe@perches.com> bnx2x: Remove local defines for %pM and mac address

Use %pM and mac address directly instead.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
nx2x.h
nx2x_main.c
nx2x_sp.c
adfc5217e9db68d3f0cec8dd847c1a6d3ab549ee 07-Apr-2011 Jeff Kirsher <jeffrey.t.kirsher@intel.com> broadcom: Move the Broadcom drivers

Moves the drivers for Broadcom devices into
drivers/net/ethernet/broadcom/ and the necessary Kconfig and Makefile
changes.

CC: Eilon Greenstein <eilong@broadcom.com>
CC: Michael Chan <mchan@broadcom.com>
CC: Matt Carlson <mcarlson@broadcom.com>
CC: Gary Zambrano <zambrano@broadcom.com>
CC: "Maciej W. Rozycki" <macro@linux-mips.org>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
akefile
nx2x.h
nx2x_cmn.c
nx2x_cmn.h
nx2x_dcb.c
nx2x_dcb.h
nx2x_dump.h
nx2x_ethtool.c
nx2x_fw_defs.h
nx2x_fw_file_hdr.h
nx2x_hsi.h
nx2x_init.h
nx2x_init_ops.h
nx2x_link.c
nx2x_link.h
nx2x_main.c
nx2x_reg.h
nx2x_sp.c
nx2x_sp.h
nx2x_stats.c
nx2x_stats.h