[PATCH] cdrom: don't check CDC_PLAY_AUDIO in cdrom_count_tracks()

Previous thread: [PATCH 0/2] memcg: Reduce usage at change limit by KAMEZAWA Hiroyuki on Monday, June 16, 2008 - 11:31 pm. (12 messages)

Next thread: BUG: mmapfile/writev spurious zero bytes (x86_64/not i386, bisected, reproducable) by Bron Gondwana on Tuesday, June 17, 2008 - 2:00 am. (38 messages)
To: IDE/ATA development list <linux-ide@...>, Linux Kernel <linux-kernel@...>, Jens Axboe <jens.axboe@...>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@...>
Date: Tuesday, June 17, 2008 - 1:20 am

According to MMC-3 (or any later versions) READ TOCs are mandatory
commands and have nothing to do with CDC_PLAY_AUDIO. I have no idea
why the check was put there in the first place but it now only breaks
automatic actions on certain drives.

Note that this test was only effective when ide-cdrom was being used
as sr didn't mask CDC_PLAY_AUDIO according to the capabilities.

Signed-off-by: Tejun Heo <tj@kernel.org>
---
drivers/cdrom/cdrom.c | 4 ----
1 file changed, 4 deletions(-)

diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
index 69f26eb..11574c5 100644
--- a/drivers/cdrom/cdrom.c
+++ b/drivers/cdrom/cdrom.c
@@ -1491,10 +1491,6 @@ static void cdrom_count_tracks(struct cdrom_device_info *cdi, tracktype* tracks)
tracks->xa=0;
tracks->error=0;
cdinfo(CD_COUNT_TRACKS, "entering cdrom_count_tracks\n");
- if (!CDROM_CAN(CDC_PLAY_AUDIO)) {
- tracks->error=CDS_NO_INFO;
- return;
- }
/* Grab the TOC header so we can see how many tracks there are */
if ((ret = cdi->ops->audio_ioctl(cdi, CDROMREADTOCHDR, &header))) {
if (ret == -ENOMEDIUM)
--

To: Tejun Heo <tj@...>
Cc: IDE/ATA development list <linux-ide@...>, Linux Kernel <linux-kernel@...>, Jens Axboe <jens.axboe@...>, Borislav Petkov <petkovbb@...>
Date: Tuesday, June 17, 2008 - 5:43 am

--

To: Tejun Heo <tj@...>
Cc: IDE/ATA development list <linux-ide@...>, Linux Kernel <linux-kernel@...>, Bartlomiej Zolnierkiewicz <bzolnier@...>
Date: Tuesday, June 17, 2008 - 4:06 am

--
Jens Axboe

--

Previous thread: [PATCH 0/2] memcg: Reduce usage at change limit by KAMEZAWA Hiroyuki on Monday, June 16, 2008 - 11:31 pm. (12 messages)

Next thread: BUG: mmapfile/writev spurious zero bytes (x86_64/not i386, bisected, reproducable) by Bron Gondwana on Tuesday, June 17, 2008 - 2:00 am. (38 messages)