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

Skip to content

Commit 5854771

Browse files
Armen BaloyanJames Bottomley
authored andcommitted
[SCSI] qla2xxx: Add ISPFX00 specific bus reset routine.
Signed-off-by: Armen Baloyan <[email protected]> Signed-off-by: Saurav Kashyap <[email protected]> Signed-off-by: James Bottomley <[email protected]>
1 parent e601d77 commit 5854771

File tree

4 files changed

+30
-4
lines changed

4 files changed

+30
-4
lines changed

drivers/scsi/qla2xxx/qla_dbg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
* | | | 0x70ad-0x70ae, |
3939
* | | | 0x70d1-0x70da, |
4040
* | | | 0x7047,0x703b |
41-
* | Task Management | 0x803c | 0x8025-0x8026 |
41+
* | Task Management | 0x803d | 0x8025-0x8026 |
4242
* | | | 0x800b,0x8039 |
4343
* | AER/EEH | 0x9011 | |
4444
* | Virtual Port | 0xa007 | |

drivers/scsi/qla2xxx/qla_gbl.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -605,6 +605,7 @@ extern void qlafx00_abort_iocb(srb_t *, struct abort_iocb_entry_fx00 *);
605605
extern void qlafx00_fxdisc_iocb(srb_t *, struct fxdisc_entry_fx00 *);
606606
extern void qlafx00_timer_routine(scsi_qla_host_t *);
607607
extern int qlafx00_rescan_isp(scsi_qla_host_t *);
608+
extern int qlafx00_loop_reset(scsi_qla_host_t *vha);
608609

609610
/* qla82xx related functions */
610611

drivers/scsi/qla2xxx/qla_mr.c

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -775,6 +775,29 @@ qlafx00_lun_reset(fc_port_t *fcport, unsigned int l, int tag)
775775
return qlafx00_async_tm_cmd(fcport, TCF_LUN_RESET, l, tag);
776776
}
777777

778+
int
779+
qlafx00_loop_reset(scsi_qla_host_t *vha)
780+
{
781+
int ret;
782+
struct fc_port *fcport;
783+
struct qla_hw_data *ha = vha->hw;
784+
785+
if (ql2xtargetreset) {
786+
list_for_each_entry(fcport, &vha->vp_fcports, list) {
787+
if (fcport->port_type != FCT_TARGET)
788+
continue;
789+
790+
ret = ha->isp_ops->target_reset(fcport, 0, 0);
791+
if (ret != QLA_SUCCESS) {
792+
ql_dbg(ql_dbg_taskm, vha, 0x803d,
793+
"Bus Reset failed: Reset=%d "
794+
"d_id=%x.\n", ret, fcport->d_id.b24);
795+
}
796+
}
797+
}
798+
return QLA_SUCCESS;
799+
}
800+
778801
int
779802
qlafx00_iospace_config(struct qla_hw_data *ha)
780803
{

drivers/scsi/qla2xxx/qla_os.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1303,6 +1303,10 @@ qla2x00_loop_reset(scsi_qla_host_t *vha)
13031303
struct fc_port *fcport;
13041304
struct qla_hw_data *ha = vha->hw;
13051305

1306+
if (IS_QLAFX00(ha)) {
1307+
return qlafx00_loop_reset(vha);
1308+
}
1309+
13061310
if (ql2xtargetreset == 1 && ha->flags.enable_target_reset) {
13071311
list_for_each_entry(fcport, &vha->vp_fcports, list) {
13081312
if (fcport->port_type != FCT_TARGET)
@@ -1311,14 +1315,12 @@ qla2x00_loop_reset(scsi_qla_host_t *vha)
13111315
ret = ha->isp_ops->target_reset(fcport, 0, 0);
13121316
if (ret != QLA_SUCCESS) {
13131317
ql_dbg(ql_dbg_taskm, vha, 0x802c,
1314-
"Bus Reset failed: Target Reset=%d "
1318+
"Bus Reset failed: Reset=%d "
13151319
"d_id=%x.\n", ret, fcport->d_id.b24);
13161320
}
13171321
}
13181322
}
13191323

1320-
if (IS_QLAFX00(ha))
1321-
return QLA_SUCCESS;
13221324

13231325
if (ha->flags.enable_lip_full_login && !IS_CNA_CAPABLE(ha)) {
13241326
atomic_set(&vha->loop_state, LOOP_DOWN);

0 commit comments

Comments
 (0)