![](https://seccdn.libravatar.org/avatar/48c2eea6e9bd06e5bc7de40723abc660.jpg?s=120&d=mm&r=g)
Dear Peter,
I has almost the same problem, when try to format a disk:
hdc: packet command error: status=0x51 { DriveReady SeekComplete Error }
hdc: packet command error: error=0x54
but my kernel version is 2.4.23, and with a CD writer: CD-W224EA, ATAPI CD/DVD-ROM drive.
Could you please see my previous post: Packet writing: cdrwtool -d /dev/hdc -q failed? Although some warm-hearted person give me some hints, I still can not work it out.
I have been tortured by it these days and really hope to get help from you.
Thank you in advance.
Best Regards,
kurt
Peter Osterlund
On Tue, 13 Jan 2004, Doug Holland wrote:
When I run dmesg, I get thousands of these error messages.
ide-cd: write_intr decode_status bad hdc: command error: status=0x51 { DriveReady SeekComplete Error } hdc: command error: error=0x54 end_request: I/O error, dev hdc, sector 5736 ide-cd: write_intr decode_status bad hdc: command error: status=0x51 { DriveReady SeekComplete Error } hdc: command error: error=0x54 end_request: I/O error, dev hdc, sector 5744 ide-cd: write_intr decode_status bad hdc: command error: status=0x51 { DriveReady SeekComplete Error } hdc: command error: error=0x54 ... Does anybody here have any ideas on how to get rid of these errors?
I don't know yet, but I have the same problem on one of my IDE drives (Sony CRX175A). I only have a problem when using native ide support in a 2.6 kernel. In 2.4 the drive works with both native ide and scsi emulation, and it also works with scsi emulation in 2.6.
I have another IDE drive (HP 8100) on the same ide channel which works perfectly with native ide in 2.6, so it can't be that packet writing using native ide is completely broken in 2.6.
I've found that the errors are caused by the seek commands generated by ide-cd. Increasing IDECD_SEEK_THRESHOLD to a very large value works for me (see patch below). With the standard threshold I get: ... cdrom_transfer_packet_command: 28 00 00 04 33 80 00 00 1e 00 00 00 cdrom_transfer_packet_command: 2b 00 00 00 01 27 00 00 00 00 00 00 cdrom_transfer_packet_command: 28 00 00 00 01 27 00 00 19 00 00 00 cdrom_transfer_packet_command: 28 00 00 00 01 07 00 00 0a 00 00 00 cdrom_transfer_packet_command: 28 00 00 00 00 13 00 00 0d 00 00 00 cdrom_transfer_packet_command: 28 00 00 00 00 00 00 00 10 00 00 00 cdrom_transfer_packet_command: 2a 00 00 00 00 00 00 00 20 00 00 00 cdrom_transfer_packet_command: 2b 00 00 00 01 00 00 00 00 00 00 00 ide-cd: media marked write protected hdc: command error: status=0x51 { DriveReady SeekComplete Error } hdc: command error: error=0x54 end_request: I/O error, dev hdc, sector 1024 cdrom_transfer_packet_command: 03 00 00 00 12 00 00 00 00 00 00 00 end_request: I/O error, dev hdc, sector 1032 ... With a bigger threshold, I could successfully write >100MB to a CDRW. Does anyone know what the seek commands are good for? --- linux/drivers/ide/ide-cd.c.old 2004-03-23 00:08:39.000000000 +0100 +++ linux/drivers/ide/ide-cd.c 2004-03-23 00:03:20.000000000 +0100 @@ -915,6 +915,7 @@ int cmd_len; struct cdrom_info *info = drive->driver_data; ide_startstop_t startstop; + int i; if (CDROM_CONFIG_FLAGS(drive)->drq_interrupt) { /* Here we should have been called after receiving an interrupt @@ -939,6 +940,10 @@ cmd_len = ATAPI_MIN_CDB_BYTES; /* Send the command to the device. */ + printk("cdrom_transfer_packet_command:"); + for (i = 0; i < cmd_len; i++) + printk(" %02x", rq->cmd[i]); + printk("\n"); HWIF(drive)->atapi_output_bytes(drive, rq->cmd, cmd_len); /* Start the DMA if need be */ @@ -1267,7 +1272,7 @@ } -#define IDECD_SEEK_THRESHOLD (1000) /* 1000 blocks */ +#define IDECD_SEEK_THRESHOLD (10000000) /* 1000 blocks */ #define IDECD_SEEK_TIMER (5 * WAIT_MIN_SLEEP) /* 100 ms */ #define IDECD_SEEK_TIMEOUT (2 * WAIT_CMD) /* 20 sec */ -- Peter Osterlund - petero2@telia.com http://w1.894.telia.com/~u89404340 -- To unsubscribe, e-mail: packet-writing-unsubscribe@suse.com For additional commands, e-mail: packet-writing-help@suse.com Do you Yahoo!? Yahoo! Finance Tax Center - File online. File on time.