diff options
author | Tejun Heo <htejun@gmail.com> | 2006-12-03 07:34:13 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-12-03 07:58:10 -0500 |
commit | 800b399669ad495ad4361d134df87401ae36f44f (patch) | |
tree | 19e29f655836cd4808c668d736a83df552b7d8dd /drivers/ata/libata-core.c | |
parent | 3ac551a6a63dcbc707348772a27bd7090b081524 (diff) |
[PATCH] libata: always use polling IDENTIFY
libata switched to IRQ-driven IDENTIFY when IRQ-driven PIO was
introduced. This has caused a lot of problems including device
misdetection and phantom device.
ATA_FLAG_DETECT_POLLING was added recently to selectively use polling
IDENTIFY on problemetic drivers but many controllers and devices are
affected by this problem and trying to adding ATA_FLAG_DETECT_POLLING
for each such case is diffcult and not very rewarding.
This patch makes libata always use polling IDENTIFY. This is
consistent with libata's original behavior and drivers/ide's behavior.
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 | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 883276388207..f8ec3896b793 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
@@ -1473,16 +1473,12 @@ int ata_dev_read_id(struct ata_device *dev, unsigned int *p_class, | |||
1473 | } | 1473 | } |
1474 | 1474 | ||
1475 | tf.protocol = ATA_PROT_PIO; | 1475 | tf.protocol = ATA_PROT_PIO; |
1476 | 1476 | tf.flags |= ATA_TFLAG_POLLING; /* for polling presence detection */ | |
1477 | /* presence detection using polling IDENTIFY? */ | ||
1478 | if (flags & ATA_READID_DETECT) | ||
1479 | tf.flags |= ATA_TFLAG_POLLING; | ||
1480 | 1477 | ||
1481 | err_mask = ata_exec_internal(dev, &tf, NULL, DMA_FROM_DEVICE, | 1478 | err_mask = ata_exec_internal(dev, &tf, NULL, DMA_FROM_DEVICE, |
1482 | id, sizeof(id[0]) * ATA_ID_WORDS); | 1479 | id, sizeof(id[0]) * ATA_ID_WORDS); |
1483 | if (err_mask) { | 1480 | if (err_mask) { |
1484 | if ((flags & ATA_READID_DETECT) && | 1481 | if (err_mask & AC_ERR_NODEV_HINT) { |
1485 | (err_mask & AC_ERR_NODEV_HINT)) { | ||
1486 | DPRINTK("ata%u.%d: NODEV after polling detection\n", | 1482 | DPRINTK("ata%u.%d: NODEV after polling detection\n", |
1487 | ap->id, dev->devno); | 1483 | ap->id, dev->devno); |
1488 | return -ENOENT; | 1484 | return -ENOENT; |