mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
block: don't block events on excl write for non-optical devices
Disk event code automatically blocks events on excl write. This is primarily to avoid issuing polling commands while burning is in progress. This behavior doesn't fit other types of devices with removeable media where polling commands don't have adverse side effects and door locking usually doesn't exist. This patch introduces new genhd flag which controls the auto-blocking behavior and uses it to enable auto-blocking only on optical devices. Note for stable: 2.6.38 and later only Cc: [email protected] Signed-off-by: Tejun Heo <[email protected]> Reported-by: Kay Sievers <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
1196f8b814
commit
d4dc210f69
6 changed files with 16 additions and 10 deletions
|
|
@ -1781,7 +1781,7 @@ static int ide_cd_probe(ide_drive_t *drive)
|
|||
|
||||
ide_cd_read_toc(drive, &sense);
|
||||
g->fops = &idecd_ops;
|
||||
g->flags |= GENHD_FL_REMOVABLE;
|
||||
g->flags |= GENHD_FL_REMOVABLE | GENHD_FL_BLOCK_EVENTS_ON_EXCL_WRITE;
|
||||
g->events = DISK_EVENT_MEDIA_CHANGE;
|
||||
add_disk(g);
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue