Skip to contentSkip to conversation

[2.5.45] CDRW not working

DISCUSSION Kronos 2 participants 8 messages Nov 2, 2002 – Nov 4, 2002 SCSI

lore
Share & tools
lore

Kronos

author
#0 lore raw

Hi,
I can't even mount a cd using my CDRW drive (CD-ROM drive is ok).

I see the following messages:

hdd: packet command error: status=0x51 { DriveReady SeekComplete Error }
hdd: packet command error: error=0x50
end_request: I/O error, dev 16:40, sector 0
end_request: I/O error, dev 16:40, sector 0
hdd: request sense failure: status=0x51 { DriveReady SeekComplete Error }
hdd: request sense failure: error=0x50LastFailedSense 0x05
hdd: packet command error: status=0x51 { DriveReady SeekComplete Error }
hdd: packet command error: error=0x50
end_request: I/O error, dev 16:40, sector 0
end_request: I/O error, dev 16:40, sector 0
hdd: request sense failure: status=0x51 { DriveReady SeekComplete Error }
hdd: request sense failure: error=0x50LastFailedSense 0x05
cdrom: open failed.
hdd: packet command error: status=0x51 { DriveReady SeekComplete Error }
hdd: packet command error: error=0x50
end_request: I/O error, dev 16:40, sector 0
end_request: I/O error, dev 16:40, sector 0
hdd: request sense failure: status=0x51 { DriveReady SeekComplete Error }
hdd: request sense failure: error=0x50LastFailedSense 0x05
hdd: packet command error: status=0x51 { DriveReady SeekComplete Error }
hdd: packet command error: error=0x50
end_request: I/O error, dev 16:40, sector 0
end_request: I/O error, dev 16:40, sector 0
hdd: request sense failure: status=0x51 { DriveReady SeekComplete Error }
hdd: request sense failure: error=0x50LastFailedSense 0x05
hdd: packet command error: status=0x51 { DriveReady SeekComplete Error }
hdd: packet command error: error=0x50
end_request: I/O error, dev 16:40, sector 0
end_request: I/O error, dev 16:40, sector 0
hdd: request sense failure: status=0x51 { DriveReady SeekComplete Error }
hdd: request sense failure: error=0x50LastFailedSense 0x05
cdrom: open failed.
hdd: packet command error: status=0x51 { DriveReady SeekComplete Error }
hdd: packet command error: error=0x50
end_request: I/O error, dev 16:40, sector 0
end_request: I/O error, dev 16:40, sector 0
hdd: request sense failure: status=0x51 { DriveReady SeekComplete Error }
hdd: request sense failure: error=0x50LastFailedSense 0x05
hdd: packet command error: status=0x51 { DriveReady SeekComplete Error }
hdd: packet command error: error=0x50
end_request: I/O error, dev 16:40, sector 0
end_request: I/O error, dev 16:40, sector 0
hdd: request sense failure: status=0x51 { DriveReady SeekComplete Error }
hdd: request sense failure: error=0x50LastFailedSense 0x05
hdd: packet command error: status=0x51 { DriveReady SeekComplete Error }
hdd: packet command error: error=0x50
end_request: I/O error, dev 16:40, sector 0
end_request: I/O error, dev 16:40, sector 0
hdd: request sense failure: status=0x51 { DriveReady SeekComplete Error }
hdd: request sense failure: error=0x50LastFailedSense 0x05
cdrom: open failed.
hdd: packet command error: status=0x51 { DriveReady SeekComplete Error }
hdd: packet command error: error=0x50
end_request: I/O error, dev 16:40, sector 0
end_request: I/O error, dev 16:40, sector 0
hdd: request sense failure: status=0x51 { DriveReady SeekComplete Error }
hdd: request sense failure: error=0x50LastFailedSense 0x05
hdd: packet command error: status=0x51 { DriveReady SeekComplete Error }
hdd: packet command error: error=0x50
end_request: I/O error, dev 16:40, sector 0
end_request: I/O error, dev 16:40, sector 0
hdd: request sense failure: status=0x51 { DriveReady SeekComplete Error }
hdd: request sense failure: error=0x50LastFailedSense 0x05

Quoted 1 line

From bootlog:

Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
VP_IDE: IDE controller at PCI slot 00:11.1
VP_IDE: chipset revision 6
VP_IDE: not 100% native mode: will probe irqs later
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
VP_IDE: VIA vt8233a (rev 00) IDE UDMA133 controller on pci00:11.1

    ide0: BM-DMA at 0xe000-0xe007, BIOS settings: hda:DMA, hdb:pio
    ide1: BM-DMA at 0xe008-0xe00f, BIOS settings: hdc:DMA, hdd:DMA

