2004-06-05 14:07:32

by Con Kolivas

[permalink] [raw]
Subject: [OT] Who has record no. of DriveReady SeekComplete DataRequest errors?

Well since 2.6.3 I think I've been getting the record number of

hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: ATAPI reset complete

errors from my cdrw on hdd; and it's only one drive's worth.


dmesg -s 32768 | grep DataRequest | wc -l
88

Note the -s 32768 is because my dmesg is so long due to the massive number of
seekcomplete errors :-)

Since the cdrw works fine after re-enabling dma I never really bothered to do
anything about it, but I'm just curious if anyone has a higher record ;-)

Con


2004-06-05 14:24:54

by Jan Dittmer

[permalink] [raw]
Subject: Re: [OT] Who has record no. of DriveReady SeekComplete DataRequest errors?

Con Kolivas wrote:
> Well since 2.6.3 I think I've been getting the record number of
>
> hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
> hdd: status error: error=0x00
> hdd: drive not ready for command
> hdd: ATAPI reset complete
>
> errors from my cdrw on hdd; and it's only one drive's worth.
>
>
> dmesg -s 32768 | grep DataRequest | wc -l
> 88

Same count here: (2.6.7-rc1)

$ dmesg -s 65536 | grep DataRequest | wc -l
88

I never bothered to report this, because it just kept working and I was
shuffling hardware at the same time. Don't really know with which kernel
release it started. Drive is a sony cdrw on hdc.

Jan


Attachments:
signature.asc (256.00 B)
OpenPGP digital signature

2004-06-05 18:01:46

by Steve Lee

[permalink] [raw]
Subject: Re: [OT] Who has record no. of DriveReady SeekComplete DataRequest errors?

>Well since 2.6.3 I think I've been getting the record number of
>
>hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
>hdd: status error: error=0x00
>hdd: drive not ready for command
>hdd: ATAPI reset complete
>
>errors from my cdrw on hdd; and it's only one drive's worth.


I've been witnessing almost exactly the same thing as you. I assumed,
perhaps falsely, that my AOpen CDRW was failing. I just recently
replaced it with a DVD-Rom drive and thus far have not seen these
errors.

hdd: status error: status=0x59 { DriveReady SeekComplete DataRequest
Error }
hdd: status error: error=0x20LastFailedSense 0x02
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: DMA disabled
hdd: drive not ready for command
hdd: ATAPI reset complete

Could this be a kernel bug? Please CC me as I'm no longer subscribed to
this list.

Thanks,
Steve


2004-06-06 09:28:36

by Jens Axboe

[permalink] [raw]
Subject: Re: [OT] Who has record no. of DriveReady SeekComplete DataRequest errors?

On Sun, Jun 06 2004, Con Kolivas wrote:
> Well since 2.6.3 I think I've been getting the record number of
>
> hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
> hdd: status error: error=0x00
> hdd: drive not ready for command
> hdd: ATAPI reset complete
>
> errors from my cdrw on hdd; and it's only one drive's worth.
>
>
> dmesg -s 32768 | grep DataRequest | wc -l
> 88
>
> Note the -s 32768 is because my dmesg is so long due to the massive
> number of seekcomplete errors :-)
>
> Since the cdrw works fine after re-enabling dma I never really
> bothered to do anything about it, but I'm just curious if anyone has a
> higher record ;-)

Interesting, and 2.6.2 works flawlessly? The only change in 2.6.3 wrt
ide-cd is the addition of the != 2kB sector size support from Pascal
Schmidt. A quick guess would be that blocklen isn't set, does this
change anything for you?

===== drivers/ide/ide-cd.c 1.83 vs edited =====
--- 1.83/drivers/ide/ide-cd.c 2004-05-29 19:04:42 +02:00
+++ edited/drivers/ide/ide-cd.c 2004-06-06 11:27:51 +02:00
@@ -2205,6 +2205,8 @@
*capacity = 1 + be32_to_cpu(capbuf.lba);
*sectors_per_frame =
be32_to_cpu(capbuf.blocklen) >> SECTOR_BITS;
+ if (*sectors_per_frame == 0)
+ *sectors_per_frame = SECTORS_PER_FRAME;
}

return stat;

--
Jens Axboe

2004-06-06 10:38:46

by Con Kolivas

[permalink] [raw]
Subject: Re: [OT] Who has record no. of DriveReady SeekComplete DataRequest errors?

On Sun, 6 Jun 2004 19:28, Jens Axboe wrote:
> On Sun, Jun 06 2004, Con Kolivas wrote:
> > Well since 2.6.3 I think I've been getting the record number of
> >
> > hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
> > hdd: status error: error=0x00
> > hdd: drive not ready for command
> > hdd: ATAPI reset complete
> >
> > errors from my cdrw on hdd; and it's only one drive's worth.
> >
> >
> > dmesg -s 32768 | grep DataRequest | wc -l
> > 88
> >
> > Note the -s 32768 is because my dmesg is so long due to the massive
> > number of seekcomplete errors :-)
> >
> > Since the cdrw works fine after re-enabling dma I never really
> > bothered to do anything about it, but I'm just curious if anyone has a
> > higher record ;-)
>
> Interesting, and 2.6.2 works flawlessly? The only change in 2.6.3 wrt
> ide-cd is the addition of the != 2kB sector size support from Pascal
> Schmidt. A quick guess would be that blocklen isn't set, does this
> change anything for you?

Sorry, it didn't help, but thanks for the suggestion.

Con

P.S. Terribly sorry about the way I reported this bug; Although I originally
thought it was funny I think it was quite rude in retrospect.

2004-06-06 10:59:16

by Jens Axboe

[permalink] [raw]
Subject: Re: [OT] Who has record no. of DriveReady SeekComplete DataRequest errors?

On Sun, Jun 06 2004, Con Kolivas wrote:
> On Sun, 6 Jun 2004 19:28, Jens Axboe wrote:
> > On Sun, Jun 06 2004, Con Kolivas wrote:
> > > Well since 2.6.3 I think I've been getting the record number of
> > >
> > > hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
> > > hdd: status error: error=0x00
> > > hdd: drive not ready for command
> > > hdd: ATAPI reset complete
> > >
> > > errors from my cdrw on hdd; and it's only one drive's worth.
> > >
> > >
> > > dmesg -s 32768 | grep DataRequest | wc -l
> > > 88
> > >
> > > Note the -s 32768 is because my dmesg is so long due to the massive
> > > number of seekcomplete errors :-)
> > >
> > > Since the cdrw works fine after re-enabling dma I never really
> > > bothered to do anything about it, but I'm just curious if anyone has a
> > > higher record ;-)
> >
> > Interesting, and 2.6.2 works flawlessly? The only change in 2.6.3 wrt
> > ide-cd is the addition of the != 2kB sector size support from Pascal
> > Schmidt. A quick guess would be that blocklen isn't set, does this
> > change anything for you?
>
> Sorry, it didn't help, but thanks for the suggestion.

I'll take a better look then. Can you check if backing out the entire
change makes 2.6.7-rcX work? I've attached it for you.

> P.S. Terribly sorry about the way I reported this bug; Although I
> originally thought it was funny I think it was quite rude in
> retrospect.

I didn't think it was rude, just an odd report :)

