1 Apr 2005 07:46
[PATCH libata-dev-2.6 1/2] ata_dev_identify() check status fix
Albert Lee <albertcc <at> tw.ibm.com>
2005-04-01 05:46:36 GMT
2005-04-01 05:46:36 GMT
Hi Jeff,
In the ata_dev_identify() function, ata_chk_status() is used to check whether an error has occurred.
However, in some error situation, the device's status register always reads 0x0. (Please see attached
dmesg below.)
And the error found by the state machine is not seen by ata_dev_identify().
Changes:
- use qc->private_data to carry the drv_stat returned from the state machine.
- ata_qc_complete_noop() saves the drv_stat to *(qc->private_data).
- ata_dev_identify() use the status returned from ata_qc_complete_noop(), instead of ata_chk_status().
- noisy PIO error printk() changed to DPRINTK()
Attached please find the patch 1/2 against the libata-dev-2.6 tree for your review. Thanks.
Albert
Signed-off-by: Albert Lee <albertcc <at> tw.ibm.com>
---------------------------------------
dmesg:
libata version 1.10 loaded.
pata_pdc2027x version 0.58
pata_pdc2027x: PLL input clock 32783 kHz
ata_device_add: ENTER
ata_host_add: ENTER
ata_port_start: prd alloc, virt c0000001ded82000, dma 19ae0000
ata1: PATA max UDMA/133 cmd 0xDE400 ctl 0xDDC02 bmdma 0xDEC00 irq 134
ata_host_add: ENTER
ata_port_start: prd alloc, virt c0000001de8c6000, dma 19af0000
ata2: PATA max UDMA/133 cmd 0xDE800 ctl 0xDE002 bmdma 0xDEC08 irq 134
(Continue reading)
RSS Feed