[PATCH] qla2xxx: Allow ATIO ring processing during reset w/ non-operational status

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx>

This patch addresses an issue between the assignment of vha->flags.online = 1
to signal operational status in process context via qla2x00_do_dpc() ->
qla2x00_abort_isp() -> qla2x00_restart_isp(), and processing of individual
ATIO packets in interrupt context within qla_tgt_24xx_process_atio_queue().
This was causing qla_tgt_24xx_process_atio_queue() to explictly ignore new
packets with non-operational status before completion of qla2x00_restart_isp()
-> target mode operation transition, and more specifically ELS packets that
are expected to drive the re-creation of active qla_tgt_sess nexuses in
qla_target.c + tcm_qla2xxx code.

It changes qla_tgt_24xx_process_atio_queue() code to no longer check for
vha->flags.online to determine operational status following Andrew's
recommendation, and in it's place adds a check for qla_tgt->tgt_stop to
ensure that new ATIO packets on the HW ring are (still) ignored during
qla_hw_data port shutdown.  Note this is change is required because it's
currently not possible to fully prevent MSI-X interrupt processing during
qla2x00_abort_isp() -> qla2x00_restart_isp() transition, and because
modern ISP hardware target mode is already operational via firmware_options
set in qla_tgt_2x00_config_nvram_stage1() before vha->flags.online = 1
assignment in qla2x00_abort_isp(), and subsequent qla_tgt_abort_isp()
-> qla2x00_send_enable_lun() + ha->isp_ops->enable_intrs() calls to
enable target mode for legacy (!IS_FWI2_CAPABLE()) hardware.

Reported-by: Roland Dreier <roland@xxxxxxxxxxxxxxx>
Cc: Roland Dreier <roland@xxxxxxxxxxxxxxx>
Reported-by: Patrick Lee <patrick@xxxxxxxxxxxxxxx>
Cc: Patrick Lee <patrick@xxxxxxxxxxxxxxx>
Cc: Andrew Vasquez <andrew.vasquez@xxxxxxxxxx>
Cc: Madhuranath Iyengar <mni@xxxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Nicholas Bellinger <nab@xxxxxxxxxxxxxxxxxxxxx>
---
 drivers/scsi/qla2xxx/qla_target.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c
index 75a466a..94f598b 100644
--- a/drivers/scsi/qla2xxx/qla_target.c
+++ b/drivers/scsi/qla2xxx/qla_target.c
@@ -5328,8 +5328,11 @@ qla_tgt_24xx_process_atio_queue(struct scsi_qla_host *vha)
 	struct device_reg_24xx __iomem *reg = &ha->iobase->isp24;
 	atio_t *pkt;
 	int cnt, i;
-
-	if (!vha->flags.online)
+	/*
+	 * Continue to process new packets during initialization, and
+	 * only ignore new packets during qla_tgt port shutdown..
+	 */
+	if (ha->qla_tgt->tgt_stop)
 		return;
 
 	while (ha->atio_ring_ptr->signature != ATIO_PROCESSED) {
-- 
1.7.2.5

--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux