aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/bfa/bfa_fcs_rport.c
diff options
context:
space:
mode:
authorKrishna Gudipati <kgudipat@brocade.com>2012-08-22 22:51:08 -0400
committerJames Bottomley <JBottomley@Parallels.com>2012-09-24 04:10:56 -0400
commitc3f1b123d0573b47aea540c711e6ca83737c5d86 (patch)
tree8dc44b30a38398fed676526d1a29d921974ae34e /drivers/scsi/bfa/bfa_fcs_rport.c
parentee1a4a42f6198c2b6e7c9fba6a952d1f4f89d627 (diff)
[SCSI] bfa: Make changes to FCXP resource management.
- Made changes to split FCXP resources as request and response resources. - The split will reduce the contention for FCXP resources in an open zone config. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/bfa/bfa_fcs_rport.c')
-rw-r--r--drivers/scsi/bfa/bfa_fcs_rport.c42
1 files changed, 24 insertions, 18 deletions
diff --git a/drivers/scsi/bfa/bfa_fcs_rport.c b/drivers/scsi/bfa/bfa_fcs_rport.c
index fa2df04d9662..8efa3a3ded1d 100644
--- a/drivers/scsi/bfa/bfa_fcs_rport.c
+++ b/drivers/scsi/bfa/bfa_fcs_rport.c
@@ -1372,10 +1372,11 @@ bfa_fcs_rport_send_plogi(void *rport_cbarg, struct bfa_fcxp_s *fcxp_alloced)
1372 1372
1373 bfa_trc(rport->fcs, rport->pwwn); 1373 bfa_trc(rport->fcs, rport->pwwn);
1374 1374
1375 fcxp = fcxp_alloced ? fcxp_alloced : bfa_fcs_fcxp_alloc(port->fcs); 1375 fcxp = fcxp_alloced ? fcxp_alloced :
1376 bfa_fcs_fcxp_alloc(port->fcs, BFA_TRUE);
1376 if (!fcxp) { 1377 if (!fcxp) {
1377 bfa_fcs_fcxp_alloc_wait(port->fcs->bfa, &rport->fcxp_wqe, 1378 bfa_fcs_fcxp_alloc_wait(port->fcs->bfa, &rport->fcxp_wqe,
1378 bfa_fcs_rport_send_plogi, rport); 1379 bfa_fcs_rport_send_plogi, rport, BFA_TRUE);
1379 return; 1380 return;
1380 } 1381 }
1381 rport->fcxp = fcxp; 1382 rport->fcxp = fcxp;
@@ -1492,10 +1493,11 @@ bfa_fcs_rport_send_plogiacc(void *rport_cbarg, struct bfa_fcxp_s *fcxp_alloced)
1492 bfa_trc(rport->fcs, rport->pwwn); 1493 bfa_trc(rport->fcs, rport->pwwn);
1493 bfa_trc(rport->fcs, rport->reply_oxid); 1494 bfa_trc(rport->fcs, rport->reply_oxid);
1494 1495
1495 fcxp = fcxp_alloced ? fcxp_alloced : bfa_fcs_fcxp_alloc(port->fcs); 1496 fcxp = fcxp_alloced ? fcxp_alloced :
1497 bfa_fcs_fcxp_alloc(port->fcs, BFA_FALSE);
1496 if (!fcxp) { 1498 if (!fcxp) {
1497 bfa_fcs_fcxp_alloc_wait(port->fcs->bfa, &rport->fcxp_wqe, 1499 bfa_fcs_fcxp_alloc_wait(port->fcs->bfa, &rport->fcxp_wqe,
1498 bfa_fcs_rport_send_plogiacc, rport); 1500 bfa_fcs_rport_send_plogiacc, rport, BFA_FALSE);
1499 return; 1501 return;
1500 } 1502 }
1501 rport->fcxp = fcxp; 1503 rport->fcxp = fcxp;
@@ -1524,10 +1526,11 @@ bfa_fcs_rport_send_adisc(void *rport_cbarg, struct bfa_fcxp_s *fcxp_alloced)
1524 1526
1525 bfa_trc(rport->fcs, rport->pwwn); 1527 bfa_trc(rport->fcs, rport->pwwn);
1526 1528
1527 fcxp = fcxp_alloced ? fcxp_alloced : bfa_fcs_fcxp_alloc(port->fcs); 1529 fcxp = fcxp_alloced ? fcxp_alloced :
1530 bfa_fcs_fcxp_alloc(port->fcs, BFA_TRUE);
1528 if (!fcxp) { 1531 if (!fcxp) {
1529 bfa_fcs_fcxp_alloc_wait(port->fcs->bfa, &rport->fcxp_wqe, 1532 bfa_fcs_fcxp_alloc_wait(port->fcs->bfa, &rport->fcxp_wqe,
1530 bfa_fcs_rport_send_adisc, rport); 1533 bfa_fcs_rport_send_adisc, rport, BFA_TRUE);
1531 return; 1534 return;
1532 } 1535 }
1533 rport->fcxp = fcxp; 1536 rport->fcxp = fcxp;
@@ -1587,10 +1590,11 @@ bfa_fcs_rport_send_nsdisc(void *rport_cbarg, struct bfa_fcxp_s *fcxp_alloced)
1587 1590
1588 bfa_trc(rport->fcs, rport->pid); 1591 bfa_trc(rport->fcs, rport->pid);
1589 1592
1590 fcxp = fcxp_alloced ? fcxp_alloced : bfa_fcs_fcxp_alloc(port->fcs); 1593 fcxp = fcxp_alloced ? fcxp_alloced :
1594 bfa_fcs_fcxp_alloc(port->fcs, BFA_TRUE);
1591 if (!fcxp) { 1595 if (!fcxp) {
1592 bfa_fcs_fcxp_alloc_wait(port->fcs->bfa, &rport->fcxp_wqe, 1596 bfa_fcs_fcxp_alloc_wait(port->fcs->bfa, &rport->fcxp_wqe,
1593 bfa_fcs_rport_send_nsdisc, rport); 1597 bfa_fcs_rport_send_nsdisc, rport, BFA_TRUE);
1594 return; 1598 return;
1595 } 1599 }
1596 rport->fcxp = fcxp; 1600 rport->fcxp = fcxp;
@@ -1743,10 +1747,11 @@ bfa_fcs_rport_send_logo(void *rport_cbarg, struct bfa_fcxp_s *fcxp_alloced)
1743 1747
1744 port = rport->port; 1748 port = rport->port;
1745 1749
1746 fcxp = fcxp_alloced ? fcxp_alloced : bfa_fcs_fcxp_alloc(port->fcs); 1750 fcxp = fcxp_alloced ? fcxp_alloced :
1751 bfa_fcs_fcxp_alloc(port->fcs, BFA_FALSE);
1747 if (!fcxp) { 1752 if (!fcxp) {
1748 bfa_fcs_fcxp_alloc_wait(port->fcs->bfa, &rport->fcxp_wqe, 1753 bfa_fcs_fcxp_alloc_wait(port->fcs->bfa, &rport->fcxp_wqe,
1749 bfa_fcs_rport_send_logo, rport); 1754 bfa_fcs_rport_send_logo, rport, BFA_FALSE);
1750 return; 1755 return;
1751 } 1756 }
1752 rport->fcxp = fcxp; 1757 rport->fcxp = fcxp;
@@ -1780,7 +1785,7 @@ bfa_fcs_rport_send_logo_acc(void *rport_cbarg)
1780 1785
1781 port = rport->port; 1786 port = rport->port;
1782 1787
1783 fcxp = bfa_fcs_fcxp_alloc(port->fcs); 1788 fcxp = bfa_fcs_fcxp_alloc(port->fcs, BFA_FALSE);
1784 if (!fcxp) 1789 if (!fcxp)
1785 return; 1790 return;
1786 1791
@@ -1851,7 +1856,7 @@ bfa_fcs_rport_process_prli(struct bfa_fcs_rport_s *rport,
1851 bfa_fcs_itnim_is_initiator(rport->itnim); 1856 bfa_fcs_itnim_is_initiator(rport->itnim);
1852 } 1857 }
1853 1858
1854 fcxp = bfa_fcs_fcxp_alloc(port->fcs); 1859 fcxp = bfa_fcs_fcxp_alloc(port->fcs, BFA_FALSE);
1855 if (!fcxp) 1860 if (!fcxp)
1856 return; 1861 return;
1857 1862
@@ -1888,7 +1893,7 @@ bfa_fcs_rport_process_rpsc(struct bfa_fcs_rport_s *rport,
1888 1893
1889 speeds.port_op_speed = fc_bfa_speed_to_rpsc_operspeed(pport_attr.speed); 1894 speeds.port_op_speed = fc_bfa_speed_to_rpsc_operspeed(pport_attr.speed);
1890 1895
1891 fcxp = bfa_fcs_fcxp_alloc(port->fcs); 1896 fcxp = bfa_fcs_fcxp_alloc(port->fcs, BFA_FALSE);
1892 if (!fcxp) 1897 if (!fcxp)
1893 return; 1898 return;
1894 1899
@@ -1922,7 +1927,7 @@ bfa_fcs_rport_process_adisc(struct bfa_fcs_rport_s *rport,
1922 */ 1927 */
1923 if (bfa_fcs_itnim_get_online_state(rport->itnim) == BFA_STATUS_OK) { 1928 if (bfa_fcs_itnim_get_online_state(rport->itnim) == BFA_STATUS_OK) {
1924 1929
1925 fcxp = bfa_fcs_fcxp_alloc(port->fcs); 1930 fcxp = bfa_fcs_fcxp_alloc(port->fcs, BFA_FALSE);
1926 if (!fcxp) 1931 if (!fcxp)
1927 return; 1932 return;
1928 1933
@@ -2511,7 +2516,7 @@ bfa_fcs_rport_send_prlo_acc(struct bfa_fcs_rport_s *rport)
2511 2516
2512 bfa_trc(rport->fcs, rport->pid); 2517 bfa_trc(rport->fcs, rport->pid);
2513 2518
2514 fcxp = bfa_fcs_fcxp_alloc(port->fcs); 2519 fcxp = bfa_fcs_fcxp_alloc(port->fcs, BFA_FALSE);
2515 if (!fcxp) 2520 if (!fcxp)
2516 return; 2521 return;
2517 len = fc_prlo_acc_build(&fchs, bfa_fcxp_get_reqbuf(fcxp), 2522 len = fc_prlo_acc_build(&fchs, bfa_fcxp_get_reqbuf(fcxp),
@@ -2537,7 +2542,7 @@ bfa_fcs_rport_send_ls_rjt(struct bfa_fcs_rport_s *rport, struct fchs_s *rx_fchs,
2537 2542
2538 bfa_trc(rport->fcs, rx_fchs->s_id); 2543 bfa_trc(rport->fcs, rx_fchs->s_id);
2539 2544
2540 fcxp = bfa_fcs_fcxp_alloc(rport->fcs); 2545 fcxp = bfa_fcs_fcxp_alloc(rport->fcs, BFA_FALSE);
2541 if (!fcxp) 2546 if (!fcxp)
2542 return; 2547 return;
2543 2548
@@ -2943,10 +2948,11 @@ bfa_fcs_rpf_send_rpsc2(void *rpf_cbarg, struct bfa_fcxp_s *fcxp_alloced)
2943 2948
2944 bfa_trc(rport->fcs, rport->pwwn); 2949 bfa_trc(rport->fcs, rport->pwwn);
2945 2950
2946 fcxp = fcxp_alloced ? fcxp_alloced : bfa_fcs_fcxp_alloc(port->fcs); 2951 fcxp = fcxp_alloced ? fcxp_alloced :
2952 bfa_fcs_fcxp_alloc(port->fcs, BFA_TRUE);
2947 if (!fcxp) { 2953 if (!fcxp) {
2948 bfa_fcs_fcxp_alloc_wait(port->fcs->bfa, &rpf->fcxp_wqe, 2954 bfa_fcs_fcxp_alloc_wait(port->fcs->bfa, &rpf->fcxp_wqe,
2949 bfa_fcs_rpf_send_rpsc2, rpf); 2955 bfa_fcs_rpf_send_rpsc2, rpf, BFA_TRUE);
2950 return; 2956 return;
2951 } 2957 }
2952 rpf->fcxp = fcxp; 2958 rpf->fcxp = fcxp;