]> pilppa.org Git - linux-2.6-omap-h63xx.git/commit
[PATCH] libata: separate out ata_dev_read_id()
authorTejun Heo <htejun@gmail.com>
Mon, 20 Feb 2006 17:12:11 +0000 (02:12 +0900)
committerJeff Garzik <jgarzik@pobox.com>
Mon, 20 Feb 2006 23:56:58 +0000 (18:56 -0500)
commit49016aca2e54c64f08c31d5512dfd8d35f934c58
treef0b5c2843f74a9adb62761d0ec9d05284bc47a1c
parentf131883e73a8662dc92c3ea371ae9ded0c8f2c37
[PATCH] libata: separate out ata_dev_read_id()

Separate out ata_dev_read_id() from ata_dev_identify().  This is the
first half of splitting ata_dev_identify().  ata_dev_read_id() will
also be used for revalidation.  This patch does not make any behavior
change.

ata_dev_read_id() doesn't modify any of libata-internal data
structures.  It simply reads IDENTIFY page and returns error code on
failure.  INIT_DEV_PARAMS and EDD wrong class code are also handled by
this function.

Re-reading IDENTIFY after INIT_DEV_PARAMS is performed by jumping to
retry: instead of calling ata_dev_reread_id().  This is done because
1. there's retry label anyway 2. ata_dev_reread_id() cannot be used
anywhere else so there's no reason to keep it.

This function is probably the place to set transfer mode to PIO0
before IDENTIFY.  However, reset -> identify -> init_dev_params order
should be kept for pre-ATA4 devices so we cannot set transfer mode
before IDENTIFY for them.  How do we know if a device is post-ATA4
before IDENTIFY?

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
drivers/scsi/libata-core.c