Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bc3f207

Browse files
Saurav Kashyapgregkh
authored andcommitted
scsi: qla2xxx: Changes to support FCP2 Target
[ Upstream commit 44c57f2 ] Add changes to support FCP2 Target. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Saurav Kashyap <[email protected]> Signed-off-by: Nilesh Javali <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent ba5eb0e commit bc3f207

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

drivers/scsi/qla2xxx/qla_dbg.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
* ----------------------------------------------------------------------
1313
* | Module Init and Probe | 0x0199 | |
1414
* | Mailbox commands | 0x1206 | 0x11a5-0x11ff |
15-
* | Device Discovery | 0x2134 | 0x210e-0x2116 |
16-
* | | | 0x211a |
15+
* | Device Discovery | 0x2134 | 0x210e-0x2115 |
1716
* | | | 0x211c-0x2128 |
1817
* | | | 0x212c-0x2134 |
1918
* | Queue Command and IO tracing | 0x3074 | 0x300b |

drivers/scsi/qla2xxx/qla_init.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1710,6 +1710,12 @@ void qla2x00_handle_rscn(scsi_qla_host_t *vha, struct event_arg *ea)
17101710

17111711
fcport = qla2x00_find_fcport_by_nportid(vha, &ea->id, 1);
17121712
if (fcport) {
1713+
if (fcport->flags & FCF_FCP2_DEVICE) {
1714+
ql_dbg(ql_dbg_disc, vha, 0x2115,
1715+
"Delaying session delete for FCP2 portid=%06x %8phC ",
1716+
fcport->d_id.b24, fcport->port_name);
1717+
return;
1718+
}
17131719
fcport->scan_needed = 1;
17141720
fcport->rscn_gen++;
17151721
}

drivers/scsi/qla2xxx/qla_os.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3955,6 +3955,16 @@ qla2x00_mark_all_devices_lost(scsi_qla_host_t *vha)
39553955
"Mark all dev lost\n");
39563956

39573957
list_for_each_entry(fcport, &vha->vp_fcports, list) {
3958+
if (fcport->loop_id != FC_NO_LOOP_ID &&
3959+
(fcport->flags & FCF_FCP2_DEVICE) &&
3960+
fcport->port_type == FCT_TARGET &&
3961+
!qla2x00_reset_active(vha)) {
3962+
ql_dbg(ql_dbg_disc, vha, 0x211a,
3963+
"Delaying session delete for FCP2 flags 0x%x port_type = 0x%x port_id=%06x %phC",
3964+
fcport->flags, fcport->port_type,
3965+
fcport->d_id.b24, fcport->port_name);
3966+
continue;
3967+
}
39583968
fcport->scan_state = 0;
39593969
qlt_schedule_sess_for_deletion(fcport);
39603970
}

0 commit comments

Comments
 (0)