diff options
Diffstat (limited to 'drivers/ata/libata-scsi.c')
-rw-r--r-- | drivers/ata/libata-scsi.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 245057df69d6..94144ed50a6b 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c | |||
@@ -841,6 +841,9 @@ static void ata_scsi_dev_config(struct scsi_device *sdev, | |||
841 | blk_queue_max_hw_segments(q, q->max_hw_segments - 1); | 841 | blk_queue_max_hw_segments(q, q->max_hw_segments - 1); |
842 | } | 842 | } |
843 | 843 | ||
844 | if (dev->flags & ATA_DFLAG_AN) | ||
845 | set_bit(SDEV_EVT_MEDIA_CHANGE, sdev->supported_events); | ||
846 | |||
844 | if (dev->flags & ATA_DFLAG_NCQ) { | 847 | if (dev->flags & ATA_DFLAG_NCQ) { |
845 | int depth; | 848 | int depth; |
846 | 849 | ||
@@ -3296,10 +3299,9 @@ static void ata_scsi_handle_link_detach(struct ata_link *link) | |||
3296 | */ | 3299 | */ |
3297 | void ata_scsi_media_change_notify(struct ata_device *dev) | 3300 | void ata_scsi_media_change_notify(struct ata_device *dev) |
3298 | { | 3301 | { |
3299 | #ifdef OTHER_AN_PATCHES_HAVE_BEEN_APPLIED | ||
3300 | if (dev->sdev) | 3302 | if (dev->sdev) |
3301 | scsi_device_event_notify(dev->sdev, SDEV_MEDIA_CHANGE); | 3303 | sdev_evt_send_simple(dev->sdev, SDEV_EVT_MEDIA_CHANGE, |
3302 | #endif | 3304 | GFP_ATOMIC); |
3303 | } | 3305 | } |
3304 | 3306 | ||
3305 | /** | 3307 | /** |