summaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-scsi.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2007-09-23 13:14:11 +0900
committerJeff Garzik <jeff@garzik.org>2007-10-12 14:55:40 -0400
commit854c73a2f1c3bcc4aa88c25e208dc597e8efb795 (patch)
tree210569f3c4fa4f9413ceb0bc3fcf89648a9894b2 /drivers/ata/libata-scsi.c
parentc78968bb0f7714ceba1cdfa23714454fc98cefdf (diff)
libata: misc updates for AN
Update AN support in preparation of PMP support. * s/ata_id_has_AN/ata_id_has_atapi_AN/ * add AN enabled reporting during configuration * add err_mask to AN configuration failure reporting * update LOCKING comment for ata_scsi_media_change_notify() * check whether ATA dev is attached to SCSI dev ata_scsi_media_change_notify() * set ATA_FLAG_AN in ahci and sata_sil24 Signed-off-by: Tejun Heo <htejun@gmail.com> Cc: Kriten Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/libata-scsi.c')
-rw-r--r--drivers/ata/libata-scsi.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index 468d791a303..dc274001ddd 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -3238,12 +3238,13 @@ static void ata_scsi_handle_link_detach(struct ata_link *link)
* event.
*
* LOCKING:
- * interrupt context, may not sleep.
+ * spin_lock_irqsave(host lock)
*/
-void ata_scsi_media_change_notify(struct ata_device *atadev)
+void ata_scsi_media_change_notify(struct ata_device *dev)
{
#ifdef OTHER_AN_PATCHES_HAVE_BEEN_APPLIED
- scsi_device_event_notify(atadev->sdev, SDEV_MEDIA_CHANGE);
+ if (dev->sdev)
+ scsi_device_event_notify(dev->sdev, SDEV_MEDIA_CHANGE);
#endif
}
EXPORT_SYMBOL_GPL(ata_scsi_media_change_notify);