]> www.infradead.org Git - users/jedix/linux-maple.git/log
users/jedix/linux-maple.git
12 years agoenic: Helper code for SRIOV proxy commands
Roopa Prabhu [Thu, 22 Sep 2011 03:44:38 +0000 (03:44 +0000)]
enic: Helper code for SRIOV proxy commands

This patch adds helper functions to use PF as proxy for SRIOV VF firmware
commands.

(cherry picked from commit 889d13f53cf9d741398637b6e8e578c65bb792e8)
Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: Sujith Sankar <ssujith@cisco.com>
Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: David Wang <dwang2@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agoenic: Add SRIOV support
Roopa Prabhu [Thu, 22 Sep 2011 03:44:33 +0000 (03:44 +0000)]
enic: Add SRIOV support

This patch adds support to enable SRIOV on enic devices. Enic SRIOV VF's are dynamic vnics and will use the same driver code as dynamic vnics.

(cherry picked from commit 8749b427f213e14303dfef4c1b9770f05f67916d)
Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: Sujith Sankar <ssujith@cisco.com>
Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: David Wang <dwang2@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agoenic: convert to SKB paged frag API.
Ian Campbell [Mon, 29 Aug 2011 23:18:27 +0000 (23:18 +0000)]
enic: convert to SKB paged frag API.

(cherry picked from commit 4bf5adbf757565d2cc19758aec8452e5364dd700)
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Christian Benvenuti <benve@cisco.com>
Cc: Vasanthy Kolluri <vkolluri@cisco.com>
Cc: Roopa Prabhu <roprabhu@cisco.com>
Cc: David Wang <dwang2@cisco.com>
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2fc: Bumped version to 1.0.11
Bhanu Prakash Gollapudi [Tue, 24 Apr 2012 22:26:04 +0000 (15:26 -0700)]
bnx2fc: Bumped version to 1.0.11

(cherry picked from commit e91506dbcfc9e405b2a8013e3a59741bbedce471)
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2fc: cleanup task management IO when it times out.
Bhanu Prakash Gollapudi [Tue, 24 Apr 2012 22:26:03 +0000 (15:26 -0700)]
bnx2fc: cleanup task management IO when it times out.

When the task management IO times out, or a flush operation is performed while
task management IO is pending, driver is not cleaning up the IO. This patch
cleans up the IO for the above cases.

(cherry picked from commit 92886c9c97fd20dde26a12cd9f43cd3c786bc8ea)
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2fc: Decrememnt io ref count when abort times out
Bhanu Prakash Gollapudi [Tue, 24 Apr 2012 22:26:02 +0000 (15:26 -0700)]
bnx2fc: Decrememnt io ref count when abort times out

When IO abort times out during eh_abort or a flush operation is performed while
abort is pending, the driver is not cleaning up the IO and thus not reducing
the IO reference count. With this change, as part of explicit logout, the IO is
cleaned up.

(cherry picked from commit c1bb4f33de87ad18ace1cf484ed0c78683d933a1)
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2fc: Allow FLOGI to be retried when receiving bad responses.
Bhanu Prakash Gollapudi [Tue, 24 Apr 2012 22:26:01 +0000 (15:26 -0700)]
bnx2fc: Allow FLOGI to be retried when receiving bad responses.

Commit 907c07d45199f954ddcf66c2c9763c87d012cb15 added more cases to do FLOGI
retry on receiving bad response. Remove the code that drops the packet and
allow the stack to handle bad FLOGI response.

(cherry picked from commit de9c05fafc296aa95b58352bad7f23f6199aa90d)
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2i: Removed the reference to the netdev->base_addr
Eddie Wai [Fri, 29 Jun 2012 23:37:35 +0000 (16:37 -0700)]
bnx2i: Removed the reference to the netdev->base_addr

The netdev->base_addr parameter has been deprecated in the L2 bnx2
driver.  This is used by bnx2i for the BARn iomapping.

This patch will directly reference the pci_resource_start instead
of using the deprecated netdev->base_addr.

This patch is actually a critical bug fix as the 1G bnx2 driver no
longer supports the netdev->base_addr in the current kernel of the scsi
tree.  This means that Broadcom's 1G Linux iSCSI offload solution would
not work at all without this patch.

(cherry picked from commit a77171806515fb5e2288219ddb47af1f0b1328e7)
Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2i: Updated version and copyright year
Eddie Wai [Wed, 25 Apr 2012 22:08:37 +0000 (15:08 -0700)]
bnx2i: Updated version and copyright year

Old version: 2.7.0.3
New version: 2.7.2.2

(cherry picked from commit 9ebd99c599bcb125acde9b3c98383ebd6e208bc1)
Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2i: Added the setting of target can_queue via target_alloc
Eddie Wai [Wed, 25 Apr 2012 22:03:45 +0000 (15:03 -0700)]
bnx2i: Added the setting of target can_queue via target_alloc

This will set the target can_queue limit to the number of preallocated
session tasks set during creation.

"Could not send nopout" messages were observed without this when the
iSCSI connection experiences dropped frames under heavy I/O stress.

