diff options
author | Tejun Heo <htejun@gmail.com> | 2006-11-01 04:38:52 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-12-01 22:41:31 -0500 |
commit | efdaedc443e935eda82e9e78a6e65d1f993d242f (patch) | |
tree | 8bcdc05ec85f7a9e7b0a5b1e5014ec21cf4e8aac /drivers/ata/libata-core.c | |
parent | ad616ffbda8caf3ce76d2b43027e789d732abf48 (diff) |
[PATCH] libata: implement ATA_EHI_PRINTINFO
Implement ehi flag ATA_EHI_PRINTINFO. This flag is set when device
configuration needs to print out device info. This used to be handled
by @print_info argument to ata_dev_configure() but LLDs also need to
know about it in ->dev_config() callback.
This patch replaces @print_info w/ ATA_EHI_PRINTINFO and make sata_sil
print workaround messages only on the initial configuration.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/libata-core.c')
-rw-r--r-- | drivers/ata/libata-core.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 315f46841f6..e294731a7ed 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
@@ -1377,7 +1377,6 @@ static void ata_set_port_max_cmd_len(struct ata_port *ap) | |||
1377 | /** | 1377 | /** |
1378 | * ata_dev_configure - Configure the specified ATA/ATAPI device | 1378 | * ata_dev_configure - Configure the specified ATA/ATAPI device |
1379 | * @dev: Target device to configure | 1379 | * @dev: Target device to configure |
1380 | * @print_info: Enable device info printout | ||
1381 | * | 1380 | * |
1382 | * Configure @dev according to @dev->id. Generic and low-level | 1381 | * Configure @dev according to @dev->id. Generic and low-level |
1383 | * driver specific fixups are also applied. | 1382 | * driver specific fixups are also applied. |
@@ -1388,9 +1387,10 @@ static void ata_set_port_max_cmd_len(struct ata_port *ap) | |||
1388 | * RETURNS: | 1387 | * RETURNS: |
1389 | * 0 on success, -errno otherwise | 1388 | * 0 on success, -errno otherwise |
1390 | */ | 1389 | */ |
1391 | int ata_dev_configure(struct ata_device *dev, int print_info) | 1390 | int ata_dev_configure(struct ata_device *dev) |
1392 | { | 1391 | { |
1393 | struct ata_port *ap = dev->ap; | 1392 | struct ata_port *ap = dev->ap; |
1393 | int print_info = ap->eh_context.i.flags & ATA_EHI_PRINTINFO; | ||
1394 | const u16 *id = dev->id; | 1394 | const u16 *id = dev->id; |
1395 | unsigned int xfer_mask; | 1395 | unsigned int xfer_mask; |
1396 | char revbuf[7]; /* XYZ-99\0 */ | 1396 | char revbuf[7]; /* XYZ-99\0 */ |
@@ -1638,7 +1638,9 @@ int ata_bus_probe(struct ata_port *ap) | |||
1638 | if (rc) | 1638 | if (rc) |
1639 | goto fail; | 1639 | goto fail; |
1640 | 1640 | ||
1641 | rc = ata_dev_configure(dev, 1); | 1641 | ap->eh_context.i.flags |= ATA_EHI_PRINTINFO; |
1642 | rc = ata_dev_configure(dev); | ||
1643 | ap->eh_context.i.flags &= ~ATA_EHI_PRINTINFO; | ||
1642 | if (rc) | 1644 | if (rc) |
1643 | goto fail; | 1645 | goto fail; |
1644 | } | 1646 | } |
@@ -3045,7 +3047,7 @@ int ata_dev_revalidate(struct ata_device *dev, int post_reset) | |||
3045 | memcpy(dev->id, id, sizeof(id[0]) * ATA_ID_WORDS); | 3047 | memcpy(dev->id, id, sizeof(id[0]) * ATA_ID_WORDS); |
3046 | 3048 | ||
3047 | /* configure device according to the new ID */ | 3049 | /* configure device according to the new ID */ |
3048 | rc = ata_dev_configure(dev, 0); | 3050 | rc = ata_dev_configure(dev); |
3049 | if (rc == 0) | 3051 | if (rc == 0) |
3050 | return 0; | 3052 | return 0; |
3051 | 3053 | ||