aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/libata.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r--include/linux/libata.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index a1ceb5b67b9772..56971943d2610f 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -824,6 +824,19 @@ extern void ata_do_eh(struct ata_port *ap, ata_prereset_fn_t prereset,
(ehi)->desc_len = 0; \
} while (0)
+static inline void ata_ehi_hotplugged(struct ata_eh_info *ehi)
+{
+ if (ehi->flags & ATA_EHI_HOTPLUGGED)
+ return;
+
+ ehi->flags |= ATA_EHI_HOTPLUGGED;
+ ehi->hotplug_timestamp = jiffies;
+
+ ehi->err_mask |= AC_ERR_ATA_BUS;
+ ehi->action |= ATA_EH_SOFTRESET;
+ ehi->probe_mask |= (1 << ATA_MAX_DEVICES) - 1;
+}
+
/*
* qc helpers
*/