(cherry picked from commit 6f9c04ff778e35aaad11266b55ef93f72224586e)
Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2x: fix link for BCM57711 with 84823 phy
Yuval Mintz [Sat, 16 Jun 2012 20:27:15 +0000 (20:27 +0000)]
bnx2x: fix link for BCM57711 with 84823 phy

(cherry picked from commit 5481388bc705de27ca37241a42c6612c86f2cc3b)
Signed-off-by: Yaniv Rosner <yaniv.rosner@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>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2x: fix I2C non-respondent issue
Yuval Mintz [Sat, 16 Jun 2012 20:27:14 +0000 (20:27 +0000)]
bnx2x: fix I2C non-respondent issue

When I2C is not responding it's usually due to a previous
unexpected reset during I2C operation. We release it by
powering down and up the SFP+ module.

(cherry picked from commit 50a2984543aa2581d08580f8468533ce0ade8a62)
Signed-off-by: Yaniv Rosner <yaniv.rosner@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>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2x: fix panic when TX ring is full
Eric Dumazet [Wed, 13 Jun 2012 09:45:16 +0000 (09:45 +0000)]
bnx2x: fix panic when TX ring is full

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>
(cherry picked from commit bc14786a100cc6a81cd060e8031ec481241b418c)
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: Joe Jin <joe.jin@oracle.com>
12 years agobnx2x: fix checksum validation
Eric Dumazet [Tue, 12 Jun 2012 23:50:04 +0000 (23:50 +0000)]
bnx2x: fix checksum validation

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

(cherry picked from commit d6cb3e41386f20fb0777d0b59a2def82c65d37f7)
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: Joe Jin <joe.jin@oracle.com>
12 years agobnx2x: Added EEE support
Yuval Mintz [Wed, 6 Jun 2012 17:13:07 +0000 (17:13 +0000)]
bnx2x: Added EEE support

This patch adds energy efficient energy support (802.3az) to bnx2x
boards with 84833 phys (and sufficiently new BC and external FW).

(cherry picked from commit c8c60d88c59cbb48737732ba948663a3efe882aa)
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>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2x: bug fix when loading after SAN boot
Ariel Elior [Sun, 6 May 2012 07:05:57 +0000 (07:05 +0000)]
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).

(cherry picked from commit 24f06716cd5dbfc3d737ec2a24ac58ef76f68dc7)
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>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2x: fix handling single MSIX mode for 57710/57711
Dmitry Kravkov [Wed, 2 May 2012 01:16:33 +0000 (01:16 +0000)]
bnx2x: fix handling single MSIX mode for 57710/57711

commit 30a5de7723a8a4211be02e94236e9167a424fd07 added
ability to use single MSI-X vector, but lack proper
handling for 57710/57711 HW

(cherry picked from commit 69c326b38f2f895ca4f09fd9b65782a021f4ba6c)
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>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2x: remove some bloat
Joe Jin [Mon, 27 Aug 2012 13:18:03 +0000 (21:18 +0800)]
bnx2x: remove some bloat

Before doing skb->head_frag work on bnx2x driver, I found too much stuff
was inlined in bnx2x/bnx2x_cmn.h for no good reason and made my work not
very easy.

Move some big functions out of this include file to the respective .c
file.

A lot of inline keywords are not needed at all in this huge driver.

   text    data     bss     dec     hex filename
 490083    1270      56  491409   77f91 bnx2x/bnx2x.ko.before
 484206    1270      56  485532   7689c bnx2x/bnx2x.ko

(backported from upstream commit 1191cb83489e6ee87a38ae5b127651f4a7c438dc)
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Eilon Greenstein <eilong@broadcom.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Maciej Żenczykowski <maze@google.com>
Cc: Neal Cardwell <ncardwell@google.com>
Cc: Tom Herbert <therbert@google.com>
Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Cc: Ben Hutchings <bhutchings@solarflare.com>
Cc: Matt Carlson <mcarlson@broadcom.com>
Cc: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2x: add transmit timestamping support
Joe Jin [Mon, 27 Aug 2012 13:10:50 +0000 (21:10 +0800)]
bnx2x: add transmit timestamping support

(backported from upstream commit 8373c57d6fa59ca35ad3cf11d719060051ccd920)
Signed-off-by: Willem de Bruijn <willemb@google.com>
Acked-by: Eilon Greenstein <eilong@broadcom.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2x: Update driver version to 1.72.50-0
Barak Witkowski [Mon, 23 Apr 2012 03:05:16 +0000 (03:05 +0000)]
bnx2x: Update driver version to 1.72.50-0

(cherry picked from commit e29ecd51de1683e6aeb88d76251f194b0311f749)
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>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2x: remove gro workaround
Dmitry Kravkov [Mon, 23 Apr 2012 03:05:11 +0000 (03:05 +0000)]
bnx2x: remove gro workaround

Removes GRO workaround, as issue is fixed in FW 7.2.51.

