]> git.baikalelectronics.ru Git - kernel.git/commit
ide: unexport DISK_EVENT_MEDIA_CHANGE for ide-gd and ide-cd
authorTejun Heo <tj@kernel.org>
Thu, 21 Apr 2011 17:43:59 +0000 (19:43 +0200)
committerJens Axboe <jaxboe@fusionio.com>
Thu, 21 Apr 2011 17:43:59 +0000 (19:43 +0200)
commit5becfd980661aa2ae32174dc183d759863a26860
tree138c0ed198471151e2590fc3d35f56c5d57ba720
parent7f2c3e1923c19a8b6912d5d87ee5dd9e35702899
ide: unexport DISK_EVENT_MEDIA_CHANGE for ide-gd and ide-cd

check_events() implementations in both ide-gd and ide-cd are
inadequate for in-kernel event polling.  Both generate media change
events continuously when certain conditions are met causing infinite
event loop between the driver and userland event handler.

As disk event now supports suppression of unlisted events, simply
de-listing DISK_EVENT_MEDIA_CHANGE from disk->events resolves the
problem.  Internal handling around media revalidation will behave the
same while userland will fall back to userland event polling after
detecting the device doesn't support disk events.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Jens Axboe <jaxboe@fusionio.com>
Acked-by: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
drivers/ide/ide-cd.c
drivers/ide/ide-cd_ioctl.c
drivers/ide/ide-gd.c