aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
authorJens Axboe <jaxboe@fusionio.com>2011-05-20 14:33:15 -0400
committerJens Axboe <jaxboe@fusionio.com>2011-05-20 14:33:15 -0400
commit698567f3fa790fea37509a54dea855302dd88331 (patch)
tree7a1df976a0eb12cab03e82c18809a30d5482fee4 /drivers/ide
parentd70d0711edd8076ec2ce0ed109106e2df950681b (diff)
parent61c4f2c81c61f73549928dfd9f3e8f26aa36a8cf (diff)
Merge commit 'v2.6.39' into for-2.6.40/core
Since for-2.6.40/core was forked off the 2.6.39 devel tree, we've had churn in the core area that makes it difficult to handle patches for eg cfq or blk-throttle. Instead of requiring that they be based in older versions with bugs that have been fixed later in the rc cycle, merge in 2.6.39 final. Also fixes up conflicts in the below files. Conflicts: drivers/block/paride/pcd.c drivers/cdrom/viocd.c drivers/ide/ide-cd.c Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/ide-cd_ioctl.c6
-rw-r--r--drivers/ide/ide-gd.c7
2 files changed, 12 insertions, 1 deletions
diff --git a/drivers/ide/ide-cd_ioctl.c b/drivers/ide/ide-cd_ioctl.c
index 2a6bc50e8a41..02caa7dd51c8 100644
--- a/drivers/ide/ide-cd_ioctl.c
+++ b/drivers/ide/ide-cd_ioctl.c
@@ -79,6 +79,12 @@ int ide_cdrom_drive_status(struct cdrom_device_info *cdi, int slot_nr)
79 return CDS_DRIVE_NOT_READY; 79 return CDS_DRIVE_NOT_READY;
80} 80}
81 81
82/*
83 * ide-cd always generates media changed event if media is missing, which
84 * makes it impossible to use for proper event reporting, so disk->events
85 * is cleared to 0 and the following function is used only to trigger
86 * revalidation and never propagated to userland.
87 */
82unsigned int ide_cdrom_check_events_real(struct cdrom_device_info *cdi, 88unsigned int ide_cdrom_check_events_real(struct cdrom_device_info *cdi,
83 unsigned int clearing, int slot_nr) 89 unsigned int clearing, int slot_nr)
84{ 90{
diff --git a/drivers/ide/ide-gd.c b/drivers/ide/ide-gd.c
index c4ffd4888939..70ea8763567d 100644
--- a/drivers/ide/ide-gd.c
+++ b/drivers/ide/ide-gd.c
@@ -298,6 +298,12 @@ static unsigned int ide_gd_check_events(struct gendisk *disk,
298 return 0; 298 return 0;
299 } 299 }
300 300
301 /*
302 * The following is used to force revalidation on the first open on
303 * removeable devices, and never gets reported to userland as
304 * genhd->events is 0. This is intended as removeable ide disk
305 * can't really detect MEDIA_CHANGE events.
306 */
301 ret = drive->dev_flags & IDE_DFLAG_MEDIA_CHANGED; 307 ret = drive->dev_flags & IDE_DFLAG_MEDIA_CHANGED;
302 drive->dev_flags &= ~IDE_DFLAG_MEDIA_CHANGED; 308 drive->dev_flags &= ~IDE_DFLAG_MEDIA_CHANGED;
303 309
@@ -413,7 +419,6 @@ static int ide_gd_probe(ide_drive_t *drive)
413 if (drive->dev_flags & IDE_DFLAG_REMOVABLE) 419 if (drive->dev_flags & IDE_DFLAG_REMOVABLE)
414 g->flags = GENHD_FL_REMOVABLE; 420 g->flags = GENHD_FL_REMOVABLE;
415 g->fops = &ide_gd_ops; 421 g->fops = &ide_gd_ops;
416 g->events = DISK_EVENT_MEDIA_CHANGE;
417 add_disk(g); 422 add_disk(g);
418 return 0; 423 return 0;
419 424