An end to CD-ROM polling (if you have a device that supports AN)...
hooray!
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
---
drivers/ata/libata-scsi.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index f752edd..e6d5627 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -773,6 +773,9 @@ static void ata_scsi_dev_config(struct scsi_device *sdev,
blk_queue_max_hw_segments(q, q->max_hw_segments - 1);
}
+ if (dev->flags & ATA_DFLAG_AN)
+ set_bit(SDEV_EVT_MEDIA_CHANGE, sdev->supported_events);
+
if (dev->flags & ATA_DFLAG_NCQ) {
int depth;
@@ -3225,10 +3228,11 @@ static void ata_scsi_handle_link_detach(struct ata_link *link)
*/
void ata_scsi_media_change_notify(struct ata_device *dev)
{
-#ifdef OTHER_AN_PATCHES_HAVE_BEEN_APPLIED
- if (dev->sdev)
- scsi_device_event_notify(dev->sdev, SDEV_MEDIA_CHANGE);
-#endif
+ if (dev->sdev) {
+ DECLARE_BITMAP(map, SDEV_EVT_MAXBITS);
+ __set_bit(SDEV_EVT_MEDIA_CHANGE, map);
+ sdev_evt_notify(dev->sdev, map);
+ }
}
/**
--
1.5.2.4
-
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Joe Perches | [PATCH 011/148] include/asm-x86/bug.h: checkpatch cleanups - formatting only |
| Greg KH | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Tony Lindgren | [PATCH 29/90] ARM: OMAP: Palm Tungsten|T support |
git: | |
| Jakub Narebski | Re: VCS comparison table |
| Linus Torvalds | Re: [kernel.org users] [RFD] On deprecating "git-foo" for builtins |
| Jon Smirl | ! [rejected] master -> master (non-fast forward) |
| Scott Chacon | Re: git-scm.com |
| Richard Stallman | Real men don't attack straw men |
| Christophe Rioux | OpenBSD as host for VMWare Server |
| Eduardo Meyer | OpenBGP "state change OpenSent -> Active, reason: Connection closed" trouble |
| Jerome Santos | sshd.config and AllowUsers |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Jiri Olsa | [PATCH] net: fix race in the receive/select |
| Wang Chen | [PATCH]&[Question] netdevice: Use netdev_priv() |
| Willy Tarreau | Re: [PATCH] tcp: splice as many packets as possible at once |