(cherry picked from commit 94b2f9ba4c87d155446957ee413e34298cbe7554)
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
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>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2x: add afex support
Joe Jin [Mon, 27 Aug 2012 13:09:05 +0000 (21:09 +0800)]
bnx2x: add afex support

Following patch adds afex multifunction support to the driver (afex
multifunction is based on vntag header) and updates FW version used to 7.2.51.

Support includes the following:

1. Configure vif parameters in firmware (default vlan, vif id, default
   priority, allowed priorities) according to values received from NIC.
2. Configure FW to strip/add default vlan according to afex vlan mode.
3. Notify link up to OS only after vif is fully initialized.
4. Support vif list set/get requests and configure FW accordingly.
5. Supply afex statistics upon request from NIC.
6. Special handling to L2 interface in case of FCoE vif.

(backported from upstream commit a334872224a67b614dc888460377862621f3dac7)
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>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agofirmware: use 7.2.51 for bnx2x
Joe Jin [Wed, 29 Aug 2012 00:19:09 +0000 (08:19 +0800)]
firmware: use 7.2.51 for bnx2x

Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2x: off by one in bnx2x_ets_e3b0_sp_pri_to_cos_set()
Dan Carpenter [Tue, 17 Apr 2012 20:53:42 +0000 (20:53 +0000)]
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.

(cherry picked from commit 7e5998aa74065d3ab31d17e667f40ffebf4b8425)
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>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2x: Fix BCM57711+BCM84823 link issue
Yaniv Rosner [Wed, 4 Apr 2012 01:29:02 +0000 (01:29 +0000)]
bnx2x: Fix BCM57711+BCM84823 link issue

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

(cherry picked from commit f93fb01628c00d1f26e8b45d2f10b8feb650dd4b)
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>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2x: Clear BCM84833 LED after fan failure
Yaniv Rosner [Wed, 4 Apr 2012 01:29:01 +0000 (01:29 +0000)]
bnx2x: Clear BCM84833 LED after fan failure

(cherry picked from commit 99bf7f34368aac9b54dfa8801ae490a2326704f9)
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>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2x: Fix BCM84833 PHY FW version presentation
Yaniv Rosner [Wed, 4 Apr 2012 01:29:00 +0000 (01:29 +0000)]
bnx2x: Fix BCM84833 PHY FW version presentation

(cherry picked from commit 8267bbb01f005fa8d0c8d046ecc24ae0b52e4d70)
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>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2x: Fix link issue for BCM8727 boards.
Yaniv Rosner [Wed, 4 Apr 2012 01:28:59 +0000 (01:28 +0000)]
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.

(cherry picked from commit 59a2e53b826103be8c22d9820355320b749b38ef)
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>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2x: Restore 1G LED on BCM57712+BCM8727 designs.
Yaniv Rosner [Wed, 4 Apr 2012 01:28:58 +0000 (01:28 +0000)]
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.

(cherry picked from commit 9379c9be4b20d5cb7bde577f402b749cd7d3caa2)
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>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2x: Fix BCM57810-KR FC
Yaniv Rosner [Wed, 4 Apr 2012 01:28:55 +0000 (01:28 +0000)]
bnx2x: Fix BCM57810-KR FC

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

(cherry picked from commit ca05f29cf515ac4a8e162c8e0eee886727f5dcc7)
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>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2x: add missing parenthesis to prevent u32 overflow
Dmitry Kravkov [Wed, 4 Apr 2012 02:27:42 +0000 (02:27 +0000)]
bnx2x: add missing parenthesis to prevent u32 overflow

Commit b475d78 lacked two pairs of parenthesis, causing an overflow in the
congestion management.

(cherry picked from commit cfcadc97a890b81f619715739ef101f8c2010e6b)
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>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2x: Change to driver version 1.72.10-0
Yuval Mintz [Tue, 3 Apr 2012 18:41:32 +0000 (18:41 +0000)]
bnx2x: Change to driver version 1.72.10-0

(cherry picked from commit 68df25d6c556c4df4dad32a0585317eab356e325)
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>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2x: Change comments and white spaces
Yaniv Rosner [Tue, 3 Apr 2012 18:41:31 +0000 (18:41 +0000)]
bnx2x: Change comments and white spaces

A semantic patch, fixing style issues in the bnx2x's link code.

(cherry picked from commit 8f73f0b97208d9e1142fd32236b5d990ee4ed4b3)
Signed-off-by: Yaniv Rosner <yaniv.rosner@broadcom.com>
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2x: change to the rss engine
Dmitry Kravkov [Tue, 3 Apr 2012 18:41:30 +0000 (18:41 +0000)]
bnx2x: change to the rss engine

This patch revises the way by which rss are configured, removing
an unnecessary module paramater and unrequired modes.

(cherry picked from commit 963052348fd33221d9ae4212d6cdaa2346e2678e)
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>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2x: congestion management re-organization
Joe Jin [Mon, 27 Aug 2012 12:28:56 +0000 (20:28 +0800)]
bnx2x: congestion management re-organization

