diff options
Diffstat (limited to 'drivers/scsi/bnx2fc/bnx2fc_io.c')
-rw-r--r-- | drivers/scsi/bnx2fc/bnx2fc_io.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/scsi/bnx2fc/bnx2fc_io.c b/drivers/scsi/bnx2fc/bnx2fc_io.c index 60798e829de6..723a9a8ba5ee 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_io.c +++ b/drivers/scsi/bnx2fc/bnx2fc_io.c | |||
@@ -239,8 +239,7 @@ static void bnx2fc_scsi_done(struct bnx2fc_cmd *io_req, int err_code) | |||
239 | sc_cmd->scsi_done(sc_cmd); | 239 | sc_cmd->scsi_done(sc_cmd); |
240 | } | 240 | } |
241 | 241 | ||
242 | struct bnx2fc_cmd_mgr *bnx2fc_cmd_mgr_alloc(struct bnx2fc_hba *hba, | 242 | struct bnx2fc_cmd_mgr *bnx2fc_cmd_mgr_alloc(struct bnx2fc_hba *hba) |
243 | u16 min_xid, u16 max_xid) | ||
244 | { | 243 | { |
245 | struct bnx2fc_cmd_mgr *cmgr; | 244 | struct bnx2fc_cmd_mgr *cmgr; |
246 | struct io_bdt *bdt_info; | 245 | struct io_bdt *bdt_info; |
@@ -252,6 +251,8 @@ struct bnx2fc_cmd_mgr *bnx2fc_cmd_mgr_alloc(struct bnx2fc_hba *hba, | |||
252 | int num_ios, num_pri_ios; | 251 | int num_ios, num_pri_ios; |
253 | size_t bd_tbl_sz; | 252 | size_t bd_tbl_sz; |
254 | int arr_sz = num_possible_cpus() + 1; | 253 | int arr_sz = num_possible_cpus() + 1; |
254 | u16 min_xid = BNX2FC_MIN_XID; | ||
255 | u16 max_xid = hba->max_xid; | ||
255 | 256 | ||
256 | if (max_xid <= min_xid || max_xid == FC_XID_UNKNOWN) { | 257 | if (max_xid <= min_xid || max_xid == FC_XID_UNKNOWN) { |
257 | printk(KERN_ERR PFX "cmd_mgr_alloc: Invalid min_xid 0x%x \ | 258 | printk(KERN_ERR PFX "cmd_mgr_alloc: Invalid min_xid 0x%x \ |
@@ -298,7 +299,7 @@ struct bnx2fc_cmd_mgr *bnx2fc_cmd_mgr_alloc(struct bnx2fc_hba *hba, | |||
298 | * of slow path requests. | 299 | * of slow path requests. |
299 | */ | 300 | */ |
300 | xid = BNX2FC_MIN_XID; | 301 | xid = BNX2FC_MIN_XID; |
301 | num_pri_ios = num_ios - BNX2FC_ELSTM_XIDS; | 302 | num_pri_ios = num_ios - hba->elstm_xids; |
302 | for (i = 0; i < num_ios; i++) { | 303 | for (i = 0; i < num_ios; i++) { |
303 | io_req = kzalloc(sizeof(*io_req), GFP_KERNEL); | 304 | io_req = kzalloc(sizeof(*io_req), GFP_KERNEL); |
304 | 305 | ||
@@ -367,7 +368,7 @@ void bnx2fc_cmd_mgr_free(struct bnx2fc_cmd_mgr *cmgr) | |||
367 | struct bnx2fc_hba *hba = cmgr->hba; | 368 | struct bnx2fc_hba *hba = cmgr->hba; |
368 | size_t bd_tbl_sz; | 369 | size_t bd_tbl_sz; |
369 | u16 min_xid = BNX2FC_MIN_XID; | 370 | u16 min_xid = BNX2FC_MIN_XID; |
370 | u16 max_xid = BNX2FC_MAX_XID; | 371 | u16 max_xid = hba->max_xid; |
371 | int num_ios; | 372 | int num_ios; |
372 | int i; | 373 | int i; |
373 | 374 | ||