[SCSI] qla2xxx: Add ISPFX00 specific bus reset routine.
authorArmen Baloyan <armen.baloyan@qlogic.com>
Tue, 27 Aug 2013 05:37:33 +0000 (01:37 -0400)
committerJames Bottomley <JBottomley@Parallels.com>
Tue, 3 Sep 2013 14:28:02 +0000 (07:28 -0700)
Signed-off-by: Armen Baloyan <armen.baloyan@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/qla2xxx/qla_dbg.c
drivers/scsi/qla2xxx/qla_gbl.h
drivers/scsi/qla2xxx/qla_mr.c
drivers/scsi/qla2xxx/qla_os.c

index aa10109d5e33a6dd25b07eabb9a9296896da6ee9..9d289a455503b70689a757042c34eb330540cf98 100644 (file)
@@ -38,7 +38,7 @@
  * |                              |                    | 0x70ad-0x70ae, |
  * |                              |                    | 0x70d1-0x70da, |
  * |                              |                    | 0x7047,0x703b |
- * | Task Management              |       0x803c       | 0x8025-0x8026  |
+ * | Task Management              |       0x803d       | 0x8025-0x8026  |
  * |                              |                    | 0x800b,0x8039  |
  * | AER/EEH                      |       0x9011       |               |
  * | Virtual Port                 |       0xa007       |               |
index 2fba354409ef197b956fec40a9ae40d6065dfb04..0730284ad967fd3848ae3766e43a66c46c1b64c9 100644 (file)
@@ -605,6 +605,7 @@ extern void qlafx00_abort_iocb(srb_t *, struct abort_iocb_entry_fx00 *);
 extern void qlafx00_fxdisc_iocb(srb_t *, struct fxdisc_entry_fx00 *);
 extern void qlafx00_timer_routine(scsi_qla_host_t *);
 extern int qlafx00_rescan_isp(scsi_qla_host_t *);
+extern int qlafx00_loop_reset(scsi_qla_host_t *vha);
 
 /* qla82xx related functions */
 
index 1aeb9e12c38baa9f82fc254bd566a93dfaf47158..be60a77e965108b606e0016b71a4967c19449cda 100644 (file)
@@ -775,6 +775,29 @@ qlafx00_lun_reset(fc_port_t *fcport, unsigned int l, int tag)
        return qlafx00_async_tm_cmd(fcport, TCF_LUN_RESET, l, tag);
 }
 
+int
+qlafx00_loop_reset(scsi_qla_host_t *vha)
+{
+       int ret;
+       struct fc_port *fcport;
+       struct qla_hw_data *ha = vha->hw;
+
+       if (ql2xtargetreset) {
+               list_for_each_entry(fcport, &vha->vp_fcports, list) {
+                       if (fcport->port_type != FCT_TARGET)
+                               continue;
+
+                       ret = ha->isp_ops->target_reset(fcport, 0, 0);
+                       if (ret != QLA_SUCCESS) {
+                               ql_dbg(ql_dbg_taskm, vha, 0x803d,
+                                   "Bus Reset failed: Reset=%d "
+                                   "d_id=%x.\n", ret, fcport->d_id.b24);
+                       }
+               }
+       }
+       return QLA_SUCCESS;
+}
+
 int
 qlafx00_iospace_config(struct qla_hw_data *ha)
 {
index f92b22bca7ea08744673ee4ef6f7d1fcd225ca36..3f53151734d3477e9dd17853a1e60f10cecca8be 100644 (file)
@@ -1303,6 +1303,10 @@ qla2x00_loop_reset(scsi_qla_host_t *vha)
        struct fc_port *fcport;
        struct qla_hw_data *ha = vha->hw;
 
+       if (IS_QLAFX00(ha)) {
+               return qlafx00_loop_reset(vha);
+       }
+
        if (ql2xtargetreset == 1 && ha->flags.enable_target_reset) {
                list_for_each_entry(fcport, &vha->vp_fcports, list) {
                        if (fcport->port_type != FCT_TARGET)
@@ -1311,14 +1315,12 @@ qla2x00_loop_reset(scsi_qla_host_t *vha)
                        ret = ha->isp_ops->target_reset(fcport, 0, 0);
                        if (ret != QLA_SUCCESS) {
                                ql_dbg(ql_dbg_taskm, vha, 0x802c,
-                                   "Bus Reset failed: Target Reset=%d "
+                                   "Bus Reset failed: Reset=%d "
                                    "d_id=%x.\n", ret, fcport->d_id.b24);
                        }
                }
        }
 
-       if (IS_QLAFX00(ha))
-               return QLA_SUCCESS;
 
        if (ha->flags.enable_lip_full_login && !IS_CNA_CAPABLE(ha)) {
                atomic_set(&vha->loop_state, LOOP_DOWN);