===== drivers/ide/ide-cd.c 1.83 vs edited =====
--- 1.83/drivers/ide/ide-cd.c 2004-05-29 19:04:42 +02:00
+++ edited/drivers/ide/ide-cd.c 2004-06-06 12:56:28 +02:00
@@ -1182,9 +1172,6 @@
{
struct cdrom_info *info = drive->driver_data;
struct request *rq = HWGROUP(drive)->rq;
- unsigned short sectors_per_frame;
-
- sectors_per_frame = queue_hardsect_size(drive->queue) >> SECTOR_BITS;

/* Can't do anything if there's no buffer. */
if (info->buffer == NULL) return 0;
@@ -1223,7 +1210,7 @@
will fail. I think that this will never happen, but let's be
paranoid and check. */
if (rq->current_nr_sectors < bio_cur_sectors(rq->bio) &&
- (rq->sector & (sectors_per_frame - 1))) {
+ (rq->sector % SECTORS_PER_FRAME) != 0) {
printk("%s: cdrom_read_from_buffer: buffer botch (%ld)\n",
drive->name, (long)rq->sector);
cdrom_end_request(drive, 0);
@@ -1242,10 +1229,13 @@
static ide_startstop_t cdrom_start_read_continuation (ide_drive_t *drive)
{
struct request *rq = HWGROUP(drive)->rq;
- unsigned short sectors_per_frame;
- int nskip;
+ int nsect, sector, nframes, frame, nskip;

- sectors_per_frame = queue_hardsect_size(drive->queue) >> SECTOR_BITS;
+ /* Number of sectors to transfer. */
+ nsect = rq->nr_sectors;
+
+ /* Starting sector. */
+ sector = rq->sector;

/* If the requested sector doesn't start on a cdrom block boundary,
we must adjust the start of the transfer so that it does,
@@ -1254,19 +1244,31 @@
of the buffer, it will mean that we're to skip a number
of sectors equal to the amount by which CURRENT_NR_SECTORS
is larger than the buffer size. */
- nskip = rq->sector & (sectors_per_frame - 1);
+ nskip = (sector % SECTORS_PER_FRAME);
if (nskip > 0) {
/* Sanity check... */
if (rq->current_nr_sectors != bio_cur_sectors(rq->bio) &&
- (rq->sector & (sectors_per_frame - 1))) {
+ (rq->sector % CD_FRAMESIZE != 0)) {
printk ("%s: cdrom_start_read_continuation: buffer botch (%u)\n",
drive->name, rq->current_nr_sectors);
cdrom_end_request(drive, 0);
return ide_stopped;
}
+ sector -= nskip;
+ nsect += nskip;
rq->current_nr_sectors += nskip;
}

+ /* Convert from sectors to cdrom blocks, rounding up the transfer
+ length if needed. */
+ nframes = (nsect + SECTORS_PER_FRAME-1) / SECTORS_PER_FRAME;
+ frame = sector / SECTORS_PER_FRAME;
+
+ /* Largest number of frames was can transfer at once is 64k-1. For
+ some drives we need to limit this even more. */
+ nframes = MIN (nframes, (CDROM_CONFIG_FLAGS (drive)->limit_nframes) ?
+ (65534 / CD_FRAMESIZE) : 65535);
+
/* Set up the command */
rq->timeout = ATAPI_WAIT_PC;

@@ -1305,9 +1307,13 @@
static ide_startstop_t cdrom_start_seek_continuation (ide_drive_t *drive)
{
struct request *rq = HWGROUP(drive)->rq;
- sector_t frame = rq->sector;
+ int sector, frame, nskip;

- sector_div(frame, queue_hardsect_size(drive->queue) >> SECTOR_BITS);
+ sector = rq->sector;
+ nskip = (sector % SECTORS_PER_FRAME);
+ if (nskip > 0)
+ sector -= nskip;
+ frame = sector / SECTORS_PER_FRAME;

memset(rq->cmd, 0, sizeof(rq->cmd));
rq->cmd[0] = GPCMD_SEEK;
@@ -1351,9 +1357,6 @@
{
struct cdrom_info *info = drive->driver_data;
struct request *rq = HWGROUP(drive)->rq;
- unsigned short sectors_per_frame;
-
- sectors_per_frame = queue_hardsect_size(drive->queue) >> SECTOR_BITS;

/* We may be retrying this request after an error. Fix up
any weirdness which might be present in the request packet. */
@@ -1369,9 +1372,10 @@
info->nsectors_buffered = 0;

/* use dma, if possible. */
- info->dma = drive->using_dma;
- if ((rq->sector & (sectors_per_frame - 1)) ||
- (rq->nr_sectors & (sectors_per_frame - 1)))
+ if (drive->using_dma && (rq->sector % SECTORS_PER_FRAME == 0) &&
+ (rq->nr_sectors % SECTORS_PER_FRAME == 0))
+ info->dma = 1;
+ else
info->dma = 0;

info->cmd = READ;
@@ -1907,22 +1911,11 @@
static ide_startstop_t cdrom_start_write(ide_drive_t *drive, struct request *rq)
{
struct cdrom_info *info = drive->driver_data;
- struct gendisk *g = drive->disk;
- unsigned short sectors_per_frame = queue_hardsect_size(drive->queue) >> SECTOR_BITS;

/*
- * writes *must* be hardware frame aligned
+ * writes *must* be 2kB frame aligned
*/
- if ((rq->nr_sectors & (sectors_per_frame - 1)) ||
- (rq->sector & (sectors_per_frame - 1))) {
- cdrom_end_request(drive, 0);
- return ide_stopped;
- }
-
- /*
- * disk has become write protected
- */
- if (g->policy) {
+ if ((rq->nr_sectors & 3) || (rq->sector & 3)) {
cdrom_end_request(drive, 0);
return ide_stopped;
}
@@ -1937,12 +1930,12 @@

info->nsectors_buffered = 0;

- /* use dma, if possible. we don't need to check more, since we
- * know that the transfer is always (at least!) frame aligned */
+ /* use dma, if possible. we don't need to check more, since we
+ * know that the transfer is always (at least!) 2KB aligned */
info->dma = drive->using_dma ? 1 : 0;
info->cmd = WRITE;

- /* Start sending the write request to the drive. */
+ /* Start sending the read request to the drive. */
return cdrom_start_packet_command(drive, 32768, cdrom_start_write_cont);
}

@@ -2182,7 +2175,6 @@
}

static int cdrom_read_capacity(ide_drive_t *drive, unsigned long *capacity,
- unsigned long *sectors_per_frame,
struct request_sense *sense)
{
struct {
@@ -2201,11 +2193,8 @@
req.data_len = sizeof(capbuf);

stat = cdrom_queue_packet_command(drive, &req);
- if (stat == 0) {
+ if (stat == 0)
*capacity = 1 + be32_to_cpu(capbuf.lba);
- *sectors_per_frame =
- be32_to_cpu(capbuf.blocklen) >> SECTOR_BITS;
- }

return stat;
}
@@ -2247,7 +2236,6 @@
struct atapi_toc_entry ent;
} ms_tmp;
long last_written;
- unsigned long sectors_per_frame = SECTORS_PER_FRAME;

if (toc == NULL) {
/* Try to allocate space. */
@@ -2267,15 +2255,12 @@
if (CDROM_STATE_FLAGS(drive)->toc_valid)
return 0;

- /* Try to get the total cdrom capacity and sector size. */
- stat = cdrom_read_capacity(drive, &toc->capacity, &sectors_per_frame,
- sense);
+ /* Try to get the total cdrom capacity. */
+ stat = cdrom_read_capacity(drive, &toc->capacity, sense);
if (stat)
toc->capacity = 0x1fffff;

- set_capacity(drive->disk, toc->capacity * sectors_per_frame);
- blk_queue_hardsect_size(drive->queue,
- sectors_per_frame << SECTOR_BITS);
+ set_capacity(drive->disk, toc->capacity * SECTORS_PER_FRAME);

/* First read just the header, so we know how long the TOC is. */
stat = cdrom_read_tocentry(drive, 0, 1, 0, (char *) &toc->hdr,
@@ -2387,7 +2372,7 @@
stat = cdrom_get_last_written(cdi, &last_written);
if (!stat && (last_written > toc->capacity)) {
toc->capacity = last_written;
- set_capacity(drive->disk, toc->capacity * sectors_per_frame);
+ set_capacity(drive->disk, toc->capacity * SECTORS_PER_FRAME);
}

/* Remember that we've read this stuff. */
@@ -2826,10 +2811,6 @@
static
void ide_cdrom_release_real (struct cdrom_device_info *cdi)
{
- ide_drive_t *drive = cdi->handle;
-
- if (!cdi->use_count)
- CDROM_STATE_FLAGS(drive)->toc_valid = 0;
}


@@ -3297,12 +3278,12 @@
static
sector_t ide_cdrom_capacity (ide_drive_t *drive)
{
- unsigned long capacity, sectors_per_frame;
+ unsigned long capacity;

- if (cdrom_read_capacity(drive, &capacity, &sectors_per_frame, NULL))
+ if (cdrom_read_capacity(drive, &capacity, NULL))
return 0;

- return capacity * sectors_per_frame;
+ return capacity * SECTORS_PER_FRAME;
}

static

--
Jens Axboe

2004-06-06 11:05:57

by Con Kolivas

[permalink] [raw]
Subject: Re: [OT] Who has record no. of DriveReady SeekComplete DataRequest errors?

On Sun, 6 Jun 2004 20:58, Jens Axboe wrote:
> On Sun, Jun 06 2004, Con Kolivas wrote:
> > On Sun, 6 Jun 2004 19:28, Jens Axboe wrote:
> > > On Sun, Jun 06 2004, Con Kolivas wrote:
> > > > hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest
> > > > } hdd: status error: error=0x00
> > > > hdd: drive not ready for command
> > > > hdd: ATAPI reset complete
> I'll take a better look then. Can you check if backing out the entire
> change makes 2.6.7-rcX work? I've attached it for you.

drivers/ide/ide-cd.c: In function `cdrom_start_read_continuation':
drivers/ide/ide-cd.c:1279: warning: implicit declaration of function `MIN'

followed by
drivers/built-in.o(.text+0x687cf): In function
`cdrom_start_read_continuation':
drivers/ide/ide-cd.c:1279: undefined reference to `MIN'
make: *** [.tmp_vmlinux1] Error 1

Con

2004-06-06 11:10:56

by Jens Axboe

[permalink] [raw]
Subject: Re: [OT] Who has record no. of DriveReady SeekComplete DataRequest errors?

On Sun, Jun 06 2004, Con Kolivas wrote:
> On Sun, 6 Jun 2004 20:58, Jens Axboe wrote:
> > On Sun, Jun 06 2004, Con Kolivas wrote:
> > > On Sun, 6 Jun 2004 19:28, Jens Axboe wrote:
> > > > On Sun, Jun 06 2004, Con Kolivas wrote:
> > > > > hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest
> > > > > } hdd: status error: error=0x00
> > > > > hdd: drive not ready for command
> > > > > hdd: ATAPI reset complete
> > I'll take a better look then. Can you check if backing out the entire
> > change makes 2.6.7-rcX work? I've attached it for you.
>
> drivers/ide/ide-cd.c: In function `cdrom_start_read_continuation':
> drivers/ide/ide-cd.c:1279: warning: implicit declaration of function `MIN'
>
> followed by
> drivers/built-in.o(.text+0x687cf): In function
> `cdrom_start_read_continuation':
> drivers/ide/ide-cd.c:1279: undefined reference to `MIN'
> make: *** [.tmp_vmlinux1] Error 1

Ah fudge, can you make the obvious corrections and test that?

--
Jens Axboe

2004-06-06 11:37:46

by Con Kolivas

[permalink] [raw]
Subject: Re: [OT] Who has record no. of DriveReady SeekComplete DataRequest errors?

On Sun, 6 Jun 2004 21:10, Jens Axboe wrote:
> On Sun, Jun 06 2004, Con Kolivas wrote:
> > On Sun, 6 Jun 2004 20:58, Jens Axboe wrote:
> > > On Sun, Jun 06 2004, Con Kolivas wrote:
> > > > On Sun, 6 Jun 2004 19:28, Jens Axboe wrote:
> > > > > On Sun, Jun 06 2004, Con Kolivas wrote:
> > > > > > hdd: status error: status=0x58 { DriveReady SeekComplete
> > > > > > DataRequest } hdd: status error: error=0x00
> > > > > > hdd: drive not ready for command
> > > > > > hdd: ATAPI reset complete
> > >
> > > I'll take a better look then. Can you check if backing out the entire
> > > change makes 2.6.7-rcX work? I've attached it for you.
> >
> > drivers/ide/ide-cd.c: In function `cdrom_start_read_continuation':
> > drivers/ide/ide-cd.c:1279: warning: implicit declaration of function
> > `MIN'
> >
> > followed by
> > drivers/built-in.o(.text+0x687cf): In function
> > `cdrom_start_read_continuation':
> > drivers/ide/ide-cd.c:1279: undefined reference to `MIN'
> > make: *** [.tmp_vmlinux1] Error 1
>
> Ah fudge, can you make the obvious corrections and test that?

I sorted out the compile error but I still get my 88 errors.

Con

2004-06-06 11:52:00

by Con Kolivas

[permalink] [raw]
Subject: Re: [OT] Who has record no. of DriveReady SeekComplete DataRequest errors?

On Sun, 6 Jun 2004 21:37, Con Kolivas wrote:
> On Sun, 6 Jun 2004 21:10, Jens Axboe wrote:
> > On Sun, Jun 06 2004, Con Kolivas wrote:
> > > On Sun, 6 Jun 2004 20:58, Jens Axboe wrote:
> > > > On Sun, Jun 06 2004, Con Kolivas wrote:
> > > > > On Sun, 6 Jun 2004 19:28, Jens Axboe wrote:
> > > > > > On Sun, Jun 06 2004, Con Kolivas wrote:
> > > > > > > hdd: status error: status=0x58 { DriveReady SeekComplete
> > > > > > > DataRequest } hdd: status error: error=0x00
> > > > > > > hdd: drive not ready for command
> > > > > > > hdd: ATAPI reset complete
> > > >
> > > > I'll take a better look then. Can you check if backing out the entire
> > > > change makes 2.6.7-rcX work? I've attached it for you.
> > >
> > > drivers/ide/ide-cd.c: In function `cdrom_start_read_continuation':
> > > drivers/ide/ide-cd.c:1279: warning: implicit declaration of function
> > > `MIN'
> > >
> > > followed by
> > > drivers/built-in.o(.text+0x687cf): In function
> > > `cdrom_start_read_continuation':
> > > drivers/ide/ide-cd.c:1279: undefined reference to `MIN'
> > > make: *** [.tmp_vmlinux1] Error 1
> >
> > Ah fudge, can you make the obvious corrections and test that?
>
> I sorted out the compile error but I still get my 88 errors.

Ok I've gone and rebooted into all kernels from 2.6.0 to now and discovered I
was off by one sorry. The errors occur from 2.6.2 onwards. Hopefully that
helps?

Con

2004-06-06 12:12:21

by Pascal Schmidt

[permalink] [raw]
Subject: Re: [OT] Who has record no. of DriveReady SeekComplete DataRequest errors?

On Sun, 6 Jun 2004, Jens Axboe wrote:

> Interesting, and 2.6.2 works flawlessly? The only change in 2.6.3 wrt
> ide-cd is the addition of the != 2kB sector size support from Pascal
> Schmidt. A quick guess would be that blocklen isn't set, does this
> change anything for you?

Hmmm, another thing that just occured to me is that maybe some broken
drive might return the raw sector size, despite what the standard says.

> ===== drivers/ide/ide-cd.c 1.83 vs edited =====
> --- 1.83/drivers/ide/ide-cd.c 2004-05-29 19:04:42 +02:00
> +++ edited/drivers/ide/ide-cd.c 2004-06-06 11:27:51 +02:00
> @@ -2205,6 +2205,8 @@
> *capacity = 1 + be32_to_cpu(capbuf.lba);
> *sectors_per_frame =
> be32_to_cpu(capbuf.blocklen) >> SECTOR_BITS;
> + if (*sectors_per_frame == 0)
> + *sectors_per_frame = SECTORS_PER_FRAME;
> }
>
> return stat;

If this turns out to be the cause, maybe we should check that blocklen
isn't 0 and divisible by 512.

--
Ciao,
Pascal

2004-06-06 20:39:52

by Jens Axboe

[permalink] [raw]
Subject: Re: [OT] Who has record no. of DriveReady SeekComplete DataRequest errors?

On Sun, Jun 06 2004, Pascal Schmidt wrote:
> On Sun, 6 Jun 2004, Jens Axboe wrote:
>
> > Interesting, and 2.6.2 works flawlessly? The only change in 2.6.3 wrt
> > ide-cd is the addition of the != 2kB sector size support from Pascal
> > Schmidt. A quick guess would be that blocklen isn't set, does this
> > change anything for you?
>
> Hmmm, another thing that just occured to me is that maybe some broken
> drive might return the raw sector size, despite what the standard says.
>
> > ===== drivers/ide/ide-cd.c 1.83 vs edited =====
> > --- 1.83/drivers/ide/ide-cd.c 2004-05-29 19:04:42 +02:00
> > +++ edited/drivers/ide/ide-cd.c 2004-06-06 11:27:51 +02:00
> > @@ -2205,6 +2205,8 @@
> > *capacity = 1 + be32_to_cpu(capbuf.lba);
> > *sectors_per_frame =
> > be32_to_cpu(capbuf.blocklen) >> SECTOR_BITS;
> > + if (*sectors_per_frame == 0)
> > + *sectors_per_frame = SECTORS_PER_FRAME;
> > }
> >
> > return stat;
>
> If this turns out to be the cause, maybe we should check that blocklen
> isn't 0 and divisible by 512.

I could easily imagine some vendors not setting the field, but setting
it to some "buggy" value is far less likely. But might as well add the
check.

Con later confirmed that it was 2.6.2 that introduced the breakage, so
the patch isn't the culprit after all. There are a few seperate things
to look at there - Con, what are you doing when these messages trigger?
Is the drive permanently mounted, or does it happen on open?

--
Jens Axboe

2004-06-06 23:07:00

by Con Kolivas

[permalink] [raw]
Subject: Re: [OT] Who has record no. of DriveReady SeekComplete DataRequest errors?

On Mon, 7 Jun 2004 06:39, Jens Axboe wrote:
> I could easily imagine some vendors not setting the field, but setting
> it to some "buggy" value is far less likely. But might as well add the
> check.
>
> Con later confirmed that it was 2.6.2 that introduced the breakage, so
> the patch isn't the culprit after all. There are a few seperate things
> to look at there - Con, what are you doing when these messages trigger?
> Is the drive permanently mounted, or does it happen on open?

It only happens on boot and never again. During this part:
ICH4: IDE controller at PCI slot 0000:00:1f.1
ICH4: chipset revision 2
ICH4: not 100% native mode: will probe irqs later
ide0: BM-DMA at 0xf000-0xf007, BIOS settings: hda:DMA, hdb:DMA
ide1: BM-DMA at 0xf008-0xf00f, BIOS settings: hdc:DMA, hdd:DMA
hda: ST340014A, ATA DISK drive
hdb: ST340014A, ATA DISK drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
hdc: JLMS XJ-HD165H, ATAPI CD/DVD-ROM drive
hdd: RICOH CD-R/RW MP7163A, ATAPI CD/DVD-ROM drive
ide1 at 0x170-0x177,0x376 on irq 15
hda: max request size: 1024KiB
hda: 78165360 sectors (40020 MB) w/2048KiB Cache, CHS=16383/255/63, UDMA(100)
hda: hda1 hda2 < hda5 hda6 hda7 >
hdb: max request size: 1024KiB
hdb: 78165360 sectors (40020 MB) w/2048KiB Cache, CHS=16383/255/63, UDMA(100)
hdb: hdb2 < hdb5 hdb6 hdb7 >
hdc: ATAPI 48X DVD-ROM drive, 512kB Cache, UDMA(33)
Uniform CD-ROM driver Revision: 3.20
hdd: status error: status=0x59 { DriveReady SeekComplete DataRequest Error }
hdd: status error: error=0x20LastFailedSense 0x02
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
..etc

I'll try that other patch when I get a chance later today.

Con

2004-06-07 00:21:30

by Grant Byers

[permalink] [raw]
Subject: Re: [OT] Who has record no. of DriveReady SeekComplete DataRequest errors?

On Mon, Jun 07, 2004 at 09:06:46AM +1000, Con Kolivas wrote:
> On Mon, 7 Jun 2004 06:39, Jens Axboe wrote:
> > I could easily imagine some vendors not setting the field, but setting
> > it to some "buggy" value is far less likely. But might as well add the
> > check.
> >
> > Con later confirmed that it was 2.6.2 that introduced the breakage, so
> > the patch isn't the culprit after all. There are a few seperate things
> > to look at there - Con, what are you doing when these messages trigger?
> > Is the drive permanently mounted, or does it happen on open?
>
> It only happens on boot and never again. During this part:
> ICH4: IDE controller at PCI slot 0000:00:1f.1
> ICH4: chipset revision 2
> ICH4: not 100% native mode: will probe irqs later
> ide0: BM-DMA at 0xf000-0xf007, BIOS settings: hda:DMA, hdb:DMA
> ide1: BM-DMA at 0xf008-0xf00f, BIOS settings: hdc:DMA, hdd:DMA
> hda: ST340014A, ATA DISK drive
> hdb: ST340014A, ATA DISK drive
> ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
> hdc: JLMS XJ-HD165H, ATAPI CD/DVD-ROM drive
> hdd: RICOH CD-R/RW MP7163A, ATAPI CD/DVD-ROM drive
> ide1 at 0x170-0x177,0x376 on irq 15
> hda: max request size: 1024KiB
> hda: 78165360 sectors (40020 MB) w/2048KiB Cache, CHS=16383/255/63, UDMA(100)
> hda: hda1 hda2 < hda5 hda6 hda7 >
> hdb: max request size: 1024KiB
> hdb: 78165360 sectors (40020 MB) w/2048KiB Cache, CHS=16383/255/63, UDMA(100)
> hdb: hdb2 < hdb5 hdb6 hdb7 >
> hdc: ATAPI 48X DVD-ROM drive, 512kB Cache, UDMA(33)
> Uniform CD-ROM driver Revision: 3.20
> hdd: status error: status=0x59 { DriveReady SeekComplete DataRequest Error }
> hdd: status error: error=0x20LastFailedSense 0x02
> hdd: drive not ready for command
> hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
> hdd: status error: error=0x00
> ..etc

I can add that I also have a RICOH MP7163A that exhibits exact same
behaviour when booting or on modprobe with ide-cd and cdrom built as
modules.


Cheers,
Grant

2004-06-07 07:24:25

by Jens Axboe

[permalink] [raw]
Subject: Re: [OT] Who has record no. of DriveReady SeekComplete DataRequest errors?

On Mon, Jun 07 2004, Con Kolivas wrote:
> On Mon, 7 Jun 2004 06:39, Jens Axboe wrote:
> > I could easily imagine some vendors not setting the field, but setting
> > it to some "buggy" value is far less likely. But might as well add the
> > check.
> >
> > Con later confirmed that it was 2.6.2 that introduced the breakage, so
> > the patch isn't the culprit after all. There are a few seperate things
> > to look at there - Con, what are you doing when these messages trigger?
> > Is the drive permanently mounted, or does it happen on open?
>
> It only happens on boot and never again. During this part:
> ICH4: IDE controller at PCI slot 0000:00:1f.1
> ICH4: chipset revision 2
> ICH4: not 100% native mode: will probe irqs later
> ide0: BM-DMA at 0xf000-0xf007, BIOS settings: hda:DMA, hdb:DMA
> ide1: BM-DMA at 0xf008-0xf00f, BIOS settings: hdc:DMA, hdd:DMA
> hda: ST340014A, ATA DISK drive
> hdb: ST340014A, ATA DISK drive
> ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
> hdc: JLMS XJ-HD165H, ATAPI CD/DVD-ROM drive
> hdd: RICOH CD-R/RW MP7163A, ATAPI CD/DVD-ROM drive
> ide1 at 0x170-0x177,0x376 on irq 15
> hda: max request size: 1024KiB
> hda: 78165360 sectors (40020 MB) w/2048KiB Cache, CHS=16383/255/63, UDMA(100)
> hda: hda1 hda2 < hda5 hda6 hda7 >
> hdb: max request size: 1024KiB
> hdb: 78165360 sectors (40020 MB) w/2048KiB Cache, CHS=16383/255/63, UDMA(100)
> hdb: hdb2 < hdb5 hdb6 hdb7 >
> hdc: ATAPI 48X DVD-ROM drive, 512kB Cache, UDMA(33)
> Uniform CD-ROM driver Revision: 3.20
> hdd: status error: status=0x59 { DriveReady SeekComplete DataRequest Error }
> hdd: status error: error=0x20LastFailedSense 0x02
> hdd: drive not ready for command
> hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
> hdd: status error: error=0x00
> ..etc
>
> I'll try that other patch when I get a chance later today.

(which didn't make a difference, oddly. it's about the only thing
changed at module load time).

Con, please try with this debug patch.

===== drivers/ide/ide-cd.c 1.83 vs edited =====
--- 1.83/drivers/ide/ide-cd.c 2004-05-29 19:04:42 +02:00
+++ edited/drivers/ide/ide-cd.c 2004-06-07 09:23:41 +02:00
@@ -1548,9 +1548,14 @@

/* Start of retry loop. */
do {
- int error;
+ int error, i;
unsigned long time = jiffies;
rq->flags = flags;
+
+ printk("ide-cd: queueing cdb: ");
+ for (i = 0; i < 12; i++)
+ printk("%02x ", rq->cmd[i]);
+ printk("\n");

error = ide_do_drive_cmd(drive, rq, ide_wait);
time = jiffies - time;

--
Jens Axboe

2004-06-07 09:18:42

by Con Kolivas

[permalink] [raw]
Subject: Re: [OT] Who has record no. of DriveReady SeekComplete DataRequest errors?

On Mon, 7 Jun 2004 17:24, Jens Axboe wrote:
> On Mon, Jun 07 2004, Con Kolivas wrote:
> > hdd: status error: status=0x59 { DriveReady SeekComplete DataRequest
> > Error } hdd: status error: error=0x20LastFailedSense 0x02
> > hdd: drive not ready for command
> > hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
> > hdd: status error: error=0x00
> > ..etc
> Con, please try with this debug patch.

Here is the output:
hdd: RICOH CD-R/RW MP7163A, ATAPI CD/DVD-ROM drive
ide1 at 0x170-0x177,0x376 on irq 15
hda: max request size: 1024KiB
hda: 78165360 sectors (40020 MB) w/2048KiB Cache, CHS=16383/255/63, UDMA(100)
hda: hda1 hda2 < hda5 hda6 hda7 >
hdb: max request size: 1024KiB
hdb: 78165360 sectors (40020 MB) w/2048KiB Cache, CHS=16383/255/63, UDMA(100)
hdb: hdb2 < hdb5 hdb6 hdb7 >
ide-cd: queueing cdb: 5a 00 2a 00 00 00 00 00 18 00 00 00
ide-cd: queueing cdb: 46 00 00 28 00 00 00 00 10 00 00 00
ide-cd: queueing cdb: 5a 00 03 00 00 00 00 00 10 00 00 00
ide-cd: queueing cdb: 5a 00 2c 00 00 00 00 00 10 00 00 00
ide-cd: queueing cdb: 46 00 00 20 00 00 00 00 18 00 00 00
hdc: ATAPI 48X DVD-ROM drive, 512kB Cache, UDMA(33)
Uniform CD-ROM driver Revision: 3.20
ide-cd: queueing cdb: 00 00 00 00 00 00 00 00 00 00 00 00
ide-cd: queueing cdb: 25 00 00 00 00 00 00 00 00 00 00 00
ide-cd: queueing cdb: 43 02 00 00 00 00 00 00 04 00 00 00
ide-cd: queueing cdb: 5a 00 2a 00 00 00 00 00 18 00 00 00
ide-cd: queueing cdb: 46 00 00 28 00 00 00 00 10 00 00 00
hdd: status error: status=0x59 { DriveReady SeekComplete DataRequest Error }
hdd: status error: error=0x20LastFailedSense 0x02
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: DMA disabled
hdd: drive not ready for command
hdd: ATAPI reset complete


followed by

ide-cd: queueing cdb: 46 00 00 28 00 00 00 00 10 00 00 00

... repeat every so often until it comes to:

hdd: ATAPI 32X CD-ROM CD-R/RW drive, 2048kB Cache
ide-cd: queueing cdb: 00 00 00 00 00 00 00 00 00 00 00 00
ide-cd: queueing cdb: 25 00 00 00 00 00 00 00 00 00 00 00
ide-cd: queueing cdb: 43 02 00 00 00 00 00 00 04 00 00 00

and the errors stop at that point

Con

2004-06-07 09:36:35

by Jens Axboe

[permalink] [raw]
Subject: Re: [OT] Who has record no. of DriveReady SeekComplete DataRequest errors?

On Mon, Jun 07 2004, Con Kolivas wrote:
> On Mon, 7 Jun 2004 17:24, Jens Axboe wrote:
> > On Mon, Jun 07 2004, Con Kolivas wrote:
> > > hdd: status error: status=0x59 { DriveReady SeekComplete DataRequest
> > > Error } hdd: status error: error=0x20LastFailedSense 0x02
> > > hdd: drive not ready for command
> > > hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
> > > hdd: status error: error=0x00
> > > ..etc
> > Con, please try with this debug patch.
>
> Here is the output:
> hdd: RICOH CD-R/RW MP7163A, ATAPI CD/DVD-ROM drive
> ide1 at 0x170-0x177,0x376 on irq 15
> hda: max request size: 1024KiB
> hda: 78165360 sectors (40020 MB) w/2048KiB Cache, CHS=16383/255/63, UDMA(100)
> hda: hda1 hda2 < hda5 hda6 hda7 >
> hdb: max request size: 1024KiB
> hdb: 78165360 sectors (40020 MB) w/2048KiB Cache, CHS=16383/255/63, UDMA(100)
> hdb: hdb2 < hdb5 hdb6 hdb7 >
> ide-cd: queueing cdb: 5a 00 2a 00 00 00 00 00 18 00 00 00
> ide-cd: queueing cdb: 46 00 00 28 00 00 00 00 10 00 00 00
> ide-cd: queueing cdb: 5a 00 03 00 00 00 00 00 10 00 00 00
> ide-cd: queueing cdb: 5a 00 2c 00 00 00 00 00 10 00 00 00
> ide-cd: queueing cdb: 46 00 00 20 00 00 00 00 18 00 00 00
> hdc: ATAPI 48X DVD-ROM drive, 512kB Cache, UDMA(33)
> Uniform CD-ROM driver Revision: 3.20
> ide-cd: queueing cdb: 00 00 00 00 00 00 00 00 00 00 00 00
> ide-cd: queueing cdb: 25 00 00 00 00 00 00 00 00 00 00 00
> ide-cd: queueing cdb: 43 02 00 00 00 00 00 00 04 00 00 00
> ide-cd: queueing cdb: 5a 00 2a 00 00 00 00 00 18 00 00 00
> ide-cd: queueing cdb: 46 00 00 28 00 00 00 00 10 00 00 00
> hdd: status error: status=0x59 { DriveReady SeekComplete DataRequest Error }
> hdd: status error: error=0x20LastFailedSense 0x02
> hdd: drive not ready for command

Hmm, that is GET_CONFIGURATION with CDF_MRW as the feature - that must
have gone away if you disabled cdrom_is_mrw in ide-cd like I suggested,
did you botch that test?

Can you check if this changes the behaviour for you (should apply on -bk
as well):

--- linux-2.6.7-rc2-mm2/drivers/cdrom/cdrom.c~ 2004-06-03 22:21:51.000000000 +0200
+++ linux-2.6.7-rc2-mm2/drivers/cdrom/cdrom.c 2004-06-07 11:34:49.443151026 +0200
@@ -505,14 +505,34 @@
{
struct packet_command cgc;
struct mrw_feature_desc *mfd;
- unsigned char buffer[16];
- int ret;
+ struct feature_header *fh;
+ unsigned char buffer[32];
+ int ret, real_len;

- init_cdrom_command(&cgc, buffer, sizeof(buffer), CGC_DATA_READ);
+ init_cdrom_command(&cgc, buffer, 8, CGC_DATA_READ);
+
+ cgc.cmd[0] = GPCMD_GET_CONFIGURATION;
+ cgc.cmd[3] = CDF_MRW;
+ cgc.cmd[8] = 8;
+ cgc.quiet = 1;
+
+ /*
+ * probe length/existance first
+ */
+ if ((ret = cdi->ops->generic_packet(cdi, &cgc)))
+ return ret;
+
+ fh = (struct feature_header *) buffer;
+
+ if (!be32_to_cpu(fh->data_len))
+ return 1;
+
+ real_len = 4 + be32_to_cpu(fh->data_len);
+ init_cdrom_command(&cgc, buffer, real_len, CGC_DATA_READ);

cgc.cmd[0] = GPCMD_GET_CONFIGURATION;
cgc.cmd[3] = CDF_MRW;
- cgc.cmd[8] = sizeof(buffer);
+ cgc.cmd[8] = real_len;
cgc.quiet = 1;

if ((ret = cdi->ops->generic_packet(cdi, &cgc)))

--
Jens Axboe

2004-06-07 09:51:15

by Con Kolivas

[permalink] [raw]
Subject: Re: [OT] Who has record no. of DriveReady SeekComplete DataRequest errors?

On Mon, 7 Jun 2004 19:36, Jens Axboe wrote:
> On Mon, Jun 07 2004, Con Kolivas wrote:
> > On Mon, 7 Jun 2004 17:24, Jens Axboe wrote:
> > > On Mon, Jun 07 2004, Con Kolivas wrote:
> > > > hdd: status error: status=0x59 { DriveReady SeekComplete DataRequest
> > > > Error } hdd: status error: error=0x20LastFailedSense 0x02
> > > > hdd: drive not ready for command
> > > > hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest
> > > > } hdd: status error: error=0x00
> > > > ..etc
> > >
> > > Con, please try with this debug patch.
> >
> > Here is the output:
> > hdd: RICOH CD-R/RW MP7163A, ATAPI CD/DVD-ROM drive
> > ide1 at 0x170-0x177,0x376 on irq 15
> > hda: max request size: 1024KiB
> > hda: 78165360 sectors (40020 MB) w/2048KiB Cache, CHS=16383/255/63,
> > UDMA(100) hda: hda1 hda2 < hda5 hda6 hda7 >
> > hdb: max request size: 1024KiB
> > hdb: 78165360 sectors (40020 MB) w/2048KiB Cache, CHS=16383/255/63,
> > UDMA(100) hdb: hdb2 < hdb5 hdb6 hdb7 >
> > ide-cd: queueing cdb: 5a 00 2a 00 00 00 00 00 18 00 00 00
> > ide-cd: queueing cdb: 46 00 00 28 00 00 00 00 10 00 00 00
> > ide-cd: queueing cdb: 5a 00 03 00 00 00 00 00 10 00 00 00
> > ide-cd: queueing cdb: 5a 00 2c 00 00 00 00 00 10 00 00 00
> > ide-cd: queueing cdb: 46 00 00 20 00 00 00 00 18 00 00 00
> > hdc: ATAPI 48X DVD-ROM drive, 512kB Cache, UDMA(33)
> > Uniform CD-ROM driver Revision: 3.20
> > ide-cd: queueing cdb: 00 00 00 00 00 00 00 00 00 00 00 00
> > ide-cd: queueing cdb: 25 00 00 00 00 00 00 00 00 00 00 00
> > ide-cd: queueing cdb: 43 02 00 00 00 00 00 00 04 00 00 00
> > ide-cd: queueing cdb: 5a 00 2a 00 00 00 00 00 18 00 00 00
> > ide-cd: queueing cdb: 46 00 00 28 00 00 00 00 10 00 00 00
> > hdd: status error: status=0x59 { DriveReady SeekComplete DataRequest
> > Error } hdd: status error: error=0x20LastFailedSense 0x02
> > hdd: drive not ready for command
>
> Hmm, that is GET_CONFIGURATION with CDF_MRW as the feature - that must
> have gone away if you disabled cdrom_is_mrw in ide-cd like I suggested,
> did you botch that test?

I'm hopeless but not _that_ hopeless I hope.

> Can you check if this changes the behaviour for you (should apply on -bk
> as well):

no such luck

Uniform CD-ROM driver Revision: 3.20
hdd: status error: status=0x59 { DriveReady SeekComplete DataRequest Error }
hdd: status error: error=0x20LastFailedSense 0x02
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: DMA disabled

and so on.

Con

2004-06-07 09:54:23

by Jens Axboe

[permalink] [raw]
Subject: Re: [OT] Who has record no. of DriveReady SeekComplete DataRequest errors?

On Mon, Jun 07 2004, Con Kolivas wrote:
> On Mon, 7 Jun 2004 19:36, Jens Axboe wrote:
> > On Mon, Jun 07 2004, Con Kolivas wrote:
> > > On Mon, 7 Jun 2004 17:24, Jens Axboe wrote:
> > > > On Mon, Jun 07 2004, Con Kolivas wrote:
> > > > > hdd: status error: status=0x59 { DriveReady SeekComplete DataRequest
> > > > > Error } hdd: status error: error=0x20LastFailedSense 0x02
> > > > > hdd: drive not ready for command
> > > > > hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest
> > > > > } hdd: status error: error=0x00
> > > > > ..etc
> > > >
> > > > Con, please try with this debug patch.
> > >
> > > Here is the output:
> > > hdd: RICOH CD-R/RW MP7163A, ATAPI CD/DVD-ROM drive
> > > ide1 at 0x170-0x177,0x376 on irq 15
> > > hda: max request size: 1024KiB
> > > hda: 78165360 sectors (40020 MB) w/2048KiB Cache, CHS=16383/255/63,
> > > UDMA(100) hda: hda1 hda2 < hda5 hda6 hda7 >
> > > hdb: max request size: 1024KiB
> > > hdb: 78165360 sectors (40020 MB) w/2048KiB Cache, CHS=16383/255/63,
> > > UDMA(100) hdb: hdb2 < hdb5 hdb6 hdb7 >
> > > ide-cd: queueing cdb: 5a 00 2a 00 00 00 00 00 18 00 00 00
> > > ide-cd: queueing cdb: 46 00 00 28 00 00 00 00 10 00 00 00
> > > ide-cd: queueing cdb: 5a 00 03 00 00 00 00 00 10 00 00 00
> > > ide-cd: queueing cdb: 5a 00 2c 00 00 00 00 00 10 00 00 00
> > > ide-cd: queueing cdb: 46 00 00 20 00 00 00 00 18 00 00 00
> > > hdc: ATAPI 48X DVD-ROM drive, 512kB Cache, UDMA(33)
> > > Uniform CD-ROM driver Revision: 3.20
> > > ide-cd: queueing cdb: 00 00 00 00 00 00 00 00 00 00 00 00
> > > ide-cd: queueing cdb: 25 00 00 00 00 00 00 00 00 00 00 00
> > > ide-cd: queueing cdb: 43 02 00 00 00 00 00 00 04 00 00 00
> > > ide-cd: queueing cdb: 5a 00 2a 00 00 00 00 00 18 00 00 00
> > > ide-cd: queueing cdb: 46 00 00 28 00 00 00 00 10 00 00 00
> > > hdd: status error: status=0x59 { DriveReady SeekComplete DataRequest
> > > Error } hdd: status error: error=0x20LastFailedSense 0x02
> > > hdd: drive not ready for command
> >
> > Hmm, that is GET_CONFIGURATION with CDF_MRW as the feature - that must
> > have gone away if you disabled cdrom_is_mrw in ide-cd like I suggested,
> > did you botch that test?
>
> I'm hopeless but not _that_ hopeless I hope.

I don't see how that command gets generated if you commented out
cdrom_is_mrw() in ide-cd. It's the only place we call it, and it's the
only place that issues that command...

> > Can you check if this changes the behaviour for you (should apply on -bk
> > as well):
>
> no such luck
>
> Uniform CD-ROM driver Revision: 3.20
> hdd: status error: status=0x59 { DriveReady SeekComplete DataRequest Error }
> hdd: status error: error=0x20LastFailedSense 0x02
> hdd: drive not ready for command
> hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
> hdd: status error: error=0x00
> hdd: drive not ready for command
> hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
> hdd: status error: error=0x00
> hdd: drive not ready for command
> hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
> hdd: status error: error=0x00
> hdd: DMA disabled

Can you repeat with the debug cdrom_queue_packet_command() patch still
applied? Thanks!

--
Jens Axboe

2004-06-07 10:08:38

by Con Kolivas

[permalink] [raw]
Subject: Re: [OT] Who has record no. of DriveReady SeekComplete DataRequest errors?

On Mon, 7 Jun 2004 19:54, Jens Axboe wrote:
> I don't see how that command gets generated if you commented out
> cdrom_is_mrw() in ide-cd. It's the only place we call it, and it's the
> only place that issues that command...

Ok I get the picture :P

> Can you repeat with the debug cdrom_queue_packet_command() patch still
> applied? Thanks!

Here's the whole shebang in case I miss something:

hdd: RICOH CD-R/RW MP7163A, ATAPI CD/DVD-ROM drive
ide1 at 0x170-0x177,0x376 on irq 15
hda: max request size: 1024KiB
hda: 78165360 sectors (40020 MB) w/2048KiB Cache, CHS=16383/255/63, UDMA(100)
hda: hda1 hda2 < hda5 hda6 hda7 >
hdb: max request size: 1024KiB
hdb: 78165360 sectors (40020 MB) w/2048KiB Cache, CHS=16383/255/63, UDMA(100)
hdb: hdb2 < hdb5 hdb6 hdb7 >
ide-cd: queueing cdb: 5a 00 2a 00 00 00 00 00 18 00 00 00
ide-cd: queueing cdb: 46 00 00 28 00 00 00 00 08 00 00 00
ide-cd: queueing cdb: 46 00 00 28 00 00 00 00 44 00 00 00
ide-cd: queueing cdb: 5a 00 03 00 00 00 00 00 10 00 00 00
ide-cd: queueing cdb: 5a 00 2c 00 00 00 00 00 10 00 00 00
ide-cd: queueing cdb: 46 00 00 20 00 00 00 00 18 00 00 00
hdc: ATAPI 48X DVD-ROM drive, 512kB Cache, UDMA(33)
Uniform CD-ROM driver Revision: 3.20
ide-cd: queueing cdb: 00 00 00 00 00 00 00 00 00 00 00 00
ide-cd: queueing cdb: 25 00 00 00 00 00 00 00 00 00 00 00
ide-cd: queueing cdb: 43 02 00 00 00 00 00 00 04 00 00 00
ide-cd: queueing cdb: 5a 00 2a 00 00 00 00 00 18 00 00 00
ide-cd: queueing cdb: 46 00 00 28 00 00 00 00 08 00 00 00
hdd: status error: status=0x59 { DriveReady SeekComplete DataRequest Error }
hdd: status error: error=0x20LastFailedSense 0x02
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: DMA disabled
hdd: drive not ready for command
hdd: ATAPI reset complete
ide-cd: queueing cdb: 46 00 00 28 00 00 00 00 08 00 00 00
hdd: status error: status=0x59 { DriveReady SeekComplete DataRequest Error }
hdd: status error: error=0x20LastFailedSense 0x02
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: ATAPI reset complete
ide-cd: queueing cdb: 46 00 00 28 00 00 00 00 08 00 00 00
hdd: status error: status=0x59 { DriveReady SeekComplete DataRequest Error }
hdd: status error: error=0x20LastFailedSense 0x02
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: ATAPI reset complete
ide-cd: queueing cdb: 46 00 00 28 00 00 00 00 08 00 00 00
hdd: status error: status=0x59 { DriveReady SeekComplete DataRequest Error }
hdd: status error: error=0x20LastFailedSense 0x02
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: ATAPI reset complete
ide-cd: queueing cdb: 46 00 00 28 00 00 00 00 08 00 00 00
hdd: status error: status=0x59 { DriveReady SeekComplete DataRequest Error }
hdd: status error: error=0x20LastFailedSense 0x02
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: ATAPI reset complete
ide-cd: queueing cdb: 46 00 00 28 00 00 00 00 08 00 00 00
hdd: status error: status=0x59 { DriveReady SeekComplete DataRequest Error }
hdd: status error: error=0x20LastFailedSense 0x02
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: ATAPI reset complete
ide-cd: queueing cdb: 46 00 00 28 00 00 00 00 08 00 00 00
hdd: status error: status=0x59 { DriveReady SeekComplete DataRequest Error }
hdd: status error: error=0x20LastFailedSense 0x02
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: ATAPI reset complete
ide-cd: queueing cdb: 46 00 00 28 00 00 00 00 08 00 00 00
hdd: status error: status=0x59 { DriveReady SeekComplete DataRequest Error }
hdd: status error: error=0x20LastFailedSense 0x02
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: ATAPI reset complete
ide-cd: queueing cdb: 46 00 00 28 00 00 00 00 08 00 00 00
hdd: status error: status=0x59 { DriveReady SeekComplete DataRequest Error }
hdd: status error: error=0x20LastFailedSense 0x02
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: ATAPI reset complete
ide-cd: queueing cdb: 46 00 00 28 00 00 00 00 08 00 00 00
hdd: status error: status=0x59 { DriveReady SeekComplete DataRequest Error }
hdd: status error: error=0x20LastFailedSense 0x02
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: ATAPI reset complete
ide-cd: queueing cdb: 46 00 00 28 00 00 00 00 08 00 00 00
hdd: status error: status=0x59 { DriveReady SeekComplete DataRequest Error }
hdd: status error: error=0x20LastFailedSense 0x02
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: ATAPI reset complete
ide-cd: queueing cdb: 46 00 00 20 00 00 00 00 18 00 00 00
hdd: status error: status=0x59 { DriveReady SeekComplete DataRequest Error }
hdd: status error: error=0x20LastFailedSense 0x02
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: ATAPI reset complete
ide-cd: queueing cdb: 46 00 00 20 00 00 00 00 18 00 00 00
hdd: status error: status=0x59 { DriveReady SeekComplete DataRequest Error }
hdd: status error: error=0x20LastFailedSense 0x02
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: ATAPI reset complete
ide-cd: queueing cdb: 46 00 00 20 00 00 00 00 18 00 00 00
hdd: status error: status=0x59 { DriveReady SeekComplete DataRequest Error }
hdd: status error: error=0x20LastFailedSense 0x02
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: ATAPI reset complete
ide-cd: queueing cdb: 46 00 00 20 00 00 00 00 18 00 00 00
hdd: status error: status=0x59 { DriveReady SeekComplete DataRequest Error }
hdd: status error: error=0x20LastFailedSense 0x02
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: ATAPI reset complete
ide-cd: queueing cdb: 46 00 00 20 00 00 00 00 18 00 00 00
hdd: status error: status=0x59 { DriveReady SeekComplete DataRequest Error }
hdd: status error: error=0x20LastFailedSense 0x02
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: ATAPI reset complete
ide-cd: queueing cdb: 46 00 00 20 00 00 00 00 18 00 00 00
hdd: status error: status=0x59 { DriveReady SeekComplete DataRequest Error }
hdd: status error: error=0x20LastFailedSense 0x02
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: ATAPI reset complete
ide-cd: queueing cdb: 46 00 00 20 00 00 00 00 18 00 00 00
hdd: status error: status=0x59 { DriveReady SeekComplete DataRequest Error }
hdd: status error: error=0x20LastFailedSense 0x02
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: ATAPI reset complete
ide-cd: queueing cdb: 46 00 00 20 00 00 00 00 18 00 00 00
hdd: status error: status=0x59 { DriveReady SeekComplete DataRequest Error }
hdd: status error: error=0x20LastFailedSense 0x02
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: ATAPI reset complete
ide-cd: queueing cdb: 46 00 00 20 00 00 00 00 18 00 00 00
hdd: status error: status=0x59 { DriveReady SeekComplete DataRequest Error }
hdd: status error: error=0x20LastFailedSense 0x02
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: ATAPI reset complete
ide-cd: queueing cdb: 46 00 00 20 00 00 00 00 18 00 00 00
hdd: status error: status=0x59 { DriveReady SeekComplete DataRequest Error }
hdd: status error: error=0x20LastFailedSense 0x02
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: ATAPI reset complete
ide-cd: queueing cdb: 46 00 00 20 00 00 00 00 18 00 00 00
hdd: status error: status=0x59 { DriveReady SeekComplete DataRequest Error }
hdd: status error: error=0x20LastFailedSense 0x02
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdd: status error: error=0x00
hdd: drive not ready for command
hdd: ATAPI reset complete
hdd: ATAPI 32X CD-ROM CD-R/RW drive, 2048kB Cache
ide-cd: queueing cdb: 00 00 00 00 00 00 00 00 00 00 00 00
ide-cd: queueing cdb: 25 00 00 00 00 00 00 00 00 00 00 00
ide-cd: queueing cdb: 43 02 00 00 00 00 00 00 04 00 00 00

2004-06-07 10:17:39

by Jens Axboe

[permalink] [raw]
Subject: Re: [OT] Who has record no. of DriveReady SeekComplete DataRequest errors?

On Mon, Jun 07 2004, Con Kolivas wrote:
> On Mon, 7 Jun 2004 19:54, Jens Axboe wrote:
> > I don't see how that command gets generated if you commented out
> > cdrom_is_mrw() in ide-cd. It's the only place we call it, and it's the
> > only place that issues that command...
>
> Ok I get the picture :P

:)

> > Can you repeat with the debug cdrom_queue_packet_command() patch still
> > applied? Thanks!
>
> Here's the whole shebang in case I miss something:
>
> hdd: RICOH CD-R/RW MP7163A, ATAPI CD/DVD-ROM drive
> ide1 at 0x170-0x177,0x376 on irq 15
> hda: max request size: 1024KiB
> hda: 78165360 sectors (40020 MB) w/2048KiB Cache, CHS=16383/255/63, UDMA(100)
> hda: hda1 hda2 < hda5 hda6 hda7 >
> hdb: max request size: 1024KiB
> hdb: 78165360 sectors (40020 MB) w/2048KiB Cache, CHS=16383/255/63, UDMA(100)
> hdb: hdb2 < hdb5 hdb6 hdb7 >
> ide-cd: queueing cdb: 5a 00 2a 00 00 00 00 00 18 00 00 00
> ide-cd: queueing cdb: 46 00 00 28 00 00 00 00 08 00 00 00
> ide-cd: queueing cdb: 46 00 00 28 00 00 00 00 44 00 00 00
> ide-cd: queueing cdb: 5a 00 03 00 00 00 00 00 10 00 00 00
> ide-cd: queueing cdb: 5a 00 2c 00 00 00 00 00 10 00 00 00
> ide-cd: queueing cdb: 46 00 00 20 00 00 00 00 18 00 00 00
> hdc: ATAPI 48X DVD-ROM drive, 512kB Cache, UDMA(33)
> Uniform CD-ROM driver Revision: 3.20
> ide-cd: queueing cdb: 00 00 00 00 00 00 00 00 00 00 00 00
> ide-cd: queueing cdb: 25 00 00 00 00 00 00 00 00 00 00 00
> ide-cd: queueing cdb: 43 02 00 00 00 00 00 00 04 00 00 00
> ide-cd: queueing cdb: 5a 00 2a 00 00 00 00 00 18 00 00 00
> ide-cd: queueing cdb: 46 00 00 28 00 00 00 00 08 00 00 00
> hdd: status error: status=0x59 { DriveReady SeekComplete DataRequest Error }
> hdd: status error: error=0x20LastFailedSense 0x02
> hdd: drive not ready for command

So that didn't help at all... Hmm I wonder what to do about this. So
last failure was NOT_READY - does it make a difference if you have a
medium loaded or not?

--
Jens Axboe

2004-06-07 10:29:25

by Con Kolivas

[permalink] [raw]
Subject: Re: [OT] Who has record no. of DriveReady SeekComplete DataRequest errors?

On Mon, 7 Jun 2004 20:17, Jens Axboe wrote:
> So that didn't help at all... Hmm I wonder what to do about this. So
> last failure was NOT_READY - does it make a difference if you have a
> medium loaded or not?

Indeed it does:

hdd: RICOH CD-R/RW MP7163A, ATAPI CD/DVD-ROM drive
ide1 at 0x170-0x177,0x376 on irq 15
hda: max request size: 1024KiB
hda: 78165360 sectors (40020 MB) w/2048KiB Cache, CHS=16383/255/63, UDMA(100)
hda: hda1 hda2 < hda5 hda6 hda7 >
hdb: max request size: 1024KiB
hdb: 78165360 sectors (40020 MB) w/2048KiB Cache, CHS=16383/255/63, UDMA(100)
hdb: hdb2 < hdb5 hdb6 hdb7 >
ide-cd: queueing cdb: 5a 00 2a 00 00 00 00 00 18 00 00 00
ide-cd: queueing cdb: 46 00 00 28 00 00 00 00 08 00 00 00
ide-cd: queueing cdb: 46 00 00 28 00 00 00 00 44 00 00 00
ide-cd: queueing cdb: 5a 00 03 00 00 00 00 00 10 00 00 00
ide-cd: queueing cdb: 5a 00 2c 00 00 00 00 00 10 00 00 00
ide-cd: queueing cdb: 46 00 00 20 00 00 00 00 18 00 00 00
hdc: ATAPI 48X DVD-ROM drive, 512kB Cache, UDMA(33)
Uniform CD-ROM driver Revision: 3.20
ide-cd: queueing cdb: 00 00 00 00 00 00 00 00 00 00 00 00
ide-cd: queueing cdb: 25 00 00 00 00 00 00 00 00 00 00 00
ide-cd: queueing cdb: 43 02 00 00 00 00 00 00 04 00 00 00
ide-cd: queueing cdb: 5a 00 2a 00 00 00 00 00 18 00 00 00
ide-cd: queueing cdb: 46 00 00 28 00 00 00 00 08 00 00 00
ide-cd: queueing cdb: 46 00 00 28 00 00 00 00 34 00 00 00
ide-cd: queueing cdb: 5a 00 03 00 00 00 00 00 10 00 00 00
ide-cd: queueing cdb: 5a 00 2c 00 00 00 00 00 10 00 00 00
ide-cd: queueing cdb: 46 00 00 20 00 00 00 00 18 00 00 00
hdd: ATAPI 32X CD-ROM CD-R/RW drive, 2048kB Cache, UDMA(33)
ide-cd: queueing cdb: 00 00 00 00 00 00 00 00 00 00 00 00
ide-cd: queueing cdb: 25 00 00 00 00 00 00 00 00 00 00 00
ide-cd: queueing cdb: 43 02 00 00 00 00 00 00 04 00 00 00
ide-cd: queueing cdb: 43 02 00 00 00 00 01 00 14 00 00 00
ide-cd: queueing cdb: 43 02 00 00 00 00 00 00 0c 40 00 00
ide-cd: queueing cdb: 51 00 00 00 00 00 00 00 02 00 00 00
ide-cd: queueing cdb: 51 00 00 00 00 00 00 00 22 00 00 00
ide-cd: queueing cdb: 52 01 00 00 00 01 00 00 08 00 00 00
ide-cd: queueing cdb: 52 01 00 00 00 01 00 00 1c 00 00 00

Con

2004-06-07 10:33:39

by Jens Axboe

[permalink] [raw]
Subject: Re: [OT] Who has record no. of DriveReady SeekComplete DataRequest errors?

On Mon, Jun 07 2004, Con Kolivas wrote:
> On Mon, 7 Jun 2004 20:17, Jens Axboe wrote:
> > So that didn't help at all... Hmm I wonder what to do about this. So
> > last failure was NOT_READY - does it make a difference if you have a
> > medium loaded or not?
>
> Indeed it does:

Great, I'll move the checks around then and postpone it until open time.
Best place to do it anyways. Thanks for your patient testing :-)

--
Jens Axboe

2004-06-07 16:29:57

by Jens Axboe

[permalink] [raw]
Subject: Re: [OT] Who has record no. of DriveReady SeekComplete DataRequest errors?

Hi Con,

Can you see if this works for you?

===== drivers/cdrom/cdrom.c 1.56 vs edited =====
--- 1.56/drivers/cdrom/cdrom.c 2004-06-05 09:25:29 +02:00
+++ edited/drivers/cdrom/cdrom.c 2004-06-07 18:28:17 +02:00
@@ -508,6 +508,8 @@
unsigned char buffer[16];
int ret;

+ *write = 0;
+
init_cdrom_command(&cgc, buffer, sizeof(buffer), CGC_DATA_READ);

cgc.cmd[0] = GPCMD_GET_CONFIGURATION;
@@ -521,8 +523,10 @@
mfd = (struct mrw_feature_desc *)&buffer[sizeof(struct feature_header)];
*write = mfd->write;

- if ((ret = cdrom_mrw_probe_pc(cdi)))
+ if ((ret = cdrom_mrw_probe_pc(cdi))) {
+ *write = 0;
return ret;
+ }

return 0;
}
@@ -826,8 +830,30 @@
*/
static int cdrom_open_write(struct cdrom_device_info *cdi)
{
+ int mrw, mrw_write, ram_write;
int ret = 1;

+ mrw = 0;
+ if (!cdrom_is_mrw(cdi, &mrw_write))
+ mrw = 1;
+
+ (void) cdrom_is_random_writable(cdi, &ram_write);
+
+ if (mrw)
+ cdi->mask &= ~CDC_MRW;
+ else
+ cdi->mask |= CDC_MRW;
+
+ if (mrw_write)
+ cdi->mask &= ~CDC_MRW_W;
+ else
+ cdi->mask |= CDC_MRW_W;
+
+ if (ram_write)
+ cdi->mask &= ~CDC_RAM;
+ else
+ cdi->mask |= CDC_RAM;
+
if (CDROM_CAN(CDC_MRW_W))
ret = cdrom_mrw_open_write(cdi);
else if (CDROM_CAN(CDC_DVD_RAM))
@@ -870,6 +896,9 @@
if ((fp->f_flags & O_NONBLOCK) && (cdi->options & CDO_USE_FFLAGS)) {
ret = cdi->ops->open(cdi, 1);
} else {
+ ret = open_for_data(cdi);
+ if (ret)
+ goto err;
if (fp->f_mode & FMODE_WRITE) {
ret = -EROFS;
if (!CDROM_CAN(CDC_RAM))
@@ -877,7 +906,6 @@
if (cdrom_open_write(cdi))
goto err;
}
- ret = open_for_data(cdi);
}

if (ret)
===== drivers/ide/ide-cd.c 1.83 vs edited =====
--- 1.83/drivers/ide/ide-cd.c 2004-05-29 19:04:42 +02:00
+++ edited/drivers/ide/ide-cd.c 2004-06-07 18:18:07 +02:00
@@ -2818,7 +2818,6 @@
return 0;
}

