* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev: libata: implement dump_id force param libata: disable ATAPI AN by default libata-sff: make BMDMA optional libata-sff: kill dummy BMDMA ops from sata_qstor and pata_octeon_cf libata-sff: separate out BMDMA init libata-sff: separate out BMDMA irq handler libata-sff: ata_sff_irq_clear() is BMDMA specific sata_mv: drop unncessary EH callback resetting
Unified · Split
| @@ -1252,6 +1252,8 @@ and is between 256 and 4096 characters. It is defined in the file · 1251 unmodified lines | ||
| 1252 | 1252 | * nohrst, nosrst, norst: suppress hard, soft |
| 1253 | 1253 | and both resets. |
| 1254 | 1254 | |
| 1255 | + * dump_id: dump IDENTIFY data. | |
| 1256 | + | |
| 1255 | 1257 | If there are multiple matching configurations changing |
| 1256 | 1258 | the same attribute, the last one is used. |
| 1257 | 1259 | |
| @@ -57,6 +57,8 @@ config SATA_PMP · 56 unmodified lines | ||
| 57 | 57 | This option adds support for SATA Port Multipliers |
| 58 | 58 | (the SATA version of an ethernet hub, or SAS expander). |
| 59 | 59 | |
| 60 | +comment "Controllers with non-SFF native interface" | |
| 61 | + | |
| 60 | 62 | config SATA_AHCI |
| 61 | 63 | tristate "AHCI SATA support" |
| 62 | 64 | depends on PCI |
| @@ -73,11 +75,12 @@ config SATA_AHCI_PLATFORM · 10 unmodified lines | ||
| 73 | 75 | |
| 74 | 76 | If unsure, say N. |
| 75 | 77 | |
| 76 | −config SATA_SIL24 | |
| 77 | − tristate "Silicon Image 3124/3132 SATA support" | |
| 78 | − depends on PCI | |
| 78 | +config SATA_FSL | |
| 79 | + tristate "Freescale 3.0Gbps SATA support" | |
| 80 | + depends on FSL_SOC | |
| 79 | 81 | help |
| 80 | − This option enables support for Silicon Image 3124/3132 Serial ATA. | |
| 82 | + This option enables support for Freescale 3.0Gbps SATA controller. | |
| 83 | + It can be found on MPC837x and MPC8315. | |
| 81 | 84 | |
| 82 | 85 | If unsure, say N. |
| 83 | 86 | |
| @@ -87,12 +90,11 @@ config SATA_INIC162X · 3 unmodified lines | ||
| 87 | 90 | help |
| 88 | 91 | This option enables support for Initio 162x Serial ATA. |
| 89 | 92 | |
| 90 | −config SATA_FSL | |
| 91 | − tristate "Freescale 3.0Gbps SATA support" | |
| 92 | − depends on FSL_SOC | |
| 93 | +config SATA_SIL24 | |
| 94 | + tristate "Silicon Image 3124/3132 SATA support" | |
| 95 | + depends on PCI | |
| 93 | 96 | help |
| 94 | − This option enables support for Freescale 3.0Gbps SATA controller. | |
| 95 | − It can be found on MPC837x and MPC8315. | |
| 97 | + This option enables support for Silicon Image 3124/3132 Serial ATA. | |
| 96 | 98 | |
| 97 | 99 | If unsure, say N. |
| 98 | 100 | |
| @@ -116,15 +118,65 @@ config ATA_SFF · 17 unmodified lines | ||
| 116 | 118 | |
| 117 | 119 | if ATA_SFF |
| 118 | 120 | |
| 119 | −config SATA_SVW | |
| 120 | − tristate "ServerWorks Frodo / Apple K2 SATA support" | |
| 121 | +comment "SFF controllers with custom DMA interface" | |
| 122 | + | |
| 123 | +config PDC_ADMA | |
| 124 | + tristate "Pacific Digital ADMA support" | |
| 121 | 125 | depends on PCI |
| 122 | 126 | help |
| 123 | − This option enables support for Broadcom/Serverworks/Apple K2 | |
| 124 | − SATA support. | |
| 127 | + This option enables support for Pacific Digital ADMA controllers | |
| 128 | + | |
| 129 | + If unsure, say N. | |
| 130 | + | |
| 131 | +config PATA_MPC52xx | |
| 132 | + tristate "Freescale MPC52xx SoC internal IDE" | |
| 133 | + depends on PPC_MPC52xx && PPC_BESTCOMM | |
| 134 | + select PPC_BESTCOMM_ATA | |
| 135 | + help | |
| 136 | + This option enables support for integrated IDE controller | |
| 137 | + of the Freescale MPC52xx SoC. | |
| 138 | + | |
| 139 | + If unsure, say N. | |
| 140 | + | |
| 141 | +config PATA_OCTEON_CF | |
| 142 | + tristate "OCTEON Boot Bus Compact Flash support" | |
| 143 | + depends on CPU_CAVIUM_OCTEON | |
| 144 | + help | |
| 145 | + This option enables a polled compact flash driver for use with | |
| 146 | + compact flash cards attached to the OCTEON boot bus. | |
| 147 | + | |
| 148 | + If unsure, say N. | |
| 149 | + | |
| 150 | +config SATA_QSTOR | |
| 151 | + tristate "Pacific Digital SATA QStor support" | |
| 152 | + depends on PCI | |
| 153 | + help | |
| 154 | + This option enables support for Pacific Digital Serial ATA QStor. | |
| 155 | + | |
| 156 | + If unsure, say N. | |
| 157 | + | |
| 158 | +config SATA_SX4 | |
| 159 | + tristate "Promise SATA SX4 support (Experimental)" | |
| 160 | + depends on PCI && EXPERIMENTAL | |
| 161 | + help | |
| 162 | + This option enables support for Promise Serial ATA SX4. | |
| 125 | 163 | |
| 126 | 164 | If unsure, say N. |
| 127 | 165 | |
| 166 | +config ATA_BMDMA | |
| 167 | + bool "ATA BMDMA support" | |
| 168 | + default y | |
| 169 | + help | |
| 170 | + This option adds support for SFF ATA controllers with BMDMA | |
| 171 | + capability. BMDMA stands for bus-master DMA and the | |
| 172 | + de-facto DMA interface for SFF controllers. | |
| 173 | + | |
| 174 | + If unuser, say Y. | |
| 175 | + | |
| 176 | +if ATA_BMDMA | |
| 177 | + | |
| 178 | +comment "SATA SFF controllers with BMDMA" | |
| 179 | + | |
| 128 | 180 | config ATA_PIIX |
| 129 | 181 | tristate "Intel ESB, ICH, PIIX3, PIIX4 PATA/SATA support" |
| 130 | 182 | depends on PCI |
| @@ -152,22 +204,6 @@ config SATA_NV · 21 unmodified lines | ||
| 152 | 204 | |
| 153 | 205 | If unsure, say N. |
| 154 | 206 | |
| 155 | −config PDC_ADMA | |
| 156 | − tristate "Pacific Digital ADMA support" | |
| 157 | − depends on PCI | |
| 158 | − help | |
| 159 | − This option enables support for Pacific Digital ADMA controllers | |
| 160 | − | |
| 161 | − If unsure, say N. | |
| 162 | − | |
| 163 | −config SATA_QSTOR | |
| 164 | − tristate "Pacific Digital SATA QStor support" | |
| 165 | − depends on PCI | |
| 166 | − help | |
| 167 | − This option enables support for Pacific Digital Serial ATA QStor. | |
| 168 | − | |
| 169 | − If unsure, say N. | |
| 170 | − | |
| 171 | 207 | config SATA_PROMISE |
| 172 | 208 | tristate "Promise SATA TX2/TX4 support" |
| 173 | 209 | depends on PCI |
| @@ -176,14 +212,6 @@ config SATA_PROMISE · 2 unmodified lines | ||
| 176 | 212 | |
| 177 | 213 | If unsure, say N. |
| 178 | 214 | |
| 179 | −config SATA_SX4 | |
| 180 | − tristate "Promise SATA SX4 support (Experimental)" | |
| 181 | − depends on PCI && EXPERIMENTAL | |
| 182 | − help | |
| 183 | − This option enables support for Promise Serial ATA SX4. | |
| 184 | − | |
| 185 | − If unsure, say N. | |
| 186 | − | |
| 187 | 215 | config SATA_SIL |
| 188 | 216 | tristate "Silicon Image SATA support" |
| 189 | 217 | depends on PCI |
| @@ -203,6 +231,15 @@ config SATA_SIS · 13 unmodified lines | ||
| 203 | 231 | enable the PATA_SIS driver in the config. |
| 204 | 232 | If unsure, say N. |
| 205 | 233 | |
| 234 | +config SATA_SVW | |
| 235 | + tristate "ServerWorks Frodo / Apple K2 SATA support" | |
| 236 | + depends on PCI | |
| 237 | + help | |
| 238 | + This option enables support for Broadcom/Serverworks/Apple K2 | |
| 239 | + SATA support. | |
| 240 | + | |
| 241 | + If unsure, say N. | |
| 242 | + | |
| 206 | 243 | config SATA_ULI |
| 207 | 244 | tristate "ULi Electronics SATA support" |
| 208 | 245 | depends on PCI |
| @@ -227,14 +264,7 @@ config SATA_VITESSE · 18 unmodified lines | ||
| 227 | 264 | |
| 228 | 265 | If unsure, say N. |
| 229 | 266 | |
| 230 | −config PATA_ACPI | |
| 231 | − tristate "ACPI firmware driver for PATA" | |
| 232 | − depends on ATA_ACPI | |
| 233 | − help | |
| 234 | − This option enables an ACPI method driver which drives | |
| 235 | − motherboard PATA controller interfaces through the ACPI | |
| 236 | − firmware in the BIOS. This driver can sometimes handle | |
| 237 | − otherwise unsupported hardware. | |
| 267 | +comment "PATA SFF controllers with BMDMA" | |
| 238 | 268 | |
| 239 | 269 | config PATA_ALI |
| 240 | 270 | tristate "ALi PATA support" |
| @@ -262,40 +292,30 @@ config PATA_ARTOP · 21 unmodified lines | ||
| 262 | 292 | |
| 263 | 293 | If unsure, say N. |
| 264 | 294 | |
| 265 | −config PATA_ATP867X | |
| 266 | − tristate "ARTOP/Acard ATP867X PATA support" | |
| 295 | +config PATA_ATIIXP | |
| 296 | + tristate "ATI PATA support" | |
| 267 | 297 | depends on PCI |
| 268 | 298 | help |
| 269 | − This option enables support for ARTOP/Acard ATP867X PATA | |
| 270 | − controllers. | |
| 271 | − | |
| 272 | − If unsure, say N. | |
| 273 | − | |
| 274 | −config PATA_AT32 | |
| 275 | − tristate "Atmel AVR32 PATA support (Experimental)" | |
| 276 | − depends on AVR32 && PLATFORM_AT32AP && EXPERIMENTAL | |
| 277 | − help | |
| 278 | − This option enables support for the IDE devices on the | |
| 279 | − Atmel AT32AP platform. | |
| 299 | + This option enables support for the ATI ATA interfaces | |
| 300 | + found on the many ATI chipsets. | |
| 280 | 301 | |
| 281 | 302 | If unsure, say N. |
| 282 | 303 | |
| 283 | −config PATA_ATIIXP | |
| 284 | − tristate "ATI PATA support" | |
| 304 | +config PATA_ATP867X | |
| 305 | + tristate "ARTOP/Acard ATP867X PATA support" | |
| 285 | 306 | depends on PCI |
| 286 | 307 | help |
| 287 | − This option enables support for the ATI ATA interfaces | |
| 288 | − found on the many ATI chipsets. | |
| 308 | + This option enables support for ARTOP/Acard ATP867X PATA | |
| 309 | + controllers. | |
| 289 | 310 | |
| 290 | 311 | If unsure, say N. |
| 291 | 312 | |
| 292 | −config PATA_CMD640_PCI | |
| 293 | − tristate "CMD640 PCI PATA support (Experimental)" | |
| 294 | − depends on PCI && EXPERIMENTAL | |
| 313 | +config PATA_BF54X | |
| 314 | + tristate "Blackfin 54x ATAPI support" | |
| 315 | + depends on BF542 || BF548 || BF549 | |
| 295 | 316 | help |
| 296 | − This option enables support for the CMD640 PCI IDE | |
| 297 | − interface chip. Only the primary channel is currently | |
| 298 | − supported. | |
| 317 | + This option enables support for the built-in ATAPI controller on | |
| 318 | + Blackfin 54x family chips. | |
| 299 | 319 | |
| 300 | 320 | If unsure, say N. |
| 301 | 321 | |
| @@ -362,15 +382,6 @@ config PATA_EFAR · 60 unmodified lines | ||
| 362 | 382 | |
| 363 | 383 | If unsure, say N. |
| 364 | 384 | |
| 365 | −config ATA_GENERIC | |
| 366 | − tristate "Generic ATA support" | |
| 367 | − depends on PCI | |
| 368 | − help | |
| 369 | − This option enables support for generic BIOS configured | |
| 370 | − ATA controllers via the new ATA layer | |
| 371 | − | |
| 372 | − If unsure, say N. | |
| 373 | − | |
| 374 | 385 | config PATA_HPT366 |
| 375 | 386 | tristate "HPT 366/368 PATA support" |
| 376 | 387 | depends on PCI |
| @@ -415,12 +426,20 @@ config PATA_HPT3X3_DMA · 38 unmodified lines | ||
| 415 | 426 | controllers. Enable with care as there are still some |
| 416 | 427 | problems with DMA on this chipset. |
| 417 | 428 | |
| 418 | −config PATA_ISAPNP | |
| 419 | − tristate "ISA Plug and Play PATA support" | |
| 420 | − depends on ISAPNP | |
| 429 | +config PATA_ICSIDE | |
| 430 | + tristate "Acorn ICS PATA support" | |
| 431 | + depends on ARM && ARCH_ACORN | |
| 421 | 432 | help |
| 422 | − This option enables support for ISA plug & play ATA | |
| 423 | − controllers such as those found on old soundcards. | |
| 433 | + On Acorn systems, say Y here if you wish to use the ICS PATA | |
| 434 | + interface card. This is not required for ICS partition support. | |
| 435 | + If you are unsure, say N to this. | |
| 436 | + | |
| 437 | +config PATA_IT8213 | |
| 438 | + tristate "IT8213 PATA support (Experimental)" | |
| 439 | + depends on PCI && EXPERIMENTAL | |
| 440 | + help | |
| 441 | + This option enables support for the ITE 821 PATA | |
| 442 | + controllers via the new ATA layer. | |
| 424 | 443 | |
| 425 | 444 | If unsure, say N. |
| 426 | 445 | |
| @@ -434,15 +453,6 @@ config PATA_IT821X · 7 unmodified lines | ||
| 434 | 453 | |
| 435 | 454 | If unsure, say N. |
| 436 | 455 | |
| 437 | −config PATA_IT8213 | |
| 438 | − tristate "IT8213 PATA support (Experimental)" | |
| 439 | − depends on PCI && EXPERIMENTAL | |
| 440 | − help | |
| 441 | − This option enables support for the ITE 821 PATA | |
| 442 | − controllers via the new ATA layer. | |
| 443 | − | |
| 444 | − If unsure, say N. | |
| 445 | − | |
| 446 | 456 | config PATA_JMICRON |
| 447 | 457 | tristate "JMicron PATA support" |
| 448 | 458 | depends on PCI |
| @@ -452,23 +462,14 @@ config PATA_JMICRON · 3 unmodified lines | ||
| 452 | 462 | |
| 453 | 463 | If unsure, say N. |
| 454 | 464 | |
| 455 | −config PATA_LEGACY | |
| 456 | − tristate "Legacy ISA PATA support (Experimental)" | |
| 457 | − depends on (ISA || PCI) && EXPERIMENTAL | |
| 458 | − help | |
| 459 | − This option enables support for ISA/VLB/PCI bus legacy PATA | |
| 460 | − ports and allows them to be accessed via the new ATA layer. | |
| 461 | − | |
| 462 | − If unsure, say N. | |
| 463 | − | |
| 464 | −config PATA_TRIFLEX | |
| 465 | − tristate "Compaq Triflex PATA support" | |
| 466 | − depends on PCI | |
| 465 | +config PATA_MACIO | |
| 466 | + tristate "Apple PowerMac/PowerBook internal 'MacIO' IDE" | |
| 467 | + depends on PPC_PMAC | |
| 467 | 468 | help |
| 468 | − Enable support for the Compaq 'Triflex' IDE controller as found | |
| 469 | − on many Compaq Pentium-Pro systems, via the new ATA layer. | |
| 470 | − | |
| 471 | − If unsure, say N. | |
| 469 | + Most IDE capable PowerMacs have IDE busses driven by a variant | |
| 470 | + of this controller which is part of the Apple chipset used on | |
| 471 | + most PowerMac models. Some models have multiple busses using | |
| 472 | + different chipsets, though generally, MacIO is one of them. | |
| 472 | 473 | |
| 473 | 474 | config PATA_MARVELL |
| 474 | 475 | tristate "Marvell PATA support via legacy mode" |
| @@ -481,32 +482,6 @@ config PATA_MARVELL · 6 unmodified lines | ||
| 481 | 482 | |
| 482 | 483 | If unsure, say N. |
| 483 | 484 | |
| 484 | −config PATA_MPC52xx | |
| 485 | − tristate "Freescale MPC52xx SoC internal IDE" | |
| 486 | − depends on PPC_MPC52xx && PPC_BESTCOMM | |
| 487 | − select PPC_BESTCOMM_ATA | |
| 488 | − help | |
| 489 | − This option enables support for integrated IDE controller | |
| 490 | − of the Freescale MPC52xx SoC. | |
| 491 | − | |
| 492 | − If unsure, say N. | |
| 493 | − | |
| 494 | −config PATA_MPIIX | |
| 495 | − tristate "Intel PATA MPIIX support" | |
| 496 | − depends on PCI | |
| 497 | − help | |
| 498 | − This option enables support for MPIIX PATA support. | |
| 499 | − | |
| 500 | − If unsure, say N. | |
| 501 | − | |
| 502 | −config PATA_OLDPIIX | |
| 503 | − tristate "Intel PATA old PIIX support" | |
| 504 | − depends on PCI | |
| 505 | − help | |
| 506 | − This option enables support for early PIIX PATA support. | |
| 507 | − | |
| 508 | − If unsure, say N. | |
| 509 | − | |
| 510 | 485 | config PATA_NETCELL |
| 511 | 486 | tristate "NETCELL Revolution RAID support" |
| 512 | 487 | depends on PCI |
| @@ -525,15 +500,6 @@ config PATA_NINJA32 · 12 unmodified lines | ||
| 525 | 500 | |
| 526 | 501 | If unsure, say N. |
| 527 | 502 | |
| 528 | −config PATA_NS87410 | |
| 529 | − tristate "Nat Semi NS87410 PATA support" | |
| 530 | − depends on PCI | |
| 531 | − help | |
| 532 | − This option enables support for the National Semiconductor | |
| 533 | − NS87410 PCI-IDE controller. | |
| 534 | − | |
| 535 | − If unsure, say N. | |
| 536 | − | |
| 537 | 503 | config PATA_NS87415 |
| 538 | 504 | tristate "Nat Semi NS87415 PATA support" |
| 539 | 505 | depends on PCI |
| @@ -543,12 +509,11 @@ config PATA_NS87415 · 3 unmodified lines | ||
| 543 | 509 | |
| 544 | 510 | If unsure, say N. |
| 545 | 511 | |
| 546 | −config PATA_OPTI | |
| 547 | − tristate "OPTI621/6215 PATA support (Very Experimental)" | |
| 548 | − depends on PCI && EXPERIMENTAL | |
| 512 | +config PATA_OLDPIIX | |
| 513 | + tristate "Intel PATA old PIIX support" | |
| 514 | + depends on PCI | |
| 549 | 515 | help |
| 550 | − This option enables full PIO support for the early Opti ATA | |
| 551 | − controllers found on some old motherboards. | |
| 516 | + This option enables support for early PIIX PATA support. | |
| 552 | 517 | |
| 553 | 518 | If unsure, say N. |
| 554 | 519 | |
| @@ -562,24 +527,6 @@ config PATA_OPTIDMA · 7 unmodified lines | ||
| 562 | 527 | |
| 563 | 528 | If unsure, say N. |
| 564 | 529 | |
| 565 | −config PATA_PALMLD | |
| 566 | − tristate "Palm LifeDrive PATA support" | |
| 567 | − depends on MACH_PALMLD | |
| 568 | − help | |
| 569 | − This option enables support for Palm LifeDrive's internal ATA | |
| 570 | − port via the new ATA layer. | |
| 571 | − | |
| 572 | − If unsure, say N. | |
| 573 | − | |
| 574 | −config PATA_PCMCIA | |
| 575 | − tristate "PCMCIA PATA support" | |
| 576 | − depends on PCMCIA | |
| 577 | − help | |
| 578 | − This option enables support for PCMCIA ATA interfaces, including | |
| 579 | − compact flash card adapters via the new ATA layer. | |
| 580 | − | |
| 581 | − If unsure, say N. | |
| 582 | − | |
| 583 | 530 | config PATA_PDC2027X |
| 584 | 531 | tristate "Promise PATA 2027x support" |
| 585 | 532 | depends on PCI |
| @@ -597,12 +544,6 @@ config PATA_PDC_OLD · 11 unmodified lines | ||
| 597 | 544 | |
| 598 | 545 | If unsure, say N. |
| 599 | 546 | |
| 600 | −config PATA_QDI | |
| 601 | − tristate "QDI VLB PATA support" | |
| 602 | − depends on ISA | |
| 603 | − help | |
| 604 | − Support for QDI 6500 and 6580 PATA controllers on VESA local bus. | |
| 605 | − | |
| 606 | 547 | config PATA_RADISYS |
| 607 | 548 | tristate "RADISYS 82600 PATA support (Experimental)" |
| 608 | 549 | depends on PCI && EXPERIMENTAL |
| @@ -612,15 +553,6 @@ config PATA_RADISYS · 3 unmodified lines | ||
| 612 | 553 | |
| 613 | 554 | If unsure, say N. |
| 614 | 555 | |
| 615 | −config PATA_RB532 | |
| 616 | − tristate "RouterBoard 532 PATA CompactFlash support" | |
| 617 | − depends on MIKROTIK_RB532 | |
| 618 | − help | |
| 619 | − This option enables support for the RouterBoard 532 | |
| 620 | − PATA CompactFlash controller. | |
| 621 | − | |
| 622 | − If unsure, say N. | |
| 623 | − | |
| 624 | 556 | config PATA_RDC |
| 625 | 557 | tristate "RDC PATA support" |
| 626 | 558 | depends on PCI |
| @@ -631,21 +563,30 @@ config PATA_RDC · 4 unmodified lines | ||
| 631 | 563 | |
| 632 | 564 | If unsure, say N. |
| 633 | 565 | |
| 634 | −config PATA_RZ1000 | |
| 635 | − tristate "PC Tech RZ1000 PATA support" | |
| 566 | +config PATA_SC1200 | |
| 567 | + tristate "SC1200 PATA support" | |
| 636 | 568 | depends on PCI |
| 637 | 569 | help |
| 638 | − This option enables basic support for the PC Tech RZ1000/1 | |
| 639 | − PATA controllers via the new ATA layer | |
| 570 | + This option enables support for the NatSemi/AMD SC1200 SoC | |
| 571 | + companion chip used with the Geode processor family. | |
| 640 | 572 | |
| 641 | 573 | If unsure, say N. |
| 642 | 574 | |
| 643 | −config PATA_SC1200 | |
| 644 | − tristate "SC1200 PATA support" | |
| 575 | +config PATA_SCC | |
| 576 | + tristate "Toshiba's Cell Reference Set IDE support" | |
| 577 | + depends on PCI && PPC_CELLEB | |
| 578 | + help | |
| 579 | + This option enables support for the built-in IDE controller on | |
| 580 | + Toshiba Cell Reference Board. | |
| 581 | + | |
| 582 | + If unsure, say N. | |
| 583 | + | |
| 584 | +config PATA_SCH | |
| 585 | + tristate "Intel SCH PATA support" | |
| 645 | 586 | depends on PCI |
| 646 | 587 | help |
| 647 | − This option enables support for the NatSemi/AMD SC1200 SoC | |
| 648 | − companion chip used with the Geode processor family. | |
| 588 | + This option enables support for Intel SCH PATA on the Intel | |
| 589 | + SCH (US15W, US15L, UL11L) series host controllers. | |
| 649 | 590 | |
| 650 | 591 | If unsure, say N. |
| 651 | 592 | |
| @@ -683,6 +624,15 @@ config PATA_TOSHIBA · 31 unmodified lines | ||
| 683 | 624 | |
| 684 | 625 | If unsure, say N. |
| 685 | 626 | |
| 627 | +config PATA_TRIFLEX | |
| 628 | + tristate "Compaq Triflex PATA support" | |
| 629 | + depends on PCI | |
| 630 | + help | |
| 631 | + Enable support for the Compaq 'Triflex' IDE controller as found | |
| 632 | + on many Compaq Pentium-Pro systems, via the new ATA layer. | |
| 633 | + | |
| 634 | + If unsure, say N. | |
| 635 | + | |
| 686 | 636 | config PATA_VIA |
| 687 | 637 | tristate "VIA PATA support" |
| 688 | 638 | depends on PCI |
| @@ -701,12 +651,99 @@ config PATA_WINBOND · 12 unmodified lines | ||
| 701 | 651 | |
| 702 | 652 | If unsure, say N. |
| 703 | 653 | |
| 704 | −config PATA_WINBOND_VLB | |
| 705 | − tristate "Winbond W83759A VLB PATA support (Experimental)" | |
| 706 | − depends on ISA && EXPERIMENTAL | |
| 654 | +endif # ATA_BMDMA | |
| 655 | + | |
| 656 | +comment "PIO-only SFF controllers" | |
| 657 | + | |
| 658 | +config PATA_AT32 | |
| 659 | + tristate "Atmel AVR32 PATA support (Experimental)" | |
| 660 | + depends on AVR32 && PLATFORM_AT32AP && EXPERIMENTAL | |
| 707 | 661 | help |
| 708 | − Support for the Winbond W83759A controller on Vesa Local Bus | |
| 709 | − systems. | |
| 662 | + This option enables support for the IDE devices on the | |
| 663 | + Atmel AT32AP platform. | |
| 664 | + | |
| 665 | + If unsure, say N. | |
| 666 | + | |
| 667 | +config PATA_AT91 | |
| 668 | + tristate "PATA support for AT91SAM9260" | |
| 669 | + depends on ARM && ARCH_AT91 | |
| 670 | + help | |
| 671 | + This option enables support for IDE devices on the Atmel AT91SAM9260 SoC. | |
| 672 | + | |
| 673 | + If unsure, say N. | |
| 674 | + | |
| 675 | +config PATA_CMD640_PCI | |
| 676 | + tristate "CMD640 PCI PATA support (Experimental)" | |
| 677 | + depends on PCI && EXPERIMENTAL | |
| 678 | + help | |
| 679 | + This option enables support for the CMD640 PCI IDE | |
| 680 | + interface chip. Only the primary channel is currently | |
| 681 | + supported. | |
| 682 | + | |
| 683 | + If unsure, say N. | |
| 684 | + | |
| 685 | +config PATA_ISAPNP | |
| 686 | + tristate "ISA Plug and Play PATA support" | |
| 687 | + depends on ISAPNP | |
| 688 | + help | |
| 689 | + This option enables support for ISA plug & play ATA | |
| 690 | + controllers such as those found on old soundcards. | |
| 691 | + | |
| 692 | + If unsure, say N. | |
| 693 | + | |
| 694 | +config PATA_IXP4XX_CF | |
| 695 | + tristate "IXP4XX Compact Flash support" | |
| 696 | + depends on ARCH_IXP4XX | |
| 697 | + help | |
| 698 | + This option enables support for a Compact Flash connected on | |
| 699 | + the ixp4xx expansion bus. This driver had been written for | |
| 700 | + Loft/Avila boards in mind but can work with others. | |
| 701 | + | |
| 702 | + If unsure, say N. | |
| 703 | + | |
| 704 | +config PATA_MPIIX | |
| 705 | + tristate "Intel PATA MPIIX support" | |
| 706 | + depends on PCI | |
| 707 | + help | |
| 708 | + This option enables support for MPIIX PATA support. | |
| 709 | + | |
| 710 | + If unsure, say N. | |
| 711 | + | |
| 712 | +config PATA_NS87410 | |
| 713 | + tristate "Nat Semi NS87410 PATA support" | |
| 714 | + depends on PCI | |
| 715 | + help | |
| 716 | + This option enables support for the National Semiconductor | |
| 717 | + NS87410 PCI-IDE controller. | |
| 718 | + | |
| 719 | + If unsure, say N. | |
| 720 | + | |
| 721 | +config PATA_OPTI | |
| 722 | + tristate "OPTI621/6215 PATA support (Very Experimental)" | |
| 723 | + depends on PCI && EXPERIMENTAL | |
| 724 | + help | |
| 725 | + This option enables full PIO support for the early Opti ATA | |
| 726 | + controllers found on some old motherboards. | |
| 727 | + | |
| 728 | + If unsure, say N. | |
| 729 | + | |
| 730 | +config PATA_PALMLD | |
| 731 | + tristate "Palm LifeDrive PATA support" | |
| 732 | + depends on MACH_PALMLD | |
| 733 | + help | |
| 734 | + This option enables support for Palm LifeDrive's internal ATA | |
| 735 | + port via the new ATA layer. | |
| 736 | + | |
| 737 | + If unsure, say N. | |
| 738 | + | |
| 739 | +config PATA_PCMCIA | |
| 740 | + tristate "PCMCIA PATA support" | |
| 741 | + depends on PCMCIA | |
| 742 | + help | |
| 743 | + This option enables support for PCMCIA ATA interfaces, including | |
| 744 | + compact flash card adapters via the new ATA layer. | |
| 745 | + | |
| 746 | + If unsure, say N. | |
| 710 | 747 | |
| 711 | 748 | config HAVE_PATA_PLATFORM |
| 712 | 749 | bool |
| @@ -725,14 +762,6 @@ config PATA_PLATFORM · 12 unmodified lines | ||
| 725 | 762 | |
| 726 | 763 | If unsure, say N. |
| 727 | 764 | |
| 728 | −config PATA_AT91 | |
| 729 | − tristate "PATA support for AT91SAM9260" | |
| 730 | − depends on ARM && ARCH_AT91 | |
| 731 | − help | |
| 732 | − This option enables support for IDE devices on the Atmel AT91SAM9260 SoC. | |
| 733 | − | |
| 734 | − If unsure, say N. | |
| 735 | − | |
| 736 | 765 | config PATA_OF_PLATFORM |
| 737 | 766 | tristate "OpenFirmware platform device PATA support" |
| 738 | 767 | depends on PATA_PLATFORM && PPC_OF |
| @@ -743,69 +772,65 @@ config PATA_OF_PLATFORM · 4 unmodified lines | ||
| 743 | 772 | |
| 744 | 773 | If unsure, say N. |
| 745 | 774 | |
| 746 | −config PATA_ICSIDE | |
| 747 | − tristate "Acorn ICS PATA support" | |
| 748 | − depends on ARM && ARCH_ACORN | |
| 775 | +config PATA_QDI | |
| 776 | + tristate "QDI VLB PATA support" | |
| 777 | + depends on ISA | |
| 749 | 778 | help |
| 750 | − On Acorn systems, say Y here if you wish to use the ICS PATA | |
| 751 | − interface card. This is not required for ICS partition support. | |
| 752 | − If you are unsure, say N to this. | |
| 779 | + Support for QDI 6500 and 6580 PATA controllers on VESA local bus. | |
| 753 | 780 | |
| 754 | −config PATA_IXP4XX_CF | |
| 755 | − tristate "IXP4XX Compact Flash support" | |
| 756 | − depends on ARCH_IXP4XX | |
| 781 | +config PATA_RB532 | |
| 782 | + tristate "RouterBoard 532 PATA CompactFlash support" | |
| 783 | + depends on MIKROTIK_RB532 | |
| 757 | 784 | help |
| 758 | − This option enables support for a Compact Flash connected on | |
| 759 | − the ixp4xx expansion bus. This driver had been written for | |
| 760 | − Loft/Avila boards in mind but can work with others. | |
| 785 | + This option enables support for the RouterBoard 532 | |
| 786 | + PATA CompactFlash controller. | |
| 761 | 787 | |
| 762 | 788 | If unsure, say N. |
| 763 | 789 | |
| 764 | −config PATA_OCTEON_CF | |
| 765 | − tristate "OCTEON Boot Bus Compact Flash support" | |
| 766 | − depends on CPU_CAVIUM_OCTEON | |
| 790 | +config PATA_RZ1000 | |
| 791 | + tristate "PC Tech RZ1000 PATA support" | |
| 792 | + depends on PCI | |
| 767 | 793 | help |
| 768 | − This option enables a polled compact flash driver for use with | |
| 769 | − compact flash cards attached to the OCTEON boot bus. | |
| 794 | + This option enables basic support for the PC Tech RZ1000/1 | |
| 795 | + PATA controllers via the new ATA layer | |
| 770 | 796 | |
| 771 | 797 | If unsure, say N. |
| 772 | 798 | |
| 773 | −config PATA_SCC | |
| 774 | − tristate "Toshiba's Cell Reference Set IDE support" | |
| 775 | − depends on PCI && PPC_CELLEB | |
| 799 | +config PATA_WINBOND_VLB | |
| 800 | + tristate "Winbond W83759A VLB PATA support (Experimental)" | |
| 801 | + depends on ISA && EXPERIMENTAL | |
| 776 | 802 | help |
| 777 | − This option enables support for the built-in IDE controller on | |
| 778 | − Toshiba Cell Reference Board. | |
| 803 | + Support for the Winbond W83759A controller on Vesa Local Bus | |
| 804 | + systems. | |
| 779 | 805 | |
| 780 | − If unsure, say N. | |
| 806 | +comment "Generic fallback / legacy drivers" | |
| 781 | 807 | |
| 782 | −config PATA_SCH | |
| 783 | − tristate "Intel SCH PATA support" | |
| 784 | − depends on PCI | |
| 808 | +config PATA_ACPI | |
| 809 | + tristate "ACPI firmware driver for PATA" | |
| 810 | + depends on ATA_ACPI && ATA_BMDMA | |
| 785 | 811 | help |
| 786 | − This option enables support for Intel SCH PATA on the Intel | |
| 787 | − SCH (US15W, US15L, UL11L) series host controllers. | |
| 788 | − | |
| 789 | − If unsure, say N. | |
| 812 | + This option enables an ACPI method driver which drives | |
| 813 | + motherboard PATA controller interfaces through the ACPI | |
| 814 | + firmware in the BIOS. This driver can sometimes handle | |
| 815 | + otherwise unsupported hardware. | |
| 790 | 816 | |
| 791 | −config PATA_BF54X | |
| 792 | − tristate "Blackfin 54x ATAPI support" | |
| 793 | − depends on BF542 || BF548 || BF549 | |
| 817 | +config ATA_GENERIC | |
| 818 | + tristate "Generic ATA support" | |
| 819 | + depends on PCI && ATA_BMDMA | |
| 794 | 820 | help |
| 795 | − This option enables support for the built-in ATAPI controller on | |
| 796 | − Blackfin 54x family chips. | |
| 821 | + This option enables support for generic BIOS configured | |
| 822 | + ATA controllers via the new ATA layer | |
| 797 | 823 | |
| 798 | 824 | If unsure, say N. |
| 799 | 825 | |
| 800 | −config PATA_MACIO | |
| 801 | − tristate "Apple PowerMac/PowerBook internal 'MacIO' IDE" | |
| 802 | − depends on PPC_PMAC | |
| 826 | +config PATA_LEGACY | |
| 827 | + tristate "Legacy ISA PATA support (Experimental)" | |
| 828 | + depends on (ISA || PCI) && EXPERIMENTAL | |
| 803 | 829 | help |
| 804 | − Most IDE capable PowerMacs have IDE busses driven by a variant | |
| 805 | − of this controller which is part of the Apple chipset used on | |
| 806 | − most PowerMac models. Some models have multiple busses using | |
| 807 | − different chipsets, though generally, MacIO is one of them. | |
| 830 | + This option enables support for ISA/VLB/PCI bus legacy PATA | |
| 831 | + ports and allows them to be accessed via the new ATA layer. | |
| 808 | 832 | |
| 833 | + If unsure, say N. | |
| 809 | 834 | |
| 810 | 835 | endif # ATA_SFF |
| 811 | 836 | endif # ATA |
| @@ -1,33 +1,39 @@ | ||
| 1 | 1 | |
| 2 | 2 | obj-$(CONFIG_ATA) += libata.o |
| 3 | 3 | |
| 4 | +# non-SFF interface | |
| 4 | 5 | obj-$(CONFIG_SATA_AHCI) += ahci.o libahci.o |
| 5 | 6 | obj-$(CONFIG_SATA_AHCI_PLATFORM) += ahci_platform.o libahci.o |
| 6 | −obj-$(CONFIG_SATA_SVW) += sata_svw.o | |
| 7 | +obj-$(CONFIG_SATA_FSL) += sata_fsl.o | |
| 8 | +obj-$(CONFIG_SATA_INIC162X) += sata_inic162x.o | |
| 9 | +obj-$(CONFIG_SATA_SIL24) += sata_sil24.o | |
| 10 | + | |
| 11 | +# SFF w/ custom DMA | |
| 12 | +obj-$(CONFIG_PDC_ADMA) += pdc_adma.o | |
| 13 | +obj-$(CONFIG_PATA_MPC52xx) += pata_mpc52xx.o | |
| 14 | +obj-$(CONFIG_PATA_OCTEON_CF) += pata_octeon_cf.o | |
| 15 | +obj-$(CONFIG_SATA_QSTOR) += sata_qstor.o | |
| 16 | +obj-$(CONFIG_SATA_SX4) += sata_sx4.o | |
| 17 | + | |
| 18 | +# SFF SATA w/ BMDMA | |
| 7 | 19 | obj-$(CONFIG_ATA_PIIX) += ata_piix.o |
| 20 | +obj-$(CONFIG_SATA_MV) += sata_mv.o | |
| 21 | +obj-$(CONFIG_SATA_NV) += sata_nv.o | |
| 8 | 22 | obj-$(CONFIG_SATA_PROMISE) += sata_promise.o |
| 9 | −obj-$(CONFIG_SATA_QSTOR) += sata_qstor.o | |
| 10 | 23 | obj-$(CONFIG_SATA_SIL) += sata_sil.o |
| 11 | −obj-$(CONFIG_SATA_SIL24) += sata_sil24.o | |
| 12 | −obj-$(CONFIG_SATA_VIA) += sata_via.o | |
| 13 | −obj-$(CONFIG_SATA_VITESSE) += sata_vsc.o | |
| 14 | 24 | obj-$(CONFIG_SATA_SIS) += sata_sis.o |
| 15 | −obj-$(CONFIG_SATA_SX4) += sata_sx4.o | |
| 16 | −obj-$(CONFIG_SATA_NV) += sata_nv.o | |
| 25 | +obj-$(CONFIG_SATA_SVW) += sata_svw.o | |
| 17 | 26 | obj-$(CONFIG_SATA_ULI) += sata_uli.o |
| 18 | −obj-$(CONFIG_SATA_MV) += sata_mv.o | |
| 19 | −obj-$(CONFIG_SATA_INIC162X) += sata_inic162x.o | |
| 20 | −obj-$(CONFIG_PDC_ADMA) += pdc_adma.o | |
| 21 | −obj-$(CONFIG_SATA_FSL) += sata_fsl.o | |
| 22 | −obj-$(CONFIG_PATA_MACIO) += pata_macio.o | |
| 27 | +obj-$(CONFIG_SATA_VIA) += sata_via.o | |
| 28 | +obj-$(CONFIG_SATA_VITESSE) += sata_vsc.o | |
| 23 | 29 | |
| 30 | +# SFF PATA w/ BMDMA | |
| 24 | 31 | obj-$(CONFIG_PATA_ALI) += pata_ali.o |
| 25 | 32 | obj-$(CONFIG_PATA_AMD) += pata_amd.o |
| 26 | 33 | obj-$(CONFIG_PATA_ARTOP) += pata_artop.o |
| 27 | −obj-$(CONFIG_PATA_ATP867X) += pata_atp867x.o | |
| 28 | −obj-$(CONFIG_PATA_AT32) += pata_at32.o | |
| 29 | 34 | obj-$(CONFIG_PATA_ATIIXP) += pata_atiixp.o |
| 30 | −obj-$(CONFIG_PATA_CMD640_PCI) += pata_cmd640.o | |
| 35 | +obj-$(CONFIG_PATA_ATP867X) += pata_atp867x.o | |
| 36 | +obj-$(CONFIG_PATA_BF54X) += pata_bf54x.o | |
| 31 | 37 | obj-$(CONFIG_PATA_CMD64X) += pata_cmd64x.o |
| 32 | 38 | obj-$(CONFIG_PATA_CS5520) += pata_cs5520.o |
| 33 | 39 | obj-$(CONFIG_PATA_CS5530) += pata_cs5530.o |
| @@ -39,47 +45,50 @@ obj-$(CONFIG_PATA_HPT366) += pata_hpt366.o · 5 unmodified lines | ||
| 39 | 45 | obj-$(CONFIG_PATA_HPT37X) += pata_hpt37x.o |
| 40 | 46 | obj-$(CONFIG_PATA_HPT3X2N) += pata_hpt3x2n.o |
| 41 | 47 | obj-$(CONFIG_PATA_HPT3X3) += pata_hpt3x3.o |
| 42 | −obj-$(CONFIG_PATA_ISAPNP) += pata_isapnp.o | |
| 43 | −obj-$(CONFIG_PATA_IT821X) += pata_it821x.o | |
| 48 | +obj-$(CONFIG_PATA_ICSIDE) += pata_icside.o | |
| 44 | 49 | obj-$(CONFIG_PATA_IT8213) += pata_it8213.o |
| 50 | +obj-$(CONFIG_PATA_IT821X) += pata_it821x.o | |
| 45 | 51 | obj-$(CONFIG_PATA_JMICRON) += pata_jmicron.o |
| 52 | +obj-$(CONFIG_PATA_MACIO) += pata_macio.o | |
| 53 | +obj-$(CONFIG_PATA_MARVELL) += pata_marvell.o | |
| 46 | 54 | obj-$(CONFIG_PATA_NETCELL) += pata_netcell.o |
| 47 | 55 | obj-$(CONFIG_PATA_NINJA32) += pata_ninja32.o |
| 48 | −obj-$(CONFIG_PATA_NS87410) += pata_ns87410.o | |
| 49 | 56 | obj-$(CONFIG_PATA_NS87415) += pata_ns87415.o |
| 50 | −obj-$(CONFIG_PATA_OPTI) += pata_opti.o | |
| 51 | −obj-$(CONFIG_PATA_OPTIDMA) += pata_optidma.o | |
| 52 | −obj-$(CONFIG_PATA_MPC52xx) += pata_mpc52xx.o | |
| 53 | −obj-$(CONFIG_PATA_MARVELL) += pata_marvell.o | |
| 54 | −obj-$(CONFIG_PATA_MPIIX) += pata_mpiix.o | |
| 55 | 57 | obj-$(CONFIG_PATA_OLDPIIX) += pata_oldpiix.o |
| 56 | −obj-$(CONFIG_PATA_PALMLD) += pata_palmld.o | |
| 57 | −obj-$(CONFIG_PATA_PCMCIA) += pata_pcmcia.o | |
| 58 | +obj-$(CONFIG_PATA_OPTIDMA) += pata_optidma.o | |
| 58 | 59 | obj-$(CONFIG_PATA_PDC2027X) += pata_pdc2027x.o |
| 59 | 60 | obj-$(CONFIG_PATA_PDC_OLD) += pata_pdc202xx_old.o |
| 60 | −obj-$(CONFIG_PATA_QDI) += pata_qdi.o | |
| 61 | 61 | obj-$(CONFIG_PATA_RADISYS) += pata_radisys.o |
| 62 | −obj-$(CONFIG_PATA_RB532) += pata_rb532_cf.o | |
| 63 | 62 | obj-$(CONFIG_PATA_RDC) += pata_rdc.o |
| 64 | −obj-$(CONFIG_PATA_RZ1000) += pata_rz1000.o | |
| 65 | 63 | obj-$(CONFIG_PATA_SC1200) += pata_sc1200.o |
| 64 | +obj-$(CONFIG_PATA_SCC) += pata_scc.o | |
| 65 | +obj-$(CONFIG_PATA_SCH) += pata_sch.o | |
| 66 | 66 | obj-$(CONFIG_PATA_SERVERWORKS) += pata_serverworks.o |
| 67 | 67 | obj-$(CONFIG_PATA_SIL680) += pata_sil680.o |
| 68 | +obj-$(CONFIG_PATA_SIS) += pata_sis.o | |
| 68 | 69 | obj-$(CONFIG_PATA_TOSHIBA) += pata_piccolo.o |
| 70 | +obj-$(CONFIG_PATA_TRIFLEX) += pata_triflex.o | |
| 69 | 71 | obj-$(CONFIG_PATA_VIA) += pata_via.o |
| 70 | 72 | obj-$(CONFIG_PATA_WINBOND) += pata_sl82c105.o |
| 71 | −obj-$(CONFIG_PATA_WINBOND_VLB) += pata_winbond.o | |
| 72 | −obj-$(CONFIG_PATA_SIS) += pata_sis.o | |
| 73 | −obj-$(CONFIG_PATA_TRIFLEX) += pata_triflex.o | |
| 73 | + | |
| 74 | +# SFF PIO only | |
| 75 | +obj-$(CONFIG_PATA_AT32) += pata_at32.o | |
| 76 | +obj-$(CONFIG_PATA_AT91) += pata_at91.o | |
| 77 | +obj-$(CONFIG_PATA_CMD640_PCI) += pata_cmd640.o | |
| 78 | +obj-$(CONFIG_PATA_ISAPNP) += pata_isapnp.o | |
| 74 | 79 | obj-$(CONFIG_PATA_IXP4XX_CF) += pata_ixp4xx_cf.o |
| 75 | −obj-$(CONFIG_PATA_SCC) += pata_scc.o | |
| 76 | −obj-$(CONFIG_PATA_SCH) += pata_sch.o | |
| 77 | −obj-$(CONFIG_PATA_BF54X) += pata_bf54x.o | |
| 78 | −obj-$(CONFIG_PATA_OCTEON_CF) += pata_octeon_cf.o | |
| 80 | +obj-$(CONFIG_PATA_MPIIX) += pata_mpiix.o | |
| 81 | +obj-$(CONFIG_PATA_NS87410) += pata_ns87410.o | |
| 82 | +obj-$(CONFIG_PATA_OPTI) += pata_opti.o | |
| 83 | +obj-$(CONFIG_PATA_PCMCIA) += pata_pcmcia.o | |
| 84 | +obj-$(CONFIG_PATA_PALMLD) += pata_palmld.o | |
| 79 | 85 | obj-$(CONFIG_PATA_PLATFORM) += pata_platform.o |
| 80 | −obj-$(CONFIG_PATA_AT91) += pata_at91.o | |
| 81 | 86 | obj-$(CONFIG_PATA_OF_PLATFORM) += pata_of_platform.o |
| 82 | −obj-$(CONFIG_PATA_ICSIDE) += pata_icside.o | |
| 87 | +obj-$(CONFIG_PATA_QDI) += pata_qdi.o | |
| 88 | +obj-$(CONFIG_PATA_RB532) += pata_rb532_cf.o | |
| 89 | +obj-$(CONFIG_PATA_RZ1000) += pata_rz1000.o | |
| 90 | +obj-$(CONFIG_PATA_WINBOND_VLB) += pata_winbond.o | |
| 91 | + | |
| 83 | 92 | # Should be last but two libata driver |
| 84 | 93 | obj-$(CONFIG_PATA_ACPI) += pata_acpi.o |
| 85 | 94 | # Should be last but one libata driver |
| @@ -155,7 +155,7 @@ static int ata_generic_init_one(struct pci_dev *dev, const struct pci_device_id · 154 unmodified lines | ||
| 155 | 155 | return rc; |
| 156 | 156 | pcim_pin_device(dev); |
| 157 | 157 | } |
| 158 | − return ata_pci_sff_init_one(dev, ppi, &generic_sht, NULL, 0); | |
| 158 | + return ata_pci_bmdma_init_one(dev, ppi, &generic_sht, NULL, 0); | |
| 159 | 159 | } |
| 160 | 160 | |
| 161 | 161 | static struct pci_device_id ata_generic[] = { |
| @@ -1589,7 +1589,7 @@ static int __devinit piix_init_one(struct pci_dev *pdev, · 1588 unmodified lines | ||
| 1589 | 1589 | hpriv->map = piix_init_sata_map(pdev, port_info, |
| 1590 | 1590 | piix_map_db_table[ent->driver_data]); |
| 1591 | 1591 | |
| 1592 | − rc = ata_pci_sff_prepare_host(pdev, ppi, &host); | |
| 1592 | + rc = ata_pci_bmdma_prepare_host(pdev, ppi, &host); | |
| 1593 | 1593 | if (rc) |
| 1594 | 1594 | return rc; |
| 1595 | 1595 | host->private_data = hpriv; |
| @@ -1626,7 +1626,7 @@ static int __devinit piix_init_one(struct pci_dev *pdev, · 30 unmodified lines | ||
| 1626 | 1626 | host->flags |= ATA_HOST_PARALLEL_SCAN; |
| 1627 | 1627 | |
| 1628 | 1628 | pci_set_master(pdev); |
| 1629 | − return ata_pci_sff_activate_host(host, ata_sff_interrupt, &piix_sht); | |
| 1629 | + return ata_pci_sff_activate_host(host, ata_bmdma_interrupt, &piix_sht); | |
| 1630 | 1630 | } |
| 1631 | 1631 | |
| 1632 | 1632 | static void piix_remove_one(struct pci_dev *pdev) |
| @@ -160,6 +160,10 @@ int libata_allow_tpm = 0; · 159 unmodified lines | ||
| 160 | 160 | module_param_named(allow_tpm, libata_allow_tpm, int, 0444); |
| 161 | 161 | MODULE_PARM_DESC(allow_tpm, "Permit the use of TPM commands (0=off [default], 1=on)"); |
| 162 | 162 | |
| 163 | +static int atapi_an; | |
| 164 | +module_param(atapi_an, int, 0444); | |
| 165 | +MODULE_PARM_DESC(atapi_an, "Enable ATAPI AN media presence notification (0=0ff [default], 1=on)"); | |
| 166 | + | |
| 163 | 167 | MODULE_AUTHOR("Jeff Garzik"); |
| 164 | 168 | MODULE_DESCRIPTION("Library module for ATA devices"); |
| 165 | 169 | MODULE_LICENSE("GPL"); |
| @@ -2122,6 +2126,14 @@ retry: · 1956 unmodified lines | ||
| 2122 | 2126 | goto err_out; |
| 2123 | 2127 | } |
| 2124 | 2128 | |
| 2129 | + if (dev->horkage & ATA_HORKAGE_DUMP_ID) { | |
| 2130 | + ata_dev_printk(dev, KERN_DEBUG, "dumping IDENTIFY data, " | |
| 2131 | + "class=%d may_fallback=%d tried_spinup=%d\n", | |
| 2132 | + class, may_fallback, tried_spinup); | |
| 2133 | + print_hex_dump(KERN_DEBUG, "", DUMP_PREFIX_OFFSET, | |
| 2134 | + 16, 2, id, ATA_ID_WORDS * sizeof(*id), true); | |
| 2135 | + } | |
| 2136 | + | |
| 2125 | 2137 | /* Falling back doesn't make sense if ID data was read |
| 2126 | 2138 | * successfully at least once. |
| 2127 | 2139 | */ |
| @@ -2510,7 +2522,8 @@ int ata_dev_configure(struct ata_device *dev) · 382 unmodified lines | ||
| 2510 | 2522 | * to enable ATAPI AN to discern between PHY status |
| 2511 | 2523 | * changed notifications and ATAPI ANs. |
| 2512 | 2524 | */ |
| 2513 | − if ((ap->flags & ATA_FLAG_AN) && ata_id_has_atapi_AN(id) && | |
| 2525 | + if (atapi_an && | |
| 2526 | + (ap->flags & ATA_FLAG_AN) && ata_id_has_atapi_AN(id) && | |
| 2514 | 2527 | (!sata_pmp_attached(ap) || |
| 2515 | 2528 | sata_scr_read(&ap->link, SCR_NOTIFICATION, &sntf) == 0)) { |
| 2516 | 2529 | unsigned int err_mask; |
| @@ -6372,6 +6385,7 @@ static int __init ata_parse_force_one(char **cur, · 3855 unmodified lines | ||
| 6372 | 6385 | { "3.0Gbps", .spd_limit = 2 }, |
| 6373 | 6386 | { "noncq", .horkage_on = ATA_HORKAGE_NONCQ }, |
| 6374 | 6387 | { "ncq", .horkage_off = ATA_HORKAGE_NONCQ }, |
| 6388 | + { "dump_id", .horkage_on = ATA_HORKAGE_DUMP_ID }, | |
| 6375 | 6389 | { "pio0", .xfer_mask = 1 << (ATA_SHIFT_PIO + 0) }, |
| 6376 | 6390 | { "pio1", .xfer_mask = 1 << (ATA_SHIFT_PIO + 1) }, |
| 6377 | 6391 | { "pio2", .xfer_mask = 1 << (ATA_SHIFT_PIO + 2) }, |
| @@ -63,7 +63,6 @@ const struct ata_port_operations ata_sff_port_ops = { · 62 unmodified lines | ||
| 63 | 63 | .sff_tf_read = ata_sff_tf_read, |
| 64 | 64 | .sff_exec_command = ata_sff_exec_command, |
| 65 | 65 | .sff_data_xfer = ata_sff_data_xfer, |
| 66 | − .sff_irq_clear = ata_sff_irq_clear, | |
| 67 | 66 | .sff_drain_fifo = ata_sff_drain_fifo, |
| 68 | 67 | |
| 69 | 68 | .lost_interrupt = ata_sff_lost_interrupt, |
| @@ -395,32 +394,11 @@ void ata_sff_irq_on(struct ata_port *ap) · 325 unmodified lines | ||
| 395 | 394 | ata_sff_set_devctl(ap, ap->ctl); |
| 396 | 395 | ata_wait_idle(ap); |
| 397 | 396 | |
| 398 | − ap->ops->sff_irq_clear(ap); | |
| 397 | + if (ap->ops->sff_irq_clear) | |
| 398 | + ap->ops->sff_irq_clear(ap); | |
| 399 | 399 | } |
| 400 | 400 | EXPORT_SYMBOL_GPL(ata_sff_irq_on); |
| 401 | 401 | |
| 402 | −/** | |
| 403 | − * ata_sff_irq_clear - Clear PCI IDE BMDMA interrupt. | |
| 404 | − * @ap: Port associated with this ATA transaction. | |
| 405 | − * | |
| 406 | − * Clear interrupt and error flags in DMA status register. | |
| 407 | − * | |
| 408 | − * May be used as the irq_clear() entry in ata_port_operations. | |
| 409 | − * | |
| 410 | − * LOCKING: | |
| 411 | − * spin_lock_irqsave(host lock) | |
| 412 | − */ | |
| 413 | −void ata_sff_irq_clear(struct ata_port *ap) | |
| 414 | −{ | |
| 415 | − void __iomem *mmio = ap->ioaddr.bmdma_addr; | |
| 416 | − | |
| 417 | − if (!mmio) | |
| 418 | − return; | |
| 419 | − | |
| 420 | − iowrite8(ioread8(mmio + ATA_DMA_STATUS), mmio + ATA_DMA_STATUS); | |
| 421 | −} | |
| 422 | −EXPORT_SYMBOL_GPL(ata_sff_irq_clear); | |
| 423 | − | |
| 424 | 402 | /** |
| 425 | 403 | * ata_sff_tf_load - send taskfile registers to host controller |
| 426 | 404 | * @ap: Port to which output is sent |
| @@ -820,11 +798,15 @@ static void atapi_send_cdb(struct ata_port *ap, struct ata_queued_cmd *qc) · 393 unmodified lines | ||
| 820 | 798 | case ATAPI_PROT_NODATA: |
| 821 | 799 | ap->hsm_task_state = HSM_ST_LAST; |
| 822 | 800 | break; |
| 801 | +#ifdef CONFIG_ATA_BMDMA | |
| 823 | 802 | case ATAPI_PROT_DMA: |
| 824 | 803 | ap->hsm_task_state = HSM_ST_LAST; |
| 825 | 804 | /* initiate bmdma */ |
| 826 | 805 | ap->ops->bmdma_start(qc); |
| 827 | 806 | break; |
| 807 | +#endif /* CONFIG_ATA_BMDMA */ | |
| 808 | + default: | |
| 809 | + BUG(); | |
| 828 | 810 | } |
| 829 | 811 | } |
| 830 | 812 | |
| @@ -1491,27 +1473,27 @@ bool ata_sff_qc_fill_rtf(struct ata_queued_cmd *qc) · 660 unmodified lines | ||
| 1491 | 1473 | } |
| 1492 | 1474 | EXPORT_SYMBOL_GPL(ata_sff_qc_fill_rtf); |
| 1493 | 1475 | |
| 1494 | −/** | |
| 1495 | − * ata_sff_host_intr - Handle host interrupt for given (port, task) | |
| 1496 | − * @ap: Port on which interrupt arrived (possibly...) | |
| 1497 | − * @qc: Taskfile currently active in engine | |
| 1498 | − * | |
| 1499 | − * Handle host interrupt for given queued command. Currently, | |
| 1500 | − * only DMA interrupts are handled. All other commands are | |
| 1501 | − * handled via polling with interrupts disabled (nIEN bit). | |
| 1502 | − * | |
| 1503 | − * LOCKING: | |
| 1504 | − * spin_lock_irqsave(host lock) | |
| 1505 | − * | |
| 1506 | − * RETURNS: | |
| 1507 | − * One if interrupt was handled, zero if not (shared irq). | |
| 1508 | − */ | |
| 1509 | −unsigned int ata_sff_host_intr(struct ata_port *ap, | |
| 1510 | − struct ata_queued_cmd *qc) | |
| 1476 | +static unsigned int ata_sff_idle_irq(struct ata_port *ap) | |
| 1511 | 1477 | { |
| 1512 | − struct ata_eh_info *ehi = &ap->link.eh_info; | |
| 1513 | − u8 status, host_stat = 0; | |
| 1514 | − bool bmdma_stopped = false; | |
| 1478 | + ap->stats.idle_irq++; | |
| 1479 | + | |
| 1480 | +#ifdef ATA_IRQ_TRAP | |
| 1481 | + if ((ap->stats.idle_irq % 1000) == 0) { | |
| 1482 | + ap->ops->sff_check_status(ap); | |
| 1483 | + if (ap->ops->sff_irq_clear) | |
| 1484 | + ap->ops->sff_irq_clear(ap); | |
| 1485 | + ata_port_printk(ap, KERN_WARNING, "irq trap\n"); | |
| 1486 | + return 1; | |
| 1487 | + } | |
| 1488 | +#endif | |
| 1489 | + return 0; /* irq not handled */ | |
| 1490 | +} | |
| 1491 | + | |
| 1492 | +static unsigned int __ata_sff_port_intr(struct ata_port *ap, | |
| 1493 | + struct ata_queued_cmd *qc, | |
| 1494 | + bool hsmv_on_idle) | |
| 1495 | +{ | |
| 1496 | + u8 status; | |
| 1515 | 1497 | |
| 1516 | 1498 | VPRINTK("ata%u: protocol %d task_state %d\n", |
| 1517 | 1499 | ap->print_id, qc->tf.protocol, ap->hsm_task_state); |
| @@ -1528,90 +1510,56 @@ unsigned int ata_sff_host_intr(struct ata_port *ap, · 10 unmodified lines | ||
| 1528 | 1510 | * need to check ata_is_atapi(qc->tf.protocol) again. |
| 1529 | 1511 | */ |
| 1530 | 1512 | if (!(qc->dev->flags & ATA_DFLAG_CDB_INTR)) |
| 1531 | − goto idle_irq; | |
| 1532 | − break; | |
| 1533 | − case HSM_ST_LAST: | |
| 1534 | − if (qc->tf.protocol == ATA_PROT_DMA || | |
| 1535 | − qc->tf.protocol == ATAPI_PROT_DMA) { | |
| 1536 | − /* check status of DMA engine */ | |
| 1537 | − host_stat = ap->ops->bmdma_status(ap); | |
| 1538 | − VPRINTK("ata%u: host_stat 0x%X\n", | |
| 1539 | − ap->print_id, host_stat); | |
| 1540 | − | |
| 1541 | − /* if it's not our irq... */ | |
| 1542 | − if (!(host_stat & ATA_DMA_INTR)) | |
| 1543 | − goto idle_irq; | |
| 1544 | − | |
| 1545 | − /* before we do anything else, clear DMA-Start bit */ | |
| 1546 | − ap->ops->bmdma_stop(qc); | |
| 1547 | − bmdma_stopped = true; | |
| 1548 | − | |
| 1549 | − if (unlikely(host_stat & ATA_DMA_ERR)) { | |
| 1550 | − /* error when transfering data to/from memory */ | |
| 1551 | − qc->err_mask |= AC_ERR_HOST_BUS; | |
| 1552 | − ap->hsm_task_state = HSM_ST_ERR; | |
| 1553 | − } | |
| 1554 | − } | |
| 1513 | + return ata_sff_idle_irq(ap); | |
| 1555 | 1514 | break; |
| 1556 | 1515 | case HSM_ST: |
| 1516 | + case HSM_ST_LAST: | |
| 1557 | 1517 | break; |
| 1558 | 1518 | default: |
| 1559 | − goto idle_irq; | |
| 1519 | + return ata_sff_idle_irq(ap); | |
| 1560 | 1520 | } |
| 1561 | 1521 | |
| 1562 | − | |
| 1563 | 1522 | /* check main status, clearing INTRQ if needed */ |
| 1564 | 1523 | status = ata_sff_irq_status(ap); |
| 1565 | 1524 | if (status & ATA_BUSY) { |
| 1566 | − if (bmdma_stopped) { | |
| 1525 | + if (hsmv_on_idle) { | |
| 1567 | 1526 | /* BMDMA engine is already stopped, we're screwed */ |
| 1568 | 1527 | qc->err_mask |= AC_ERR_HSM; |
| 1569 | 1528 | ap->hsm_task_state = HSM_ST_ERR; |
| 1570 | 1529 | } else |
| 1571 | − goto idle_irq; | |
| 1530 | + return ata_sff_idle_irq(ap); | |
| 1572 | 1531 | } |
| 1573 | 1532 | |
| 1574 | 1533 | /* clear irq events */ |
| 1575 | − ap->ops->sff_irq_clear(ap); | |
| 1534 | + if (ap->ops->sff_irq_clear) | |
| 1535 | + ap->ops->sff_irq_clear(ap); | |
| 1576 | 1536 | |
| 1577 | 1537 | ata_sff_hsm_move(ap, qc, status, 0); |
| 1578 | 1538 | |
| 1579 | − if (unlikely(qc->err_mask) && (qc->tf.protocol == ATA_PROT_DMA || | |
| 1580 | − qc->tf.protocol == ATAPI_PROT_DMA)) | |
| 1581 | − ata_ehi_push_desc(ehi, "BMDMA stat 0x%x", host_stat); | |
| 1582 | − | |
| 1583 | 1539 | return 1; /* irq handled */ |
| 1584 | − | |
| 1585 | −idle_irq: | |
| 1586 | − ap->stats.idle_irq++; | |
| 1587 | − | |
| 1588 | −#ifdef ATA_IRQ_TRAP | |
| 1589 | − if ((ap->stats.idle_irq % 1000) == 0) { | |
| 1590 | − ap->ops->sff_check_status(ap); | |
| 1591 | − ap->ops->sff_irq_clear(ap); | |
| 1592 | − ata_port_printk(ap, KERN_WARNING, "irq trap\n"); | |
| 1593 | − return 1; | |
| 1594 | − } | |
| 1595 | −#endif | |
| 1596 | − return 0; /* irq not handled */ | |
| 1597 | 1540 | } |
| 1598 | −EXPORT_SYMBOL_GPL(ata_sff_host_intr); | |
| 1599 | 1541 | |
| 1600 | 1542 | /** |
| 1601 | − * ata_sff_interrupt - Default ATA host interrupt handler | |
| 1602 | − * @irq: irq line (unused) | |
| 1603 | − * @dev_instance: pointer to our ata_host information structure | |
| 1543 | + * ata_sff_port_intr - Handle SFF port interrupt | |
| 1544 | + * @ap: Port on which interrupt arrived (possibly...) | |
| 1545 | + * @qc: Taskfile currently active in engine | |
| 1604 | 1546 | * |
| 1605 | − * Default interrupt handler for PCI IDE devices. Calls | |
| 1606 | − * ata_sff_host_intr() for each port that is not disabled. | |
| 1547 | + * Handle port interrupt for given queued command. | |
| 1607 | 1548 | * |
| 1608 | 1549 | * LOCKING: |
| 1609 | − * Obtains host lock during operation. | |
| 1550 | + * spin_lock_irqsave(host lock) | |
| 1610 | 1551 | * |
| 1611 | 1552 | * RETURNS: |
| 1612 | − * IRQ_NONE or IRQ_HANDLED. | |
| 1553 | + * One if interrupt was handled, zero if not (shared irq). | |
| 1613 | 1554 | */ |
| 1614 | −irqreturn_t ata_sff_interrupt(int irq, void *dev_instance) | |
| 1555 | +unsigned int ata_sff_port_intr(struct ata_port *ap, struct ata_queued_cmd *qc) | |
| 1556 | +{ | |
| 1557 | + return __ata_sff_port_intr(ap, qc, false); | |
| 1558 | +} | |
| 1559 | +EXPORT_SYMBOL_GPL(ata_sff_port_intr); | |
| 1560 | + | |
| 1561 | +static inline irqreturn_t __ata_sff_interrupt(int irq, void *dev_instance, | |
| 1562 | + unsigned int (*port_intr)(struct ata_port *, struct ata_queued_cmd *)) | |
| 1615 | 1563 | { |
| 1616 | 1564 | struct ata_host *host = dev_instance; |
| 1617 | 1565 | bool retried = false; |
| @@ -1631,7 +1579,7 @@ retry: · 13 unmodified lines | ||
| 1631 | 1579 | qc = ata_qc_from_tag(ap, ap->link.active_tag); |
| 1632 | 1580 | if (qc) { |
| 1633 | 1581 | if (!(qc->tf.flags & ATA_TFLAG_POLLING)) |
| 1634 | − handled |= ata_sff_host_intr(ap, qc); | |
| 1582 | + handled |= port_intr(ap, qc); | |
| 1635 | 1583 | else |
| 1636 | 1584 | polling |= 1 << i; |
| 1637 | 1585 | } else |
| @@ -1658,7 +1606,8 @@ retry: · 20 unmodified lines | ||
| 1658 | 1606 | |
| 1659 | 1607 | if (idle & (1 << i)) { |
| 1660 | 1608 | ap->ops->sff_check_status(ap); |
| 1661 | − ap->ops->sff_irq_clear(ap); | |
| 1609 | + if (ap->ops->sff_irq_clear) | |
| 1610 | + ap->ops->sff_irq_clear(ap); | |
| 1662 | 1611 | } else { |
| 1663 | 1612 | /* clear INTRQ and check if BUSY cleared */ |
| 1664 | 1613 | if (!(ap->ops->sff_check_status(ap) & ATA_BUSY)) |
| @@ -1680,6 +1629,25 @@ retry: · 15 unmodified lines | ||
| 1680 | 1629 | |
| 1681 | 1630 | return IRQ_RETVAL(handled); |
| 1682 | 1631 | } |
| 1632 | + | |
| 1633 | +/** | |
| 1634 | + * ata_sff_interrupt - Default SFF ATA host interrupt handler | |
| 1635 | + * @irq: irq line (unused) | |
| 1636 | + * @dev_instance: pointer to our ata_host information structure | |
| 1637 | + * | |
| 1638 | + * Default interrupt handler for PCI IDE devices. Calls | |
| 1639 | + * ata_sff_port_intr() for each port that is not disabled. | |
| 1640 | + * | |
| 1641 | + * LOCKING: | |
| 1642 | + * Obtains host lock during operation. | |
| 1643 | + * | |
| 1644 | + * RETURNS: | |
| 1645 | + * IRQ_NONE or IRQ_HANDLED. | |
| 1646 | + */ | |
| 1647 | +irqreturn_t ata_sff_interrupt(int irq, void *dev_instance) | |
| 1648 | +{ | |
| 1649 | + return __ata_sff_interrupt(irq, dev_instance, ata_sff_port_intr); | |
| 1650 | +} | |
| 1683 | 1651 | EXPORT_SYMBOL_GPL(ata_sff_interrupt); |
| 1684 | 1652 | |
| 1685 | 1653 | /** |
| @@ -1717,7 +1685,7 @@ void ata_sff_lost_interrupt(struct ata_port *ap) · 31 unmodified lines | ||
| 1717 | 1685 | status); |
| 1718 | 1686 | /* Run the host interrupt logic as if the interrupt had not been |
| 1719 | 1687 | lost */ |
| 1720 | − ata_sff_host_intr(ap, qc); | |
| 1688 | + ata_sff_port_intr(ap, qc); | |
| 1721 | 1689 | } |
| 1722 | 1690 | EXPORT_SYMBOL_GPL(ata_sff_lost_interrupt); |
| 1723 | 1691 | |
| @@ -1744,7 +1712,8 @@ void ata_sff_freeze(struct ata_port *ap) · 20 unmodified lines | ||
| 1744 | 1712 | */ |
| 1745 | 1713 | ap->ops->sff_check_status(ap); |
| 1746 | 1714 | |
| 1747 | − ap->ops->sff_irq_clear(ap); | |
| 1715 | + if (ap->ops->sff_irq_clear) | |
| 1716 | + ap->ops->sff_irq_clear(ap); | |
| 1748 | 1717 | } |
| 1749 | 1718 | EXPORT_SYMBOL_GPL(ata_sff_freeze); |
| 1750 | 1719 | |
| @@ -1761,7 +1730,8 @@ void ata_sff_thaw(struct ata_port *ap) · 10 unmodified lines | ||
| 1761 | 1730 | { |
| 1762 | 1731 | /* clear & re-enable interrupts */ |
| 1763 | 1732 | ap->ops->sff_check_status(ap); |
| 1764 | − ap->ops->sff_irq_clear(ap); | |
| 1733 | + if (ap->ops->sff_irq_clear) | |
| 1734 | + ap->ops->sff_irq_clear(ap); | |
| 1765 | 1735 | ata_sff_irq_on(ap); |
| 1766 | 1736 | } |
| 1767 | 1737 | EXPORT_SYMBOL_GPL(ata_sff_thaw); |
| @@ -2349,13 +2319,13 @@ int ata_pci_sff_init_host(struct ata_host *host) · 581 unmodified lines | ||
| 2349 | 2319 | EXPORT_SYMBOL_GPL(ata_pci_sff_init_host); |
| 2350 | 2320 | |
| 2351 | 2321 | /** |
| 2352 | − * ata_pci_sff_prepare_host - helper to prepare native PCI ATA host | |
| 2322 | + * ata_pci_sff_prepare_host - helper to prepare PCI PIO-only SFF ATA host | |
| 2353 | 2323 | * @pdev: target PCI device |
| 2354 | 2324 | * @ppi: array of port_info, must be enough for two ports |
| 2355 | 2325 | * @r_host: out argument for the initialized ATA host |
| 2356 | 2326 | * |
| 2357 | − * Helper to allocate ATA host for @pdev, acquire all native PCI | |
| 2358 | − * resources and initialize it accordingly in one go. | |
| 2327 | + * Helper to allocate PIO-only SFF ATA host for @pdev, acquire | |
| 2328 | + * all PCI resources and initialize it accordingly in one go. | |
| 2359 | 2329 | * |
| 2360 | 2330 | * LOCKING: |
| 2361 | 2331 | * Inherited from calling layer (may sleep). |
| @@ -2385,9 +2355,6 @@ int ata_pci_sff_prepare_host(struct pci_dev *pdev, · 23 unmodified lines | ||
| 2385 | 2355 | if (rc) |
| 2386 | 2356 | goto err_out; |
| 2387 | 2357 | |
| 2388 | − /* init DMA related stuff */ | |
| 2389 | − ata_pci_bmdma_init(host); | |
| 2390 | − | |
| 2391 | 2358 | devres_remove_group(&pdev->dev, NULL); |
| 2392 | 2359 | *r_host = host; |
| 2393 | 2360 | return 0; |
| @@ -2492,8 +2459,21 @@ out: · 98 unmodified lines | ||
| 2492 | 2459 | } |
| 2493 | 2460 | EXPORT_SYMBOL_GPL(ata_pci_sff_activate_host); |
| 2494 | 2461 | |
| 2462 | +static const struct ata_port_info *ata_sff_find_valid_pi( | |
| 2463 | + const struct ata_port_info * const *ppi) | |
| 2464 | +{ | |
| 2465 | + int i; | |
| 2466 | + | |
| 2467 | + /* look up the first valid port_info */ | |
| 2468 | + for (i = 0; i < 2 && ppi[i]; i++) | |
| 2469 | + if (ppi[i]->port_ops != &ata_dummy_port_ops) | |
| 2470 | + return ppi[i]; | |
| 2471 | + | |
| 2472 | + return NULL; | |
| 2473 | +} | |
| 2474 | + | |
| 2495 | 2475 | /** |
| 2496 | − * ata_pci_sff_init_one - Initialize/register PCI IDE host controller | |
| 2476 | + * ata_pci_sff_init_one - Initialize/register PIO-only PCI IDE controller | |
| 2497 | 2477 | * @pdev: Controller to be initialized |
| 2498 | 2478 | * @ppi: array of port_info, must be enough for two ports |
| 2499 | 2479 | * @sht: scsi_host_template to use when registering the host |
| @@ -2502,11 +2482,7 @@ EXPORT_SYMBOL_GPL(ata_pci_sff_activate_host); · 2 unmodified lines | ||
| 2502 | 2482 | * |
| 2503 | 2483 | * This is a helper function which can be called from a driver's |
| 2504 | 2484 | * xxx_init_one() probe function if the hardware uses traditional |
| 2505 | − * IDE taskfile registers. | |
| 2506 | − * | |
| 2507 | − * This function calls pci_enable_device(), reserves its register | |
| 2508 | − * regions, sets the dma mask, enables bus master mode, and calls | |
| 2509 | − * ata_device_add() | |
| 2485 | + * IDE taskfile registers and is PIO only. | |
| 2510 | 2486 | * |
| 2511 | 2487 | * ASSUMPTION: |
| 2512 | 2488 | * Nobody makes a single channel controller that appears solely as |
| @@ -2523,20 +2499,13 @@ int ata_pci_sff_init_one(struct pci_dev *pdev, · 10 unmodified lines | ||
| 2523 | 2499 | struct scsi_host_template *sht, void *host_priv, int hflag) |
| 2524 | 2500 | { |
| 2525 | 2501 | struct device *dev = &pdev->dev; |
| 2526 | − const struct ata_port_info *pi = NULL; | |
| 2502 | + const struct ata_port_info *pi; | |
| 2527 | 2503 | struct ata_host *host = NULL; |
| 2528 | − int i, rc; | |
| 2504 | + int rc; | |
| 2529 | 2505 | |
| 2530 | 2506 | DPRINTK("ENTER\n"); |
| 2531 | 2507 | |
| 2532 | − /* look up the first valid port_info */ | |
| 2533 | − for (i = 0; i < 2 && ppi[i]; i++) { | |
| 2534 | − if (ppi[i]->port_ops != &ata_dummy_port_ops) { | |
| 2535 | − pi = ppi[i]; | |
| 2536 | − break; | |
| 2537 | − } | |
| 2538 | − } | |
| 2539 | − | |
| 2508 | + pi = ata_sff_find_valid_pi(ppi); | |
| 2540 | 2509 | if (!pi) { |
| 2541 | 2510 | dev_printk(KERN_ERR, &pdev->dev, |
| 2542 | 2511 | "no valid port_info specified\n"); |
| @@ -2557,7 +2526,6 @@ int ata_pci_sff_init_one(struct pci_dev *pdev, · 14 unmodified lines | ||
| 2557 | 2526 | host->private_data = host_priv; |
| 2558 | 2527 | host->flags |= hflag; |
| 2559 | 2528 | |
| 2560 | − pci_set_master(pdev); | |
| 2561 | 2529 | rc = ata_pci_sff_activate_host(host, ata_sff_interrupt, sht); |
| 2562 | 2530 | out: |
| 2563 | 2531 | if (rc == 0) |
| @@ -2571,6 +2539,12 @@ EXPORT_SYMBOL_GPL(ata_pci_sff_init_one); · 7 unmodified lines | ||
| 2571 | 2539 | |
| 2572 | 2540 | #endif /* CONFIG_PCI */ |
| 2573 | 2541 | |
| 2542 | +/* | |
| 2543 | + * BMDMA support | |
| 2544 | + */ | |
| 2545 | + | |
| 2546 | +#ifdef CONFIG_ATA_BMDMA | |
| 2547 | + | |
| 2574 | 2548 | const struct ata_port_operations ata_bmdma_port_ops = { |
| 2575 | 2549 | .inherits = &ata_sff_port_ops, |
| 2576 | 2550 | |
| @@ -2580,6 +2554,7 @@ const struct ata_port_operations ata_bmdma_port_ops = { · 3 unmodified lines | ||
| 2580 | 2554 | .qc_prep = ata_bmdma_qc_prep, |
| 2581 | 2555 | .qc_issue = ata_bmdma_qc_issue, |
| 2582 | 2556 | |
| 2557 | + .sff_irq_clear = ata_bmdma_irq_clear, | |
| 2583 | 2558 | .bmdma_setup = ata_bmdma_setup, |
| 2584 | 2559 | .bmdma_start = ata_bmdma_start, |
| 2585 | 2560 | .bmdma_stop = ata_bmdma_stop, |
| @@ -2803,6 +2778,75 @@ unsigned int ata_bmdma_qc_issue(struct ata_queued_cmd *qc) · 217 unmodified lines | ||
| 2803 | 2778 | } |
| 2804 | 2779 | EXPORT_SYMBOL_GPL(ata_bmdma_qc_issue); |
| 2805 | 2780 | |
| 2781 | +/** | |
| 2782 | + * ata_bmdma_port_intr - Handle BMDMA port interrupt | |
| 2783 | + * @ap: Port on which interrupt arrived (possibly...) | |
| 2784 | + * @qc: Taskfile currently active in engine | |
| 2785 | + * | |
| 2786 | + * Handle port interrupt for given queued command. | |
| 2787 | + * | |
| 2788 | + * LOCKING: | |
| 2789 | + * spin_lock_irqsave(host lock) | |
| 2790 | + * | |
| 2791 | + * RETURNS: | |
| 2792 | + * One if interrupt was handled, zero if not (shared irq). | |
| 2793 | + */ | |
| 2794 | +unsigned int ata_bmdma_port_intr(struct ata_port *ap, struct ata_queued_cmd *qc) | |
| 2795 | +{ | |
| 2796 | + struct ata_eh_info *ehi = &ap->link.eh_info; | |
| 2797 | + u8 host_stat = 0; | |
| 2798 | + bool bmdma_stopped = false; | |
| 2799 | + unsigned int handled; | |
| 2800 | + | |
| 2801 | + if (ap->hsm_task_state == HSM_ST_LAST && ata_is_dma(qc->tf.protocol)) { | |
| 2802 | + /* check status of DMA engine */ | |
| 2803 | + host_stat = ap->ops->bmdma_status(ap); | |
| 2804 | + VPRINTK("ata%u: host_stat 0x%X\n", ap->print_id, host_stat); | |
| 2805 | + | |
| 2806 | + /* if it's not our irq... */ | |
| 2807 | + if (!(host_stat & ATA_DMA_INTR)) | |
| 2808 | + return ata_sff_idle_irq(ap); | |
| 2809 | + | |
| 2810 | + /* before we do anything else, clear DMA-Start bit */ | |
| 2811 | + ap->ops->bmdma_stop(qc); | |
| 2812 | + bmdma_stopped = true; | |
| 2813 | + | |
| 2814 | + if (unlikely(host_stat & ATA_DMA_ERR)) { | |
| 2815 | + /* error when transfering data to/from memory */ | |
| 2816 | + qc->err_mask |= AC_ERR_HOST_BUS; | |
| 2817 | + ap->hsm_task_state = HSM_ST_ERR; | |
| 2818 | + } | |
| 2819 | + } | |
| 2820 | + | |
| 2821 | + handled = __ata_sff_port_intr(ap, qc, bmdma_stopped); | |
| 2822 | + | |
| 2823 | + if (unlikely(qc->err_mask) && ata_is_dma(qc->tf.protocol)) | |
| 2824 | + ata_ehi_push_desc(ehi, "BMDMA stat 0x%x", host_stat); | |
| 2825 | + | |
| 2826 | + return handled; | |
| 2827 | +} | |
| 2828 | +EXPORT_SYMBOL_GPL(ata_bmdma_port_intr); | |
| 2829 | + | |
| 2830 | +/** | |
| 2831 | + * ata_bmdma_interrupt - Default BMDMA ATA host interrupt handler | |
| 2832 | + * @irq: irq line (unused) | |
| 2833 | + * @dev_instance: pointer to our ata_host information structure | |
| 2834 | + * | |
| 2835 | + * Default interrupt handler for PCI IDE devices. Calls | |
| 2836 | + * ata_bmdma_port_intr() for each port that is not disabled. | |
| 2837 | + * | |
| 2838 | + * LOCKING: | |
| 2839 | + * Obtains host lock during operation. | |
| 2840 | + * | |
| 2841 | + * RETURNS: | |
| 2842 | + * IRQ_NONE or IRQ_HANDLED. | |
| 2843 | + */ | |
| 2844 | +irqreturn_t ata_bmdma_interrupt(int irq, void *dev_instance) | |
| 2845 | +{ | |
| 2846 | + return __ata_sff_interrupt(irq, dev_instance, ata_bmdma_port_intr); | |
| 2847 | +} | |
| 2848 | +EXPORT_SYMBOL_GPL(ata_bmdma_interrupt); | |
| 2849 | + | |
| 2806 | 2850 | /** |
| 2807 | 2851 | * ata_bmdma_error_handler - Stock error handler for BMDMA controller |
| 2808 | 2852 | * @ap: port to handle error for |
| @@ -2848,7 +2892,8 @@ void ata_bmdma_error_handler(struct ata_port *ap) · 39 unmodified lines | ||
| 2848 | 2892 | /* if we're gonna thaw, make sure IRQ is clear */ |
| 2849 | 2893 | if (thaw) { |
| 2850 | 2894 | ap->ops->sff_check_status(ap); |
| 2851 | − ap->ops->sff_irq_clear(ap); | |
| 2895 | + if (ap->ops->sff_irq_clear) | |
| 2896 | + ap->ops->sff_irq_clear(ap); | |
| 2852 | 2897 | } |
| 2853 | 2898 | } |
| 2854 | 2899 | |
| @@ -2881,6 +2926,28 @@ void ata_bmdma_post_internal_cmd(struct ata_queued_cmd *qc) · 26 unmodified lines | ||
| 2881 | 2926 | } |
| 2882 | 2927 | EXPORT_SYMBOL_GPL(ata_bmdma_post_internal_cmd); |
| 2883 | 2928 | |
| 2929 | +/** | |
| 2930 | + * ata_bmdma_irq_clear - Clear PCI IDE BMDMA interrupt. | |
| 2931 | + * @ap: Port associated with this ATA transaction. | |
| 2932 | + * | |
| 2933 | + * Clear interrupt and error flags in DMA status register. | |
| 2934 | + * | |
| 2935 | + * May be used as the irq_clear() entry in ata_port_operations. | |
| 2936 | + * | |
| 2937 | + * LOCKING: | |
| 2938 | + * spin_lock_irqsave(host lock) | |
| 2939 | + */ | |
| 2940 | +void ata_bmdma_irq_clear(struct ata_port *ap) | |
| 2941 | +{ | |
| 2942 | + void __iomem *mmio = ap->ioaddr.bmdma_addr; | |
| 2943 | + | |
| 2944 | + if (!mmio) | |
| 2945 | + return; | |
| 2946 | + | |
| 2947 | + iowrite8(ioread8(mmio + ATA_DMA_STATUS), mmio + ATA_DMA_STATUS); | |
| 2948 | +} | |
| 2949 | +EXPORT_SYMBOL_GPL(ata_bmdma_irq_clear); | |
| 2950 | + | |
| 2884 | 2951 | /** |
| 2885 | 2952 | * ata_bmdma_setup - Set up PCI IDE BMDMA transaction |
| 2886 | 2953 | * @qc: Info associated with this ATA transaction. |
| @@ -3137,7 +3204,100 @@ void ata_pci_bmdma_init(struct ata_host *host) · 250 unmodified lines | ||
| 3137 | 3204 | } |
| 3138 | 3205 | EXPORT_SYMBOL_GPL(ata_pci_bmdma_init); |
| 3139 | 3206 | |
| 3207 | +/** | |
| 3208 | + * ata_pci_bmdma_prepare_host - helper to prepare PCI BMDMA ATA host | |
| 3209 | + * @pdev: target PCI device | |
| 3210 | + * @ppi: array of port_info, must be enough for two ports | |
| 3211 | + * @r_host: out argument for the initialized ATA host | |
| 3212 | + * | |
| 3213 | + * Helper to allocate BMDMA ATA host for @pdev, acquire all PCI | |
| 3214 | + * resources and initialize it accordingly in one go. | |
| 3215 | + * | |
| 3216 | + * LOCKING: | |
| 3217 | + * Inherited from calling layer (may sleep). | |
| 3218 | + * | |
| 3219 | + * RETURNS: | |
| 3220 | + * 0 on success, -errno otherwise. | |
| 3221 | + */ | |
| 3222 | +int ata_pci_bmdma_prepare_host(struct pci_dev *pdev, | |
| 3223 | + const struct ata_port_info * const * ppi, | |
| 3224 | + struct ata_host **r_host) | |
| 3225 | +{ | |
| 3226 | + int rc; | |
| 3227 | + | |
| 3228 | + rc = ata_pci_sff_prepare_host(pdev, ppi, r_host); | |
| 3229 | + if (rc) | |
| 3230 | + return rc; | |
| 3231 | + | |
| 3232 | + ata_pci_bmdma_init(*r_host); | |
| 3233 | + return 0; | |
| 3234 | +} | |
| 3235 | +EXPORT_SYMBOL_GPL(ata_pci_bmdma_prepare_host); | |
| 3236 | + | |
| 3237 | +/** | |
| 3238 | + * ata_pci_bmdma_init_one - Initialize/register BMDMA PCI IDE controller | |
| 3239 | + * @pdev: Controller to be initialized | |
| 3240 | + * @ppi: array of port_info, must be enough for two ports | |
| 3241 | + * @sht: scsi_host_template to use when registering the host | |
| 3242 | + * @host_priv: host private_data | |
| 3243 | + * @hflags: host flags | |
| 3244 | + * | |
| 3245 | + * This function is similar to ata_pci_sff_init_one() but also | |
| 3246 | + * takes care of BMDMA initialization. | |
| 3247 | + * | |
| 3248 | + * LOCKING: | |
| 3249 | + * Inherited from PCI layer (may sleep). | |
| 3250 | + * | |
| 3251 | + * RETURNS: | |
| 3252 | + * Zero on success, negative on errno-based value on error. | |
| 3253 | + */ | |
| 3254 | +int ata_pci_bmdma_init_one(struct pci_dev *pdev, | |
| 3255 | + const struct ata_port_info * const * ppi, | |
| 3256 | + struct scsi_host_template *sht, void *host_priv, | |
| 3257 | + int hflags) | |
| 3258 | +{ | |
| 3259 | + struct device *dev = &pdev->dev; | |
| 3260 | + const struct ata_port_info *pi; | |
| 3261 | + struct ata_host *host = NULL; | |
| 3262 | + int rc; | |
| 3263 | + | |
| 3264 | + DPRINTK("ENTER\n"); | |
| 3265 | + | |
| 3266 | + pi = ata_sff_find_valid_pi(ppi); | |
| 3267 | + if (!pi) { | |
| 3268 | + dev_printk(KERN_ERR, &pdev->dev, | |
| 3269 | + "no valid port_info specified\n"); | |
| 3270 | + return -EINVAL; | |
| 3271 | + } | |
| 3272 | + | |
| 3273 | + if (!devres_open_group(dev, NULL, GFP_KERNEL)) | |
| 3274 | + return -ENOMEM; | |
| 3275 | + | |
| 3276 | + rc = pcim_enable_device(pdev); | |
| 3277 | + if (rc) | |
| 3278 | + goto out; | |
| 3279 | + | |
| 3280 | + /* prepare and activate BMDMA host */ | |
| 3281 | + rc = ata_pci_bmdma_prepare_host(pdev, ppi, &host); | |
| 3282 | + if (rc) | |
| 3283 | + goto out; | |
| 3284 | + host->private_data = host_priv; | |
| 3285 | + host->flags |= hflags; | |
| 3286 | + | |
| 3287 | + pci_set_master(pdev); | |
| 3288 | + rc = ata_pci_sff_activate_host(host, ata_bmdma_interrupt, sht); | |
| 3289 | + out: | |
| 3290 | + if (rc == 0) | |
| 3291 | + devres_remove_group(&pdev->dev, NULL); | |
| 3292 | + else | |
| 3293 | + devres_release_group(&pdev->dev, NULL); | |
| 3294 | + | |
| 3295 | + return rc; | |
| 3296 | +} | |
| 3297 | +EXPORT_SYMBOL_GPL(ata_pci_bmdma_init_one); | |
| 3298 | + | |
| 3140 | 3299 | #endif /* CONFIG_PCI */ |
| 3300 | +#endif /* CONFIG_ATA_BMDMA */ | |
| 3141 | 3301 | |
| 3142 | 3302 | /** |
| 3143 | 3303 | * ata_sff_port_init - Initialize SFF/BMDMA ATA port |
| @@ -260,7 +260,7 @@ static int pacpi_init_one (struct pci_dev *pdev, const struct pci_device_id *id) · 259 unmodified lines | ||
| 260 | 260 | return rc; |
| 261 | 261 | pcim_pin_device(pdev); |
| 262 | 262 | } |
| 263 | − return ata_pci_sff_init_one(pdev, ppi, &pacpi_sht, NULL, 0); | |
| 263 | + return ata_pci_bmdma_init_one(pdev, ppi, &pacpi_sht, NULL, 0); | |
| 264 | 264 | } |
| 265 | 265 | |
| 266 | 266 | static const struct pci_device_id pacpi_pci_tbl[] = { |
| @@ -583,7 +583,10 @@ static int ali_init_one(struct pci_dev *pdev, const struct pci_device_id *id) · 582 unmodified lines | ||
| 583 | 583 | ppi[0] = &info_20_udma; |
| 584 | 584 | } |
| 585 | 585 | |
| 586 | − return ata_pci_sff_init_one(pdev, ppi, &ali_sht, NULL, 0); | |
| 586 | + if (!ppi[0]->mwdma_mask && !ppi[0]->udma_mask) | |
| 587 | + return ata_pci_sff_init_one(pdev, ppi, &ali_sht, NULL, 0); | |
| 588 | + else | |
| 589 | + return ata_pci_bmdma_init_one(pdev, ppi, &ali_sht, NULL, 0); | |
| 587 | 590 | } |
| 588 | 591 | |
| 589 | 592 | #ifdef CONFIG_PM |
| @@ -574,7 +574,7 @@ static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id) · 573 unmodified lines | ||
| 574 | 574 | } |
| 575 | 575 | |
| 576 | 576 | /* And fire it up */ |
| 577 | − return ata_pci_sff_init_one(pdev, ppi, &amd_sht, hpriv, 0); | |
| 577 | + return ata_pci_bmdma_init_one(pdev, ppi, &amd_sht, hpriv, 0); | |
| 578 | 578 | } |
| 579 | 579 | |
| 580 | 580 | #ifdef CONFIG_PM |
| @@ -421,7 +421,7 @@ static int artop_init_one (struct pci_dev *pdev, const struct pci_device_id *id) · 420 unmodified lines | ||
| 421 | 421 | |
| 422 | 422 | BUG_ON(ppi[0] == NULL); |
| 423 | 423 | |
| 424 | − return ata_pci_sff_init_one(pdev, ppi, &artop_sht, NULL, 0); | |
| 424 | + return ata_pci_bmdma_init_one(pdev, ppi, &artop_sht, NULL, 0); | |
| 425 | 425 | } |
| 426 | 426 | |
| 427 | 427 | static const struct pci_device_id artop_pci_tbl[] = { |
| @@ -246,8 +246,8 @@ static int atiixp_init_one(struct pci_dev *pdev, const struct pci_device_id *id) · 245 unmodified lines | ||
| 246 | 246 | if (!pci_test_config_bits(pdev, &atiixp_enable_bits[i])) |
| 247 | 247 | ppi[i] = &ata_dummy_port_info; |
| 248 | 248 | |
| 249 | − return ata_pci_sff_init_one(pdev, ppi, &atiixp_sht, NULL, | |
| 250 | − ATA_HOST_PARALLEL_SCAN); | |
| 249 | + return ata_pci_bmdma_init_one(pdev, ppi, &atiixp_sht, NULL, | |
| 250 | + ATA_HOST_PARALLEL_SCAN); | |
| 251 | 251 | } |
| 252 | 252 | |
| 253 | 253 | static const struct pci_device_id atiixp[] = { |
| @@ -525,7 +525,7 @@ static int atp867x_init_one(struct pci_dev *pdev, · 524 unmodified lines | ||
| 525 | 525 | |
| 526 | 526 | pci_set_master(pdev); |
| 527 | 527 | |
| 528 | − rc = ata_host_activate(host, pdev->irq, ata_sff_interrupt, | |
| 528 | + rc = ata_host_activate(host, pdev->irq, ata_bmdma_interrupt, | |
| 529 | 529 | IRQF_SHARED, &atp867x_sht); |
| 530 | 530 | if (rc) |
| 531 | 531 | dev_printk(KERN_ERR, &pdev->dev, "failed to activate host\n"); |
| @@ -1214,7 +1214,7 @@ static unsigned int bfin_data_xfer(struct ata_device *dev, unsigned char *buf, · 1213 unmodified lines | ||
| 1214 | 1214 | * bfin_irq_clear - Clear ATAPI interrupt. |
| 1215 | 1215 | * @ap: Port associated with this ATA transaction. |
| 1216 | 1216 | * |
| 1217 | − * Note: Original code is ata_sff_irq_clear(). | |
| 1217 | + * Note: Original code is ata_bmdma_irq_clear(). | |
| 1218 | 1218 | */ |
| 1219 | 1219 | |
| 1220 | 1220 | static void bfin_irq_clear(struct ata_port *ap) |
| @@ -367,7 +367,7 @@ static int cmd64x_init_one(struct pci_dev *pdev, const struct pci_device_id *id) · 366 unmodified lines | ||
| 367 | 367 | pci_write_config_byte(pdev, UDIDETCR0, 0xF0); |
| 368 | 368 | #endif |
| 369 | 369 | |
| 370 | − return ata_pci_sff_init_one(pdev, ppi, &cmd64x_sht, NULL, 0); | |
| 370 | + return ata_pci_bmdma_init_one(pdev, ppi, &cmd64x_sht, NULL, 0); | |
| 371 | 371 | } |
| 372 | 372 | |
| 373 | 373 | #ifdef CONFIG_PM |
| @@ -221,7 +221,7 @@ static int __devinit cs5520_init_one(struct pci_dev *pdev, const struct pci_devi · 220 unmodified lines | ||
| 221 | 221 | continue; |
| 222 | 222 | |
| 223 | 223 | rc = devm_request_irq(&pdev->dev, irq[ap->port_no], |
| 224 | − ata_sff_interrupt, 0, DRV_NAME, host); | |
| 224 | + ata_bmdma_interrupt, 0, DRV_NAME, host); | |
| 225 | 225 | if (rc) |
| 226 | 226 | return rc; |
| 227 | 227 | |
| @@ -324,7 +324,7 @@ static int cs5530_init_one(struct pci_dev *pdev, const struct pci_device_id *id) · 323 unmodified lines | ||
| 324 | 324 | ppi[1] = &info_palmax_secondary; |
| 325 | 325 | |
| 326 | 326 | /* Now kick off ATA set up */ |
| 327 | − return ata_pci_sff_init_one(pdev, ppi, &cs5530_sht, NULL, 0); | |
| 327 | + return ata_pci_bmdma_init_one(pdev, ppi, &cs5530_sht, NULL, 0); | |
| 328 | 328 | } |
| 329 | 329 | |
| 330 | 330 | #ifdef CONFIG_PM |
| @@ -198,7 +198,7 @@ static int cs5535_init_one(struct pci_dev *dev, const struct pci_device_id *id) · 197 unmodified lines | ||
| 198 | 198 | rdmsr(ATAC_CH0D1_PIO, timings, dummy); |
| 199 | 199 | if (CS5535_BAD_PIO(timings)) |
| 200 | 200 | wrmsr(ATAC_CH0D1_PIO, 0xF7F4F7F4UL, 0); |
| 201 | − return ata_pci_sff_init_one(dev, ppi, &cs5535_sht, NULL, 0); | |
| 201 | + return ata_pci_bmdma_init_one(dev, ppi, &cs5535_sht, NULL, 0); | |
| 202 | 202 | } |
| 203 | 203 | |
| 204 | 204 | static const struct pci_device_id cs5535[] = { |
| @@ -260,7 +260,7 @@ static int cs5536_init_one(struct pci_dev *dev, const struct pci_device_id *id) · 259 unmodified lines | ||
| 260 | 260 | return -ENODEV; |
| 261 | 261 | } |
| 262 | 262 | |
| 263 | − return ata_pci_sff_init_one(dev, ppi, &cs5536_sht, NULL, 0); | |
| 263 | + return ata_pci_bmdma_init_one(dev, ppi, &cs5536_sht, NULL, 0); | |
| 264 | 264 | } |
| 265 | 265 | |
| 266 | 266 | static const struct pci_device_id cs5536[] = { |
| @@ -138,7 +138,7 @@ static int cy82c693_init_one(struct pci_dev *pdev, const struct pci_device_id *i · 137 unmodified lines | ||
| 138 | 138 | if (PCI_FUNC(pdev->devfn) != 1) |
| 139 | 139 | return -ENODEV; |
| 140 | 140 | |
| 141 | − return ata_pci_sff_init_one(pdev, ppi, &cy82c693_sht, NULL, 0); | |
| 141 | + return ata_pci_bmdma_init_one(pdev, ppi, &cy82c693_sht, NULL, 0); | |
| 142 | 142 | } |
| 143 | 143 | |
| 144 | 144 | static const struct pci_device_id cy82c693[] = { |
| @@ -277,8 +277,8 @@ static int efar_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) · 276 unmodified lines | ||
| 277 | 277 | dev_printk(KERN_DEBUG, &pdev->dev, |
| 278 | 278 | "version " DRV_VERSION "\n"); |
| 279 | 279 | |
| 280 | − return ata_pci_sff_init_one(pdev, ppi, &efar_sht, NULL, | |
| 281 | − ATA_HOST_PARALLEL_SCAN); | |
| 280 | + return ata_pci_bmdma_init_one(pdev, ppi, &efar_sht, NULL, | |
| 281 | + ATA_HOST_PARALLEL_SCAN); | |
| 282 | 282 | } |
| 283 | 283 | |
| 284 | 284 | static const struct pci_device_id efar_pci_tbl[] = { |
| @@ -361,7 +361,7 @@ static int hpt36x_init_one(struct pci_dev *dev, const struct pci_device_id *id) · 360 unmodified lines | ||
| 361 | 361 | break; |
| 362 | 362 | } |
| 363 | 363 | /* Now kick off ATA set up */ |
| 364 | − return ata_pci_sff_init_one(dev, ppi, &hpt36x_sht, hpriv, 0); | |
| 364 | + return ata_pci_bmdma_init_one(dev, ppi, &hpt36x_sht, hpriv, 0); | |
| 365 | 365 | } |
| 366 | 366 | |
| 367 | 367 | #ifdef CONFIG_PM |
| @@ -987,7 +987,7 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id) · 986 unmodified lines | ||
| 987 | 987 | } |
| 988 | 988 | |
| 989 | 989 | /* Now kick off ATA set up */ |
| 990 | − return ata_pci_sff_init_one(dev, ppi, &hpt37x_sht, private_data, 0); | |
| 990 | + return ata_pci_bmdma_init_one(dev, ppi, &hpt37x_sht, private_data, 0); | |
| 991 | 991 | } |
| 992 | 992 | |
| 993 | 993 | static const struct pci_device_id hpt37x[] = { |
| @@ -548,7 +548,7 @@ static int hpt3x2n_init_one(struct pci_dev *dev, const struct pci_device_id *id) · 547 unmodified lines | ||
| 548 | 548 | outb(inb(iobase + 0x9c) | 0x04, iobase + 0x9c); |
| 549 | 549 | |
| 550 | 550 | /* Now kick off ATA set up */ |
| 551 | − return ata_pci_sff_init_one(dev, ppi, &hpt3x2n_sht, hpriv, 0); | |
| 551 | + return ata_pci_bmdma_init_one(dev, ppi, &hpt3x2n_sht, hpriv, 0); | |
| 552 | 552 | } |
| 553 | 553 | |
| 554 | 554 | static const struct pci_device_id hpt3x2n[] = { |
| @@ -248,7 +248,7 @@ static int hpt3x3_init_one(struct pci_dev *pdev, const struct pci_device_id *id) · 247 unmodified lines | ||
| 248 | 248 | ata_port_pbar_desc(ap, 4, offset_cmd[i], "cmd"); |
| 249 | 249 | } |
| 250 | 250 | pci_set_master(pdev); |
| 251 | − return ata_host_activate(host, pdev->irq, ata_sff_interrupt, | |
| 251 | + return ata_host_activate(host, pdev->irq, ata_bmdma_interrupt, | |
| 252 | 252 | IRQF_SHARED, &hpt3x3_sht); |
| 253 | 253 | } |
| 254 | 254 | |
| @@ -470,7 +470,7 @@ static int __devinit pata_icside_add_ports(struct pata_icside_info *info) · 469 unmodified lines | ||
| 470 | 470 | pata_icside_setup_ioaddr(ap, info->base, info, info->port[i]); |
| 471 | 471 | } |
| 472 | 472 | |
| 473 | − return ata_host_activate(host, ec->irq, ata_sff_interrupt, 0, | |
| 473 | + return ata_host_activate(host, ec->irq, ata_bmdma_interrupt, 0, | |
| 474 | 474 | &pata_icside_sht); |
| 475 | 475 | } |
| 476 | 476 | |
| @@ -273,7 +273,7 @@ static int it8213_init_one (struct pci_dev *pdev, const struct pci_device_id *en · 272 unmodified lines | ||
| 273 | 273 | dev_printk(KERN_DEBUG, &pdev->dev, |
| 274 | 274 | "version " DRV_VERSION "\n"); |
| 275 | 275 | |
| 276 | − return ata_pci_sff_init_one(pdev, ppi, &it8213_sht, NULL, 0); | |
| 276 | + return ata_pci_bmdma_init_one(pdev, ppi, &it8213_sht, NULL, 0); | |
| 277 | 277 | } |
| 278 | 278 | |
| 279 | 279 | static const struct pci_device_id it8213_pci_tbl[] = { |
| @@ -933,7 +933,7 @@ static int it821x_init_one(struct pci_dev *pdev, const struct pci_device_id *id) · 932 unmodified lines | ||
| 933 | 933 | else |
| 934 | 934 | ppi[0] = &info_smart; |
| 935 | 935 | } |
| 936 | − return ata_pci_sff_init_one(pdev, ppi, &it821x_sht, NULL, 0); | |
| 936 | + return ata_pci_bmdma_init_one(pdev, ppi, &it821x_sht, NULL, 0); | |
| 937 | 937 | } |
| 938 | 938 | |
| 939 | 939 | #ifdef CONFIG_PM |
| @@ -144,7 +144,7 @@ static int jmicron_init_one (struct pci_dev *pdev, const struct pci_device_id *i · 143 unmodified lines | ||
| 144 | 144 | }; |
| 145 | 145 | const struct ata_port_info *ppi[] = { &info, NULL }; |
| 146 | 146 | |
| 147 | − return ata_pci_sff_init_one(pdev, ppi, &jmicron_sht, NULL, 0); | |
| 147 | + return ata_pci_bmdma_init_one(pdev, ppi, &jmicron_sht, NULL, 0); | |
| 148 | 148 | } |
| 149 | 149 | |
| 150 | 150 | static const struct pci_device_id jmicron_pci_tbl[] = { |
| @@ -1110,7 +1110,7 @@ static int __devinit pata_macio_common_init(struct pata_macio_priv *priv, · 1109 unmodified lines | ||
| 1110 | 1110 | |
| 1111 | 1111 | /* Start it up */ |
| 1112 | 1112 | priv->irq = irq; |
| 1113 | − return ata_host_activate(priv->host, irq, ata_sff_interrupt, 0, | |
| 1113 | + return ata_host_activate(priv->host, irq, ata_bmdma_interrupt, 0, | |
| 1114 | 1114 | &pata_macio_sht); |
| 1115 | 1115 | } |
| 1116 | 1116 | |
| @@ -153,7 +153,7 @@ static int marvell_init_one (struct pci_dev *pdev, const struct pci_device_id *i · 152 unmodified lines | ||
| 153 | 153 | return -ENODEV; |
| 154 | 154 | } |
| 155 | 155 | #endif |
| 156 | − return ata_pci_sff_init_one(pdev, ppi, &marvell_sht, NULL, 0); | |
| 156 | + return ata_pci_bmdma_init_one(pdev, ppi, &marvell_sht, NULL, 0); | |
| 157 | 157 | } |
| 158 | 158 | |
| 159 | 159 | static const struct pci_device_id marvell_pci_tbl[] = { |
| @@ -659,7 +659,7 @@ mpc52xx_ata_init_one(struct device *dev, struct mpc52xx_ata_priv *priv, · 658 unmodified lines | ||
| 659 | 659 | ata_port_desc(ap, "ata_regs 0x%lx", raw_ata_regs); |
| 660 | 660 | |
| 661 | 661 | /* activate host */ |
| 662 | − return ata_host_activate(host, priv->ata_irq, ata_sff_interrupt, 0, | |
| 662 | + return ata_host_activate(host, priv->ata_irq, ata_bmdma_interrupt, 0, | |
| 663 | 663 | &mpc52xx_ata_sht); |
| 664 | 664 | } |
| 665 | 665 | |
| @@ -82,7 +82,7 @@ static int netcell_init_one (struct pci_dev *pdev, const struct pci_device_id *e · 81 unmodified lines | ||
| 82 | 82 | ata_pci_bmdma_clear_simplex(pdev); |
| 83 | 83 | |
| 84 | 84 | /* And let the library code do the work */ |
| 85 | − return ata_pci_sff_init_one(pdev, port_info, &netcell_sht, NULL, 0); | |
| 85 | + return ata_pci_bmdma_init_one(pdev, port_info, &netcell_sht, NULL, 0); | |
| 86 | 86 | } |
| 87 | 87 | |
| 88 | 88 | static const struct pci_device_id netcell_pci_tbl[] = { |
| @@ -149,7 +149,7 @@ static int ninja32_init_one(struct pci_dev *dev, const struct pci_device_id *id) · 148 unmodified lines | ||
| 149 | 149 | |
| 150 | 150 | ninja32_program(base); |
| 151 | 151 | /* FIXME: Should we disable them at remove ? */ |
| 152 | − return ata_host_activate(host, dev->irq, ata_sff_interrupt, | |
| 152 | + return ata_host_activate(host, dev->irq, ata_bmdma_interrupt, | |
| 153 | 153 | IRQF_SHARED, &ninja32_sht); |
| 154 | 154 | } |
| 155 | 155 | |
| @@ -380,7 +380,7 @@ static int ns87415_init_one (struct pci_dev *pdev, const struct pci_device_id *e · 379 unmodified lines | ||
| 380 | 380 | |
| 381 | 381 | ns87415_fixup(pdev); |
| 382 | 382 | |
| 383 | − return ata_pci_sff_init_one(pdev, ppi, &ns87415_sht, NULL, 0); | |
| 383 | + return ata_pci_bmdma_init_one(pdev, ppi, &ns87415_sht, NULL, 0); | |
| 384 | 384 | } |
| 385 | 385 | |
| 386 | 386 | static const struct pci_device_id ns87415_pci_tbl[] = { |
| @@ -749,20 +749,6 @@ static void octeon_cf_dev_config(struct ata_device *dev) · 748 unmodified lines | ||
| 749 | 749 | dev->max_sectors = min(dev->max_sectors, 4095U); |
| 750 | 750 | } |
| 751 | 751 | |
| 752 | −/* | |
| 753 | − * Trap if driver tries to do standard bmdma commands. They are not | |
| 754 | − * supported. | |
| 755 | − */ | |
| 756 | −static void unreachable_qc(struct ata_queued_cmd *qc) | |
| 757 | −{ | |
| 758 | − BUG(); | |
| 759 | −} | |
| 760 | − | |
| 761 | −static u8 unreachable_port(struct ata_port *ap) | |
| 762 | −{ | |
| 763 | − BUG(); | |
| 764 | −} | |
| 765 | − | |
| 766 | 752 | /* |
| 767 | 753 | * We don't do ATAPI DMA so return 0. |
| 768 | 754 | */ |
| @@ -804,10 +790,6 @@ static struct ata_port_operations octeon_cf_ops = { · 35 unmodified lines | ||
| 804 | 790 | .sff_dev_select = octeon_cf_dev_select, |
| 805 | 791 | .sff_irq_on = octeon_cf_irq_on, |
| 806 | 792 | .sff_irq_clear = octeon_cf_irq_clear, |
| 807 | − .bmdma_setup = unreachable_qc, | |
| 808 | − .bmdma_start = unreachable_qc, | |
| 809 | − .bmdma_stop = unreachable_qc, | |
| 810 | − .bmdma_status = unreachable_port, | |
| 811 | 793 | .cable_detect = ata_cable_40wire, |
| 812 | 794 | .set_piomode = octeon_cf_set_piomode, |
| 813 | 795 | .set_dmamode = octeon_cf_set_dmamode, |
| @@ -248,7 +248,7 @@ static int oldpiix_init_one (struct pci_dev *pdev, const struct pci_device_id *e · 247 unmodified lines | ||
| 248 | 248 | dev_printk(KERN_DEBUG, &pdev->dev, |
| 249 | 249 | "version " DRV_VERSION "\n"); |
| 250 | 250 | |
| 251 | − return ata_pci_sff_init_one(pdev, ppi, &oldpiix_sht, NULL, 0); | |
| 251 | + return ata_pci_bmdma_init_one(pdev, ppi, &oldpiix_sht, NULL, 0); | |
| 252 | 252 | } |
| 253 | 253 | |
| 254 | 254 | static const struct pci_device_id oldpiix_pci_tbl[] = { |
| @@ -429,7 +429,7 @@ static int optidma_init_one(struct pci_dev *dev, const struct pci_device_id *id) · 428 unmodified lines | ||
| 429 | 429 | if (optiplus_with_udma(dev)) |
| 430 | 430 | ppi[0] = &info_82c700_udma; |
| 431 | 431 | |
| 432 | − return ata_pci_sff_init_one(dev, ppi, &optidma_sht, NULL, 0); | |
| 432 | + return ata_pci_bmdma_init_one(dev, ppi, &optidma_sht, NULL, 0); | |
| 433 | 433 | } |
| 434 | 434 | |
| 435 | 435 | static const struct pci_device_id optidma[] = { |
| @@ -754,7 +754,7 @@ static int __devinit pdc2027x_init_one(struct pci_dev *pdev, const struct pci_de · 753 unmodified lines | ||
| 754 | 754 | return -EIO; |
| 755 | 755 | |
| 756 | 756 | pci_set_master(pdev); |
| 757 | − return ata_host_activate(host, pdev->irq, ata_sff_interrupt, | |
| 757 | + return ata_host_activate(host, pdev->irq, ata_bmdma_interrupt, | |
| 758 | 758 | IRQF_SHARED, &pdc2027x_sht); |
| 759 | 759 | } |
| 760 | 760 | |
| @@ -337,7 +337,7 @@ static int pdc202xx_init_one(struct pci_dev *dev, const struct pci_device_id *id · 336 unmodified lines | ||
| 337 | 337 | return -ENODEV; |
| 338 | 338 | } |
| 339 | 339 | } |
| 340 | − return ata_pci_sff_init_one(dev, ppi, &pdc202xx_sht, NULL, 0); | |
| 340 | + return ata_pci_bmdma_init_one(dev, ppi, &pdc202xx_sht, NULL, 0); | |
| 341 | 341 | } |
| 342 | 342 | |
| 343 | 343 | static const struct pci_device_id pdc202xx[] = { |
| @@ -95,7 +95,7 @@ static int ata_tosh_init_one(struct pci_dev *dev, const struct pci_device_id *id · 94 unmodified lines | ||
| 95 | 95 | }; |
| 96 | 96 | const struct ata_port_info *ppi[] = { &info, &ata_dummy_port_info }; |
| 97 | 97 | /* Just one port for the moment */ |
| 98 | − return ata_pci_sff_init_one(dev, ppi, &tosh_sht, NULL, 0); | |
| 98 | + return ata_pci_bmdma_init_one(dev, ppi, &tosh_sht, NULL, 0); | |
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | static struct pci_device_id ata_tosh[] = { |
| @@ -227,7 +227,7 @@ static int radisys_init_one (struct pci_dev *pdev, const struct pci_device_id *e · 226 unmodified lines | ||
| 227 | 227 | dev_printk(KERN_DEBUG, &pdev->dev, |
| 228 | 228 | "version " DRV_VERSION "\n"); |
| 229 | 229 | |
| 230 | − return ata_pci_sff_init_one(pdev, ppi, &radisys_sht, NULL, 0); | |
| 230 | + return ata_pci_bmdma_init_one(pdev, ppi, &radisys_sht, NULL, 0); | |
| 231 | 231 | } |
| 232 | 232 | |
| 233 | 233 | static const struct pci_device_id radisys_pci_tbl[] = { |
| @@ -344,7 +344,7 @@ static int __devinit rdc_init_one(struct pci_dev *pdev, · 343 unmodified lines | ||
| 344 | 344 | */ |
| 345 | 345 | pci_read_config_dword(pdev, 0x54, &hpriv->saved_iocfg); |
| 346 | 346 | |
| 347 | − rc = ata_pci_sff_prepare_host(pdev, ppi, &host); | |
| 347 | + rc = ata_pci_bmdma_prepare_host(pdev, ppi, &host); | |
| 348 | 348 | if (rc) |
| 349 | 349 | return rc; |
| 350 | 350 | host->private_data = hpriv; |
| @@ -354,7 +354,7 @@ static int __devinit rdc_init_one(struct pci_dev *pdev, · 3 unmodified lines | ||
| 354 | 354 | host->flags |= ATA_HOST_PARALLEL_SCAN; |
| 355 | 355 | |
| 356 | 356 | pci_set_master(pdev); |
| 357 | − return ata_pci_sff_activate_host(host, ata_sff_interrupt, &rdc_sht); | |
| 357 | + return ata_pci_sff_activate_host(host, ata_bmdma_interrupt, &rdc_sht); | |
| 358 | 358 | } |
| 359 | 359 | |
| 360 | 360 | static void rdc_remove_one(struct pci_dev *pdev) |
| @@ -237,7 +237,7 @@ static int sc1200_init_one(struct pci_dev *dev, const struct pci_device_id *id) · 236 unmodified lines | ||
| 237 | 237 | }; |
| 238 | 238 | const struct ata_port_info *ppi[] = { &info, NULL }; |
| 239 | 239 | |
| 240 | − return ata_pci_sff_init_one(dev, ppi, &sc1200_sht, NULL, 0); | |
| 240 | + return ata_pci_bmdma_init_one(dev, ppi, &sc1200_sht, NULL, 0); | |
| 241 | 241 | } |
| 242 | 242 | |
| 243 | 243 | static const struct pci_device_id sc1200[] = { |
| @@ -875,7 +875,7 @@ static void scc_postreset(struct ata_link *link, unsigned int *classes) · 874 unmodified lines | ||
| 875 | 875 | * scc_irq_clear - Clear PCI IDE BMDMA interrupt. |
| 876 | 876 | * @ap: Port associated with this ATA transaction. |
| 877 | 877 | * |
| 878 | − * Note: Original code is ata_sff_irq_clear(). | |
| 878 | + * Note: Original code is ata_bmdma_irq_clear(). | |
| 879 | 879 | */ |
| 880 | 880 | |
| 881 | 881 | static void scc_irq_clear (struct ata_port *ap) |
| @@ -1105,7 +1105,7 @@ static int scc_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) · 223 unmodified lines | ||
| 1105 | 1105 | if (rc) |
| 1106 | 1106 | return rc; |
| 1107 | 1107 | |
| 1108 | − return ata_host_activate(host, pdev->irq, ata_sff_interrupt, | |
| 1108 | + return ata_host_activate(host, pdev->irq, ata_bmdma_interrupt, | |
| 1109 | 1109 | IRQF_SHARED, &scc_sht); |
| 1110 | 1110 | } |
| 1111 | 1111 | |
| @@ -179,7 +179,7 @@ static int __devinit sch_init_one(struct pci_dev *pdev, · 178 unmodified lines | ||
| 179 | 179 | dev_printk(KERN_DEBUG, &pdev->dev, |
| 180 | 180 | "version " DRV_VERSION "\n"); |
| 181 | 181 | |
| 182 | − return ata_pci_sff_init_one(pdev, ppi, &sch_sht, NULL, 0); | |
| 182 | + return ata_pci_bmdma_init_one(pdev, ppi, &sch_sht, NULL, 0); | |
| 183 | 183 | } |
| 184 | 184 | |
| 185 | 185 | static int __init sch_init(void) |
| @@ -460,7 +460,7 @@ static int serverworks_init_one(struct pci_dev *pdev, const struct pci_device_id · 459 unmodified lines | ||
| 460 | 460 | if (pdev->device == PCI_DEVICE_ID_SERVERWORKS_CSB5IDE) |
| 461 | 461 | ata_pci_bmdma_clear_simplex(pdev); |
| 462 | 462 | |
| 463 | − return ata_pci_sff_init_one(pdev, ppi, &serverworks_sht, NULL, 0); | |
| 463 | + return ata_pci_bmdma_init_one(pdev, ppi, &serverworks_sht, NULL, 0); | |
| 464 | 464 | } |
| 465 | 465 | |
| 466 | 466 | #ifdef CONFIG_PM |
| @@ -374,11 +374,11 @@ static int __devinit sil680_init_one(struct pci_dev *pdev, · 373 unmodified lines | ||
| 374 | 374 | ata_sff_std_ports(&host->ports[1]->ioaddr); |
| 375 | 375 | |
| 376 | 376 | /* Register & activate */ |
| 377 | − return ata_host_activate(host, pdev->irq, ata_sff_interrupt, | |
| 377 | + return ata_host_activate(host, pdev->irq, ata_bmdma_interrupt, | |
| 378 | 378 | IRQF_SHARED, &sil680_sht); |
| 379 | 379 | |
| 380 | 380 | use_ioports: |
| 381 | − return ata_pci_sff_init_one(pdev, ppi, &sil680_sht, NULL, 0); | |
| 381 | + return ata_pci_bmdma_init_one(pdev, ppi, &sil680_sht, NULL, 0); | |
| 382 | 382 | } |
| 383 | 383 | |
| 384 | 384 | #ifdef CONFIG_PM |
| @@ -826,7 +826,7 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) · 825 unmodified lines | ||
| 826 | 826 | |
| 827 | 827 | sis_fixup(pdev, chipset); |
| 828 | 828 | |
| 829 | − return ata_pci_sff_init_one(pdev, ppi, &sis_sht, chipset, 0); | |
| 829 | + return ata_pci_bmdma_init_one(pdev, ppi, &sis_sht, chipset, 0); | |
| 830 | 830 | } |
| 831 | 831 | |
| 832 | 832 | #ifdef CONFIG_PM |
| @@ -316,7 +316,7 @@ static int sl82c105_init_one(struct pci_dev *dev, const struct pci_device_id *id · 315 unmodified lines | ||
| 316 | 316 | val |= CTRL_P0EN | CTRL_P0F16 | CTRL_P1F16; |
| 317 | 317 | pci_write_config_dword(dev, 0x40, val); |
| 318 | 318 | |
| 319 | − return ata_pci_sff_init_one(dev, ppi, &sl82c105_sht, NULL, 0); | |
| 319 | + return ata_pci_bmdma_init_one(dev, ppi, &sl82c105_sht, NULL, 0); | |
| 320 | 320 | } |
| 321 | 321 | |
| 322 | 322 | static const struct pci_device_id sl82c105[] = { |
| @@ -201,7 +201,7 @@ static int triflex_init_one(struct pci_dev *dev, const struct pci_device_id *id) · 200 unmodified lines | ||
| 201 | 201 | if (!printed_version++) |
| 202 | 202 | dev_printk(KERN_DEBUG, &dev->dev, "version " DRV_VERSION "\n"); |
| 203 | 203 | |
| 204 | − return ata_pci_sff_init_one(dev, ppi, &triflex_sht, NULL, 0); | |
| 204 | + return ata_pci_bmdma_init_one(dev, ppi, &triflex_sht, NULL, 0); | |
| 205 | 205 | } |
| 206 | 206 | |
| 207 | 207 | static const struct pci_device_id triflex[] = { |
| @@ -627,7 +627,7 @@ static int via_init_one(struct pci_dev *pdev, const struct pci_device_id *id) · 626 unmodified lines | ||
| 627 | 627 | } |
| 628 | 628 | |
| 629 | 629 | /* We have established the device type, now fire it up */ |
| 630 | − return ata_pci_sff_init_one(pdev, ppi, &via_sht, (void *)config, 0); | |
| 630 | + return ata_pci_bmdma_init_one(pdev, ppi, &via_sht, (void *)config, 0); | |
| 631 | 631 | } |
| 632 | 632 | |
| 633 | 633 | #ifdef CONFIG_PM |
| @@ -675,8 +675,6 @@ static struct ata_port_operations mv5_ops = { · 674 unmodified lines | ||
| 675 | 675 | .freeze = mv_eh_freeze, |
| 676 | 676 | .thaw = mv_eh_thaw, |
| 677 | 677 | .hardreset = mv_hardreset, |
| 678 | − .error_handler = ata_std_error_handler, /* avoid SFF EH */ | |
| 679 | − .post_internal_cmd = ATA_OP_NULL, | |
| 680 | 678 | |
| 681 | 679 | .scr_read = mv5_scr_read, |
| 682 | 680 | .scr_write = mv5_scr_write, |
| @@ -2813,7 +2811,7 @@ static void mv_port_intr(struct ata_port *ap, u32 port_cause) · 2130 unmodified lines | ||
| 2813 | 2811 | } else if (!edma_was_enabled) { |
| 2814 | 2812 | struct ata_queued_cmd *qc = mv_get_active_qc(ap); |
| 2815 | 2813 | if (qc) |
| 2816 | − ata_sff_host_intr(ap, qc); | |
| 2814 | + ata_bmdma_port_intr(ap, qc); | |
| 2817 | 2815 | else |
| 2818 | 2816 | mv_unexpected_intr(ap, edma_was_enabled); |
| 2819 | 2817 | } |
| @@ -920,7 +920,7 @@ static int nv_host_intr(struct ata_port *ap, u8 irq_stat) · 919 unmodified lines | ||
| 920 | 920 | } |
| 921 | 921 | |
| 922 | 922 | /* handle interrupt */ |
| 923 | − return ata_sff_host_intr(ap, qc); | |
| 923 | + return ata_bmdma_port_intr(ap, qc); | |
| 924 | 924 | } |
| 925 | 925 | |
| 926 | 926 | static irqreturn_t nv_adma_interrupt(int irq, void *dev_instance) |
| @@ -1100,7 +1100,7 @@ static void nv_adma_irq_clear(struct ata_port *ap) · 173 unmodified lines | ||
| 1100 | 1100 | u32 notifier_clears[2]; |
| 1101 | 1101 | |
| 1102 | 1102 | if (pp->flags & NV_ADMA_ATAPI_SETUP_COMPLETE) { |
| 1103 | − ata_sff_irq_clear(ap); | |
| 1103 | + ata_bmdma_irq_clear(ap); | |
| 1104 | 1104 | return; |
| 1105 | 1105 | } |
| 1106 | 1106 | |
| @@ -1505,7 +1505,7 @@ static irqreturn_t nv_generic_interrupt(int irq, void *dev_instance) · 398 unmodified lines | ||
| 1505 | 1505 | |
| 1506 | 1506 | qc = ata_qc_from_tag(ap, ap->link.active_tag); |
| 1507 | 1507 | if (qc && (!(qc->tf.flags & ATA_TFLAG_POLLING))) { |
| 1508 | − handled += ata_sff_host_intr(ap, qc); | |
| 1508 | + handled += ata_bmdma_port_intr(ap, qc); | |
| 1509 | 1509 | } else { |
| 1510 | 1510 | /* |
| 1511 | 1511 | * No request pending? Clear interrupt status |
| @@ -2430,7 +2430,7 @@ static int nv_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) · 918 unmodified lines | ||
| 2430 | 2430 | |
| 2431 | 2431 | ppi[0] = &nv_port_info[type]; |
| 2432 | 2432 | ipriv = ppi[0]->private_data; |
| 2433 | − rc = ata_pci_sff_prepare_host(pdev, ppi, &host); | |
| 2433 | + rc = ata_pci_bmdma_prepare_host(pdev, ppi, &host); | |
| 2434 | 2434 | if (rc) |
| 2435 | 2435 | return rc; |
| 2436 | 2436 | |
| @@ -120,8 +120,6 @@ static void qs_host_stop(struct ata_host *host); · 119 unmodified lines | ||
| 120 | 120 | static void qs_qc_prep(struct ata_queued_cmd *qc); |
| 121 | 121 | static unsigned int qs_qc_issue(struct ata_queued_cmd *qc); |
| 122 | 122 | static int qs_check_atapi_dma(struct ata_queued_cmd *qc); |
| 123 | −static void qs_bmdma_stop(struct ata_queued_cmd *qc); | |
| 124 | −static u8 qs_bmdma_status(struct ata_port *ap); | |
| 125 | 123 | static void qs_freeze(struct ata_port *ap); |
| 126 | 124 | static void qs_thaw(struct ata_port *ap); |
| 127 | 125 | static int qs_prereset(struct ata_link *link, unsigned long deadline); |
| @@ -137,8 +135,6 @@ static struct ata_port_operations qs_ata_ops = { · 9 unmodified lines | ||
| 137 | 135 | .inherits = &ata_sff_port_ops, |
| 138 | 136 | |
| 139 | 137 | .check_atapi_dma = qs_check_atapi_dma, |
| 140 | − .bmdma_stop = qs_bmdma_stop, | |
| 141 | − .bmdma_status = qs_bmdma_status, | |
| 142 | 138 | .qc_prep = qs_qc_prep, |
| 143 | 139 | .qc_issue = qs_qc_issue, |
| 144 | 140 | |
| @@ -190,16 +186,6 @@ static int qs_check_atapi_dma(struct ata_queued_cmd *qc) · 45 unmodified lines | ||
| 190 | 186 | return 1; /* ATAPI DMA not supported */ |
| 191 | 187 | } |
| 192 | 188 | |
| 193 | −static void qs_bmdma_stop(struct ata_queued_cmd *qc) | |
| 194 | −{ | |
| 195 | − /* nothing */ | |
| 196 | −} | |
| 197 | − | |
| 198 | −static u8 qs_bmdma_status(struct ata_port *ap) | |
| 199 | −{ | |
| 200 | − return 0; | |
| 201 | −} | |
| 202 | − | |
| 203 | 189 | static inline void qs_enter_reg_mode(struct ata_port *ap) |
| 204 | 190 | { |
| 205 | 191 | u8 __iomem *chan = qs_mmio_base(ap->host) + (ap->port_no * 0x4000); |
| @@ -454,7 +440,7 @@ static inline unsigned int qs_intr_mmio(struct ata_host *host) · 248 unmodified lines | ||
| 454 | 440 | if (!pp || pp->state != qs_state_mmio) |
| 455 | 441 | continue; |
| 456 | 442 | if (!(qc->tf.flags & ATA_TFLAG_POLLING)) |
| 457 | − handled |= ata_sff_host_intr(ap, qc); | |
| 443 | + handled |= ata_sff_port_intr(ap, qc); | |
| 458 | 444 | } |
| 459 | 445 | return handled; |
| 460 | 446 | } |
| @@ -503,7 +503,7 @@ static void sil_host_intr(struct ata_port *ap, u32 bmdma2) · 502 unmodified lines | ||
| 503 | 503 | goto err_hsm; |
| 504 | 504 | |
| 505 | 505 | /* ack bmdma irq events */ |
| 506 | − ata_sff_irq_clear(ap); | |
| 506 | + ata_bmdma_irq_clear(ap); | |
| 507 | 507 | |
| 508 | 508 | /* kick HSM in the ass */ |
| 509 | 509 | ata_sff_hsm_move(ap, qc, status, 0); |
| @@ -584,7 +584,7 @@ static void sil_thaw(struct ata_port *ap) · 74 unmodified lines | ||
| 584 | 584 | |
| 585 | 585 | /* clear IRQ */ |
| 586 | 586 | ap->ops->sff_check_status(ap); |
| 587 | − ata_sff_irq_clear(ap); | |
| 587 | + ata_bmdma_irq_clear(ap); | |
| 588 | 588 | |
| 589 | 589 | /* turn on SATA IRQ if supported */ |
| 590 | 590 | if (!(ap->flags & SIL_FLAG_NO_SATA_IRQ)) |
| @@ -279,7 +279,7 @@ static int sis_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) · 278 unmodified lines | ||
| 279 | 279 | break; |
| 280 | 280 | } |
| 281 | 281 | |
| 282 | − rc = ata_pci_sff_prepare_host(pdev, ppi, &host); | |
| 282 | + rc = ata_pci_bmdma_prepare_host(pdev, ppi, &host); | |
| 283 | 283 | if (rc) |
| 284 | 284 | return rc; |
| 285 | 285 | |
| @@ -308,7 +308,7 @@ static int sis_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) · 22 unmodified lines | ||
| 308 | 308 | |
| 309 | 309 | pci_set_master(pdev); |
| 310 | 310 | pci_intx(pdev, 1); |
| 311 | − return ata_host_activate(host, pdev->irq, ata_sff_interrupt, | |
| 311 | + return ata_host_activate(host, pdev->irq, ata_bmdma_interrupt, | |
| 312 | 312 | IRQF_SHARED, &sis_sht); |
| 313 | 313 | } |
| 314 | 314 | |
| @@ -502,7 +502,7 @@ static int k2_sata_init_one(struct pci_dev *pdev, const struct pci_device_id *en · 501 unmodified lines | ||
| 502 | 502 | writel(0x0, mmio_base + K2_SATA_SIM_OFFSET); |
| 503 | 503 | |
| 504 | 504 | pci_set_master(pdev); |
| 505 | − return ata_host_activate(host, pdev->irq, ata_sff_interrupt, | |
| 505 | + return ata_host_activate(host, pdev->irq, ata_bmdma_interrupt, | |
| 506 | 506 | IRQF_SHARED, &k2_sata_sht); |
| 507 | 507 | } |
| 508 | 508 | |
| @@ -242,7 +242,7 @@ static int uli_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) · 241 unmodified lines | ||
| 242 | 242 | |
| 243 | 243 | pci_set_master(pdev); |
| 244 | 244 | pci_intx(pdev, 1); |
| 245 | − return ata_host_activate(host, pdev->irq, ata_sff_interrupt, | |
| 245 | + return ata_host_activate(host, pdev->irq, ata_bmdma_interrupt, | |
| 246 | 246 | IRQF_SHARED, &uli_sht); |
| 247 | 247 | } |
| 248 | 248 | |
| @@ -308,7 +308,7 @@ static void svia_noop_freeze(struct ata_port *ap) · 307 unmodified lines | ||
| 308 | 308 | * certain way. Leave it alone and just clear pending IRQ. |
| 309 | 309 | */ |
| 310 | 310 | ap->ops->sff_check_status(ap); |
| 311 | − ata_sff_irq_clear(ap); | |
| 311 | + ata_bmdma_irq_clear(ap); | |
| 312 | 312 | } |
| 313 | 313 | |
| 314 | 314 | /** |
| @@ -463,7 +463,7 @@ static int vt6420_prepare_host(struct pci_dev *pdev, struct ata_host **r_host) · 148 unmodified lines | ||
| 463 | 463 | struct ata_host *host; |
| 464 | 464 | int rc; |
| 465 | 465 | |
| 466 | − rc = ata_pci_sff_prepare_host(pdev, ppi, &host); | |
| 466 | + rc = ata_pci_bmdma_prepare_host(pdev, ppi, &host); | |
| 467 | 467 | if (rc) |
| 468 | 468 | return rc; |
| 469 | 469 | *r_host = host; |
| @@ -520,7 +520,7 @@ static int vt8251_prepare_host(struct pci_dev *pdev, struct ata_host **r_host) · 50 unmodified lines | ||
| 520 | 520 | struct ata_host *host; |
| 521 | 521 | int i, rc; |
| 522 | 522 | |
| 523 | − rc = ata_pci_sff_prepare_host(pdev, ppi, &host); | |
| 523 | + rc = ata_pci_bmdma_prepare_host(pdev, ppi, &host); | |
| 524 | 524 | if (rc) |
| 525 | 525 | return rc; |
| 526 | 526 | *r_host = host; |
| @@ -628,7 +628,7 @@ static int svia_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) · 101 unmodified lines | ||
| 628 | 628 | svia_configure(pdev); |
| 629 | 629 | |
| 630 | 630 | pci_set_master(pdev); |
| 631 | − return ata_host_activate(host, pdev->irq, ata_sff_interrupt, | |
| 631 | + return ata_host_activate(host, pdev->irq, ata_bmdma_interrupt, | |
| 632 | 632 | IRQF_SHARED, &svia_sht); |
| 633 | 633 | } |
| 634 | 634 | |
| @@ -245,7 +245,7 @@ static void vsc_port_intr(u8 port_status, struct ata_port *ap) · 244 unmodified lines | ||
| 245 | 245 | |
| 246 | 246 | qc = ata_qc_from_tag(ap, ap->link.active_tag); |
| 247 | 247 | if (qc && likely(!(qc->tf.flags & ATA_TFLAG_POLLING))) |
| 248 | − handled = ata_sff_host_intr(ap, qc); | |
| 248 | + handled = ata_bmdma_port_intr(ap, qc); | |
| 249 | 249 | |
| 250 | 250 | /* We received an interrupt during a polled command, |
| 251 | 251 | * or some other spurious condition. Interrupt reporting |
| @@ -386,6 +386,7 @@ enum { · 385 unmodified lines | ||
| 386 | 386 | ATA_HORKAGE_1_5_GBPS = (1 << 13), /* force 1.5 Gbps */ |
| 387 | 387 | ATA_HORKAGE_NOSETXFER = (1 << 14), /* skip SETXFER, SATA only */ |
| 388 | 388 | ATA_HORKAGE_BROKEN_FPDMA_AA = (1 << 15), /* skip AA */ |
| 389 | + ATA_HORKAGE_DUMP_ID = (1 << 16), /* dump IDENTIFY data */ | |
| 389 | 390 | |
| 390 | 391 | /* DMA mask for user DMA control: User visible values; DO NOT |
| 391 | 392 | renumber */ |
| @@ -513,7 +514,9 @@ struct ata_ioports { · 121 unmodified lines | ||
| 513 | 514 | void __iomem *command_addr; |
| 514 | 515 | void __iomem *altstatus_addr; |
| 515 | 516 | void __iomem *ctl_addr; |
| 517 | +#ifdef CONFIG_ATA_BMDMA | |
| 516 | 518 | void __iomem *bmdma_addr; |
| 519 | +#endif /* CONFIG_ATA_BMDMA */ | |
| 517 | 520 | void __iomem *scr_addr; |
| 518 | 521 | }; |
| 519 | 522 | #endif /* CONFIG_ATA_SFF */ |
| @@ -721,8 +724,10 @@ struct ata_port { · 201 unmodified lines | ||
| 721 | 724 | u8 ctl; /* cache of ATA control register */ |
| 722 | 725 | u8 last_ctl; /* Cache last written value */ |
| 723 | 726 | struct delayed_work sff_pio_task; |
| 727 | +#ifdef CONFIG_ATA_BMDMA | |
| 724 | 728 | struct ata_bmdma_prd *bmdma_prd; /* BMDMA SG list */ |
| 725 | 729 | dma_addr_t bmdma_prd_dma; /* and its DMA mapping */ |
| 730 | +#endif /* CONFIG_ATA_BMDMA */ | |
| 726 | 731 | #endif /* CONFIG_ATA_SFF */ |
| 727 | 732 | |
| 728 | 733 | unsigned int pio_mask; |
| @@ -856,10 +861,12 @@ struct ata_port_operations { · 127 unmodified lines | ||
| 856 | 861 | void (*sff_irq_clear)(struct ata_port *); |
| 857 | 862 | void (*sff_drain_fifo)(struct ata_queued_cmd *qc); |
| 858 | 863 | |
| 864 | +#ifdef CONFIG_ATA_BMDMA | |
| 859 | 865 | void (*bmdma_setup)(struct ata_queued_cmd *qc); |
| 860 | 866 | void (*bmdma_start)(struct ata_queued_cmd *qc); |
| 861 | 867 | void (*bmdma_stop)(struct ata_queued_cmd *qc); |
| 862 | 868 | u8 (*bmdma_status)(struct ata_port *ap); |
| 869 | +#endif /* CONFIG_ATA_BMDMA */ | |
| 863 | 870 | #endif /* CONFIG_ATA_SFF */ |
| 864 | 871 | |
| 865 | 872 | ssize_t (*em_show)(struct ata_port *ap, char *buf); |
| @@ -1555,7 +1562,6 @@ extern void sata_pmp_error_handler(struct ata_port *ap); · 689 unmodified lines | ||
| 1555 | 1562 | #ifdef CONFIG_ATA_SFF |
| 1556 | 1563 | |
| 1557 | 1564 | extern const struct ata_port_operations ata_sff_port_ops; |
| 1558 | −extern const struct ata_port_operations ata_bmdma_port_ops; | |
| 1559 | 1565 | extern const struct ata_port_operations ata_bmdma32_port_ops; |
| 1560 | 1566 | |
| 1561 | 1567 | /* PIO only, sg_tablesize and dma_boundary limits can be removed */ |
| @@ -1564,11 +1570,6 @@ extern const struct ata_port_operations ata_bmdma32_port_ops; · 2 unmodified lines | ||
| 1564 | 1570 | .sg_tablesize = LIBATA_MAX_PRD, \ |
| 1565 | 1571 | .dma_boundary = ATA_DMA_BOUNDARY |
| 1566 | 1572 | |
| 1567 | −#define ATA_BMDMA_SHT(drv_name) \ | |
| 1568 | − ATA_BASE_SHT(drv_name), \ | |
| 1569 | − .sg_tablesize = LIBATA_MAX_PRD, \ | |
| 1570 | − .dma_boundary = ATA_DMA_BOUNDARY | |
| 1571 | − | |
| 1572 | 1573 | extern void ata_sff_dev_select(struct ata_port *ap, unsigned int device); |
| 1573 | 1574 | extern u8 ata_sff_check_status(struct ata_port *ap); |
| 1574 | 1575 | extern void ata_sff_pause(struct ata_port *ap); |
| @@ -1593,7 +1594,7 @@ extern int ata_sff_hsm_move(struct ata_port *ap, struct ata_queued_cmd *qc, · 18 unmodified lines | ||
| 1593 | 1594 | extern void ata_sff_queue_pio_task(struct ata_port *ap, unsigned long delay); |
| 1594 | 1595 | extern unsigned int ata_sff_qc_issue(struct ata_queued_cmd *qc); |
| 1595 | 1596 | extern bool ata_sff_qc_fill_rtf(struct ata_queued_cmd *qc); |
| 1596 | −extern unsigned int ata_sff_host_intr(struct ata_port *ap, | |
| 1597 | +extern unsigned int ata_sff_port_intr(struct ata_port *ap, | |
| 1597 | 1598 | struct ata_queued_cmd *qc); |
| 1598 | 1599 | extern irqreturn_t ata_sff_interrupt(int irq, void *dev_instance); |
| 1599 | 1600 | extern void ata_sff_lost_interrupt(struct ata_port *ap); |
| @@ -1625,11 +1626,24 @@ extern int ata_pci_sff_init_one(struct pci_dev *pdev, · 25 unmodified lines | ||
| 1625 | 1626 | struct scsi_host_template *sht, void *host_priv, int hflags); |
| 1626 | 1627 | #endif /* CONFIG_PCI */ |
| 1627 | 1628 | |
| 1629 | +#ifdef CONFIG_ATA_BMDMA | |
| 1630 | + | |
| 1631 | +extern const struct ata_port_operations ata_bmdma_port_ops; | |
| 1632 | + | |
| 1633 | +#define ATA_BMDMA_SHT(drv_name) \ | |
| 1634 | + ATA_BASE_SHT(drv_name), \ | |
| 1635 | + .sg_tablesize = LIBATA_MAX_PRD, \ | |
| 1636 | + .dma_boundary = ATA_DMA_BOUNDARY | |
| 1637 | + | |
| 1628 | 1638 | extern void ata_bmdma_qc_prep(struct ata_queued_cmd *qc); |
| 1629 | 1639 | extern unsigned int ata_bmdma_qc_issue(struct ata_queued_cmd *qc); |
| 1630 | 1640 | extern void ata_bmdma_dumb_qc_prep(struct ata_queued_cmd *qc); |
| 1641 | +extern unsigned int ata_bmdma_port_intr(struct ata_port *ap, | |
| 1642 | + struct ata_queued_cmd *qc); | |
| 1643 | +extern irqreturn_t ata_bmdma_interrupt(int irq, void *dev_instance); | |
| 1631 | 1644 | extern void ata_bmdma_error_handler(struct ata_port *ap); |
| 1632 | 1645 | extern void ata_bmdma_post_internal_cmd(struct ata_queued_cmd *qc); |
| 1646 | +extern void ata_bmdma_irq_clear(struct ata_port *ap); | |
| 1633 | 1647 | extern void ata_bmdma_setup(struct ata_queued_cmd *qc); |
| 1634 | 1648 | extern void ata_bmdma_start(struct ata_queued_cmd *qc); |
| 1635 | 1649 | extern void ata_bmdma_stop(struct ata_queued_cmd *qc); |
| @@ -1640,7 +1654,15 @@ extern int ata_bmdma_port_start32(struct ata_port *ap); · 4 unmodified lines | ||
| 1640 | 1654 | #ifdef CONFIG_PCI |
| 1641 | 1655 | extern int ata_pci_bmdma_clear_simplex(struct pci_dev *pdev); |
| 1642 | 1656 | extern void ata_pci_bmdma_init(struct ata_host *host); |
| 1657 | +extern int ata_pci_bmdma_prepare_host(struct pci_dev *pdev, | |
| 1658 | + const struct ata_port_info * const * ppi, | |
| 1659 | + struct ata_host **r_host); | |
| 1660 | +extern int ata_pci_bmdma_init_one(struct pci_dev *pdev, | |
| 1661 | + const struct ata_port_info * const * ppi, | |
| 1662 | + struct scsi_host_template *sht, | |
| 1663 | + void *host_priv, int hflags); | |
| 1643 | 1664 | #endif /* CONFIG_PCI */ |
| 1665 | +#endif /* CONFIG_ATA_BMDMA */ | |
| 1644 | 1666 | |
| 1645 | 1667 | /** |
| 1646 | 1668 | * ata_sff_busy_wait - Wait for a port status register |