2002-11-03 08:54:42

by Leopold Gouverneur

[permalink] [raw]
Subject: Cdrom broken in bk current?

I see the following during booting:
...
end_request: I/O error, dev hdc, sector 0
hdc: ATAPI 40X CD-ROM CD-R/RW drive, 2048kB Cache, DMA
Uniform CD-ROM driver Revision: 3.12
end_request: I/O error, dev hdc, sector 0
end_request: I/O error, dev hdd, sector 0
end_request: I/O error, dev hdd, sector 0
hdd: ATAPI 16X CD-ROM drive, 256kB Cache, DMA
...

If I mount /dev/hd[cd], the system freezes completly.

This was not present in 2.5.42 IRC
ny help?


2002-11-03 09:36:48

by Jens Axboe

[permalink] [raw]
Subject: Re: Cdrom broken in bk current?

On Sun, Nov 03 2002, Leopold Gouverneur wrote:
> I see the following during booting:
> ...
> end_request: I/O error, dev hdc, sector 0
> hdc: ATAPI 40X CD-ROM CD-R/RW drive, 2048kB Cache, DMA
> Uniform CD-ROM driver Revision: 3.12
> end_request: I/O error, dev hdc, sector 0
> end_request: I/O error, dev hdd, sector 0
> end_request: I/O error, dev hdd, sector 0
> hdd: ATAPI 16X CD-ROM drive, 256kB Cache, DMA
> ...
>
> If I mount /dev/hd[cd], the system freezes completly.
>
> This was not present in 2.5.42 IRC
> ny help?

Try with this patch.

--
Jens Axboe


Attachments:
(No filename) (566.00 B)
idecd-cdb-size-2 (1.07 kB)
Download all attachments

2002-11-05 00:27:53

by Leopold Gouverneur

[permalink] [raw]
Subject: Re: Cdrom broken in bk current?

On Sun, Nov 03, 2002 at 10:43:06AM +0100, Jens Axboe wrote:
> On Sun, Nov 03 2002, Leopold Gouverneur wrote:
> > I see the following during booting:
> > ...
> > end_request: I/O error, dev hdc, sector 0
> > hdc: ATAPI 40X CD-ROM CD-R/RW drive, 2048kB Cache, DMA
> > Uniform CD-ROM driver Revision: 3.12
> > end_request: I/O error, dev hdc, sector 0
> > end_request: I/O error, dev hdd, sector 0
> > end_request: I/O error, dev hdd, sector 0
> > hdd: ATAPI 16X CD-ROM drive, 256kB Cache, DMA
> > ...
> >
> > If I mount /dev/hd[cd], the system freezes completly.
> >
> > This was not present in 2.5.42 IRC
> > ny help?
>
> Try with this patch.
>
> --
> Jens Axboe
>

> ===== drivers/ide/ide-cd.c 1.27 vs edited =====
> --- 1.27/drivers/ide/ide-cd.c Fri Oct 18 20:02:55 2002
> +++ edited/drivers/ide/ide-cd.c Sun Nov 3 10:33:17 2002
> @@ -310,6 +310,7 @@
> #include <linux/completion.h>
>
> #include <scsi/scsi.h> /* For SCSI -> ATAPI command conversion */
> +#include "../scsi/scsi.h"
>
> #include <asm/irq.h>
> #include <asm/io.h>
> @@ -877,10 +878,10 @@
> ide_handler_t *handler)
> {
> unsigned char *cmd_buf = rq->cmd;
> - int cmd_len = sizeof(rq->cmd);
> unsigned int timeout = rq->timeout;
> struct cdrom_info *info = drive->driver_data;
> ide_startstop_t startstop;
> + unsigned int cmd_len;
>
> if (CDROM_CONFIG_FLAGS(drive)->drq_interrupt) {
> /* Here we should have been called after receiving an interrupt
> @@ -902,6 +903,11 @@
>
> /* Arm the interrupt handler. */
> ide_set_handler(drive, handler, timeout, cdrom_timer_expiry);
> +
> + /* cdb length, pad upto the 12th byte if necessary */
> + cmd_len = COMMAND_SIZE(rq->cmd[0]);
> + if (cmd_len < 12)
> + cmd_len = 12;
>
> /* Send the command to the device. */
> HWIF(drive)->atapi_output_bytes(drive, cmd_buf, cmd_len);

I tried your patch without success. The problem is still there in 2.5.46

2002-11-05 06:57:54

by Jens Axboe

[permalink] [raw]
Subject: Re: Cdrom broken in bk current?

On Tue, Nov 05 2002, Leopold Gouverneur wrote:
> On Sun, Nov 03, 2002 at 10:43:06AM +0100, Jens Axboe wrote:
> > On Sun, Nov 03 2002, Leopold Gouverneur wrote:
> > > I see the following during booting:
> > > ...
> > > end_request: I/O error, dev hdc, sector 0
> > > hdc: ATAPI 40X CD-ROM CD-R/RW drive, 2048kB Cache, DMA
> > > Uniform CD-ROM driver Revision: 3.12
> > > end_request: I/O error, dev hdc, sector 0
> > > end_request: I/O error, dev hdd, sector 0
> > > end_request: I/O error, dev hdd, sector 0
> > > hdd: ATAPI 16X CD-ROM drive, 256kB Cache, DMA
> > > ...
> > >
> > > If I mount /dev/hd[cd], the system freezes completly.
> > >
> > > This was not present in 2.5.42 IRC
> > > ny help?
> >
> > Try with this patch.
> >
> > --
> > Jens Axboe
> >
>
> > ===== drivers/ide/ide-cd.c 1.27 vs edited =====
> > --- 1.27/drivers/ide/ide-cd.c Fri Oct 18 20:02:55 2002
> > +++ edited/drivers/ide/ide-cd.c Sun Nov 3 10:33:17 2002
> > @@ -310,6 +310,7 @@
> > #include <linux/completion.h>
> >
> > #include <scsi/scsi.h> /* For SCSI -> ATAPI command conversion */
> > +#include "../scsi/scsi.h"
> >
> > #include <asm/irq.h>
> > #include <asm/io.h>
> > @@ -877,10 +878,10 @@
> > ide_handler_t *handler)
> > {
> > unsigned char *cmd_buf = rq->cmd;
> > - int cmd_len = sizeof(rq->cmd);
> > unsigned int timeout = rq->timeout;
> > struct cdrom_info *info = drive->driver_data;
> > ide_startstop_t startstop;
> > + unsigned int cmd_len;
> >
> > if (CDROM_CONFIG_FLAGS(drive)->drq_interrupt) {
> > /* Here we should have been called after receiving an interrupt
> > @@ -902,6 +903,11 @@
> >
> > /* Arm the interrupt handler. */
> > ide_set_handler(drive, handler, timeout, cdrom_timer_expiry);
> > +
> > + /* cdb length, pad upto the 12th byte if necessary */
> > + cmd_len = COMMAND_SIZE(rq->cmd[0]);
> > + if (cmd_len < 12)
> > + cmd_len = 12;
> >
> > /* Send the command to the device. */
> > HWIF(drive)->atapi_output_bytes(drive, cmd_buf, cmd_len);
>
> I tried your patch without success. The problem is still there in 2.5.46

Please verify that 2.5.42 works correctly, and send me the boot log of
such a boot.

--
Jens Axboe