diff options
author | Michael Chan <mchan@broadcom.com> | 2013-08-02 18:28:23 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-08-02 22:55:48 (GMT) |
commit | 9e9402eb450f1c921cc130765a4554a84821feab (patch) | |
tree | 49fe4b5a17655853d79cd80de5eb8002f80ce677 /drivers/net/ethernet | |
parent | 4b42df5da8c2f394adeaa61b23e9e58994b1c3c8 (diff) | |
download | linux-9e9402eb450f1c921cc130765a4554a84821feab.tar.xz |
cnic, bnx2i: Fix bug on some bnx2x devices that don't support iSCSI
On some bnx2x devices, iSCSI is determined to be unsupported only after
firmware is downloaded. We need to check max_iscsi_conn again after
NETDEV_UP and block iSCSI init operations. Without this fix, iscsiadm
can hang as the firmware will not respond to the iSCSI init message.
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>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r-- | drivers/net/ethernet/broadcom/cnic.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/cnic.c b/drivers/net/ethernet/broadcom/cnic.c index 6bd6d14..4f8a535 100644 --- a/drivers/net/ethernet/broadcom/cnic.c +++ b/drivers/net/ethernet/broadcom/cnic.c @@ -5276,6 +5276,13 @@ static int cnic_register_netdev(struct cnic_dev *dev) if (err) netdev_err(dev->netdev, "register_cnic failed\n"); + /* Read iSCSI config again. On some bnx2x device, iSCSI config + * can change after firmware is downloaded. + */ + dev->max_iscsi_conn = ethdev->max_iscsi_conn; + if (ethdev->drv_state & CNIC_DRV_STATE_NO_ISCSI) + dev->max_iscsi_conn = 0; + return err; } |