Skip to content

Commit 19eddab

Browse files
committed
Merge branch 'for-3.12-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata
Pull libata fixes from Tejun Heo: "The only interesting bit is ata_eh_qc_retry() update which fixes a problem where a SG_IO command may fail across suspend/resume cycle without the command actually being at fault. Other changes are low level driver specific and fairly low impact" * 'for-3.12-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata: libahci: fix turning on LEDs in ahci_start_port() libata: make ata_eh_qc_retry() bump scmd->allowed on bogus failures ahci_platform: use dev_info() instead of printk() ahci: use dev_info() instead of printk() pata_isapnp: Don't use invalid I/O ports
2 parents ee7eafc + fa070ee commit 19eddab

File tree

5 files changed

+15
-7
lines changed

5 files changed

+15
-7
lines changed

drivers/ata/ahci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1343,7 +1343,7 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
13431343
if (!(hpriv->cap & HOST_CAP_SSS) || ahci_ignore_sss)
13441344
host->flags |= ATA_HOST_PARALLEL_SCAN;
13451345
else
1346-
printk(KERN_INFO "ahci: SSS flag set, parallel bus scan disabled\n");
1346+
dev_info(&pdev->dev, "SSS flag set, parallel bus scan disabled\n");
13471347

13481348
if (pi.flags & ATA_FLAG_EM)
13491349
ahci_reset_em(host);

drivers/ata/ahci_platform.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ static int ahci_probe(struct platform_device *pdev)
184184
if (!(hpriv->cap & HOST_CAP_SSS) || ahci_ignore_sss)
185185
host->flags |= ATA_HOST_PARALLEL_SCAN;
186186
else
187-
printk(KERN_INFO "ahci: SSS flag set, parallel bus scan disabled\n");
187+
dev_info(dev, "SSS flag set, parallel bus scan disabled\n");
188188

189189
if (pi.flags & ATA_FLAG_EM)
190190
ahci_reset_em(host);

drivers/ata/libahci.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -778,8 +778,16 @@ static void ahci_start_port(struct ata_port *ap)
778778
rc = ap->ops->transmit_led_message(ap,
779779
emp->led_state,
780780
4);
781+
/*
782+
* If busy, give a breather but do not
783+
* release EH ownership by using msleep()
784+
* instead of ata_msleep(). EM Transmit
785+
* bit is busy for the whole host and
786+
* releasing ownership will cause other
787+
* ports to fail the same way.
788+
*/
781789
if (rc == -EBUSY)
782-
ata_msleep(ap, 1);
790+
msleep(1);
783791
else
784792
break;
785793
}

drivers/ata/libata-eh.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1322,14 +1322,14 @@ void ata_eh_qc_complete(struct ata_queued_cmd *qc)
13221322
* should be retried. To be used from EH.
13231323
*
13241324
* SCSI midlayer limits the number of retries to scmd->allowed.
1325-
* scmd->retries is decremented for commands which get retried
1325+
* scmd->allowed is incremented for commands which get retried
13261326
* due to unrelated failures (qc->err_mask is zero).
13271327
*/
13281328
void ata_eh_qc_retry(struct ata_queued_cmd *qc)
13291329
{
13301330
struct scsi_cmnd *scmd = qc->scsicmd;
1331-
if (!qc->err_mask && scmd->retries)
1332-
scmd->retries--;
1331+
if (!qc->err_mask)
1332+
scmd->allowed++;
13331333
__ata_eh_qc_complete(qc);
13341334
}
13351335

drivers/ata/pata_isapnp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ static int isapnp_init_one(struct pnp_dev *idev, const struct pnp_device_id *dev
7878

7979
ap->ioaddr.cmd_addr = cmd_addr;
8080

81-
if (pnp_port_valid(idev, 1) == 0) {
81+
if (pnp_port_valid(idev, 1)) {
8282
ctl_addr = devm_ioport_map(&idev->dev,
8383
pnp_port_start(idev, 1), 1);
8484
ap->ioaddr.altstatus_addr = ctl_addr;

0 commit comments

Comments
 (0)