From bcfd046a635c5986e384825d8adb660940d7dcca Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Thu, 11 Jun 2009 11:04:45 +0900 Subject: [PATCH] --- yaml --- r: 153899 b: refs/heads/master c: 0d9e6659a1bde3733cfd0072adbb3514b579e383 h: refs/heads/master i: 153897: 85914a7771a58766ee28f1d59d20cc0ada069999 153895: fec942c5ae70b0d19e3823d8b66b6c77b72f6492 v: v3 --- [refs] | 2 +- trunk/drivers/ata/libata-core.c | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 658cdc07318e..2effe008a025 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: dc77ad4c8727d3a1c23eadcb287501dab480d634 +refs/heads/master: 0d9e6659a1bde3733cfd0072adbb3514b579e383 diff --git a/trunk/drivers/ata/libata-core.c b/trunk/drivers/ata/libata-core.c index 1d894c9d73d0..045a486a09ea 100644 --- a/trunk/drivers/ata/libata-core.c +++ b/trunk/drivers/ata/libata-core.c @@ -1993,11 +1993,17 @@ unsigned int ata_do_simple_cmd(struct ata_device *dev, u8 cmd) * Check if the current speed of the device requires IORDY. Used * by various controllers for chip configuration. */ - unsigned int ata_pio_need_iordy(const struct ata_device *adev) { - /* Controller doesn't support IORDY. Probably a pointless check - as the caller should know this */ + /* Don't set IORDY if we're preparing for reset. IORDY may + * lead to controller lock up on certain controllers if the + * port is not occupied. See bko#11703 for details. + */ + if (adev->link->ap->pflags & ATA_PFLAG_RESETTING) + return 0; + /* Controller doesn't support IORDY. Probably a pointless + * check as the caller should know this. + */ if (adev->link->ap->flags & ATA_FLAG_NO_IORDY) return 0; /* CF spec. r4.1 Table 22 says no iordy on PIO5 and PIO6. */ @@ -2020,7 +2026,6 @@ unsigned int ata_pio_need_iordy(const struct ata_device *adev) * Compute the highest mode possible if we are not using iordy. Return * -1 if no iordy mode is available. */ - static u32 ata_pio_mask_no_iordy(const struct ata_device *adev) { /* If we have no drive specific rule, then PIO 2 is non IORDY */