The congestion management code has migrated into a common location,
allowing all fw writes controlling mf congestion to be made in a
single function in the code. This is a semantic change.

(backported from upstream commit b475d78f464195cbdeeda0d80a2ffbd54653a4bd)
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>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2x: Added support for a new device - 57811
Barak Witkowski [Tue, 3 Apr 2012 18:41:28 +0000 (18:41 +0000)]
bnx2x: Added support for a new device - 57811

Notice this patch includes lines with over 80 characters, as to not
break strings.

(cherry picked from commit 7e8e02df17106007f4b043a39d22682f74df6f6f)
Signed-off-by: Barak Witkowski <barak@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>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2x: Add remote-fault link detection
Yaniv Rosner [Tue, 3 Apr 2012 18:41:27 +0000 (18:41 +0000)]
bnx2x: Add remote-fault link detection

Restore remote-faule detection, which periodically checks for
remote-fault on the MAC layer. In case physical link appear to be
up but fault is set, it will provide a link down indication, and
when the fault is cleared, it will indicate link up again.

(cherry picked from commit 55098c5c61ea99f0fa46ddf817a0f940ca7e6af1)
Signed-off-by: Yaniv Rosner <yaniv.rosner@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>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2x: added support for working with one msix irq.
Dmitry Kravkov [Tue, 3 Apr 2012 18:41:26 +0000 (18:41 +0000)]
bnx2x: added support for working with one msix irq.

Until now, the bnx2x driver needed at least 2 available msix interrupt
vectors in order to use msix. This patch add the possibility of configuring
msix when only one interrupt vector is available.
Notice this patch contains lines with over 80 characters, as it keeps print
strings in a single line.

(cherry picked from commit 30a5de7723a8a4211be02e94236e9167a424fd07)
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>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2x: enable inta on the pci bus when used
Yuval Mintz [Tue, 3 Apr 2012 18:41:25 +0000 (18:41 +0000)]
bnx2x: enable inta on the pci bus when used

During boot-from-SAN, if msix interrupts are unavailable and inta
is requested, it is possible that inta would be disabled in the
pci bus. This patch enables inta when requested.

(cherry picked from commit 79a8557a6d18c3861d64ae110ddd7606c65d7504)
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>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2x: remove unnecessary dmae code
Yuval Mintz [Tue, 3 Apr 2012 18:41:24 +0000 (18:41 +0000)]
bnx2x: remove unnecessary dmae code

Removed uninformative debug prints, as well as two functions
which were hardly used in the code.

(cherry picked from commit 32d68de1cd267f811d72f189cbaba3af624f0fd5)
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>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2x: remove unnecessary .h dependencies
Yuval Mintz [Tue, 3 Apr 2012 18:41:23 +0000 (18:41 +0000)]
bnx2x: remove unnecessary .h dependencies

(cherry picked from commit ef81442f728ffcf30ccbc6db253df8e35a5182c4)
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>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2x: previous driver unload revised
Yuval Mintz [Mon, 26 Mar 2012 20:47:07 +0000 (20:47 +0000)]
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.

(cherry picked from commit 452427b015b1b0cbbef7b6207908726837d39d57)
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>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2x: validate FW trace prior to its printing
Dmitry Kravkov [Sun, 18 Mar 2012 10:33:45 +0000 (10:33 +0000)]
bnx2x: validate FW trace prior to its printing

(cherry picked from commit de1288041d01120559d53ebd98e0f92476ee56d3)
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>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2x: consistent statistics for old FW
Yuval Mintz [Sun, 18 Mar 2012 10:33:44 +0000 (10:33 +0000)]
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.

(cherry picked from commit cb4dca277694f6c53bf6daf0f5c609dda32e4656)
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>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2x: changed iscsi/fcoe mac init and macros
Dmitry Kravkov [Sun, 18 Mar 2012 10:33:43 +0000 (10:33 +0000)]
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.

(cherry picked from commit 9e62e912e56742af7eb7e0eeba3c7af4bb2f8537)
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>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2x: added TLV_NOT_FOUND flags to the dcb
Dmitry Kravkov [Sun, 18 Mar 2012 10:33:42 +0000 (10:33 +0000)]
bnx2x: added TLV_NOT_FOUND flags to the dcb

The new error flags are supported by the bnx2x FW.

(cherry picked from commit 910b220290a4568ebf7ecc368bd3d1d8236d2335)
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>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2x: changed initial dcb configuration
Dmitry Kravkov [Sun, 18 Mar 2012 10:33:41 +0000 (10:33 +0000)]
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.

(cherry picked from commit 9d4884f9d470cd696d7a7cd7a6d7099d13909dd9)
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>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2x: removed dcb unused code
Yuval Mintz [Sun, 18 Mar 2012 10:33:40 +0000 (10:33 +0000)]
bnx2x: removed dcb unused code

(cherry picked from commit c315a4ef55b9afa0373fbb10f8567d59f81247c9)
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>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2x: reduced sparse warnings
Yuval Mintz [Sun, 18 Mar 2012 10:33:39 +0000 (10:33 +0000)]
bnx2x: reduced sparse warnings

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

