diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-12 19:16:41 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-12 19:16:41 -0400 |
commit | ab9c232286c2b77be78441c2d8396500b045777e (patch) | |
tree | 17570e159e4fb1ba36f1c363a7abef9b55909275 /drivers/ata/pata_pdc202xx_old.c | |
parent | 8bd0983e05757e5c1f7a3342cd09badae93c167d (diff) | |
parent | 2855568b1ee4f58ef2c0a13ddfceb4b0b216b7ed (diff) |
Merge branch 'upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev: (119 commits)
[libata] struct pci_dev related cleanups
libata: use ata_exec_internal() for PMP register access
libata: implement ATA_PFLAG_RESETTING
libata: add @timeout to ata_exec_internal[_sg]()
ahci: fix notification handling
ahci: clean up PORT_IRQ_BAD_PMP enabling
ahci: kill leftover from enabling NCQ over PMP
libata: wrap schedule_timeout_uninterruptible() in loop
libata: skip suppress reporting if ATA_EHI_QUIET
libata: clear ehi description after initial host report
pata_jmicron: match vendor and class code only
libata: add ST9160821AS / 3.ALD to NCQ blacklist
pata_acpi: ACPI driver support
libata-core: Expose gtm methods for driver use
libata: add HDT722516DLA380 to NCQ blacklist
libata: blacklist NCQ on Seagate Barracuda ST380817AS
[libata] Turn on ACPI by default
libata_scsi: Fix ATAPI transfer lengths
libata: correct handling of SRST reset sequences
libata: Integrate ACPI-based PATA/SATA hotplug - version 5
...
Diffstat (limited to 'drivers/ata/pata_pdc202xx_old.c')
-rw-r--r-- | drivers/ata/pata_pdc202xx_old.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/ata/pata_pdc202xx_old.c b/drivers/ata/pata_pdc202xx_old.c index 92447bed5e77..65d951618c60 100644 --- a/drivers/ata/pata_pdc202xx_old.c +++ b/drivers/ata/pata_pdc202xx_old.c | |||
@@ -9,7 +9,7 @@ | |||
9 | * First cut with LBA48/ATAPI | 9 | * First cut with LBA48/ATAPI |
10 | * | 10 | * |
11 | * TODO: | 11 | * TODO: |
12 | * Channel interlock/reset on both required | 12 | * Channel interlock/reset on both required ? |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
@@ -22,7 +22,7 @@ | |||
22 | #include <linux/libata.h> | 22 | #include <linux/libata.h> |
23 | 23 | ||
24 | #define DRV_NAME "pata_pdc202xx_old" | 24 | #define DRV_NAME "pata_pdc202xx_old" |
25 | #define DRV_VERSION "0.4.2" | 25 | #define DRV_VERSION "0.4.3" |
26 | 26 | ||
27 | static int pdc2026x_cable_detect(struct ata_port *ap) | 27 | static int pdc2026x_cable_detect(struct ata_port *ap) |
28 | { | 28 | { |
@@ -106,9 +106,9 @@ static void pdc202xx_set_dmamode(struct ata_port *ap, struct ata_device *adev) | |||
106 | { 0x20, 0x01 } | 106 | { 0x20, 0x01 } |
107 | }; | 107 | }; |
108 | static u8 mdma_timing[3][2] = { | 108 | static u8 mdma_timing[3][2] = { |
109 | { 0x60, 0x03 }, | ||
110 | { 0x60, 0x04 }, | ||
111 | { 0xe0, 0x0f }, | 109 | { 0xe0, 0x0f }, |
110 | { 0x60, 0x04 }, | ||
111 | { 0x60, 0x03 }, | ||
112 | }; | 112 | }; |
113 | u8 r_bp, r_cp; | 113 | u8 r_bp, r_cp; |
114 | 114 | ||
@@ -139,6 +139,9 @@ static void pdc202xx_set_dmamode(struct ata_port *ap, struct ata_device *adev) | |||
139 | * | 139 | * |
140 | * In UDMA3 or higher we have to clock switch for the duration of the | 140 | * In UDMA3 or higher we have to clock switch for the duration of the |
141 | * DMA transfer sequence. | 141 | * DMA transfer sequence. |
142 | * | ||
143 | * Note: The host lock held by the libata layer protects | ||
144 | * us from two channels both trying to set DMA bits at once | ||
142 | */ | 145 | */ |
143 | 146 | ||
144 | static void pdc2026x_bmdma_start(struct ata_queued_cmd *qc) | 147 | static void pdc2026x_bmdma_start(struct ata_queued_cmd *qc) |
@@ -187,6 +190,9 @@ static void pdc2026x_bmdma_start(struct ata_queued_cmd *qc) | |||
187 | * | 190 | * |
188 | * After a DMA completes we need to put the clock back to 33MHz for | 191 | * After a DMA completes we need to put the clock back to 33MHz for |
189 | * PIO timings. | 192 | * PIO timings. |
193 | * | ||
194 | * Note: The host lock held by the libata layer protects | ||
195 | * us from two channels both trying to set DMA bits at once | ||
190 | */ | 196 | */ |
191 | 197 | ||
192 | static void pdc2026x_bmdma_stop(struct ata_queued_cmd *qc) | 198 | static void pdc2026x_bmdma_stop(struct ata_queued_cmd *qc) |
@@ -206,7 +212,6 @@ static void pdc2026x_bmdma_stop(struct ata_queued_cmd *qc) | |||
206 | iowrite32(0, atapi_reg); | 212 | iowrite32(0, atapi_reg); |
207 | iowrite8(ioread8(clock) & ~sel66, clock); | 213 | iowrite8(ioread8(clock) & ~sel66, clock); |
208 | } | 214 | } |
209 | /* Check we keep host level locking here */ | ||
210 | /* Flip back to 33Mhz for PIO */ | 215 | /* Flip back to 33Mhz for PIO */ |
211 | if (adev->dma_mode >= XFER_UDMA_2) | 216 | if (adev->dma_mode >= XFER_UDMA_2) |
212 | iowrite8(ioread8(clock) & ~sel66, clock); | 217 | iowrite8(ioread8(clock) & ~sel66, clock); |
@@ -247,7 +252,6 @@ static struct scsi_host_template pdc202xx_sht = { | |||
247 | }; | 252 | }; |
248 | 253 | ||
249 | static struct ata_port_operations pdc2024x_port_ops = { | 254 | static struct ata_port_operations pdc2024x_port_ops = { |
250 | .port_disable = ata_port_disable, | ||
251 | .set_piomode = pdc202xx_set_piomode, | 255 | .set_piomode = pdc202xx_set_piomode, |
252 | .set_dmamode = pdc202xx_set_dmamode, | 256 | .set_dmamode = pdc202xx_set_dmamode, |
253 | .mode_filter = ata_pci_default_filter, | 257 | .mode_filter = ata_pci_default_filter, |
@@ -275,13 +279,11 @@ static struct ata_port_operations pdc2024x_port_ops = { | |||
275 | .irq_handler = ata_interrupt, | 279 | .irq_handler = ata_interrupt, |
276 | .irq_clear = ata_bmdma_irq_clear, | 280 | .irq_clear = ata_bmdma_irq_clear, |
277 | .irq_on = ata_irq_on, | 281 | .irq_on = ata_irq_on, |
278 | .irq_ack = ata_irq_ack, | ||
279 | 282 | ||
280 | .port_start = ata_port_start, | 283 | .port_start = ata_sff_port_start, |
281 | }; | 284 | }; |
282 | 285 | ||
283 | static struct ata_port_operations pdc2026x_port_ops = { | 286 | static struct ata_port_operations pdc2026x_port_ops = { |
284 | .port_disable = ata_port_disable, | ||
285 | .set_piomode = pdc202xx_set_piomode, | 287 | .set_piomode = pdc202xx_set_piomode, |
286 | .set_dmamode = pdc202xx_set_dmamode, | 288 | .set_dmamode = pdc202xx_set_dmamode, |
287 | .mode_filter = ata_pci_default_filter, | 289 | .mode_filter = ata_pci_default_filter, |
@@ -310,9 +312,8 @@ static struct ata_port_operations pdc2026x_port_ops = { | |||
310 | .irq_handler = ata_interrupt, | 312 | .irq_handler = ata_interrupt, |
311 | .irq_clear = ata_bmdma_irq_clear, | 313 | .irq_clear = ata_bmdma_irq_clear, |
312 | .irq_on = ata_irq_on, | 314 | .irq_on = ata_irq_on, |
313 | .irq_ack = ata_irq_ack, | ||
314 | 315 | ||
315 | .port_start = ata_port_start, | 316 | .port_start = ata_sff_port_start, |
316 | }; | 317 | }; |
317 | 318 | ||
318 | static int pdc202xx_init_one(struct pci_dev *dev, const struct pci_device_id *id) | 319 | static int pdc202xx_init_one(struct pci_dev *dev, const struct pci_device_id *id) |