diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-28 16:54:55 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-28 16:54:55 -0400 |
| commit | 494e2fbe1f8bee22ab2070bd6f4d1a24f7d5fd8b (patch) | |
| tree | bda9ccabb49502ea64427c2958a69b7aa9069c6b | |
| parent | f18194275c39835cb84563500995e0d503a32d9a (diff) | |
| parent | 55ee67f837882f28a900705a2ca1af257ab6c53d (diff) | |
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
libata-sff: remove harmful BUG_ON from ata_bmdma_qc_issue
sata_mv: fix broken DSM/TRIM support (v2)
libata: be less of a drama queen on empty data commands
[libata] sata_dwc_460ex: signdness bug
ahci: add HFLAG_YES_FBS and apply it to 88SE9128
libata: remove no longer needed pata_winbond driver
pata_cmd64x: revert commit d62f5576
| -rw-r--r-- | drivers/ata/Kconfig | 1 | ||||
| -rw-r--r-- | drivers/ata/Makefile | 1 | ||||
| -rw-r--r-- | drivers/ata/ahci.c | 11 | ||||
| -rw-r--r-- | drivers/ata/ahci.h | 1 | ||||
| -rw-r--r-- | drivers/ata/libahci.c | 16 | ||||
| -rw-r--r-- | drivers/ata/libata-core.c | 11 | ||||
| -rw-r--r-- | drivers/ata/libata-sff.c | 4 | ||||
| -rw-r--r-- | drivers/ata/pata_cmd64x.c | 6 | ||||
| -rw-r--r-- | drivers/ata/pata_legacy.c | 15 | ||||
| -rw-r--r-- | drivers/ata/pata_winbond.c | 282 | ||||
| -rw-r--r-- | drivers/ata/sata_dwc_460ex.c | 2 | ||||
| -rw-r--r-- | drivers/ata/sata_mv.c | 44 |
12 files changed, 85 insertions, 309 deletions
diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig index 65e3e2708371..11ec911016c6 100644 --- a/drivers/ata/Kconfig +++ b/drivers/ata/Kconfig | |||
| @@ -828,6 +828,7 @@ config PATA_SAMSUNG_CF | |||
| 828 | config PATA_WINBOND_VLB | 828 | config PATA_WINBOND_VLB |
| 829 | tristate "Winbond W83759A VLB PATA support (Experimental)" | 829 | tristate "Winbond W83759A VLB PATA support (Experimental)" |
| 830 | depends on ISA && EXPERIMENTAL | 830 | depends on ISA && EXPERIMENTAL |
| 831 | select PATA_LEGACY | ||
| 831 | help | 832 | help |
| 832 | Support for the Winbond W83759A controller on Vesa Local Bus | 833 | Support for the Winbond W83759A controller on Vesa Local Bus |
| 833 | systems. | 834 | systems. |
diff --git a/drivers/ata/Makefile b/drivers/ata/Makefile index 158eaa961b1e..d5df04a395ca 100644 --- a/drivers/ata/Makefile +++ b/drivers/ata/Makefile | |||
| @@ -89,7 +89,6 @@ obj-$(CONFIG_PATA_QDI) += pata_qdi.o | |||
| 89 | obj-$(CONFIG_PATA_RB532) += pata_rb532_cf.o | 89 | obj-$(CONFIG_PATA_RB532) += pata_rb532_cf.o |
| 90 | obj-$(CONFIG_PATA_RZ1000) += pata_rz1000.o | 90 | obj-$(CONFIG_PATA_RZ1000) += pata_rz1000.o |
| 91 | obj-$(CONFIG_PATA_SAMSUNG_CF) += pata_samsung_cf.o | 91 | obj-$(CONFIG_PATA_SAMSUNG_CF) += pata_samsung_cf.o |
| 92 | obj-$(CONFIG_PATA_WINBOND_VLB) += pata_winbond.o | ||
| 93 | 92 | ||
| 94 | obj-$(CONFIG_PATA_PXA) += pata_pxa.o | 93 | obj-$(CONFIG_PATA_PXA) += pata_pxa.o |
| 95 | 94 | ||
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index fe75d8befc3a..013727b20417 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c | |||
| @@ -60,6 +60,7 @@ enum board_ids { | |||
| 60 | board_ahci, | 60 | board_ahci, |
| 61 | board_ahci_ign_iferr, | 61 | board_ahci_ign_iferr, |
| 62 | board_ahci_nosntf, | 62 | board_ahci_nosntf, |
| 63 | board_ahci_yes_fbs, | ||
| 63 | 64 | ||
| 64 | /* board IDs for specific chipsets in alphabetical order */ | 65 | /* board IDs for specific chipsets in alphabetical order */ |
| 65 | board_ahci_mcp65, | 66 | board_ahci_mcp65, |
| @@ -132,6 +133,14 @@ static const struct ata_port_info ahci_port_info[] = { | |||
| 132 | .udma_mask = ATA_UDMA6, | 133 | .udma_mask = ATA_UDMA6, |
| 133 | .port_ops = &ahci_ops, | 134 | .port_ops = &ahci_ops, |
| 134 | }, | 135 | }, |
| 136 | [board_ahci_yes_fbs] = | ||
| 137 | { | ||
| 138 | AHCI_HFLAGS (AHCI_HFLAG_YES_FBS), | ||
| 139 | .flags = AHCI_FLAG_COMMON, | ||
| 140 | .pio_mask = ATA_PIO4, | ||
| 141 | .udma_mask = ATA_UDMA6, | ||
| 142 | .port_ops = &ahci_ops, | ||
| 143 | }, | ||
| 135 | /* by chipsets */ | 144 | /* by chipsets */ |
| 136 | [board_ahci_mcp65] = | 145 | [board_ahci_mcp65] = |
| 137 | { | 146 | { |
| @@ -362,6 +371,8 @@ static const struct pci_device_id ahci_pci_tbl[] = { | |||
| 362 | /* Marvell */ | 371 | /* Marvell */ |
| 363 | { PCI_VDEVICE(MARVELL, 0x6145), board_ahci_mv }, /* 6145 */ | 372 | { PCI_VDEVICE(MARVELL, 0x6145), board_ahci_mv }, /* 6145 */ |
| 364 | { PCI_VDEVICE(MARVELL, 0x6121), board_ahci_mv }, /* 6121 */ | 373 | { PCI_VDEVICE(MARVELL, 0x6121), board_ahci_mv }, /* 6121 */ |
| 374 | { PCI_DEVICE(0x1b4b, 0x9123), | ||
| 375 | .driver_data = board_ahci_yes_fbs }, /* 88se9128 */ | ||
| 365 | 376 | ||
| 366 | /* Promise */ | 377 | /* Promise */ |
| 367 | { PCI_VDEVICE(PROMISE, 0x3f20), board_ahci }, /* PDC42819 */ | 378 | { PCI_VDEVICE(PROMISE, 0x3f20), board_ahci }, /* PDC42819 */ |
diff --git a/drivers/ata/ahci.h b/drivers/ata/ahci.h index 7113c5724471..474427b6f99f 100644 --- a/drivers/ata/ahci.h +++ b/drivers/ata/ahci.h | |||
| @@ -209,6 +209,7 @@ enum { | |||
| 209 | link offline */ | 209 | link offline */ |
| 210 | AHCI_HFLAG_NO_SNTF = (1 << 12), /* no sntf */ | 210 | AHCI_HFLAG_NO_SNTF = (1 << 12), /* no sntf */ |
| 211 | AHCI_HFLAG_NO_FPDMA_AA = (1 << 13), /* no FPDMA AA */ | 211 | AHCI_HFLAG_NO_FPDMA_AA = (1 << 13), /* no FPDMA AA */ |
| 212 | AHCI_HFLAG_YES_FBS = (1 << 14), /* force FBS cap on */ | ||
| 212 | 213 | ||
| 213 | /* ap->flags bits */ | 214 | /* ap->flags bits */ |
| 214 | 215 | ||
diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c index 81e772a94d59..666850d31df2 100644 --- a/drivers/ata/libahci.c +++ b/drivers/ata/libahci.c | |||
| @@ -430,6 +430,12 @@ void ahci_save_initial_config(struct device *dev, | |||
| 430 | cap &= ~HOST_CAP_SNTF; | 430 | cap &= ~HOST_CAP_SNTF; |
| 431 | } | 431 | } |
| 432 | 432 | ||
| 433 | if (!(cap & HOST_CAP_FBS) && (hpriv->flags & AHCI_HFLAG_YES_FBS)) { | ||
| 434 | dev_printk(KERN_INFO, dev, | ||
| 435 | "controller can do FBS, turning on CAP_FBS\n"); | ||
| 436 | cap |= HOST_CAP_FBS; | ||
| 437 | } | ||
| 438 | |||
| 433 | if (force_port_map && port_map != force_port_map) { | 439 | if (force_port_map && port_map != force_port_map) { |
| 434 | dev_printk(KERN_INFO, dev, "forcing port_map 0x%x -> 0x%x\n", | 440 | dev_printk(KERN_INFO, dev, "forcing port_map 0x%x -> 0x%x\n", |
| 435 | port_map, force_port_map); | 441 | port_map, force_port_map); |
| @@ -2036,9 +2042,15 @@ static int ahci_port_start(struct ata_port *ap) | |||
| 2036 | u32 cmd = readl(port_mmio + PORT_CMD); | 2042 | u32 cmd = readl(port_mmio + PORT_CMD); |
| 2037 | if (cmd & PORT_CMD_FBSCP) | 2043 | if (cmd & PORT_CMD_FBSCP) |
| 2038 | pp->fbs_supported = true; | 2044 | pp->fbs_supported = true; |
| 2039 | else | 2045 | else if (hpriv->flags & AHCI_HFLAG_YES_FBS) { |
| 2046 | dev_printk(KERN_INFO, dev, | ||
| 2047 | "port %d can do FBS, forcing FBSCP\n", | ||
| 2048 | ap->port_no); | ||
| 2049 | pp->fbs_supported = true; | ||
| 2050 | } else | ||
| 2040 | dev_printk(KERN_WARNING, dev, | 2051 | dev_printk(KERN_WARNING, dev, |
| 2041 | "The port is not capable of FBS\n"); | 2052 | "port %d is not capable of FBS\n", |
| 2053 | ap->port_no); | ||
| 2042 | } | 2054 | } |
| 2043 | 2055 | ||
| 2044 | if (pp->fbs_supported) { | 2056 | if (pp->fbs_supported) { |
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 7ef7c4f216fa..c035b3d041ee 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
| @@ -5111,15 +5111,18 @@ void ata_qc_issue(struct ata_queued_cmd *qc) | |||
| 5111 | qc->flags |= ATA_QCFLAG_ACTIVE; | 5111 | qc->flags |= ATA_QCFLAG_ACTIVE; |
| 5112 | ap->qc_active |= 1 << qc->tag; | 5112 | ap->qc_active |= 1 << qc->tag; |
| 5113 | 5113 | ||
| 5114 | /* We guarantee to LLDs that they will have at least one | 5114 | /* |
| 5115 | * We guarantee to LLDs that they will have at least one | ||
| 5115 | * non-zero sg if the command is a data command. | 5116 | * non-zero sg if the command is a data command. |
| 5116 | */ | 5117 | */ |
| 5117 | BUG_ON(ata_is_data(prot) && (!qc->sg || !qc->n_elem || !qc->nbytes)); | 5118 | if (WARN_ON_ONCE(ata_is_data(prot) && |
| 5119 | (!qc->sg || !qc->n_elem || !qc->nbytes))) | ||
| 5120 | goto sys_err; | ||
| 5118 | 5121 | ||
| 5119 | if (ata_is_dma(prot) || (ata_is_pio(prot) && | 5122 | if (ata_is_dma(prot) || (ata_is_pio(prot) && |
| 5120 | (ap->flags & ATA_FLAG_PIO_DMA))) | 5123 | (ap->flags & ATA_FLAG_PIO_DMA))) |
| 5121 | if (ata_sg_setup(qc)) | 5124 | if (ata_sg_setup(qc)) |
| 5122 | goto sg_err; | 5125 | goto sys_err; |
| 5123 | 5126 | ||
| 5124 | /* if device is sleeping, schedule reset and abort the link */ | 5127 | /* if device is sleeping, schedule reset and abort the link */ |
| 5125 | if (unlikely(qc->dev->flags & ATA_DFLAG_SLEEPING)) { | 5128 | if (unlikely(qc->dev->flags & ATA_DFLAG_SLEEPING)) { |
| @@ -5136,7 +5139,7 @@ void ata_qc_issue(struct ata_queued_cmd *qc) | |||
| 5136 | goto err; | 5139 | goto err; |
| 5137 | return; | 5140 | return; |
| 5138 | 5141 | ||
| 5139 | sg_err: | 5142 | sys_err: |
| 5140 | qc->err_mask |= AC_ERR_SYSTEM; | 5143 | qc->err_mask |= AC_ERR_SYSTEM; |
| 5141 | err: | 5144 | err: |
| 5142 | ata_qc_complete(qc); | 5145 | ata_qc_complete(qc); |
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c index 674c1436491f..3b82d8ef76f0 100644 --- a/drivers/ata/libata-sff.c +++ b/drivers/ata/libata-sff.c | |||
| @@ -2735,10 +2735,6 @@ unsigned int ata_bmdma_qc_issue(struct ata_queued_cmd *qc) | |||
| 2735 | { | 2735 | { |
| 2736 | struct ata_port *ap = qc->ap; | 2736 | struct ata_port *ap = qc->ap; |
| 2737 | 2737 | ||
| 2738 | /* see ata_dma_blacklisted() */ | ||
| 2739 | BUG_ON((ap->flags & ATA_FLAG_PIO_POLLING) && | ||
| 2740 | qc->tf.protocol == ATAPI_PROT_DMA); | ||
| 2741 | |||
| 2742 | /* defer PIO handling to sff_qc_issue */ | 2738 | /* defer PIO handling to sff_qc_issue */ |
| 2743 | if (!ata_is_dma(qc->tf.protocol)) | 2739 | if (!ata_is_dma(qc->tf.protocol)) |
| 2744 | return ata_sff_qc_issue(qc); | 2740 | return ata_sff_qc_issue(qc); |
diff --git a/drivers/ata/pata_cmd64x.c b/drivers/ata/pata_cmd64x.c index 9f5da1c7454b..905ff76d3cbb 100644 --- a/drivers/ata/pata_cmd64x.c +++ b/drivers/ata/pata_cmd64x.c | |||
| @@ -121,14 +121,8 @@ static v | |||