(cherry picked from commit 3b60306690569927951be09160e80a8af9c94db4)
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>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2x: revised driver prints
Joe Jin [Mon, 27 Aug 2012 12:18:21 +0000 (20:18 +0800)]
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.

(backported from upstream commit 51c1a580b1e07d58eb063f9f4a70aea8ad32fe23)
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>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2x: code doesn't use stats for allocating Rx BDs
Dmitry Kravkov [Mon, 12 Mar 2012 08:53:14 +0000 (08:53 +0000)]
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.

(cherry picked from commit f124488e4713dc9afa2028553261b1d399286e68)
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>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2x: ethtool returns req. AN even when AN fails
Yuval Mintz [Mon, 12 Mar 2012 08:53:13 +0000 (08:53 +0000)]
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.

(cherry picked from commit 241fb5d2b4205a523a50a85f9c312e1eda8ec53d)
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>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2x: ethtool now returns unknown speed/duplex
Yuval Mintz [Mon, 12 Mar 2012 08:53:12 +0000 (08:53 +0000)]
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).

(cherry picked from commit 382984618e847ad4621d7ccbd48f5ec702c6a78e)
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>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2x: use param's id instead of sp_obj's id
Yuval Mintz [Mon, 12 Mar 2012 08:53:10 +0000 (08:53 +0000)]
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.

(cherry picked from commit 259afa1f725dc7ec1626835b9ac54827a46cdf80)
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>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2x: set_one_mac_e1x uses raw's state as input
Yuval Mintz [Mon, 12 Mar 2012 08:53:09 +0000 (08:53 +0000)]
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.

(cherry picked from commit 33ac338cf97f5e225c62ebcb3ff1a40bf32c88ad)
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>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2x: removed unused function bnx2x_queue_set_cos_cid
Yuval Mintz [Mon, 12 Mar 2012 08:53:08 +0000 (08:53 +0000)]
bnx2x: removed unused function bnx2x_queue_set_cos_cid

(cherry picked from commit c121089d9769a404468749b31c52c4d284cb56be)
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>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2x: move LLH_CAM to header, apply naming conventions
Yuval Mintz [Mon, 12 Mar 2012 08:53:07 +0000 (08:53 +0000)]
bnx2x: move LLH_CAM to header, apply naming conventions

These definitions are united into the header.

(cherry picked from commit 0a52fd019625867e766c0f6126b7a15b709f83ec)
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>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2x: FCoE statistics id fixed
Yuval Mintz [Mon, 12 Mar 2012 11:22:07 +0000 (11:22 +0000)]
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.

(cherry picked from commit de5c37414af10ac9305d4a3e9c1468347ca3ccaa)
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>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2x: dcb bit indices flags used as bits
Yuval Mintz [Mon, 12 Mar 2012 11:22:06 +0000 (11:22 +0000)]
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.

(cherry picked from commit e695a2dda1775dafc88174d2c0d71fab18db105a)
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>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2x: added cpu_to_le16 when preparing ramrod's data
Ariel Elior [Mon, 12 Mar 2012 11:22:05 +0000 (11:22 +0000)]
bnx2x: added cpu_to_le16 when preparing ramrod's data

Fixed endianess issue when passing arguments to FW.

(cherry picked from commit ab4a71392eb8a91061c63af1d506f5d4580073cf)
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>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2x: pfc statistics counts pfc events twice
Yuval Mintz [Mon, 12 Mar 2012 11:22:04 +0000 (11:22 +0000)]
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.

(cherry picked from commit db0ea84845538f15ab1b44da4af4b4fd7adc4d85)
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>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2x: update driver version to 1.72.10-0
Dmitry Kravkov [Mon, 20 Feb 2012 09:59:12 +0000 (09:59 +0000)]
bnx2x: update driver version to 1.72.10-0

(cherry picked from commit 0b0a635f79f91f3755b6518627ea06dd0dbfd523)
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>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2x: add gro_check
Dmitry Kravkov [Mon, 20 Feb 2012 09:59:11 +0000 (09:59 +0000)]
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.

(cherry picked from commit fe603b4d680a2bba9d8c6d4267450fcf295f30d1)
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>
12 years agouse FW 7.2.16
Joe Jin [Mon, 27 Aug 2012 12:03:46 +0000 (20:03 +0800)]
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.

(backported from upstream commit 621b4d66b27e70ba9a0e8fa4676d9c4f916c8343)
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>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2x: consistent statistics after internal driver reload
Joe Jin [Mon, 27 Aug 2012 12:02:03 +0000 (20:02 +0800)]
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.

(cherry picked from commit 1355b704b9ba44182a97c90b4480d79f0de8f040)
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>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2x: downgrade Max BW error message to debug
Joe Jin [Mon, 27 Aug 2012 11:26:29 +0000 (19:26 +0800)]
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.]

