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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue,  9 Jan 2018 15:04:55 -0800
From:   Florian Fainelli <f.fainelli@...il.com>
To:     bcm-kernel-feedback-list@...adcom.com
Cc:     Florian Fainelli <f.fainelli@...il.com>, Tejun Heo <tj@...nel.org>,
        Kishon Vijay Abraham I <kishon@...com>,
        Heiko Stuebner <heiko@...ech.de>,
        Srinath Mannam <srinath.mannam@...adcom.com>,
        Krzysztof Kozlowski <krzk@...nel.org>,
        Vivek Gautam <vivek.gautam@...eaurora.org>,
        Dan Carpenter <dan.carpenter@...cle.com>,
        linux-ide@...r.kernel.org (open list:LIBATA SUBSYSTEM (Serial and
        Parallel ATA drivers)), linux-kernel@...r.kernel.org (open list)
Subject: [PATCH 1/3] ata: Allow having a port recovery callback

Some AHCI controllers may need to recovery from a failure to identify a drive,
such as the Broadcom AHCI controller, make that possible at both the
libata-core.c and AHCI controller level such that we can provide such an error
recovery callback.

Signed-off-by: Florian Fainelli <f.fainelli@...il.com>
---
 drivers/ata/libata-core.c | 2 ++
 include/linux/libata.h    | 1 +
 2 files changed, 3 insertions(+)

diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 3c09122bf038..921c2813af07 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -2045,6 +2045,8 @@ int ata_dev_read_id(struct ata_device *dev, unsigned int *p_class,
 	if (ata_msg_warn(ap))
 		ata_dev_warn(dev, "failed to IDENTIFY (%s, err_mask=0x%x)\n",
 			     reason, err_mask);
+	if (ap->host->ops->port_recovery)
+		ap->host->ops->port_recovery(ap);
 	return rc;
 }
 
diff --git a/include/linux/libata.h b/include/linux/libata.h
index ed9826b21c5e..23646a557ab2 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -956,6 +956,7 @@ struct ata_port_operations {
 	int  (*port_resume)(struct ata_port *ap);
 	int  (*port_start)(struct ata_port *ap);
 	void (*port_stop)(struct ata_port *ap);
+	void (*port_recovery)(struct ata_port *ap);
 	void (*host_stop)(struct ata_host *host);
 
 #ifdef CONFIG_ATA_SFF
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