From: Florian Fainelli <f.fainelli@gmail.com>
To: bcm-kernel-feedback-list@broadcom.com
Cc: Florian Fainelli <f.fainelli@gmail.com>,
Tejun Heo <tj@kernel.org>, Kishon Vijay Abraham I <kishon@ti.com>,
Heiko Stuebner <heiko@sntech.de>,
Srinath Mannam <srinath.mannam@broadcom.com>,
Krzysztof Kozlowski <krzk@kernel.org>,
Vivek Gautam <vivek.gautam@codeaurora.org>,
Dan Carpenter <dan.carpenter@oracle.com>,
linux-ide@vger.kernel.org (open list:LIBATA SUBSYSTEM (Serial
and Parallel ATA drivers)),
linux-kernel@vger.kernel.org (open list)
Subject: [PATCH 1/3] ata: Allow having a port recovery callback
Date: Tue, 9 Jan 2018 15:04:55 -0800 [thread overview]
Message-ID: <1515539097-26742-2-git-send-email-f.fainelli@gmail.com> (raw)
In-Reply-To: <1515539097-26742-1-git-send-email-f.fainelli@gmail.com>
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@gmail.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
next prev parent reply other threads:[~2018-01-09 23:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-09 23:04 [PATCH 0/3] ata: ahci_brcm: Recover from failures to identify devices Florian Fainelli
2018-01-09 23:04 ` Florian Fainelli [this message]
2018-01-10 14:25 ` [PATCH 1/3] ata: Allow having a port recovery callback Tejun Heo
2018-01-10 17:53 ` Florian Fainelli
2018-01-10 16:02 ` Sergei Shtylyov
2018-01-09 23:04 ` [PATCH 2/3] phy: brcm-sata: Implementation calibrate callback Florian Fainelli
2018-01-09 23:04 ` [PATCH 3/3] ata: ahci_brcm: Recover from failures to identify devices Florian Fainelli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1515539097-26742-2-git-send-email-f.fainelli@gmail.com \
--to=f.fainelli@gmail.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=dan.carpenter@oracle.com \
--cc=heiko@sntech.de \
--cc=kishon@ti.com \
--cc=krzk@kernel.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=srinath.mannam@broadcom.com \
--cc=tj@kernel.org \
--cc=vivek.gautam@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®