diff options
author | Krishna Gudipati <kgudipat@brocade.com> | 2011-12-20 21:55:07 -0500 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2012-01-10 18:01:24 -0500 |
commit | 8ca2dd87e7f29df99389e9dc41f7a45a35223672 (patch) | |
tree | e64df5281ac4a44ba6ae2808b8e387a0071ed438 /drivers/scsi | |
parent | 6bc6204e3b7f4ac235e98e362714213369d6a012 (diff) |
[SCSI] bfa: Revert back the current LUN Masking Implementation.
This patch reverts the current LUN Masking Implementation. We re-implemented
this feature using the SCSI Slave Callout's as per the review comments.
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/bfa/bfa_defs_svc.h | 7 | ||||
-rw-r--r-- | drivers/scsi/bfa/bfa_fc.h | 155 | ||||
-rw-r--r-- | drivers/scsi/bfa/bfa_fcpim.c | 410 | ||||
-rw-r--r-- | drivers/scsi/bfa/bfa_fcpim.h | 7 | ||||
-rw-r--r-- | drivers/scsi/bfa/bfa_svc.h | 5 |
5 files changed, 2 insertions, 582 deletions
diff --git a/drivers/scsi/bfa/bfa_defs_svc.h b/drivers/scsi/bfa/bfa_defs_svc.h index 78963be2c4f..cb07c628b2f 100644 --- a/drivers/scsi/bfa/bfa_defs_svc.h +++ b/drivers/scsi/bfa/bfa_defs_svc.h | |||
@@ -673,12 +673,7 @@ struct bfa_itnim_iostats_s { | |||
673 | u32 tm_iocdowns; /* TM cleaned-up due to IOC down */ | 673 | u32 tm_iocdowns; /* TM cleaned-up due to IOC down */ |
674 | u32 tm_cleanups; /* TM cleanup requests */ | 674 | u32 tm_cleanups; /* TM cleanup requests */ |
675 | u32 tm_cleanup_comps; /* TM cleanup completions */ | 675 | u32 tm_cleanup_comps; /* TM cleanup completions */ |
676 | u32 lm_lun_across_sg; /* LM lun is across sg data buf */ | 676 | u32 rsvd[6]; |
677 | u32 lm_lun_not_sup; /* LM lun not supported */ | ||
678 | u32 lm_rpl_data_changed; /* LM report-lun data changed */ | ||
679 | u32 lm_wire_residue_changed; /* LM report-lun rsp residue changed */ | ||
680 | u32 lm_small_buf_addresidue; /* LM buf smaller than reported cnt */ | ||
681 | u32 lm_lun_not_rdy; /* LM lun not ready */ | ||
682 | }; | 677 | }; |
683 | 678 | ||
684 | /* Modify char* port_stt[] in bfal_port.c if a new state was added */ | 679 | /* Modify char* port_stt[] in bfal_port.c if a new state was added */ |
diff --git a/drivers/scsi/bfa/bfa_fc.h b/drivers/scsi/bfa/bfa_fc.h index 50b6a1c8619..8d0b88f67a3 100644 --- a/drivers/scsi/bfa/bfa_fc.h +++ b/drivers/scsi/bfa/bfa_fc.h | |||
@@ -56,161 +56,6 @@ struct scsi_cdb_s { | |||
56 | 56 | ||
57 | #define SCSI_MAX_ALLOC_LEN 0xFF /* maximum allocarion length */ | 57 | #define SCSI_MAX_ALLOC_LEN 0xFF /* maximum allocarion length */ |
58 | 58 | ||
59 | #define SCSI_SENSE_CUR_ERR 0x70 | ||
60 | #define SCSI_SENSE_DEF_ERR 0x71 | ||
61 | |||
62 | /* | ||
63 | * SCSI additional sense codes | ||
64 | */ | ||
65 | #define SCSI_ASC_LUN_NOT_READY 0x04 | ||
66 | #define SCSI_ASC_LUN_NOT_SUPPORTED 0x25 | ||
67 | #define SCSI_ASC_TOCC 0x3F | ||
68 | |||
69 | /* | ||
70 | * SCSI additional sense code qualifiers | ||
71 | */ | ||
72 | #define SCSI_ASCQ_MAN_INTR_REQ 0x03 /* manual intervention req */ | ||
73 | #define SCSI_ASCQ_RL_DATA_CHANGED 0x0E /* report luns data changed */ | ||
74 | |||
75 | /* | ||
76 | * Methods of reporting informational exceptions | ||
77 | */ | ||
78 | #define SCSI_MP_IEC_UNIT_ATTN 0x2 /* generate unit attention */ | ||
79 | |||
80 | struct scsi_report_luns_data_s { | ||
81 | u32 lun_list_length; /* length of LUN list length */ | ||
82 | u32 reserved; | ||
83 | struct scsi_lun lun[1]; /* first LUN in lun list */ | ||
84 | }; | ||
85 | |||
86 | struct scsi_inquiry_vendor_s { | ||
87 | u8 vendor_id[8]; | ||
88 | }; | ||
89 | |||
90 | struct scsi_inquiry_prodid_s { | ||
91 | u8 product_id[16]; | ||
92 | }; | ||
93 | |||
94 | struct scsi_inquiry_prodrev_s { | ||
95 | u8 product_rev[4]; | ||
96 | }; | ||
97 | |||
98 | struct scsi_inquiry_data_s { | ||
99 | #ifdef __BIG_ENDIAN | ||
100 | u8 peripheral_qual:3; /* peripheral qualifier */ | ||
101 | u8 device_type:5; /* peripheral device type */ | ||
102 | u8 rmb:1; /* removable medium bit */ | ||
103 | u8 device_type_mod:7; /* device type modifier */ | ||
104 | u8 version; | ||
105 | u8 aenc:1; /* async evt notification capability */ | ||
106 | u8 trm_iop:1; /* terminate I/O process */ | ||
107 | u8 norm_aca:1; /* normal ACA supported */ | ||
108 | u8 hi_support:1; /* SCSI-3: supports REPORT LUNS */ | ||
109 | u8 rsp_data_format:4; | ||
110 | u8 additional_len; | ||
111 | u8 sccs:1; | ||
112 | u8 reserved1:7; | ||
113 | u8 reserved2:1; | ||
114 | u8 enc_serv:1; /* enclosure service component */ | ||
115 | u8 reserved3:1; | ||
116 | u8 multi_port:1; /* multi-port device */ | ||
117 | u8 m_chngr:1; /* device in medium transport element */ | ||
118 | u8 ack_req_q:1; /* SIP specific bit */ | ||
119 | u8 addr32:1; /* SIP specific bit */ | ||
120 | u8 addr16:1; /* SIP specific bit */ | ||
121 | u8 rel_adr:1; /* relative address */ | ||
122 | u8 w_bus32:1; | ||
123 | u8 w_bus16:1; | ||
124 | u8 synchronous:1; | ||
125 | u8 linked_commands:1; | ||
126 | u8 trans_dis:1; | ||
127 | u8 cmd_queue:1; /* command queueing supported */ | ||
128 | u8 soft_reset:1; /* soft reset alternative (VS) */ | ||
129 | #else | ||
130 | u8 device_type:5; /* peripheral device type */ | ||
131 | u8 peripheral_qual:3; /* peripheral qualifier */ | ||
132 | u8 device_type_mod:7; /* device type modifier */ | ||
133 | u8 rmb:1; /* removable medium bit */ | ||
134 | u8 version; | ||
135 | u8 rsp_data_format:4; | ||
136 | u8 hi_support:1; /* SCSI-3: supports REPORT LUNS */ | ||
137 | u8 norm_aca:1; /* normal ACA supported */ | ||
138 | u8 terminate_iop:1;/* terminate I/O process */ | ||
139 | u8 aenc:1; /* async evt notification capability */ | ||
140 | u8 additional_len; | ||
141 | u8 reserved1:7; | ||
142 | u8 sccs:1; | ||
143 | u8 addr16:1; /* SIP specific bit */ | ||
144 | u8 addr32:1; /* SIP specific bit */ | ||
145 | u8 ack_req_q:1; /* SIP specific bit */ | ||
146 | u8 m_chngr:1; /* device in medium transport element */ | ||
147 | u8 multi_port:1; /* multi-port device */ | ||
148 | u8 reserved3:1; /* TBD - Vendor Specific */ | ||
149 | u8 enc_serv:1; /* enclosure service component */ | ||
150 | u8 reserved2:1; | ||
151 | u8 soft_seset:1; /* soft reset alternative (VS) */ | ||
152 | u8 cmd_queue:1; /* command queueing supported */ | ||
153 | u8 trans_dis:1; | ||
154 | u8 linked_commands:1; | ||
155 | u8 synchronous:1; | ||
156 | u8 w_bus16:1; | ||
157 | u8 w_bus32:1; | ||
158 | u8 rel_adr:1; /* relative address */ | ||
159 | #endif | ||
160 | struct scsi_inquiry_vendor_s vendor_id; | ||
161 | struct scsi_inquiry_prodid_s product_id; | ||
162 | struct scsi_inquiry_prodrev_s product_rev; | ||
163 | u8 vendor_specific[20]; | ||
164 | u8 reserved4[40]; | ||
165 | }; | ||
166 | |||
167 | /* | ||
168 | * SCSI sense data format | ||
169 | */ | ||
170 | struct scsi_sense_s { | ||
171 | #ifdef __BIG_ENDIAN | ||
172 | u8 valid:1; | ||
173 | u8 rsp_code:7; | ||
174 | #else | ||
175 | u8 rsp_code:7; | ||
176 | u8 valid:1; | ||
177 | #endif | ||
178 | u8 seg_num; | ||
179 | #ifdef __BIG_ENDIAN | ||
180 | u8 file_mark:1; | ||
181 | u8 eom:1; /* end of media */ | ||
182 | u8 ili:1; /* incorrect length indicator */ | ||
183 | u8 reserved:1; | ||
184 | u8 sense_key:4; | ||
185 | #else | ||
186 | u8 sense_key:4; | ||
187 | u8 reserved:1; | ||
188 | u8 ili:1; /* incorrect length indicator */ | ||
189 | u8 eom:1; /* end of media */ | ||
190 | u8 file_mark:1; | ||
191 | #endif | ||
192 | u8 information[4]; /* device-type or cmd specific info */ | ||
193 | u8 add_sense_length; /* additional sense length */ | ||
194 | u8 command_info[4];/* command specific information */ | ||
195 | u8 asc; /* additional sense code */ | ||
196 | u8 ascq; /* additional sense code qualifier */ | ||
197 | u8 fru_code; /* field replaceable unit code */ | ||
198 | #ifdef __BIG_ENDIAN | ||
199 | u8 sksv:1; /* sense key specific valid */ | ||
200 | u8 c_d:1; /* command/data bit */ | ||
201 | u8 res1:2; | ||
202 | u8 bpv:1; /* bit pointer valid */ | ||
203 | u8 bpointer:3; /* bit pointer */ | ||
204 | #else | ||
205 | u8 bpointer:3; /* bit pointer */ | ||
206 | u8 bpv:1; /* bit pointer valid */ | ||
207 | u8 res1:2; | ||
208 | u8 c_d:1; /* command/data bit */ | ||
209 | u8 sksv:1; /* sense key specific valid */ | ||
210 | #endif | ||
211 | u8 fpointer[2]; /* field pointer */ | ||
212 | }; | ||
213 | |||
214 | /* | 59 | /* |
215 | * Fibre Channel Header Structure (FCHS) definition | 60 | * Fibre Channel Header Structure (FCHS) definition |
216 | */ | 61 | */ |
diff --git a/drivers/scsi/bfa/bfa_fcpim.c b/drivers/scsi/bfa/bfa_fcpim.c index 846f15b6e1d..f0f80e282e3 100644 --- a/drivers/scsi/bfa/bfa_fcpim.c +++ b/drivers/scsi/bfa/bfa_fcpim.c | |||
@@ -24,8 +24,6 @@ BFA_TRC_FILE(HAL, FCPIM); | |||
24 | * BFA ITNIM Related definitions | 24 | * BFA ITNIM Related definitions |
25 | */ | 25 | */ |
26 | static void bfa_itnim_update_del_itn_stats(struct bfa_itnim_s *itnim); | 26 | static void bfa_itnim_update_del_itn_stats(struct bfa_itnim_s *itnim); |
27 | static bfa_boolean_t bfa_ioim_lm_proc_rpl_data(struct bfa_ioim_s *ioim); | ||
28 | static bfa_boolean_t bfa_ioim_lm_proc_inq_data(struct bfa_ioim_s *ioim); | ||
29 | static void bfa_ioim_lm_init(struct bfa_s *bfa); | 27 | static void bfa_ioim_lm_init(struct bfa_s *bfa); |
30 | 28 | ||
31 | #define BFA_ITNIM_FROM_TAG(_fcpim, _tag) \ | 29 | #define BFA_ITNIM_FROM_TAG(_fcpim, _tag) \ |
@@ -60,14 +58,6 @@ static void bfa_ioim_lm_init(struct bfa_s *bfa); | |||
60 | } \ | 58 | } \ |
61 | } while (0) | 59 | } while (0) |
62 | 60 | ||
63 | #define bfa_ioim_rp_wwn(__ioim) \ | ||
64 | (((struct bfa_fcs_rport_s *) \ | ||
65 | (__ioim)->itnim->rport->rport_drv)->pwwn) | ||
66 | |||
67 | #define bfa_ioim_lp_wwn(__ioim) \ | ||
68 | ((BFA_LPS_FROM_TAG(BFA_LPS_MOD((__ioim)->bfa), \ | ||
69 | (__ioim)->itnim->rport->rport_info.lp_tag))->pwwn) \ | ||
70 | |||
71 | #define bfa_itnim_sler_cb(__itnim) do { \ | 61 | #define bfa_itnim_sler_cb(__itnim) do { \ |
72 | if ((__itnim)->bfa->fcs) \ | 62 | if ((__itnim)->bfa->fcs) \ |
73 | bfa_cb_itnim_sler((__itnim)->ditn); \ | 63 | bfa_cb_itnim_sler((__itnim)->ditn); \ |
@@ -77,13 +67,6 @@ static void bfa_ioim_lm_init(struct bfa_s *bfa); | |||
77 | } \ | 67 | } \ |
78 | } while (0) | 68 | } while (0) |
79 | 69 | ||
80 | enum bfa_ioim_lm_status { | ||
81 | BFA_IOIM_LM_PRESENT = 1, | ||
82 | BFA_IOIM_LM_LUN_NOT_SUP = 2, | ||
83 | BFA_IOIM_LM_RPL_DATA_CHANGED = 3, | ||
84 | BFA_IOIM_LM_LUN_NOT_RDY = 4, | ||
85 | }; | ||
86 | |||
87 | enum bfa_ioim_lm_ua_status { | 70 | enum bfa_ioim_lm_ua_status { |
88 | BFA_IOIM_LM_UA_RESET = 0, | 71 | BFA_IOIM_LM_UA_RESET = 0, |
89 | BFA_IOIM_LM_UA_SET = 1, | 72 | BFA_IOIM_LM_UA_SET = 1, |
@@ -145,9 +128,6 @@ enum bfa_ioim_event { | |||
145 | BFA_IOIM_SM_TMDONE = 16, /* IO cleanup from tskim */ | 128 | BFA_IOIM_SM_TMDONE = 16, /* IO cleanup from tskim */ |
146 | BFA_IOIM_SM_HWFAIL = 17, /* IOC h/w failure event */ | 129 | BFA_IOIM_SM_HWFAIL = 17, /* IOC h/w failure event */ |
147 | BFA_IOIM_SM_IOTOV = 18, /* ITN offline TOV */ | 130 | BFA_IOIM_SM_IOTOV = 18, /* ITN offline TOV */ |
148 | BFA_IOIM_SM_LM_LUN_NOT_SUP = 19,/* lunmask lun not supported */ | ||
149 | BFA_IOIM_SM_LM_RPL_DC = 20, /* lunmask report-lun data changed */ | ||
150 | BFA_IOIM_SM_LM_LUN_NOT_RDY = 21,/* lunmask lun not ready */ | ||
151 | }; | 131 | }; |
152 | 132 | ||
153 | 133 | ||
@@ -245,9 +225,6 @@ static void __bfa_cb_ioim_abort(void *cbarg, bfa_boolean_t complete); | |||
245 | static void __bfa_cb_ioim_failed(void *cbarg, bfa_boolean_t complete); | 225 | static void __bfa_cb_ioim_failed(void *cbarg, bfa_boolean_t complete); |
246 | static void __bfa_cb_ioim_pathtov(void *cbarg, bfa_boolean_t complete); | 226 | static void __bfa_cb_ioim_pathtov(void *cbarg, bfa_boolean_t complete); |
247 | static bfa_boolean_t bfa_ioim_is_abortable(struct bfa_ioim_s *ioim); | 227 | static bfa_boolean_t bfa_ioim_is_abortable(struct bfa_ioim_s *ioim); |
248 | static void __bfa_cb_ioim_lm_lun_not_sup(void *cbarg, bfa_boolean_t complete); | ||
249 | static void __bfa_cb_ioim_lm_rpl_dc(void *cbarg, bfa_boolean_t complete); | ||
250 | static void __bfa_cb_ioim_lm_lun_not_rdy(void *cbarg, bfa_boolean_t complete); | ||
251 | 228 | ||
252 | /* | 229 | /* |
253 | * forward declaration of BFA IO state machine | 230 | * forward declaration of BFA IO state machine |
@@ -445,12 +422,6 @@ bfa_fcpim_add_stats(struct bfa_itnim_iostats_s *lstats, | |||
445 | bfa_fcpim_add_iostats(lstats, rstats, output_reqs); | 422 | bfa_fcpim_add_iostats(lstats, rstats, output_reqs); |
446 | bfa_fcpim_add_iostats(lstats, rstats, rd_throughput); | 423 | bfa_fcpim_add_iostats(lstats, rstats, rd_throughput); |
447 | bfa_fcpim_add_iostats(lstats, rstats, wr_throughput); | 424 | bfa_fcpim_add_iostats(lstats, rstats, wr_throughput); |
448 | bfa_fcpim_add_iostats(lstats, rstats, lm_lun_across_sg); | ||
449 | bfa_fcpim_add_iostats(lstats, rstats, lm_lun_not_sup); | ||
450 | bfa_fcpim_add_iostats(lstats, rstats, lm_rpl_data_changed); | ||
451 | bfa_fcpim_add_iostats(lstats, rstats, lm_wire_residue_changed); | ||
452 | bfa_fcpim_add_iostats(lstats, rstats, lm_small_buf_addresidue); | ||
453 | bfa_fcpim_add_iostats(lstats, rstats, lm_lun_not_rdy); | ||
454 | } | 425 | } |
455 | 426 | ||
456 | bfa_status_t | 427 | bfa_status_t |
@@ -1580,27 +1551,6 @@ bfa_ioim_sm_uninit(struct bfa_ioim_s *ioim, enum bfa_ioim_event event) | |||
1580 | __bfa_cb_ioim_abort, ioim); | 1551 | __bfa_cb_ioim_abort, ioim); |
1581 | break; | 1552 | break; |
1582 | 1553 | ||
1583 | case BFA_IOIM_SM_LM_LUN_NOT_SUP: | ||
1584 | bfa_sm_set_state(ioim, bfa_ioim_sm_hcb); | ||
1585 | bfa_ioim_move_to_comp_q(ioim); | ||
1586 | bfa_cb_queue(ioim->bfa, &ioim->hcb_qe, | ||
1587 | __bfa_cb_ioim_lm_lun_not_sup, ioim); | ||
1588 | break; | ||
1589 | |||
1590 | case BFA_IOIM_SM_LM_RPL_DC: | ||
1591 | bfa_sm_set_state(ioim, bfa_ioim_sm_hcb); | ||
1592 | bfa_ioim_move_to_comp_q(ioim); | ||
1593 | bfa_cb_queue(ioim->bfa, &ioim->hcb_qe, | ||
1594 | __bfa_cb_ioim_lm_rpl_dc, ioim); | ||
1595 | break; | ||
1596 | |||
1597 | case BFA_IOIM_SM_LM_LUN_NOT_RDY: | ||
1598 | bfa_sm_set_state(ioim, bfa_ioim_sm_hcb); | ||
1599 | bfa_ioim_move_to_comp_q(ioim); | ||
1600 | bfa_cb_queue(ioim->bfa, &ioim->hcb_qe, | ||
1601 | __bfa_cb_ioim_lm_lun_not_rdy, ioim); | ||
1602 | break; | ||
1603 | |||
1604 | default: | 1554 | default: |
1605 | bfa_sm_fault(ioim->bfa, event); | 1555 | bfa_sm_fault(ioim->bfa, event); |
1606 | } | 1556 | } |
@@ -2160,243 +2110,6 @@ bfa_ioim_lm_init(struct bfa_s *bfa) | |||
2160 | } | 2110 | } |
2161 | } | 2111 | } |
2162 | 2112 | ||
2163 | /* | ||
2164 | * Validate LUN for LUN masking | ||
2165 | */ | ||
2166 | static enum bfa_ioim_lm_status | ||
2167 | bfa_ioim_lm_check(struct bfa_ioim_s *ioim, struct bfa_lps_s *lps, | ||
2168 | struct bfa_rport_s *rp, struct scsi_lun lun) | ||
2169 | { | ||
2170 | u8 i; | ||
2171 | struct bfa_lun_mask_s *lun_list = bfa_get_lun_mask_list(ioim->bfa); | ||
2172 | struct scsi_cmnd *cmnd = (struct scsi_cmnd *)ioim->dio; | ||
2173 | struct scsi_cdb_s *cdb = (struct scsi_cdb_s *)cmnd->cmnd; | ||
2174 | |||
2175 | if ((cdb->scsi_cdb[0] == REPORT_LUNS) && | ||
2176 | (scsilun_to_int((struct scsi_lun *)&lun) == 0)) { | ||
2177 | ioim->proc_rsp_data = bfa_ioim_lm_proc_rpl_data; | ||
2178 | return BFA_IOIM_LM_PRESENT; | ||
2179 | } | ||
2180 | |||
2181 | for (i = 0; i < MAX_LUN_MASK_CFG; i++) { | ||
2182 | |||
2183 | if (lun_list[i].state != BFA_IOIM_LUN_MASK_ACTIVE) | ||
2184 | continue; | ||
2185 | |||
2186 | if ((scsilun_to_int((struct scsi_lun *)&lun_list[i].lun) == | ||
2187 | scsilun_to_int((struct scsi_lun *)&lun)) | ||
2188 | && (rp->rport_tag == lun_list[i].rp_tag) | ||
2189 | && ((u8)ioim->itnim->rport->rport_info.lp_tag == | ||
2190 | lun_list[i].lp_tag)) { | ||
2191 | bfa_trc(ioim->bfa, lun_list[i].rp_tag); | ||
2192 | bfa_trc(ioim->bfa, lun_list[i].lp_tag); | ||
2193 | bfa_trc(ioim->bfa, scsilun_to_int( | ||
2194 | (struct scsi_lun *)&lun_list[i].lun)); | ||
2195 | |||
2196 | if ((lun_list[i].ua == BFA_IOIM_LM_UA_SET) && | ||
2197 | ((cdb->scsi_cdb[0] != INQUIRY) || | ||
2198 | (cdb->scsi_cdb[0] != REPORT_LUNS))) { | ||
2199 | lun_list[i].ua = BFA_IOIM_LM_UA_RESET; | ||
2200 | return BFA_IOIM_LM_RPL_DATA_CHANGED; | ||
2201 | } | ||
2202 | |||
2203 | if (cdb->scsi_cdb[0] == REPORT_LUNS) | ||
2204 | ioim->proc_rsp_data = bfa_ioim_lm_proc_rpl_data; | ||
2205 | |||
2206 | return BFA_IOIM_LM_PRESENT; | ||
2207 | } | ||
2208 | } | ||
2209 | |||
2210 | if ((cdb->scsi_cdb[0] == INQUIRY) && | ||
2211 | (scsilun_to_int((struct scsi_lun *)&lun) == 0)) { | ||
2212 | ioim->proc_rsp_data = bfa_ioim_lm_proc_inq_data; | ||
2213 | return BFA_IOIM_LM_PRESENT; | ||
2214 | } | ||
2215 | |||
2216 | if (cdb->scsi_cdb[0] == TEST_UNIT_READY) | ||
2217 | return BFA_IOIM_LM_LUN_NOT_RDY; | ||
2218 | |||
2219 | return BFA_IOIM_LM_LUN_NOT_SUP; | ||
2220 | } | ||
2221 | |||
2222 | static bfa_boolean_t | ||
2223 | bfa_ioim_lm_proc_rsp_data_dummy(struct bfa_ioim_s *ioim) | ||
2224 | { | ||
2225 | return BFA_TRUE; | ||
2226 | } | ||
2227 | |||
2228 | static void | ||
2229 | bfa_ioim_lm_fetch_lun(struct bfa_ioim_s *ioim, u8 *rl_data, int offset, | ||
2230 | int buf_lun_cnt) | ||
2231 | { | ||
2232 | struct bfa_lun_mask_s *lun_list = bfa_get_lun_mask_list(ioim->bfa); | ||
2233 | struct scsi_lun *lun_data = (struct scsi_lun *)(rl_data + offset); | ||
2234 | struct scsi_lun lun; | ||
2235 | int i, j; | ||
2236 | |||
2237 | bfa_trc(ioim->bfa, buf_lun_cnt); | ||
2238 | for (j = 0; j < buf_lun_cnt; j++) { | ||
2239 | lun = *((struct scsi_lun *)(lun_data + j)); | ||
2240 | for (i = 0; i < MAX_LUN_MASK_CFG; i++) { | ||
2241 | if (lun_list[i].state != BFA_IOIM_LUN_MASK_ACTIVE) | ||
2242 | continue; | ||
2243 | if ((lun_list[i].rp_wwn == bfa_ioim_rp_wwn(ioim)) && | ||
2244 | (lun_list[i].lp_wwn == bfa_ioim_lp_wwn(ioim)) && | ||
2245 | (scsilun_to_int((struct scsi_lun *)&lun_list[i].lun) | ||
2246 | == scsilun_to_int((struct scsi_lun *)&lun))) { | ||
2247 | lun_list[i].state = BFA_IOIM_LUN_MASK_FETCHED; | ||
2248 | break; | ||
2249 | } | ||
2250 | } /* next lun in mask DB */ | ||
2251 | } /* next lun in buf */ | ||
2252 | } | ||
2253 | |||
2254 | static int | ||
2255 | bfa_ioim_lm_update_lun_sg(struct bfa_ioim_s *ioim, u32 *pgdlen, | ||
2256 | struct scsi_report_luns_data_s *rl) | ||
2257 | { | ||
2258 | struct scsi_cmnd *cmnd = (struct scsi_cmnd *)ioim->dio; | ||
2259 | struct scatterlist *sg = scsi_sglist(cmnd); | ||
2260 | struct bfa_lun_mask_s *lun_list = bfa_get_lun_mask_list(ioim->bfa); | ||
2261 | struct scsi_lun *prev_rl_data = NULL, *base_rl_data; | ||
2262 | int i, j, sgeid, lun_fetched_cnt = 0, prev_sg_len = 0, base_count; | ||
2263 | int lun_across_sg_bytes, bytes_from_next_buf; | ||
2264 | u64 last_lun, temp_last_lun; | ||
2265 | |||
2266 | /* fetch luns from the first sg element */ | ||
2267 | bfa_ioim_lm_fetch_lun(ioim, (u8 *)(rl->lun), 0, | ||
2268 | (sg_dma_len(sg) / sizeof(struct scsi_lun)) - 1); | ||
2269 | |||
2270 | /* fetch luns from multiple sg elements */ | ||
2271 | scsi_for_each_sg(cmnd, sg, scsi_sg_count(cmnd), sgeid) { | ||
2272 | if (sgeid == 0) { | ||
2273 | prev_sg_len = sg_dma_len(sg); | ||
2274 | prev_rl_data = (struct scsi_lun *) | ||
2275 | phys_to_virt(sg_dma_address(sg)); | ||
2276 | continue; | ||
2277 | } | ||
2278 | |||
2279 | /* if the buf is having more data */ | ||
2280 | lun_across_sg_bytes = prev_sg_len % sizeof(struct scsi_lun); | ||
2281 | if (lun_across_sg_bytes) { | ||
2282 | bfa_trc(ioim->bfa, lun_across_sg_bytes); | ||
2283 | bfa_stats(ioim->itnim, lm_lun_across_sg); | ||
2284 | bytes_from_next_buf = sizeof(struct scsi_lun) - | ||
2285 | lun_across_sg_bytes; | ||
2286 | |||
2287 | /* from next buf take higher bytes */ | ||
2288 | temp_last_lun = *((u64 *) | ||
2289 | phys_to_virt(sg_dma_address(sg))); | ||
2290 | last_lun |= temp_last_lun >> | ||
2291 | (lun_across_sg_bytes * BITS_PER_BYTE); | ||
2292 | |||
2293 | /* from prev buf take higher bytes */ | ||
2294 | temp_last_lun = *((u64 *)(prev_rl_data + | ||
2295 | (prev_sg_len - lun_across_sg_bytes))); | ||
2296 | temp_last_lun >>= bytes_from_next_buf * BITS_PER_BYTE; | ||
2297 | last_lun = last_lun | (temp_last_lun << | ||
2298 | (bytes_from_next_buf * BITS_PER_BYTE)); | ||
2299 | |||
2300 | bfa_ioim_lm_fetch_lun(ioim, (u8 *)&last_lun, 0, 1); | ||
2301 | } else | ||
2302 | bytes_from_next_buf = 0; | ||
2303 | |||
2304 | *pgdlen += sg_dma_len(sg); | ||
2305 | prev_sg_len = sg_dma_len(sg); | ||
2306 | prev_rl_data = (struct scsi_lun *) | ||
2307 | phys_to_virt(sg_dma_address(sg)); | ||
2308 | bfa_ioim_lm_fetch_lun(ioim, (u8 *)prev_rl_data, | ||
2309 | bytes_from_next_buf, | ||
2310 | sg_dma_len(sg) / sizeof(struct scsi_lun)); | ||
2311 | } | ||
2312 | |||
2313 | /* update the report luns data - based on fetched luns */ | ||
2314 | sg = scsi_sglist(cmnd); | ||
2315 | base_rl_data = (struct scsi_lun *)rl->lun; | ||
2316 | base_count = (sg_dma_len(sg) / sizeof(struct scsi_lun)) - 1; | ||
2317 | for (i = 0, j = 0; i < MAX_LUN_MASK_CFG; i++) { | ||
2318 | if (lun_list[i].state == BFA_IOIM_LUN_MASK_FETCHED) { | ||
2319 | base_rl_data[j] = lun_list[i].lun; | ||
2320 | lun_list[i].state = BFA_IOIM_LUN_MASK_ACTIVE; | ||
2321 | j++; | ||
2322 | lun_fetched_cnt++; | ||
2323 | } | ||
2324 | |||
2325 | if (j > base_count) { | ||
2326 | j = 0; | ||
2327 | sg = sg_next(sg); | ||
2328 | base_rl_data = (struct scsi_lun *) | ||
2329 | phys_to_virt(sg_dma_address(sg)); | ||
2330 | base_count = sg_dma_len(sg) / sizeof(struct scsi_lun); | ||
2331 | } | ||
2332 | } | ||
2333 | |||
2334 | bfa_trc(ioim->bfa, lun_fetched_cnt); | ||
2335 | return lun_fetched_cnt; | ||
2336 | } | ||
2337 | |||
2338 | static bfa_boolean_t | ||
2339 | bfa_ioim_lm_proc_inq_data(struct bfa_ioim_s *ioim) | ||
2340 | { | ||
2341 | struct scsi_inquiry_data_s *inq; | ||
2342 | struct scatterlist *sg = scsi_sglist((struct scsi_cmnd *)ioim->dio); | ||
2343 | |||
2344 | ioim->proc_rsp_data = bfa_ioim_lm_proc_rsp_data_dummy; | ||
2345 | inq = (struct scsi_inquiry_data_s *)phys_to_virt(sg_dma_address(sg)); | ||
2346 | |||
2347 | bfa_trc(ioim->bfa, inq->device_type); | ||
2348 | inq->peripheral_qual = SCSI_INQ_PQ_NOT_CON; | ||
2349 | return 0; | ||
2350 | } | ||
2351 | |||
2352 | static bfa_boolean_t | ||
2353 | bfa_ioim_lm_proc_rpl_data(struct bfa_ioim_s *ioim) | ||
2354 | { | ||
2355 | struct scsi_cmnd *cmnd = (struct scsi_cmnd *)ioim->dio; | ||
2356 | struct scatterlist *sg = scsi_sglist(cmnd); | ||
2357 | struct bfi_ioim_rsp_s *m; | ||
2358 | struct scsi_report_luns_data_s *rl = NULL; | ||
2359 | int lun_count = 0, lun_fetched_cnt = 0; | ||
2360 | u32 residue, pgdlen = 0; | ||
2361 | |||
2362 | ioim->proc_rsp_data = bfa_ioim_lm_proc_rsp_data_dummy; | ||
2363 | if (bfa_get_lun_mask_status(ioim->bfa) != BFA_LUNMASK_ENABLED) | ||
2364 | return BFA_TRUE; | ||
2365 | |||
2366 | m = (struct bfi_ioim_rsp_s *) &ioim->iosp->comp_rspmsg; | ||
2367 | if (m->scsi_status == SCSI_STATUS_CHECK_CONDITION) | ||
2368 | return BFA_TRUE; | ||
2369 | |||
2370 | pgdlen = sg_dma_len(sg); | ||
2371 | bfa_trc(ioim->bfa, pgdlen); | ||
2372 | rl = (struct scsi_report_luns_data_s *)phys_to_virt(sg_dma_address(sg)); | ||
2373 | lun_count = cpu_to_be32(rl->lun_list_length) / sizeof(struct scsi_lun); | ||
2374 | lun_fetched_cnt = bfa_ioim_lm_update_lun_sg(ioim, &pgdlen, rl); | ||
2375 | |||
2376 | if (lun_count == lun_fetched_cnt) | ||
2377 | return BFA_TRUE; | ||
2378 | |||
2379 | bfa_trc(ioim->bfa, lun_count); | ||
2380 | bfa_trc(ioim->bfa, lun_fetched_cnt); | ||
2381 | bfa_trc(ioim->bfa, be32_to_cpu(rl->lun_list_length)); | ||
2382 | |||
2383 | if (be32_to_cpu(rl->lun_list_length) <= pgdlen) | ||
2384 | rl->lun_list_length = be32_to_cpu(lun_fetched_cnt) * | ||
2385 | sizeof(struct scsi_lun); | ||
2386 | else | ||
2387 | bfa_stats(ioim->itnim, lm_small_buf_addresidue); | ||
2388 | |||
2389 | bfa_trc(ioim->bfa, be32_to_cpu(rl->lun_list_length)); | ||
2390 | bfa_trc(ioim->bfa, be32_to_cpu(m->residue)); | ||
2391 | |||
2392 | residue = be32_to_cpu(m->residue); | ||
2393 | residue += (lun_count - lun_fetched_cnt) * sizeof(struct scsi_lun); | ||
2394 | bfa_stats(ioim->itnim, lm_wire_residue_changed); | ||
2395 | m->residue = be32_to_cpu(residue); | ||
2396 | bfa_trc(ioim->bfa, ioim->nsges); | ||
2397 | return BFA_FALSE; | ||
2398 | } | ||
2399 | |||
2400 | static void | 2113 | static void |
2401 | __bfa_cb_ioim_good_comp(void *cbarg, bfa_boolean_t complete) | 2114 | __bfa_cb_ioim_good_comp(void *cbarg, bfa_boolean_t complete) |
2402 | { | 2115 | { |
@@ -2454,83 +2167,6 @@ __bfa_cb_ioim_comp(void *cbarg, bfa_boolean_t complete) | |||
2454 | m->scsi_status, sns_len, snsinfo, residue); | 2167 | m->scsi_status, sns_len, snsinfo, residue); |
2455 | } | 2168 | } |
2456 | 2169 | ||
2457 | static void | ||
2458 | __bfa_cb_ioim_lm_lun_not_sup(void *cbarg, bfa_boolean_t complete) | ||
2459 | { | ||
2460 | struct bfa_ioim_s *ioim = cbarg; | ||
2461 | int sns_len = 0xD; | ||
2462 | u32 residue = scsi_bufflen((struct scsi_cmnd *)ioim->dio); | ||
2463 | struct scsi_sense_s *snsinfo; | ||
2464 | |||
2465 | if (!complete) { | ||
2466 | bfa_sm_send_event(ioim, BFA_IOIM_SM_HCB); | ||
2467 | return; | ||
2468 | } | ||
2469 | |||
2470 | snsinfo = (struct scsi_sense_s *)BFA_SNSINFO_FROM_TAG( | ||
2471 | ioim->fcpim->fcp, ioim->iotag); | ||
2472 | snsinfo->rsp_code = SCSI_SENSE_CUR_ERR; | ||
2473 | snsinfo->add_sense_length = 0xa; | ||
2474 | snsinfo->asc = SCSI_ASC_LUN_NOT_SUPPORTED; | ||
2475 | snsinfo->sense_key = ILLEGAL_REQUEST; | ||
2476 | bfa_trc(ioim->bfa, residue); | ||
2477 | bfa_cb_ioim_done(ioim->bfa->bfad, ioim->dio, BFI_IOIM_STS_OK, | ||
2478 | SCSI_STATUS_CHECK_CONDITION, sns_len, | ||
2479 | (u8 *)snsinfo, residue); | ||
2480 | } | ||
2481 | |||
2482 | static void | ||
2483 | __bfa_cb_ioim_lm_rpl_dc(void *cbarg, bfa_boolean_t complete) | ||
2484 | { | ||
2485 | struct bfa_ioim_s *ioim = cbarg; | ||
2486 | int sns_len = 0xD; | ||
2487 | u32 residue = scsi_bufflen((struct scsi_cmnd *)ioim->dio); | ||
2488 | struct scsi_sense_s *snsinfo; | ||
2489 | |||
2490 | if (!complete) { | ||
2491 | bfa_sm_send_event(ioim, BFA_IOIM_SM_HCB); | ||
2492 | return; | ||
2493 | } | ||
2494 | |||
2495 | snsinfo = (struct scsi_sense_s *)BFA_SNSINFO_FROM_TAG(ioim->fcpim->fcp, | ||
2496 | ioim->iotag); | ||
2497 | snsinfo->rsp_code = SCSI_SENSE_CUR_ERR; | ||
2498 | snsinfo->sense_key = SCSI_MP_IEC_UNIT_ATTN; | ||
2499 | snsinfo->asc = SCSI_ASC_TOCC; | ||
2500 | snsinfo->add_sense_length = 0x6; | ||
2501 | snsinfo->ascq = SCSI_ASCQ_RL_DATA_CHANGED; | ||
2502 | bfa_trc(ioim->bfa, residue); | ||
2503 | bfa_cb_ioim_done(ioim->bfa->bfad, ioim->dio, BFI_IOIM_STS_OK, | ||
2504 | SCSI_STATUS_CHECK_CONDITION, sns_len, | ||
2505 | (u8 *)snsinfo, residue); | ||
2506 | } | ||
2507 | |||
2508 | static void | ||
2509 | __bfa_cb_ioim_lm_lun_not_rdy(void *cbarg, bfa_boolean_t complete) | ||
2510 | { | ||
2511 | struct bfa_ioim_s *ioim = cbarg; | ||
2512 | int sns_len = 0xD; | ||
2513 | u32 residue = scsi_bufflen((struct scsi_cmnd *)ioim->dio); | ||
2514 | struct scsi_sense_s *snsinfo; | ||
2515 | |||
2516 | if (!complete) { | ||
2517 | bfa_sm_send_event(ioim, BFA_IOIM_SM_HCB); | ||
2518 | return; | ||
2519 | } | ||
2520 | |||
2521 | snsinfo = (struct scsi_sense_s *)BFA_SNSINFO_FROM_TAG( | ||
2522 | ioim->fcpim->fcp, ioim->iotag); | ||
2523 | snsinfo->rsp_code = SCSI_SENSE_CUR_ERR; | ||
2524 | snsinfo->add_sense_length = 0xa; | ||
2525 | snsinfo->sense_key = NOT_READY; | ||
2526 | snsinfo->asc = SCSI_ASC_LUN_NOT_READY; | ||
2527 | snsinfo->ascq = SCSI_ASCQ_MAN_INTR_REQ; | ||
2528 | bfa_trc(ioim->bfa, residue); | ||
2529 | bfa_cb_ioim_done(ioim->bfa->bfad, ioim->dio, BFI_IOIM_STS_OK, | ||
2530 | SCSI_STATUS_CHECK_CONDITION, sns_len, | ||
2531 | (u8 *)snsinfo, residue); | ||
2532 | } | ||
2533 | |||
2534 | void | 2170 | void |
2535 | bfa_fcpim_lunmask_rp_update(struct bfa_s *bfa, wwn_t lp_wwn, wwn_t rp_wwn, | 2171 | bfa_fcpim_lunmask_rp_update(struct bfa_s *bfa, wwn_t lp_wwn, wwn_t rp_wwn, |
2536 | u16 rp_tag, u8 lp_tag) | 2172 | u16 rp_tag, u8 lp_tag) |
@@ -2759,7 +2395,6 @@ __bfa_cb_ioim_failed(void *cbarg, bfa_boolean_t complete) | |||
2759 | return; | 2395 | return; |
2760 | } | 2396 | } |
2761 | 2397 | ||
2762 | ioim->proc_rsp_data = bfa_ioim_lm_proc_rsp_data_dummy; | ||
2763 | bfa_cb_ioim_done(ioim->bfa->bfad, ioim->dio, BFI_IOIM_STS_ABORTED, | 2398 | bfa_cb_ioim_done(ioim->bfa->bfad, ioim->dio, BFI_IOIM_STS_ABORTED, |
2764 | 0, 0, NULL, 0); | 2399 | 0, 0, NULL, 0); |
2765 | } | 2400 | } |
@@ -2775,7 +2410,6 @@ __bfa_cb_ioim_pathtov(void *cbarg, bfa_boolean_t complete) | |||
2775 | return; | 2410 | return; |
2776 | } | 2411 | } |
2777 | 2412 | ||
2778 | ioim->proc_rsp_data = bfa_ioim_lm_proc_rsp_data_dummy; | ||
2779 | bfa_cb_ioim_done(ioim->bfa->bfad, ioim->dio, BFI_IOIM_STS_PATHTOV, | 2413 | bfa_cb_ioim_done(ioim->bfa->bfad, ioim->dio, BFI_IOIM_STS_PATHTOV, |
2780 | 0, 0, NULL, 0); | 2414 | 0, 0, NULL, 0); |
2781 | } | 2415 | } |
@@ -2790,7 +2424,6 @@ __bfa_cb_ioim_abort(void *cbarg, bfa_boolean_t complete) | |||
2790 | return; | 2424 | return; |
2791 | } | 2425 | } |
2792 | 2426 | ||
2793 | ioim->proc_rsp_data = bfa_ioim_lm_proc_rsp_data_dummy; | ||
2794 | bfa_cb_ioim_abort(ioim->bfa->bfad, ioim->dio); | 2427 | bfa_cb_ioim_abort(ioim->bfa->bfad, ioim->dio); |
2795 | } | 2428 | } |
2796 | 2429 | ||
@@ -3134,7 +2767,6 @@ bfa_ioim_attach(struct bfa_fcpim_s *fcpim) | |||
3134 | ioim->bfa = fcpim->bfa; | 2767 | ioim->bfa = fcpim->bfa; |
3135 | ioim->fcpim = fcpim; | 2768 | ioim->fcpim = fcpim; |
3136 | ioim->iosp = iosp; | 2769 | ioim->iosp = iosp; |
3137 | ioim->proc_rsp_data = bfa_ioim_lm_proc_rsp_data_dummy; | ||
3138 | INIT_LIST_HEAD(&ioim->sgpg_q); | 2770 | INIT_LIST_HEAD(&ioim->sgpg_q); |
3139 | bfa_reqq_winit(&ioim->iosp->reqq_wait, | 2771 | bfa_reqq_winit(&ioim->iosp->reqq_wait, |
3140 | bfa_ioim_qresume, ioim); | 2772 | bfa_ioim_qresume, ioim); |
@@ -3172,7 +2804,6 @@ bfa_ioim_isr(struct bfa_s *bfa, struct bfi_msg_s *m) | |||
3172 | evt = BFA_IOIM_SM_DONE; | 2804 | evt = BFA_IOIM_SM_DONE; |
3173 | else | 2805 | else |
3174 | evt = BFA_IOIM_SM_COMP; | 2806 | evt = BFA_IOIM_SM_COMP; |
3175 | ioim->proc_rsp_data(ioim); | ||
3176 | break; | 2807 | break; |
3177 | 2808 | ||
3178 | case BFI_IOIM_STS_TIMEDOUT: | 2809 | case BFI_IOIM_STS_TIMEDOUT: |
@@ -3208,7 +2839,6 @@ bfa_ioim_isr(struct bfa_s *bfa, struct bfi_msg_s *m) | |||
3208 | if (rsp->abort_tag != ioim->abort_tag) { | 2839 | if (rsp->abort_tag != ioim->abort_tag) { |
3209 | bfa_trc(ioim->bfa, rsp->abort_tag); | 2840 | bfa_trc(ioim->bfa, rsp->abort_tag); |
3210 | bfa_trc(ioim->bfa, ioim->abort_tag); | 2841 | bfa_trc(ioim->bfa, ioim->abort_tag); |
3211 | ioim->proc_rsp_data = bfa_ioim_lm_proc_rsp_data_dummy; | ||
3212 | return; | 2842 | return; |
3213 | } | 2843 | } |
3214 | 2844 | ||
@@ -3227,7 +2857,6 @@ bfa_ioim_isr(struct bfa_s *bfa, struct bfi_msg_s *m) | |||
3227 | WARN_ON(1); | 2857 | WARN_ON(1); |
3228 | } | 2858 | } |
3229 | 2859 | ||
3230 | ioim->proc_rsp_data = bfa_ioim_lm_proc_rsp_data_dummy; | ||
3231 | bfa_sm_send_event(ioim, evt); | 2860 | bfa_sm_send_event(ioim, evt); |
3232 | } | 2861 | } |
3233 | 2862 | ||
@@ -3246,15 +2875,7 @@ bfa_ioim_good_comp_isr(struct bfa_s *bfa, struct bfi_msg_s *m) | |||
3246 | 2875 | ||
3247 | bfa_ioim_cb_profile_comp(fcpim, ioim); | 2876 | bfa_ioim_cb_profile_comp(fcpim, ioim); |
3248 | 2877 | ||
3249 | if (bfa_get_lun_mask_status(bfa) != BFA_LUNMASK_ENABLED) { | 2878 | bfa_sm_send_event(ioim, BFA_IOIM_SM_COMP_GOOD); |
3250 | bfa_sm_send_event(ioim, BFA_IOIM_SM_COMP_GOOD); | ||
3251 | return; | ||
3252 | } | ||
3253 | |||
3254 | if (ioim->proc_rsp_data(ioim) == BFA_TRUE) | ||
3255 | bfa_sm_send_event(ioim, BFA_IOIM_SM_COMP_GOOD); | ||
3256 | else | ||
3257 | bfa_sm_send_event(ioim, BFA_IOIM_SM_COMP); | ||
3258 | } | 2879 | } |
3259 | 2880 | ||
3260 | /* | 2881 | /* |
@@ -3366,35 +2987,6 @@ bfa_ioim_free(struct bfa_ioim_s *ioim) | |||
3366 | void | 2987 | void |
3367 | bfa_ioim_start(struct bfa_ioim_s *ioim) | 2988 | bfa_ioim_start(struct bfa_ioim_s *ioim) |
3368 | { | 2989 | { |
3369 | struct scsi_cmnd *cmnd = (struct scsi_cmnd *)ioim->dio; | ||
3370 | struct bfa_lps_s *lps; | ||
3371 | enum bfa_ioim_lm_status status; | ||
3372 | struct scsi_lun scsilun; | ||
3373 | |||
3374 | if (bfa_get_lun_mask_status(ioim->bfa) == BFA_LUNMASK_ENABLED) { | ||
3375 | lps = BFA_IOIM_TO_LPS(ioim); | ||
3376 | int_to_scsilun(cmnd->device->lun, &scsilun); | ||
3377 | status = bfa_ioim_lm_check(ioim, lps, | ||
3378 | ioim->itnim->rport, scsilun); | ||
3379 | if (status == BFA_IOIM_LM_LUN_NOT_RDY) { | ||
3380 | bfa_sm_send_event(ioim, BFA_IOIM_SM_LM_LUN_NOT_RDY); | ||
3381 | bfa_stats(ioim->itnim, lm_lun_not_rdy); | ||
3382 | return; | ||
3383 | } | ||
3384 | |||
3385 | if (status == BFA_IOIM_LM_LUN_NOT_SUP) { | ||
3386 | bfa_sm_send_event(ioim, BFA_IOIM_SM_LM_LUN_NOT_SUP); | ||
3387 | bfa_stats(ioim->itnim, lm_lun_not_sup); | ||
3388 | return; | ||
3389 | } | ||
3390 | |||
3391 | if (status == BFA_IOIM_LM_RPL_DATA_CHANGED) { | ||
3392 | bfa_sm_send_event(ioim, BFA_IOIM_SM_LM_RPL_DC); | ||
3393 | bfa_stats(ioim->itnim, lm_rpl_data_changed); | ||
3394 | return; | ||
3395 | } | ||
3396 | } | ||
3397 | |||
3398 | bfa_ioim_cb_profile_start(ioim->fcpim, ioim); | 2990 | bfa_ioim_cb_profile_start(ioim->fcpim, ioim); |
3399 | 2991 | ||
3400 | /* | 2992 | /* |
diff --git a/drivers/scsi/bfa/bfa_fcpim.h b/drivers/scsi/bfa/bfa_fcpim.h index 1080bcb81cb..36f26da80f7 100644 --- a/drivers/scsi/bfa/bfa_fcpim.h +++ b/drivers/scsi/bfa/bfa_fcpim.h | |||
@@ -110,7 +110,6 @@ struct bfad_ioim_s; | |||
110 | struct bfad_tskim_s; | 110 | struct bfad_tskim_s; |
111 | 111 | ||
112 | typedef void (*bfa_fcpim_profile_t) (struct bfa_ioim_s *ioim); | 112 | typedef void (*bfa_fcpim_profile_t) (struct bfa_ioim_s *ioim); |
113 | typedef bfa_boolean_t (*bfa_ioim_lm_proc_rsp_data_t) (struct bfa_ioim_s *ioim); | ||
114 | 113 | ||
115 | struct bfa_fcpim_s { | 114 | struct bfa_fcpim_s { |
116 | struct bfa_s *bfa; | 115 | struct bfa_s *bfa; |
@@ -124,7 +123,6 @@ struct bfa_fcpim_s { | |||
124 | u32 path_tov; | 123 | u32 path_tov; |
125 | u16 q_depth; | 124 | u16 q_depth; |
126 | u8 reqq; /* Request queue to be used */ | 125 | u8 reqq; /* Request queue to be used */ |
127 | u8 lun_masking_pending; | ||
128 | struct list_head itnim_q; /* queue of active itnim */ | 126 | struct list_head itnim_q; /* queue of active itnim */ |
129 | struct list_head ioim_resfree_q; /* IOs waiting for f/w */ | 127 | struct list_head ioim_resfree_q; /* IOs waiting for f/w */ |
130 | struct list_head ioim_comp_q; /* IO global comp Q */ | 128 | struct list_head ioim_comp_q; /* IO global comp Q */ |
@@ -181,7 +179,6 @@ struct bfa_ioim_s { | |||
181 | u8 reqq; /* Request queue for I/O */ | 179 | u8 reqq; /* Request queue for I/O */ |
182 | u8 mode; /* IO is passthrough or not */ | 180 | u8 mode; /* IO is passthrough or not */ |
183 | u64 start_time; /* IO's Profile start val */ | 181 | u64 start_time; /* IO's Profile start val */ |
184 | bfa_ioim_lm_proc_rsp_data_t proc_rsp_data; /* RSP data adjust */ | ||
185 | }; | 182 | }; |
186 | 183 | ||
187 | struct bfa_ioim_sp_s { | 184 | struct bfa_ioim_sp_s { |
@@ -261,10 +258,6 @@ struct bfa_itnim_s { | |||
261 | (__ioim)->iotag |= k << BFA_IOIM_RETRY_TAG_OFFSET; \ | 258 | (__ioim)->iotag |= k << BFA_IOIM_RETRY_TAG_OFFSET; \ |
262 | } while (0) | 259 | } while (0) |
263 | 260 | ||
264 | #define BFA_IOIM_TO_LPS(__ioim) \ | ||
265 | BFA_LPS_FROM_TAG(BFA_LPS_MOD(__ioim->bfa), \ | ||
266 | __ioim->itnim->rport->rport_info.lp_tag) | ||
267 | |||
268 | static inline bfa_boolean_t | 261 | static inline bfa_boolean_t |
269 | bfa_ioim_maxretry_reached(struct bfa_ioim_s *ioim) | 262 | bfa_ioim_maxretry_reached(struct bfa_ioim_s *ioim) |
270 | { | 263 | { |
diff --git a/drivers/scsi/bfa/bfa_svc.h b/drivers/scsi/bfa/bfa_svc.h index 95adb86d376..b52cbb6bcd5 100644 --- a/drivers/scsi/bfa/bfa_svc.h +++ b/drivers/scsi/bfa/bfa_svc.h | |||
@@ -582,11 +582,6 @@ void bfa_cb_rport_qos_scn_prio(void *rport, | |||
582 | #define BFA_LP_TAG_INVALID 0xff | 582 | #define BFA_LP_TAG_INVALID 0xff |
583 | void bfa_rport_set_lunmask(struct bfa_s *bfa, struct bfa_rport_s *rp); | 583 | void bfa_rport_set_lunmask(struct bfa_s *bfa, struct bfa_rport_s *rp); |
584 | void bfa_rport_unset_lunmask(struct bfa_s *bfa, struct bfa_rport_s *rp); | 584 | void bfa_rport_unset_lunmask(struct bfa_s *bfa, struct bfa_rport_s *rp); |
585 | bfa_boolean_t bfa_rport_lunmask_active(struct bfa_rport_s *rp); | ||
586 | wwn_t bfa_rport_get_pwwn(struct bfa_s *bfa, struct bfa_rport_s *rp); | ||
587 | struct bfa_rport_s *bfa_rport_get_by_wwn(struct bfa_s *bfa, u16 vf_id, | ||
588 | wwn_t *lpwwn, wwn_t rpwwn); | ||
589 | void *bfa_cb_get_rp_by_wwn(void *arg, u16 vf_id, wwn_t *lpwwn, wwn_t rpwwn); | ||
590 | 585 | ||
591 | /* | 586 | /* |
592 | * bfa fcxp API functions | 587 | * bfa fcxp API functions |