Skip to contentSkip to conversation

libata update

PATCH New Jeff Garzik 1 participant 1 message Jul 6, 2006

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libata update

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/scsi/ahci.c        |   17 +
 drivers/scsi/libata-core.c |  289 ++++++++++++++++++++------------
 drivers/scsi/libata-eh.c   |  405 +++++++++++++++++++++++++++++++++++++++------
 drivers/scsi/libata-scsi.c |  124 +++++++++++++
 drivers/scsi/sata_sil.c    |  105 +++++++----
 drivers/scsi/sata_sil24.c  |  134 +++++++++-----
 drivers/scsi/sata_vsc.c    |    2 
 include/linux/libata.h     |   85 +++++++--
 include/linux/pci_ids.h    |    7 
 9 files changed, 897 insertions(+), 271 deletions(-)

Borislav Petkov:
libata-core.c: restore configuration boot messages in ata_dev_configure(), v2

Brian King:

      libata: Conditionally set host->max_cmd_len

Jeff Garzik:
[PCI] Add JMicron PCI ID constants

Martin Hicks:
sata_vsc: data_xfer should use mmio

root:
ahci: Ensure that we don't grab both functions

Tejun Heo:
libata: add ap->pflags and move core dynamic flags to it
libata: fix ehc->i.action setting in ata_eh_autopsy()
libata: replace ap_lock w/ ap->lock in ata_scsi_error()
libata: implement ATA_EHI_RESUME_LINK
libata: clean up debounce parameters and improve parameter selection
libata: implement ATA_EHI_NO_AUTOPSY and QUIET
libata: separate out __ata_ehi_hotplugged()
libata: implement PM EH actions
libata: reimplement per-dev PM
libata: reimplement controller-wide PM
sata_sil: separate out sil_init_controller()
sata_sil: add suspend/sleep support
sata_sil24: separate out sil24_init_controller()
sata_sil24: add suspend/sleep support

drivers/scsi/ahci.c +12 -5
index 15f6cd4..77e7202 100644
@@ -1052,7 +1052,7 @@ static void ahci_thaw(struct ata_port *a
 
 static void ahci_error_handler(struct ata_port *ap)
 {
-	if (!(ap->flags & ATA_FLAG_FROZEN)) {
+	if (!(ap->pflags & ATA_PFLAG_FROZEN)) {
 		/* restart engine */
 		ahci_stop_engine(ap);
 		ahci_start_engine(ap);
@@ -1323,6 +1323,17 @@ static int ahci_init_one (struct pci_dev
 	if (!printed_version++)
 		dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n");
 
+	/* JMicron-specific fixup: make sure we're in AHCI mode */
+	/* This is protected from races with ata_jmicron by the pci probe
+	   locking */
+	if (pdev->vendor == PCI_VENDOR_ID_JMICRON) {
+		/* AHCI enable, AHCI on function 0 */
+		pci_write_config_byte(pdev, 0x41, 0xa1);
+		/* Function 1 is the PATA controller */
+		if (PCI_FUNC(pdev->devfn))
+			return -ENODEV;
+	}
+
 	rc = pci_enable_device(pdev);
 	if (rc)
 		return rc;
@@ -1378,10 +1389,6 @@ static int ahci_init_one (struct pci_dev
 	if (have_msi)
 		hpriv->flags |= AHCI_FLAG_MSI;
 
-	/* JMicron-specific fixup: make sure we're in AHCI mode */
-	if (pdev->vendor == 0x197b)
-		pci_write_config_byte(pdev, 0x41, 0xa1);
-
 	/* initialize adapter */
 	rc = ahci_host_init(probe_ent);
 	if (rc)
drivers/scsi/libata-core.c +185 -104

510 lines not on this page · raw message

drivers/scsi/libata-eh.c +357 -48

608 lines not on this page · raw message

drivers/scsi/libata-scsi.c +117 -7

150 lines not on this page · raw message

drivers/scsi/sata_sil.c +66 -39

153 lines not on this page · raw message

drivers/scsi/sata_sil24.c +88 -46

196 lines not on this page · raw message

drivers/scsi/sata_vsc.c +1 -1
index 916fe6f..ad37871 100644
@@ -297,7 +297,7 @@ static const struct ata_port_operations 
 	.bmdma_status		= ata_bmdma_status,
 	.qc_prep		= ata_qc_prep,
 	.qc_issue		= ata_qc_issue_prot,
-	.data_xfer		= ata_pio_data_xfer,
+	.data_xfer		= ata_mmio_data_xfer,
 	.freeze			= ata_bmdma_freeze,
 	.thaw			= ata_bmdma_thaw,
 	.error_handler		= ata_bmdma_error_handler,
include/linux/libata.h +64 -21

170 lines not on this page · raw message

include/linux/pci_ids.h +7 -0
index 685081c..c09396d 100644
@@ -2019,6 +2019,13 @@ #define PCI_VENDOR_ID_TOPSPIN		0x1867
 #define PCI_VENDOR_ID_TDI               0x192E
 #define PCI_DEVICE_ID_TDI_EHCI          0x0101
 
+#define PCI_VENDOR_ID_JMICRON		0x197B
+#define PCI_DEVICE_ID_JMICRON_JMB360	0x2360
+#define PCI_DEVICE_ID_JMICRON_JMB361	0x2361
+#define PCI_DEVICE_ID_JMICRON_JMB363	0x2363
+#define PCI_DEVICE_ID_JMICRON_JMB365	0x2365
+#define PCI_DEVICE_ID_JMICRON_JMB366	0x2366
+#define PCI_DEVICE_ID_JMICRON_JMB368	0x2368
 
 #define PCI_VENDOR_ID_TEKRAM		0x1de1
 #define PCI_DEVICE_ID_TEKRAM_DC290	0xdc29