-
/*
* Close down the device. Invalidate all cached blocks.
*/
@@ -2892,12 +2891,6 @@
devinfo->mask |= CDC_CLOSE_TRAY;
if (!CDROM_CONFIG_FLAGS(drive)->mo_drive)
devinfo->mask |= CDC_MO_DRIVE;
- if (!CDROM_CONFIG_FLAGS(drive)->mrw)
- devinfo->mask |= CDC_MRW;
- if (!CDROM_CONFIG_FLAGS(drive)->mrw_w)
- devinfo->mask |= CDC_MRW_W;
- if (!CDROM_CONFIG_FLAGS(drive)->ram)
- devinfo->mask |= CDC_RAM;

devinfo->disk = drive->disk;
return register_cdrom(devinfo);
@@ -2934,7 +2927,7 @@
struct cdrom_info *info = drive->driver_data;
struct cdrom_device_info *cdi = &info->devinfo;
struct atapi_capabilities_page cap;
- int nslots = 1, mrw_write = 0, ram_write = 0;
+ int nslots = 1;

if (drive->media == ide_optical) {
CDROM_CONFIG_FLAGS(drive)->mo_drive = 1;
@@ -2963,17 +2956,6 @@
if (ide_cdrom_get_capabilities(drive, &cap))
return 0;

- if (!cdrom_is_mrw(cdi, &mrw_write)) {
- CDROM_CONFIG_FLAGS(drive)->mrw = 1;
- if (mrw_write) {
- CDROM_CONFIG_FLAGS(drive)->mrw_w = 1;
- CDROM_CONFIG_FLAGS(drive)->ram = 1;
- }
- }
- if (!cdrom_is_random_writable(cdi, &ram_write))
- if (ram_write)
- CDROM_CONFIG_FLAGS(drive)->ram = 1;
-
if (cap.lock == 0)
CDROM_CONFIG_FLAGS(drive)->no_doorlock = 1;
if (cap.eject)
@@ -3052,9 +3034,6 @@
printk(" CD%s%s",
(CDROM_CONFIG_FLAGS(drive)->cd_r)? "-R" : "",
(CDROM_CONFIG_FLAGS(drive)->cd_rw)? "/RW" : "");
-
- if (CDROM_CONFIG_FLAGS(drive)->mrw || CDROM_CONFIG_FLAGS(drive)->mrw_w)
- printk(" CD-MR%s", CDROM_CONFIG_FLAGS(drive)->mrw_w ? "W" : "");

if (CDROM_CONFIG_FLAGS(drive)->is_changer)
printk(" changer w/%d slots", nslots);
===== drivers/ide/ide-cd.h 1.10 vs edited =====
--- 1.10/drivers/ide/ide-cd.h 2004-04-23 21:09:53 +02:00
+++ edited/drivers/ide/ide-cd.h 2004-06-07 18:17:54 +02:00
@@ -79,8 +79,6 @@
__u8 dvd : 1; /* Drive is a DVD-ROM */
__u8 dvd_r : 1; /* Drive can write DVD-R */
__u8 dvd_ram : 1; /* Drive can write DVD-RAM */
- __u8 mrw : 1; /* drive can read mrw */
- __u8 mrw_w : 1; /* drive can write mrw */
__u8 ram : 1; /* generic WRITE (dvd-ram/mrw) */
__u8 test_write : 1; /* Drive can fake writes */
__u8 supp_disc_present : 1; /* Changer can report exact contents
===== drivers/scsi/sr.c 1.108 vs edited =====
--- 1.108/drivers/scsi/sr.c 2004-05-29 19:51:09 +02:00
+++ edited/drivers/scsi/sr.c 2004-06-07 18:18:30 +02:00
@@ -754,12 +754,11 @@
static void get_capabilities(struct scsi_cd *cd)
{
unsigned char *buffer;
- int rc, n, mrw_write = 0, mrw = 1,ram_write=0;
struct scsi_mode_data data;
struct scsi_request *SRpnt;
unsigned char cmd[MAX_COMMAND_SIZE];
unsigned int the_result;
- int retries;
+ int retries, rc, n;

static char *loadmech[] =
{
@@ -830,19 +829,6 @@
printk("%s: scsi-1 drive\n", cd->cdi.name);
return;
}
-
- if (cdrom_is_mrw(&cd->cdi, &mrw_write)) {
- mrw = 0;
- cd->cdi.mask |= CDC_MRW;
- cd->cdi.mask |= CDC_MRW_W;
- }
- if (!mrw_write)
- cd->cdi.mask |= CDC_MRW_W;
-
- if (cdrom_is_random_writable(&cd->cdi, &ram_write))
- cd->cdi.mask |= CDC_RAM;
- if (!ram_write)
- cd->cdi.mask |= CDC_RAM;

n = data.header_length + data.block_descriptor_length;
cd->cdi.speed = ((buffer[n + 8] << 8) + buffer[n + 9]) / 176;

--
Jens Axboe

2004-06-07 17:59:33

by Jan Dittmer

[permalink] [raw]
Subject: Re: [OT] Who has record no. of DriveReady SeekComplete DataRequest errors?

Jens Axboe wrote:
> Hi Con,
>
> Can you see if this works for you?

That fixes it.

Thanks,

Jan


Attachments:
signature.asc (256.00 B)
OpenPGP digital signature

2004-06-07 18:06:46

by Jens Axboe

[permalink] [raw]
Subject: Re: [OT] Who has record no. of DriveReady SeekComplete DataRequest errors?

On Mon, Jun 07 2004, Jan Dittmer wrote:
> Jens Axboe wrote:
> >Hi Con,
> >
> >Can you see if this works for you?
>
> That fixes it.

Great, thanks for testing.

--
Jens Axboe

2004-06-08 13:50:19

by Con Kolivas

[permalink] [raw]
Subject: Re: [OT] Who has record no. of DriveReady SeekComplete DataRequest errors?

On Tue, 8 Jun 2004 02:29, Jens Axboe wrote:
> Hi Con,

Yo

> Can you see if this works for you?

Yay

Verily Yay it does!

Thanks!!
Con