diff options
author | Bhanu Prakash Gollapudi <bprakash@broadcom.com> | 2012-01-23 21:00:48 -0500 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2012-02-19 09:08:59 -0500 |
commit | 7d742f659e00f08016a4446a9134036e47f9a0cf (patch) | |
tree | 1c8f643b19d720d5b409eafbd8da75010ead119b /drivers/scsi/bnx2fc/bnx2fc_fcoe.c | |
parent | 44c570b5b09d1d1cc3167834f89f754f1bc5ac14 (diff) |
[SCSI] bnx2fc: NPIV ports go offline when interface is brought down & up
When there are 255 NPIV ports, and the interface is brought down & up, both
physical and NPIV ports are logged off and never logged back in. Since
discovery happens on single CPU, XID resources on that CPU will be limited,
which when exhausted the discovery fails. Increase the XID resource range to
ensure that the discovery completes successfully. Also ensure that
fc_exch_mgr_alloc() doesn't fail on the system that has lower number of CPUs.
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/bnx2fc/bnx2fc_fcoe.c')
-rw-r--r-- | drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c index bd18ab5ccbab..0766b93ebd9a 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c +++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c | |||
@@ -940,8 +940,14 @@ static int bnx2fc_libfc_config(struct fc_lport *lport) | |||
940 | 940 | ||
941 | static int bnx2fc_em_config(struct fc_lport *lport) | 941 | static int bnx2fc_em_config(struct fc_lport *lport) |
942 | { | 942 | { |
943 | int max_xid; | ||
944 | |||
945 | if (nr_cpu_ids <= 2) | ||
946 | max_xid = FCOE_XIDS_PER_CPU; | ||
947 | else | ||
948 | max_xid = FCOE_MAX_XID; | ||
943 | if (!fc_exch_mgr_alloc(lport, FC_CLASS_3, FCOE_MIN_XID, | 949 | if (!fc_exch_mgr_alloc(lport, FC_CLASS_3, FCOE_MIN_XID, |
944 | FCOE_MAX_XID, NULL)) { | 950 | max_xid, NULL)) { |
945 | printk(KERN_ERR PFX "em_config:fc_exch_mgr_alloc failed\n"); | 951 | printk(KERN_ERR PFX "em_config:fc_exch_mgr_alloc failed\n"); |
946 | return -ENOMEM; | 952 | return -ENOMEM; |
947 | } | 953 | } |
@@ -2056,6 +2062,7 @@ if_create_err: | |||
2056 | ifput_err: | 2062 | ifput_err: |
2057 | bnx2fc_net_cleanup(interface); | 2063 | bnx2fc_net_cleanup(interface); |
2058 | bnx2fc_interface_put(interface); | 2064 | bnx2fc_interface_put(interface); |
2065 | goto mod_err; | ||
2059 | netdev_err: | 2066 | netdev_err: |
2060 | module_put(THIS_MODULE); | 2067 | module_put(THIS_MODULE); |
2061 | mod_err: | 2068 | mod_err: |