libata fixes
PATCH 1/1 libata fixes
Regression fixes, regular fixes, and a couple new device ids. The biggest change LOC-wise is Gwendal's PMP s/ap/link/ fixes, but that is actually the most straightforward of the bunch.
Please pull from 'upstream-linus' branch of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev.git upstream-linus
to receive the following updates:
drivers/ata/ahci.c | 3 +++ drivers/ata/ata_piix.c | 4 ++++ drivers/ata/libahci.c | 2 +- drivers/ata/libata-core.c | 14 +++++++++++++- drivers/ata/libata-eh.c | 4 ++++ drivers/ata/libata-sff.c | 41 +++++++++++++++++++++++++++++++---------- drivers/ata/pata_artop.c | 3 ++- drivers/ata/pata_via.c | 2 ++ drivers/ata/sata_mv.c | 2 +- include/linux/libata.h | 4 +++- 10 files changed, 64 insertions(+), 15 deletions(-)
Gwendal Grignou (1):
libata-sff: Reenable Port Multiplier after libata-sff remodeling.
Jean Delvare (1):
pata_artop: Fix device ID parity check
Seth Heasley (2):
ata_piix: IDE Mode SATA patch for Intel Patsburg DeviceIDs
ahci: AHCI and RAID mode SATA patch for Intel Patsburg DeviceIDs
Tejun Heo (3):
ahci: fix hang on failed softreset
libata,pata_via: revert ata_wait_idle() removal from ata_sff/via_tf_load()
libata: skip EH autopsy and recovery during suspend
drivers/ata/ahci.c +3 -0
@@ -253,6 +253,9 @@ static const struct pci_device_id ahci_pci_tbl[] = { { PCI_VDEVICE(INTEL, 0x1c05), board_ahci }, /* CPT RAID */ { PCI_VDEVICE(INTEL, 0x1c06), board_ahci }, /* CPT RAID */ { PCI_VDEVICE(INTEL, 0x1c07), board_ahci }, /* CPT RAID */ + { PCI_VDEVICE(INTEL, 0x1d02), board_ahci }, /* PBG AHCI */ + { PCI_VDEVICE(INTEL, 0x1d04), board_ahci }, /* PBG RAID */ + { PCI_VDEVICE(INTEL, 0x1d06), board_ahci }, /* PBG RAID *//* JMicron 360/1/3/5/6, match class to avoid IDE function */ { PCI_VENDOR_ID_JMICRON, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
drivers/ata/ata_piix.c +4 -0
@@ -302,6 +302,10 @@ static const struct pci_device_id piix_pci_tbl[] = { { 0x8086, 0x1c08, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },/* SATA Controller IDE (CPT) */ { 0x8086, 0x1c09, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata }, +/* SATA Controller IDE (PBG) */ + { 0x8086, 0x1d00, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata }, +/* SATA Controller IDE (PBG) */ + { 0x8086, 0x1d08, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata }, { } /* terminate list */ };
drivers/ata/libahci.c +1 -1
@@ -1326,7 +1326,7 @@ int ahci_do_softreset(struct ata_link *link, unsigned int *class,/* issue the first D2H Register FIS */ msecs =0 ; now = jiffies; -if (time_after (now, deadline)) +if (time_after (deadline, now)) msecs =jiffies_to_msecs (deadline - now); tf.ctl |=ATA_SRST ;
drivers/ata/libata-core.c +13 -1
@@ -5418,6 +5418,7 @@ static int ata_host_request_pm(struct ata_host *host, pm_message_t mesg,*/ int ata_host_suspend (struct ata_host *host,pm_message_t mesg) { +unsigned int ehi_flags =ATA_EHI_QUIET ;int rc;/*
@@ -5426,7 +5427,18 @@ int ata_host_suspend(struct ata_host *host, pm_message_t mesg)*/ ata_lpm_enable (host); - rc =ata_host_request_pm (host, mesg,0 ,ATA_EHI_QUIET ,1 ); +/* +* On some hardware, device fails to respond after spun down +* for suspend. As the device won't be used before being +* resumed, we don't need to touch the device. Ask EH to skip +* the usual stuff and proceed directly to suspend. +* +* http://thread.gmane.org/gmane.linux.ide/46764 +*/ +if (mesg.event ==PM_EVENT_SUSPEND ) + ehi_flags |=ATA_EHI_NO_AUTOPSY |ATA_EHI_NO_RECOVERY ; + + rc =ata_host_request_pm (host, mesg,0 , ehi_flags,1 );if (rc ==0 ) host->dev->power.power_state = mesg;return rc;
drivers/ata/libata-eh.c +4 -0
@@ -3235,6 +3235,10 @@ static int ata_eh_skip_recovery(struct ata_link *link)if (link->flags &ATA_LFLAG_DISABLED )return 1 ; +/* skip if explicitly requested */ +if (ehc->i.flags &ATA_EHI_NO_RECOVERY ) +return 1 ; +/* thaw frozen port and recover failed devices */ if ((ap->pflags &ATA_PFLAG_FROZEN ) ||ata_link_nr_enabled (link))return 0 ;
drivers/ata/libata-sff.c +31 -10
130 lines not on this page · raw message
drivers/ata/pata_artop.c +2 -1
@@ -74,7 +74,8 @@ static int artop6260_pre_reset(struct ata_link *link, unsigned long deadline)struct pci_dev *pdev =to_pci_dev (ap->host->dev);/* Odd numbered device ids are the units with enable bits (the -R cards) */ -if (pdev->device %1 && !pci_test_config_bits (pdev, &artop_enable_bits[ap->port_no])) +if ((pdev->device &1 ) && + !pci_test_config_bits (pdev, &artop_enable_bits[ap->port_no]))return -ENOENT ;return ata_sff_prereset (link, deadline);
drivers/ata/pata_via.c +2 -0
@@ -417,6 +417,8 @@ static void via_tf_load(struct ata_port *ap, const struct ata_taskfile *tf) tf->lbam, tf->lbah); } + +ata_wait_idle (ap); }static int via_port_start (struct ata_port *ap)
drivers/ata/sata_mv.c +1 -1
@@ -2284,7 +2284,7 @@ static unsigned int mv_qc_issue_fis(struct ata_queued_cmd *qc) }if (qc->tf.flags &ATA_TFLAG_POLLING ) -ata_sff_queue_pio_task (ap,0 ); +ata_sff_queue_pio_task (link,0 );return 0 ; }
include/linux/libata.h +3 -1
@@ -335,6 +335,7 @@ enum {ATA_EHI_HOTPLUGGED = (1 <<0 ),/* could have been hotplugged */ ATA_EHI_NO_AUTOPSY = (1 <<2 ),/* no autopsy */ ATA_EHI_QUIET = (1 <<3 ),/* be quiet */ +ATA_EHI_NO_RECOVERY = (1 <<4 ),/* no recovery */ ATA_EHI_DID_SOFTRESET = (1 <<16 ),/* already soft-reset this port */ ATA_EHI_DID_HARDRESET = (1 << 17), /* already soft-reset this port */
@@ -723,6 +724,7 @@ struct ata_port {struct ata_ioports ioaddr;/* ATA cmd/ctl/dma register blocks */ u8 ctl;/* cache of ATA control register */ u8 last_ctl;/* Cache last written value */ +struct ata_link * sff_pio_task_link;/* link currently used */ struct delayed_work sff_pio_task;#ifdef CONFIG_ATA_BMDMA struct ata_bmdma_prd *bmdma_prd;/* BMDMA SG list */
@@ -1594,7 +1596,7 @@ extern void ata_sff_irq_on(struct ata_port *ap);extern void ata_sff_irq_clear (struct ata_port *ap);extern int ata_sff_hsm_move (struct ata_port *ap,struct ata_queued_cmd *qc,u8 status,int in_wq); -extern void ata_sff_queue_pio_task (struct ata_port *ap,unsigned long delay); +extern void ata_sff_queue_pio_task (struct ata_link *link,unsigned long delay);extern unsigned int ata_sff_qc_issue (struct ata_queued_cmd *qc);extern bool ata_sff_qc_fill_rtf (struct ata_queued_cmd *qc); extern unsigned int ata_sff_port_intr(struct ata_port *ap,