Skip to content

Commit 3af9a77

Browse files
htejunJeff Garzik
authored andcommitted
libata-pmp: implement Port Multiplier support
Implement Port Multiplier support. To support PMP, a LLDD has to supply ops->pmp_read() and pmp_write(). If non-null, ->pmp_attach and ->pmp_detach are called on PMP attach and detach, respectively. ->pmp_read/write() can be called while the port is frozen, so they must be implemented by polling. This patch supplies several helpers to ease ->pmp_read/write() implementation. Also, irq_handler and error_handler must be PMP aware. Most of PMP aware EH can be done by calling ata_pmp_do_eh() with appropriate methods. PMP EH uses separate set of reset methods and this patch implements standard prereset, hardreset and postreset methods. This patch only implements PMP support. The next patch will integrate PMP into the reset of libata and thus enable PMP support. Signed-off-by: Tejun Heo <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
1 parent 3495de7 commit 3af9a77

File tree

5 files changed

+1219
-1
lines changed

5 files changed

+1219
-1
lines changed

drivers/ata/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,5 +71,6 @@ obj-$(CONFIG_ATA_GENERIC) += ata_generic.o
7171
# Should be last libata driver
7272
obj-$(CONFIG_PATA_LEGACY) += pata_legacy.o
7373

74-
libata-objs := libata-core.o libata-scsi.o libata-sff.o libata-eh.o
74+
libata-objs := libata-core.o libata-scsi.o libata-sff.o libata-eh.o \
75+
libata-pmp.o
7576
libata-$(CONFIG_ATA_ACPI) += libata-acpi.o

drivers/ata/libata-core.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3865,6 +3865,9 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
38653865
{ "IOMEGA ZIP 250 ATAPI", NULL, ATA_HORKAGE_NODMA }, /* temporary fix */
38663866
{ "IOMEGA ZIP 250 ATAPI Floppy",
38673867
NULL, ATA_HORKAGE_NODMA },
3868+
/* Odd clown on sil3726/4726 PMPs */
3869+
{ "Config Disk", NULL, ATA_HORKAGE_NODMA |
3870+
ATA_HORKAGE_SKIP_PM },
38683871

38693872
/* Weird ATAPI devices */
38703873
{ "TORiSAN DVD-ROM DRD-N216", NULL, ATA_HORKAGE_MAX_SEC_128 },
@@ -7251,6 +7254,14 @@ EXPORT_SYMBOL_GPL(ata_pci_default_filter);
72517254
EXPORT_SYMBOL_GPL(ata_pci_clear_simplex);
72527255
#endif /* CONFIG_PCI */
72537256

7257+
EXPORT_SYMBOL_GPL(sata_pmp_read_init_tf);
7258+
EXPORT_SYMBOL_GPL(sata_pmp_read_val);
7259+
EXPORT_SYMBOL_GPL(sata_pmp_write_init_tf);
7260+
EXPORT_SYMBOL_GPL(sata_pmp_std_prereset);
7261+
EXPORT_SYMBOL_GPL(sata_pmp_std_hardreset);
7262+
EXPORT_SYMBOL_GPL(sata_pmp_std_postreset);
7263+
EXPORT_SYMBOL_GPL(sata_pmp_do_eh);
7264+
72547265
EXPORT_SYMBOL_GPL(__ata_ehi_push_desc);
72557266
EXPORT_SYMBOL_GPL(ata_ehi_push_desc);
72567267
EXPORT_SYMBOL_GPL(ata_ehi_clear_desc);

0 commit comments

Comments
 (0)