hda: QUANTUM FIREBALLlct10 10, ATA DISK drive
hda: DMA disabled
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
hdc: CRD-8520B, ATAPI CD/DVD-ROM drive
hdd: CRW6206A, ATAPI CD/DVD-ROM drive
hdc: DMA disabled
hdd: DMA disabled
ide1 at 0x170-0x177,0x376 on irq 15
hda: host protected area => 1
hda: 20044080 sectors (10263 MB) w/418KiB Cache, CHS=1247/255/63
/dev/ide/host0/bus0/target0/lun0: p1 p2 < p5 p6 p7 p8 p9 p10 > p3 p4
hdc: ATAPI 52X CD-ROM drive, 128kB Cache, DMA
Uniform CD-ROM driver Revision: 3.12
hdd: ATAPI 6X CD-ROM CD-R/RW drive, 512kB Cache, DMA

ciao,
Luca

Signature · 5 lines
Reply-To: [email protected]
Home: http://kronoz.cjb.net
"La mia teoria scientifica preferita e` quella secondo la quale gli 
 anelli di Saturno sarebbero interamente composti dai bagagli andati 
 persi nei viaggi aerei." -- Mark Russel
#1 lore raw
Quoted 4 lines · Kronos

Hi,
I can't even mount a cd using my CDRW drive (CD-ROM drive is ok).

I see the following messages:

Does 2.5.42 work?

Signature · 1 line
Jens Axboe
author
#2 lore raw

Il Sat, Nov 02, 2002 at 04:27:25PM +0100, Jens Axboe ha scritto:

Quoted 3 lines
Quoted 1 line

I can't even mount a cd using my CDRW drive (CD-ROM drive is ok).

Does 2.5.42 work?

I can reproduce it using hdparm -i /dev/hdd:

hdd: drive_cmd: status=0x51 { DriveReady SeekComplete Error }
hdd: drive_cmd: error=0x04Aborted Command
hdd: irq timeout: status=0xd0 { Busy }
hdd: irq timeout: error=0xd0LastFailedSense 0x0d
hdd: status timeout: status=0xd0 { Busy }
hdd: status timeout: error=0xd0LastFailedSense 0x0d
hdd: DMA disabled
hdd: drive not ready for command
hdd: ATAPI reset complete
hdd: packet command error: status=0x51 { DriveReady SeekComplete Error }
hdd: packet command error: error=0x50
end_request: I/O error, dev 16:40, sector 0
end_request: I/O error, dev 16:40, sector 0
hdd: request sense failure: status=0x51 { DriveReady SeekComplete Error }
hdd: request sense failure: error=0x50LastFailedSense 0x05

Quoted 1 line

From now on I can't use the drive. The same happens on 2.5.45.

Luca

