aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libfc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-03-31 16:31:23 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-31 16:31:23 -0400
commita75ee6ecd411a50bf4da927c2fdb2cb56246a2bd (patch)
treefcb06e1940152b115901fda68e7eea1cc1196ff3 /drivers/scsi/libfc
parentc9651e70ad0aa499814817cbf3cc1d0b806ed3a1 (diff)
parent699316948628dab9e813c415640fe5b9f65cd5e3 (diff)
Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
Pull SCSI updates from James Bottomley: "This is primarily another round of driver updates (lpfc, bfa, fcoe, ipr) plus a new ufshcd driver. There shouldn't be anything controversial in here (The final deletion of scsi proc_ops which caused some build breakage has been held over until the next merge window to give us more time to stabilise it). I'm afraid, with me moving continents at exactly the wrong time, anything submitted after the merge window opened has been held over to the next merge window." * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (63 commits) [SCSI] ipr: Driver version 2.5.3 [SCSI] ipr: Increase alignment boundary of command blocks [SCSI] ipr: Increase max concurrent oustanding commands [SCSI] ipr: Remove unnecessary memory barriers [SCSI] ipr: Remove unnecessary interrupt clearing on new adapters [SCSI] ipr: Fix target id allocation re-use problem [SCSI] atp870u, mpt2sas, qla4xxx use pci_dev->revision [SCSI] fcoe: Drop the rtnl_mutex before calling fcoe_ctlr_link_up [SCSI] bfa: Update the driver version to 3.0.23.0 [SCSI] bfa: BSG and User interface fixes. [SCSI] bfa: Fix to avoid vport delete hang on request queue full scenario. [SCSI] bfa: Move service parameter programming logic into firmware. [SCSI] bfa: Revised Fabric Assigned Address(FAA) feature implementation. [SCSI] bfa: Flash controller IOC pll init fixes. [SCSI] bfa: Serialize the IOC hw semaphore unlock logic. [SCSI] bfa: Modify ISR to process pending completions [SCSI] bfa: Add fc host issue lip support [SCSI] mpt2sas: remove extraneous sas_log_info messages [SCSI] libfc: fcoe_transport_create fails in single-CPU environment [SCSI] fcoe: reduce contention for fcoe_rx_list lock [v2] ...
Diffstat (limited to 'drivers/scsi/libfc')
-rw-r--r--drivers/scsi/libfc/fc_exch.c14
-rw-r--r--drivers/scsi/libfc/fc_lport.c10
2 files changed, 21 insertions, 3 deletions
diff --git a/drivers/scsi/libfc/fc_exch.c b/drivers/scsi/libfc/fc_exch.c
index 630291f01826..aceffadb21c7 100644
--- a/drivers/scsi/libfc/fc_exch.c
+++ b/drivers/scsi/libfc/fc_exch.c
@@ -2263,7 +2263,18 @@ struct fc_exch_mgr *fc_exch_mgr_alloc(struct fc_lport *lport,
2263 mp->class = class; 2263 mp->class = class;
2264 /* adjust em exch xid range for offload */ 2264 /* adjust em exch xid range for offload */
2265 mp->min_xid = min_xid; 2265 mp->min_xid = min_xid;
2266 mp->max_xid = max_xid; 2266
2267 /* reduce range so per cpu pool fits into PCPU_MIN_UNIT_SIZE pool */
2268 pool_exch_range = (PCPU_MIN_UNIT_SIZE - sizeof(*pool)) /
2269 sizeof(struct fc_exch *);
2270 if ((max_xid - min_xid + 1) / (fc_cpu_mask + 1) > pool_exch_range) {
2271 mp->max_xid = pool_exch_range * (fc_cpu_mask + 1) +
2272 min_xid - 1;
2273 } else {
2274 mp->max_xid = max_xid;
2275 pool_exch_range = (mp->max_xid - mp->min_xid + 1) /
2276 (fc_cpu_mask + 1);
2277 }
2267 2278
2268 mp->ep_pool = mempool_create_slab_pool(2, fc_em_cachep); 2279 mp->ep_pool = mempool_create_slab_pool(2, fc_em_cachep);
2269 if (!mp->ep_pool) 2280 if (!mp->ep_pool)
@@ -2274,7 +2285,6 @@ struct fc_exch_mgr *fc_exch_mgr_alloc(struct fc_lport *lport,
2274 * divided across all cpus. The exch pointers array memory is 2285 * divided across all cpus. The exch pointers array memory is
2275 * allocated for exch range per pool. 2286 * allocated for exch range per pool.
2276 */ 2287 */
2277 pool_exch_range = (mp->max_xid - mp->min_xid + 1) / (fc_cpu_mask + 1);
2278 mp->pool_max_index = pool_exch_range - 1; 2288 mp->pool_max_index = pool_exch_range - 1;
2279 2289
2280 /* 2290 /*
diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c
index bd5d31d022d9..ef9560dff295 100644
--- a/drivers/scsi/libfc/fc_lport.c
+++ b/drivers/scsi/libfc/fc_lport.c
@@ -1743,8 +1743,16 @@ void fc_lport_flogi_resp(struct fc_seq *sp, struct fc_frame *fp,
1743 mfs = ntohs(flp->fl_csp.sp_bb_data) & 1743 mfs = ntohs(flp->fl_csp.sp_bb_data) &
1744 FC_SP_BB_DATA_MASK; 1744 FC_SP_BB_DATA_MASK;
1745 if (mfs >= FC_SP_MIN_MAX_PAYLOAD && 1745 if (mfs >= FC_SP_MIN_MAX_PAYLOAD &&
1746 mfs < lport->mfs) 1746 mfs <= lport->mfs) {
1747 lport->mfs = mfs; 1747 lport->mfs = mfs;
1748 fc_host_maxframe_size(lport->host) = mfs;
1749 } else {
1750 FC_LPORT_DBG(lport, "FLOGI bad mfs:%hu response, "
1751 "lport->mfs:%hu\n", mfs, lport->mfs);
1752 fc_lport_error(lport, fp);
1753 goto err;
1754 }
1755
1748 csp_flags = ntohs(flp->fl_csp.sp_features); 1756 csp_flags = ntohs(flp->fl_csp.sp_features);
1749 r_a_tov = ntohl(flp->fl_csp.sp_r_a_tov); 1757 r_a_tov = ntohl(flp->fl_csp.sp_r_a_tov);
1750 e_d_tov = ntohl(flp->fl_csp.sp_e_d_tov); 1758 e_d_tov = ntohl(flp->fl_csp.sp_e_d_tov);