[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <44FFE7AF.8010808@gmail.com>
Date: Thu, 07 Sep 2006 11:34:39 +0200
From: Tejun Heo <htejun@...il.com>
To: "J.A. Magallón" <jamagallon@....com>
CC: Andrew Morton <akpm@...l.org>, linux-kernel@...r.kernel.org,
Alan Cox <alan@...rguk.ukuu.org.uk>,
Jeff Garzik <jgarzik@...ox.com>
Subject: Re: Lost DVD-RW [Was Re: 2.6.18-rc5-mm1]
J.A. Magallón wrote:
> libata version 2.00 loaded.
> ata_piix 0000:00:1f.1: version 2.00ac7
> ACPI: PCI Interrupt 0000:00:1f.1[A] -> GSI 18 (level, low) -> IRQ 16
> PCI: Setting latency timer of device 0000:00:1f.1 to 64
> ata1: PATA max UDMA/100 cmd 0x1F0 ctl 0x3F6 bmdma 0xF000 irq 14
> ata2: PATA max UDMA/100 cmd 0x170 ctl 0x376 bmdma 0xF008 irq 15
> scsi0 : ata_piix
> ata1.00: XXX class=3 is_ata=0 is_cfa=1
> ata1.00: failed to IDENTIFY (device reports illegal type, err_mask=0x0)
Magallón, does the attached patch fix the problem?
Alan, it seems that 0x848a indicates CFA device iff the ID data is from
IDENTIFY DEVICE. When the command is IDENTIFY PACKET DEVICE, 0x848a
seems to indicate a valid ATAPI device.
From ATA8-ACS, 7.17 is IDENTIFY DEVICE.
> 7.17.7.1 Word 0: General configuration
>
> Devices that conform to this standard shall clear bit 15 to zero. If
> bit 7 is set to one, the device is a removable media device. Bit 6 is
> obsolete.
>
> If bit 2 is set to one it indicates that the content of the IDENTIFY
> DEVICE data is incomplete. This will occur if the device supports the
> Power-up in Standby feature set and required data is contained on the
> device media. In this case the content of at least word 0 and word 2
> shall be valid.
>
> Devices supporting the CFA feature set shall place the value 848Ah in
^^^^^
> word 0. In this case, the above definitions for the bits in word 0
> are not valid.
And, 7.18 is on IDENTIFY PACKET DEVICE.
> 7.18.6.2 Word 0: General configuration
>
> Bits (15:14) of word 0 indicate the type of device. Bit 15 shall be
> set to one and bit 14 shall be cleared to zeroto indicate the device
> implements the PACKET Command feature set.
>
> Bits (12:8) of word 0 indicate the command packet set implemented by
> the device. This value follows the peripheral device type value as
> defined in SCSI Primary Commands, ANSI INCITS 301:1997.
>
> Bit 7 if set to one indicates that the device has removable media.
>
> Bits (6:5) of word 0 indicate the DRQ response time when a PACKET
> command is received. A value of 00b indicates a maximum time of 3 ms
> from receipt of PACKET to the setting of DRQ to one. A value of 10b
> indicates a maximum time of 50 μs from the receipt of PACKET to the
> setting of DRQ to one. The value 11b is reserved.
>
> If bit 2 is set to one it indicates that the content of the IDENTIFY
> DEVICE data is incomplete. This will occur if the device supports the
> Power-up in Standby feature set and required data is contained on the
> device media. In this case the content of at least word 0 and word 2
> shall be valid.
>
> Bits (1:0) of word 0 indicate the packet size the device supports. A
> value of 00b indicates that a 12-byte packet is supported; a value of
> 01b indicates a 16 byte packet. The values 10b and 11b are reserved.
So, when the output is from IDENTIFY PACKET DEVICE, 0x848a doesn't have
any special meaning. It indicates a valid write-once, removable media,
ATAPI device with 16bytes CDB.
The attached patch makes sanity checking logic in ata_dev_read_id()
check for CFA only if IDENTIFY DEVICE is used.
Thanks.
--
tejun
View attachment "patch" of type "text/plain" (702 bytes)
Powered by blists - more mailing lists