public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [2.5.45] CDRW not working
@ 2002-11-02 15:21 Kronos
  2002-11-02 15:27 ` Jens Axboe
  0 siblings, 1 reply; 8+ messages in thread
From: Kronos @ 2002-11-02 15:21 UTC (permalink / raw)
  To: linux-kernel; +Cc: axboe

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 


>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
-- 
Reply-To: kronos@kronoz.cjb.net
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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [2.5.45] CDRW not working
  2002-11-02 15:21 [2.5.45] CDRW not working Kronos
@ 2002-11-02 15:27 ` Jens Axboe
  2002-11-02 17:47   ` Kronos
  0 siblings, 1 reply; 8+ messages in thread
From: Jens Axboe @ 2002-11-02 15:27 UTC (permalink / raw)
  To: Kronos; +Cc: linux-kernel

On Sat, Nov 02 2002, Kronos wrote:
> 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?

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [2.5.45] CDRW not working
  2002-11-02 15:27 ` Jens Axboe
@ 2002-11-02 17:47   ` Kronos
  2002-11-02 21:35     ` Jens Axboe
  0 siblings, 1 reply; 8+ messages in thread
From: Kronos @ 2002-11-02 17:47 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-kernel

Il Sat, Nov 02, 2002 at 04:27:25PM +0100, Jens Axboe ha scritto: 
> > 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

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

Luca
-- 
Reply-To: kronos@kronoz.cjb.net
Home: http://kronoz.cjb.net
La differenza fra l'intelligenza e la stupidita`?
All'intelligenza c'e` un limite.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [2.5.45] CDRW not working
  2002-11-02 17:47   ` Kronos
@ 2002-11-02 21:35     ` Jens Axboe
  2002-11-03 14:53       ` Kronos
  0 siblings, 1 reply; 8+ messages in thread
From: Jens Axboe @ 2002-11-02 21:35 UTC (permalink / raw)
  To: Kronos; +Cc: linux-kernel

On Sat, Nov 02 2002, Kronos wrote:
> Il Sat, Nov 02, 2002 at 04:27:25PM +0100, Jens Axboe ha scritto: 
> > > 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

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.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [2.5.45] CDRW not working
  2002-11-02 21:35     ` Jens Axboe
@ 2002-11-03 14:53       ` Kronos
  2002-11-03 15:01         ` Jens Axboe
  0 siblings, 1 reply; 8+ messages in thread
From: Kronos @ 2002-11-03 14:53 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-kernel

Il Sat, Nov 02, 2002 at 10:35:29PM +0100, Jens Axboe ha scritto: 
> On Sat, Nov 02 2002, Kronos wrote:
> > Il Sat, Nov 02, 2002 at 04:27:25PM +0100, Jens Axboe ha scritto: 
> > > > 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]
 
> What is this, 2.5.42 or 2.5.45?

Both.

> 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
-- 
Reply-To: kronos@kronoz.cjb.net
Home: http://kronoz.cjb.net
Mi piace avere amici rispettabili;
Mi piace essere il peggiore della compagnia.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [2.5.45] CDRW not working
  2002-11-03 14:53       ` Kronos
@ 2002-11-03 15:01         ` Jens Axboe
  2002-11-03 15:39           ` Kronos
  2002-11-04 18:00           ` Kronos
  0 siblings, 2 replies; 8+ messages in thread
From: Jens Axboe @ 2002-11-03 15:01 UTC (permalink / raw)
  To: Kronos; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 611 bytes --]

On Sun, Nov 03 2002, Kronos wrote:
> Il Sat, Nov 02, 2002 at 10:35:29PM +0100, Jens Axboe ha scritto: 
> > On Sat, Nov 02 2002, Kronos wrote:
> > > Il Sat, Nov 02, 2002 at 04:27:25PM +0100, Jens Axboe ha scritto: 
> > > > > 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]
>  
> > What is this, 2.5.42 or 2.5.45?
> 
> Both.
> 
> > 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?

-- 
Jens Axboe


[-- Attachment #2: idecd-cdb-size-3 --]
[-- Type: text/plain, Size: 2296 bytes --]

===== 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 14:45:32 2002
@@ -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 =====
--- 1.29/drivers/scsi/scsi.h	Thu Oct 17 23:16:34 2002
+++ edited/drivers/scsi/scsi.h	Sun Nov  3 14:45:10 2002
@@ -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 =====
--- 1.5/include/scsi/scsi.h	Mon Jun 10 02:34:54 2002
+++ edited/include/scsi/scsi.h	Sun Nov  3 14:45:09 2002
@@ -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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [2.5.45] CDRW not working
  2002-11-03 15:01         ` Jens Axboe
@ 2002-11-03 15:39           ` Kronos
  2002-11-04 18:00           ` Kronos
  1 sibling, 0 replies; 8+ messages in thread
From: Kronos @ 2002-11-03 15:39 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-kernel

Il Sun, Nov 03, 2002 at 04:01:50PM +0100, Jens Axboe ha scritto: 
> > > 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.orig	Sun Nov  3 16:34:38 2002
+++ ide-cd.c	Sun Nov  3 16:36:52 2002
@@ -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
-- 
Reply-To: kronos@kronoz.cjb.net
Home: http://kronoz.cjb.net
Carpe diem, quam minimum credula postero. (Q. Horatius Flaccus)

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [2.5.45] CDRW not working
  2002-11-03 15:01         ` Jens Axboe
  2002-11-03 15:39           ` Kronos
@ 2002-11-04 18:00           ` Kronos
  1 sibling, 0 replies; 8+ messages in thread
From: Kronos @ 2002-11-04 18:00 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-kernel

Il Sun, Nov 03, 2002 at 04:01:50PM +0100, Jens Axboe ha scritto: 
> > 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
-- 
Reply-To: kronos@kronoz.cjb.net
Home: http://kronoz.cjb.net

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2002-11-04 17:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-02 15:21 [2.5.45] CDRW not working Kronos
2002-11-02 15:27 ` Jens Axboe
2002-11-02 17:47   ` Kronos
2002-11-02 21:35     ` Jens Axboe
2002-11-03 14:53       ` Kronos
2002-11-03 15:01         ` Jens Axboe
2002-11-03 15:39           ` Kronos
2002-11-04 18:00           ` Kronos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox