diff options
author | Tejun Heo <tj@kernel.org> | 2013-07-02 22:54:16 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2013-07-02 22:54:16 -0400 |
commit | 5a0a6a4f17a3606289f96356383db695a555bdbd (patch) | |
tree | 0f8e206d65ef29bf81a13213af00db56c90af06c /drivers/ata | |
parent | 9bbb1b0e2a83c5b3922a050acc932ee3004e85b6 (diff) | |
parent | 1cfc7df3de10c40ed459e13cce6de616023bf41c (diff) |
Merge branch 'libata/for-3.10-fixes' into libata/for-3.11
libata/for-3.10-fixes never got submitted during v3.10 cycle. Merge
it into for-3.11 so that it can be routed together with other changes
scheduled for v3.11.
Three trivial conflicts in drivers/ata/sata_rcar.c. All are caused by
1b20f6a9ad ("sata_rcar: add 'base' local variable to some functions")
conflicting with logic updates in for-3.10-fixes. The offending
commit simply adds local variable @base on functions which
dereferences sata_rcar_priv->base multiple times. The resolutions are
trivial - applying s/priv->base/base/ in the conflicting logic
updates.
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/acard-ahci.c | 2 | ||||
-rw-r--r-- | drivers/ata/ahci.c | 5 | ||||
-rw-r--r-- | drivers/ata/ahci.h | 2 | ||||
-rw-r--r-- | drivers/ata/ata_piix.c | 19 | ||||
-rw-r--r-- | drivers/ata/libahci.c | 5 | ||||
-rw-r--r-- | drivers/ata/libata-core.c | 8 | ||||
-rw-r--r-- | drivers/ata/libata-eh.c | 2 | ||||
-rw-r--r-- | drivers/ata/libata-pmp.c | 33 | ||||
-rw-r--r-- | drivers/ata/libata-scsi.c | 2 | ||||
-rw-r--r-- | drivers/ata/libata-sff.c | 2 | ||||
-rw-r--r-- | drivers/ata/pdc_adma.c | 2 | ||||
-rw-r--r-- | drivers/ata/sata_highbank.c | 20 | ||||
-rw-r--r-- | drivers/ata/sata_promise.c | 2 | ||||
-rw-r--r-- | drivers/ata/sata_rcar.c | 25 | ||||
-rw-r--r-- | drivers/ata/sata_sil.c | 2 | ||||
-rw-r--r-- | drivers/ata/sata_sx4.c | 2 | ||||
-rw-r--r-- | drivers/ata/sata_via.c | 2 |
17 files changed, 89 insertions, 46 deletions
diff --git a/drivers/ata/acard-ahci.c b/drivers/ata/acard-ahci.c index 43365bb59d61..fd665d919df2 100644 --- a/drivers/ata/acard-ahci.c +++ b/drivers/ata/acard-ahci.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * acard-ahci.c - ACard AHCI SATA support | 3 | * acard-ahci.c - ACard AHCI SATA support |
4 | * | 4 | * |
5 | * Maintained by: Jeff Garzik <jgarzik@pobox.com> | 5 | * Maintained by: Tejun Heo <tj@kernel.org> |
6 | * Please ALWAYS copy linux-ide@vger.kernel.org | 6 | * Please ALWAYS copy linux-ide@vger.kernel.org |
7 | * on emails. | 7 | * on emails. |
8 | * | 8 | * |
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 8db82d389592..1cf6ab39e220 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * ahci.c - AHCI SATA support | 2 | * ahci.c - AHCI SATA support |
3 | * | 3 | * |
4 | * Maintained by: Jeff Garzik <jgarzik@pobox.com> | 4 | * Maintained by: Tejun Heo <tj@kernel.org> |
5 | * Please ALWAYS copy linux-ide@vger.kernel.org | 5 | * Please ALWAYS copy linux-ide@vger.kernel.org |
6 | * on emails. | 6 | * on emails. |
7 | * | 7 | * |
@@ -291,6 +291,7 @@ static const struct pci_device_id ahci_pci_tbl[] = { | |||
291 | { PCI_VDEVICE(INTEL, 0x8d64), board_ahci }, /* Wellsburg RAID */ | 291 | { PCI_VDEVICE(INTEL, 0x8d64), board_ahci }, /* Wellsburg RAID */ |
292 | { PCI_VDEVICE(INTEL, 0x8d66), board_ahci }, /* Wellsburg RAID */ | 292 | { PCI_VDEVICE(INTEL, 0x8d66), board_ahci }, /* Wellsburg RAID */ |
293 | { PCI_VDEVICE(INTEL, 0x8d6e), board_ahci }, /* Wellsburg RAID */ | 293 | { PCI_VDEVICE(INTEL, 0x8d6e), board_ahci }, /* Wellsburg RAID */ |
294 | { PCI_VDEVICE(INTEL, 0x23a3), board_ahci }, /* Coleto Creek AHCI */ | ||
294 | 295 | ||
295 | /* JMicron 360/1/3/5/6, match class to avoid IDE function */ | 296 | /* JMicron 360/1/3/5/6, match class to avoid IDE function */ |
296 | { PCI_VENDOR_ID_JMICRON, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, | 297 | { PCI_VENDOR_ID_JMICRON, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, |
@@ -423,6 +424,8 @@ static const struct pci_device_id ahci_pci_tbl[] = { | |||
423 | .driver_data = board_ahci_yes_fbs }, /* 88se9125 */ | 424 | .driver_data = board_ahci_yes_fbs }, /* 88se9125 */ |
424 | { PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x917a), | 425 | { PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x917a), |
425 | .driver_data = board_ahci_yes_fbs }, /* 88se9172 */ | 426 | .driver_data = board_ahci_yes_fbs }, /* 88se9172 */ |
427 | { PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x9172), | ||
428 | .driver_data = board_ahci_yes_fbs }, /* 88se9172 */ | ||
426 | { PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x9192), | 429 | { PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x9192), |
427 | .driver_data = board_ahci_yes_fbs }, /* 88se9172 on some Gigabyte */ | 430 | .driver_data = board_ahci_yes_fbs }, /* 88se9172 on some Gigabyte */ |
428 | { PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x91a3), | 431 | { PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x91a3), |
diff --git a/drivers/ata/ahci.h b/drivers/ata/ahci.h index adfb2df20b7a..11456371f29b 100644 --- a/drivers/ata/ahci.h +++ b/drivers/ata/ahci.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * ahci.h - Common AHCI SATA definitions and declarations | 2 | * ahci.h - Common AHCI SATA definitions and declarations |
3 | * | 3 | * |
4 | * Maintained by: Jeff Garzik <jgarzik@pobox.com> | 4 | * Maintained by: Tejun Heo <tj@kernel.org> |
5 | * Please ALWAYS copy linux-ide@vger.kernel.org | 5 | * Please ALWAYS copy linux-ide@vger.kernel.org |
6 | * on emails. | 6 | * on emails. |
7 | * | 7 | * |
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c index cab2d3a81e96..b52a10c8eeb9 100644 --- a/drivers/ata/ata_piix.c +++ b/drivers/ata/ata_piix.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * ata_piix.c - Intel PATA/SATA controllers | 2 | * ata_piix.c - Intel PATA/SATA controllers |
3 | * | 3 | * |
4 | * Maintained by: Jeff Garzik <jgarzik@pobox.com> | 4 | * Maintained by: Tejun Heo <tj@kernel.org> |
5 | * Please ALWAYS copy linux-ide@vger.kernel.org | 5 | * Please ALWAYS copy linux-ide@vger.kernel.org |
6 | * on emails. | 6 | * on emails. |
7 | * | 7 | * |
@@ -151,6 +151,7 @@ enum piix_controller_ids { | |||
151 | piix_pata_vmw, /* PIIX4 for VMware, spurious DMA_ERR */ | 151 | piix_pata_vmw, /* PIIX4 for VMware, spurious DMA_ERR */ |
152 | ich8_sata_snb, | 152 | ich8_sata_snb, |
153 | ich8_2port_sata_snb, | 153 | ich8_2port_sata_snb, |
154 | ich8_2port_sata_byt, | ||
154 | }; | 155 | }; |
155 | 156 | ||
156 | struct piix_map_db { | 157 | struct piix_map_db { |
@@ -334,6 +335,11 @@ static const struct pci_device_id piix_pci_tbl[] = { | |||
334 | { 0x8086, 0x8d60, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_snb }, | 335 | { 0x8086, 0x8d60, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_snb }, |
335 | /* SATA Controller IDE (Wellsburg) */ | 336 | /* SATA Controller IDE (Wellsburg) */ |
336 | { 0x8086, 0x8d68, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata }, | 337 | { 0x8086, 0x8d68, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata }, |
338 | /* SATA Controller IDE (BayTrail) */ | ||
339 | { 0x8086, 0x0F20, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata_byt }, | ||
340 | { 0x8086, 0x0F21, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata_byt }, | ||
341 | /* SATA Controller IDE (Coleto Creek) */ | ||
342 | { 0x8086, 0x23a6, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata }, | ||
337 | 343 | ||
338 | { } /* terminate list */ | 344 | { } /* terminate list */ |
339 | }; | 345 | }; |
@@ -441,6 +447,7 @@ static const struct piix_map_db *piix_map_db_table[] = { | |||
441 | [tolapai_sata] = &tolapai_map_db, | 447 | [tolapai_sata] = &tolapai_map_db, |
442 | [ich8_sata_snb] = &ich8_map_db, | 448 | [ich8_sata_snb] = &ich8_map_db, |
443 | [ich8_2port_sata_snb] = &ich8_2port_map_db, | 449 | [ich8_2port_sata_snb] = &ich8_2port_map_db, |
450 | [ich8_2port_sata_byt] = &ich8_2port_map_db, | ||
444 | }; | 451 | }; |
445 | 452 | ||
446 | static struct pci_bits piix_enable_bits[] = { | 453 | static struct pci_bits piix_enable_bits[] = { |
@@ -1254,6 +1261,16 @@ static struct ata_port_info piix_port_info[] = { | |||
1254 | .udma_mask = ATA_UDMA6, | 1261 | .udma_mask = ATA_UDMA6, |
1255 | .port_ops = &piix_sata_ops, | 1262 | .port_ops = &piix_sata_ops, |
1256 | }, | 1263 | }, |
1264 | |||
1265 | [ich8_2port_sata_byt] = | ||
1266 | { | ||
1267 | .flags = PIIX_SATA_FLAGS | PIIX_FLAG_SIDPR | PIIX_FLAG_PIO16, | ||
1268 | .pio_mask = ATA_PIO4, | ||
1269 | .mwdma_mask = ATA_MWDMA2, | ||
1270 | .udma_mask = ATA_UDMA6, | ||
1271 | .port_ops = &piix_sata_ops, | ||
1272 | }, | ||
1273 | |||
1257 | }; | 1274 | }; |
1258 | 1275 | ||
1259 | #define AHCI_PCI_BAR 5 | 1276 | #define AHCI_PCI_BAR 5 |
diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c index c240e4a80d2f..acfd0f711069 100644 --- a/drivers/ata/libahci.c +++ b/drivers/ata/libahci.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * libahci.c - Common AHCI SATA low-level routines | 2 | * libahci.c - Common AHCI SATA low-level routines |
3 | * | 3 | * |
4 | * Maintained by: Jeff Garzik <jgarzik@pobox.com> | 4 | * Maintained by: Tejun Heo <tj@kernel.org> |
5 | * Please ALWAYS copy linux-ide@vger.kernel.org | 5 | * Please ALWAYS copy linux-ide@vger.kernel.org |
6 | * on emails. | 6 | * on emails. |
7 | * | 7 | * |
@@ -1561,8 +1561,7 @@ static void ahci_error_intr(struct ata_port *ap, u32 irq_stat) | |||
1561 | u32 fbs = readl(port_mmio + PORT_FBS); | 1561 | u32 fbs = readl(port_mmio + PORT_FBS); |
1562 | int pmp = fbs >> PORT_FBS_DWE_OFFSET; | 1562 | int pmp = fbs >> PORT_FBS_DWE_OFFSET; |
1563 | 1563 | ||
1564 | if ((fbs & PORT_FBS_SDE) && (pmp < ap->nr_pmp_links) && | 1564 | if ((fbs & PORT_FBS_SDE) && (pmp < ap->nr_pmp_links)) { |
1565 | ata_link_online(&ap->pmp_link[pmp])) { | ||
1566 | link = &ap->pmp_link[pmp]; | 1565 | link = &ap->pmp_link[pmp]; |
1567 | fbs_need_dec = true; | 1566 | fbs_need_dec = true; |
1568 | } | 1567 | } |
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index c97a244c099a..9c3c99a995d3 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * libata-core.c - helper library for ATA | 2 | * libata-core.c - helper library for ATA |
3 | * | 3 | * |
4 | * Maintained by: Jeff Garzik <jgarzik@pobox.com> | 4 | * Maintained by: Tejun Heo <tj@kernel.org> |
5 | * Please ALWAYS copy linux-ide@vger.kernel.org | 5 | * Please ALWAYS copy linux-ide@vger.kernel.org |
6 | * on emails. | 6 | * on emails. |
7 | * | 7 | * |
@@ -1602,6 +1602,12 @@ unsigned ata_exec_internal_sg(struct ata_device *dev, | |||
1602 | qc->tf = *tf; | 1602 | qc->tf = *tf; |
1603 | if (cdb) | 1603 | if (cdb) |
1604 | memcpy(qc->cdb, cdb, ATAPI_CDB_LEN); | 1604 | memcpy(qc->cdb, cdb, ATAPI_CDB_LEN); |
1605 | |||
1606 | /* some SATA bridges need us to indicate data xfer direction */ | ||
1607 | if (tf->protocol == ATAPI_PROT_DMA && (dev->flags & ATA_DFLAG_DMADIR) && | ||
1608 | dma_dir == DMA_FROM_DEVICE) | ||
1609 | qc->tf.feature |= ATAPI_DMADIR; | ||
1610 | |||
1605 | qc->flags |= ATA_QCFLAG_RESULT_TF; | 1611 | qc->flags |= ATA_QCFLAG_RESULT_TF; |
1606 | qc->dma_dir = dma_dir; | 1612 | qc->dma_dir = dma_dir; |
1607 | if (dma_dir != DMA_NONE) { | 1613 | if (dma_dir != DMA_NONE) { |
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index f9476fb3ac43..c69fcce505c0 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * libata-eh.c - libata error handling | 2 | * libata-eh.c - libata error handling |
3 | * | 3 | * |
4 | * Maintained by: Jeff Garzik <jgarzik@pobox.com> | 4 | * Maintained by: Tejun Heo <tj@kernel.org> |
5 | * Please ALWAYS copy linux-ide@vger.kernel.org | 5 | * Please ALWAYS copy linux-ide@vger.kernel.org |
6 | * on emails. | 6 | * on emails. |
7 | * | 7 | * |
diff --git a/drivers/ata/libata-pmp.c b/drivers/ata/libata-pmp.c index 61c59ee45ce9..1c41722bb7e2 100644 --- a/drivers/ata/libata-pmp.c +++ b/drivers/ata/libata-pmp.c | |||
@@ -389,9 +389,13 @@ static void sata_pmp_quirks(struct ata_port *ap) | |||
389 | /* link reports offline after LPM */ | 389 | /* link reports offline after LPM */ |
390 | link->flags |= ATA_LFLAG_NO_LPM; | 390 | link->flags |= ATA_LFLAG_NO_LPM; |
391 | 391 | ||
392 | /* Class code report is unreliable. */ | 392 | /* |
393 | * Class code report is unreliable and SRST times | ||
394 | * out under certain configurations. | ||
395 | */ | ||
393 | if (link->pmp < 5) | 396 | if (link->pmp < 5) |
394 | link->flags |= ATA_LFLAG_ASSUME_ATA; | 397 | link->flags |= ATA_LFLAG_NO_SRST | |
398 | ATA_LFLAG_ASSUME_ATA; | ||
395 | 399 | ||
396 | /* port 5 is for SEMB device and it doesn't like SRST */ | 400 | /* port 5 is for SEMB device and it doesn't like SRST */ |
397 | if (link->pmp == 5) | 401 | if (link->pmp == 5) |
@@ -399,20 +403,17 @@ static void sata_pmp_quirks(struct ata_port *ap) | |||
399 | ATA_LFLAG_ASSUME_SEMB; | 403 | ATA_LFLAG_ASSUME_SEMB; |
400 | } | 404 | } |
401 | } else if (vendor == 0x1095 && devid == 0x4723) { | 405 | } else if (vendor == 0x1095 && devid == 0x4723) { |
402 | /* sil4723 quirks */ | 406 | /* |
403 | ata_for_each_link(link, ap, EDGE) { | 407 | * sil4723 quirks |
404 | /* link reports offline after LPM */ | 408 | * |
405 | link->flags |= ATA_LFLAG_NO_LPM; | 409 | * Link reports offline after LPM. Class code report is |
406 | 410 | * unreliable. SIMG PMPs never got SRST reliable and the | |
407 | /* class code report is unreliable */ | 411 | * config device at port 2 locks up on SRST. |
408 | if (link->pmp < 2) | 412 | */ |
409 | link->flags |= ATA_LFLAG_ASSUME_ATA; | 413 | ata_for_each_link(link, ap, EDGE) |
410 | 414 | link->flags |= ATA_LFLAG_NO_LPM | | |
411 | /* the config device at port 2 locks up on SRST */ | 415 | ATA_LFLAG_NO_SRST | |
412 | if (link->pmp == 2) | 416 | ATA_LFLAG_ASSUME_ATA; |
413 | link->flags |= ATA_LFLAG_NO_SRST | | ||
414 | ATA_LFLAG_ASSUME_ATA; | ||
415 | } | ||
416 | } else if (vendor == 0x1095 && devid == 0x4726) { | 417 | } else if (vendor == 0x1095 && devid == 0x4726) { |
417 | /* sil4726 quirks */ | 418 | /* sil4726 quirks */ |
418 | ata_for_each_link(link, ap, EDGE) { | 419 | ata_for_each_link(link, ap, EDGE) { |
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 006f1bf9d78b..83c08907e042 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * libata-scsi.c - helper library for ATA | 2 | * libata-scsi.c - helper library for ATA |
3 | * | 3 | * |
4 | * Maintained by: Jeff Garzik <jgarzik@pobox.com> | 4 | * Maintained by: Tejun Heo <tj@kernel.org> |
5 | * Please ALWAYS copy linux-ide@vger.kernel.org | 5 | * Please ALWAYS copy linux-ide@vger.kernel.org |
6 | * on emails. | 6 | * on emails. |
7 | * | 7 | * |
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c index d8af325a6bda..b603720b877d 100644 --- a/drivers/ata/libata-sff.c +++ b/drivers/ata/libata-sff.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * libata-sff.c - helper library for PCI IDE BMDMA | 2 | * libata-sff.c - helper library for PCI IDE BMDMA |
3 | * | 3 | * |
4 | * Maintained by: Jeff Garzik <jgarzik@pobox.com> | 4 | * Maintained by: Tejun Heo <tj@kernel.org> |
5 | * Please ALWAYS copy linux-ide@vger.kernel.org | 5 | * Please ALWAYS copy linux-ide@vger.kernel.org |
6 | * on emails. | 6 | * on emails. |
7 | * | 7 | * |
diff --git a/drivers/ata/pdc_adma.c b/drivers/ata/pdc_adma.c index 505333340ad5..8ea6e6afd041 100644 --- a/drivers/ata/pdc_adma.c +++ b/drivers/ata/pdc_adma.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * pdc_adma.c - Pacific Digital Corporation ADMA | 2 | * pdc_adma.c - Pacific Digital Corporation ADMA |
3 | * | 3 | * |
4 | * Maintained by: Mark Lord <mlord@pobox.com> | 4 | * Maintained by: Tejun Heo <tj@kernel.org> |
5 | * | 5 | * |
6 | * Copyright 2005 Mark Lord | 6 | * Copyright 2005 Mark Lord |
7 | * | 7 | * |
diff --git a/drivers/ata/sata_highbank.c b/drivers/ata/sata_highbank.c index 8de8ac80335b..d047d92a456f 100644 --- a/drivers/ata/sata_highbank.c +++ b/drivers/ata/sata_highbank.c | |||
@@ -339,10 +339,26 @@ static int highbank_initialize_phys(struct device *dev, void __iomem *addr) | |||
339 | return 0; | 339 | return 0; |
340 | } | 340 | } |
341 | 341 | ||
342 | /* | ||
343 | * The Calxeda SATA phy intermittently fails to bring up a link with Gen3 | ||
344 | * Retrying the phy hard reset can work around the issue, but the drive | ||
345 | * may fail again. In less than 150 out of 15000 test runs, it took more | ||
346 | * than 10 tries for the link to be established (but never more than 35). | ||
347 | * Triple the maximum observed retry count to provide plenty of margin for | ||
348 | * rare events and to guarantee that the link is established. | ||
349 | * | ||
350 | * Also, the default 2 second time-out on a failed drive is too long in | ||
351 | * this situation. The uboot implementation of the same driver function | ||
352 | * uses a much shorter time-out period and never experiences a time out | ||
353 | * issue. Reducing the time-out to 500ms improves the responsiveness. | ||
354 | * The other timing constants were kept the same as the stock AHCI driver. | ||
355 | * This change was also tested 15000 times on 24 drives and none of them | ||
356 | * experienced a time out. | ||
357 | */ | ||
342 | static int ahci_highbank_hardreset(struct ata_link *link, unsigned int *class, | 358 | static int ahci_highbank_hardreset(struct ata_link *link, unsigned int *class, |
343 | unsigned long deadline) | 359 | unsigned long deadline) |
344 | { | 360 | { |
345 | const unsigned long *timing = sata_ehc_deb_timing(&link->eh_context); | 361 | static const unsigned long timing[] = { 5, 100, 500}; |
346 | struct ata_port *ap = link->ap; | 362 | struct ata_port *ap = link->ap; |
347 | struct ahci_port_priv *pp = ap->private_data; | 363 | struct ahci_port_priv *pp = ap->private_data; |
348 | u8 *d2h_fis = pp->rx_fis + RX_FIS_D2H_REG; | 364 | u8 *d2h_fis = pp->rx_fis + RX_FIS_D2H_REG; |
@@ -350,7 +366,7 @@ static int ahci_highbank_hardreset(struct ata_link *link, unsigned int *class, | |||
350 | bool online; | 366 | bool online; |
351 | u32 sstatus; | 367 | u32 sstatus; |
352 | int rc; | 368 | int rc; |
353 | int retry = 10; | 369 | int retry = 100; |
354 | 370 | ||
355 | ahci_stop_engine(ap); | 371 | ahci_stop_engine(ap); |
356 | 372 | ||
diff --git a/drivers/ata/sata_promise.c b/drivers/ata/sata_promise.c index fb0dd87f8893..958ba2a420c3 100644 --- a/drivers/ata/sata_promise.c +++ b/drivers/ata/sata_promise.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * sata_promise.c - Promise SATA | 2 | * sata_promise.c - Promise SATA |
3 | * | 3 | * |
4 | * Maintained by: Jeff Garzik <jgarzik@pobox.com> | 4 | * Maintained by: Tejun Heo <tj@kernel.org> |
5 | * Mikael Pettersson <mikpe@it.uu.se> | 5 | * Mikael Pettersson <mikpe@it.uu.se> |
6 | * Please ALWAYS copy linux-ide@vger.kernel.org | 6 | * Please ALWAYS copy linux-ide@vger.kernel.org |
7 | * on emails. | 7 | * on emails. |
diff --git a/drivers/ata/sata_rcar.c b/drivers/ata/sata_rcar.c index f0d3e43570ee..8108eb065444 100644 --- a/drivers/ata/sata_rcar.c +++ b/drivers/ata/sata_rcar.c | |||
@@ -186,7 +186,7 @@ static void sata_rcar_thaw(struct ata_port *ap) | |||
186 | void __iomem *base = priv->base; | 186 | void __iomem *base = priv->base; |
187 | 187 | ||
188 | /* ack */ | 188 | /* ack */ |
189 | iowrite32(~SATA_RCAR_INT_MASK, base + SATAINTSTAT_REG); | 189 | iowrite32(~(u32)SATA_RCAR_INT_MASK, base + SATAINTSTAT_REG); |
190 | 190 | ||
191 | ata_sff_thaw(ap); | 191 | ata_sff_thaw(ap); |
192 | 192 | ||
@@ -545,6 +545,7 @@ static void sata_rcar_bmdma_start(struct ata_queued_cmd *qc) | |||
545 | 545 | ||
546 | /* start host DMA transaction */ | 546 | /* start host DMA transaction */ |
547 | dmactl = ioread32(base + ATAPI_CONTROL1_REG); | 547 | dmactl = ioread32(base + ATAPI_CONTROL1_REG); |
548 | dmactl &= ~ATAPI_CONTROL1_STOP; | ||
548 | dmactl |= ATAPI_CONTROL1_START; | 549 | dmactl |= ATAPI_CONTROL1_START; |
549 | iowrite32(dmactl, base + ATAPI_CONTROL1_REG); | 550 | iowrite32(dmactl, base + ATAPI_CONTROL1_REG); |
550 | } | 551 | } |
@@ -622,17 +623,16 @@ static struct ata_port_operations sata_rcar_port_ops = { | |||
622 | .bmdma_status = sata_rcar_bmdma_status, | 623 | .bmdma_status = sata_rcar_bmdma_status, |
623 | }; | 624 | }; |
624 | 625 | ||
625 | static int sata_rcar_serr_interrupt(struct ata_port *ap) | 626 | static void sata_rcar_serr_interrupt(struct ata_port *ap) |
626 | { | 627 | { |
627 | struct sata_rcar_priv *priv = ap->host->private_data; | 628 | struct sata_rcar_priv *priv = ap->host->private_data; |
628 | struct ata_eh_info *ehi = &ap->link.eh_info; | 629 | struct ata_eh_info *ehi = &ap->link.eh_info; |
629 | int freeze = 0; | 630 | int freeze = 0; |
630 | int handled = 0; | ||
631 | u32 serror; | 631 | u32 serror; |
632 | 632 | ||
633 | serror = ioread32(priv->base + SCRSERR_REG); | 633 | serror = ioread32(priv->base + SCRSERR_REG); |
634 | if (!serror) | 634 | if (!serror) |
635 | return 0; | 635 | return; |
636 | 636 | ||
637 | DPRINTK("SError @host_intr: 0x%x\n", serror); | 637 | DPRINTK("SError @host_intr: 0x%x\n", serror); |
638 | 638 | ||
@@ -645,7 +645,6 @@ static int sata_rcar_serr_interrupt(struct ata_port *ap) | |||
645 | ata_ehi_push_desc(ehi, "%s", "hotplug"); | 645 | ata_ehi_push_desc(ehi, "%s", "hotplug"); |
646 | 646 | ||
647 | freeze = serror & SERR_COMM_WAKE ? 0 : 1; | 647 | freeze = serror & SERR_COMM_WAKE ? 0 : 1; |
648 | handled = 1; | ||
649 | } | 648 | } |
650 | 649 | ||
651 | /* freeze or abort */ | 650 | /* freeze or abort */ |
@@ -653,11 +652,9 @@ static int sata_rcar_serr_interrupt(struct ata_port *ap) | |||
653 | ata_port_freeze(ap); | 652 | ata_port_freeze(ap); |
654 | else | 653 | else |
655 | ata_port_abort(ap); | 654 | ata_port_abort(ap); |
656 | |||
657 | return handled; | ||
658 | } | 655 | } |
659 | 656 | ||
660 | static int sata_rcar_ata_interrupt(struct ata_port *ap) | 657 | static void sata_rcar_ata_interrupt(struct ata_port *ap) |
661 | { | 658 | { |
662 | struct ata_queued_cmd *qc; | 659 | struct ata_queued_cmd *qc; |
663 | int handled = 0; | 660 | int handled = 0; |
@@ -666,7 +663,9 @@ static int sata_rcar_ata_interrupt(struct ata_port *ap) | |||
666 | if (qc) | 663 | if (qc) |
667 | handled |= ata_bmdma_port_intr(ap, qc); | 664 | handled |= ata_bmdma_port_intr(ap, qc); |
668 | 665 | ||
669 | return handled; | 666 | /* be sure to clear ATA interrupt */ |
667 | if (!handled) | ||
668 | sata_rcar_check_status(ap); | ||
670 | } | 669 | } |
671 | 670 | ||
672 | static irqreturn_t sata_rcar_interrupt(int irq, void *dev_instance) | 671 | static irqreturn_t sata_rcar_interrupt(int irq, void *dev_instance) |
@@ -682,19 +681,21 @@ static irqreturn_t sata_rcar_interrupt(int irq, void *dev_instance) | |||
682 | spin_lock_irqsave(&host->lock, flags); | 681 | spin_lock_irqsave(&host->lock, flags); |
683 | 682 | ||
684 | sataintstat = ioread32(base + SATAINTSTAT_REG); | 683 | sataintstat = ioread32(base + SATAINTSTAT_REG); |
684 | sataintstat &= SATA_RCAR_INT_MASK; | ||
685 | if (!sataintstat) | 685 | if (!sataintstat) |
686 | goto done; | 686 | goto done; |
687 | /* ack */ | 687 | /* ack */ |
688 | iowrite32(sataintstat & ~SATA_RCAR_INT_MASK, base + SATAINTSTAT_REG); | 688 | iowrite32(~sataintstat & 0x7ff, base + SATAINTSTAT_REG); |
689 | 689 | ||
690 | ap = host->ports[0]; | 690 | ap = host->ports[0]; |
691 | 691 | ||
692 | if (sataintstat & SATAINTSTAT_ATA) | 692 | if (sataintstat & SATAINTSTAT_ATA) |
693 | handled |= sata_rcar_ata_interrupt(ap); | 693 | sata_rcar_ata_interrupt(ap); |
694 | 694 | ||
695 | if (sataintstat & SATAINTSTAT_SERR) | 695 | if (sataintstat & SATAINTSTAT_SERR) |
696 | handled |= sata_rcar_serr_interrupt(ap); | 696 | sata_rcar_serr_interrupt(ap); |
697 | 697 | ||
698 | handled = 1; | ||
698 | done: | 699 | done: |
699 | spin_unlock_irqrestore(&host->lock, flags); | 700 | spin_unlock_irqrestore(&host->lock, flags); |
700 | 701 | ||
diff --git a/drivers/ata/sata_sil.c b/drivers/ata/sata_sil.c index a6da219357eb..d67fc351343c 100644 --- a/drivers/ata/sata_sil.c +++ b/drivers/ata/sata_sil.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * sata_sil.c - Silicon Image SATA | 2 | * sata_sil.c - Silicon Image SATA |
3 | * | 3 | * |
4 | * Maintained by: Jeff Garzik <jgarzik@pobox.com> | 4 | * Maintained by: Tejun Heo <tj@kernel.org> |
5 | * Please ALWAYS copy linux-ide@vger.kernel.org | 5 | * Please ALWAYS copy linux-ide@vger.kernel.org |
6 | * on emails. | 6 | * on emails. |
7 | * | 7 | * |
diff --git a/drivers/ata/sata_sx4.c b/drivers/ata/sata_sx4.c index 7b7127a58f51..9947010afc0f 100644 --- a/drivers/ata/sata_sx4.c +++ b/drivers/ata/sata_sx4.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * sata_sx4.c - Promise SATA | 2 | * sata_sx4.c - Promise SATA |
3 | * | 3 | * |
4 | * Maintained by: Jeff Garzik <jgarzik@pobox.com> | 4 | * Maintained by: Tejun Heo <tj@kernel.org> |
5 | * Please ALWAYS copy linux-ide@vger.kernel.org | 5 | * Please ALWAYS copy linux-ide@vger.kernel.org |
6 | * on emails. | 6 | * on emails. |
7 | * | 7 | * |
diff --git a/drivers/ata/sata_via.c b/drivers/ata/sata_via.c index 5913ea9d57b2..87f056e54a9d 100644 --- a/drivers/ata/sata_via.c +++ b/drivers/ata/sata_via.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * sata_via.c - VIA Serial ATA controllers | 2 | * sata_via.c - VIA Serial ATA controllers |
3 | * | 3 | * |
4 | * Maintained by: Jeff Garzik <jgarzik@pobox.com> | 4 | * Maintained by: Tejun Heo <tj@kernel.org> |
5 | * Please ALWAYS copy linux-ide@vger.kernel.org | 5 | * Please ALWAYS copy linux-ide@vger.kernel.org |
6 | * on emails. | 6 | * on emails. |
7 | * | 7 | * |