Signature · 4 lines
Reply-To: [email protected]
Home: http://kronoz.cjb.net
La differenza fra l'intelligenza e la stupidita`?
All'intelligenza c'e` un limite.
#3 lore raw
Quoted 7 lines · Kronos

Il Sat, Nov 02, 2002 at 04:27:25PM +0100, Jens Axboe ha scritto:

Quoted 3 lines
Quoted 1 line

I can't even mount a cd using my CDRW drive (CD-ROM drive is ok).

Does 2.5.42 work?

I can reproduce it using hdparm -i /dev/hdd:

Quoted 15 lines

hdd: drive_cmd: status=0x51 { DriveReady SeekComplete Error }
hdd: drive_cmd: error=0x04Aborted Command
hdd: irq timeout: status=0xd0 { Busy }
hdd: irq timeout: error=0xd0LastFailedSense 0x0d
hdd: status timeout: status=0xd0 { Busy }
hdd: status timeout: error=0xd0LastFailedSense 0x0d
hdd: DMA disabled
hdd: drive not ready for command
hdd: ATAPI reset complete
hdd: packet command error: status=0x51 { DriveReady SeekComplete Error }
hdd: packet command error: error=0x50
end_request: I/O error, dev 16:40, sector 0
end_request: I/O error, dev 16:40, sector 0
hdd: request sense failure: status=0x51 { DriveReady SeekComplete Error }
hdd: request sense failure: error=0x50LastFailedSense 0x05

What is this, 2.5.42 or 2.5.45? Does 2.5.42 work or not? You haven't answered my question at all.

Signature · 1 line
Jens Axboe
author
#4 lore raw

Il Sat, Nov 02, 2002 at 10:35:29PM +0100, Jens Axboe ha scritto:

Quoted 7 lines · Kronos
Quoted 6 lines

Il Sat, Nov 02, 2002 at 04:27:25PM +0100, Jens Axboe ha scritto:

Quoted 3 lines
Quoted 1 line

I can't even mount a cd using my CDRW drive (CD-ROM drive is ok).

Does 2.5.42 work?

I can reproduce it using hdparm -i /dev/hdd:

[cut]

Quoted 1 line

What is this, 2.5.42 or 2.5.45?

Both.

Quoted 1 line

Does 2.5.42 work or not?

If I don't use hdparm 2.5.42 works. On 2.5.45 it's random.

Luca

Signature · 4 lines
Reply-To: [email protected]
Home: http://kronoz.cjb.net
Mi piace avere amici rispettabili;
Mi piace essere il peggiore della compagnia.
#5 lore raw
Quoted 11 lines · Kronos

Il Sat, Nov 02, 2002 at 10:35:29PM +0100, Jens Axboe ha scritto:

Quoted 7 lines · Kronos
Quoted 6 lines

Il Sat, Nov 02, 2002 at 04:27:25PM +0100, Jens Axboe ha scritto:

Quoted 3 lines
Quoted 1 line

I can't even mount a cd using my CDRW drive (CD-ROM drive is ok).

Does 2.5.42 work?

I can reproduce it using hdparm -i /dev/hdd:

[cut]

Quoted 7 lines
Quoted 1 line

What is this, 2.5.42 or 2.5.45?

Both.

Quoted 1 line

Does 2.5.42 work or not?

If I don't use hdparm 2.5.42 works. On 2.5.45 it's random.

2.5.45 with attached patch, how does that compare?

Signature · 1 line
Jens Axboe

===== drivers/ide/ide-cd.c 1.27 vs edited =====

drivers/ide/ide-cd.c +7 -1
@@ -872,15 +872,16 @@
  * changed 5 parameters to 3 for dvd-ram
  * struct packet_command *pc; now packet_command_t *pc;
  */
+#define ATAPI_MIN_CDB_BYTES 12
 static ide_startstop_t cdrom_transfer_packet_command (ide_drive_t *drive,
 					  struct request *rq,
 					  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 < ATAPI_MIN_CDB_BYTES)
+		cmd_len = ATAPI_MIN_CDB_BYTES;
 
 	/* Send the command to the device. */
 	HWIF(drive)->atapi_output_bytes(drive, cmd_buf, cmd_len);

===== drivers/scsi/scsi.h 1.29 vs edited =====

drivers/scsi/scsi.h +0 -3
@@ -164,8 +164,6 @@
 #define SCSI_OWNER_BH_HANDLER     0x104
 #define SCSI_OWNER_NOBODY         0x105
 
-#define COMMAND_SIZE(opcode) scsi_command_size[((opcode) >> 5) & 7]
-
 #define IDENTIFY_BASE       0x80
 #define IDENTIFY(can_disconnect, lun)   (IDENTIFY_BASE |\
 		     ((can_disconnect) ?  0x40 : 0) |\
@@ -415,7 +413,6 @@
 extern unsigned int scsi_need_isa_buffer;	/* True if some devices need indirection
 						   * buffers */
 extern volatile int in_scan_scsis;
-extern const unsigned char scsi_command_size[8];
 
 extern struct bus_type scsi_driverfs_bus_type;
 

===== include/scsi/scsi.h 1.5 vs edited =====

include/scsi/scsi.h +3 -0
@@ -223,4 +223,7 @@
 /* Used to get the PCI location of a device */
 #define SCSI_IOCTL_GET_PCI 0x5387
 
+extern const unsigned char scsi_command_size[8];
+#define COMMAND_SIZE(opcode) scsi_command_size[((opcode) >> 5) & 7]
+
 #endif
author
#6 lore raw

Il Sun, Nov 03, 2002 at 04:01:50PM +0100, Jens Axboe ha scritto:

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

Does 2.5.42 work or not?

If I don't use hdparm 2.5.42 works. On 2.5.45 it's random.

2.5.45 with attached patch, how does that compare?

The first patch doesn't apply to 2.5.45. cmd_len was removed in 2.5.45. This one should be ok, right?

ide-cd.c renamed from ide-cd.c.orig +6 -1
@@ -884,6 +884,7 @@
 {
 	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
@@ -905,8 +906,12 @@
 	/* Arm the interrupt handler. */
 	ide_set_handler(drive, handler, rq->timeout, cdrom_timer_expiry);
 
+	cmd_len = COMMAND_SIZE(rq->cmd[0]);
+	if (cmd_len < ATAPI_MIN_CDB_BYTES)
+		cmd_len = ATAPI_MIN_CDB_BYTES;
+
 	/* Send the command to the device. */
-	HWIF(drive)->atapi_output_bytes(drive, rq->cmd, sizeof(rq->cmd));
+	HWIF(drive)->atapi_output_bytes(drive, rq->cmd, cmd_len);
 
 	/* Start the DMA if need be */
 	if (info->dma)

Luca

Signature · 3 lines
Reply-To: [email protected]
Home: http://kronoz.cjb.net
Carpe diem, quam minimum credula postero. (Q. Horatius Flaccus)
author
#7 lore raw
In reply to Jens Axboe

Il Sun, Nov 03, 2002 at 04:01:50PM +0100, Jens Axboe ha scritto:

Quoted 3 lines
Quoted 1 line

If I don't use hdparm 2.5.42 works. On 2.5.45 it's random.

2.5.45 with attached patch, how does that compare?

Ok, I tested you patch. Now I can mount, read, etc. without errors, but I can still hang the drive usign hdparm -I.

Luca

Signature · 2 lines
Reply-To: [email protected]
Home: http://kronoz.cjb.net