diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-10-22 03:21:34 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-10-22 03:21:34 -0400 |
commit | 19eddab9d94b5a47f154b6a244c7294a505b946f (patch) | |
tree | e31464f58bef56904b19080f52a5a965b149d5d1 /drivers/ata | |
parent | ee7eafc907db64ef4cbe8a17da3a1089cbe50617 (diff) | |
parent | fa070ee6dc70bcc19737a2406d741b089b3149d5 (diff) |
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
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/ahci.c | 2 | ||||
-rw-r--r-- | drivers/ata/ahci_platform.c | 2 | ||||
-rw-r--r-- | drivers/ata/libahci.c | 10 | ||||
-rw-r--r-- | drivers/ata/libata-eh.c | 6 | ||||
-rw-r--r-- | drivers/ata/pata_isapnp.c | 2 |
5 files changed, 15 insertions, 7 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 9d715ae5ff6b..8e28f923cf7f 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c | |||
@@ -1343,7 +1343,7 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1343 | if (!(hpriv->cap & HOST_CAP_SSS) || ahci_ignore_sss) | 1343 | if (!(hpriv->cap & HOST_CAP_SSS) || ahci_ignore_sss) |
1344 | host->flags |= ATA_HOST_PARALLEL_SCAN; | 1344 | host->flags |= ATA_HOST_PARALLEL_SCAN; |
1345 | else | 1345 | 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"); |
1347 | 1347 | ||
1348 | if (pi.flags & ATA_FLAG_EM) | 1348 | if (pi.flags & ATA_FLAG_EM) |
1349 | ahci_reset_em(host); | 1349 | ahci_reset_em(host); |
diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c index 2daaee05cab1..7d3b85385bfc 100644 --- a/drivers/ata/ahci_platform.c +++ b/drivers/ata/ahci_platform.c | |||
@@ -184,7 +184,7 @@ static int ahci_probe(struct platform_device *pdev) | |||
184 | if (!(hpriv->cap & HOST_CAP_SSS) || ahci_ignore_sss) | 184 | if (!(hpriv->cap & HOST_CAP_SSS) || ahci_ignore_sss) |
185 | host->flags |= ATA_HOST_PARALLEL_SCAN; | 185 | host->flags |= ATA_HOST_PARALLEL_SCAN; |
186 | else | 186 | 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"); |
188 | 188 | ||
189 | if (pi.flags & ATA_FLAG_EM) | 189 | if (pi.flags & ATA_FLAG_EM) |
190 | ahci_reset_em(host); | 190 | ahci_reset_em(host); |
diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c index acfd0f711069..aaac4fb0d564 100644 --- a/drivers/ata/libahci.c +++ b/drivers/ata/libahci.c | |||
@@ -778,8 +778,16 @@ static void ahci_start_port(struct ata_port *ap) | |||
778 | rc = ap->ops->transmit_led_message(ap, | 778 | rc = ap->ops->transmit_led_message(ap, |
779 | emp->led_state, | 779 | emp->led_state, |
780 | 4); | 780 | 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 | */ | ||
781 | if (rc == -EBUSY) | 789 | if (rc == -EBUSY) |
782 | ata_msleep(ap, 1); | 790 | msleep(1); |
783 | else | 791 | else |
784 | break; | 792 | break; |
785 | } | 793 | } |
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index c69fcce505c0..370462fa8e01 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c | |||
@@ -1322,14 +1322,14 @@ void ata_eh_qc_complete(struct ata_queued_cmd *qc) | |||
1322 | * should be retried. To be used from EH. | 1322 | * should be retried. To be used from EH. |
1323 | * | 1323 | * |
1324 | * SCSI midlayer limits the number of retries to scmd->allowed. | 1324 | * 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 |
1326 | * due to unrelated failures (qc->err_mask is zero). | 1326 | * due to unrelated failures (qc->err_mask is zero). |
1327 | */ | 1327 | */ |
1328 | void ata_eh_qc_retry(struct ata_queued_cmd *qc) | 1328 | void ata_eh_qc_retry(struct ata_queued_cmd *qc) |
1329 | { | 1329 | { |
1330 | struct scsi_cmnd *scmd = qc->scsicmd; | 1330 | struct scsi_cmnd *scmd = qc->scsicmd; |
1331 | if (!qc->err_mask && scmd->retries) | 1331 | if (!qc->err_mask) |
1332 | scmd->retries--; | 1332 | scmd->allowed++; |
1333 | __ata_eh_qc_complete(qc); | 1333 | __ata_eh_qc_complete(qc); |
1334 | } | 1334 | } |
1335 | 1335 | ||
diff --git a/drivers/ata/pata_isapnp.c b/drivers/ata/pata_isapnp.c index 4bceb8803a10..b33d1f99b3a4 100644 --- a/drivers/ata/pata_isapnp.c +++ b/drivers/ata/pata_isapnp.c | |||
@@ -78,7 +78,7 @@ static int isapnp_init_one(struct pnp_dev *idev, const struct pnp_device_id *dev | |||
78 | 78 | ||
79 | ap->ioaddr.cmd_addr = cmd_addr; | 79 | ap->ioaddr.cmd_addr = cmd_addr; |
80 | 80 | ||
81 | if (pnp_port_valid(idev, 1) == 0) { | 81 | if (pnp_port_valid(idev, 1)) { |
82 | ctl_addr = devm_ioport_map(&idev->dev, | 82 | ctl_addr = devm_ioport_map(&idev->dev, |
83 | pnp_port_start(idev, 1), 1); | 83 | pnp_port_start(idev, 1), 1); |
84 | ap->ioaddr.altstatus_addr = ctl_addr; | 84 | ap->ioaddr.altstatus_addr = ctl_addr; |