When we get an SDB FIS with the 'N' bit set, we should send
an event to user space to indicate that there has been a
media change. The ahci host controller will send the
event via KOBJ_CHANGE uevent.
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@xxxxxxxxx>
+static void async_notify_thread(struct work_struct *work)
+{
+ struct ata_device *atadev =
+ container_of(work, struct ata_device, async_notify);
+
+ /*
+ * TBD - who should send this event? I couldn't find an
+ * easy way to map an ata_device to a genhd device, so
+ * decided maybe the ata host should send the event and
+ * allow user space to figure out what happened?
+ */
+ kobject_uevent(&atadev->ap->host->dev->kobj, KOBJ_CHANGE);
+}