* IDE problems with rmmod ide-cd
@ 2005-04-28 16:44 Alan Cox
2005-04-28 17:25 ` Jens Axboe
0 siblings, 1 reply; 7+ messages in thread
From: Alan Cox @ 2005-04-28 16:44 UTC (permalink / raw)
To: axboe, Linux Kernel Mailing List
If you rmmod ide-cd in 2.6.12rc3 it issues a cache flush command to the
drive. Thankfully the bogus command this time is an ATAPI cache flush
not an ATA one so won't do any major harm but its still wrong as the
device is not a writer or packet mode capable (its a random DVD reader
holding a music CD)
Alan
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: IDE problems with rmmod ide-cd
2005-04-28 16:44 IDE problems with rmmod ide-cd Alan Cox
@ 2005-04-28 17:25 ` Jens Axboe
2005-04-28 20:46 ` Bartlomiej Zolnierkiewicz
2005-04-28 22:24 ` Alan Cox
0 siblings, 2 replies; 7+ messages in thread
From: Jens Axboe @ 2005-04-28 17:25 UTC (permalink / raw)
To: Alan Cox; +Cc: Linux Kernel Mailing List
On Thu, Apr 28 2005, Alan Cox wrote:
> If you rmmod ide-cd in 2.6.12rc3 it issues a cache flush command to the
> drive. Thankfully the bogus command this time is an ATAPI cache flush
> not an ATA one so won't do any major harm but its still wrong as the
> device is not a writer or packet mode capable (its a random DVD reader
> holding a music CD)
The problem you are thinking of was also an ATAPI cache flush command,
so I'm not so sure I would call it harmless... I haven't changed
anything in there recently, Bart?
--
Jens Axboe
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: IDE problems with rmmod ide-cd
2005-04-28 17:25 ` Jens Axboe
@ 2005-04-28 20:46 ` Bartlomiej Zolnierkiewicz
2005-04-28 21:51 ` Alan Cox
2005-04-28 22:24 ` Alan Cox
1 sibling, 1 reply; 7+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2005-04-28 20:46 UTC (permalink / raw)
To: Jens Axboe; +Cc: Alan Cox, Linux Kernel Mailing List
On 4/28/05, Jens Axboe <axboe@suse.de> wrote:
> On Thu, Apr 28 2005, Alan Cox wrote:
> > If you rmmod ide-cd in 2.6.12rc3 it issues a cache flush command to the
> > drive. Thankfully the bogus command this time is an ATAPI cache flush
> > not an ATA one so won't do any major harm but its still wrong as the
> > device is not a writer or packet mode capable (its a random DVD reader
> > holding a music CD)
>
> The problem you are thinking of was also an ATAPI cache flush command,
> so I'm not so sure I would call it harmless... I haven't changed
> anything in there recently, Bart?
I don't remember changing anything there recently.
Alan, please give more details of the issue.
Bartlomiej
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: IDE problems with rmmod ide-cd
2005-04-28 20:46 ` Bartlomiej Zolnierkiewicz
@ 2005-04-28 21:51 ` Alan Cox
2005-04-28 22:20 ` Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 7+ messages in thread
From: Alan Cox @ 2005-04-28 21:51 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz; +Cc: Jens Axboe, Linux Kernel Mailing List
On Iau, 2005-04-28 at 21:46, Bartlomiej Zolnierkiewicz wrote:
> > The problem you are thinking of was also an ATAPI cache flush command,
> > so I'm not so sure I would call it harmless... I haven't changed
> > anything in there recently, Bart?
>
> I don't remember changing anything there recently.
> Alan, please give more details of the issue.
Torvalds tree - head
Hardware is as follows
Promise IDE controller on ide0/1 - no drives
VIA IDE controller on ide2/3 - hdd is a DVD-ROM
and hdg is a disk.
hdd: TOSHIBA DVD-ROM SD-M1212
I had some code logging the commands issued and I did rmmod ide-cd. At
that point it sent a cache flush to the drive which then errorred it.
The actual log entry is
hdd: packet command error
Gives status=0x51, error=0x50
Dumping the error in detail its
Error;Illegal Request (Sense 0x05)
Invalid command operation code (0x20, 0x00)
The failed "Flush cache" packet command was
"35 00 00 00 00 00 ... 00"
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: IDE problems with rmmod ide-cd
2005-04-28 21:51 ` Alan Cox
@ 2005-04-28 22:20 ` Bartlomiej Zolnierkiewicz
0 siblings, 0 replies; 7+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2005-04-28 22:20 UTC (permalink / raw)
To: Alan Cox; +Cc: Jens Axboe, Linux Kernel Mailing List
On 4/28/05, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
> On Iau, 2005-04-28 at 21:46, Bartlomiej Zolnierkiewicz wrote:
> > > The problem you are thinking of was also an ATAPI cache flush command,
> > > so I'm not so sure I would call it harmless... I haven't changed
> > > anything in there recently, Bart?
> >
> > I don't remember changing anything there recently.
> > Alan, please give more details of the issue.
>
> Torvalds tree - head
>
> Hardware is as follows
> Promise IDE controller on ide0/1 - no drives
> VIA IDE controller on ide2/3 - hdd is a DVD-ROM
> and hdg is a disk.
>
> hdd: TOSHIBA DVD-ROM SD-M1212
>
> I had some code logging the commands issued and I did rmmod ide-cd. At
> that point it sent a cache flush to the drive which then errorred it.
>
> The actual log entry is
>
> hdd: packet command error
> Gives status=0x51, error=0x50
>
> Dumping the error in detail its
>
> Error;Illegal Request (Sense 0x05)
> Invalid command operation code (0x20, 0x00)
> The failed "Flush cache" packet command was
> "35 00 00 00 00 00 ... 00"
I would suggest auditing MRW support in cdrom.c.
IDE layer itself never sends GPCMD_FLUSH_CACHE.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: IDE problems with rmmod ide-cd
2005-04-28 17:25 ` Jens Axboe
2005-04-28 20:46 ` Bartlomiej Zolnierkiewicz
@ 2005-04-28 22:24 ` Alan Cox
2005-04-29 14:03 ` Alan Cox
1 sibling, 1 reply; 7+ messages in thread
From: Alan Cox @ 2005-04-28 22:24 UTC (permalink / raw)
To: Jens Axboe; +Cc: Linux Kernel Mailing List
On Iau, 2005-04-28 at 18:25, Jens Axboe wrote:
> The problem you are thinking of was also an ATAPI cache flush command,
> so I'm not so sure I would call it harmless... I haven't changed
> anything in there recently, Bart?
Eeep - I must admit to being somewhat baffled where it is coming from
too. Its occurring between the rmmod starting and the userspace
notifiers from the syslog ordering but I don't see anything that would
queue flushes on the IDE side. The power management does check and
issues WIN_FLUSH_CACHE* stuff. The cd layer only seems to issue it in
the dvd rw close path and that checks media written and mmc3 bits or in
places like cdrom_mrw_exit.
One possibility might be that the specific drive is incorrectly
reporting capabilities and register_cdrom is setting cdi->exit as a
result. Will try and work out what is going on there tomorrow.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: IDE problems with rmmod ide-cd
2005-04-28 22:24 ` Alan Cox
@ 2005-04-29 14:03 ` Alan Cox
0 siblings, 0 replies; 7+ messages in thread
From: Alan Cox @ 2005-04-29 14:03 UTC (permalink / raw)
To: Jens Axboe; +Cc: Linux Kernel Mailing List
On Iau, 2005-04-28 at 23:24, Alan Cox wrote:
> One possibility might be that the specific drive is incorrectly
> reporting capabilities and register_cdrom is setting cdi->exit as a
> result. Will try and work out what is going on there tomorrow.
Looks like a dumb bug in ide-cd. The error is coming from mrw_exit.
That gets called because ide-cd sets mask to 0 "I do everything" and
then subtracts features by checking drive bits. What it should do is set
the mask to every flag it knows about and then work back.
The ide-cd code doesn't know about CDC_MRW_W so its always a zero bit in
the mask, CDROM_CAN(CDC_MRW_W) is always true and cache flushes get
written.
Alan
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2005-04-29 14:04 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-28 16:44 IDE problems with rmmod ide-cd Alan Cox
2005-04-28 17:25 ` Jens Axboe
2005-04-28 20:46 ` Bartlomiej Zolnierkiewicz
2005-04-28 21:51 ` Alan Cox
2005-04-28 22:20 ` Bartlomiej Zolnierkiewicz
2005-04-28 22:24 ` Alan Cox
2005-04-29 14:03 ` Alan Cox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox