mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 09:36:22 +02:00
ata: libata: Add an argument to ata_eh_reset()
Pass the ATA port pointer as first argument to ata_eh_reset(). No functionality has been changed. This patch prepares for enabling lock context analysis. Without this patch, lockdep_assert_held() statements would have to be added before each ata_eh_reset() call because the compiler doesn't know that ap->link.p == ap. See also ata_link_init(). Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Niklas Cassel <cassel@kernel.org>
This commit is contained in:
parent
ad66912899
commit
4b3c2ca268
|
|
@ -2831,10 +2831,9 @@ static bool ata_eh_followup_srst_needed(struct ata_link *link, int rc)
|
|||
return false;
|
||||
}
|
||||
|
||||
int ata_eh_reset(struct ata_link *link, int classify,
|
||||
int ata_eh_reset(struct ata_port *ap, struct ata_link *link, int classify,
|
||||
struct ata_reset_operations *reset_ops)
|
||||
{
|
||||
struct ata_port *ap = link->ap;
|
||||
struct ata_link *slave = ap->slave_link;
|
||||
struct ata_eh_context *ehc = &link->eh_context;
|
||||
struct ata_eh_context *sehc = slave ? &slave->eh_context : NULL;
|
||||
|
|
@ -3882,7 +3881,8 @@ int ata_eh_recover(struct ata_port *ap, struct ata_reset_operations *reset_ops,
|
|||
if (!(ehc->i.action & ATA_EH_RESET))
|
||||
continue;
|
||||
|
||||
rc = ata_eh_reset(link, ata_link_nr_vacant(link), reset_ops);
|
||||
rc = ata_eh_reset(ap, link, ata_link_nr_vacant(link),
|
||||
reset_ops);
|
||||
if (rc) {
|
||||
ata_link_err(link, "reset failed, giving up\n");
|
||||
goto out;
|
||||
|
|
|
|||
|
|
@ -777,7 +777,7 @@ static int sata_pmp_eh_recover_pmp(struct ata_port *ap,
|
|||
struct ata_link *tlink;
|
||||
|
||||
/* reset */
|
||||
rc = ata_eh_reset(link, 0, reset_ops);
|
||||
rc = ata_eh_reset(ap, link, 0, reset_ops);
|
||||
if (rc) {
|
||||
ata_link_err(link, "failed to reset PMP, giving up\n");
|
||||
goto fail;
|
||||
|
|
|
|||
|
|
@ -187,8 +187,8 @@ extern void ata_eh_done(struct ata_link *link, struct ata_device *dev,
|
|||
extern void ata_eh_autopsy(struct ata_port *ap);
|
||||
const char *ata_get_cmd_name(u8 command);
|
||||
extern void ata_eh_report(struct ata_port *ap);
|
||||
extern int ata_eh_reset(struct ata_link *link, int classify,
|
||||
struct ata_reset_operations *reset_ops);
|
||||
extern int ata_eh_reset(struct ata_port *ap, struct ata_link *link,
|
||||
int classify, struct ata_reset_operations *reset_ops);
|
||||
extern int ata_eh_recover(struct ata_port *ap,
|
||||
struct ata_reset_operations *reset_ops,
|
||||
struct ata_link **r_failed_disk);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user