lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220817072558.47163-1-arefev@swemel.ru>
Date:   Wed, 17 Aug 2022 10:25:58 +0300
From:   Denis Arefev <arefev@...mel.ru>
To:     "James E.J. Bottomley" <jejb@...ux.ibm.com>
Cc:     "Martin K. Petersen" <martin.petersen@...cle.com>,
        linux-scsi@...r.kernel.org (open list:SCSI SUBSYSTEM),
        linux-kernel@...r.kernel.org (open list),
        ldv-project@...uxtesting.org, trufanov@...mel.ru, vfh@...mel.ru
Subject: [PATCH] Add qlogicfas408_reset in qlogic_resume

Signed-off-by: Denis Arefev <arefev@...mel.ru>
---
 drivers/scsi/pcmcia/qlogic_stub.c |  2 +-
 drivers/scsi/qlogicfas408.c       | 19 +++++++++++++++++++
 drivers/scsi/qlogicfas408.h       |  1 +
 3 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/pcmcia/qlogic_stub.c b/drivers/scsi/pcmcia/qlogic_stub.c
index 828d53faf09a..710a0c35bf12 100644
--- a/drivers/scsi/pcmcia/qlogic_stub.c
+++ b/drivers/scsi/pcmcia/qlogic_stub.c
@@ -268,7 +268,7 @@ static int qlogic_resume(struct pcmcia_device *link)
 		outb(0x04, link->resource[0]->start + 0xd);
 	}
 	/* Ugggglllyyyy!!! */
-	qlogicfas408_host_reset(NULL);
+	qlogicfas408_reset(info->host);
 
 	return 0;
 }
diff --git a/drivers/scsi/qlogicfas408.c b/drivers/scsi/qlogicfas408.c
index 136681ad18a5..c5f9efe044e0 100644
--- a/drivers/scsi/qlogicfas408.c
+++ b/drivers/scsi/qlogicfas408.c
@@ -516,6 +516,24 @@ int qlogicfas408_host_reset(struct scsi_cmnd *cmd)
 	return SUCCESS;
 }
 
+/*
+ *	Reset SCSI bus
+ */
+
+int qlogicfas408_reset(struct  Scsi_Host *host)
+{
+	struct qlogicfas408_priv *priv = get_priv_by_host(host);
+	unsigned long flags;
+
+	priv->qabort = 2;
+
+	spin_lock_irqsave(host->host_lock, flags);
+	ql_zap(priv);
+	spin_unlock_irqrestore(host->host_lock, flags);
+
+	return SUCCESS;
+}
+
 /*
  *	Return info string
  */
@@ -608,6 +626,7 @@ EXPORT_SYMBOL(qlogicfas408_info);
 EXPORT_SYMBOL(qlogicfas408_queuecommand);
 EXPORT_SYMBOL(qlogicfas408_abort);
 EXPORT_SYMBOL(qlogicfas408_host_reset);
+EXPORT_SYMBOL(qlogicfas408_reset);
 EXPORT_SYMBOL(qlogicfas408_biosparam);
 EXPORT_SYMBOL(qlogicfas408_ihandl);
 EXPORT_SYMBOL(qlogicfas408_get_chip_type);
diff --git a/drivers/scsi/qlogicfas408.h b/drivers/scsi/qlogicfas408.h
index a971db11d293..593e59e1697e 100644
--- a/drivers/scsi/qlogicfas408.h
+++ b/drivers/scsi/qlogicfas408.h
@@ -110,6 +110,7 @@ int qlogicfas408_biosparam(struct scsi_device * disk,
 			   sector_t capacity, int ip[]);
 int qlogicfas408_abort(struct scsi_cmnd * cmd);
 extern int qlogicfas408_host_reset(struct scsi_cmnd *cmd);
+extern int qlogicfas408_reset(struct Scsi_Host *host);
 const char *qlogicfas408_info(struct Scsi_Host *host);
 int qlogicfas408_get_chip_type(int qbase, int int_type);
 void qlogicfas408_setup(int qbase, int id, int int_type);
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