(backported from upstream commit 96b0accb8867627250e911f8929e6c01da1ffd40)
Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Acked-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agodrivers/net/cnic.c: remove invalid reference to list iterator variable
Julia Lawall [Sun, 8 Jul 2012 01:37:43 +0000 (01:37 +0000)]
drivers/net/cnic.c: remove invalid reference to list iterator variable

If list_for_each_entry, etc complete a traversal of the list, the iterator
variable ends up pointing to an address at an offset from the list head,
and not a meaningful structure.  Thus this value should not be used after
the end of the iterator.  There does not seem to be a meaningful value to
provide to netdev_warn.  Replace with pr_warn, since pr_err is used
elsewhere.

This problem was found using Coccinelle (http://coccinelle.lip6.fr/).

(cherry picked from commit 022f09784b85396b4ceba954ce28e50de4882281)
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agocnic: Fix mmap regression.
Joe Jin [Mon, 27 Aug 2012 11:10:01 +0000 (19:10 +0800)]
cnic: Fix mmap regression.

commit 1f85d58cdf15354a7120fc9ccc9bb9c45b53af88
    cnic: Remove uio mem[0].

introduced a regression as older versions of userspace app still rely
on this mmap.  Restore the mmap functionality and get the base address
from pci_resource_start() as the nedev->base_addr has been deprecated for
PCI devices.

Update version to 2.5.12.

(backported from upstream commit ae0eef66088777cf252c6b91d3eb5ef2f30a67c5)
Signed-off-by: Michael Chan <mchan@broadocm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agocnic: Handle RAMROD_CMD_ID_CLOSE error.
Joe Jin [Mon, 27 Aug 2012 11:08:10 +0000 (19:08 +0800)]
cnic: Handle RAMROD_CMD_ID_CLOSE error.

If firmware returns error status, proceed to close the iSCSI connection.
Update version to 2.5.11.

(backported from upstream commit 7bc910fd8f953c131de055d9871679a598db8dc6)
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>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agocnic: Remove uio mem[0].
Michael Chan [Wed, 27 Jun 2012 15:08:21 +0000 (15:08 +0000)]
cnic: Remove uio mem[0].

This memory region is no longer used.  Userspace gets the BAR address
directly from sysfs.

(cherry picked from commit 1f85d58cdf15354a7120fc9ccc9bb9c45b53af88)
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agocnic: Read bnx2x function number from internal register
Eddie Wai [Wed, 27 Jun 2012 15:08:20 +0000 (15:08 +0000)]
cnic: Read bnx2x function number from internal register

so that it will work on any hypervisor.

(cherry picked from commit 78ea22e8042b8a55c5a047869ed1fd9b3711340c)
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>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agocnic: Fix occasional NULL pointer dereference during reboot.
Joe Jin [Mon, 27 Aug 2012 11:06:14 +0000 (19:06 +0800)]
cnic: Fix occasional NULL pointer dereference during reboot.

We register with bnx2x before we allocate ctx_tbl structure, so it is
possible for bnx2x to call cnic_ctl before the structure is allocated.
This can sometimes cause NULL pointer dereference of cp->ctx_tbl.  We
fix this by adding simple checking for valid state before proceeding.
The cnic_ctl call is RCU protected so we don't have to deal with race
conditions.

Because of the additional checking, we need to finish the shutdown
before clearing the CNIC_UP flag.

(backported from upstream commit a2028b2376a858cb68a7fcc129f6508f59b45381)
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agoethernet/broadcom: ip6_route_output() never returns NULL.
RongQing.Li [Tue, 21 Feb 2012 22:10:50 +0000 (22:10 +0000)]
ethernet/broadcom: ip6_route_output() never returns NULL.

ip6_route_output() never returns NULL, so it is wrong to
check if the return value is NULL.

(cherry picked from commit 0541743b4b35f2ddc9e490b4e354930168b60d23)
Signed-off-by: RongQing.Li <roy.qing.li@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2: Try to recover from PCI block reset
Michael Chan [Mon, 16 Jul 2012 14:25:56 +0000 (14:25 +0000)]
bnx2: Try to recover from PCI block reset

If the PCI block has reset, the memory enable bit will be reset and
the device will not respond to MMIO access.  bnx2_reset_task() currently
will not recover when this happens.  Add code to detect this condition
and restore the PCI state.  This scenario has been reported by some
users.

(cherry picked from commit efdfad3205403e1d1c5c0bdcbdb647ddd89bfaa3)
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2: Fix bug in bnx2_free_tx_skbs().
Michael Chan [Tue, 10 Jul 2012 10:04:40 +0000 (10:04 +0000)]
bnx2: Fix bug in bnx2_free_tx_skbs().

In rare cases, bnx2x_free_tx_skbs() can unmap the wrong DMA address
when it gets to the last entry of the tx ring.  We were not using
the proper macro to skip the last entry when advancing the tx index.

Reported-by: Zongyun Lai <zlai@vmware.com>
Reviewed-by: Jeffrey Huang <huangjw@broadcom.com>
(cherry picked from commit c1f5163de417dab01fa9daaf09a74bbb19303f3c)
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2: set maximal number of default RSS queues
Yuval Mintz [Sun, 1 Jul 2012 03:18:58 +0000 (03:18 +0000)]
bnx2: set maximal number of default RSS queues

(cherry picked from commit 0a742128db29031e55d27e37b1b098433c56033a)
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Cc: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agonet-next: Add netif_get_num_default_rss_queues
Yuval Mintz [Sun, 1 Jul 2012 03:18:50 +0000 (03:18 +0000)]
net-next: Add netif_get_num_default_rss_queues

Most multi-queue networking driver consider the number of online cpus when
configuring RSS queues.
This patch adds a wrapper to the number of cpus, setting an upper limit on the
number of cpus a driver should consider (by default) when allocating resources
for his queues.

(cherry picked from commit 16917b87a23b429226527f393270047069d665e9)
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>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2: Add missing netif_tx_disable() in bnx2_close()
Michael Chan [Wed, 27 Jun 2012 15:08:24 +0000 (15:08 +0000)]
bnx2: Add missing netif_tx_disable() in bnx2_close()

to stop all tx queues.  Update version to 2.2.3.

(cherry picked from commit d2e553bca89596b7ac35f8abcec9c9b93f772fc2)
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2: Add "fall through" comments
Michael Chan [Wed, 27 Jun 2012 15:08:23 +0000 (15:08 +0000)]
bnx2: Add "fall through" comments

to indicate that the mising break statements are intended.

(cherry picked from commit 7947c9ce17c4b51122cfcef3c2e9e2632eb96a67)
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2: Update version 2.2.2
Michael Chan [Sat, 16 Jun 2012 15:45:44 +0000 (15:45 +0000)]
bnx2: Update version 2.2.2

(cherry picked from commit 260762c7d8030055a157b6f4ea7d1805a09e59e8)
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2: Read PCI function number from internal register
Michael Chan [Sat, 16 Jun 2012 15:45:43 +0000 (15:45 +0000)]
bnx2: Read PCI function number from internal register

so that it will work on any hypervisor.

(cherry picked from commit aefd90e41476223c95e3c84c7dd22a65a21b1e40)
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2: Dump additional BC_STATE during firmware sync timeout.
Michael Chan [Sat, 16 Jun 2012 15:45:42 +0000 (15:45 +0000)]
bnx2: Dump additional BC_STATE during firmware sync timeout.

(cherry picked from commit 13e63517f4bc425a17888e6497c59a9663c2b520)
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2: Dump all FTQ_CTL registers during tx_timeout
Michael Chan [Sat, 16 Jun 2012 15:45:41 +0000 (15:45 +0000)]
bnx2: Dump all FTQ_CTL registers during tx_timeout

to help debug tx timeouts reported in the field.

Reviewed-by Benjamin Li <benli@broadcom.com>
(cherry picked from commit 555069dad01c955f41593711ce2a688c668f8234)
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobroadcom: replace open-coded ARRAY_SIZE with macro
Jim Cromie [Tue, 10 Apr 2012 14:56:03 +0000 (14:56 +0000)]
broadcom: replace open-coded ARRAY_SIZE with macro

(cherry picked from commit 0db83cd85c278f2f7a2ba2948987983009cc0912)
Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2: stop using net_device.{base_addr, irq}.
Francois Romieu [Fri, 9 Mar 2012 13:51:47 +0000 (14:51 +0100)]
bnx2: stop using net_device.{base_addr, irq}.

(cherry picked from commit c0357e975afdbbedab5c662d19bef865f02adc17)
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Acked-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2: switch to build_skb() infrastructure
Joe Jin [Mon, 27 Aug 2012 07:40:07 +0000 (15:40 +0800)]
bnx2: switch to build_skb() infrastructure

This is very similar to bnx2x conversion, but bnx2 only requires 16bytes
alignement at start of the received frame to store its l2_fhdr, so goal
was not to reduce skb truesize (in fact it should not change after this
patch)

Using build_skb() 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 more likely recycled in SLUB caches
while still hot.

(backported from upstream commit dd2bc8e9c0685d8eaaaf06e65919e31d60478411)
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Michael Chan <mchan@broadcom.com>
CC: Eilon Greenstein <eilong@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agobnx2: convert to SKB paged frag API.
Ian Campbell [Wed, 24 Aug 2011 22:28:12 +0000 (22:28 +0000)]
bnx2: convert to SKB paged frag API.

(cherry picked from commit b7b6a688d217936459ff5cf1087b2361db952509)
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Michael Chan <mchan@broadcom.com>
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agotg3: Update version to 3.124
Michael Chan [Sun, 29 Jul 2012 19:15:45 +0000 (19:15 +0000)]
tg3: Update version to 3.124

(cherry picked from commit cac83e53917ebc058066eb98023c11fdaa2262dc)
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agotg3: Fix race condition in tg3_get_stats64()
Michael Chan [Sun, 29 Jul 2012 19:15:44 +0000 (19:15 +0000)]
tg3: Fix race condition in tg3_get_stats64()

Spinlock should be taken before checking for tp->hw_stats.

(cherry picked from commit 0f566b208b41918053b2e67399673aaec02dde5d)
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agotg3: Add New 5719 Read DMA workaround
Michael Chan [Sun, 29 Jul 2012 19:15:43 +0000 (19:15 +0000)]
tg3: Add New 5719 Read DMA workaround

After Power-on-reset, the 5719's TX DMA length registers may contain
uninitialized values and cause TX DMA to stall.  Check for invalid
values and set a register bit to flush the TX channels.  The bit
needs to be turned off after the DMA channels have been flushed.

(cherry picked from commit 091f0ea30074bc43f9250961b3247af713024bc6)
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agotg3: Fix Read DMA workaround for 5719 A0.
Michael Chan [Sun, 29 Jul 2012 19:15:42 +0000 (19:15 +0000)]
tg3: Fix Read DMA workaround for 5719 A0.

The workaround was mis-applied to all 5719 and 5720 chips.

(cherry picked from commit 10ce95d6ef36c65df7dcd3b8fcf86913f8b298bd)
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agotg3: Request APE_LOCK_PHY before PHY access
Michael Chan [Sun, 29 Jul 2012 19:15:41 +0000 (19:15 +0000)]
tg3: Request APE_LOCK_PHY before PHY access

to prevent PHY access conflict with APE firmware.

(cherry picked from commit 8151ad576d34a5ec1f1068edf25f3b7c47f6edab)
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agotg3: Add hwmon support for temperature
Michael Chan [Mon, 16 Jul 2012 16:24:02 +0000 (16:24 +0000)]
tg3: Add hwmon support for temperature

Some tg3 devices have management firmware that can export sensor data.
Export temperature sensor reading via hwmon sysfs.

[hwmon interface suggested by Ben Hutchings <bhutchings@solarflare.com>]

(cherry picked from commit aed93e0bf493535c25c27270001226bb1dd379b2)
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agotg3: Add APE scratchpad read function
Matt Carlson [Mon, 16 Jul 2012 16:24:01 +0000 (16:24 +0000)]
tg3: Add APE scratchpad read function

for retreiving temperature sensor data.

(cherry picked from commit cf8d55ae08459d6412779559fb1e88252db86c9d)
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agotg3: Add common function tg3_ape_event_lock()
Matt Carlson [Mon, 16 Jul 2012 16:24:00 +0000 (16:24 +0000)]
tg3: Add common function tg3_ape_event_lock()

by refactoring code in tg3_ape_send_event().  The common function will
be used in subsequent patches.

(cherry picked from commit b65a372bbc74924b0ce564a3338d9e139367bd3d)
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agotg3: Fix the setting of the APE_HAS_NCSI flag
Michael Chan [Mon, 16 Jul 2012 16:23:59 +0000 (16:23 +0000)]
tg3: Fix the setting of the APE_HAS_NCSI flag

The driver currently skips setting this flag if the VPD contains the
firmware version string.  We fix this by separating the probing of NCSI
from the reading of the NCSI version string.  The APE_HAS_NCSI flag is
needed to properly read sensor data.

(cherry picked from commit 165f4d1cb3d7a10c5bc8c0fdae63323354f5a225)
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agotg3: add device id of Apple Thunderbolt Ethernet device
Greg KH [Thu, 12 Jul 2012 15:39:44 +0000 (15:39 +0000)]
tg3: add device id of Apple Thunderbolt Ethernet device

The Apple Thunderbolt ethernet device is already listed in the driver,
but not hooked up in the MODULE_DEVICE_TABLE().  This fixes that and
allows it to work properly.

(cherry picked from commit 02eca3f5f5e458c3a5d7b772bc8042ee2a4ebedf)
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agotg3: Apply short DMA frag workaround to 5906
Matt Carlson [Thu, 7 Jun 2012 12:56:54 +0000 (12:56 +0000)]
tg3: Apply short DMA frag workaround to 5906

5906 devices also need the short DMA fragment workaround.  This patch
makes the necessary change.

(cherry picked from commit b7abee6ef888117f92db370620ebf116a38e3f4d)
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Tested-by: Christian Kujau <lists@nerdbynature.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agotg3: remove redundant NULL test before release_firmware() call
Jesper Juhl [Mon, 9 Apr 2012 20:50:15 +0000 (22:50 +0200)]
tg3: remove redundant NULL test before release_firmware() call

There is no need to test for a NULL pointer before calling
release_firmware - the function does that on its own.

(cherry picked from commit e3c5530b96b9c5994cfb2544a037161790c4f7c3)
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
12 years agotg3: Fix 5717 serdes powerdown problem
Matt Carlson [Mon, 2 Apr 2012 09:01:40 +0000 (09:01 +0000)]
tg3: Fix 5717 serdes powerdown problem

If port 0 of a 5717 serdes device powers down, it hides the phy from
port 1.  This patch works around the problem by keeping port 0's phy
powered up.

(cherry picked from commit 085f1afc56619bda424941412fdeaff1e32c21dc)
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>