LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [git patches] libata fixes
@ 2007-03-02 2:08 Jeff Garzik
2007-03-03 18:39 ` Paul Rolland
0 siblings, 1 reply; 263+ messages in thread
From: Jeff Garzik @ 2007-03-02 2:08 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide, LKML
Does not include Alan's stuff, per recent email thread.
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 | 55 ++++++++++++++--------------
drivers/ata/libata-core.c | 5 ++-
drivers/ata/pata_cs5520.c | 1 -
drivers/ata/pata_isapnp.c | 1 -
drivers/ata/pata_jmicron.c | 51 ++++++--------------------
drivers/ata/pata_platform.c | 1 -
drivers/ata/sata_sil24.c | 3 --
drivers/pci/quirks.c | 83 +++++++++++++++++++++++++++---------------
8 files changed, 95 insertions(+), 105 deletions(-)
Tejun Heo (7):
libata: clear drvdata in ata_host_release(), take#2
sata_sil24: kill unused local variable idx in sil24_fill_sg()
libata: blacklist FUJITSU MHT2060BH for NCQ
pata_jmicron: drop unnecessary device programming in [re]init
jmicron ATA: reimplement jmicron ATA quirk
ahci/pata_jmicron: match class not function number
ahci: improve spurious SDB FIS handling
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 6d93240..1539734 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -200,6 +200,7 @@ struct ahci_port_priv {
/* for NCQ spurious interrupt analysis */
unsigned int ncq_saw_d2h:1;
unsigned int ncq_saw_dmas:1;
+ unsigned int ncq_saw_sdb:1;
};
static u32 ahci_scr_read (struct ata_port *ap, unsigned int sc_reg);
@@ -384,12 +385,9 @@ static const struct pci_device_id ahci_pci_tbl[] = {
{ PCI_VDEVICE(INTEL, 0x294d), board_ahci_pi }, /* ICH9 */
{ PCI_VDEVICE(INTEL, 0x294e), board_ahci_pi }, /* ICH9M */
- /* JMicron */
- { PCI_VDEVICE(JMICRON, 0x2360), board_ahci_ign_iferr }, /* JMB360 */
- { PCI_VDEVICE(JMICRON, 0x2361), board_ahci_ign_iferr }, /* JMB361 */
- { PCI_VDEVICE(JMICRON, 0x2363), board_ahci_ign_iferr }, /* JMB363 */
- { PCI_VDEVICE(JMICRON, 0x2365), board_ahci_ign_iferr }, /* JMB365 */
- { PCI_VDEVICE(JMICRON, 0x2366), board_ahci_ign_iferr }, /* JMB366 */
+ /* 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,
+ PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff, board_ahci_ign_iferr },
/* ATI */
{ PCI_VDEVICE(ATI, 0x4380), board_ahci }, /* ATI SB600 non-raid */
@@ -1160,23 +1158,31 @@ static void ahci_host_intr(struct ata_port *ap)
}
if (status & PORT_IRQ_SDB_FIS) {
- /* SDB FIS containing spurious completions might be
- * dangerous, whine and fail commands with HSM
- * violation. EH will turn off NCQ after several such
- * failures.
- */
const __le32 *f = pp->rx_fis + RX_FIS_SDB;
- ata_ehi_push_desc(ehi, "spurious completion during NCQ "
- "issue=0x%x SAct=0x%x FIS=%08x:%08x",
- readl(port_mmio + PORT_CMD_ISSUE),
- readl(port_mmio + PORT_SCR_ACT),
- le32_to_cpu(f[0]), le32_to_cpu(f[1]));
-
- ehi->err_mask |= AC_ERR_HSM;
- ehi->action |= ATA_EH_SOFTRESET;
- ata_port_freeze(ap);
-
+ if (le32_to_cpu(f[1])) {
+ /* SDB FIS containing spurious completions
+ * might be dangerous, whine and fail commands
+ * with HSM violation. EH will turn off NCQ
+ * after several such failures.
+ */
+ ata_ehi_push_desc(ehi,
+ "spurious completions during NCQ "
+ "issue=0x%x SAct=0x%x FIS=%08x:%08x",
+ readl(port_mmio + PORT_CMD_ISSUE),
+ readl(port_mmio + PORT_SCR_ACT),
+ le32_to_cpu(f[0]), le32_to_cpu(f[1]));
+ ehi->err_mask |= AC_ERR_HSM;
+ ehi->action |= ATA_EH_SOFTRESET;
+ ata_port_freeze(ap);
+ } else {
+ if (!pp->ncq_saw_sdb)
+ ata_port_printk(ap, KERN_INFO,
+ "spurious SDB FIS %08x:%08x during NCQ, "
+ "this message won't be printed again\n",
+ le32_to_cpu(f[0]), le32_to_cpu(f[1]));
+ pp->ncq_saw_sdb = 1;
+ }
known_irq = 1;
}
@@ -1665,13 +1671,6 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
if (!printed_version++)
dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n");
- if (pdev->vendor == PCI_VENDOR_ID_JMICRON) {
- /* Function 1 is the PATA controller except on the 368, where
- we are not AHCI anyway */
- if (PCI_FUNC(pdev->devfn))
- return -ENODEV;
- }
-
rc = pcim_enable_device(pdev);
if (rc)
return rc;
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index c8d44a7..ac3d120 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -3346,6 +3346,8 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
/* Devices where NCQ should be avoided */
/* NCQ is slow */
{ "WDC WD740ADFD-00", NULL, ATA_HORKAGE_NONCQ },
+ /* http://thread.gmane.org/gmane.linux.ide/14907 */
+ { "FUJITSU MHT2060BH", NULL, ATA_HORKAGE_NONCQ },
/* Devices with NCQ limits */
@@ -5680,6 +5682,8 @@ static void ata_host_release(struct device *gendev, void *res)
if (host->ops->host_stop)
host->ops->host_stop(host);
+
+ dev_set_drvdata(gendev, NULL);
}
/**
@@ -5902,7 +5906,6 @@ int ata_device_add(const struct ata_probe_ent *ent)
err_out:
devres_release_group(dev, ata_device_add);
- dev_set_drvdata(dev, NULL);
VPRINTK("EXIT, returning %d\n", rc);
return 0;
}
diff --git a/drivers/ata/pata_cs5520.c b/drivers/ata/pata_cs5520.c
index c1334c6..8ff2d58 100644
--- a/drivers/ata/pata_cs5520.c
+++ b/drivers/ata/pata_cs5520.c
@@ -306,7 +306,6 @@ static void __devexit cs5520_remove_one(struct pci_dev *pdev)
struct ata_host *host = dev_get_drvdata(dev);
ata_host_detach(host);
- dev_set_drvdata(dev, NULL);
}
/**
diff --git a/drivers/ata/pata_isapnp.c b/drivers/ata/pata_isapnp.c
index d5f2e85..1a61cc8 100644
--- a/drivers/ata/pata_isapnp.c
+++ b/drivers/ata/pata_isapnp.c
@@ -128,7 +128,6 @@ static void isapnp_remove_one(struct pnp_dev *idev)
struct ata_host *host = dev_get_drvdata(dev);
ata_host_detach(host);
- dev_set_drvdata(dev, NULL);
}
static struct pnp_device_id isapnp_devices[] = {
diff --git a/drivers/ata/pata_jmicron.c b/drivers/ata/pata_jmicron.c
index 7a635dd..47d0f94 100644
--- a/drivers/ata/pata_jmicron.c
+++ b/drivers/ata/pata_jmicron.c
@@ -202,49 +202,20 @@ static int jmicron_init_one (struct pci_dev *pdev, const struct pci_device_id *i
};
struct ata_port_info *port_info[2] = { &info, &info };
- u32 reg;
-
- /* PATA controller is fn 1, AHCI is fn 0 */
- if (id->driver_data != 368 && PCI_FUNC(pdev->devfn) != 1)
- return -ENODEV;
-
- /* The 365/66 have two PATA channels, redirect the second */
- if (id->driver_data == 365 || id->driver_data == 366) {
- pci_read_config_dword(pdev, 0x80, ®);
- reg |= (1 << 24); /* IDE1 to PATA IDE secondary */
- pci_write_config_dword(pdev, 0x80, reg);
- }
-
return ata_pci_init_one(pdev, port_info, 2);
}
-static int jmicron_reinit_one(struct pci_dev *pdev)
-{
- u32 reg;
-
- switch(pdev->device) {
- case PCI_DEVICE_ID_JMICRON_JMB368:
- break;
- case PCI_DEVICE_ID_JMICRON_JMB365:
- case PCI_DEVICE_ID_JMICRON_JMB366:
- /* Restore mapping or disks swap and boy does it get ugly */
- pci_read_config_dword(pdev, 0x80, ®);
- reg |= (1 << 24); /* IDE1 to PATA IDE secondary */
- pci_write_config_dword(pdev, 0x80, reg);
- /* Fall through */
- default:
- /* Make sure AHCI is turned back on */
- pci_write_config_byte(pdev, 0x41, 0xa1);
- }
- return ata_pci_device_resume(pdev);
-}
-
static const struct pci_device_id jmicron_pci_tbl[] = {
- { PCI_VDEVICE(JMICRON, PCI_DEVICE_ID_JMICRON_JMB361), 361},
- { PCI_VDEVICE(JMICRON, PCI_DEVICE_ID_JMICRON_JMB363), 363},
- { PCI_VDEVICE(JMICRON, PCI_DEVICE_ID_JMICRON_JMB365), 365},
- { PCI_VDEVICE(JMICRON, PCI_DEVICE_ID_JMICRON_JMB366), 366},
- { PCI_VDEVICE(JMICRON, PCI_DEVICE_ID_JMICRON_JMB368), 368},
+ { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB361,
+ PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_STORAGE_IDE << 8, 0xffff00, 361 },
+ { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB363,
+ PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_STORAGE_IDE << 8, 0xffff00, 363 },
+ { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB365,
+ PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_STORAGE_IDE << 8, 0xffff00, 365 },
+ { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB366,
+ PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_STORAGE_IDE << 8, 0xffff00, 366 },
+ { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB368,
+ PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_STORAGE_IDE << 8, 0xffff00, 368 },
{ } /* terminate list */
};
@@ -255,7 +226,7 @@ static struct pci_driver jmicron_pci_driver = {
.probe = jmicron_init_one,
.remove = ata_pci_remove_one,
.suspend = ata_pci_device_suspend,
- .resume = jmicron_reinit_one,
+ .resume = ata_pci_device_resume,
};
static int __init jmicron_init(void)
diff --git a/drivers/ata/pata_platform.c b/drivers/ata/pata_platform.c
index 02ea95f..4b82a54 100644
--- a/drivers/ata/pata_platform.c
+++ b/drivers/ata/pata_platform.c
@@ -228,7 +228,6 @@ static int __devexit pata_platform_remove(struct platform_device *pdev)
struct ata_host *host = dev_get_drvdata(dev);
ata_host_detach(host);
- dev_set_drvdata(dev, NULL);
return 0;
}
diff --git a/drivers/ata/sata_sil24.c b/drivers/ata/sata_sil24.c
index 5d083f4..b1bab82 100644
--- a/drivers/ata/sata_sil24.c
+++ b/drivers/ata/sata_sil24.c
@@ -647,7 +647,6 @@ static inline void sil24_fill_sg(struct ata_queued_cmd *qc,
struct sil24_sge *sge)
{
struct scatterlist *sg;
- unsigned int idx = 0;
ata_for_each_sg(sg, qc) {
sge->addr = cpu_to_le64(sg_dma_address(sg));
@@ -656,9 +655,7 @@ static inline void sil24_fill_sg(struct ata_queued_cmd *qc,
sge->flags = cpu_to_le32(SGE_TRM);
else
sge->flags = 0;
-
sge++;
- idx++;
}
}
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 1e6eda2..1bf5482 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -1218,45 +1218,68 @@ DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8237, asus_hides_a
* do this early on to make the additional device appear during
* the PCI scanning.
*/
-
-static void quirk_jmicron_dualfn(struct pci_dev *pdev)
+static void quirk_jmicron_ata(struct pci_dev *pdev)
{
- u32 conf;
+ u32 conf1, conf5, class;
u8 hdr;
/* Only poke fn 0 */
if (PCI_FUNC(pdev->devfn))
return;
- switch(pdev->device) {
- case PCI_DEVICE_ID_JMICRON_JMB365:
- case PCI_DEVICE_ID_JMICRON_JMB366:
- /* Redirect IDE second PATA port to the right spot */
- pci_read_config_dword(pdev, 0x80, &conf);
- conf |= (1 << 24);
- /* Fall through */
- pci_write_config_dword(pdev, 0x80, conf);
- case PCI_DEVICE_ID_JMICRON_JMB361:
- case PCI_DEVICE_ID_JMICRON_JMB363:
- pci_read_config_dword(pdev, 0x40, &conf);
- /* Enable dual function mode, AHCI on fn 0, IDE fn1 */
- /* Set the class codes correctly and then direct IDE 0 */
- conf &= ~0x000FF200; /* Clear bit 9 and 12-19 */
- conf |= 0x00C2A102; /* Set 1, 8, 13, 15, 17, 22, 23 */
- pci_write_config_dword(pdev, 0x40, conf);
-
- /* Reconfigure so that the PCI scanner discovers the
- device is now multifunction */
-
- pci_read_config_byte(pdev, PCI_HEADER_TYPE, &hdr);
- pdev->hdr_type = hdr & 0x7f;
- pdev->multifunction = !!(hdr & 0x80);
+ pci_read_config_dword(pdev, 0x40, &conf1);
+ pci_read_config_dword(pdev, 0x80, &conf5);
- break;
+ conf1 &= ~0x00CFF302; /* Clear bit 1, 8, 9, 12-19, 22, 23 */
+ conf5 &= ~(1 << 24); /* Clear bit 24 */
+
+ switch (pdev->device) {
+ case PCI_DEVICE_ID_JMICRON_JMB360:
+ /* The controller should be in single function ahci mode */
+ conf1 |= 0x0002A100; /* Set 8, 13, 15, 17 */
+ break;
+
+ case PCI_DEVICE_ID_JMICRON_JMB365:
+ case PCI_DEVICE_ID_JMICRON_JMB366:
+ /* Redirect IDE second PATA port to the right spot */
+ conf5 |= (1 << 24);
+ /* Fall through */
+ case PCI_DEVICE_ID_JMICRON_JMB361:
+ case PCI_DEVICE_ID_JMICRON_JMB363:
+ /* Enable dual function mode, AHCI on fn 0, IDE fn1 */
+ /* Set the class codes correctly and then direct IDE 0 */
+ conf1 |= 0x00C2A102; /* Set 1, 8, 13, 15, 17, 22, 23 */
+ break;
+
+ case PCI_DEVICE_ID_JMICRON_JMB368:
+ /* The controller should be in single function IDE mode */
+ conf1 |= 0x00C00000; /* Set 22, 23 */
+ break;
}
-}
-DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_JMICRON, PCI_ANY_ID, quirk_jmicron_dualfn);
-DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_JMICRON, PCI_ANY_ID, quirk_jmicron_dualfn);
+
+ pci_write_config_dword(pdev, 0x40, conf1);
+ pci_write_config_dword(pdev, 0x80, conf5);
+
+ /* Update pdev accordingly */
+ pci_read_config_byte(pdev, PCI_HEADER_TYPE, &hdr);
+ pdev->hdr_type = hdr & 0x7f;
+ pdev->multifunction = !!(hdr & 0x80);
+
+ pci_read_config_dword(pdev, PCI_CLASS_REVISION, &class);
+ pdev->class = class >> 8;
+}
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB360, quirk_jmicron_ata);
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB361, quirk_jmicron_ata);
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB363, quirk_jmicron_ata);
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB365, quirk_jmicron_ata);
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB366, quirk_jmicron_ata);
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB368, quirk_jmicron_ata);
+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB360, quirk_jmicron_ata);
+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB361, quirk_jmicron_ata);
+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB363, quirk_jmicron_ata);
+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB365, quirk_jmicron_ata);
+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB366, quirk_jmicron_ata);
+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB368, quirk_jmicron_ata);
#endif
^ permalink raw reply related [flat|nested] 263+ messages in thread
* RE: [git patches] libata fixes
2007-03-02 2:08 [git patches] libata fixes Jeff Garzik
@ 2007-03-03 18:39 ` Paul Rolland
2007-03-05 5:13 ` Tejun Heo
0 siblings, 1 reply; 263+ messages in thread
From: Paul Rolland @ 2007-03-03 18:39 UTC (permalink / raw)
To: 'Jeff Garzik', 'Andrew Morton', 'Linus Torvalds'
Cc: linux-ide, 'LKML'
Hello,
Applied this on top of 2.6.21-rc1, and I now have the following in my
logs :
ahci 0000:00:1f.2: version 2.0
ACPI: PCI Interrupt 0000:00:1f.2[B] -> GSI 23 (level, low) -> IRQ 23
PCI: Setting latency timer of device 0000:00:1f.2 to 64
ahci 0000:00:1f.2: AHCI 0001.0100 32 slots 4 ports 3 Gbps 0xf impl SATA mode
ahci 0000:00:1f.2: flags: 64bit ncq led clo pio slum part
ata1: SATA max UDMA/133 cmd 0xffffc200000b2900 ctl 0x0000000000000000 bmdma
0x0000000000000000 irq 504
ata2: SATA max UDMA/133 cmd 0xffffc200000b2980 ctl 0x0000000000000000 bmdma
0x0000000000000000 irq 504
ata3: SATA max UDMA/133 cmd 0xffffc200000b2a00 ctl 0x0000000000000000 bmdma
0x0000000000000000 irq 504
ata4: SATA max UDMA/133 cmd 0xffffc200000b2a80 ctl 0x0000000000000000 bmdma
0x0000000000000000 irq 504
scsi0 : ahci
ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
ata1.00: ATA-7: Maxtor 6L250S0, BANC1G10, max UDMA/133
ata1.00: 490234752 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata1.00: configured for UDMA/133
scsi1 : ahci
ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata2.00: qc timeout (cmd 0xec)
ata2.00: failed to IDENTIFY (I/O error, err_mask=0x104)
ata2: port is slow to respond, please be patient (Status 0x80)
ata2: port failed to respond (30 secs, Status 0x80)
ata2: COMRESET failed (device not ready)
ata2: hardreset failed, retrying in 5 secs
ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata2.00: ATA-6: Config Disk, RGL10364, max UDMA/133
ata2.00: 640 sectors, multi 1: LBA
ata2.00: configured for UDMA/133
scsi2 : ahci
ata3: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
ata3.00: ATA-7: Maxtor 6L250S0, BANC1G10, max UDMA/133
ata3.00: 490234752 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata3.00: configured for UDMA/133
scsi3 : ahci
ata4: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata4.00: ATA-7: ST3500641AS, 3.AAB, max UDMA/133
ata4.00: 976773168 sectors, multi 16: LBA48 NCQ (depth 31/32)
ata4.00: configured for UDMA/133
scsi 0:0:0:0: Direct-Access ATA Maxtor 6L250S0 BANC PQ: 0 ANSI: 5
SCSI device sda: 490234752 512-byte hdwr sectors (251000 MB)
sda: Write Protect is off
sda: Mode Sense: 00 3a 00 00
SCSI device sda: write cache: enabled, read cache: enabled, doesn't support
DPO or FUA
SCSI device sda: 490234752 512-byte hdwr sectors (251000 MB)
sda: Write Protect is off
sda: Mode Sense: 00 3a 00 00
SCSI device sda: write cache: enabled, read cache: enabled, doesn't support
DPO or FUA
sda: sda1 sda2 sda3
sd 0:0:0:0: Attached scsi disk sda
sd 0:0:0:0: Attached scsi generic sg0 type 0
scsi 1:0:0:0: Direct-Access ATA Config Disk RGL1 PQ: 0 ANSI: 5
SCSI device sdb: 640 512-byte hdwr sectors (0 MB)
sdb: Write Protect is off
sdb: Mode Sense: 00 3a 00 00
SCSI device sdb: write cache: disabled, read cache: enabled, doesn't support
DPO or FUA
SCSI device sdb: 640 512-byte hdwr sectors (0 MB)
sdb: Write Protect is off
sdb: Mode Sense: 00 3a 00 00
SCSI device sdb: write cache: disabled, read cache: enabled, doesn't support
DPO or FUA
sdb: unknown partition table
sd 1:0:0:0: Attached scsi disk sdb
sd 1:0:0:0: Attached scsi generic sg1 type 0
scsi 2:0:0:0: Direct-Access ATA Maxtor 6L250S0 BANC PQ: 0 ANSI: 5
SCSI device sdc: 490234752 512-byte hdwr sectors (251000 MB)
sdc: Write Protect is off
sdc: Mode Sense: 00 3a 00 00
SCSI device sdc: write cache: enabled, read cache: enabled, doesn't support
DPO or FUA
SCSI device sdc: 490234752 512-byte hdwr sectors (251000 MB)
sdc: Write Protect is off
sdc: Mode Sense: 00 3a 00 00
SCSI device sdc: write cache: enabled, read cache: enabled, doesn't support
DPO or FUA
sdc: sdc1 sdc2
sd 2:0:0:0: Attached scsi disk sdc
sd 2:0:0:0: Attached scsi generic sg2 type 0
scsi 3:0:0:0: Direct-Access ATA ST3500641AS 3.AA PQ: 0 ANSI: 5
SCSI device sdd: 976773168 512-byte hdwr sectors (500108 MB)
sdd: Write Protect is off
sdd: Mode Sense: 00 3a 00 00
SCSI device sdd: write cache: enabled, read cache: enabled, doesn't support
DPO or FUA
SCSI device sdd: 976773168 512-byte hdwr sectors (500108 MB)
sdd: Write Protect is off
sdd: Mode Sense: 00 3a 00 00
SCSI device sdd: write cache: enabled, read cache: enabled, doesn't support
DPO or FUA
sdd: sdd1 sdd2 sdd3
sd 3:0:0:0: Attached scsi disk sdd
sd 3:0:0:0: Attached scsi generic sg3 type 0
ACPI: PCI Interrupt 0000:02:00.0[A] -> GSI 17 (level, low) -> IRQ 17
PCI: Setting latency timer of device 0000:02:00.0 to 64
ahci 0000:02:00.0: AHCI 0001.0000 32 slots 2 ports 3 Gbps 0x3 impl SATA mode
ahci 0000:02:00.0: flags: 64bit ncq pm led clo pmp pio slum part
ata5: SATA max UDMA/133 cmd 0xffffc200000bc100 ctl 0x0000000000000000 bmdma
0x0000000000000000 irq 17
ata6: SATA max UDMA/133 cmd 0xffffc200000bc180 ctl 0x0000000000000000 bmdma
0x0000000000000000 irq 17
scsi4 : ahci
ata5: SATA link down (SStatus 0 SControl 300)
scsi5 : ahci
ata6: SATA link down (SStatus 0 SControl 300)
ata_piix 0000:00:1f.1: version 2.00ac7
ACPI: PCI Interrupt 0000:00:1f.1[A] -> GSI 22 (level, low) -> IRQ 22
PCI: Setting latency timer of device 0000:00:1f.1 to 64
ata7: PATA max UDMA/133 cmd 0x00000000000101f0 ctl 0x00000000000103f6 bmdma
0x000000000001ffa0 irq 14
ata8: PATA max UDMA/133 cmd 0x0000000000010170 ctl 0x0000000000010376 bmdma
0x000000000001ffa8 irq 15
scsi6 : ata_piix
ACPI Error (dsopcode-0481): Attempt to CreateField of length zero [20070126]
ACPI Error (psparse-0537): Method parse/execution failed
[\_SB_.PCI0.IDE0.RATA] (Node ffff8100c7f4b490), AE_AML_OPERAND_VALUE
ACPI Error (psparse-0537): Method parse/execution failed
[\_SB_.PCI0.IDE0.CHN0.DRV0._GTF] (Node ffff8100c7f4b7f0), AE_AML_OPERAND_VALUE
ata7.00: ATA-7: Maxtor 6L200P0, BAH41E00, max UDMA/133
ata7.00: 398297088 sectors, multi 16: LBA48
ACPI Error (dsopcode-0481): Attempt to CreateField of length zero [20070126]
ACPI Error (psparse-0537): Method parse/execution failed
[\_SB_.PCI0.IDE0.RATA] (Node ffff8100c7f4b490), AE_AML_OPERAND_VALUE
ACPI Error (psparse-0537): Method parse/execution failed
[\_SB_.PCI0.IDE0.CHN0.DRV0._GTF] (Node ffff8100c7f4b7f0), AE_AML_OPERAND_VALUE
ata7.01: ATAPI, max UDMA/33
ACPI Error (dsopcode-0481): Attempt to CreateField of length zero [20070126]
ACPI Error (psparse-0537): Method parse/execution failed
[\_SB_.PCI0.IDE0.RATA] (Node ffff8100c7f4b490), AE_AML_OPERAND_VALUE
ACPI Error (psparse-0537): Method parse/execution failed
[\_SB_.PCI0.IDE0.CHN0.DRV0._GTF] (Node ffff8100c7f4b7f0), AE_AML_OPERAND_VALUE
ata7.00: configured for UDMA/33
ACPI Error (dsopcode-0481): Attempt to CreateField of length zero [20070126]
ACPI Error (psparse-0537): Method parse/execution failed
[\_SB_.PCI0.IDE0.RATA] (Node ffff8100c7f4b490), AE_AML_OPERAND_VALUE
ACPI Error (psparse-0537): Method parse/execution failed
[\_SB_.PCI0.IDE0.CHN0.DRV0._GTF] (Node ffff8100c7f4b7f0), AE_AML_OPERAND_VALUE
ata7.01: configured for UDMA/33
scsi7 : ata_piix
ATA: abnormal status 0x7F on port 0x0000000000010177
scsi 6:0:0:0: Direct-Access ATA Maxtor 6L200P0 BAH4 PQ: 0 ANSI: 5
SCSI device sde: 398297088 512-byte hdwr sectors (203928 MB)
sde: Write Protect is off
sde: Mode Sense: 00 3a 00 00
SCSI device sde: write cache: enabled, read cache: enabled, doesn't support
DPO or FUA
SCSI device sde: 398297088 512-byte hdwr sectors (203928 MB)
sde: Write Protect is off
sde: Mode Sense: 00 3a 00 00
SCSI device sde: write cache: enabled, read cache: enabled, doesn't support
DPO or FUA
sde: sde1 sde2 sde3 sde4 < sde5 sde6 >
sd 6:0:0:0: Attached scsi disk sde
sd 6:0:0:0: Attached scsi generic sg4 type 0
scsi 6:0:1:0: CD-ROM ASUS CRW-5232A3 1.00 PQ: 0 ANSI: 5
sr0: scsi3-mmc drive: 52x/52x writer cd/rw xa/form2 cdda tray
Uniform CD-ROM driver Revision: 3.20
sr 6:0:1:0: Attached scsi CD-ROM sr0
sr 6:0:1:0: Attached scsi generic sg5 type 5
PCI: Enabling device 0000:02:00.1 (0000 -> 0001)
ACPI: PCI Interrupt 0000:02:00.1[B] -> GSI 16 (level, low) -> IRQ 16
PCI: Setting latency timer of device 0000:02:00.1 to 64
ata9: PATA max UDMA/100 cmd 0x0000000000019c00 ctl 0x0000000000019882 bmdma
0x0000000000019400 irq 16
ata10: PATA max UDMA/100 cmd 0x0000000000019800 ctl 0x0000000000019482 bmdma
0x0000000000019408 irq 16
scsi8 : pata_jmicron
ata9.00: ATAPI, max UDMA/66
ata9.00: qc timeout (cmd 0xef)
ata9.00: failed to set xfermode (err_mask=0x4)
ata9.00: limiting speed to UDMA/44
ata9: failed to recover some devices, retrying in 5 secs
ata9.00: qc timeout (cmd 0xef)
ata9.00: failed to set xfermode (err_mask=0x4)
ata9.00: limiting speed to PIO0
ata9: failed to recover some devices, retrying in 5 secs
ata9.00: qc timeout (cmd 0xef)
ata9.00: failed to set xfermode (err_mask=0x4)
ata9.00: disabled
scsi9 : pata_jmicron
ATA: abnormal status 0x7F on port 0x0000000000019807
....
ata1.00: exception Emask 0x2 SAct 0xffe0 SErr 0x0 action 0x2 frozen
ata1.00: (spurious completions during NCQ issue=0x0 SAct=0xffe0
FIS=004040a1:00000010)
ata1.00: cmd 60/02:28:52:ec:c4/00:00:0e:00:00/40 tag 5 cdb 0x0 data 1024 in
res 40/00:78:66:ec:c4/00:00:0e:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/02:30:54:ec:c4/00:00:0e:00:00/40 tag 6 cdb 0x0 data 1024 in
res 40/00:78:66:ec:c4/00:00:0e:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/02:38:56:ec:c4/00:00:0e:00:00/40 tag 7 cdb 0x0 data 1024 in
res 40/00:78:66:ec:c4/00:00:0e:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/02:40:58:ec:c4/00:00:0e:00:00/40 tag 8 cdb 0x0 data 1024 in
res 40/00:78:66:ec:c4/00:00:0e:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/02:48:5a:ec:c4/00:00:0e:00:00/40 tag 9 cdb 0x0 data 1024 in
res 40/00:78:66:ec:c4/00:00:0e:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/02:50:5c:ec:c4/00:00:0e:00:00/40 tag 10 cdb 0x0 data 1024 in
res 40/00:78:66:ec:c4/00:00:0e:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/02:58:5e:ec:c4/00:00:0e:00:00/40 tag 11 cdb 0x0 data 1024 in
res 40/00:78:66:ec:c4/00:00:0e:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/02:60:60:ec:c4/00:00:0e:00:00/40 tag 12 cdb 0x0 data 1024 in
res 40/00:78:66:ec:c4/00:00:0e:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/02:68:62:ec:c4/00:00:0e:00:00/40 tag 13 cdb 0x0 data 1024 in
res 40/00:78:66:ec:c4/00:00:0e:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/02:70:64:ec:c4/00:00:0e:00:00/40 tag 14 cdb 0x0 data 1024 in
res 40/00:78:66:ec:c4/00:00:0e:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/02:78:66:ec:c4/00:00:0e:00:00/40 tag 15 cdb 0x0 data 1024 in
res 40/00:78:66:ec:c4/00:00:0e:00:00/40 Emask 0x2 (HSM violation)
ata1: soft resetting port
ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
ata1.00: configured for UDMA/133
ata1: EH complete
SCSI device sda: 490234752 512-byte hdwr sectors (251000 MB)
sda: Write Protect is off
sda: Mode Sense: 00 3a 00 00
SCSI device sda: write cache: enabled, read cache: enabled, doesn't support
DPO or FUA
This last part was not present when booting stock 2.6.21-rc1
Any other info you may need, please ask.
Regards,
Paul
Paul Rolland, rol(at)as2917.net
ex-AS2917 Network administrator and Peering Coordinator
--
Please no HTML, I'm not a browser - Pas d'HTML, je ne suis pas un navigateur
"Some people dream of success... while others wake up and work hard at it"
"I worry about my child and the Internet all the time, even though she's too
young to have logged on yet. Here's what I worry about. I worry that 10 or 15
years from now, she will come to me and say 'Daddy, where were you when they
took freedom of the press away from the Internet?'"
--Mike Godwin, Electronic Frontier Foundation
> -----Original Message-----
> From: linux-ide-owner@vger.kernel.org
> [mailto:linux-ide-owner@vger.kernel.org] On Behalf Of Jeff Garzik
> Sent: Friday, March 02, 2007 3:09 AM
> To: Andrew Morton; Linus Torvalds
> Cc: linux-ide@vger.kernel.org; LKML
> Subject: [git patches] libata fixes
>
>
> Does not include Alan's stuff, per recent email thread.
>
> 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 | 55 ++++++++++++++--------------
> drivers/ata/libata-core.c | 5 ++-
> drivers/ata/pata_cs5520.c | 1 -
> drivers/ata/pata_isapnp.c | 1 -
> drivers/ata/pata_jmicron.c | 51 ++++++--------------------
> drivers/ata/pata_platform.c | 1 -
> drivers/ata/sata_sil24.c | 3 --
> drivers/pci/quirks.c | 83
> +++++++++++++++++++++++++++---------------
> 8 files changed, 95 insertions(+), 105 deletions(-)
>
> Tejun Heo (7):
> libata: clear drvdata in ata_host_release(), take#2
> sata_sil24: kill unused local variable idx in sil24_fill_sg()
> libata: blacklist FUJITSU MHT2060BH for NCQ
> pata_jmicron: drop unnecessary device programming in [re]init
> jmicron ATA: reimplement jmicron ATA quirk
> ahci/pata_jmicron: match class not function number
> ahci: improve spurious SDB FIS handling
>
> diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
> index 6d93240..1539734 100644
> --- a/drivers/ata/ahci.c
> +++ b/drivers/ata/ahci.c
> @@ -200,6 +200,7 @@ struct ahci_port_priv {
> /* for NCQ spurious interrupt analysis */
> unsigned int ncq_saw_d2h:1;
> unsigned int ncq_saw_dmas:1;
> + unsigned int ncq_saw_sdb:1;
> };
>
> static u32 ahci_scr_read (struct ata_port *ap, unsigned int sc_reg);
> @@ -384,12 +385,9 @@ static const struct pci_device_id
> ahci_pci_tbl[] = {
> { PCI_VDEVICE(INTEL, 0x294d), board_ahci_pi }, /* ICH9 */
> { PCI_VDEVICE(INTEL, 0x294e), board_ahci_pi }, /* ICH9M */
>
> - /* JMicron */
> - { PCI_VDEVICE(JMICRON, 0x2360), board_ahci_ign_iferr },
> /* JMB360 */
> - { PCI_VDEVICE(JMICRON, 0x2361), board_ahci_ign_iferr },
> /* JMB361 */
> - { PCI_VDEVICE(JMICRON, 0x2363), board_ahci_ign_iferr },
> /* JMB363 */
> - { PCI_VDEVICE(JMICRON, 0x2365), board_ahci_ign_iferr },
> /* JMB365 */
> - { PCI_VDEVICE(JMICRON, 0x2366), board_ahci_ign_iferr },
> /* JMB366 */
> + /* 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,
> + PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff, board_ahci_ign_iferr },
>
> /* ATI */
> { PCI_VDEVICE(ATI, 0x4380), board_ahci }, /* ATI SB600
> non-raid */
> @@ -1160,23 +1158,31 @@ static void ahci_host_intr(struct
> ata_port *ap)
> }
>
> if (status & PORT_IRQ_SDB_FIS) {
> - /* SDB FIS containing spurious completions might be
> - * dangerous, whine and fail commands with HSM
> - * violation. EH will turn off NCQ after several such
> - * failures.
> - */
> const __le32 *f = pp->rx_fis + RX_FIS_SDB;
>
> - ata_ehi_push_desc(ehi, "spurious completion during NCQ "
> - "issue=0x%x SAct=0x%x FIS=%08x:%08x",
> - readl(port_mmio + PORT_CMD_ISSUE),
> - readl(port_mmio + PORT_SCR_ACT),
> - le32_to_cpu(f[0]), le32_to_cpu(f[1]));
> -
> - ehi->err_mask |= AC_ERR_HSM;
> - ehi->action |= ATA_EH_SOFTRESET;
> - ata_port_freeze(ap);
> -
> + if (le32_to_cpu(f[1])) {
> + /* SDB FIS containing spurious completions
> + * might be dangerous, whine and fail commands
> + * with HSM violation. EH will turn off NCQ
> + * after several such failures.
> + */
> + ata_ehi_push_desc(ehi,
> + "spurious completions during NCQ "
> + "issue=0x%x SAct=0x%x FIS=%08x:%08x",
> + readl(port_mmio + PORT_CMD_ISSUE),
> + readl(port_mmio + PORT_SCR_ACT),
> + le32_to_cpu(f[0]), le32_to_cpu(f[1]));
> + ehi->err_mask |= AC_ERR_HSM;
> + ehi->action |= ATA_EH_SOFTRESET;
> + ata_port_freeze(ap);
> + } else {
> + if (!pp->ncq_saw_sdb)
> + ata_port_printk(ap, KERN_INFO,
> + "spurious SDB FIS
> %08x:%08x during NCQ, "
> + "this message won't be
> printed again\n",
> + le32_to_cpu(f[0]),
> le32_to_cpu(f[1]));
> + pp->ncq_saw_sdb = 1;
> + }
> known_irq = 1;
> }
>
> @@ -1665,13 +1671,6 @@ static int ahci_init_one(struct
> pci_dev *pdev, const struct pci_device_id *ent)
> if (!printed_version++)
> dev_printk(KERN_DEBUG, &pdev->dev, "version "
> DRV_VERSION "\n");
>
> - if (pdev->vendor == PCI_VENDOR_ID_JMICRON) {
> - /* Function 1 is the PATA controller except on
> the 368, where
> - we are not AHCI anyway */
> - if (PCI_FUNC(pdev->devfn))
> - return -ENODEV;
> - }
> -
> rc = pcim_enable_device(pdev);
> if (rc)
> return rc;
> diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
> index c8d44a7..ac3d120 100644
> --- a/drivers/ata/libata-core.c
> +++ b/drivers/ata/libata-core.c
> @@ -3346,6 +3346,8 @@ static const struct ata_blacklist_entry
> ata_device_blacklist [] = {
> /* Devices where NCQ should be avoided */
> /* NCQ is slow */
> { "WDC WD740ADFD-00", NULL,
> ATA_HORKAGE_NONCQ },
> + /* http://thread.gmane.org/gmane.linux.ide/14907 */
> + { "FUJITSU MHT2060BH", NULL, ATA_HORKAGE_NONCQ },
>
> /* Devices with NCQ limits */
>
> @@ -5680,6 +5682,8 @@ static void ata_host_release(struct
> device *gendev, void *res)
>
> if (host->ops->host_stop)
> host->ops->host_stop(host);
> +
> + dev_set_drvdata(gendev, NULL);
> }
>
> /**
> @@ -5902,7 +5906,6 @@ int ata_device_add(const struct
> ata_probe_ent *ent)
>
> err_out:
> devres_release_group(dev, ata_device_add);
> - dev_set_drvdata(dev, NULL);
> VPRINTK("EXIT, returning %d\n", rc);
> return 0;
> }
> diff --git a/drivers/ata/pata_cs5520.c b/drivers/ata/pata_cs5520.c
> index c1334c6..8ff2d58 100644
> --- a/drivers/ata/pata_cs5520.c
> +++ b/drivers/ata/pata_cs5520.c
> @@ -306,7 +306,6 @@ static void __devexit
> cs5520_remove_one(struct pci_dev *pdev)
> struct ata_host *host = dev_get_drvdata(dev);
>
> ata_host_detach(host);
> - dev_set_drvdata(dev, NULL);
> }
>
> /**
> diff --git a/drivers/ata/pata_isapnp.c b/drivers/ata/pata_isapnp.c
> index d5f2e85..1a61cc8 100644
> --- a/drivers/ata/pata_isapnp.c
> +++ b/drivers/ata/pata_isapnp.c
> @@ -128,7 +128,6 @@ static void isapnp_remove_one(struct
> pnp_dev *idev)
> struct ata_host *host = dev_get_drvdata(dev);
>
> ata_host_detach(host);
> - dev_set_drvdata(dev, NULL);
> }
>
> static struct pnp_device_id isapnp_devices[] = {
> diff --git a/drivers/ata/pata_jmicron.c b/drivers/ata/pata_jmicron.c
> index 7a635dd..47d0f94 100644
> --- a/drivers/ata/pata_jmicron.c
> +++ b/drivers/ata/pata_jmicron.c
> @@ -202,49 +202,20 @@ static int jmicron_init_one (struct
> pci_dev *pdev, const struct pci_device_id *i
> };
> struct ata_port_info *port_info[2] = { &info, &info };
>
> - u32 reg;
> -
> - /* PATA controller is fn 1, AHCI is fn 0 */
> - if (id->driver_data != 368 && PCI_FUNC(pdev->devfn) != 1)
> - return -ENODEV;
> -
> - /* The 365/66 have two PATA channels, redirect the second */
> - if (id->driver_data == 365 || id->driver_data == 366) {
> - pci_read_config_dword(pdev, 0x80, ®);
> - reg |= (1 << 24); /* IDE1 to PATA IDE secondary */
> - pci_write_config_dword(pdev, 0x80, reg);
> - }
> -
> return ata_pci_init_one(pdev, port_info, 2);
> }
>
> -static int jmicron_reinit_one(struct pci_dev *pdev)
> -{
> - u32 reg;
> -
> - switch(pdev->device) {
> - case PCI_DEVICE_ID_JMICRON_JMB368:
> - break;
> - case PCI_DEVICE_ID_JMICRON_JMB365:
> - case PCI_DEVICE_ID_JMICRON_JMB366:
> - /* Restore mapping or disks swap and
> boy does it get ugly */
> - pci_read_config_dword(pdev, 0x80, ®);
> - reg |= (1 << 24); /* IDE1 to PATA
> IDE secondary */
> - pci_write_config_dword(pdev, 0x80, reg);
> - /* Fall through */
> - default:
> - /* Make sure AHCI is turned back on */
> - pci_write_config_byte(pdev, 0x41, 0xa1);
> - }
> - return ata_pci_device_resume(pdev);
> -}
> -
> static const struct pci_device_id jmicron_pci_tbl[] = {
> - { PCI_VDEVICE(JMICRON, PCI_DEVICE_ID_JMICRON_JMB361), 361},
> - { PCI_VDEVICE(JMICRON, PCI_DEVICE_ID_JMICRON_JMB363), 363},
> - { PCI_VDEVICE(JMICRON, PCI_DEVICE_ID_JMICRON_JMB365), 365},
> - { PCI_VDEVICE(JMICRON, PCI_DEVICE_ID_JMICRON_JMB366), 366},
> - { PCI_VDEVICE(JMICRON, PCI_DEVICE_ID_JMICRON_JMB368), 368},
> + { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB361,
> + PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_STORAGE_IDE << 8,
> 0xffff00, 361 },
> + { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB363,
> + PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_STORAGE_IDE << 8,
> 0xffff00, 363 },
> + { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB365,
> + PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_STORAGE_IDE << 8,
> 0xffff00, 365 },
> + { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB366,
> + PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_STORAGE_IDE << 8,
> 0xffff00, 366 },
> + { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB368,
> + PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_STORAGE_IDE << 8,
> 0xffff00, 368 },
>
> { } /* terminate list */
> };
> @@ -255,7 +226,7 @@ static struct pci_driver jmicron_pci_driver = {
> .probe = jmicron_init_one,
> .remove = ata_pci_remove_one,
> .suspend = ata_pci_device_suspend,
> - .resume = jmicron_reinit_one,
> + .resume = ata_pci_device_resume,
> };
>
> static int __init jmicron_init(void)
> diff --git a/drivers/ata/pata_platform.c b/drivers/ata/pata_platform.c
> index 02ea95f..4b82a54 100644
> --- a/drivers/ata/pata_platform.c
> +++ b/drivers/ata/pata_platform.c
> @@ -228,7 +228,6 @@ static int __devexit
> pata_platform_remove(struct platform_device *pdev)
> struct ata_host *host = dev_get_drvdata(dev);
>
> ata_host_detach(host);
> - dev_set_drvdata(dev, NULL);
>
> return 0;
> }
> diff --git a/drivers/ata/sata_sil24.c b/drivers/ata/sata_sil24.c
> index 5d083f4..b1bab82 100644
> --- a/drivers/ata/sata_sil24.c
> +++ b/drivers/ata/sata_sil24.c
> @@ -647,7 +647,6 @@ static inline void sil24_fill_sg(struct
> ata_queued_cmd *qc,
> struct sil24_sge *sge)
> {
> struct scatterlist *sg;
> - unsigned int idx = 0;
>
> ata_for_each_sg(sg, qc) {
> sge->addr = cpu_to_le64(sg_dma_address(sg));
> @@ -656,9 +655,7 @@ static inline void sil24_fill_sg(struct
> ata_queued_cmd *qc,
> sge->flags = cpu_to_le32(SGE_TRM);
> else
> sge->flags = 0;
> -
> sge++;
> - idx++;
> }
> }
>
> diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
> index 1e6eda2..1bf5482 100644
> --- a/drivers/pci/quirks.c
> +++ b/drivers/pci/quirks.c
> @@ -1218,45 +1218,68 @@
> DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_VIA,
> PCI_DEVICE_ID_VIA_8237, asus_hides_a
> * do this early on to make the additional device appear during
> * the PCI scanning.
> */
> -
> -static void quirk_jmicron_dualfn(struct pci_dev *pdev)
> +static void quirk_jmicron_ata(struct pci_dev *pdev)
> {
> - u32 conf;
> + u32 conf1, conf5, class;
> u8 hdr;
>
> /* Only poke fn 0 */
> if (PCI_FUNC(pdev->devfn))
> return;
>
> - switch(pdev->device) {
> - case PCI_DEVICE_ID_JMICRON_JMB365:
> - case PCI_DEVICE_ID_JMICRON_JMB366:
> - /* Redirect IDE second PATA port to the
> right spot */
> - pci_read_config_dword(pdev, 0x80, &conf);
> - conf |= (1 << 24);
> - /* Fall through */
> - pci_write_config_dword(pdev, 0x80, conf);
> - case PCI_DEVICE_ID_JMICRON_JMB361:
> - case PCI_DEVICE_ID_JMICRON_JMB363:
> - pci_read_config_dword(pdev, 0x40, &conf);
> - /* Enable dual function mode, AHCI on
> fn 0, IDE fn1 */
> - /* Set the class codes correctly and
> then direct IDE 0 */
> - conf &= ~0x000FF200; /* Clear bit 9 and 12-19 */
> - conf |= 0x00C2A102; /* Set 1, 8, 13,
> 15, 17, 22, 23 */
> - pci_write_config_dword(pdev, 0x40, conf);
> -
> - /* Reconfigure so that the PCI scanner
> discovers the
> - device is now multifunction */
> -
> - pci_read_config_byte(pdev,
> PCI_HEADER_TYPE, &hdr);
> - pdev->hdr_type = hdr & 0x7f;
> - pdev->multifunction = !!(hdr & 0x80);
> + pci_read_config_dword(pdev, 0x40, &conf1);
> + pci_read_config_dword(pdev, 0x80, &conf5);
>
> - break;
> + conf1 &= ~0x00CFF302; /* Clear bit 1, 8, 9, 12-19, 22, 23 */
> + conf5 &= ~(1 << 24); /* Clear bit 24 */
> +
> + switch (pdev->device) {
> + case PCI_DEVICE_ID_JMICRON_JMB360:
> + /* The controller should be in single function
> ahci mode */
> + conf1 |= 0x0002A100; /* Set 8, 13, 15, 17 */
> + break;
> +
> + case PCI_DEVICE_ID_JMICRON_JMB365:
> + case PCI_DEVICE_ID_JMICRON_JMB366:
> + /* Redirect IDE second PATA port to the right spot */
> + conf5 |= (1 << 24);
> + /* Fall through */
> + case PCI_DEVICE_ID_JMICRON_JMB361:
> + case PCI_DEVICE_ID_JMICRON_JMB363:
> + /* Enable dual function mode, AHCI on fn 0, IDE fn1 */
> + /* Set the class codes correctly and then
> direct IDE 0 */
> + conf1 |= 0x00C2A102; /* Set 1, 8, 13, 15, 17, 22, 23 */
> + break;
> +
> + case PCI_DEVICE_ID_JMICRON_JMB368:
> + /* The controller should be in single function
> IDE mode */
> + conf1 |= 0x00C00000; /* Set 22, 23 */
> + break;
> }
> -}
> -DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_JMICRON, PCI_ANY_ID,
> quirk_jmicron_dualfn);
> -DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_JMICRON, PCI_ANY_ID,
> quirk_jmicron_dualfn);
> +
> + pci_write_config_dword(pdev, 0x40, conf1);
> + pci_write_config_dword(pdev, 0x80, conf5);
> +
> + /* Update pdev accordingly */
> + pci_read_config_byte(pdev, PCI_HEADER_TYPE, &hdr);
> + pdev->hdr_type = hdr & 0x7f;
> + pdev->multifunction = !!(hdr & 0x80);
> +
> + pci_read_config_dword(pdev, PCI_CLASS_REVISION, &class);
> + pdev->class = class >> 8;
> +}
> +DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_JMICRON,
> PCI_DEVICE_ID_JMICRON_JMB360, quirk_jmicron_ata);
> +DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_JMICRON,
> PCI_DEVICE_ID_JMICRON_JMB361, quirk_jmicron_ata);
> +DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_JMICRON,
> PCI_DEVICE_ID_JMICRON_JMB363, quirk_jmicron_ata);
> +DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_JMICRON,
> PCI_DEVICE_ID_JMICRON_JMB365, quirk_jmicron_ata);
> +DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_JMICRON,
> PCI_DEVICE_ID_JMICRON_JMB366, quirk_jmicron_ata);
> +DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_JMICRON,
> PCI_DEVICE_ID_JMICRON_JMB368, quirk_jmicron_ata);
> +DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_JMICRON,
> PCI_DEVICE_ID_JMICRON_JMB360, quirk_jmicron_ata);
> +DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_JMICRON,
> PCI_DEVICE_ID_JMICRON_JMB361, quirk_jmicron_ata);
> +DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_JMICRON,
> PCI_DEVICE_ID_JMICRON_JMB363, quirk_jmicron_ata);
> +DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_JMICRON,
> PCI_DEVICE_ID_JMICRON_JMB365, quirk_jmicron_ata);
> +DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_JMICRON,
> PCI_DEVICE_ID_JMICRON_JMB366, quirk_jmicron_ata);
> +DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_JMICRON,
> PCI_DEVICE_ID_JMICRON_JMB368, quirk_jmicron_ata);
>
> #endif
>
> -
> To unsubscribe from this list: send the line "unsubscribe
> linux-ide" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 263+ messages in thread
* Re: [git patches] libata fixes
2007-03-03 18:39 ` Paul Rolland
@ 2007-03-05 5:13 ` Tejun Heo
2007-03-05 9:54 ` Paul Rolland
0 siblings, 1 reply; 263+ messages in thread
From: Tejun Heo @ 2007-03-05 5:13 UTC (permalink / raw)
To: rol
Cc: 'Jeff Garzik', 'Andrew Morton',
'Linus Torvalds', linux-ide, 'LKML',
Eric D. Mudama
[cc'ing Eric D. Mudama. Hi!]
Paul Rolland wrote:
> ata1.00: exception Emask 0x2 SAct 0xffe0 SErr 0x0 action 0x2 frozen
> ata1.00: (spurious completions during NCQ issue=0x0 SAct=0xffe0
> FIS=004040a1:00000010)
> ata1.00: cmd 60/02:28:52:ec:c4/00:00:0e:00:00/40 tag 5 cdb 0x0 data 1024 in
> res 40/00:78:66:ec:c4/00:00:0e:00:00/40 Emask 0x2 (HSM violation)
> ata1.00: cmd 60/02:30:54:ec:c4/00:00:0e:00:00/40 tag 6 cdb 0x0 data 1024 in
> res 40/00:78:66:ec:c4/00:00:0e:00:00/40 Emask 0x2 (HSM violation)
> ata1.00: cmd 60/02:38:56:ec:c4/00:00:0e:00:00/40 tag 7 cdb 0x0 data 1024 in
> res 40/00:78:66:ec:c4/00:00:0e:00:00/40 Emask 0x2 (HSM violation)
> ata1.00: cmd 60/02:40:58:ec:c4/00:00:0e:00:00/40 tag 8 cdb 0x0 data 1024 in
> res 40/00:78:66:ec:c4/00:00:0e:00:00/40 Emask 0x2 (HSM violation)
> ata1.00: cmd 60/02:48:5a:ec:c4/00:00:0e:00:00/40 tag 9 cdb 0x0 data 1024 in
> res 40/00:78:66:ec:c4/00:00:0e:00:00/40 Emask 0x2 (HSM violation)
> ata1.00: cmd 60/02:50:5c:ec:c4/00:00:0e:00:00/40 tag 10 cdb 0x0 data 1024 in
> res 40/00:78:66:ec:c4/00:00:0e:00:00/40 Emask 0x2 (HSM violation)
> ata1.00: cmd 60/02:58:5e:ec:c4/00:00:0e:00:00/40 tag 11 cdb 0x0 data 1024 in
> res 40/00:78:66:ec:c4/00:00:0e:00:00/40 Emask 0x2 (HSM violation)
> ata1.00: cmd 60/02:60:60:ec:c4/00:00:0e:00:00/40 tag 12 cdb 0x0 data 1024 in
> res 40/00:78:66:ec:c4/00:00:0e:00:00/40 Emask 0x2 (HSM violation)
> ata1.00: cmd 60/02:68:62:ec:c4/00:00:0e:00:00/40 tag 13 cdb 0x0 data 1024 in
> res 40/00:78:66:ec:c4/00:00:0e:00:00/40 Emask 0x2 (HSM violation)
> ata1.00: cmd 60/02:70:64:ec:c4/00:00:0e:00:00/40 tag 14 cdb 0x0 data 1024 in
> res 40/00:78:66:ec:c4/00:00:0e:00:00/40 Emask 0x2 (HSM violation)
> ata1.00: cmd 60/02:78:66:ec:c4/00:00:0e:00:00/40 tag 15 cdb 0x0 data 1024 in
> res 40/00:78:66:ec:c4/00:00:0e:00:00/40 Emask 0x2 (HSM violation)
> ata1: soft resetting port
> ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
> ata1.00: configured for UDMA/133
> ata1: EH complete
> SCSI device sda: 490234752 512-byte hdwr sectors (251000 MB)
> sda: Write Protect is off
> sda: Mode Sense: 00 3a 00 00
> SCSI device sda: write cache: enabled, read cache: enabled, doesn't support
> DPO or FUA
>
> This last part was not present when booting stock 2.6.21-rc1
Your drive has some issues with NCQ and is scheduled to be blacklisted
such that it isn't enabled. libata used to ignore the condition but now
considers it NCQ protocol violation and fails all pending commands.
libata EH should turn NCQ off automatically after a few of the above
errors. I'd love to see how that actually works in the field (full
dmesg please). If it doesn't, it needs fixing.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 263+ messages in thread
* RE: [git patches] libata fixes
2007-03-05 5:13 ` Tejun Heo
@ 2007-03-05 9:54 ` Paul Rolland
2007-03-05 15:45 ` Tejun Heo
0 siblings, 1 reply; 263+ messages in thread
From: Paul Rolland @ 2007-03-05 9:54 UTC (permalink / raw)
To: 'Tejun Heo'
Cc: 'Jeff Garzik', 'Andrew Morton',
'Linus Torvalds', linux-ide, 'LKML',
'Eric D. Mudama'
Hello,
> Your drive has some issues with NCQ and is scheduled to be blacklisted
> such that it isn't enabled. libata used to ignore the
> condition but now
> considers it NCQ protocol violation and fails all pending commands.
OK, do you need an hdparm report to fully identify the disk ?
> libata EH should turn NCQ off automatically after a few of the above
> errors. I'd love to see how that actually works in the field (full
> dmesg please). If it doesn't, it needs fixing.
I'll get you one tonite, I don't have access to the machine right now.
Regards,
Paul
^ permalink raw reply [flat|nested] 263+ messages in thread
* Re: [git patches] libata fixes
2007-03-05 9:54 ` Paul Rolland
@ 2007-03-05 15:45 ` Tejun Heo
2007-03-06 7:37 ` Paul Rolland
0 siblings, 1 reply; 263+ messages in thread
From: Tejun Heo @ 2007-03-05 15:45 UTC (permalink / raw)
To: rol
Cc: 'Jeff Garzik', 'Andrew Morton',
'Linus Torvalds', linux-ide, 'LKML',
'Eric D. Mudama'
Paul Rolland wrote:
> Hello,
>
>> Your drive has some issues with NCQ and is scheduled to be blacklisted
>> such that it isn't enabled. libata used to ignore the
>> condition but now
>> considers it NCQ protocol violation and fails all pending commands.
>
> OK, do you need an hdparm report to fully identify the disk ?
Nope, we already know.
>> libata EH should turn NCQ off automatically after a few of the above
>> errors. I'd love to see how that actually works in the field (full
>> dmesg please). If it doesn't, it needs fixing.
>
> I'll get you one tonite, I don't have access to the machine right now.
Great. Thanks.
--
tejun
^ permalink raw reply [flat|nested] 263+ messages in thread
* RE: [git patches] libata fixes
2007-03-05 15:45 ` Tejun Heo
@ 2007-03-06 7:37 ` Paul Rolland
2007-03-09 12:49 ` Tejun Heo
0 siblings, 1 reply; 263+ messages in thread
From: Paul Rolland @ 2007-03-06 7:37 UTC (permalink / raw)
To: 'Tejun Heo'
Cc: 'Jeff Garzik', 'Andrew Morton',
'Linus Torvalds', linux-ide, 'LKML',
'Eric D. Mudama'
[-- Attachment #1: Type: text/plain, Size: 3605 bytes --]
Hell Tejun,
I've boot-tested this yesterday, with no real luck...
1 - Tested on top of 2.6.21-rc2 (hope it's fine for you),
2 - Collected a full dmesg before and after
Extract is :
ata7: PATA max UDMA/100 cmd 0x0000000000019c00 ctl 0x0000000000019882 bmdma
0x00
00000000019400 irq 16
ata8: PATA max UDMA/100 cmd 0x0000000000019800 ctl 0x0000000000019482 bmdma
0x00
00000000019408 irq 16
scsi6 : pata_jmicron
ata7.00: ATAPI, max UDMA/66
ata7.00: configured for UDMA/66
scsi7 : pata_jmicron
ATA: abnormal status 0x7F on port 0x0000000000019807
ata7.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen
ata7.00: cmd a0/01:00:00:00:00/00:00:00:00:00/a0 tag 0 cdb 0x12 data 36 in
res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
ata7: soft resetting port
ata7.00: configured for UDMA/66
ata7: EH complete
ata7.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen
ata7.00: cmd a0/01:00:00:00:00/00:00:00:00:00/a0 tag 0 cdb 0x12 data 36 in
res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
ata7: soft resetting port
ata7.00: configured for UDMA/66
ata7: EH complete
ata7.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen
ata7.00: cmd a0/01:00:00:00:00/00:00:00:00:00/a0 tag 0 cdb 0x12 data 36 in
res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
ata7: soft resetting port
ata7.00: configured for UDMA/66
ata7: EH complete
ata7.00: limiting speed to UDMA/44:PIO4
ata7.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen
ata7.00: cmd a0/01:00:00:00:00/00:00:00:00:00/a0 tag 0 cdb 0x12 data 36 in
res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
ata7: soft resetting port
ata7.00: configured for UDMA/44
ata7: EH complete
Hope this helps...
Regards,
Paul
Paul Rolland, rol(at)as2917.net
ex-AS2917 Network administrator and Peering Coordinator
--
Please no HTML, I'm not a browser - Pas d'HTML, je ne suis pas un navigateur
"Some people dream of success... while others wake up and work hard at it"
"I worry about my child and the Internet all the time, even though she's too
young to have logged on yet. Here's what I worry about. I worry that 10 or 15
years from now, she will come to me and say 'Daddy, where were you when they
took freedom of the press away from the Internet?'"
--Mike Godwin, Electronic Frontier Foundation
> -----Original Message-----
> From: linux-ide-owner@vger.kernel.org
> [mailto:linux-ide-owner@vger.kernel.org] On Behalf Of Tejun Heo
> Sent: Monday, March 05, 2007 4:45 PM
> To: rol@as2917.net
> Cc: 'Jeff Garzik'; 'Andrew Morton'; 'Linus Torvalds';
> linux-ide@vger.kernel.org; 'LKML'; 'Eric D. Mudama'
> Subject: Re: [git patches] libata fixes
>
> Paul Rolland wrote:
> > Hello,
> >
> >> Your drive has some issues with NCQ and is scheduled to be
> blacklisted
> >> such that it isn't enabled. libata used to ignore the
> >> condition but now
> >> considers it NCQ protocol violation and fails all pending commands.
> >
> > OK, do you need an hdparm report to fully identify the disk ?
>
> Nope, we already know.
>
> >> libata EH should turn NCQ off automatically after a few of
> the above
> >> errors. I'd love to see how that actually works in the field (full
> >> dmesg please). If it doesn't, it needs fixing.
> >
> > I'll get you one tonite, I don't have access to the machine
> right now.
>
> Great. Thanks.
>
> --
> tejun
> -
> To unsubscribe from this list: send the line "unsubscribe
> linux-ide" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
[-- Attachment #2: dmesg-2.6.21-rc2.before.bz2 --]
[-- Type: application/octet-stream, Size: 8609 bytes --]
[-- Attachment #3: dmesg-2.6.21-rc2.after.bz2 --]
[-- Type: application/octet-stream, Size: 8595 bytes --]
^ permalink raw reply [flat|nested] 263+ messages in thread
* Re: [git patches] libata fixes
2007-03-06 7:37 ` Paul Rolland
@ 2007-03-09 12:49 ` Tejun Heo
2007-03-11 11:35 ` Paul Rolland
0 siblings, 1 reply; 263+ messages in thread
From: Tejun Heo @ 2007-03-09 12:49 UTC (permalink / raw)
To: rol
Cc: 'Jeff Garzik', 'Andrew Morton',
'Linus Torvalds', linux-ide, 'LKML',
'Eric D. Mudama'
Paul Rolland wrote:
> Hell Tejun,
>
> I've boot-tested this yesterday, with no real luck...
>
> 1 - Tested on top of 2.6.21-rc2 (hope it's fine for you),
> 2 - Collected a full dmesg before and after
>
> Extract is :
> ata7: PATA max UDMA/100 cmd 0x0000000000019c00 ctl 0x0000000000019882 bmdma
> 0x00
> 00000000019400 irq 16
> ata8: PATA max UDMA/100 cmd 0x0000000000019800 ctl 0x0000000000019482 bmdma
> 0x00
> 00000000019408 irq 16
> scsi6 : pata_jmicron
> ata7.00: ATAPI, max UDMA/66
> ata7.00: configured for UDMA/66
> scsi7 : pata_jmicron
> ATA: abnormal status 0x7F on port 0x0000000000019807
> ata7.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen
> ata7.00: cmd a0/01:00:00:00:00/00:00:00:00:00/a0 tag 0 cdb 0x12 data 36 in
> res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
It seems like IRQ is not getting through. The first IRQ driven command
is failing for you.
* Does giving 'acpi=off' or 'irqpoll' make any difference?
* Can you connect a harddisk to the channel and see whether that works?
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 263+ messages in thread
* RE: [git patches] libata fixes
2007-03-09 12:49 ` Tejun Heo
@ 2007-03-11 11:35 ` Paul Rolland
2007-03-11 16:43 ` Linus Torvalds
0 siblings, 1 reply; 263+ messages in thread
From: Paul Rolland @ 2007-03-11 11:35 UTC (permalink / raw)
To: 'Tejun Heo'
Cc: 'Jeff Garzik', 'Andrew Morton',
'Linus Torvalds', linux-ide, 'LKML',
'Eric D. Mudama'
Hello,
> It seems like IRQ is not getting through. The first IRQ
> driven command is failing for you.
Hmmmm....
> Extract is :
> ata7: PATA max UDMA/100 cmd 0x0000000000019c00 ctl 0x0000000000019882 bmdma
> 0x0000000000019400 irq 16
> ata8: PATA max UDMA/100 cmd 0x0000000000019800 ctl 0x0000000000019482 bmdma
> 0x0000000000019408 irq 16
IRQ 16 is IO-APIC-fasteoi for libata, and is not shared... but all the
others libata IRQ are IO-APIC-edge.
> * Does giving 'acpi=off' or 'irqpoll' make any difference?
>
> * Can you connect a harddisk to the channel and see whether
> that works?
Tried that.. Disk is identified as ATA-7: Mastor 6Y080L0, YAR41BW0, max
UDMA/13
and then timeout again...
Tried then with acpi=off, same result (identify is OK, but then timeout),
and irqpoll and then it was OK !!!!
Let's then go back to my DVD-RW and test irqpoll...
and ... Yes.... Got it !
It is identified, it can be mounted, and read as /dev/sr1 !
/proc/interrupts show a count of 0 for IRQ 16, so yes, it goes somewhere
else...
Doing some diffs on copy of /proc/interrupts while accessing the DVD
gives two possibilities : IRQ14 or IRQ18, but both are also counting
when not accessing the DVD...
Question : does running with irqpoll affects performance ?
Paul
^ permalink raw reply [flat|nested] 263+ messages in thread
* RE: [git patches] libata fixes
2007-03-11 11:35 ` Paul Rolland
@ 2007-03-11 16:43 ` Linus Torvalds
2007-03-11 18:34 ` Paul Rolland
0 siblings, 1 reply; 263+ messages in thread
From: Linus Torvalds @ 2007-03-11 16:43 UTC (permalink / raw)
To: Paul Rolland
Cc: 'Tejun Heo', 'Jeff Garzik',
'Andrew Morton', linux-ide, 'LKML',
'Eric D. Mudama'
Paul,
do I understand correctly that the *only* difference between the working
setup is that you applied (by hand) the libata patch that Jeff sent out?
So plain 2.6.21-rc2 works fine, but with the patch applied, you get no
interrupts on the DVD drive?
On Sun, 11 Mar 2007, Paul Rolland wrote:
>
> > It seems like IRQ is not getting through. The first IRQ
> > driven command is failing for you.
>
> Hmmmm....
> > Extract is :
> > ata7: PATA max UDMA/100 cmd 0x0000000000019c00 ctl 0x0000000000019882 bmdma 0x0000000000019400 irq 16
> > ata8: PATA max UDMA/100 cmd 0x0000000000019800 ctl 0x0000000000019482 bmdma 0x0000000000019408 irq 16
>
> IRQ 16 is IO-APIC-fasteoi for libata, and is not shared... but all the
> others libata IRQ are IO-APIC-edge.
Ok, that's interesting, although IO-APIC-fasteoi certainly works for
others (eg me), but it's still useful.
> > * Does giving 'acpi=off' or 'irqpoll' make any difference?
> >
> > * Can you connect a harddisk to the channel and see whether
> > that works?
>
> Tried that.. Disk is identified as ATA-7: Mastor 6Y080L0, YAR41BW0, max
> UDMA/13 and then timeout again...
>
> Tried then with acpi=off, same result (identify is OK, but then timeout),
> and irqpoll and then it was OK !!!!
Whee... There were no changes that looked interrupt-related there..
Linus
^ permalink raw reply [flat|nested] 263+ messages in thread
* RE: [git patches] libata fixes
2007-03-11 16:43 ` Linus Torvalds
@ 2007-03-11 18:34 ` Paul Rolland
2007-03-11 19:20 ` Paul Rolland
2007-03-11 20:04 ` Linus Torvalds
0 siblings, 2 replies; 263+ messages in thread
From: Paul Rolland @ 2007-03-11 18:34 UTC (permalink / raw)
To: 'Linus Torvalds'
Cc: 'Tejun Heo', 'Jeff Garzik',
'Andrew Morton', linux-ide, 'LKML',
'Eric D. Mudama'
[-- Attachment #1: Type: text/plain, Size: 1818 bytes --]
Hello,
> do I understand correctly that the *only* difference between
> the working
> setup is that you applied (by hand) the libata patch that
> Jeff sent out?
>
> So plain 2.6.21-rc2 works fine, but with the patch applied,
> you get no
> interrupts on the DVD drive?
Nope... I tried several patches from Tejun, and also some that Jeff posted
to linux-ide, but no luck. The only way to have this DVD-RW working is to
use irqpoll on the command line...
Sorry to have been unclear....
To complete, here are some more output from the machine :
- a dmesg without irqpoll,
- a dmesg with irqpoll,
- a copy of /proc/interrupts
6 [19:33] rol@riri:~> cat /proc/interrupts
CPU0 CPU1
0: 357022 0 IO-APIC-edge timer
1: 8 0 IO-APIC-edge i8042
4: 14 0 IO-APIC-edge serial
6: 5 0 IO-APIC-edge floppy
8: 1 0 IO-APIC-edge rtc
9: 0 0 IO-APIC-fasteoi acpi
12: 129 0 IO-APIC-edge i8042
14: 7639 0 IO-APIC-edge libata
15: 0 0 IO-APIC-edge libata
16: 0 0 IO-APIC-fasteoi libata
17: 0 0 IO-APIC-fasteoi uhci_hcd:usb3
18: 0 0 IO-APIC-fasteoi uhci_hcd:usb4
19: 204 0 IO-APIC-fasteoi uhci_hcd:usb5, HDA Intel
20: 107 0 IO-APIC-fasteoi ehci_hcd:usb1, uhci_hcd:usb2
21: 3 0 IO-APIC-fasteoi ohci1394
504: 8243 0 PCI-MSI-edge libata
505: 1 0 PCI-MSI-edge eth1
506: 386 0 PCI-MSI-edge eth0
NMI: 771 531
LOC: 569318 578684
ERR: 0
Regards,
Paul
[-- Attachment #2: dmesg-2.6.21-rc2 --]
[-- Type: application/octet-stream, Size: 31538 bytes --]
Linux version 2.6.21-rc2 (root@riri.as2917.net) (gcc version 4.0.3 (Ubuntu 4.0.3-1ubuntu5)) #4 SMP PREEMPT Sun Mar 4 19:52:39 CET 2007
Command line: root=/dev/sde1 ro ata2=noprobe console=ttyS0,9600 console=tty0 vga=extended
BIOS-provided physical RAM map:
BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
BIOS-e820: 00000000000e4000 - 0000000000100000 (reserved)
BIOS-e820: 0000000000100000 - 00000000c7f80000 (usable)
BIOS-e820: 00000000c7f80000 - 00000000c7f8e000 (ACPI data)
BIOS-e820: 00000000c7f8e000 - 00000000c7fe0000 (ACPI NVS)
BIOS-e820: 00000000c7fe0000 - 00000000c8000000 (reserved)
BIOS-e820: 00000000ffb00000 - 0000000100000000 (reserved)
Entering add_active_range(0, 0, 159) 0 entries of 256 used
Entering add_active_range(0, 256, 819072) 1 entries of 256 used
end_pfn_map = 1048576
DMI 2.4 present.
ACPI: RSDP 000FAF20, 0024 (r2 ACPIAM)
ACPI: XSDT C7F80100, 005C (r1 A_M_I_ OEMXSDT 12000608 MSFT 97)
ACPI: FACP C7F80290, 00F4 (r3 A_M_I_ OEMFACP 12000608 MSFT 97)
ACPI: DSDT C7F80410, 8FC4 (r1 A0543 A0543000 0 INTL 20060113)
ACPI: FACS C7F8E000, 0040
ACPI: APIC C7F80390, 0080 (r1 A_M_I_ OEMAPIC 12000608 MSFT 97)
ACPI: OEMB C7F8E040, 0066 (r1 A_M_I_ AMI_OEM 12000608 MSFT 97)
ACPI: HPET C7F893E0, 0038 (r1 A_M_I_ OEMHPET 12000608 MSFT 97)
ACPI: MCFG C7F89420, 003C (r1 A_M_I_ OEMMCFG 12000608 MSFT 97)
ACPI: SSDT C7F8E0B0, 01C6 (r1 AMI CPU1PM 1 INTL 20060113)
ACPI: SSDT C7F8E280, 013A (r1 AMI CPU2PM 1 INTL 20060113)
Entering add_active_range(0, 0, 159) 0 entries of 256 used
Entering add_active_range(0, 256, 819072) 1 entries of 256 used
Zone PFN ranges:
DMA 0 -> 4096
DMA32 4096 -> 1048576
Normal 1048576 -> 1048576
early_node_map[2] active PFN ranges
0: 0 -> 159
0: 256 -> 819072
On node 0 totalpages: 818975
DMA zone: 56 pages used for memmap
DMA zone: 1986 pages reserved
DMA zone: 1957 pages, LIFO batch:0
DMA32 zone: 11142 pages used for memmap
DMA32 zone: 803834 pages, LIFO batch:31
Normal zone: 0 pages used for memmap
ACPI: PM-Timer IO Port: 0x808
ACPI: Local APIC address 0xfee00000
ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled)
Processor #0 (Bootup-CPU)
ACPI: LAPIC (acpi_id[0x02] lapic_id[0x01] enabled)
Processor #1
ACPI: LAPIC (acpi_id[0x03] lapic_id[0x82] disabled)
ACPI: LAPIC (acpi_id[0x04] lapic_id[0x83] disabled)
ACPI: IOAPIC (id[0x02] address[0xfec00000] gsi_base[0])
IOAPIC[0]: apic_id 2, address 0xfec00000, GSI 0-23
ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
ACPI: IRQ0 used by override.
ACPI: IRQ2 used by override.
ACPI: IRQ9 used by override.
Setting APIC routing to flat
ACPI: HPET id: 0x8086a201 base: 0xfed00000
Using ACPI (MADT) for SMP configuration information
Nosave address range: 000000000009f000 - 00000000000a0000
Nosave address range: 00000000000a0000 - 00000000000e4000
Nosave address range: 00000000000e4000 - 0000000000100000
Allocating PCI resources starting at cc000000 (gap: c8000000:37b00000)
PERCPU: Allocating 34368 bytes of per cpu data
Built 1 zonelists. Total pages: 805791
Kernel command line: root=/dev/sde1 ro ata2=noprobe console=ttyS0,9600 console=tty0 vga=extended
Initializing CPU#0
PID hash table entries: 4096 (order: 12, 32768 bytes)
time.c: Detected 2400.083 MHz processor.
Console: colour VGA+ 80x50
Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes)
Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes)
Checking aperture...
Memory: 3216500k/3276288k available (4563k kernel code, 59172k reserved, 2317k data, 296k init)
Calibrating delay using timer specific routine.. 4802.77 BogoMIPS (lpj=2401386)
Security Framework v1.0.0 initialized
Capability LSM initialized
Failure registering Root Plug module with the kernel
Failure registering Root Plug module with primary security module.
Mount-cache hash table entries: 256
CPU: L1 I cache: 32K, L1 D cache: 32K
CPU: L2 cache: 4096K
using mwait in idle threads.
CPU: Physical Processor ID: 0
CPU: Processor Core ID: 0
CPU0: Thermal monitoring enabled (TM2)
Freeing SMP alternatives: 40k freed
ACPI: Core revision 20070126
Using local APIC timer interrupts.
result 10130463
Detected 10.130 MHz APIC timer.
Booting processor 1/2 APIC 0x1
Initializing CPU#1
Calibrating delay using timer specific routine.. 4800.35 BogoMIPS (lpj=2400179)
CPU: L1 I cache: 32K, L1 D cache: 32K
CPU: L2 cache: 4096K
CPU: Physical Processor ID: 0
CPU: Processor Core ID: 1
CPU1: Thermal monitoring enabled (TM2)
Intel(R) Core(TM)2 CPU 6600 @ 2.40GHz stepping 06
checking TSC synchronization [CPU#0 -> CPU#1]: passed.
Brought up 2 CPUs
testing NMI watchdog ... OK.
migration_cost=21
NET: Registered protocol family 16
ACPI: bus type pci registered
PCI: BIOS Bug: MCFG area at f0000000 is not E820-reserved
PCI: Not using MMCONFIG.
PCI: Using configuration type 1
ACPI: Interpreter enabled
ACPI: Using IOAPIC for interrupt routing
ACPI: PCI Root Bridge [PCI0] (0000:00)
PCI: Probing PCI hardware (bus 00)
PCI quirk: region 0800-087f claimed by ICH6 ACPI/GPIO/TCO
PCI quirk: region 0480-04bf claimed by ICH6 GPIO
Boot video device is 0000:06:00.0
PCI: Transparent bridge - 0000:00:1e.0
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.P0P1._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.P0P3._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.P0P4._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.P0P7._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.P0P8._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.P0P9._PRT]
ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 7 10 *11 12 14 15)
ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 6 7 *10 11 12 14 15)
ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 5 6 *7 10 11 12 14 15)
ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 *5 6 7 10 11 12 14 15)
ACPI: PCI Interrupt Link [LNKE] (IRQs *3 4 5 6 7 10 11 12 14 15)
ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 *5 6 7 10 11 12 14 15)
ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 5 6 7 10 *11 12 14 15)
ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 5 6 7 *10 11 12 14 15)
Linux Plug and Play Support v0.97 (c) Adam Belay
pnp: PnP ACPI init
pnp: PnP ACPI: found 16 devices
SCSI subsystem initialized
libata version 2.20 loaded.
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
PCI: Using ACPI for IRQ routing
PCI: If a device doesn't work, try "pci=routeirq". If it helps, post a report
PCI: Cannot allocate resource region 2 of device 0000:02:00.0
PCI: Cannot allocate resource region 3 of device 0000:02:00.0
PCI-GART: No AMD northbridge found.
hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0
hpet0: 3 64-bit timers, 14318180 Hz
pnp: 00:01: iomem range 0xfed13000-0xfed19fff has been reserved
pnp: 00:07: ioport range 0x290-0x297 has been reserved
pnp: 00:08: iomem range 0xfed1c000-0xfed1ffff has been reserved
pnp: 00:08: iomem range 0xfed20000-0xfed3ffff has been reserved
pnp: 00:08: iomem range 0xfed50000-0xfed8ffff has been reserved
pnp: 00:08: iomem range 0xffb00000-0xffbfffff has been reserved
pnp: 00:0c: iomem range 0xfec00000-0xfec00fff has been reserved
pnp: 00:0c: iomem range 0xfee00000-0xfee00fff has been reserved
pnp: 00:0e: iomem range 0xf0000000-0xf3ffffff has been reserved
pnp: 00:0f: iomem range 0x0-0x9ffff could not be reserved
pnp: 00:0f: iomem range 0xc0000-0xdffff has been reserved
pnp: 00:0f: iomem range 0xe0000-0xfffff could not be reserved
pnp: 00:0f: iomem range 0x100000-0xc7ffffff could not be reserved
ieee1394: Initialized config rom entry `ip1394'
ACPI: PCI Interrupt 0000:01:03.0[A] -> GSI 21 (level, low) -> IRQ 21
ohci1394: fw-host0: OHCI-1394 1.1 (PCI): IRQ=[21] MMIO=[ff5ef800-ff5effff] Max Packet=[2048] IR/IT contexts=[4/8]
PCI: Bridge: 0000:00:01.0
IO window: c000-cfff
MEM window: ff900000-ff9fffff
PREFETCH window: cff00000-efefffff
PCI: Bridge: 0000:00:1c.0
IO window: disabled.
MEM window: disabled.
PREFETCH window: cfe00000-cfefffff
PCI: Bridge: 0000:00:1c.3
IO window: b000-bfff
MEM window: ff800000-ff8fffff
PREFETCH window: disabled.
PCI: Bridge: 0000:00:1c.4
IO window: a000-afff
MEM window: ff700000-ff7fffff
PREFETCH window: disabled.
PCI: Bridge: 0000:00:1c.5
IO window: 9000-9fff
MEM window: ff600000-ff6fffff
PREFETCH window: disabled.
PCI: Bridge: 0000:00:1e.0
IO window: 8000-8fff
MEM window: ff500000-ff5fffff
PREFETCH window: disabled.
ACPI: PCI Interrupt 0000:00:01.0[A] -> GSI 16 (level, low) -> IRQ 16
PCI: Setting latency timer of device 0000:00:01.0 to 64
ACPI: PCI Interrupt 0000:00:1c.0[A] -> GSI 16 (level, low) -> IRQ 16
PCI: Setting latency timer of device 0000:00:1c.0 to 64
ACPI: PCI Interrupt 0000:00:1c.3[D] -> GSI 19 (level, low) -> IRQ 19
PCI: Setting latency timer of device 0000:00:1c.3 to 64
ACPI: PCI Interrupt 0000:00:1c.4[A] -> GSI 16 (level, low) -> IRQ 16
PCI: Setting latency timer of device 0000:00:1c.4 to 64
ACPI: PCI Interrupt 0000:00:1c.5[B] -> GSI 17 (level, low) -> IRQ 17
PCI: Setting latency timer of device 0000:00:1c.5 to 64
PCI: Setting latency timer of device 0000:00:1e.0 to 64
NET: Registered protocol family 2
IP route cache hash table entries: 131072 (order: 8, 1048576 bytes)
TCP established hash table entries: 131072 (order: 9, 3145728 bytes)
ieee1394: Host added: ID:BUS[0-00:1023] GUID[0011d80000fefb23]
TCP bind hash table entries: 65536 (order: 8, 1048576 bytes)
TCP: Hash tables configured (established 131072 bind 65536)
TCP reno registered
IA-32 Microcode Update Driver: v1.14a <tigran@aivazian.fsnet.co.uk>
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
NTFS driver 2.1.28 [Flags: R/W].
fuse init (API version 7.8)
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
PCI: Setting latency timer of device 0000:00:01.0 to 64
assign_interrupt_mode Found MSI capability
Allocate Port Service[0000:00:01.0:pcie00]
PCI: Setting latency timer of device 0000:00:1c.0 to 64
assign_interrupt_mode Found MSI capability
Allocate Port Service[0000:00:1c.0:pcie00]
Allocate Port Service[0000:00:1c.0:pcie02]
PCI: Setting latency timer of device 0000:00:1c.3 to 64
assign_interrupt_mode Found MSI capability
Allocate Port Service[0000:00:1c.3:pcie00]
PCI: Setting latency timer of device 0000:00:1c.4 to 64
assign_interrupt_mode Found MSI capability
Allocate Port Service[0000:00:1c.4:pcie00]
PCI: Setting latency timer of device 0000:00:1c.5 to 64
assign_interrupt_mode Found MSI capability
Allocate Port Service[0000:00:1c.5:pcie00]
input: Power Button (FF) as /class/input/input0
ACPI: Power Button (FF) [PWRF]
input: Power Button (CM) as /class/input/input1
ACPI: Power Button (CM) [PWRB]
ACPI Warning (tbutils-0158): Incorrect checksum in table [OEMB] - 78, should be 6F [20070126]
ACPI Error (psparse-0537): Method parse/execution failed [\_PR_.CPU1._OSC] (Node ffff81000424cb30), AE_ALREADY_EXISTS
ACPI: Marking method _OSC as Serialized
ACPI Error (psparse-0537): Method parse/execution failed [\_PR_.CPU1._PDC] (Node ffff81000424cb50), AE_ALREADY_EXISTS
ACPI: Marking method _PDC as Serialized
ACPI: Processor [CPU1] (supports 8 throttling states)
ACPI Error (psparse-0537): Method parse/execution failed [\_PR_.CPU2._OSC] (Node ffff81000424ca10), AE_ALREADY_EXISTS
ACPI: Marking method _OSC as Serialized
ACPI Error (psparse-0537): Method parse/execution failed [\_PR_.CPU2._PDC] (Node ffff81000424ca30), AE_ALREADY_EXISTS
ACPI: Marking method _PDC as Serialized
ACPI: Processor [CPU2] (supports 8 throttling states)
Real Time Clock Driver v1.12ac
hpet_resources: 0xfed00000 is busy
Non-volatile memory driver v1.2
intel_rng: FWH not detected
iTCO_wdt: Intel TCO WatchDog Timer Driver v1.01 (21-Jan-2007)
iTCO_wdt: Found a ICH7 or ICH7R TCO device (Version=2, TCOBASE=0x0860)
iTCO_wdt: initialized. heartbeat=30 sec (nowayout=0)
iTCO_vendor_support: vendor-support=0
Linux agpgart interface v0.102 (c) Dave Jones
[drm] Initialized drm 1.1.0 20060810
Hangcheck: starting hangcheck timer 0.9.0 (tick is 180 seconds, margin is 60 seconds).
Hangcheck: Using get_cycles().
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
00:0d: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
Floppy drive(s): fd0 is 1.44M
FDC 0 is a post-1991 82077
RAMDISK driver initialized: 16 RAM disks of 65536K size 1024 blocksize
loop: loaded (max 8 devices)
nbd: registered device at major 43
ACPI: PCI Interrupt 0000:04:00.0[A] -> GSI 19 (level, low) -> IRQ 19
PCI: Setting latency timer of device 0000:04:00.0 to 64
sky2 0000:04:00.0: v1.13 addr 0xff8fc000 irq 19 Yukon-EC (0xb6) rev 2
sky2 eth0: addr 00:18:f3:e0:5d:d4
ACPI: PCI Interrupt 0000:03:00.0[A] -> GSI 16 (level, low) -> IRQ 16
PCI: Setting latency timer of device 0000:03:00.0 to 64
sky2 0000:03:00.0: v1.13 addr 0xff7fc000 irq 16 Yukon-EC (0xb6) rev 2
sky2 eth1: addr 00:18:f3:e0:36:fd
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
PPP BSD Compression module registered
PPP MPPE Compression module registered
Equalizer2002: Simon Janes (simon@ncm.com) and David S. Miller (davem@redhat.com)
tun: Universal TUN/TAP device driver, 1.6
tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
ahci 0000:00:1f.2: version 2.1
ACPI: PCI Interrupt 0000:00:1f.2[B] -> GSI 23 (level, low) -> IRQ 23
PCI: Setting latency timer of device 0000:00:1f.2 to 64
ahci 0000:00:1f.2: AHCI 0001.0100 32 slots 4 ports 3 Gbps 0xf impl SATA mode
ahci 0000:00:1f.2: flags: 64bit ncq led clo pio slum part
ata1: SATA max UDMA/133 cmd 0xffffc2000008a900 ctl 0x0000000000000000 bmdma 0x0000000000000000 irq 504
ata2: SATA max UDMA/133 cmd 0xffffc2000008a980 ctl 0x0000000000000000 bmdma 0x0000000000000000 irq 504
ata3: SATA max UDMA/133 cmd 0xffffc2000008aa00 ctl 0x0000000000000000 bmdma 0x0000000000000000 irq 504
ata4: SATA max UDMA/133 cmd 0xffffc2000008aa80 ctl 0x0000000000000000 bmdma 0x0000000000000000 irq 504
scsi0 : ahci
ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
ata1.00: ATA-7: Maxtor 6L250S0, BANC1G10, max UDMA/133
ata1.00: 490234752 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata1.00: configured for UDMA/133
scsi1 : ahci
ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata2.00: qc timeout (cmd 0xec)
ata2.00: failed to IDENTIFY (I/O error, err_mask=0x104)
ata2: port is slow to respond, please be patient (Status 0x80)
ata2: port failed to respond (30 secs, Status 0x80)
ata2: COMRESET failed (device not ready)
ata2: hardreset failed, retrying in 5 secs
ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata2.00: ATA-6: Config Disk, RGL10364, max UDMA/133
ata2.00: 640 sectors, multi 1: LBA
ata2.00: configured for UDMA/133
scsi2 : ahci
ata3: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
ata3.00: ATA-7: Maxtor 6L250S0, BANC1G10, max UDMA/133
ata3.00: 490234752 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata3.00: configured for UDMA/133
scsi3 : ahci
ata4: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata4.00: ATA-7: ST3500641AS, 3.AAB, max UDMA/133
ata4.00: 976773168 sectors, multi 16: LBA48 NCQ (depth 31/32)
ata4.00: configured for UDMA/133
scsi 0:0:0:0: Direct-Access ATA Maxtor 6L250S0 BANC PQ: 0 ANSI: 5
SCSI device sda: 490234752 512-byte hdwr sectors (251000 MB)
sda: Write Protect is off
sda: Mode Sense: 00 3a 00 00
SCSI device sda: write cache: enabled, read cache: enabled, doesn't support DPO or FUA
SCSI device sda: 490234752 512-byte hdwr sectors (251000 MB)
sda: Write Protect is off
sda: Mode Sense: 00 3a 00 00
SCSI device sda: write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sda: sda1 sda2 sda3
sd 0:0:0:0: Attached scsi disk sda
sd 0:0:0:0: Attached scsi generic sg0 type 0
scsi 1:0:0:0: Direct-Access ATA Config Disk RGL1 PQ: 0 ANSI: 5
SCSI device sdb: 640 512-byte hdwr sectors (0 MB)
sdb: Write Protect is off
sdb: Mode Sense: 00 3a 00 00
SCSI device sdb: write cache: disabled, read cache: enabled, doesn't support DPO or FUA
SCSI device sdb: 640 512-byte hdwr sectors (0 MB)
sdb: Write Protect is off
sdb: Mode Sense: 00 3a 00 00
SCSI device sdb: write cache: disabled, read cache: enabled, doesn't support DPO or FUA
sdb: unknown partition table
sd 1:0:0:0: Attached scsi disk sdb
sd 1:0:0:0: Attached scsi generic sg1 type 0
scsi 2:0:0:0: Direct-Access ATA Maxtor 6L250S0 BANC PQ: 0 ANSI: 5
SCSI device sdc: 490234752 512-byte hdwr sectors (251000 MB)
sdc: Write Protect is off
sdc: Mode Sense: 00 3a 00 00
SCSI device sdc: write cache: enabled, read cache: enabled, doesn't support DPO or FUA
SCSI device sdc: 490234752 512-byte hdwr sectors (251000 MB)
sdc: Write Protect is off
sdc: Mode Sense: 00 3a 00 00
SCSI device sdc: write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sdc: sdc1 sdc2
sd 2:0:0:0: Attached scsi disk sdc
sd 2:0:0:0: Attached scsi generic sg2 type 0
scsi 3:0:0:0: Direct-Access ATA ST3500641AS 3.AA PQ: 0 ANSI: 5
SCSI device sdd: 976773168 512-byte hdwr sectors (500108 MB)
sdd: Write Protect is off
sdd: Mode Sense: 00 3a 00 00
SCSI device sdd: write cache: enabled, read cache: enabled, doesn't support DPO or FUA
SCSI device sdd: 976773168 512-byte hdwr sectors (500108 MB)
sdd: Write Protect is off
sdd: Mode Sense: 00 3a 00 00
SCSI device sdd: write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sdd: sdd1 sdd2 sdd3
sd 3:0:0:0: Attached scsi disk sdd
sd 3:0:0:0: Attached scsi generic sg3 type 0
PCI: Device 0000:02:00.0 not available because of resource collisions
ahci: probe of 0000:02:00.0 failed with error -22
ata_piix 0000:00:1f.1: version 2.10
ACPI: PCI Interrupt 0000:00:1f.1[A] -> GSI 22 (level, low) -> IRQ 22
PCI: Setting latency timer of device 0000:00:1f.1 to 64
ata5: PATA max UDMA/133 cmd 0x00000000000101f0 ctl 0x00000000000103f6 bmdma 0x000000000001ffa0 irq 14
ata6: PATA max UDMA/133 cmd 0x0000000000010170 ctl 0x0000000000010376 bmdma 0x000000000001ffa8 irq 15
scsi4 : ata_piix
ACPI Error (dsopcode-0481): Attempt to CreateField of length zero [20070126]
ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.IDE0.RATA] (Node ffff81000425c490), AE_AML_OPERAND_VALUE
ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.IDE0.CHN0.DRV0._GTF] (Node ffff81000425c7f0), AE_AML_OPERAND_VALUE
ata5.00: ATA-7: Maxtor 6L200P0, BAH41E00, max UDMA/133
ata5.00: 398297088 sectors, multi 16: LBA48
ACPI Error (dsopcode-0481): Attempt to CreateField of length zero [20070126]
ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.IDE0.RATA] (Node ffff81000425c490), AE_AML_OPERAND_VALUE
ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.IDE0.CHN0.DRV0._GTF] (Node ffff81000425c7f0), AE_AML_OPERAND_VALUE
ata5.01: ATAPI, max UDMA/33
ACPI Error (dsopcode-0481): Attempt to CreateField of length zero [20070126]
ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.IDE0.RATA] (Node ffff81000425c490), AE_AML_OPERAND_VALUE
ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.IDE0.CHN0.DRV0._GTF] (Node ffff81000425c7f0), AE_AML_OPERAND_VALUE
ata5.00: configured for UDMA/33
ACPI Error (dsopcode-0481): Attempt to CreateField of length zero [20070126]
ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.IDE0.RATA] (Node ffff81000425c490), AE_AML_OPERAND_VALUE
ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.IDE0.CHN0.DRV0._GTF] (Node ffff81000425c7f0), AE_AML_OPERAND_VALUE
ata5.01: configured for UDMA/33
scsi5 : ata_piix
ATA: abnormal status 0x7F on port 0x0000000000010177
scsi 4:0:0:0: Direct-Access ATA Maxtor 6L200P0 BAH4 PQ: 0 ANSI: 5
SCSI device sde: 398297088 512-byte hdwr sectors (203928 MB)
sde: Write Protect is off
sde: Mode Sense: 00 3a 00 00
SCSI device sde: write cache: enabled, read cache: enabled, doesn't support DPO or FUA
SCSI device sde: 398297088 512-byte hdwr sectors (203928 MB)
sde: Write Protect is off
sde: Mode Sense: 00 3a 00 00
SCSI device sde: write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sde: sde1 sde2 sde3 sde4 < sde5 sde6 >
sd 4:0:0:0: Attached scsi disk sde
sd 4:0:0:0: Attached scsi generic sg4 type 0
scsi 4:0:1:0: CD-ROM ASUS CRW-5232A3 1.00 PQ: 0 ANSI: 5
sr0: scsi3-mmc drive: 52x/52x writer cd/rw xa/form2 cdda tray
Uniform CD-ROM driver Revision: 3.20
sr 4:0:1:0: Attached scsi CD-ROM sr0
sr 4:0:1:0: Attached scsi generic sg5 type 5
PCI: Enabling device 0000:02:00.1 (0000 -> 0001)
ACPI: PCI Interrupt 0000:02:00.1[B] -> GSI 16 (level, low) -> IRQ 16
PCI: Setting latency timer of device 0000:02:00.1 to 64
ata7: PATA max UDMA/100 cmd 0x0000000000019c00 ctl 0x0000000000019882 bmdma 0x0000000000019400 irq 16
ata8: PATA max UDMA/100 cmd 0x0000000000019800 ctl 0x0000000000019482 bmdma 0x0000000000019408 irq 16
scsi6 : pata_jmicron
ata7.00: ATAPI, max UDMA/66
ata7.00: qc timeout (cmd 0xef)
ata7.00: failed to set xfermode (err_mask=0x4)
ata7: failed to recover some devices, retrying in 5 secs
ata7.00: qc timeout (cmd 0xef)
ata7.00: failed to set xfermode (err_mask=0x4)
ata7.00: limiting speed to UDMA/66:PIO3
ata7: failed to recover some devices, retrying in 5 secs
ata7.00: qc timeout (cmd 0xef)
ata7.00: failed to set xfermode (err_mask=0x4)
ata7.00: disabled
scsi7 : pata_jmicron
ATA: abnormal status 0x7F on port 0x0000000000019807
video1394: Installed video1394 module
ieee1394: raw1394: /dev/raw1394 device initialized
ACPI: PCI Interrupt 0000:00:1d.7[A] -> GSI 20 (level, low) -> IRQ 20
PCI: Setting latency timer of device 0000:00:1d.7 to 64
ehci_hcd 0000:00:1d.7: EHCI Host Controller
ehci_hcd 0000:00:1d.7: new USB bus registered, assigned bus number 1
ehci_hcd 0000:00:1d.7: debug port 1
PCI: cache line size of 32 is not supported by device 0000:00:1d.7
ehci_hcd 0000:00:1d.7: irq 20, io mem 0xffafbc00
ehci_hcd 0000:00:1d.7: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 8 ports detected
USB Universal Host Controller Interface driver v3.0
ACPI: PCI Interrupt 0000:00:1d.0[A] -> GSI 20 (level, low) -> IRQ 20
PCI: Setting latency timer of device 0000:00:1d.0 to 64
uhci_hcd 0000:00:1d.0: UHCI Host Controller
uhci_hcd 0000:00:1d.0: new USB bus registered, assigned bus number 2
uhci_hcd 0000:00:1d.0: irq 20, io base 0x0000e480
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
ACPI: PCI Interrupt 0000:00:1d.1[B] -> GSI 17 (level, low) -> IRQ 17
PCI: Setting latency timer of device 0000:00:1d.1 to 64
uhci_hcd 0000:00:1d.1: UHCI Host Controller
uhci_hcd 0000:00:1d.1: new USB bus registered, assigned bus number 3
uhci_hcd 0000:00:1d.1: irq 17, io base 0x0000e800
usb usb3: configuration #1 chosen from 1 choice
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 2 ports detected
ACPI: PCI Interrupt 0000:00:1d.2[C] -> GSI 18 (level, low) -> IRQ 18
PCI: Setting latency timer of device 0000:00:1d.2 to 64
uhci_hcd 0000:00:1d.2: UHCI Host Controller
uhci_hcd 0000:00:1d.2: new USB bus registered, assigned bus number 4
uhci_hcd 0000:00:1d.2: irq 18, io base 0x0000e880
usb usb4: configuration #1 chosen from 1 choice
hub 4-0:1.0: USB hub found
hub 4-0:1.0: 2 ports detected
ACPI: PCI Interrupt 0000:00:1d.3[D] -> GSI 19 (level, low) -> IRQ 19
PCI: Setting latency timer of device 0000:00:1d.3 to 64
uhci_hcd 0000:00:1d.3: UHCI Host Controller
uhci_hcd 0000:00:1d.3: new USB bus registered, assigned bus number 5
uhci_hcd 0000:00:1d.3: irq 19, io base 0x0000ec00
usb usb5: configuration #1 chosen from 1 choice
hub 5-0:1.0: USB hub found
hub 5-0:1.0: 2 ports detected
usb 1-7: new high speed USB device using ehci_hcd and address 3
usb 1-7: configuration #1 chosen from 1 choice
hub 1-7:1.0: USB hub found
hub 1-7:1.0: 4 ports detected
usb 2-2: new full speed USB device using uhci_hcd and address 2
usb 2-2: configuration #1 chosen from 1 choice
usb 1-7.3: new high speed USB device using ehci_hcd and address 4
usb 1-7.3: configuration #1 chosen from 1 choice
usbcore: registered new interface driver usblp
drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver hiddev
usbcore: registered new interface driver usbhid
drivers/usb/input/hid-core.c: v2.6:USB HID core driver
PNP: PS/2 Controller [PNP0303:PS2K,PNP0f03:PS2M] at 0x60,0x64 irq 1,12
serio: i8042 KBD port at 0x60,0x64 irq 1
serio: i8042 AUX port at 0x60,0x64 irq 12
mice: PS/2 mouse device common for all mice
input: AT Translated Set 2 keyboard as /class/input/input2
input: PC Speaker as /class/input/input3
input: ImExPS/2 Logitech MX Mouse as /class/input/input4
I2O subsystem v1.325
i2o: max drivers = 8
I2O Configuration OSM v1.323
I2O Bus Adapter OSM v1.317
I2O Block Device OSM v1.325
I2O ProcFS OSM v1.316
i2c /dev entries driver
ACPI: PCI Interrupt 0000:00:1f.3[B] -> GSI 23 (level, low) -> IRQ 23
md: linear personality registered for level -1
md: raid0 personality registered for level 0
md: raid1 personality registered for level 1
Advanced Linux Sound Architecture Driver Version 1.0.14rc2 (Wed Feb 14 07:42:13 2007 UTC).
ACPI: PCI Interrupt 0000:00:1b.0[A] -> GSI 19 (level, low) -> IRQ 19
PCI: Setting latency timer of device 0000:00:1b.0 to 64
ALSA device list:
#0: HDA Intel at 0xffafc000 irq 19
netem: version 1.2
u32 classifier
Performance counters on
OLD policer on
Netfilter messages via NETLINK v0.30.
IPv4 over IPv4 tunneling driver
GRE over IPv4 tunneling driver
TCP cubic registered
Initializing XFRM netlink socket
NET: Registered protocol family 1
NET: Registered protocol family 10
lo: Disabled Privacy Extensions
IPv6: add_dev failed for eql
tunl0: Disabled Privacy Extensions
IPv6 over IPv4 tunneling driver
sit0: Disabled Privacy Extensions
NET: Registered protocol family 17
NET: Registered protocol family 15
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
ieee80211: 802.11 data/management/control stack, git-1.1.13
ieee80211: Copyright (C) 2004-2005 Intel Corporation <jketreno@linux.intel.com>
ieee80211_crypt: registered algorithm 'NULL'
ieee80211_crypt: registered algorithm 'WEP'
ieee80211_crypt: registered algorithm 'CCMP'
ieee80211_crypt: registered algorithm 'TKIP'
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
Time: tsc clocksource has been installed.
md: Autodetecting RAID arrays.
md: autorun ...
md: ... autorun DONE.
kjournald starting. Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
VFS: Mounted root (ext3 filesystem) readonly.
Freeing unused kernel memory: 296k freed
EXT3 FS on sde1, internal journal
sky2 eth0: enabling interface
sky2 eth0: ram buffer 48K
ADDRCONF(NETDEV_UP): eth0: link is not ready
sky2 eth0: Link is up at 100 Mbps, full duplex, flow control both
ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
kjournald starting. Commit interval 5 seconds
EXT3 FS on sde6, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
kjournald starting. Commit interval 5 seconds
EXT3 FS on sde3, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
Adding 2096436k swap on /dev/sde5. Priority:-1 extents:1 across:2096436k
Adding 4192956k swap on /dev/sda3. Priority:-2 extents:1 across:4192956k
ata3.00: exception Emask 0x2 SAct 0xffff80 SErr 0x0 action 0x2 frozen
ata3.00: (spurious completion during NCQ issue=0x0 SAct=0xffff80 FIS=004040a1:00000040)
ata3.00: cmd 60/04:38:83:00:00/00:00:00:00:00/40 tag 7 cdb 0x0 data 2048 in
res 40/00:b8:c3:00:00/00:00:00:00:00/40 Emask 0x2 (HSM violation)
ata3.00: cmd 60/04:40:87:00:00/00:00:00:00:00/40 tag 8 cdb 0x0 data 2048 in
res 40/00:b8:c3:00:00/00:00:00:00:00/40 Emask 0x2 (HSM violation)
ata3.00: cmd 60/04:48:8b:00:00/00:00:00:00:00/40 tag 9 cdb 0x0 data 2048 in
res 40/00:b8:c3:00:00/00:00:00:00:00/40 Emask 0x2 (HSM violation)
ata3.00: cmd 60/04:50:8f:00:00/00:00:00:00:00/40 tag 10 cdb 0x0 data 2048 in
res 40/00:b8:c3:00:00/00:00:00:00:00/40 Emask 0x2 (HSM violation)
ata3.00: cmd 60/04:58:93:00:00/00:00:00:00:00/40 tag 11 cdb 0x0 data 2048 in
res 40/00:b8:c3:00:00/00:00:00:00:00/40 Emask 0x2 (HSM violation)
ata3.00: cmd 60/04:60:97:00:00/00:00:00:00:00/40 tag 12 cdb 0x0 data 2048 in
res 40/00:b8:c3:00:00/00:00:00:00:00/40 Emask 0x2 (HSM violation)
ata3.00: cmd 60/04:68:9b:00:00/00:00:00:00:00/40 tag 13 cdb 0x0 data 2048 in
res 40/00:b8:c3:00:00/00:00:00:00:00/40 Emask 0x2 (HSM violation)
ata3.00: cmd 60/04:70:9f:00:00/00:00:00:00:00/40 tag 14 cdb 0x0 data 2048 in
res 40/00:b8:c3:00:00/00:00:00:00:00/40 Emask 0x2 (HSM violation)
ata3.00: cmd 60/04:78:a3:00:00/00:00:00:00:00/40 tag 15 cdb 0x0 data 2048 in
res 40/00:b8:c3:00:00/00:00:00:00:00/40 Emask 0x2 (HSM violation)
ata3.00: cmd 60/04:80:a7:00:00/00:00:00:00:00/40 tag 16 cdb 0x0 data 2048 in
res 40/00:b8:c3:00:00/00:00:00:00:00/40 Emask 0x2 (HSM violation)
ata3.00: cmd 60/04:88:ab:00:00/00:00:00:00:00/40 tag 17 cdb 0x0 data 2048 in
res 40/00:b8:c3:00:00/00:00:00:00:00/40 Emask 0x2 (HSM violation)
ata3.00: cmd 60/04:90:af:00:00/00:00:00:00:00/40 tag 18 cdb 0x0 data 2048 in
res 40/00:b8:c3:00:00/00:00:00:00:00/40 Emask 0x2 (HSM violation)
ata3.00: cmd 60/04:98:b3:00:00/00:00:00:00:00/40 tag 19 cdb 0x0 data 2048 in
res 40/00:b8:c3:00:00/00:00:00:00:00/40 Emask 0x2 (HSM violation)
ata3.00: cmd 60/04:a0:b7:00:00/00:00:00:00:00/40 tag 20 cdb 0x0 data 2048 in
res 40/00:b8:c3:00:00/00:00:00:00:00/40 Emask 0x2 (HSM violation)
ata3.00: cmd 60/04:a8:bb:00:00/00:00:00:00:00/40 tag 21 cdb 0x0 data 2048 in
res 40/00:b8:c3:00:00/00:00:00:00:00/40 Emask 0x2 (HSM violation)
ata3.00: cmd 60/04:b0:bf:00:00/00:00:00:00:00/40 tag 22 cdb 0x0 data 2048 in
res 40/00:b8:c3:00:00/00:00:00:00:00/40 Emask 0x2 (HSM violation)
ata3.00: cmd 60/04:b8:c3:00:00/00:00:00:00:00/40 tag 23 cdb 0x0 data 2048 in
res 40/00:b8:c3:00:00/00:00:00:00:00/40 Emask 0x2 (HSM violation)
ata3: soft resetting port
ata3: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
ata3.00: configured for UDMA/133
ata3: EH complete
SCSI device sdc: 490234752 512-byte hdwr sectors (251000 MB)
sdc: Write Protect is off
sdc: Mode Sense: 00 3a 00 00
SCSI device sdc: write cache: enabled, read cache: enabled, doesn't support DPO or FUA
ttyS1: LSR safety check engaged!
ttyS1: LSR safety check engaged!
eth0: no IPv6 routers present
ttyS1: LSR safety check engaged!
[-- Attachment #3: dmesg-2.6.21-rc2-irqpoll-dvd --]
[-- Type: application/octet-stream, Size: 30066 bytes --]
Linux version 2.6.21-rc2 (root@riri.as2917.net) (gcc version 4.0.3 (Ubuntu 4.0.3-1ubuntu5)) #4 SMP PREEMPT Sun Mar 4 19:52:39 CET 2007
Command line: root=/dev/sde1 ro ata2=noprobe console=ttyS0,9600 console=tty0 vga=extended irqpoll
BIOS-provided physical RAM map:
BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
BIOS-e820: 00000000000e4000 - 0000000000100000 (reserved)
BIOS-e820: 0000000000100000 - 00000000c7f80000 (usable)
BIOS-e820: 00000000c7f80000 - 00000000c7f8e000 (ACPI data)
BIOS-e820: 00000000c7f8e000 - 00000000c7fe0000 (ACPI NVS)
BIOS-e820: 00000000c7fe0000 - 00000000c8000000 (reserved)
BIOS-e820: 00000000ffb00000 - 0000000100000000 (reserved)
Entering add_active_range(0, 0, 159) 0 entries of 256 used
Entering add_active_range(0, 256, 819072) 1 entries of 256 used
end_pfn_map = 1048576
DMI 2.4 present.
ACPI: RSDP 000FAF20, 0024 (r2 ACPIAM)
ACPI: XSDT C7F80100, 005C (r1 A_M_I_ OEMXSDT 12000608 MSFT 97)
ACPI: FACP C7F80290, 00F4 (r3 A_M_I_ OEMFACP 12000608 MSFT 97)
ACPI: DSDT C7F80410, 8FC4 (r1 A0543 A0543000 0 INTL 20060113)
ACPI: FACS C7F8E000, 0040
ACPI: APIC C7F80390, 0080 (r1 A_M_I_ OEMAPIC 12000608 MSFT 97)
ACPI: OEMB C7F8E040, 0066 (r1 A_M_I_ AMI_OEM 12000608 MSFT 97)
ACPI: HPET C7F893E0, 0038 (r1 A_M_I_ OEMHPET 12000608 MSFT 97)
ACPI: MCFG C7F89420, 003C (r1 A_M_I_ OEMMCFG 12000608 MSFT 97)
ACPI: SSDT C7F8E0B0, 01C6 (r1 AMI CPU1PM 1 INTL 20060113)
ACPI: SSDT C7F8E280, 013A (r1 AMI CPU2PM 1 INTL 20060113)
Entering add_active_range(0, 0, 159) 0 entries of 256 used
Entering add_active_range(0, 256, 819072) 1 entries of 256 used
Zone PFN ranges:
DMA 0 -> 4096
DMA32 4096 -> 1048576
Normal 1048576 -> 1048576
early_node_map[2] active PFN ranges
0: 0 -> 159
0: 256 -> 819072
On node 0 totalpages: 818975
DMA zone: 56 pages used for memmap
DMA zone: 1986 pages reserved
DMA zone: 1957 pages, LIFO batch:0
DMA32 zone: 11142 pages used for memmap
DMA32 zone: 803834 pages, LIFO batch:31
Normal zone: 0 pages used for memmap
ACPI: PM-Timer IO Port: 0x808
ACPI: Local APIC address 0xfee00000
ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled)
Processor #0 (Bootup-CPU)
ACPI: LAPIC (acpi_id[0x02] lapic_id[0x01] enabled)
Processor #1
ACPI: LAPIC (acpi_id[0x03] lapic_id[0x82] disabled)
ACPI: LAPIC (acpi_id[0x04] lapic_id[0x83] disabled)
ACPI: IOAPIC (id[0x02] address[0xfec00000] gsi_base[0])
IOAPIC[0]: apic_id 2, address 0xfec00000, GSI 0-23
ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
ACPI: IRQ0 used by override.
ACPI: IRQ2 used by override.
ACPI: IRQ9 used by override.
Setting APIC routing to flat
ACPI: HPET id: 0x8086a201 base: 0xfed00000
Using ACPI (MADT) for SMP configuration information
Nosave address range: 000000000009f000 - 00000000000a0000
Nosave address range: 00000000000a0000 - 00000000000e4000
Nosave address range: 00000000000e4000 - 0000000000100000
Allocating PCI resources starting at cc000000 (gap: c8000000:37b00000)
PERCPU: Allocating 34368 bytes of per cpu data
Built 1 zonelists. Total pages: 805791
Kernel command line: root=/dev/sde1 ro ata2=noprobe console=ttyS0,9600 console=tty0 vga=extended irqpoll
Misrouted IRQ fixup and polling support enabled
This may significantly impact system performance
Initializing CPU#0
PID hash table entries: 4096 (order: 12, 32768 bytes)
time.c: Detected 2400.083 MHz processor.
Console: colour VGA+ 80x50
Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes)
Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes)
Checking aperture...
Memory: 3216500k/3276288k available (4563k kernel code, 59172k reserved, 2317k data, 296k init)
Calibrating delay using timer specific routine.. 4817.98 BogoMIPS (lpj=2408991)
Security Framework v1.0.0 initialized
Capability LSM initialized
Failure registering Root Plug module with the kernel
Failure registering Root Plug module with primary security module.
Mount-cache hash table entries: 256
CPU: L1 I cache: 32K, L1 D cache: 32K
CPU: L2 cache: 4096K
using mwait in idle threads.
CPU: Physical Processor ID: 0
CPU: Processor Core ID: 0
CPU0: Thermal monitoring enabled (TM2)
Freeing SMP alternatives: 40k freed
ACPI: Core revision 20070126
Using local APIC timer interrupts.
result 16667239
Detected 16.667 MHz APIC timer.
Booting processor 1/2 APIC 0x1
Initializing CPU#1
Calibrating delay using timer specific routine.. 4800.38 BogoMIPS (lpj=2400190)
CPU: L1 I cache: 32K, L1 D cache: 32K
CPU: L2 cache: 4096K
CPU: Physical Processor ID: 0
CPU: Processor Core ID: 1
CPU1: Thermal monitoring enabled (TM2)
Intel(R) Core(TM)2 CPU 6600 @ 2.40GHz stepping 06
checking TSC synchronization [CPU#0 -> CPU#1]: passed.
Brought up 2 CPUs
testing NMI watchdog ... OK.
migration_cost=24
NET: Registered protocol family 16
ACPI: bus type pci registered
PCI: BIOS Bug: MCFG area at f0000000 is not E820-reserved
PCI: Not using MMCONFIG.
PCI: Using configuration type 1
ACPI: Interpreter enabled
ACPI: Using IOAPIC for interrupt routing
ACPI: PCI Root Bridge [PCI0] (0000:00)
PCI: Probing PCI hardware (bus 00)
PCI quirk: region 0800-087f claimed by ICH6 ACPI/GPIO/TCO
PCI quirk: region 0480-04bf claimed by ICH6 GPIO
Boot video device is 0000:06:00.0
PCI: Transparent bridge - 0000:00:1e.0
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.P0P1._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.P0P3._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.P0P4._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.P0P7._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.P0P8._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.P0P9._PRT]
ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 7 10 *11 12 14 15)
ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 6 7 *10 11 12 14 15)
ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 5 6 *7 10 11 12 14 15)
ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 *5 6 7 10 11 12 14 15)
ACPI: PCI Interrupt Link [LNKE] (IRQs *3 4 5 6 7 10 11 12 14 15)
ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 *5 6 7 10 11 12 14 15)
ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 5 6 7 10 *11 12 14 15)
ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 5 6 7 *10 11 12 14 15)
Linux Plug and Play Support v0.97 (c) Adam Belay
pnp: PnP ACPI init
pnp: PnP ACPI: found 15 devices
SCSI subsystem initialized
libata version 2.20 loaded.
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
PCI: Using ACPI for IRQ routing
PCI: If a device doesn't work, try "pci=routeirq". If it helps, post a report
PCI: Cannot allocate resource region 2 of device 0000:02:00.0
PCI: Cannot allocate resource region 3 of device 0000:02:00.0
PCI-GART: No AMD northbridge found.
hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0
hpet0: 3 64-bit timers, 14318180 Hz
pnp: 00:01: iomem range 0xfed13000-0xfed19fff has been reserved
pnp: 00:07: ioport range 0x290-0x297 has been reserved
pnp: 00:08: iomem range 0xfed1c000-0xfed1ffff has been reserved
pnp: 00:08: iomem range 0xfed20000-0xfed3ffff has been reserved
pnp: 00:08: iomem range 0xfed50000-0xfed8ffff has been reserved
pnp: 00:08: iomem range 0xffb00000-0xffbfffff has been reserved
pnp: 00:0b: iomem range 0xfec00000-0xfec00fff has been reserved
pnp: 00:0b: iomem range 0xfee00000-0xfee00fff has been reserved
pnp: 00:0d: iomem range 0xf0000000-0xf3ffffff has been reserved
pnp: 00:0e: iomem range 0x0-0x9ffff could not be reserved
pnp: 00:0e: iomem range 0xc0000-0xdffff has been reserved
pnp: 00:0e: iomem range 0xe0000-0xfffff could not be reserved
pnp: 00:0e: iomem range 0x100000-0xc7ffffff could not be reserved
ieee1394: Initialized config rom entry `ip1394'
ACPI: PCI Interrupt 0000:01:03.0[A] -> GSI 21 (level, low) -> IRQ 21
ohci1394: fw-host0: OHCI-1394 1.1 (PCI): IRQ=[21] MMIO=[ff5ef800-ff5effff] Max Packet=[2048] IR/IT contexts=[4/8]
PCI: Bridge: 0000:00:01.0
IO window: c000-cfff
MEM window: ff900000-ff9fffff
PREFETCH window: cff00000-efefffff
PCI: Bridge: 0000:00:1c.0
IO window: disabled.
MEM window: disabled.
PREFETCH window: cfe00000-cfefffff
PCI: Bridge: 0000:00:1c.3
IO window: b000-bfff
MEM window: ff800000-ff8fffff
PREFETCH window: disabled.
PCI: Bridge: 0000:00:1c.4
IO window: a000-afff
MEM window: ff700000-ff7fffff
PREFETCH window: disabled.
PCI: Bridge: 0000:00:1c.5
IO window: 9000-9fff
MEM window: ff600000-ff6fffff
PREFETCH window: disabled.
PCI: Bridge: 0000:00:1e.0
IO window: 8000-8fff
MEM window: ff500000-ff5fffff
PREFETCH window: disabled.
ACPI: PCI Interrupt 0000:00:01.0[A] -> GSI 16 (level, low) -> IRQ 16
PCI: Setting latency timer of device 0000:00:01.0 to 64
ACPI: PCI Interrupt 0000:00:1c.0[A] -> GSI 16 (level, low) -> IRQ 16
PCI: Setting latency timer of device 0000:00:1c.0 to 64
ACPI: PCI Interrupt 0000:00:1c.3[D] -> GSI 19 (level, low) -> IRQ 19
PCI: Setting latency timer of device 0000:00:1c.3 to 64
ACPI: PCI Interrupt 0000:00:1c.4[A] -> GSI 16 (level, low) -> IRQ 16
PCI: Setting latency timer of device 0000:00:1c.4 to 64
ACPI: PCI Interrupt 0000:00:1c.5[B] -> GSI 17 (level, low) -> IRQ 17
PCI: Setting latency timer of device 0000:00:1c.5 to 64
PCI: Setting latency timer of device 0000:00:1e.0 to 64
NET: Registered protocol family 2
IP route cache hash table entries: 131072 (order: 8, 1048576 bytes)
TCP established hash table entries: 131072 (order: 9, 3145728 bytes)
ieee1394: Host added: ID:BUS[0-00:1023] GUID[0011d80000fefb23]
TCP bind hash table entries: 65536 (order: 8, 1048576 bytes)
TCP: Hash tables configured (established 131072 bind 65536)
TCP reno registered
IA-32 Microcode Update Driver: v1.14a <tigran@aivazian.fsnet.co.uk>
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
NTFS driver 2.1.28 [Flags: R/W].
fuse init (API version 7.8)
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
PCI: Setting latency timer of device 0000:00:01.0 to 64
assign_interrupt_mode Found MSI capability
Allocate Port Service[0000:00:01.0:pcie00]
PCI: Setting latency timer of device 0000:00:1c.0 to 64
assign_interrupt_mode Found MSI capability
Allocate Port Service[0000:00:1c.0:pcie00]
Allocate Port Service[0000:00:1c.0:pcie02]
PCI: Setting latency timer of device 0000:00:1c.3 to 64
assign_interrupt_mode Found MSI capability
Allocate Port Service[0000:00:1c.3:pcie00]
PCI: Setting latency timer of device 0000:00:1c.4 to 64
assign_interrupt_mode Found MSI capability
Allocate Port Service[0000:00:1c.4:pcie00]
PCI: Setting latency timer of device 0000:00:1c.5 to 64
assign_interrupt_mode Found MSI capability
Allocate Port Service[0000:00:1c.5:pcie00]
input: Power Button (FF) as /class/input/input0
ACPI: Power Button (FF) [PWRF]
input: Power Button (CM) as /class/input/input1
ACPI: Power Button (CM) [PWRB]
ACPI Warning (tbutils-0158): Incorrect checksum in table [OEMB] - 88, should be 7F [20070126]
ACPI Error (psparse-0537): Method parse/execution failed [\_PR_.CPU1._OSC] (Node ffff81000424cb30), AE_ALREADY_EXISTS
ACPI: Marking method _OSC as Serialized
ACPI Error (psparse-0537): Method parse/execution failed [\_PR_.CPU1._PDC] (Node ffff81000424cb50), AE_ALREADY_EXISTS
ACPI: Marking method _PDC as Serialized
ACPI: Processor [CPU1] (supports 8 throttling states)
ACPI Error (psparse-0537): Method parse/execution failed [\_PR_.CPU2._OSC] (Node ffff81000424ca10), AE_ALREADY_EXISTS
ACPI: Marking method _OSC as Serialized
ACPI Error (psparse-0537): Method parse/execution failed [\_PR_.CPU2._PDC] (Node ffff81000424ca30), AE_ALREADY_EXISTS
ACPI: Marking method _PDC as Serialized
ACPI: Processor [CPU2] (supports 8 throttling states)
Real Time Clock Driver v1.12ac
hpet_resources: 0xfed00000 is busy
Non-volatile memory driver v1.2
intel_rng: FWH not detected
iTCO_wdt: Intel TCO WatchDog Timer Driver v1.01 (21-Jan-2007)
iTCO_wdt: Found a ICH7 or ICH7R TCO device (Version=2, TCOBASE=0x0860)
iTCO_wdt: initialized. heartbeat=30 sec (nowayout=0)
iTCO_vendor_support: vendor-support=0
Linux agpgart interface v0.102 (c) Dave Jones
[drm] Initialized drm 1.1.0 20060810
Hangcheck: starting hangcheck timer 0.9.0 (tick is 180 seconds, margin is 60 seconds).
Hangcheck: Using get_cycles().
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
00:0c: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
Floppy drive(s): fd0 is 1.44M
FDC 0 is a post-1991 82077
RAMDISK driver initialized: 16 RAM disks of 65536K size 1024 blocksize
loop: loaded (max 8 devices)
nbd: registered device at major 43
ACPI: PCI Interrupt 0000:04:00.0[A] -> GSI 19 (level, low) -> IRQ 19
PCI: Setting latency timer of device 0000:04:00.0 to 64
sky2 0000:04:00.0: v1.13 addr 0xff8fc000 irq 19 Yukon-EC (0xb6) rev 2
sky2 eth0: addr 00:18:f3:e0:5d:d4
ACPI: PCI Interrupt 0000:03:00.0[A] -> GSI 16 (level, low) -> IRQ 16
PCI: Setting latency timer of device 0000:03:00.0 to 64
sky2 0000:03:00.0: v1.13 addr 0xff7fc000 irq 16 Yukon-EC (0xb6) rev 2
sky2 eth1: addr 00:18:f3:e0:36:fd
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
PPP BSD Compression module registered
PPP MPPE Compression module registered
Equalizer2002: Simon Janes (simon@ncm.com) and David S. Miller (davem@redhat.com)
tun: Universal TUN/TAP device driver, 1.6
tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
ahci 0000:00:1f.2: version 2.1
ACPI: PCI Interrupt 0000:00:1f.2[B] -> GSI 23 (level, low) -> IRQ 23
PCI: Setting latency timer of device 0000:00:1f.2 to 64
ahci 0000:00:1f.2: AHCI 0001.0100 32 slots 4 ports 3 Gbps 0xf impl SATA mode
ahci 0000:00:1f.2: flags: 64bit ncq led clo pio slum part
ata1: SATA max UDMA/133 cmd 0xffffc2000008a900 ctl 0x0000000000000000 bmdma 0x0000000000000000 irq 504
ata2: SATA max UDMA/133 cmd 0xffffc2000008a980 ctl 0x0000000000000000 bmdma 0x0000000000000000 irq 504
ata3: SATA max UDMA/133 cmd 0xffffc2000008aa00 ctl 0x0000000000000000 bmdma 0x0000000000000000 irq 504
ata4: SATA max UDMA/133 cmd 0xffffc2000008aa80 ctl 0x0000000000000000 bmdma 0x0000000000000000 irq 504
scsi0 : ahci
ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
ata1.00: ATA-7: Maxtor 6L250S0, BANC1G10, max UDMA/133
ata1.00: 490234752 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata1.00: configured for UDMA/133
scsi1 : ahci
ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata2.00: qc timeout (cmd 0xec)
ata2.00: failed to IDENTIFY (I/O error, err_mask=0x104)
ata2: port is slow to respond, please be patient (Status 0x80)
ata2: port failed to respond (30 secs, Status 0x80)
ata2: COMRESET failed (device not ready)
ata2: hardreset failed, retrying in 5 secs
ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata2.00: ATA-6: Config Disk, RGL10364, max UDMA/133
ata2.00: 640 sectors, multi 1: LBA
ata2.00: configured for UDMA/133
scsi2 : ahci
ata3: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
ata3.00: ATA-7: Maxtor 6L250S0, BANC1G10, max UDMA/133
ata3.00: 490234752 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata3.00: configured for UDMA/133
scsi3 : ahci
ata4: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata4.00: ATA-7: ST3500641AS, 3.AAB, max UDMA/133
ata4.00: 976773168 sectors, multi 16: LBA48 NCQ (depth 31/32)
ata4.00: configured for UDMA/133
scsi 0:0:0:0: Direct-Access ATA Maxtor 6L250S0 BANC PQ: 0 ANSI: 5
SCSI device sda: 490234752 512-byte hdwr sectors (251000 MB)
sda: Write Protect is off
sda: Mode Sense: 00 3a 00 00
SCSI device sda: write cache: enabled, read cache: enabled, doesn't support DPO or FUA
SCSI device sda: 490234752 512-byte hdwr sectors (251000 MB)
sda: Write Protect is off
sda: Mode Sense: 00 3a 00 00
SCSI device sda: write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sda: sda1 sda2 sda3
sd 0:0:0:0: Attached scsi disk sda
sd 0:0:0:0: Attached scsi generic sg0 type 0
scsi 1:0:0:0: Direct-Access ATA Config Disk RGL1 PQ: 0 ANSI: 5
SCSI device sdb: 640 512-byte hdwr sectors (0 MB)
sdb: Write Protect is off
sdb: Mode Sense: 00 3a 00 00
SCSI device sdb: write cache: disabled, read cache: enabled, doesn't support DPO or FUA
SCSI device sdb: 640 512-byte hdwr sectors (0 MB)
sdb: Write Protect is off
sdb: Mode Sense: 00 3a 00 00
SCSI device sdb: write cache: disabled, read cache: enabled, doesn't support DPO or FUA
sdb: unknown partition table
sd 1:0:0:0: Attached scsi disk sdb
sd 1:0:0:0: Attached scsi generic sg1 type 0
scsi 2:0:0:0: Direct-Access ATA Maxtor 6L250S0 BANC PQ: 0 ANSI: 5
SCSI device sdc: 490234752 512-byte hdwr sectors (251000 MB)
sdc: Write Protect is off
sdc: Mode Sense: 00 3a 00 00
SCSI device sdc: write cache: enabled, read cache: enabled, doesn't support DPO or FUA
SCSI device sdc: 490234752 512-byte hdwr sectors (251000 MB)
sdc: Write Protect is off
sdc: Mode Sense: 00 3a 00 00
SCSI device sdc: write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sdc: sdc1 sdc2
sd 2:0:0:0: Attached scsi disk sdc
sd 2:0:0:0: Attached scsi generic sg2 type 0
scsi 3:0:0:0: Direct-Access ATA ST3500641AS 3.AA PQ: 0 ANSI: 5
SCSI device sdd: 976773168 512-byte hdwr sectors (500108 MB)
sdd: Write Protect is off
sdd: Mode Sense: 00 3a 00 00
SCSI device sdd: write cache: enabled, read cache: enabled, doesn't support DPO or FUA
SCSI device sdd: 976773168 512-byte hdwr sectors (500108 MB)
sdd: Write Protect is off
sdd: Mode Sense: 00 3a 00 00
SCSI device sdd: write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sdd: sdd1 sdd2 sdd3
sd 3:0:0:0: Attached scsi disk sdd
sd 3:0:0:0: Attached scsi generic sg3 type 0
PCI: Device 0000:02:00.0 not available because of resource collisions
ahci: probe of 0000:02:00.0 failed with error -22
ata_piix 0000:00:1f.1: version 2.10
ACPI: PCI Interrupt 0000:00:1f.1[A] -> GSI 22 (level, low) -> IRQ 22
PCI: Setting latency timer of device 0000:00:1f.1 to 64
ata5: PATA max UDMA/133 cmd 0x00000000000101f0 ctl 0x00000000000103f6 bmdma 0x000000000001ffa0 irq 14
ata6: PATA max UDMA/133 cmd 0x0000000000010170 ctl 0x0000000000010376 bmdma 0x000000000001ffa8 irq 15
scsi4 : ata_piix
ACPI Error (dsopcode-0481): Attempt to CreateField of length zero [20070126]
ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.IDE0.RATA] (Node ffff81000425c490), AE_AML_OPERAND_VALUE
ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.IDE0.CHN0.DRV0._GTF] (Node ffff81000425c7f0), AE_AML_OPERAND_VALUE
ata5.00: ATA-7: Maxtor 6L200P0, BAH41E00, max UDMA/133
ata5.00: 398297088 sectors, multi 16: LBA48
ACPI Error (dsopcode-0481): Attempt to CreateField of length zero [20070126]
ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.IDE0.RATA] (Node ffff81000425c490), AE_AML_OPERAND_VALUE
ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.IDE0.CHN0.DRV0._GTF] (Node ffff81000425c7f0), AE_AML_OPERAND_VALUE
ata5.01: ATAPI, max UDMA/33
ACPI Error (dsopcode-0481): Attempt to CreateField of length zero [20070126]
ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.IDE0.RATA] (Node ffff81000425c490), AE_AML_OPERAND_VALUE
ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.IDE0.CHN0.DRV0._GTF] (Node ffff81000425c7f0), AE_AML_OPERAND_VALUE
ata5.00: configured for UDMA/33
ACPI Error (dsopcode-0481): Attempt to CreateField of length zero [20070126]
ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.IDE0.RATA] (Node ffff81000425c490), AE_AML_OPERAND_VALUE
ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.IDE0.CHN0.DRV0._GTF] (Node ffff81000425c7f0), AE_AML_OPERAND_VALUE
ata5.01: configured for UDMA/33
scsi5 : ata_piix
ATA: abnormal status 0x7F on port 0x0000000000010177
scsi 4:0:0:0: Direct-Access ATA Maxtor 6L200P0 BAH4 PQ: 0 ANSI: 5
SCSI device sde: 398297088 512-byte hdwr sectors (203928 MB)
sde: Write Protect is off
sde: Mode Sense: 00 3a 00 00
SCSI device sde: write cache: enabled, read cache: enabled, doesn't support DPO or FUA
SCSI device sde: 398297088 512-byte hdwr sectors (203928 MB)
sde: Write Protect is off
sde: Mode Sense: 00 3a 00 00
SCSI device sde: write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sde: sde1 sde2 sde3 sde4 < sde5 sde6 >
sd 4:0:0:0: Attached scsi disk sde
sd 4:0:0:0: Attached scsi generic sg4 type 0
scsi 4:0:1:0: CD-ROM ASUS CRW-5232A3 1.00 PQ: 0 ANSI: 5
sr0: scsi3-mmc drive: 52x/52x writer cd/rw xa/form2 cdda tray
Uniform CD-ROM driver Revision: 3.20
sr 4:0:1:0: Attached scsi CD-ROM sr0
sr 4:0:1:0: Attached scsi generic sg5 type 5
PCI: Enabling device 0000:02:00.1 (0000 -> 0001)
ACPI: PCI Interrupt 0000:02:00.1[B] -> GSI 16 (level, low) -> IRQ 16
PCI: Setting latency timer of device 0000:02:00.1 to 64
ata7: PATA max UDMA/100 cmd 0x0000000000019c00 ctl 0x0000000000019882 bmdma 0x0000000000019400 irq 16
ata8: PATA max UDMA/100 cmd 0x0000000000019800 ctl 0x0000000000019482 bmdma 0x0000000000019408 irq 16
scsi6 : pata_jmicron
ata7.00: ATAPI, max UDMA/66
ata7.00: configured for UDMA/66
scsi7 : pata_jmicron
ATA: abnormal status 0x7F on port 0x0000000000019807
scsi 6:0:0:0: CD-ROM ASUS DRW-1608P 1.40 PQ: 0 ANSI: 5
sr1: scsi3-mmc drive: 40x/40x writer cd/rw xa/form2 cdda tray
sr 6:0:0:0: Attached scsi CD-ROM sr1
sr 6:0:0:0: Attached scsi generic sg6 type 5
video1394: Installed video1394 module
ieee1394: raw1394: /dev/raw1394 device initialized
ACPI: PCI Interrupt 0000:00:1d.7[A] -> GSI 20 (level, low) -> IRQ 20
PCI: Setting latency timer of device 0000:00:1d.7 to 64
ehci_hcd 0000:00:1d.7: EHCI Host Controller
ehci_hcd 0000:00:1d.7: new USB bus registered, assigned bus number 1
ehci_hcd 0000:00:1d.7: debug port 1
PCI: cache line size of 32 is not supported by device 0000:00:1d.7
ehci_hcd 0000:00:1d.7: irq 20, io mem 0xffafbc00
ehci_hcd 0000:00:1d.7: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 8 ports detected
USB Universal Host Controller Interface driver v3.0
ACPI: PCI Interrupt 0000:00:1d.0[A] -> GSI 20 (level, low) -> IRQ 20
PCI: Setting latency timer of device 0000:00:1d.0 to 64
uhci_hcd 0000:00:1d.0: UHCI Host Controller
uhci_hcd 0000:00:1d.0: new USB bus registered, assigned bus number 2
uhci_hcd 0000:00:1d.0: irq 20, io base 0x0000e480
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
ACPI: PCI Interrupt 0000:00:1d.1[B] -> GSI 17 (level, low) -> IRQ 17
PCI: Setting latency timer of device 0000:00:1d.1 to 64
uhci_hcd 0000:00:1d.1: UHCI Host Controller
uhci_hcd 0000:00:1d.1: new USB bus registered, assigned bus number 3
uhci_hcd 0000:00:1d.1: irq 17, io base 0x0000e800
usb usb3: configuration #1 chosen from 1 choice
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 2 ports detected
usb 1-7: new high speed USB device using ehci_hcd and address 2
ACPI: PCI Interrupt 0000:00:1d.2[C] -> GSI 18 (level, low) -> IRQ 18
PCI: Setting latency timer of device 0000:00:1d.2 to 64
uhci_hcd 0000:00:1d.2: UHCI Host Controller
uhci_hcd 0000:00:1d.2: new USB bus registered, assigned bus number 4
uhci_hcd 0000:00:1d.2: irq 18, io base 0x0000e880
usb usb4: configuration #1 chosen from 1 choice
hub 4-0:1.0: USB hub found
hub 4-0:1.0: 2 ports detected
ACPI: PCI Interrupt 0000:00:1d.3[D] -> GSI 19 (level, low) -> IRQ 19
PCI: Setting latency timer of device 0000:00:1d.3 to 64
uhci_hcd 0000:00:1d.3: UHCI Host Controller
uhci_hcd 0000:00:1d.3: new USB bus registered, assigned bus number 5
uhci_hcd 0000:00:1d.3: irq 19, io base 0x0000ec00
usb usb5: configuration #1 chosen from 1 choice
hub 5-0:1.0: USB hub found
hub 5-0:1.0: 2 ports detected
usb 1-7: configuration #1 chosen from 1 choice
hub 1-7:1.0: USB hub found
hub 1-7:1.0: 4 ports detected
usb 1-7.3: new high speed USB device using ehci_hcd and address 3
usb 1-7.3: configuration #1 chosen from 1 choice
usbcore: registered new interface driver usblp
drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver hiddev
usbcore: registered new interface driver usbhid
drivers/usb/input/hid-core.c: v2.6:USB HID core driver
PNP: PS/2 Controller [PNP0303:PS2K] at 0x60,0x64 irq 1
PNP: PS/2 controller doesn't have AUX irq; using default 12
serio: i8042 KBD port at 0x60,0x64 irq 1
serio: i8042 AUX port at 0x60,0x64 irq 12
mice: PS/2 mouse device common for all mice
input: AT Translated Set 2 keyboard as /class/input/input2
input: PC Speaker as /class/input/input3
I2O subsystem v1.325
i2o: max drivers = 8
I2O Configuration OSM v1.323
I2O Bus Adapter OSM v1.317
I2O Block Device OSM v1.325
I2O ProcFS OSM v1.316
i2c /dev entries driver
ACPI: PCI Interrupt 0000:00:1f.3[B] -> GSI 23 (level, low) -> IRQ 23
md: linear personality registered for level -1
md: raid0 personality registered for level 0
md: raid1 personality registered for level 1
Advanced Linux Sound Architecture Driver Version 1.0.14rc2 (Wed Feb 14 07:42:13 2007 UTC).
ACPI: PCI Interrupt 0000:00:1b.0[A] -> GSI 19 (level, low) -> IRQ 19
PCI: Setting latency timer of device 0000:00:1b.0 to 64
ALSA device list:
#0: HDA Intel at 0xffafc000 irq 19
netem: version 1.2
u32 classifier
Performance counters on
OLD policer on
Netfilter messages via NETLINK v0.30.
IPv4 over IPv4 tunneling driver
GRE over IPv4 tunneling driver
TCP cubic registered
Initializing XFRM netlink socket
NET: Registered protocol family 1
NET: Registered protocol family 10
lo: Disabled Privacy Extensions
IPv6: add_dev failed for eql
tunl0: Disabled Privacy Extensions
IPv6 over IPv4 tunneling driver
sit0: Disabled Privacy Extensions
NET: Registered protocol family 17
NET: Registered protocol family 15
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
ieee80211: 802.11 data/management/control stack, git-1.1.13
ieee80211: Copyright (C) 2004-2005 Intel Corporation <jketreno@linux.intel.com>
ieee80211_crypt: registered algorithm 'NULL'
ieee80211_crypt: registered algorithm 'WEP'
ieee80211_crypt: registered algorithm 'CCMP'
ieee80211_crypt: registered algorithm 'TKIP'
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
Time: tsc clocksource has been installed.
md: Autodetecting RAID arrays.
md: autorun ...
md: ... autorun DONE.
kjournald starting. Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
VFS: Mounted root (ext3 filesystem) readonly.
Freeing unused kernel memory: 296k freed
sky2 eth0: enabling interface
sky2 eth0: ram buffer 48K
ADDRCONF(NETDEV_UP): eth0: link is not ready
ata1.00: exception Emask 0x2 SAct 0x7e000007 SErr 0x0 action 0x2 frozen
ata1.00: (spurious completion during NCQ issue=0x0 SAct=0x7e000007 FIS=004040a1:01000000)
ata1.00: cmd 60/08:00:88:e1:44/00:00:0f:00:00/40 tag 0 cdb 0x0 data 4096 in
res 40/00:10:3c:eb:ff/00:00:09:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/01:08:3b:eb:ff/00:00:09:00:00/40 tag 1 cdb 0x0 data 512 in
res 40/00:10:3c:eb:ff/00:00:09:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/57:10:3c:eb:ff/00:00:09:00:00/40 tag 2 cdb 0x0 data 44544 in
res 40/00:10:3c:eb:ff/00:00:09:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/01:c8:35:eb:ff/00:00:09:00:00/40 tag 25 cdb 0x0 data 512 in
res 40/00:10:3c:eb:ff/00:00:09:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/01:d0:36:eb:ff/00:00:09:00:00/40 tag 26 cdb 0x0 data 512 in
res 40/00:10:3c:eb:ff/00:00:09:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/01:d8:37:eb:ff/00:00:09:00:00/40 tag 27 cdb 0x0 data 512 in
res 40/00:10:3c:eb:ff/00:00:09:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/01:e0:38:eb:ff/00:00:09:00:00/40 tag 28 cdb 0x0 data 512 in
res 40/00:10:3c:eb:ff/00:00:09:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/01:e8:39:eb:ff/00:00:09:00:00/40 tag 29 cdb 0x0 data 512 in
res 40/00:10:3c:eb:ff/00:00:09:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/01:f0:3a:eb:ff/00:00:09:00:00/40 tag 30 cdb 0x0 data 512 in
res 40/00:10:3c:eb:ff/00:00:09:00:00/40 Emask 0x2 (HSM violation)
ata1: soft resetting port
ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
ata1.00: configured for UDMA/133
ata1: EH complete
SCSI device sda: 490234752 512-byte hdwr sectors (251000 MB)
sda: Write Protect is off
sda: Mode Sense: 00 3a 00 00
SCSI device sda: write cache: enabled, read cache: enabled, doesn't support DPO or FUA
EXT3 FS on sde1, internal journal
kjournald starting. Commit interval 5 seconds
EXT3 FS on sde6, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
kjournald starting. Commit interval 5 seconds
EXT3 FS on sde3, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
Adding 2096436k swap on /dev/sde5. Priority:-1 extents:1 across:2096436k
Adding 4192956k swap on /dev/sda3. Priority:-2 extents:1 across:4192956k
ttyS1: LSR safety check engaged!
ttyS1: LSR safety check engaged!
ttyS1: LSR safety check engaged!
ISO 9660 Extensions: Microsoft Joliet Level 3
ISO 9660 Extensions: RRIP_1991A
^ permalink raw reply [flat|nested] 263+ messages in thread
* RE: [git patches] libata fixes
2007-03-11 18:34 ` Paul Rolland
@ 2007-03-11 19:20 ` Paul Rolland
2007-03-11 20:04 ` Linus Torvalds
1 sibling, 0 replies; 263+ messages in thread
From: Paul Rolland @ 2007-03-11 19:20 UTC (permalink / raw)
To: rol, 'Linus Torvalds'
Cc: 'Tejun Heo', 'Jeff Garzik',
'Andrew Morton', linux-ide, 'LKML',
'Eric D. Mudama'
Just one point that may be interesting, as it seems that this is IRQ
related : at the beginning of the dmesg, it seems that IRQ16 is used
for sky2/Yukon , but when reading /proc/interrupts, it has been remapped
to IRQ 505... Could this also affect libata ?
Regards,
Paul
Paul Rolland, rol(at)as2917.net
ex-AS2917 Network administrator and Peering Coordinator
--
Please no HTML, I'm not a browser - Pas d'HTML, je ne suis pas un navigateur
"Some people dream of success... while others wake up and work hard at it"
"I worry about my child and the Internet all the time, even though she's too
young to have logged on yet. Here's what I worry about. I worry that 10 or 15
years from now, she will come to me and say 'Daddy, where were you when they
took freedom of the press away from the Internet?'"
--Mike Godwin, Electronic Frontier Foundation
> -----Original Message-----
> From: linux-kernel-owner@vger.kernel.org
> [mailto:linux-kernel-owner@vger.kernel.org] On Behalf Of Paul Rolland
> Sent: Sunday, March 11, 2007 7:35 PM
> To: 'Linus Torvalds'
> Cc: 'Tejun Heo'; 'Jeff Garzik'; 'Andrew Morton';
> linux-ide@vger.kernel.org; 'LKML'; 'Eric D. Mudama'
> Subject: RE: [git patches] libata fixes
>
> Hello,
>
> > do I understand correctly that the *only* difference between
> > the working
> > setup is that you applied (by hand) the libata patch that
> > Jeff sent out?
> >
> > So plain 2.6.21-rc2 works fine, but with the patch applied,
> > you get no
> > interrupts on the DVD drive?
>
> Nope... I tried several patches from Tejun, and also some
> that Jeff posted
> to linux-ide, but no luck. The only way to have this DVD-RW
> working is to
> use irqpoll on the command line...
>
> Sorry to have been unclear....
>
> To complete, here are some more output from the machine :
> - a dmesg without irqpoll,
> - a dmesg with irqpoll,
> - a copy of /proc/interrupts
> 6 [19:33] rol@riri:~> cat /proc/interrupts
> CPU0 CPU1
> 0: 357022 0 IO-APIC-edge timer
> 1: 8 0 IO-APIC-edge i8042
> 4: 14 0 IO-APIC-edge serial
> 6: 5 0 IO-APIC-edge floppy
> 8: 1 0 IO-APIC-edge rtc
> 9: 0 0 IO-APIC-fasteoi acpi
> 12: 129 0 IO-APIC-edge i8042
> 14: 7639 0 IO-APIC-edge libata
> 15: 0 0 IO-APIC-edge libata
> 16: 0 0 IO-APIC-fasteoi libata
> 17: 0 0 IO-APIC-fasteoi uhci_hcd:usb3
> 18: 0 0 IO-APIC-fasteoi uhci_hcd:usb4
> 19: 204 0 IO-APIC-fasteoi uhci_hcd:usb5,
> HDA Intel
> 20: 107 0 IO-APIC-fasteoi ehci_hcd:usb1,
> uhci_hcd:usb2
> 21: 3 0 IO-APIC-fasteoi ohci1394
> 504: 8243 0 PCI-MSI-edge libata
> 505: 1 0 PCI-MSI-edge eth1
> 506: 386 0 PCI-MSI-edge eth0
> NMI: 771 531
> LOC: 569318 578684
> ERR: 0
>
> Regards,
> Paul
>
^ permalink raw reply [flat|nested] 263+ messages in thread
* RE: [git patches] libata fixes
2007-03-11 18:34 ` Paul Rolland
2007-03-11 19:20 ` Paul Rolland
@ 2007-03-11 20:04 ` Linus Torvalds
2007-03-11 22:25 ` Paul Rolland
1 sibling, 1 reply; 263+ messages in thread
From: Linus Torvalds @ 2007-03-11 20:04 UTC (permalink / raw)
To: Paul Rolland
Cc: 'Tejun Heo', 'Jeff Garzik',
'Andrew Morton', linux-ide, 'LKML',
'Eric D. Mudama'
On Sun, 11 Mar 2007, Paul Rolland wrote:
>
> Nope... I tried several patches from Tejun, and also some that Jeff posted
> to linux-ide, but no luck. The only way to have this DVD-RW working is to
> use irqpoll on the command line...
So it has *never* worked? That's what I'm trying to see - you had a
"before" and "after" dmesg in one of your posts, and the "before" one
looked fine (as if it was working) because it didn't have the error
messages.
So I'm just trying to figure out where the regression started...
> To complete, here are some more output from the machine :
What happens if you disable MSI entirely? Use "pci=nomsi" on the command
line.
The
ata2.00: qc timeout (cmd 0xec)
ata2.00: failed to IDENTIFY (I/O error, err_mask=0x104)
messages happen for you on the controller that claims MSI:
ata2: SATA max UDMA/133 cmd 0xffffc2000008a980 ctl 0x0000000000000000 bmdma 0x0000000000000000 irq 504
and quite frankly, we've had lots of bugs with MSI, both in hardware and
in software.
Linus
^ permalink raw reply [flat|nested] 263+ messages in thread
* RE: [git patches] libata fixes
2007-03-11 20:04 ` Linus Torvalds
@ 2007-03-11 22:25 ` Paul Rolland
2007-03-12 0:59 ` Linus Torvalds
0 siblings, 1 reply; 263+ messages in thread
From: Paul Rolland @ 2007-03-11 22:25 UTC (permalink / raw)
To: 'Linus Torvalds'
Cc: 'Tejun Heo', 'Jeff Garzik',
'Andrew Morton', linux-ide, 'LKML',
'Eric D. Mudama'
[-- Attachment #1: Type: text/plain, Size: 3222 bytes --]
Hello,
> > Nope... I tried several patches from Tejun, and also some
> that Jeff posted
> > to linux-ide, but no luck. The only way to have this DVD-RW
> working is to
> > use irqpoll on the command line...
>
> So it has *never* worked? That's what I'm trying to see - you had a
> "before" and "after" dmesg in one of your posts, and the "before" one
> looked fine (as if it was working) because it didn't have the error
> messages.
>
> So I'm just trying to figure out where the regression started...
>
> > To complete, here are some more output from the machine :
>
> What happens if you disable MSI entirely? Use "pci=nomsi" on
> the command
> line.
>
> The
>
> ata2.00: qc timeout (cmd 0xec)
> ata2.00: failed to IDENTIFY (I/O error, err_mask=0x104)
>
> messages happen for you on the controller that claims MSI:
>
> ata2: SATA max UDMA/133 cmd 0xffffc2000008a980 ctl
> 0x0000000000000000 bmdma 0x0000000000000000 irq 504
>
> and quite frankly, we've had lots of bugs with MSI, both in
> hardware and
> in software.
OK, I see, we are talking about two different problems...
My machine is having two problems : the one you are describing above,
which is due to a SIL controler being connected to one port of the ICH7
(at least, it seems to), and probing it goes timeout, but nothing is
connected on it.
The second problem is a Jmicron363 controler that is failing to detect
the DVD-RW that is connected, unless I use the irqpoll option as Tejun has
suggested.
>From what I remember, except my initial description of the problem,
no attempt has been made yet to workaround/understand the first problem,
and all the mails I've exchanged were focused on the second one.
But, as you suggest it, I'm adding pci=nomsi to the command line....
rebooting... no change for this part of the problem.
OK, the /proc/interrupt for this config, and the dmesg attached.
3 [23:22] rol@riri:~> cat /proc/interrupts
CPU0 CPU1
0: 297549 0 IO-APIC-edge timer
1: 7 0 IO-APIC-edge i8042
4: 13 0 IO-APIC-edge serial
6: 5 0 IO-APIC-edge floppy
8: 1 0 IO-APIC-edge rtc
9: 0 0 IO-APIC-fasteoi acpi
12: 126 0 IO-APIC-edge i8042
14: 8313 0 IO-APIC-edge libata
15: 0 0 IO-APIC-edge libata
16: 0 0 IO-APIC-fasteoi eth1, libata
17: 0 0 IO-APIC-fasteoi uhci_hcd:usb3
18: 6894 0 IO-APIC-fasteoi uhci_hcd:usb4
19: 579 0 IO-APIC-fasteoi eth0, uhci_hcd:usb5, HDA Intel
20: 104 0 IO-APIC-fasteoi ehci_hcd:usb1, uhci_hcd:usb2
21: 3 0 IO-APIC-fasteoi ohci1394
23: 7205 0 IO-APIC-fasteoi libata
NMI: 783 540
LOC: 291823 290536
PS : I'd like to try 2.6.21-rc3, but it seems that this is breaking my
config : disk naming is no more the same, and I end up with a panic
Warning: unable to open an initial console
though i've been compiling with the same .config I was using for 2.6.21-rc2
Regards,
Paul
[-- Attachment #2: dmesg-2.6.21-rc2-irqpoll-nomsi --]
[-- Type: application/octet-stream, Size: 31205 bytes --]
Linux version 2.6.21-rc2 (root@riri.as2917.net) (gcc version 4.0.3 (Ubuntu 4.0.3-1ubuntu5)) #4 SMP PREEMPT Sun Mar 4 19:52:39 CET 2007
Command line: root=/dev/sde1 ro ata2=noprobe console=ttyS0,9600 console=tty0 vga=extended irqpoll pci=nomsi
BIOS-provided physical RAM map:
BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
BIOS-e820: 00000000000e4000 - 0000000000100000 (reserved)
BIOS-e820: 0000000000100000 - 00000000c7f80000 (usable)
BIOS-e820: 00000000c7f80000 - 00000000c7f8e000 (ACPI data)
BIOS-e820: 00000000c7f8e000 - 00000000c7fe0000 (ACPI NVS)
BIOS-e820: 00000000c7fe0000 - 00000000c8000000 (reserved)
BIOS-e820: 00000000ffb00000 - 0000000100000000 (reserved)
Entering add_active_range(0, 0, 159) 0 entries of 256 used
Entering add_active_range(0, 256, 819072) 1 entries of 256 used
end_pfn_map = 1048576
DMI 2.4 present.
ACPI: RSDP 000FAF20, 0024 (r2 ACPIAM)
ACPI: XSDT C7F80100, 005C (r1 A_M_I_ OEMXSDT 12000608 MSFT 97)
ACPI: FACP C7F80290, 00F4 (r3 A_M_I_ OEMFACP 12000608 MSFT 97)
ACPI: DSDT C7F80410, 8FC4 (r1 A0543 A0543000 0 INTL 20060113)
ACPI: FACS C7F8E000, 0040
ACPI: APIC C7F80390, 0080 (r1 A_M_I_ OEMAPIC 12000608 MSFT 97)
ACPI: OEMB C7F8E040, 0066 (r1 A_M_I_ AMI_OEM 12000608 MSFT 97)
ACPI: HPET C7F893E0, 0038 (r1 A_M_I_ OEMHPET 12000608 MSFT 97)
ACPI: MCFG C7F89420, 003C (r1 A_M_I_ OEMMCFG 12000608 MSFT 97)
ACPI: SSDT C7F8E0B0, 01C6 (r1 AMI CPU1PM 1 INTL 20060113)
ACPI: SSDT C7F8E280, 013A (r1 AMI CPU2PM 1 INTL 20060113)
Entering add_active_range(0, 0, 159) 0 entries of 256 used
Entering add_active_range(0, 256, 819072) 1 entries of 256 used
Zone PFN ranges:
DMA 0 -> 4096
DMA32 4096 -> 1048576
Normal 1048576 -> 1048576
early_node_map[2] active PFN ranges
0: 0 -> 159
0: 256 -> 819072
On node 0 totalpages: 818975
DMA zone: 56 pages used for memmap
DMA zone: 1986 pages reserved
DMA zone: 1957 pages, LIFO batch:0
DMA32 zone: 11142 pages used for memmap
DMA32 zone: 803834 pages, LIFO batch:31
Normal zone: 0 pages used for memmap
ACPI: PM-Timer IO Port: 0x808
ACPI: Local APIC address 0xfee00000
ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled)
Processor #0 (Bootup-CPU)
ACPI: LAPIC (acpi_id[0x02] lapic_id[0x01] enabled)
Processor #1
ACPI: LAPIC (acpi_id[0x03] lapic_id[0x82] disabled)
ACPI: LAPIC (acpi_id[0x04] lapic_id[0x83] disabled)
ACPI: IOAPIC (id[0x02] address[0xfec00000] gsi_base[0])
IOAPIC[0]: apic_id 2, address 0xfec00000, GSI 0-23
ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
ACPI: IRQ0 used by override.
ACPI: IRQ2 used by override.
ACPI: IRQ9 used by override.
Setting APIC routing to flat
ACPI: HPET id: 0x8086a201 base: 0xfed00000
Using ACPI (MADT) for SMP configuration information
Nosave address range: 000000000009f000 - 00000000000a0000
Nosave address range: 00000000000a0000 - 00000000000e4000
Nosave address range: 00000000000e4000 - 0000000000100000
Allocating PCI resources starting at cc000000 (gap: c8000000:37b00000)
PERCPU: Allocating 34368 bytes of per cpu data
Built 1 zonelists. Total pages: 805791
Kernel command line: root=/dev/sde1 ro ata2=noprobe console=ttyS0,9600 console=tty0 vga=extended irqpoll pci=nomsi
Misrouted IRQ fixup and polling support enabled
This may significantly impact system performance
Initializing CPU#0
PID hash table entries: 4096 (order: 12, 32768 bytes)
time.c: Detected 2400.083 MHz processor.
Console: colour VGA+ 80x50
Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes)
Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes)
Checking aperture...
Memory: 3216500k/3276288k available (4563k kernel code, 59172k reserved, 2317k data, 296k init)
Calibrating delay using timer specific routine.. 4817.98 BogoMIPS (lpj=2408993)
Security Framework v1.0.0 initialized
Capability LSM initialized
Failure registering Root Plug module with the kernel
Failure registering Root Plug module with primary security module.
Mount-cache hash table entries: 256
CPU: L1 I cache: 32K, L1 D cache: 32K
CPU: L2 cache: 4096K
using mwait in idle threads.
CPU: Physical Processor ID: 0
CPU: Processor Core ID: 0
CPU0: Thermal monitoring enabled (TM2)
Freeing SMP alternatives: 40k freed
ACPI: Core revision 20070126
Using local APIC timer interrupts.
result 16667246
Detected 16.667 MHz APIC timer.
Booting processor 1/2 APIC 0x1
Initializing CPU#1
Calibrating delay using timer specific routine.. 4800.09 BogoMIPS (lpj=2400048)
CPU: L1 I cache: 32K, L1 D cache: 32K
CPU: L2 cache: 4096K
CPU: Physical Processor ID: 0
CPU: Processor Core ID: 1
CPU1: Thermal monitoring enabled (TM2)
Intel(R) Core(TM)2 CPU 6600 @ 2.40GHz stepping 06
checking TSC synchronization [CPU#0 -> CPU#1]: passed.
Brought up 2 CPUs
testing NMI watchdog ... OK.
migration_cost=24
NET: Registered protocol family 16
ACPI: bus type pci registered
PCI: BIOS Bug: MCFG area at f0000000 is not E820-reserved
PCI: Not using MMCONFIG.
PCI: Using configuration type 1
ACPI: Interpreter enabled
ACPI: Using IOAPIC for interrupt routing
ACPI: PCI Root Bridge [PCI0] (0000:00)
PCI: Probing PCI hardware (bus 00)
PCI quirk: region 0800-087f claimed by ICH6 ACPI/GPIO/TCO
PCI quirk: region 0480-04bf claimed by ICH6 GPIO
Boot video device is 0000:06:00.0
PCI: Transparent bridge - 0000:00:1e.0
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.P0P1._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.P0P3._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.P0P4._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.P0P7._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.P0P8._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.P0P9._PRT]
ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 7 10 *11 12 14 15)
ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 6 7 *10 11 12 14 15)
ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 5 6 *7 10 11 12 14 15)
ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 *5 6 7 10 11 12 14 15)
ACPI: PCI Interrupt Link [LNKE] (IRQs *3 4 5 6 7 10 11 12 14 15)
ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 *5 6 7 10 11 12 14 15)
ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 5 6 7 10 *11 12 14 15)
ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 5 6 7 *10 11 12 14 15)
Linux Plug and Play Support v0.97 (c) Adam Belay
pnp: PnP ACPI init
pnp: PnP ACPI: found 16 devices
SCSI subsystem initialized
libata version 2.20 loaded.
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
PCI: Using ACPI for IRQ routing
PCI: If a device doesn't work, try "pci=routeirq". If it helps, post a report
PCI: Cannot allocate resource region 2 of device 0000:02:00.0
PCI: Cannot allocate resource region 3 of device 0000:02:00.0
PCI-GART: No AMD northbridge found.
hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0
hpet0: 3 64-bit timers, 14318180 Hz
pnp: 00:01: iomem range 0xfed13000-0xfed19fff has been reserved
pnp: 00:07: ioport range 0x290-0x297 has been reserved
pnp: 00:08: iomem range 0xfed1c000-0xfed1ffff has been reserved
pnp: 00:08: iomem range 0xfed20000-0xfed3ffff has been reserved
pnp: 00:08: iomem range 0xfed50000-0xfed8ffff has been reserved
pnp: 00:08: iomem range 0xffb00000-0xffbfffff has been reserved
pnp: 00:0c: iomem range 0xfec00000-0xfec00fff has been reserved
pnp: 00:0c: iomem range 0xfee00000-0xfee00fff has been reserved
pnp: 00:0e: iomem range 0xf0000000-0xf3ffffff has been reserved
pnp: 00:0f: iomem range 0x0-0x9ffff could not be reserved
pnp: 00:0f: iomem range 0xc0000-0xdffff has been reserved
pnp: 00:0f: iomem range 0xe0000-0xfffff could not be reserved
pnp: 00:0f: iomem range 0x100000-0xc7ffffff could not be reserved
ieee1394: Initialized config rom entry `ip1394'
ACPI: PCI Interrupt 0000:01:03.0[A] -> GSI 21 (level, low) -> IRQ 21
ohci1394: fw-host0: OHCI-1394 1.1 (PCI): IRQ=[21] MMIO=[ff5ef800-ff5effff] Max Packet=[2048] IR/IT contexts=[4/8]
PCI: Bridge: 0000:00:01.0
IO window: c000-cfff
MEM window: ff900000-ff9fffff
PREFETCH window: cff00000-efefffff
PCI: Bridge: 0000:00:1c.0
IO window: disabled.
MEM window: disabled.
PREFETCH window: cfe00000-cfefffff
PCI: Bridge: 0000:00:1c.3
IO window: b000-bfff
MEM window: ff800000-ff8fffff
PREFETCH window: disabled.
PCI: Bridge: 0000:00:1c.4
IO window: a000-afff
MEM window: ff700000-ff7fffff
PREFETCH window: disabled.
PCI: Bridge: 0000:00:1c.5
IO window: 9000-9fff
MEM window: ff600000-ff6fffff
PREFETCH window: disabled.
PCI: Bridge: 0000:00:1e.0
IO window: 8000-8fff
MEM window: ff500000-ff5fffff
PREFETCH window: disabled.
ACPI: PCI Interrupt 0000:00:01.0[A] -> GSI 16 (level, low) -> IRQ 16
PCI: Setting latency timer of device 0000:00:01.0 to 64
ACPI: PCI Interrupt 0000:00:1c.0[A] -> GSI 16 (level, low) -> IRQ 16
PCI: Setting latency timer of device 0000:00:1c.0 to 64
ACPI: PCI Interrupt 0000:00:1c.3[D] -> GSI 19 (level, low) -> IRQ 19
PCI: Setting latency timer of device 0000:00:1c.3 to 64
ACPI: PCI Interrupt 0000:00:1c.4[A] -> GSI 16 (level, low) -> IRQ 16
PCI: Setting latency timer of device 0000:00:1c.4 to 64
ACPI: PCI Interrupt 0000:00:1c.5[B] -> GSI 17 (level, low) -> IRQ 17
PCI: Setting latency timer of device 0000:00:1c.5 to 64
PCI: Setting latency timer of device 0000:00:1e.0 to 64
NET: Registered protocol family 2
IP route cache hash table entries: 131072 (order: 8, 1048576 bytes)
TCP established hash table entries: 131072 (order: 9, 3145728 bytes)
ieee1394: Host added: ID:BUS[0-00:1023] GUID[0011d80000fefb23]
TCP bind hash table entries: 65536 (order: 8, 1048576 bytes)
TCP: Hash tables configured (established 131072 bind 65536)
TCP reno registered
IA-32 Microcode Update Driver: v1.14a <tigran@aivazian.fsnet.co.uk>
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
NTFS driver 2.1.28 [Flags: R/W].
fuse init (API version 7.8)
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
PCI: Setting latency timer of device 0000:00:01.0 to 64
assign_interrupt_mode Found MSI capability
Allocate Port Service[0000:00:01.0:pcie00]
PCI: Setting latency timer of device 0000:00:1c.0 to 64
assign_interrupt_mode Found MSI capability
Allocate Port Service[0000:00:1c.0:pcie00]
Allocate Port Service[0000:00:1c.0:pcie02]
PCI: Setting latency timer of device 0000:00:1c.3 to 64
assign_interrupt_mode Found MSI capability
Allocate Port Service[0000:00:1c.3:pcie00]
PCI: Setting latency timer of device 0000:00:1c.4 to 64
assign_interrupt_mode Found MSI capability
Allocate Port Service[0000:00:1c.4:pcie00]
PCI: Setting latency timer of device 0000:00:1c.5 to 64
assign_interrupt_mode Found MSI capability
Allocate Port Service[0000:00:1c.5:pcie00]
input: Power Button (FF) as /class/input/input0
ACPI: Power Button (FF) [PWRF]
input: Power Button (CM) as /class/input/input1
ACPI: Power Button (CM) [PWRB]
ACPI Warning (tbutils-0158): Incorrect checksum in table [OEMB] - 78, should be 6F [20070126]
ACPI Error (psparse-0537): Method parse/execution failed [\_PR_.CPU1._OSC] (Node ffff81000424cb30), AE_ALREADY_EXISTS
ACPI: Marking method _OSC as Serialized
ACPI Error (psparse-0537): Method parse/execution failed [\_PR_.CPU1._PDC] (Node ffff81000424cb50), AE_ALREADY_EXISTS
ACPI: Marking method _PDC as Serialized
ACPI: Processor [CPU1] (supports 8 throttling states)
ACPI Error (psparse-0537): Method parse/execution failed [\_PR_.CPU2._OSC] (Node ffff81000424ca10), AE_ALREADY_EXISTS
ACPI: Marking method _OSC as Serialized
ACPI Error (psparse-0537): Method parse/execution failed [\_PR_.CPU2._PDC] (Node ffff81000424ca30), AE_ALREADY_EXISTS
ACPI: Marking method _PDC as Serialized
ACPI: Processor [CPU2] (supports 8 throttling states)
Real Time Clock Driver v1.12ac
hpet_resources: 0xfed00000 is busy
Non-volatile memory driver v1.2
intel_rng: FWH not detected
iTCO_wdt: Intel TCO WatchDog Timer Driver v1.01 (21-Jan-2007)
iTCO_wdt: Found a ICH7 or ICH7R TCO device (Version=2, TCOBASE=0x0860)
iTCO_wdt: initialized. heartbeat=30 sec (nowayout=0)
iTCO_vendor_support: vendor-support=0
Linux agpgart interface v0.102 (c) Dave Jones
[drm] Initialized drm 1.1.0 20060810
Hangcheck: starting hangcheck timer 0.9.0 (tick is 180 seconds, margin is 60 seconds).
Hangcheck: Using get_cycles().
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
00:0d: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
Floppy drive(s): fd0 is 1.44M
FDC 0 is a post-1991 82077
RAMDISK driver initialized: 16 RAM disks of 65536K size 1024 blocksize
loop: loaded (max 8 devices)
nbd: registered device at major 43
ACPI: PCI Interrupt 0000:04:00.0[A] -> GSI 19 (level, low) -> IRQ 19
PCI: Setting latency timer of device 0000:04:00.0 to 64
sky2 0000:04:00.0: v1.13 addr 0xff8fc000 irq 19 Yukon-EC (0xb6) rev 2
sky2 eth0: addr 00:18:f3:e0:5d:d4
ACPI: PCI Interrupt 0000:03:00.0[A] -> GSI 16 (level, low) -> IRQ 16
PCI: Setting latency timer of device 0000:03:00.0 to 64
sky2 0000:03:00.0: v1.13 addr 0xff7fc000 irq 16 Yukon-EC (0xb6) rev 2
sky2 eth1: addr 00:18:f3:e0:36:fd
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
PPP BSD Compression module registered
PPP MPPE Compression module registered
Equalizer2002: Simon Janes (simon@ncm.com) and David S. Miller (davem@redhat.com)
tun: Universal TUN/TAP device driver, 1.6
tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
ahci 0000:00:1f.2: version 2.1
ACPI: PCI Interrupt 0000:00:1f.2[B] -> GSI 23 (level, low) -> IRQ 23
PCI: Setting latency timer of device 0000:00:1f.2 to 64
ahci 0000:00:1f.2: AHCI 0001.0100 32 slots 4 ports 3 Gbps 0xf impl SATA mode
ahci 0000:00:1f.2: flags: 64bit ncq led clo pio slum part
ata1: SATA max UDMA/133 cmd 0xffffc2000008a900 ctl 0x0000000000000000 bmdma 0x0000000000000000 irq 23
ata2: SATA max UDMA/133 cmd 0xffffc2000008a980 ctl 0x0000000000000000 bmdma 0x0000000000000000 irq 23
ata3: SATA max UDMA/133 cmd 0xffffc2000008aa00 ctl 0x0000000000000000 bmdma 0x0000000000000000 irq 23
ata4: SATA max UDMA/133 cmd 0xffffc2000008aa80 ctl 0x0000000000000000 bmdma 0x0000000000000000 irq 23
scsi0 : ahci
ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
ata1.00: ATA-7: Maxtor 6L250S0, BANC1G10, max UDMA/133
ata1.00: 490234752 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata1.00: configured for UDMA/133
scsi1 : ahci
ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata2.00: qc timeout (cmd 0xec)
ata2.00: failed to IDENTIFY (I/O error, err_mask=0x104)
ata2: port is slow to respond, please be patient (Status 0x80)
ata2: port failed to respond (30 secs, Status 0x80)
ata2: COMRESET failed (device not ready)
ata2: hardreset failed, retrying in 5 secs
ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata2.00: ATA-6: Config Disk, RGL10364, max UDMA/133
ata2.00: 640 sectors, multi 1: LBA
ata2.00: configured for UDMA/133
scsi2 : ahci
ata3: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
ata3.00: ATA-7: Maxtor 6L250S0, BANC1G10, max UDMA/133
ata3.00: 490234752 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata3.00: configured for UDMA/133
scsi3 : ahci
ata4: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata4.00: ATA-7: ST3500641AS, 3.AAB, max UDMA/133
ata4.00: 976773168 sectors, multi 16: LBA48 NCQ (depth 31/32)
ata4.00: configured for UDMA/133
scsi 0:0:0:0: Direct-Access ATA Maxtor 6L250S0 BANC PQ: 0 ANSI: 5
SCSI device sda: 490234752 512-byte hdwr sectors (251000 MB)
sda: Write Protect is off
sda: Mode Sense: 00 3a 00 00
SCSI device sda: write cache: enabled, read cache: enabled, doesn't support DPO or FUA
SCSI device sda: 490234752 512-byte hdwr sectors (251000 MB)
sda: Write Protect is off
sda: Mode Sense: 00 3a 00 00
SCSI device sda: write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sda: sda1 sda2 sda3
sd 0:0:0:0: Attached scsi disk sda
sd 0:0:0:0: Attached scsi generic sg0 type 0
scsi 1:0:0:0: Direct-Access ATA Config Disk RGL1 PQ: 0 ANSI: 5
SCSI device sdb: 640 512-byte hdwr sectors (0 MB)
sdb: Write Protect is off
sdb: Mode Sense: 00 3a 00 00
SCSI device sdb: write cache: disabled, read cache: enabled, doesn't support DPO or FUA
SCSI device sdb: 640 512-byte hdwr sectors (0 MB)
sdb: Write Protect is off
sdb: Mode Sense: 00 3a 00 00
SCSI device sdb: write cache: disabled, read cache: enabled, doesn't support DPO or FUA
sdb: unknown partition table
sd 1:0:0:0: Attached scsi disk sdb
sd 1:0:0:0: Attached scsi generic sg1 type 0
scsi 2:0:0:0: Direct-Access ATA Maxtor 6L250S0 BANC PQ: 0 ANSI: 5
SCSI device sdc: 490234752 512-byte hdwr sectors (251000 MB)
sdc: Write Protect is off
sdc: Mode Sense: 00 3a 00 00
SCSI device sdc: write cache: enabled, read cache: enabled, doesn't support DPO or FUA
SCSI device sdc: 490234752 512-byte hdwr sectors (251000 MB)
sdc: Write Protect is off
sdc: Mode Sense: 00 3a 00 00
SCSI device sdc: write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sdc: sdc1 sdc2
sd 2:0:0:0: Attached scsi disk sdc
sd 2:0:0:0: Attached scsi generic sg2 type 0
scsi 3:0:0:0: Direct-Access ATA ST3500641AS 3.AA PQ: 0 ANSI: 5
SCSI device sdd: 976773168 512-byte hdwr sectors (500108 MB)
sdd: Write Protect is off
sdd: Mode Sense: 00 3a 00 00
SCSI device sdd: write cache: enabled, read cache: enabled, doesn't support DPO or FUA
SCSI device sdd: 976773168 512-byte hdwr sectors (500108 MB)
sdd: Write Protect is off
sdd: Mode Sense: 00 3a 00 00
SCSI device sdd: write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sdd: sdd1 sdd2 sdd3
sd 3:0:0:0: Attached scsi disk sdd
sd 3:0:0:0: Attached scsi generic sg3 type 0
PCI: Device 0000:02:00.0 not available because of resource collisions
ahci: probe of 0000:02:00.0 failed with error -22
ata_piix 0000:00:1f.1: version 2.10
ACPI: PCI Interrupt 0000:00:1f.1[A] -> GSI 22 (level, low) -> IRQ 22
PCI: Setting latency timer of device 0000:00:1f.1 to 64
ata5: PATA max UDMA/133 cmd 0x00000000000101f0 ctl 0x00000000000103f6 bmdma 0x000000000001ffa0 irq 14
ata6: PATA max UDMA/133 cmd 0x0000000000010170 ctl 0x0000000000010376 bmdma 0x000000000001ffa8 irq 15
scsi4 : ata_piix
ACPI Error (dsopcode-0481): Attempt to CreateField of length zero [20070126]
ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.IDE0.RATA] (Node ffff81000425c490), AE_AML_OPERAND_VALUE
ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.IDE0.CHN0.DRV0._GTF] (Node ffff81000425c7f0), AE_AML_OPERAND_VALUE
ata5.00: ATA-7: Maxtor 6L200P0, BAH41E00, max UDMA/133
ata5.00: 398297088 sectors, multi 16: LBA48
ACPI Error (dsopcode-0481): Attempt to CreateField of length zero [20070126]
ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.IDE0.RATA] (Node ffff81000425c490), AE_AML_OPERAND_VALUE
ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.IDE0.CHN0.DRV0._GTF] (Node ffff81000425c7f0), AE_AML_OPERAND_VALUE
ata5.01: ATAPI, max UDMA/33
ACPI Error (dsopcode-0481): Attempt to CreateField of length zero [20070126]
ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.IDE0.RATA] (Node ffff81000425c490), AE_AML_OPERAND_VALUE
ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.IDE0.CHN0.DRV0._GTF] (Node ffff81000425c7f0), AE_AML_OPERAND_VALUE
ata5.00: configured for UDMA/33
ACPI Error (dsopcode-0481): Attempt to CreateField of length zero [20070126]
ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.IDE0.RATA] (Node ffff81000425c490), AE_AML_OPERAND_VALUE
ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.IDE0.CHN0.DRV0._GTF] (Node ffff81000425c7f0), AE_AML_OPERAND_VALUE
ata5.01: configured for UDMA/33
scsi5 : ata_piix
ATA: abnormal status 0x7F on port 0x0000000000010177
scsi 4:0:0:0: Direct-Access ATA Maxtor 6L200P0 BAH4 PQ: 0 ANSI: 5
SCSI device sde: 398297088 512-byte hdwr sectors (203928 MB)
sde: Write Protect is off
sde: Mode Sense: 00 3a 00 00
SCSI device sde: write cache: enabled, read cache: enabled, doesn't support DPO or FUA
SCSI device sde: 398297088 512-byte hdwr sectors (203928 MB)
sde: Write Protect is off
sde: Mode Sense: 00 3a 00 00
SCSI device sde: write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sde: sde1 sde2 sde3 sde4 < sde5 sde6 >
sd 4:0:0:0: Attached scsi disk sde
sd 4:0:0:0: Attached scsi generic sg4 type 0
scsi 4:0:1:0: CD-ROM ASUS CRW-5232A3 1.00 PQ: 0 ANSI: 5
sr0: scsi3-mmc drive: 52x/52x writer cd/rw xa/form2 cdda tray
Uniform CD-ROM driver Revision: 3.20
sr 4:0:1:0: Attached scsi CD-ROM sr0
sr 4:0:1:0: Attached scsi generic sg5 type 5
PCI: Enabling device 0000:02:00.1 (0000 -> 0001)
ACPI: PCI Interrupt 0000:02:00.1[B] -> GSI 16 (level, low) -> IRQ 16
PCI: Setting latency timer of device 0000:02:00.1 to 64
ata7: PATA max UDMA/100 cmd 0x0000000000019c00 ctl 0x0000000000019882 bmdma 0x0000000000019400 irq 16
ata8: PATA max UDMA/100 cmd 0x0000000000019800 ctl 0x0000000000019482 bmdma 0x0000000000019408 irq 16
scsi6 : pata_jmicron
ata7.00: ATAPI, max UDMA/66
ata7.00: configured for UDMA/66
scsi7 : pata_jmicron
ATA: abnormal status 0x7F on port 0x0000000000019807
scsi 6:0:0:0: CD-ROM ASUS DRW-1608P 1.40 PQ: 0 ANSI: 5
sr1: scsi3-mmc drive: 40x/40x writer cd/rw xa/form2 cdda tray
sr 6:0:0:0: Attached scsi CD-ROM sr1
sr 6:0:0:0: Attached scsi generic sg6 type 5
video1394: Installed video1394 module
ieee1394: raw1394: /dev/raw1394 device initialized
ACPI: PCI Interrupt 0000:00:1d.7[A] -> GSI 20 (level, low) -> IRQ 20
PCI: Setting latency timer of device 0000:00:1d.7 to 64
ehci_hcd 0000:00:1d.7: EHCI Host Controller
ehci_hcd 0000:00:1d.7: new USB bus registered, assigned bus number 1
ehci_hcd 0000:00:1d.7: debug port 1
PCI: cache line size of 32 is not supported by device 0000:00:1d.7
ehci_hcd 0000:00:1d.7: irq 20, io mem 0xffafbc00
ehci_hcd 0000:00:1d.7: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 8 ports detected
USB Universal Host Controller Interface driver v3.0
ACPI: PCI Interrupt 0000:00:1d.0[A] -> GSI 20 (level, low) -> IRQ 20
PCI: Setting latency timer of device 0000:00:1d.0 to 64
uhci_hcd 0000:00:1d.0: UHCI Host Controller
uhci_hcd 0000:00:1d.0: new USB bus registered, assigned bus number 2
uhci_hcd 0000:00:1d.0: irq 20, io base 0x0000e480
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
ACPI: PCI Interrupt 0000:00:1d.1[B] -> GSI 17 (level, low) -> IRQ 17
PCI: Setting latency timer of device 0000:00:1d.1 to 64
uhci_hcd 0000:00:1d.1: UHCI Host Controller
uhci_hcd 0000:00:1d.1: new USB bus registered, assigned bus number 3
uhci_hcd 0000:00:1d.1: irq 17, io base 0x0000e800
usb usb3: configuration #1 chosen from 1 choice
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 2 ports detected
ACPI: PCI Interrupt 0000:00:1d.2[C] -> GSI 18 (level, low) -> IRQ 18
PCI: Setting latency timer of device 0000:00:1d.2 to 64
uhci_hcd 0000:00:1d.2: UHCI Host Controller
uhci_hcd 0000:00:1d.2: new USB bus registered, assigned bus number 4
uhci_hcd 0000:00:1d.2: irq 18, io base 0x0000e880
usb usb4: configuration #1 chosen from 1 choice
hub 4-0:1.0: USB hub found
hub 4-0:1.0: 2 ports detected
ACPI: PCI Interrupt 0000:00:1d.3[D] -> GSI 19 (level, low) -> IRQ 19
PCI: Setting latency timer of device 0000:00:1d.3 to 64
uhci_hcd 0000:00:1d.3: UHCI Host Controller
uhci_hcd 0000:00:1d.3: new USB bus registered, assigned bus number 5
uhci_hcd 0000:00:1d.3: irq 19, io base 0x0000ec00
usb usb5: configuration #1 chosen from 1 choice
hub 5-0:1.0: USB hub found
hub 5-0:1.0: 2 ports detected
usb 1-7: new high speed USB device using ehci_hcd and address 3
usb 1-7: configuration #1 chosen from 1 choice
hub 1-7:1.0: USB hub found
hub 1-7:1.0: 4 ports detected
usb 2-2: new full speed USB device using uhci_hcd and address 2
usb 2-2: configuration #1 chosen from 1 choice
usb 1-7.3: new high speed USB device using ehci_hcd and address 4
usb 1-7.3: configuration #1 chosen from 1 choice
usbcore: registered new interface driver usblp
drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver hiddev
usbcore: registered new interface driver usbhid
drivers/usb/input/hid-core.c: v2.6:USB HID core driver
PNP: PS/2 Controller [PNP0303:PS2K,PNP0f03:PS2M] at 0x60,0x64 irq 1,12
serio: i8042 KBD port at 0x60,0x64 irq 1
serio: i8042 AUX port at 0x60,0x64 irq 12
mice: PS/2 mouse device common for all mice
input: AT Translated Set 2 keyboard as /class/input/input2
input: PC Speaker as /class/input/input3
input: ImExPS/2 Logitech MX Mouse as /class/input/input4
I2O subsystem v1.325
i2o: max drivers = 8
I2O Configuration OSM v1.323
I2O Bus Adapter OSM v1.317
I2O Block Device OSM v1.325
I2O ProcFS OSM v1.316
i2c /dev entries driver
ACPI: PCI Interrupt 0000:00:1f.3[B] -> GSI 23 (level, low) -> IRQ 23
md: linear personality registered for level -1
md: raid0 personality registered for level 0
md: raid1 personality registered for level 1
Advanced Linux Sound Architecture Driver Version 1.0.14rc2 (Wed Feb 14 07:42:13 2007 UTC).
ACPI: PCI Interrupt 0000:00:1b.0[A] -> GSI 19 (level, low) -> IRQ 19
PCI: Setting latency timer of device 0000:00:1b.0 to 64
ALSA device list:
#0: HDA Intel at 0xffafc000 irq 19
netem: version 1.2
u32 classifier
Performance counters on
OLD policer on
Netfilter messages via NETLINK v0.30.
IPv4 over IPv4 tunneling driver
GRE over IPv4 tunneling driver
TCP cubic registered
Initializing XFRM netlink socket
NET: Registered protocol family 1
NET: Registered protocol family 10
lo: Disabled Privacy Extensions
IPv6: add_dev failed for eql
tunl0: Disabled Privacy Extensions
IPv6 over IPv4 tunneling driver
sit0: Disabled Privacy Extensions
NET: Registered protocol family 17
NET: Registered protocol family 15
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
ieee80211: 802.11 data/management/control stack, git-1.1.13
ieee80211: Copyright (C) 2004-2005 Intel Corporation <jketreno@linux.intel.com>
ieee80211_crypt: registered algorithm 'NULL'
ieee80211_crypt: registered algorithm 'WEP'
ieee80211_crypt: registered algorithm 'CCMP'
ieee80211_crypt: registered algorithm 'TKIP'
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
Time: tsc clocksource has been installed.
md: Autodetecting RAID arrays.
md: autorun ...
md: ... autorun DONE.
kjournald starting. Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
VFS: Mounted root (ext3 filesystem) readonly.
Freeing unused kernel memory: 296k freed
EXT3 FS on sde1, internal journal
sky2 eth0: enabling interface
sky2 eth0: ram buffer 48K
ADDRCONF(NETDEV_UP): eth0: link is not ready
sky2 eth0: Link is up at 100 Mbps, full duplex, flow control both
ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
kjournald starting. Commit interval 5 seconds
EXT3 FS on sde6, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
kjournald starting. Commit interval 5 seconds
EXT3 FS on sde3, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
Adding 2096436k swap on /dev/sde5. Priority:-1 extents:1 across:2096436k
Adding 4192956k swap on /dev/sda3. Priority:-2 extents:1 across:4192956k
ttyS1: LSR safety check engaged!
ttyS1: LSR safety check engaged!
ata1.00: exception Emask 0x2 SAct 0xfffe00 SErr 0x0 action 0x2 frozen
ata1.00: (spurious completion during NCQ issue=0x0 SAct=0xfffe00 FIS=004040a1:00000100)
ata1.00: cmd 60/04:48:8b:00:00/00:00:00:00:00/40 tag 9 cdb 0x0 data 2048 in
res 40/00:b8:c3:00:00/00:00:00:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/04:50:8f:00:00/00:00:00:00:00/40 tag 10 cdb 0x0 data 2048 in
res 40/00:b8:c3:00:00/00:00:00:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/04:58:93:00:00/00:00:00:00:00/40 tag 11 cdb 0x0 data 2048 in
res 40/00:b8:c3:00:00/00:00:00:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/04:60:97:00:00/00:00:00:00:00/40 tag 12 cdb 0x0 data 2048 in
res 40/00:b8:c3:00:00/00:00:00:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/04:68:9b:00:00/00:00:00:00:00/40 tag 13 cdb 0x0 data 2048 in
res 40/00:b8:c3:00:00/00:00:00:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/04:70:9f:00:00/00:00:00:00:00/40 tag 14 cdb 0x0 data 2048 in
res 40/00:b8:c3:00:00/00:00:00:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/04:78:a3:00:00/00:00:00:00:00/40 tag 15 cdb 0x0 data 2048 in
res 40/00:b8:c3:00:00/00:00:00:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/04:80:a7:00:00/00:00:00:00:00/40 tag 16 cdb 0x0 data 2048 in
res 40/00:b8:c3:00:00/00:00:00:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/04:88:ab:00:00/00:00:00:00:00/40 tag 17 cdb 0x0 data 2048 in
res 40/00:b8:c3:00:00/00:00:00:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/04:90:af:00:00/00:00:00:00:00/40 tag 18 cdb 0x0 data 2048 in
res 40/00:b8:c3:00:00/00:00:00:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/04:98:b3:00:00/00:00:00:00:00/40 tag 19 cdb 0x0 data 2048 in
res 40/00:b8:c3:00:00/00:00:00:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/04:a0:b7:00:00/00:00:00:00:00/40 tag 20 cdb 0x0 data 2048 in
res 40/00:b8:c3:00:00/00:00:00:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/04:a8:bb:00:00/00:00:00:00:00/40 tag 21 cdb 0x0 data 2048 in
res 40/00:b8:c3:00:00/00:00:00:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/04:b0:bf:00:00/00:00:00:00:00/40 tag 22 cdb 0x0 data 2048 in
res 40/00:b8:c3:00:00/00:00:00:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/04:b8:c3:00:00/00:00:00:00:00/40 tag 23 cdb 0x0 data 2048 in
res 40/00:b8:c3:00:00/00:00:00:00:00/40 Emask 0x2 (HSM violation)
ata1: soft resetting port
ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
ata1.00: configured for UDMA/133
ata1: EH complete
SCSI device sda: 490234752 512-byte hdwr sectors (251000 MB)
sda: Write Protect is off
sda: Mode Sense: 00 3a 00 00
SCSI device sda: write cache: enabled, read cache: enabled, doesn't support DPO or FUA
eth0: no IPv6 routers present
ttyS1: LSR safety check engaged!
^ permalink raw reply [flat|nested] 263+ messages in thread
* RE: [git patches] libata fixes
2007-03-11 22:25 ` Paul Rolland
@ 2007-03-12 0:59 ` Linus Torvalds
2007-03-12 6:28 ` Tejun Heo
` (2 more replies)
0 siblings, 3 replies; 263+ messages in thread
From: Linus Torvalds @ 2007-03-12 0:59 UTC (permalink / raw)
To: Paul Rolland
Cc: 'Tejun Heo', 'Jeff Garzik',
Alan Cox, 'Andrew Morton', linux-ide, 'LKML',
'Eric D. Mudama'
On Sun, 11 Mar 2007, Paul Rolland wrote:
>
> My machine is having two problems : the one you are describing above,
> which is due to a SIL controler being connected to one port of the ICH7
> (at least, it seems to), and probing it goes timeout, but nothing is
> connected on it.
Ok, so that's just a message irritation, not actually bothersome
otherwise?
> The second problem is a Jmicron363 controler that is failing to detect
> the DVD-RW that is connected, unless I use the irqpoll option as Tejun has
> suggested.
.. and this one has never worked without irqpoll?
> But, as you suggest it, I'm adding pci=nomsi to the command line....
> rebooting... no change for this part of the problem.
>
> OK, the /proc/interrupt for this config, and the dmesg attached.
>
> 3 [23:22] rol@riri:~> cat /proc/interrupts
> CPU0 CPU1
> 0: 297549 0 IO-APIC-edge timer
> 1: 7 0 IO-APIC-edge i8042
> 4: 13 0 IO-APIC-edge serial
> 6: 5 0 IO-APIC-edge floppy
> 8: 1 0 IO-APIC-edge rtc
> 9: 0 0 IO-APIC-fasteoi acpi
> 12: 126 0 IO-APIC-edge i8042
> 14: 8313 0 IO-APIC-edge libata
> 15: 0 0 IO-APIC-edge libata
> 16: 0 0 IO-APIC-fasteoi eth1, libata
So it's the irq16 one that is the Jmicron controller and just isn't
getting any interrupts?
Since all the other interrupts work (and MSI worked for other
controllers), I don't think it's interrupt-routing related. Especially as
MSI shouldn't even care about things like that.
And since it all works when "irqpoll" is used, that implies that the
*only* thing that is broken is literally irq delivery.
Is there possibly some jmicron-specific "enable interrupts" bit?
> PS : I'd like to try 2.6.21-rc3, but it seems that this is breaking my
> config : disk naming is no more the same, and I end up with a panic
> Warning: unable to open an initial console
> though i've been compiling with the same .config I was using for 2.6.21-rc2
Gaah. Can you get a log through serial console or netconsole to see what
changed?
Linus
^ permalink raw reply [flat|nested] 263+ messages in thread
* Re: [git patches] libata fixes
2007-03-12 0:59 ` Linus Torvalds
@ 2007-03-12 6:28 ` Tejun Heo
2007-03-12 6:30 ` Tejun Heo
2007-03-12 8:00 ` Paul Rolland
2007-03-12 7:56 ` Paul Rolland
2007-03-17 17:56 ` Paul Rolland
2 siblings, 2 replies; 263+ messages in thread
From: Tejun Heo @ 2007-03-12 6:28 UTC (permalink / raw)
To: Linus Torvalds
Cc: Paul Rolland, 'Jeff Garzik',
Alan Cox, 'Andrew Morton', linux-ide, 'LKML',
'Eric D. Mudama'
Hello, Linus.
Linus Torvalds wrote:
> On Sun, 11 Mar 2007, Paul Rolland wrote:
>> My machine is having two problems : the one you are describing above,
>> which is due to a SIL controler being connected to one port of the ICH7
>> (at least, it seems to), and probing it goes timeout, but nothing is
>> connected on it.
>
> Ok, so that's just a message irritation, not actually bothersome
> otherwise?
It involves a long timeout, so it's bothersome. This is caused by
Silicon Image 4726/3726 storage processor (SATA Port Multiplier with
extra features) attached to one of the ICH ports.
If the first downstream port in the PMP is empty and it gets reset in
non-PMP way, it identifies itself as "Config Disk" of quite small size.
It's probably used to configure the extra features using standard ATA
RW commands. Anyways, this "Config Disk" is a bit peculiar and doesn't
work very well with the current ATA reset sequence and gets identified
only after a few failures thus causing long timeout.
I keep forgetting about this. I'll ask SIMG how to deal with this. For
the time being, connecting a device to the PMP port should remove the
timeouts.
>> The second problem is a Jmicron363 controler that is failing to detect
>> the DVD-RW that is connected, unless I use the irqpoll option as Tejun has
>> suggested.
>
> .. and this one has never worked without irqpoll?
>
>> But, as you suggest it, I'm adding pci=nomsi to the command line....
>> rebooting... no change for this part of the problem.
>>
>> OK, the /proc/interrupt for this config, and the dmesg attached.
>>
>> 3 [23:22] rol@riri:~> cat /proc/interrupts
>> CPU0 CPU1
>> 0: 297549 0 IO-APIC-edge timer
>> 1: 7 0 IO-APIC-edge i8042
>> 4: 13 0 IO-APIC-edge serial
>> 6: 5 0 IO-APIC-edge floppy
>> 8: 1 0 IO-APIC-edge rtc
>> 9: 0 0 IO-APIC-fasteoi acpi
>> 12: 126 0 IO-APIC-edge i8042
>> 14: 8313 0 IO-APIC-edge libata
>> 15: 0 0 IO-APIC-edge libata
>> 16: 0 0 IO-APIC-fasteoi eth1, libata
>
> So it's the irq16 one that is the Jmicron controller and just isn't
> getting any interrupts?
>
> Since all the other interrupts work (and MSI worked for other
> controllers), I don't think it's interrupt-routing related. Especially as
> MSI shouldn't even care about things like that.
>
> And since it all works when "irqpoll" is used, that implies that the
> *only* thing that is broken is literally irq delivery.
>
> Is there possibly some jmicron-specific "enable interrupts" bit?
(cc'ing Justin of JMicron. Hello, please correct me if I'm wrong.)
Not that I know of. The PATA portion of JMB controllers is bog standard
PCI BMDMA ATA device where ATA_NIEN is the way to turn IRQ on and off.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 263+ messages in thread
* Re: [git patches] libata fixes
2007-03-12 6:28 ` Tejun Heo
@ 2007-03-12 6:30 ` Tejun Heo
2007-03-12 8:00 ` Paul Rolland
1 sibling, 0 replies; 263+ messages in thread
From: Tejun Heo @ 2007-03-12 6:30 UTC (permalink / raw)
To: justin
Cc: Linus Torvalds, Paul Rolland, 'Jeff Garzik',
Alan Cox, 'Andrew Morton', linux-ide, 'LKML',
'Eric D. Mudama'
Of course I forgot to CC. :-) Quoting whole message for Justin.
Tejun Heo wrote:
> Hello, Linus.
>
> Linus Torvalds wrote:
>> On Sun, 11 Mar 2007, Paul Rolland wrote:
>>> My machine is having two problems : the one you are describing above,
>>> which is due to a SIL controler being connected to one port of the ICH7
>>> (at least, it seems to), and probing it goes timeout, but nothing is
>>> connected on it.
>> Ok, so that's just a message irritation, not actually bothersome
>> otherwise?
>
> It involves a long timeout, so it's bothersome. This is caused by
> Silicon Image 4726/3726 storage processor (SATA Port Multiplier with
> extra features) attached to one of the ICH ports.
>
> If the first downstream port in the PMP is empty and it gets reset in
> non-PMP way, it identifies itself as "Config Disk" of quite small size.
> It's probably used to configure the extra features using standard ATA
> RW commands. Anyways, this "Config Disk" is a bit peculiar and doesn't
> work very well with the current ATA reset sequence and gets identified
> only after a few failures thus causing long timeout.
>
> I keep forgetting about this. I'll ask SIMG how to deal with this. For
> the time being, connecting a device to the PMP port should remove the
> timeouts.
>
>>> The second problem is a Jmicron363 controler that is failing to detect
>>> the DVD-RW that is connected, unless I use the irqpoll option as Tejun has
>>> suggested.
>> .. and this one has never worked without irqpoll?
>>
>>> But, as you suggest it, I'm adding pci=nomsi to the command line....
>>> rebooting... no change for this part of the problem.
>>>
>>> OK, the /proc/interrupt for this config, and the dmesg attached.
>>>
>>> 3 [23:22] rol@riri:~> cat /proc/interrupts
>>> CPU0 CPU1
>>> 0: 297549 0 IO-APIC-edge timer
>>> 1: 7 0 IO-APIC-edge i8042
>>> 4: 13 0 IO-APIC-edge serial
>>> 6: 5 0 IO-APIC-edge floppy
>>> 8: 1 0 IO-APIC-edge rtc
>>> 9: 0 0 IO-APIC-fasteoi acpi
>>> 12: 126 0 IO-APIC-edge i8042
>>> 14: 8313 0 IO-APIC-edge libata
>>> 15: 0 0 IO-APIC-edge libata
>>> 16: 0 0 IO-APIC-fasteoi eth1, libata
>> So it's the irq16 one that is the Jmicron controller and just isn't
>> getting any interrupts?
>>
>> Since all the other interrupts work (and MSI worked for other
>> controllers), I don't think it's interrupt-routing related. Especially as
>> MSI shouldn't even care about things like that.
>>
>> And since it all works when "irqpoll" is used, that implies that the
>> *only* thing that is broken is literally irq delivery.
>>
>> Is there possibly some jmicron-specific "enable interrupts" bit?
>
> (cc'ing Justin of JMicron. Hello, please correct me if I'm wrong.)
>
> Not that I know of. The PATA portion of JMB controllers is bog standard
> PCI BMDMA ATA device where ATA_NIEN is the way to turn IRQ on and off.
>
> Thanks.
>
--
tejun
^ permalink raw reply [flat|nested] 263+ messages in thread
* RE: [git patches] libata fixes
2007-03-12 0:59 ` Linus Torvalds
2007-03-12 6:28 ` Tejun Heo
@ 2007-03-12 7:56 ` Paul Rolland
2007-03-17 17:56 ` Paul Rolland
2 siblings, 0 replies; 263+ messages in thread
From: Paul Rolland @ 2007-03-12 7:56 UTC (permalink / raw)
To: 'Linus Torvalds'
Cc: 'Tejun Heo', 'Jeff Garzik', 'Alan Cox',
'Andrew Morton', linux-ide, 'LKML',
'Eric D. Mudama'
Hello,
> Ok, so that's just a message irritation, not actually bothersome
> otherwise?
It is somewhat painful, because delays involved are quite long, and
it is not possible to explain the machine to "ignore" the port, and
skip to the next one...
> > The second problem is a Jmicron363 controler that is
> failing to detect
> > the DVD-RW that is connected, unless I use the irqpoll
> option as Tejun has
> > suggested.
>
> .. and this one has never worked without irqpoll?
Exactly.
> So it's the irq16 one that is the Jmicron controller and just isn't
> getting any interrupts?
It's IRQ 16 that is reported as affected to the Jmicron from the dmesg
output, yes.
> Since all the other interrupts work (and MSI worked for other
> controllers), I don't think it's interrupt-routing related.
> Especially as MSI shouldn't even care about things like that.
>
> And since it all works when "irqpoll" is used, that implies that the
> *only* thing that is broken is literally irq delivery.
Surely, also if you add the using pci=nomsi doesn't change anything.
> Gaah. Can you get a log through serial console or netconsole
> to see what changed?
I'll try to do that....
Regards,
Paul
^ permalink raw reply [flat|nested] 263+ messages in thread
* RE: [git patches] libata fixes
2007-03-12 6:28 ` Tejun Heo
2007-03-12 6:30 ` Tejun Heo
@ 2007-03-12 8:00 ` Paul Rolland
2007-03-12 8:04 ` Tejun Heo
1 sibling, 1 reply; 263+ messages in thread
From: Paul Rolland @ 2007-03-12 8:00 UTC (permalink / raw)
To: 'Tejun Heo', 'Linus Torvalds'
Cc: 'Jeff Garzik', 'Alan Cox',
'Andrew Morton', linux-ide, 'LKML',
'Eric D. Mudama'
Hello,
> It involves a long timeout, so it's bothersome. This is caused by
> Silicon Image 4726/3726 storage processor (SATA Port Multiplier with
> extra features) attached to one of the ICH ports.
Yes, I think this is the part Asus is using for it's EZ-Raid feature
on this motherboard, and they seem to like their EZ-Raid, so it's likely
to become more and more common.
> If the first downstream port in the PMP is empty and it gets reset in
I confirm it is empty in my config.
> work very well with the current ATA reset sequence and gets identified
> only after a few failures thus causing long timeout.
30s to 1min ;(
> I keep forgetting about this. I'll ask SIMG how to deal with
> this. For
> the time being, connecting a device to the PMP port should remove the
> timeouts.
That sounds a quite expensive solution ;)
Paul
^ permalink raw reply [flat|nested] 263+ messages in thread
* Re: [git patches] libata fixes
2007-03-12 8:00 ` Paul Rolland
@ 2007-03-12 8:04 ` Tejun Heo
2007-03-12 9:58 ` Paul Rolland
2007-03-17 17:59 ` Paul Rolland
0 siblings, 2 replies; 263+ messages in thread
From: Tejun Heo @ 2007-03-12 8:04 UTC (permalink / raw)
To: rol
Cc: 'Linus Torvalds', 'Jeff Garzik',
'Alan Cox', 'Andrew Morton',
linux-ide, 'LKML', 'Eric D. Mudama'
Paul Rolland wrote:
>> I keep forgetting about this. I'll ask SIMG how to deal with
>> this. For
>> the time being, connecting a device to the PMP port should remove the
>> timeouts.
>
> That sounds a quite expensive solution ;)
You should be able to just move the drive attached at ata1 to ata2.
Please report whether that works.
--
tejun
^ permalink raw reply [flat|nested] 263+ messages in thread
* RE: [git patches] libata fixes
2007-03-12 8:04 ` Tejun Heo
@ 2007-03-12 9:58 ` Paul Rolland
2007-03-17 17:59 ` Paul Rolland
1 sibling, 0 replies; 263+ messages in thread
From: Paul Rolland @ 2007-03-12 9:58 UTC (permalink / raw)
To: 'Tejun Heo'
Cc: 'Linus Torvalds', 'Jeff Garzik',
'Alan Cox', 'Andrew Morton',
linux-ide, 'LKML', 'Eric D. Mudama'
Hello,
> > That sounds a quite expensive solution ;)
>
> You should be able to just move the drive attached at ata1 to ata2.
> Please report whether that works.
I'll try to find an unused disk... As I said, these ports are part of
Asus EZRaid solution, and i'd prefer this piece of code not to try to
write anything on the disk ;)
... but I should find a disk without too much problem.
Paul
^ permalink raw reply [flat|nested] 263+ messages in thread
* RE: [git patches] libata fixes
2007-03-12 0:59 ` Linus Torvalds
2007-03-12 6:28 ` Tejun Heo
2007-03-12 7:56 ` Paul Rolland
@ 2007-03-17 17:56 ` Paul Rolland
2 siblings, 0 replies; 263+ messages in thread
From: Paul Rolland @ 2007-03-17 17:56 UTC (permalink / raw)
To: 'Linus Torvalds'
Cc: 'Tejun Heo', 'Jeff Garzik', 'Alan Cox',
'Andrew Morton', linux-ide, 'LKML',
'Eric D. Mudama'
> > PS : I'd like to try 2.6.21-rc3, but it seems that this is
> breaking my
> > config : disk naming is no more the same, and I end up with a panic
> > Warning: unable to open an initial console
> > though i've been compiling with the same .config I was
> using for 2.6.21-rc2
>
> Gaah. Can you get a log through serial console or netconsole
> to see what changed?
>
Sorry, I've had no time this week for that.
I've just switch to 2.6.21-rc4, and carefully restored config from 2.6.21-rc2,
and boot is Ok...
So, I must have done something bad when building 2.6.21-rc3, sorry for the
noise.
Regards,
Paul
^ permalink raw reply [flat|nested] 263+ messages in thread
* RE: [git patches] libata fixes
2007-03-12 8:04 ` Tejun Heo
2007-03-12 9:58 ` Paul Rolland
@ 2007-03-17 17:59 ` Paul Rolland
2007-03-17 18:44 ` Alan Cox
` (2 more replies)
1 sibling, 3 replies; 263+ messages in thread
From: Paul Rolland @ 2007-03-17 17:59 UTC (permalink / raw)
To: 'Tejun Heo'
Cc: 'Linus Torvalds', 'Jeff Garzik',
'Alan Cox', 'Andrew Morton',
linux-ide, 'LKML', 'Eric D. Mudama'
Hello,
I'm preparing to attach a disk.
In the meantime, I've rebuild a 2.6.21-rc4, and got that while booting :
...
ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
ata1.00: ATA-7: Maxtor 6L250S0, BANC1G10, max UDMA/133
ata1.00: 490234752 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata1.00: configured for UDMA/133
...
Adding 2096436k swap on /dev/sde5. Priority:-1 extents:1 across:2096436k
Adding 4192956k swap on /dev/sda3. Priority:-2 extents:1 across:4192956k
ata1.00: exception Emask 0x2 SAct 0x7fffffc3 SErr 0x0 action 0x2 frozen
ata1.00: (spurious completions during NCQ issue=0x0 SAct=0x7fffffc3
FIS=004040a1:00000020)
ata1.00: cmd 60/01:00:52:eb:ff/00:00:09:00:00/40 tag 0 cdb 0x0 data 512 in
res 40/00:08:53:eb:ff/00:00:09:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/40:08:53:eb:ff/00:00:09:00:00/40 tag 1 cdb 0x0 data 32768 in
res 40/00:08:53:eb:ff/00:00:09:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/01:30:39:eb:ff/00:00:09:00:00/40 tag 6 cdb 0x0 data 512 in
res 40/00:08:53:eb:ff/00:00:09:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/01:38:3a:eb:ff/00:00:09:00:00/40 tag 7 cdb 0x0 data 512 in
res 40/00:08:53:eb:ff/00:00:09:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/01:40:3b:eb:ff/00:00:09:00:00/40 tag 8 cdb 0x0 data 512 in
res 40/00:08:53:eb:ff/00:00:09:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/01:48:3c:eb:ff/00:00:09:00:00/40 tag 9 cdb 0x0 data 512 in
res 40/00:08:53:eb:ff/00:00:09:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/01:50:3d:eb:ff/00:00:09:00:00/40 tag 10 cdb 0x0 data 512 in
res 40/00:08:53:eb:ff/00:00:09:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/01:58:3e:eb:ff/00:00:09:00:00/40 tag 11 cdb 0x0 data 512 in
res 40/00:08:53:eb:ff/00:00:09:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/01:60:3f:eb:ff/00:00:09:00:00/40 tag 12 cdb 0x0 data 512 in
res 40/00:08:53:eb:ff/00:00:09:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/01:68:40:eb:ff/00:00:09:00:00/40 tag 13 cdb 0x0 data 512 in
res 40/00:08:53:eb:ff/00:00:09:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/01:70:41:eb:ff/00:00:09:00:00/40 tag 14 cdb 0x0 data 512 in
res 40/00:08:53:eb:ff/00:00:09:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/01:78:42:eb:ff/00:00:09:00:00/40 tag 15 cdb 0x0 data 512 in
res 40/00:08:53:eb:ff/00:00:09:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/01:80:43:eb:ff/00:00:09:00:00/40 tag 16 cdb 0x0 data 512 in
res 40/00:08:53:eb:ff/00:00:09:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/01:88:44:eb:ff/00:00:09:00:00/40 tag 17 cdb 0x0 data 512 in
res 40/00:08:53:eb:ff/00:00:09:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/01:90:45:eb:ff/00:00:09:00:00/40 tag 18 cdb 0x0 data 512 in
res 40/00:08:53:eb:ff/00:00:09:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/01:98:46:eb:ff/00:00:09:00:00/40 tag 19 cdb 0x0 data 512 in
res 40/00:08:53:eb:ff/00:00:09:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/01:a0:47:eb:ff/00:00:09:00:00/40 tag 20 cdb 0x0 data 512 in
res 40/00:08:53:eb:ff/00:00:09:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/01:a8:48:eb:ff/00:00:09:00:00/40 tag 21 cdb 0x0 data 512 in
res 40/00:08:53:eb:ff/00:00:09:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/01:b0:49:eb:ff/00:00:09:00:00/40 tag 22 cdb 0x0 data 512 in
res 40/00:08:53:eb:ff/00:00:09:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/01:b8:4a:eb:ff/00:00:09:00:00/40 tag 23 cdb 0x0 data 512 in
res 40/00:08:53:eb:ff/00:00:09:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/01:c0:4b:eb:ff/00:00:09:00:00/40 tag 24 cdb 0x0 data 512 in
res 40/00:08:53:eb:ff/00:00:09:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/01:c8:4c:eb:ff/00:00:09:00:00/40 tag 25 cdb 0x0 data 512 in
res 40/00:08:53:eb:ff/00:00:09:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/01:d0:4d:eb:ff/00:00:09:00:00/40 tag 26 cdb 0x0 data 512 in
res 40/00:08:53:eb:ff/00:00:09:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/01:d8:4e:eb:ff/00:00:09:00:00/40 tag 27 cdb 0x0 data 512 in
res 40/00:08:53:eb:ff/00:00:09:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/01:e0:4f:eb:ff/00:00:09:00:00/40 tag 28 cdb 0x0 data 512 in
res 40/00:08:53:eb:ff/00:00:09:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/01:e8:50:eb:ff/00:00:09:00:00/40 tag 29 cdb 0x0 data 512 in
res 40/00:08:53:eb:ff/00:00:09:00:00/40 Emask 0x2 (HSM violation)
ata1.00: cmd 60/01:f0:51:eb:ff/00:00:09:00:00/40 tag 30 cdb 0x0 data 512 in
res 40/00:08:53:eb:ff/00:00:09:00:00/40 Emask 0x2 (HSM violation)
ata1: soft resetting port
Kernel is a stock 2.6.21-rc4 I've just downloaded... I seem to remember
this could be NCQ-related, and my disk should have been blacklisted,
but is this already in 2.6.21-rc4 ?
Regards,
Paul
Paul Rolland, rol(at)as2917.net
ex-AS2917 Network administrator and Peering Coordinator
--
Please no HTML, I'm not a browser - Pas d'HTML, je ne suis pas un navigateur
"Some people dream of success... while others wake up and work hard at it"
"I worry about my child and the Internet all the time, even though she's too
young to have logged on yet. Here's what I worry about. I worry that 10 or 15
years from now, she will come to me and say 'Daddy, where were you when they
took freedom of the press away from the Internet?'"
--Mike Godwin, Electronic Frontier Foundation
> -----Original Message-----
> From: linux-kernel-owner@vger.kernel.org
> [mailto:linux-kernel-owner@vger.kernel.org] On Behalf Of Tejun Heo
> Sent: Monday, March 12, 2007 9:05 AM
> To: rol@as2917.net
> Cc: 'Linus Torvalds'; 'Jeff Garzik'; 'Alan Cox'; 'Andrew
> Morton'; linux-ide@vger.kernel.org; 'LKML'; 'Eric D. Mudama'
> Subject: Re: [git patches] libata fixes
>
> Paul Rolland wrote:
> >> I keep forgetting about this. I'll ask SIMG how to deal with
> >> this. For
> >> the time being, connecting a device to the PMP port should
> remove the
> >> timeouts.
> >
> > That sounds a quite expensive solution ;)
>
> You should be able to just move the drive attached at ata1 to ata2.
> Please report whether that works.
>
> --
> tejun
> -
> To unsubscribe from this list: send the line "unsubscribe
> linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
^ permalink raw reply [flat|nested] 263+ messages in thread
* Re: [git patches] libata fixes
2007-03-17 17:59 ` Paul Rolland
@ 2007-03-17 18:44 ` Alan Cox
2007-03-17 18:47 ` Paul Rolland
2007-03-17 19:42 ` Tejun Heo
2 siblings, 0 replies; 263+ messages in thread
From: Alan Cox @ 2007-03-17 18:44 UTC (permalink / raw)
To: Paul Rolland
Cc: 'Tejun Heo', 'Linus Torvalds',
'Jeff Garzik', 'Alan Cox',
'Andrew Morton', linux-ide, 'LKML',
'Eric D. Mudama'
On Sat, Mar 17, 2007 at 06:59:12PM +0100, Paul Rolland wrote:
> ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
> ata1.00: ATA-7: Maxtor 6L250S0, BANC1G10, max UDMA/133
That drive isn't in our current block list for NCQ but some close
relatives are in the one I've compiled so far (7B250S0). If you add it to
the blacklist it behave ?
Also what controller ?
^ permalink raw reply [flat|nested] 263+ messages in thread
* RE: [git patches] libata fixes
2007-03-17 17:59 ` Paul Rolland
2007-03-17 18:44 ` Alan Cox
@ 2007-03-17 18:47 ` Paul Rolland
2007-03-17 18:56 ` Alan Cox
2007-03-17 19:42 ` Tejun Heo
2 siblings, 1 reply; 263+ messages in thread
From: Paul Rolland @ 2007-03-17 18:47 UTC (permalink / raw)
To: rol, 'Tejun Heo'
Cc: 'Linus Torvalds', 'Jeff Garzik',
'Alan Cox', 'Andrew Morton',
linux-ide, 'LKML', 'Eric D. Mudama'
Hello,
Here is a patch to avoid these pesky messages for the Maxtor disk :
--- linux-2.6.21-rc4/drivers/ata/libata-core.c 2007-03-17 19:29:45.000000000
+0100
+++ linux-2.6.21-rc4-Maxtor/drivers/ata/libata-core.c 2007-03-17
19:37:28.000000000 +0100
@@ -3359,6 +3359,8 @@
{ "WDC WD740ADFD-00", NULL, ATA_HORKAGE_NONCQ },
/* http://thread.gmane.org/gmane.linux.ide/14907 */
{ "FUJITSU MHT2060BH", NULL, ATA_HORKAGE_NONCQ },
+ /* NCQ is broken */
+ { "Maxtor 6L250S0", NULL, ATA_HORKAGE_NONCQ },
/* Devices with NCQ limits */
Signed-off-by: Paul Rolland <rol@as2917.net>
With this applied, my machine has stopped all those painful messages.
dmesg now says :
root@riri:/Kernels# dmesg | grep LBA
ata1.00: 490234752 sectors, multi 0: LBA48 NCQ (not used)
ata2.00: 640 sectors, multi 1: LBA
ata3.00: 490234752 sectors, multi 0: LBA48 NCQ (not used)
instead of NCQ (depth 31/32), but there doesn't seem to be any adverse
effects.
Regards,
Paul
Paul Rolland, rol(at)as2917.net
ex-AS2917 Network administrator and Peering Coordinator
--
Please no HTML, I'm not a browser - Pas d'HTML, je ne suis pas un navigateur
"Some people dream of success... while others wake up and work hard at it"
"I worry about my child and the Internet all the time, even though she's too
young to have logged on yet. Here's what I worry about. I worry that 10 or 15
years from now, she will come to me and say 'Daddy, where were you when they
took freedom of the press away from the Internet?'"
--Mike Godwin, Electronic Frontier Foundation
> -----Original Message-----
> From: linux-kernel-owner@vger.kernel.org
> [mailto:linux-kernel-owner@vger.kernel.org] On Behalf Of Paul Rolland
> Sent: Saturday, March 17, 2007 6:59 PM
> To: 'Tejun Heo'
> Cc: 'Linus Torvalds'; 'Jeff Garzik'; 'Alan Cox'; 'Andrew
> Morton'; linux-ide@vger.kernel.org; 'LKML'; 'Eric D. Mudama'
> Subject: RE: [git patches] libata fixes
>
> Hello,
>
> I'm preparing to attach a disk.
> In the meantime, I've rebuild a 2.6.21-rc4, and got that
> while booting :
> ...
> ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
> ata1.00: ATA-7: Maxtor 6L250S0, BANC1G10, max UDMA/133
> ata1.00: 490234752 sectors, multi 0: LBA48 NCQ (depth 31/32)
> ata1.00: configured for UDMA/133
> ...
> Adding 2096436k swap on /dev/sde5. Priority:-1 extents:1
> across:2096436k
> Adding 4192956k swap on /dev/sda3. Priority:-2 extents:1
> across:4192956k
> ata1.00: exception Emask 0x2 SAct 0x7fffffc3 SErr 0x0 action
> 0x2 frozen
> ata1.00: (spurious completions during NCQ issue=0x0 SAct=0x7fffffc3
> FIS=004040a1:00000020)
> ata1.00: cmd 60/01:00:52:eb:ff/00:00:09:00:00/40 tag 0 cdb
> 0x0 data 512 in
> res 40/00:08:53:eb:ff/00:00:09:00:00/40 Emask 0x2
> (HSM violation)
> ata1.00: cmd 60/40:08:53:eb:ff/00:00:09:00:00/40 tag 1 cdb
> 0x0 data 32768 in
> res 40/00:08:53:eb:ff/00:00:09:00:00/40 Emask 0x2
> (HSM violation)
> ata1.00: cmd 60/01:30:39:eb:ff/00:00:09:00:00/40 tag 6 cdb
> 0x0 data 512 in
> res 40/00:08:53:eb:ff/00:00:09:00:00/40 Emask 0x2
> (HSM violation)
> ata1.00: cmd 60/01:38:3a:eb:ff/00:00:09:00:00/40 tag 7 cdb
> 0x0 data 512 in
> res 40/00:08:53:eb:ff/00:00:09:00:00/40 Emask 0x2
> (HSM violation)
> ata1.00: cmd 60/01:40:3b:eb:ff/00:00:09:00:00/40 tag 8 cdb
> 0x0 data 512 in
> res 40/00:08:53:eb:ff/00:00:09:00:00/40 Emask 0x2
> (HSM violation)
> ata1.00: cmd 60/01:48:3c:eb:ff/00:00:09:00:00/40 tag 9 cdb
> 0x0 data 512 in
> res 40/00:08:53:eb:ff/00:00:09:00:00/40 Emask 0x2
> (HSM violation)
> ata1.00: cmd 60/01:50:3d:eb:ff/00:00:09:00:00/40 tag 10 cdb
> 0x0 data 512 in
> res 40/00:08:53:eb:ff/00:00:09:00:00/40 Emask 0x2
> (HSM violation)
> ata1.00: cmd 60/01:58:3e:eb:ff/00:00:09:00:00/40 tag 11 cdb
> 0x0 data 512 in
> res 40/00:08:53:eb:ff/00:00:09:00:00/40 Emask 0x2
> (HSM violation)
> ata1.00: cmd 60/01:60:3f:eb:ff/00:00:09:00:00/40 tag 12 cdb
> 0x0 data 512 in
> res 40/00:08:53:eb:ff/00:00:09:00:00/40 Emask 0x2
> (HSM violation)
> ata1.00: cmd 60/01:68:40:eb:ff/00:00:09:00:00/40 tag 13 cdb
> 0x0 data 512 in
> res 40/00:08:53:eb:ff/00:00:09:00:00/40 Emask 0x2
> (HSM violation)
> ata1.00: cmd 60/01:70:41:eb:ff/00:00:09:00:00/40 tag 14 cdb
> 0x0 data 512 in
> res 40/00:08:53:eb:ff/00:00:09:00:00/40 Emask 0x2
> (HSM violation)
> ata1.00: cmd 60/01:78:42:eb:ff/00:00:09:00:00/40 tag 15 cdb
> 0x0 data 512 in
> res 40/00:08:53:eb:ff/00:00:09:00:00/40 Emask 0x2
> (HSM violation)
> ata1.00: cmd 60/01:80:43:eb:ff/00:00:09:00:00/40 tag 16 cdb
> 0x0 data 512 in
> res 40/00:08:53:eb:ff/00:00:09:00:00/40 Emask 0x2
> (HSM violation)
> ata1.00: cmd 60/01:88:44:eb:ff/00:00:09:00:00/40 tag 17 cdb
> 0x0 data 512 in
> res 40/00:08:53:eb:ff/00:00:09:00:00/40 Emask 0x2
> (HSM violation)
> ata1.00: cmd 60/01:90:45:eb:ff/00:00:09:00:00/40 tag 18 cdb
> 0x0 data 512 in
> res 40/00:08:53:eb:ff/00:00:09:00:00/40 Emask 0x2
> (HSM violation)
> ata1.00: cmd 60/01:98:46:eb:ff/00:00:09:00:00/40 tag 19 cdb
> 0x0 data 512 in
> res 40/00:08:53:eb:ff/00:00:09:00:00/40 Emask 0x2
> (HSM violation)
> ata1.00: cmd 60/01:a0:47:eb:ff/00:00:09:00:00/40 tag 20 cdb
> 0x0 data 512 in
> res 40/00:08:53:eb:ff/00:00:09:00:00/40 Emask 0x2
> (HSM violation)
> ata1.00: cmd 60/01:a8:48:eb:ff/00:00:09:00:00/40 tag 21 cdb
> 0x0 data 512 in
> res 40/00:08:53:eb:ff/00:00:09:00:00/40 Emask 0x2
> (HSM violation)
> ata1.00: cmd 60/01:b0:49:eb:ff/00:00:09:00:00/40 tag 22 cdb
> 0x0 data 512 in
> res 40/00:08:53:eb:ff/00:00:09:00:00/40 Emask 0x2
> (HSM violation)
> ata1.00: cmd 60/01:b8:4a:eb:ff/00:00:09:00:00/40 tag 23 cdb
> 0x0 data 512 in
> res 40/00:08:53:eb:ff/00:00:09:00:00/40 Emask 0x2
> (HSM violation)
> ata1.00: cmd 60/01:c0:4b:eb:ff/00:00:09:00:00/40 tag 24 cdb
> 0x0 data 512 in
> res 40/00:08:53:eb:ff/00:00:09:00:00/40 Emask 0x2
> (HSM violation)
> ata1.00: cmd 60/01:c8:4c:eb:ff/00:00:09:00:00/40 tag 25 cdb
> 0x0 data 512 in
> res 40/00:08:53:eb:ff/00:00:09:00:00/40 Emask 0x2
> (HSM violation)
> ata1.00: cmd 60/01:d0:4d:eb:ff/00:00:09:00:00/40 tag 26 cdb
> 0x0 data 512 in
> res 40/00:08:53:eb:ff/00:00:09:00:00/40 Emask 0x2
> (HSM violation)
> ata1.00: cmd 60/01:d8:4e:eb:ff/00:00:09:00:00/40 tag 27 cdb
> 0x0 data 512 in
> res 40/00:08:53:eb:ff/00:00:09:00:00/40 Emask 0x2
> (HSM violation)
> ata1.00: cmd 60/01:e0:4f:eb:ff/00:00:09:00:00/40 tag 28 cdb
> 0x0 data 512 in
> res 40/00:08:53:eb:ff/00:00:09:00:00/40 Emask 0x2
> (HSM violation)
> ata1.00: cmd 60/01:e8:50:eb:ff/00:00:09:00:00/40 tag 29 cdb
> 0x0 data 512 in
> res 40/00:08:53:eb:ff/00:00:09:00:00/40 Emask 0x2
> (HSM violation)
> ata1.00: cmd 60/01:f0:51:eb:ff/00:00:09:00:00/40 tag 30 cdb
> 0x0 data 512 in
> res 40/00:08:53:eb:ff/00:00:09:00:00/40 Emask 0x2
> (HSM violation)
> ata1: soft resetting port
>
> Kernel is a stock 2.6.21-rc4 I've just downloaded... I seem
> to remember
> this could be NCQ-related, and my disk should have been blacklisted,
> but is this already in 2.6.21-rc4 ?
>
> Regards,
> Paul
>
> Paul Rolland, rol(at)as2917.net
> ex-AS2917 Network administrator and Peering Coordinator
>
> --
>
> Please no HTML, I'm not a browser - Pas d'HTML, je ne suis
> pas un navigateur
> "Some people dream of success... while others wake up and
> work hard at it"
>
> "I worry about my child and the Internet all the time, even
> though she's too
> young to have logged on yet. Here's what I worry about. I
> worry that 10 or 15
> years from now, she will come to me and say 'Daddy, where
> were you when they
> took freedom of the press away from the Internet?'"
> --Mike Godwin, Electronic Frontier Foundation
>
>
> > -----Original Message-----
> > From: linux-kernel-owner@vger.kernel.org
> > [mailto:linux-kernel-owner@vger.kernel.org] On Behalf Of Tejun Heo
> > Sent: Monday, March 12, 2007 9:05 AM
> > To: rol@as2917.net
> > Cc: 'Linus Torvalds'; 'Jeff Garzik'; 'Alan Cox'; 'Andrew
> > Morton'; linux-ide@vger.kernel.org; 'LKML'; 'Eric D. Mudama'
> > Subject: Re: [git patches] libata fixes
> >
> > Paul Rolland wrote:
> > >> I keep forgetting about this. I'll ask SIMG how to deal with
> > >> this. For
> > >> the time being, connecting a device to the PMP port should
> > remove the
> > >> timeouts.
> > >
> > > That sounds a quite expensive solution ;)
> >
> > You should be able to just move the drive attached at ata1 to ata2.
> > Please report whether that works.
> >
> > --
> > tejun
> > -
> > To unsubscribe from this list: send the line "unsubscribe
> > linux-kernel" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at http://www.tux.org/lkml/
> >
>
> -
> To unsubscribe from this list: send the line "unsubscribe
> linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
^ permalink raw reply [flat|nested] 263+ messages in thread
* Re: [git patches] libata fixes
2007-03-17 18:47 ` Paul Rolland
@ 2007-03-17 18:56 ` Alan Cox
2007-03-17 19:29 ` Paul Rolland
0 siblings, 1 reply; 263+ messages in thread
From: Alan Cox @ 2007-03-17 18:56 UTC (permalink / raw)
To: Paul Rolland
Cc: 'Tejun Heo', 'Linus Torvalds',
'Jeff Garzik', 'Alan Cox',
'Andrew Morton', linux-ide, 'LKML',
'Eric D. Mudama'
On Sat, Mar 17, 2007 at 07:47:01PM +0100, Paul Rolland wrote:
> Hello,
>
> Here is a patch to avoid these pesky messages for the Maxtor disk :
>
Please match the firmware version as well for the Maxtor drives
> --- linux-2.6.21-rc4/drivers/ata/libata-core.c 2007-03-17 19:29:45.000000000
> +0100
> +++ linux-2.6.21-rc4-Maxtor/drivers/ata/libata-core.c 2007-03-17
> 19:37:28.000000000 +0100
> @@ -3359,6 +3359,8 @@
> { "WDC WD740ADFD-00", NULL, ATA_HORKAGE_NONCQ },
> /* http://thread.gmane.org/gmane.linux.ide/14907 */
> { "FUJITSU MHT2060BH", NULL, ATA_HORKAGE_NONCQ },
> + /* NCQ is broken */
> + { "Maxtor 6L250S0", NULL, ATA_HORKAGE_NONCQ },
>
> /* Devices with NCQ limits */
>
>
> Signed-off-by: Paul Rolland <rol@as2917.net>
NAK - but add the firmware to the match and you can have an Ack 8)
^ permalink raw reply [flat|nested] 263+ messages in thread
* RE: [git patches] libata fixes
2007-03-17 18:56 ` Alan Cox
@ 2007-03-17 19:29 ` Paul Rolland
2007-03-17 19:56 ` Alan Cox
0 siblings, 1 reply; 263+ messages in thread
From: Paul Rolland @ 2007-03-17 19:29 UTC (permalink / raw)
To: 'Alan Cox'
Cc: 'Tejun Heo', 'Linus Torvalds',
'Jeff Garzik', 'Andrew Morton',
linux-ide, 'LKML', 'Eric D. Mudama'
Hello,
> Please match the firmware version as well for the Maxtor drives
Ok.
> > --- linux-2.6.21-rc4/drivers/ata/libata-core.c 2007-03-17
> 19:29:45.000000000
> > +0100
> > +++ linux-2.6.21-rc4-Maxtor/drivers/ata/libata-core.c 2007-03-17
> > 19:37:28.000000000 +0100
> > @@ -3359,6 +3359,8 @@
> > { "WDC WD740ADFD-00", NULL, ATA_HORKAGE_NONCQ },
> > /* http://thread.gmane.org/gmane.linux.ide/14907 */
> > { "FUJITSU MHT2060BH", NULL, ATA_HORKAGE_NONCQ },
> > + /* NCQ is broken */
> > + { "Maxtor 6L250S0", NULL,
> ATA_HORKAGE_NONCQ },
> >
> > /* Devices with NCQ limits */
> >
> >
> > Signed-off-by: Paul Rolland <rol@as2917.net>
>
> NAK - but add the firmware to the match and you can have an Ack 8)
Second try, compiled _and_ boot tested, of course.
dmesg says :
ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
ata1.00: ATA-7: Maxtor 6L250S0, BANC1G10, max UDMA/133
ata1.00: 490234752 sectors, multi 0: LBA48 NCQ (not used)
ata1.00: configured for UDMA/133
--- linux-2.6.21-rc4/drivers/ata/libata-core.c 2007-03-17 19:47:49.000000000
+0100
+++ linux-2.6.21-rc4-Maxtor/drivers/ata/libata-core.c 2007-03-17
20:24:01.000000000 +0100
@@ -3359,6 +3359,8 @@
{ "WDC WD740ADFD-00", NULL, ATA_HORKAGE_NONCQ },
/* http://thread.gmane.org/gmane.linux.ide/14907 */
{ "FUJITSU MHT2060BH", NULL, ATA_HORKAGE_NONCQ },
+ /* NCQ is broken */
+ { "Maxtor 6L250S0", "BANC1G10", ATA_HORKAGE_NONCQ },
/* Devices with NCQ limits */
Signed-off-by: Paul Rolland <rol@as2917.net>
Regards,
Paul
^ permalink raw reply [flat|nested] 263+ messages in thread
* Re: [git patches] libata fixes
2007-03-17 17:59 ` Paul Rolland
2007-03-17 18:44 ` Alan Cox
2007-03-17 18:47 ` Paul Rolland
@ 2007-03-17 19:42 ` Tejun Heo
2007-03-17 19:47 ` Paul Rolland
2 siblings, 1 reply; 263+ messages in thread
From: Tejun Heo @ 2007-03-17 19:42 UTC (permalink / raw)
To: rol
Cc: 'Linus Torvalds', 'Jeff Garzik',
'Alan Cox', 'Andrew Morton',
linux-ide, 'LKML', 'Eric D. Mudama'
Paul Rolland wrote:
> Hello,
>
> I'm preparing to attach a disk.
> In the meantime, I've rebuild a 2.6.21-rc4, and got that while booting :
> ...
> ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
> ata1.00: ATA-7: Maxtor 6L250S0, BANC1G10, max UDMA/133
> ata1.00: 490234752 sectors, multi 0: LBA48 NCQ (depth 31/32)
> ata1.00: configured for UDMA/133
> ...
> Adding 2096436k swap on /dev/sde5. Priority:-1 extents:1 across:2096436k
> Adding 4192956k swap on /dev/sda3. Priority:-2 extents:1 across:4192956k
> ata1.00: exception Emask 0x2 SAct 0x7fffffc3 SErr 0x0 action 0x2 frozen
> ata1.00: (spurious completions during NCQ issue=0x0 SAct=0x7fffffc3
> FIS=004040a1:00000020)
> ata1.00: cmd 60/01:00:52:eb:ff/00:00:09:00:00/40 tag 0 cdb 0x0 data 512 in
> res 40/00:08:53:eb:ff/00:00:09:00:00/40 Emask 0x2 (HSM violation)
If you leave it alone, does libata turn off NCQ and boot continues?
--
tejun
^ permalink raw reply [flat|nested] 263+ messages in thread
* RE: [git patches] libata fixes
2007-03-17 19:42 ` Tejun Heo
@ 2007-03-17 19:47 ` Paul Rolland
2007-03-17 20:02 ` Tejun Heo
0 siblings, 1 reply; 263+ messages in thread
From: Paul Rolland @ 2007-03-17 19:47 UTC (permalink / raw)
To: 'Tejun Heo'
Cc: 'Linus Torvalds', 'Jeff Garzik',
'Alan Cox', 'Andrew Morton',
linux-ide, 'LKML', 'Eric D. Mudama'
> If you leave it alone, does libata turn off NCQ and boot continues?
boot continues, but I can't tell anything about libata turning of NCQ...
I've had a bunch of them at some while while compiling some kernel, so it
was quite some time after booting.
Is there a message I can check for that would indicate NCQ being turned
off ?
Regards,
Paul
^ permalink raw reply [flat|nested] 263+ messages in thread
* Re: [git patches] libata fixes
2007-03-17 19:29 ` Paul Rolland
@ 2007-03-17 19:56 ` Alan Cox
0 siblings, 0 replies; 263+ messages in thread
From: Alan Cox @ 2007-03-17 19:56 UTC (permalink / raw)
To: Paul Rolland
Cc: 'Alan Cox', 'Tejun Heo', 'Linus Torvalds',
'Jeff Garzik', 'Andrew Morton',
linux-ide, 'LKML', 'Eric D. Mudama'
> > >
> > >
> > > Signed-off-by: Paul Rolland <rol@as2917.net>
> >
> > NAK - but add the firmware to the match and you can have an Ack 8)
>
> Second try, compiled _and_ boot tested, of course.
>
> dmesg says :
> ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
> ata1.00: ATA-7: Maxtor 6L250S0, BANC1G10, max UDMA/133
> ata1.00: 490234752 sectors, multi 0: LBA48 NCQ (not used)
> ata1.00: configured for UDMA/133
>
> --- linux-2.6.21-rc4/drivers/ata/libata-core.c 2007-03-17 19:47:49.000000000
> +0100
> +++ linux-2.6.21-rc4-Maxtor/drivers/ata/libata-core.c 2007-03-17
> 20:24:01.000000000 +0100
> @@ -3359,6 +3359,8 @@
> { "WDC WD740ADFD-00", NULL, ATA_HORKAGE_NONCQ },
> /* http://thread.gmane.org/gmane.linux.ide/14907 */
> { "FUJITSU MHT2060BH", NULL, ATA_HORKAGE_NONCQ },
> + /* NCQ is broken */
> + { "Maxtor 6L250S0", "BANC1G10", ATA_HORKAGE_NONCQ },
>
> /* Devices with NCQ limits */
>
> Signed-off-by: Paul Rolland <rol@as2917.net>
Acked-by: Alan Cox <alan@redhat.com>
--
'YKYHBRTFDriverSTLW: you catch yourself saying "enough horrors for today"
and picking Lovecraft to relax...' -- Al Viro
^ permalink raw reply [flat|nested] 263+ messages in thread
* Re: [git patches] libata fixes
2007-03-17 19:47 ` Paul Rolland
@ 2007-03-17 20:02 ` Tejun Heo
2007-03-17 20:08 ` Paul Rolland
0 siblings, 1 reply; 263+ messages in thread
From: Tejun Heo @ 2007-03-17 20:02 UTC (permalink / raw)
To: rol
Cc: 'Linus Torvalds', 'Jeff Garzik',
'Alan Cox', 'Andrew Morton',
linux-ide, 'LKML', 'Eric D. Mudama'
Paul Rolland wrote:
>> If you leave it alone, does libata turn off NCQ and boot continues?
>
> boot continues, but I can't tell anything about libata turning of NCQ...
> I've had a bunch of them at some while while compiling some kernel, so it
> was quite some time after booting.
>
> Is there a message I can check for that would indicate NCQ being turned
> off ?
The kernel says that NCQ is turned off due to excessive errors. If your
HSM violation is intermittent, it might not trigger tho.
--
tejun
^ permalink raw reply [flat|nested] 263+ messages in thread
* RE: [git patches] libata fixes
2007-03-17 20:02 ` Tejun Heo
@ 2007-03-17 20:08 ` Paul Rolland
2007-03-18 4:52 ` Tejun Heo
0 siblings, 1 reply; 263+ messages in thread
From: Paul Rolland @ 2007-03-17 20:08 UTC (permalink / raw)
To: 'Tejun Heo'
Cc: 'Linus Torvalds', 'Jeff Garzik',
'Alan Cox', 'Andrew Morton',
linux-ide, 'LKML', 'Eric D. Mudama'
Hello,
> The kernel says that NCQ is turned off due to excessive
> errors. If your
> HSM violation is intermittent, it might not trigger tho.
I've just grep'ed thru all my messages, and I can't find anything
stating that NCQ is being turned off...
Paul
^ permalink raw reply [flat|nested] 263+ messages in thread
* Re: [git patches] libata fixes
2007-03-17 20:08 ` Paul Rolland
@ 2007-03-18 4:52 ` Tejun Heo
2007-03-18 10:09 ` Paul Rolland
0 siblings, 1 reply; 263+ messages in thread
From: Tejun Heo @ 2007-03-18 4:52 UTC (permalink / raw)
To: rol
Cc: 'Linus Torvalds', 'Jeff Garzik',
'Alan Cox', 'Andrew Morton',
linux-ide, 'LKML', 'Eric D. Mudama'
Paul Rolland wrote:
> Hello,
>
>> The kernel says that NCQ is turned off due to excessive
>> errors. If your
>> HSM violation is intermittent, it might not trigger tho.
>
> I've just grep'ed thru all my messages, and I can't find anything
> stating that NCQ is being turned off...
Can you put the harddisk under high load and see what happens? How
often do those errors occur? Care to post full dmesg?
--
tejun
^ permalink raw reply [flat|nested] 263+ messages in thread
* RE: [git patches] libata fixes
2007-03-18 4:52 ` Tejun Heo
@ 2007-03-18 10:09 ` Paul Rolland
2007-03-18 10:28 ` Tejun Heo
0 siblings, 1 reply; 263+ messages in thread
From: Paul Rolland @ 2007-03-18 10:09 UTC (permalink / raw)
To: 'Tejun Heo'
Cc: 'Linus Torvalds', 'Jeff Garzik',
'Alan Cox', 'Andrew Morton',
linux-ide, 'LKML', 'Eric D. Mudama'
Hello,
> Can you put the harddisk under high load and see what happens? How
> often do those errors occur? Care to post full dmesg?
I started again a stock 2.6.21-rc4, and ran that :
while (/bin/true); do tar jxf linux-2.6.19.1.tar.bz2; rm -rf linux-2.6.19.1;
echo -n "."; done
After several minutes (I waited more than 300 loops to be completed), and
a lot of errors, I finally managed to see :
Mar 18 10:32:47 riri kernel: ata1.00: NCQ disabled due to excessive errors
/var/log/messages contains :
Mar 18 10:15:04 riri syslogd 1.4.1#17ubuntu7: restart.
Mar 18 10:15:04 riri kernel: Inspecting /boot/System.map-2.6.21-rc4
Mar 18 10:15:04 riri kernel: Loaded 39327 symbols from
/boot/System.map-2.6.21-rc4.
Mar 18 10:15:04 riri kernel: Symbols match kernel version 2.6.21.
Mar 18 10:15:04 riri kernel: No module symbols loaded - kernel modules not
enabled.
Mar 18 10:15:04 riri kernel: Linux version 2.6.21-rc4 (root@riri.as2917.net)
(gcc version 4.0.3 (Ubuntu 4.0.3-1ubuntu5)) #1 SMP PREEMPT Sat Mar 17 18:50:10
CET 2007
Mar 18 10:15:04 riri kernel: Command line: root=/dev/sde1 ro ata2=noprobe
console=ttyS0,9600 console=tty0 vga=extended irqpoll
Mar 18 10:15:04 riri kernel: BIOS-provided physical RAM map:
Mar 18 10:15:04 riri kernel: BIOS-e820: 0000000000000000 - 000000000009fc00
(usable)
Mar 18 10:15:04 riri kernel: BIOS-e820: 000000000009fc00 - 00000000000a0000
(reserved)
Mar 18 10:15:04 riri kernel: BIOS-e820: 00000000000e4000 - 0000000000100000
(reserved)
Mar 18 10:15:04 riri kernel: BIOS-e820: 0000000000100000 - 00000000c7f80000
(usable)
Mar 18 10:15:04 riri kernel: BIOS-e820: 00000000c7f80000 - 00000000c7f8e000
(ACPI data)
Mar 18 10:15:04 riri kernel: BIOS-e820: 00000000c7f8e000 - 00000000c7fe0000
(ACPI NVS)
Mar 18 10:15:04 riri kernel: BIOS-e820: 00000000c7fe0000 - 00000000c8000000
(reserved)
Mar 18 10:15:04 riri kernel: BIOS-e820: 00000000ffb00000 - 0000000100000000
(reserved)
Mar 18 10:15:04 riri kernel: end_pfn_map = 1048576
Mar 18 10:15:04 riri kernel: DMI 2.4 present.
Mar 18 10:15:04 riri kernel: ACPI: RSDP 000FAF20, 0024 (r2 ACPIAM)
Mar 18 10:15:04 riri kernel: ACPI: XSDT C7F80100, 005C (r1 A_M_I_ OEMXSDT
12000608 MSFT 97)
Mar 18 10:15:04 riri kernel: ACPI: FACP C7F80290, 00F4 (r3 A_M_I_ OEMFACP
12000608 MSFT 97)
Mar 18 10:15:04 riri kernel: ACPI: DSDT C7F80410, 8FC4 (r1 A0543 A0543000
0 INTL 20060113)
Mar 18 10:15:04 riri kernel: ACPI: FACS C7F8E000, 0040
Mar 18 10:15:04 riri kernel: ACPI: APIC C7F80390, 0080 (r1 A_M_I_ OEMAPIC
12000608 MSFT 97)
Mar 18 10:15:04 riri kernel: ACPI: OEMB C7F8E040, 0066 (r1 A_M_I_ AMI_OEM
12000608 MSFT 97)
Mar 18 10:15:04 riri kernel: ACPI: HPET C7F893E0, 0038 (r1 A_M_I_ OEMHPET
12000608 MSFT 97)
Mar 18 10:15:04 riri kernel: ACPI: MCFG C7F89420, 003C (r1 A_M_I_ OEMMCFG
12000608 MSFT 97)
Mar 18 10:15:04 riri kernel: ACPI: SSDT C7F8E0B0, 01C6 (r1 AMI CPU1PM
1 INTL 20060113)
Mar 18 10:15:04 riri kernel: ACPI: SSDT C7F8E280, 013A (r1 AMI CPU2PM
1 INTL 20060113)
Mar 18 10:15:04 riri kernel: Zone PFN ranges:
Mar 18 10:15:04 riri kernel: DMA 0 -> 4096
Mar 18 10:15:04 riri kernel: DMA32 4096 -> 1048576
Mar 18 10:15:04 riri kernel: Normal 1048576 -> 1048576
Mar 18 10:15:04 riri kernel: early_node_map[2] active PFN ranges
Mar 18 10:15:04 riri kernel: 0: 0 -> 159
Mar 18 10:15:04 riri kernel: 0: 256 -> 819072
Mar 18 10:15:04 riri kernel: ACPI: PM-Timer IO Port: 0x808
Mar 18 10:15:04 riri kernel: ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00]
enabled)
Mar 18 10:15:04 riri kernel: Processor #0 (Bootup-CPU)
Mar 18 10:15:04 riri kernel: ACPI: LAPIC (acpi_id[0x02] lapic_id[0x01]
enabled)
Mar 18 10:15:04 riri kernel: Processor #1
Mar 18 10:15:04 riri kernel: ACPI: LAPIC (acpi_id[0x03] lapic_id[0x82]
disabled)
Mar 18 10:15:04 riri kernel: ACPI: LAPIC (acpi_id[0x04] lapic_id[0x83]
disabled)
Mar 18 10:15:04 riri kernel: ACPI: IOAPIC (id[0x02] address[0xfec00000]
gsi_base[0])
Mar 18 10:15:04 riri kernel: IOAPIC[0]: apic_id 2, address 0xfec00000, GSI
0-23
Mar 18 10:15:04 riri kernel: ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2
dfl dfl)
Mar 18 10:15:04 riri kernel: ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9
high level)
Mar 18 10:15:04 riri kernel: ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2
dfl dfl)
Mar 18 10:15:04 riri kernel: ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9
high level)
Mar 18 10:15:04 riri kernel: Setting APIC routing to flat
Mar 18 10:15:04 riri kernel: ACPI: HPET id: 0x8086a201 base: 0xfed00000
Mar 18 10:15:04 riri kernel: Using ACPI (MADT) for SMP configuration
information
Mar 18 10:15:04 riri kernel: Nosave address range: 000000000009f000 -
00000000000a0000
Mar 18 10:15:04 riri kernel: Nosave address range: 00000000000a0000 -
00000000000e4000
Mar 18 10:15:04 riri kernel: Nosave address range: 00000000000e4000 -
0000000000100000
Mar 18 10:15:04 riri kernel: Allocating PCI resources starting at cc000000
(gap: c8000000:37b00000)
Mar 18 10:15:04 riri kernel: PERCPU: Allocating 34368 bytes of per cpu data
Mar 18 10:15:04 riri kernel: Built 1 zonelists. Total pages: 805789
Mar 18 10:15:04 riri kernel: Kernel command line: root=/dev/sde1 ro
ata2=noprobe console=ttyS0,9600 console=tty0 vga=extended irqpoll
Mar 18 10:15:04 riri kernel: Misrouted IRQ fixup and polling support enabled
Mar 18 10:15:04 riri kernel: This may significantly impact system performance
Mar 18 10:15:04 riri kernel: Initializing CPU#0
Mar 18 10:15:04 riri kernel: PID hash table entries: 4096 (order: 12, 32768
bytes)
Mar 18 10:15:04 riri kernel: time.c: Detected 2400.081 MHz processor.
Mar 18 10:15:04 riri kernel: Console: colour VGA+ 80x50
Mar 18 10:15:04 riri kernel: Dentry cache hash table entries: 524288 (order:
10, 4194304 bytes)
Mar 18 10:15:04 riri kernel: Inode-cache hash table entries: 262144 (order: 9,
2097152 bytes)
Mar 18 10:15:04 riri kernel: Checking aperture...
Mar 18 10:15:04 riri kernel: Memory: 3216492k/3276288k available (4569k kernel
code, 59180k reserved, 2320k data, 296k init)
Mar 18 10:15:04 riri kernel: Calibrating delay using timer specific routine..
4817.93 BogoMIPS (lpj=2408969)
Mar 18 10:15:04 riri kernel: Security Framework v1.0.0 initialized
Mar 18 10:15:04 riri kernel: Capability LSM initialized
Mar 18 10:15:04 riri kernel: Failure registering Root Plug module with the
kernel
Mar 18 10:15:04 riri kernel: Failure registering Root Plug module with
primary security module.
Mar 18 10:15:04 riri kernel: Mount-cache hash table entries: 256
Mar 18 10:15:04 riri kernel: CPU: L1 I cache: 32K, L1 D cache: 32K
Mar 18 10:15:04 riri kernel: CPU: L2 cache: 4096K
Mar 18 10:15:04 riri kernel: using mwait in idle threads.
Mar 18 10:15:04 riri kernel: CPU: Physical Processor ID: 0
Mar 18 10:15:04 riri kernel: CPU: Processor Core ID: 0
Mar 18 10:15:04 riri kernel: CPU0: Thermal monitoring enabled (TM2)
Mar 18 10:15:04 riri kernel: Freeing SMP alternatives: 40k freed
Mar 18 10:15:04 riri kernel: ACPI: Core revision 20070126
Mar 18 10:15:04 riri kernel: Using local APIC timer interrupts.
Mar 18 10:15:04 riri kernel: result 16667212
Mar 18 10:15:04 riri kernel: Detected 16.667 MHz APIC timer.
Mar 18 10:15:04 riri kernel: Booting processor 1/2 APIC 0x1
Mar 18 10:15:04 riri kernel: Initializing CPU#1
Mar 18 10:15:04 riri kernel: Calibrating delay using timer specific routine..
4800.10 BogoMIPS (lpj=2400050)
Mar 18 10:15:04 riri kernel: CPU: L1 I cache: 32K, L1 D cache: 32K
Mar 18 10:15:04 riri kernel: CPU: L2 cache: 4096K
Mar 18 10:15:04 riri kernel: CPU: Physical Processor ID: 0
Mar 18 10:15:04 riri kernel: CPU: Processor Core ID: 1
Mar 18 10:15:04 riri kernel: CPU1: Thermal monitoring enabled (TM2)
Mar 18 10:15:04 riri kernel: Intel(R) Core(TM)2 CPU 6600 @ 2.40GHz
stepping 06
Mar 18 10:15:04 riri kernel: checking TSC synchronization [CPU#0 -> CPU#1]:
passed.
Mar 18 10:15:04 riri kernel: Brought up 2 CPUs
Mar 18 10:15:04 riri kernel: migration_cost=26
Mar 18 10:15:04 riri kernel: NET: Registered protocol family 16
Mar 18 10:15:04 riri kernel: ACPI: bus type pci registered
Mar 18 10:15:04 riri kernel: PCI: Using configuration type 1
Mar 18 10:15:04 riri kernel: ACPI: Interpreter enabled
Mar 18 10:15:04 riri kernel: ACPI: Using IOAPIC for interrupt routing
Mar 18 10:15:04 riri kernel: ACPI: PCI Root Bridge [PCI0] (0000:00)
Mar 18 10:15:04 riri kernel: PCI quirk: region 0800-087f claimed by ICH6
ACPI/GPIO/TCO
Mar 18 10:15:04 riri kernel: PCI quirk: region 0480-04bf claimed by ICH6 GPIO
Mar 18 10:15:04 riri kernel: 0000:00:1f.1: trying to change BAR0 from 0000 to
01F0
Mar 18 10:15:04 riri kernel: 0000:00:1f.1: trying to change BAR1 from 0000 to
03F4
Mar 18 10:15:04 riri kernel: 0000:00:1f.1: trying to change BAR2 from 0000 to
0170
Mar 18 10:15:04 riri kernel: 0000:00:1f.1: trying to change BAR3 from 0000 to
0374
Mar 18 10:15:04 riri kernel: PCI: Transparent bridge - 0000:00:1e.0
Mar 18 10:15:04 riri kernel: ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 7
10 *11 12 14 15)
Mar 18 10:15:04 riri kernel: ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 6 7
*10 11 12 14 15)
Mar 18 10:15:04 riri kernel: ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 5 6 *7
10 11 12 14 15)
Mar 18 10:15:04 riri kernel: ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 *5 6 7
10 11 12 14 15)
Mar 18 10:15:04 riri kernel: ACPI: PCI Interrupt Link [LNKE] (IRQs *3 4 5 6 7
10 11 12 14 15)
Mar 18 10:15:04 riri kernel: ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 *5 6 7
10 11 12 14 15)
Mar 18 10:15:04 riri kernel: ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 5 6 7
10 *11 12 14 15)
Mar 18 10:15:04 riri kernel: ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 5 6 7
*10 11 12 14 15)
Mar 18 10:15:04 riri kernel: Linux Plug and Play Support v0.97 (c) Adam Belay
Mar 18 10:15:04 riri kernel: pnp: PnP ACPI init
Mar 18 10:15:04 riri kernel: pnp: PnP ACPI: found 16 devices
Mar 18 10:15:04 riri kernel: SCSI subsystem initialized
Mar 18 10:15:04 riri kernel: usbcore: registered new interface driver usbfs
Mar 18 10:15:04 riri kernel: usbcore: registered new interface driver hub
Mar 18 10:15:04 riri kernel: usbcore: registered new device driver usb
Mar 18 10:15:04 riri kernel: PCI: Using ACPI for IRQ routing
Mar 18 10:15:04 riri kernel: PCI: If a device doesn't work, try
"pci=routeirq". If it helps, post a report
Mar 18 10:15:04 riri kernel: PCI-GART: No AMD northbridge found.
Mar 18 10:15:04 riri kernel: hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0
Mar 18 10:15:04 riri kernel: hpet0: 3 64-bit timers, 14318180 Hz
Mar 18 10:15:04 riri kernel: pnp: 00:01: iomem range 0xfed13000-0xfed19fff has
been reserved
Mar 18 10:15:04 riri kernel: Time: tsc clocksource has been installed.
Mar 18 10:15:04 riri kernel: pnp: 00:07: ioport range 0x290-0x297 has been
reserved
Mar 18 10:15:04 riri kernel: pnp: 00:08: iomem range 0xfed1c000-0xfed1ffff has
been reserved
Mar 18 10:15:04 riri kernel: pnp: 00:08: iomem range 0xfed20000-0xfed3ffff has
been reserved
Mar 18 10:15:04 riri kernel: pnp: 00:08: iomem range 0xfed50000-0xfed8ffff has
been reserved
Mar 18 10:15:04 riri kernel: pnp: 00:08: iomem range 0xffb00000-0xffbfffff has
been reserved
Mar 18 10:15:04 riri kernel: pnp: 00:0c: iomem range 0xfec00000-0xfec00fff has
been reserved
Mar 18 10:15:04 riri kernel: pnp: 00:0c: iomem range 0xfee00000-0xfee00fff has
been reserved
Mar 18 10:15:04 riri kernel: pnp: 00:0e: iomem range 0xf0000000-0xf3ffffff has
been reserved
Mar 18 10:15:04 riri kernel: pnp: 00:0f: iomem range 0x0-0x9ffff could not be
reserved
Mar 18 10:15:04 riri kernel: pnp: 00:0f: iomem range 0xc0000-0xdffff has been
reserved
Mar 18 10:15:04 riri kernel: pnp: 00:0f: iomem range 0xe0000-0xfffff could not
be reserved
Mar 18 10:15:04 riri kernel: pnp: 00:0f: iomem range 0x100000-0xc7ffffff could
not be reserved
Mar 18 10:15:04 riri kernel: ACPI: PCI Interrupt 0000:01:03.0[A] -> GSI 21
(level, low) -> IRQ 21
Mar 18 10:15:04 riri kernel: ohci1394: fw-host0: OHCI-1394 1.1 (PCI): IRQ=[21]
MMIO=[ff5ef800-ff5effff] Max Packet=[2048] IR/IT contexts=[4/8]
Mar 18 10:15:04 riri kernel: PCI: Bridge: 0000:00:01.0
Mar 18 10:15:04 riri kernel: IO window: c000-cfff
Mar 18 10:15:04 riri kernel: MEM window: ff900000-ff9fffff
Mar 18 10:15:04 riri kernel: PREFETCH window: cff00000-efefffff
Mar 18 10:15:04 riri kernel: PCI: Bridge: 0000:00:1c.0
Mar 18 10:15:04 riri kernel: IO window: disabled.
Mar 18 10:15:04 riri kernel: MEM window: disabled.
Mar 18 10:15:04 riri kernel: PREFETCH window: cfe00000-cfefffff
Mar 18 10:15:04 riri kernel: PCI: Bridge: 0000:00:1c.3
Mar 18 10:15:04 riri kernel: IO window: b000-bfff
Mar 18 10:15:04 riri kernel: MEM window: ff800000-ff8fffff
Mar 18 10:15:04 riri kernel: PREFETCH window: disabled.
Mar 18 10:15:04 riri kernel: PCI: Bridge: 0000:00:1c.4
Mar 18 10:15:04 riri kernel: IO window: a000-afff
Mar 18 10:15:04 riri kernel: MEM window: ff700000-ff7fffff
Mar 18 10:15:04 riri kernel: PREFETCH window: disabled.
Mar 18 10:15:04 riri kernel: PCI: Bridge: 0000:00:1c.5
Mar 18 10:15:04 riri kernel: IO window: 9000-9fff
Mar 18 10:15:04 riri kernel: MEM window: ff600000-ff6fffff
Mar 18 10:15:04 riri kernel: PREFETCH window: disabled.
Mar 18 10:15:04 riri kernel: PCI: Bridge: 0000:00:1e.0
Mar 18 10:15:04 riri kernel: IO window: 8000-8fff
Mar 18 10:15:04 riri kernel: MEM window: ff500000-ff5fffff
Mar 18 10:15:04 riri kernel: PREFETCH window: disabled.
Mar 18 10:15:04 riri kernel: ACPI: PCI Interrupt 0000:00:01.0[A] -> GSI 16
(level, low) -> IRQ 16
Mar 18 10:15:04 riri kernel: ACPI: PCI Interrupt 0000:00:1c.0[A] -> GSI 16
(level, low) -> IRQ 16
Mar 18 10:15:04 riri kernel: ACPI: PCI Interrupt 0000:00:1c.3[D] -> GSI 19
(level, low) -> IRQ 19
Mar 18 10:15:04 riri kernel: ACPI: PCI Interrupt 0000:00:1c.4[A] -> GSI 16
(level, low) -> IRQ 16
Mar 18 10:15:04 riri kernel: ACPI: PCI Interrupt 0000:00:1c.5[B] -> GSI 17
(level, low) -> IRQ 17
Mar 18 10:15:04 riri kernel: NET: Registered protocol family 2
Mar 18 10:15:04 riri kernel: IP route cache hash table entries: 131072 (order:
8, 1048576 bytes)
Mar 18 10:15:04 riri kernel: TCP established hash table entries: 131072
(order: 9, 3145728 bytes)
Mar 18 10:15:04 riri kernel: TCP bind hash table entries: 65536 (order: 8,
1048576 bytes)
Mar 18 10:15:04 riri kernel: TCP: Hash tables configured (established 131072
bind 65536)
Mar 18 10:15:04 riri kernel: TCP reno registered
Mar 18 10:15:04 riri kernel: IA-32 Microcode Update Driver: v1.14a
<tigran@aivazian.fsnet.co.uk>
Mar 18 10:15:04 riri kernel: VFS: Disk quotas dquot_6.5.1
Mar 18 10:15:04 riri kernel: Dquot-cache hash table entries: 512 (order 0,
4096 bytes)
Mar 18 10:15:04 riri kernel: NTFS driver 2.1.28 [Flags: R/W].
Mar 18 10:15:04 riri kernel: fuse init (API version 7.8)
Mar 18 10:15:04 riri kernel: io scheduler noop registered
Mar 18 10:15:04 riri kernel: io scheduler anticipatory registered (default)
Mar 18 10:15:04 riri kernel: io scheduler deadline registered
Mar 18 10:15:04 riri kernel: io scheduler cfq registered
Mar 18 10:15:04 riri kernel: assign_interrupt_mode Found MSI capability
Mar 18 10:15:04 riri last message repeated 4 times
Mar 18 10:15:04 riri kernel: input: Power Button (FF) as /class/input/input0
Mar 18 10:15:04 riri kernel: ACPI: Power Button (FF) [PWRF]
Mar 18 10:15:04 riri kernel: input: Power Button (CM) as /class/input/input1
Mar 18 10:15:04 riri kernel: ACPI: Power Button (CM) [PWRB]
Mar 18 10:15:04 riri kernel: ACPI Warning (tbutils-0158): Incorrect checksum
in table [OEMB] - 78, should be 6F [20070126]
Mar 18 10:15:04 riri kernel: ACPI Error (psparse-0537): Method parse/execution
failed [\_PR_.CPU1._OSC] (Node ffff81000424cb30), AE_ALREADY_EXISTS
Mar 18 10:15:04 riri kernel: ACPI: Marking method _OSC as Serialized
Mar 18 10:15:04 riri kernel: ACPI Error (psparse-0537): Method parse/execution
failed [\_PR_.CPU1._PDC] (Node ffff81000424cb50), AE_ALREADY_EXISTS
Mar 18 10:15:04 riri kernel: ACPI: Marking method _PDC as Serialized
Mar 18 10:15:04 riri kernel: ACPI: Processor [CPU1] (supports 8 throttling
states)
Mar 18 10:15:04 riri kernel: ACPI Error (psparse-0537): Method parse/execution
failed [\_PR_.CPU2._OSC] (Node ffff81000424ca10), AE_ALREADY_EXISTS
Mar 18 10:15:04 riri kernel: ACPI: Marking method _OSC as Serialized
Mar 18 10:15:04 riri kernel: ACPI Error (psparse-0537): Method parse/execution
failed [\_PR_.CPU2._PDC] (Node ffff81000424ca30), AE_ALREADY_EXISTS
Mar 18 10:15:04 riri kernel: ACPI: Marking method _PDC as Serialized
Mar 18 10:15:04 riri kernel: ACPI: Processor [CPU2] (supports 8 throttling
states)
Mar 18 10:15:04 riri kernel: Real Time Clock Driver v1.12ac
Mar 18 10:15:04 riri kernel: Non-volatile memory driver v1.2
Mar 18 10:15:04 riri kernel: iTCO_wdt: Intel TCO WatchDog Timer Driver v1.01
(21-Jan-2007)
Mar 18 10:15:04 riri kernel: iTCO_wdt: Found a ICH7 or ICH7R TCO device
(Version=2, TCOBASE=0x0860)
Mar 18 10:15:04 riri kernel: iTCO_wdt: initialized. heartbeat=30 sec
(nowayout=0)
Mar 18 10:15:04 riri kernel: iTCO_vendor_support: vendor-support=0
Mar 18 10:15:04 riri kernel: Linux agpgart interface v0.102 (c) Dave Jones
Mar 18 10:15:04 riri kernel: [drm] Initialized drm 1.1.0 20060810
Mar 18 10:15:04 riri kernel: Hangcheck: starting hangcheck timer 0.9.0 (tick
is 180 seconds, margin is 60 seconds).
Mar 18 10:15:04 riri kernel: Hangcheck: Using get_cycles().
Mar 18 10:15:04 riri kernel: Serial: 8250/16550 driver $Revision: 1.90 $ 4
ports, IRQ sharing disabled
Mar 18 10:15:04 riri kernel: serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a
16550A
Mar 18 10:15:04 riri kernel: 00:0d: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
Mar 18 10:15:04 riri kernel: Floppy drive(s): fd0 is 1.44M
Mar 18 10:15:04 riri kernel: FDC 0 is a post-1991 82077
Mar 18 10:15:04 riri kernel: RAMDISK driver initialized: 16 RAM disks of
65536K size 1024 blocksize
Mar 18 10:15:04 riri kernel: loop: loaded (max 8 devices)
Mar 18 10:15:04 riri kernel: nbd: registered device at major 43
Mar 18 10:15:04 riri kernel: ACPI: PCI Interrupt 0000:04:00.0[A] -> GSI 19
(level, low) -> IRQ 19
Mar 18 10:15:04 riri kernel: sky2 0000:04:00.0: v1.13 addr 0xff8fc000 irq 19
Yukon-EC (0xb6) rev 2
Mar 18 10:15:04 riri kernel: sky2 eth0: addr 00:18:f3:e0:5d:d4
Mar 18 10:15:04 riri kernel: ACPI: PCI Interrupt 0000:03:00.0[A] -> GSI 16
(level, low) -> IRQ 16
Mar 18 10:15:04 riri kernel: sky2 0000:03:00.0: v1.13 addr 0xff7fc000 irq 16
Yukon-EC (0xb6) rev 2
Mar 18 10:15:04 riri kernel: sky2 eth1: addr 00:18:f3:e0:36:fd
Mar 18 10:15:04 riri kernel: PPP generic driver version 2.4.2
Mar 18 10:15:04 riri kernel: PPP Deflate Compression module registered
Mar 18 10:15:04 riri kernel: PPP BSD Compression module registered
Mar 18 10:15:04 riri kernel: PPP MPPE Compression module registered
Mar 18 10:15:04 riri kernel: Equalizer2002: Simon Janes (simon@ncm.com) and
David S. Miller (davem@redhat.com)
Mar 18 10:15:04 riri kernel: tun: Universal TUN/TAP device driver, 1.6
Mar 18 10:15:04 riri kernel: tun: (C) 1999-2004 Max Krasnyansky
<maxk@qualcomm.com>
Mar 18 10:15:04 riri kernel: ACPI: PCI Interrupt 0000:00:1f.2[B] -> GSI 23
(level, low) -> IRQ 23
Mar 18 10:15:04 riri kernel: ahci 0000:00:1f.2: AHCI 0001.0100 32 slots 4
ports 3 Gbps 0xf impl SATA mode
Mar 18 10:15:04 riri kernel: ahci 0000:00:1f.2: flags: 64bit ncq led clo pio
slum part
Mar 18 10:15:04 riri kernel: ata1: SATA max UDMA/133 cmd 0xffffc2000008e900
ctl 0x0000000000000000 bmdma 0x0000000000000000 irq 504
Mar 18 10:15:04 riri kernel: ata2: SATA max UDMA/133 cmd 0xffffc2000008e980
ctl 0x0000000000000000 bmdma 0x0000000000000000 irq 504
Mar 18 10:15:04 riri kernel: ata3: SATA max UDMA/133 cmd 0xffffc2000008ea00
ctl 0x0000000000000000 bmdma 0x0000000000000000 irq 504
Mar 18 10:15:04 riri kernel: ata4: SATA max UDMA/133 cmd 0xffffc2000008ea80
ctl 0x0000000000000000 bmdma 0x0000000000000000 irq 504
Mar 18 10:15:04 riri kernel: scsi0 : ahci
Mar 18 10:15:04 riri kernel: ata1: SATA link up 1.5 Gbps (SStatus 113 SControl
300)
Mar 18 10:15:04 riri kernel: ata1.00: ATA-7: Maxtor 6L250S0, BANC1G10, max
UDMA/133
Mar 18 10:15:04 riri kernel: ata1.00: 490234752 sectors, multi 0: LBA48 NCQ
(depth 31/32)
Mar 18 10:15:04 riri kernel: ata1.00: configured for UDMA/133
Mar 18 10:15:04 riri kernel: scsi1 : ahci
Mar 18 10:15:04 riri kernel: ata2: SATA link up 3.0 Gbps (SStatus 123 SControl
300)
Mar 18 10:15:04 riri kernel: ata2.00: qc timeout (cmd 0xec)
Mar 18 10:15:04 riri kernel: ata2.00: failed to IDENTIFY (I/O error,
err_mask=0x104)
Mar 18 10:15:04 riri kernel: ata2: port is slow to respond, please be patient
(Status 0x80)
Mar 18 10:15:04 riri kernel: ata2: hardreset failed, retrying in 5 secs
Mar 18 10:15:04 riri kernel: ata2: SATA link up 3.0 Gbps (SStatus 123 SControl
300)
Mar 18 10:15:04 riri kernel: ata2.00: ATA-6: Config Disk, RGL10364, max
UDMA/133
Mar 18 10:15:04 riri kernel: ata2.00: 640 sectors, multi 1: LBA
Mar 18 10:15:04 riri kernel: ata2.00: configured for UDMA/133
Mar 18 10:15:04 riri kernel: scsi2 : ahci
Mar 18 10:15:04 riri kernel: ata3: SATA link up 1.5 Gbps (SStatus 113 SControl
300)
Mar 18 10:15:04 riri kernel: ata3.00: ATA-7: Maxtor 6L250S0, BANC1G10, max
UDMA/133
Mar 18 10:15:04 riri kernel: ata3.00: 490234752 sectors, multi 0: LBA48 NCQ
(depth 31/32)
Mar 18 10:15:04 riri kernel: ata3.00: configured for UDMA/133
Mar 18 10:15:04 riri kernel: scsi3 : ahci
Mar 18 10:15:04 riri kernel: ata4: SATA link up 3.0 Gbps (SStatus 123 SControl
300)
Mar 18 10:15:04 riri kernel: ata4.00: ATA-7: ST3500641AS, 3.AAB, max UDMA/133
Mar 18 10:15:04 riri kernel: ata4.00: 976773168 sectors, multi 16: LBA48 NCQ
(depth 31/32)
Mar 18 10:15:04 riri kernel: ata4.00: configured for UDMA/133
Mar 18 10:15:04 riri kernel: scsi 0:0:0:0: Direct-Access ATA Maxtor
6L250S0 BANC PQ: 0 ANSI: 5
Mar 18 10:15:04 riri kernel: SCSI device sda: 490234752 512-byte hdwr sectors
(251000 MB)
Mar 18 10:15:04 riri kernel: sda: Write Protect is off
Mar 18 10:15:04 riri kernel: SCSI device sda: write cache: enabled, read
cache: enabled, doesn't support DPO or FUA
Mar 18 10:15:04 riri kernel: SCSI device sda: 490234752 512-byte hdwr sectors
(251000 MB)
Mar 18 10:15:04 riri kernel: sda: Write Protect is off
Mar 18 10:15:04 riri kernel: SCSI device sda: write cache: enabled, read
cache: enabled, doesn't support DPO or FUA
Mar 18 10:15:04 riri kernel: sda: sda1 sda2 sda3
Mar 18 10:15:04 riri kernel: sd 0:0:0:0: Attached scsi disk sda
Mar 18 10:15:04 riri kernel: sd 0:0:0:0: Attached scsi generic sg0 type 0
Mar 18 10:15:04 riri kernel: scsi 1:0:0:0: Direct-Access ATA Config
Disk RGL1 PQ: 0 ANSI: 5
Mar 18 10:15:04 riri kernel: SCSI device sdb: 640 512-byte hdwr sectors (0 MB)
Mar 18 10:15:04 riri kernel: sdb: Write Protect is off
Mar 18 10:15:04 riri kernel: SCSI device sdb: write cache: disabled, read
cache: enabled, doesn't support DPO or FUA
Mar 18 10:15:04 riri kernel: SCSI device sdb: 640 512-byte hdwr sectors (0 MB)
Mar 18 10:15:04 riri kernel: sdb: Write Protect is off
Mar 18 10:15:04 riri kernel: SCSI device sdb: write cache: disabled, read
cache: enabled, doesn't support DPO or FUA
Mar 18 10:15:04 riri kernel: sdb: unknown partition table
Mar 18 10:15:04 riri kernel: sd 1:0:0:0: Attached scsi disk sdb
Mar 18 10:15:04 riri kernel: sd 1:0:0:0: Attached scsi generic sg1 type 0
Mar 18 10:15:04 riri kernel: scsi 2:0:0:0: Direct-Access ATA Maxtor
6L250S0 BANC PQ: 0 ANSI: 5
Mar 18 10:15:04 riri kernel: SCSI device sdc: 490234752 512-byte hdwr sectors
(251000 MB)
Mar 18 10:15:04 riri kernel: sdc: Write Protect is off
Mar 18 10:15:04 riri kernel: SCSI device sdc: write cache: enabled, read
cache: enabled, doesn't support DPO or FUA
Mar 18 10:15:04 riri kernel: SCSI device sdc: 490234752 512-byte hdwr sectors
(251000 MB)
Mar 18 10:15:04 riri kernel: sdc: Write Protect is off
Mar 18 10:15:04 riri kernel: SCSI device sdc: write cache: enabled, read
cache: enabled, doesn't support DPO or FUA
Mar 18 10:15:04 riri kernel: sdc: sdc1 sdc2
Mar 18 10:15:04 riri kernel: sd 2:0:0:0: Attached scsi disk sdc
Mar 18 10:15:04 riri kernel: sd 2:0:0:0: Attached scsi generic sg2 type 0
Mar 18 10:15:04 riri kernel: scsi 3:0:0:0: Direct-Access ATA
ST3500641AS 3.AA PQ: 0 ANSI: 5
Mar 18 10:15:04 riri kernel: SCSI device sdd: 976773168 512-byte hdwr sectors
(500108 MB)
Mar 18 10:15:04 riri kernel: sdd: Write Protect is off
Mar 18 10:15:04 riri kernel: SCSI device sdd: write cache: enabled, read
cache: enabled, doesn't support DPO or FUA
Mar 18 10:15:04 riri kernel: SCSI device sdd: 976773168 512-byte hdwr sectors
(500108 MB)
Mar 18 10:15:04 riri kernel: sdd: Write Protect is off
Mar 18 10:15:04 riri kernel: SCSI device sdd: write cache: enabled, read
cache: enabled, doesn't support DPO or FUA
Mar 18 10:15:04 riri kernel: sdd: sdd1 sdd2 sdd3
Mar 18 10:15:04 riri kernel: sd 3:0:0:0: Attached scsi disk sdd
Mar 18 10:15:04 riri kernel: sd 3:0:0:0: Attached scsi generic sg3 type 0
Mar 18 10:15:04 riri kernel: ACPI: PCI Interrupt 0000:02:00.0[A] -> GSI 17
(level, low) -> IRQ 17
Mar 18 10:15:04 riri kernel: ahci 0000:02:00.0: AHCI 0001.0000 32 slots 2
ports 3 Gbps 0x3 impl SATA mode
Mar 18 10:15:04 riri kernel: ahci 0000:02:00.0: flags: 64bit ncq pm led clo
pmp pio slum part
Mar 18 10:15:04 riri kernel: ata5: SATA max UDMA/133 cmd 0xffffc20000098100
ctl 0x0000000000000000 bmdma 0x0000000000000000 irq 17
Mar 18 10:15:04 riri kernel: ata6: SATA max UDMA/133 cmd 0xffffc20000098180
ctl 0x0000000000000000 bmdma 0x0000000000000000 irq 17
Mar 18 10:15:04 riri kernel: scsi4 : ahci
Mar 18 10:15:04 riri kernel: ata5: SATA link down (SStatus 0 SControl 300)
Mar 18 10:15:04 riri kernel: scsi5 : ahci
Mar 18 10:15:04 riri kernel: ata6: SATA link down (SStatus 0 SControl 300)
Mar 18 10:15:04 riri kernel: ACPI: PCI Interrupt 0000:00:1f.1[A] -> GSI 22
(level, low) -> IRQ 22
Mar 18 10:15:04 riri kernel: ata7: PATA max UDMA/133 cmd 0x00000000000101f0
ctl 0x00000000000103f6 bmdma 0x000000000001ffa0 irq 14
Mar 18 10:15:04 riri kernel: ata8: PATA max UDMA/133 cmd 0x0000000000010170
ctl 0x0000000000010376 bmdma 0x000000000001ffa8 irq 15
Mar 18 10:15:04 riri kernel: scsi6 : ata_piix
Mar 18 10:15:04 riri kernel: ata7.00: ATA-7: Maxtor 6L200P0, BAH41E00, max
UDMA/133
Mar 18 10:15:04 riri kernel: ata7.00: 398297088 sectors, multi 16: LBA48
Mar 18 10:15:04 riri kernel: ata7.01: ATAPI, max UDMA/33
Mar 18 10:15:04 riri kernel: ata7.00: configured for UDMA/33
Mar 18 10:15:04 riri kernel: ata7.01: configured for UDMA/33
Mar 18 10:15:04 riri kernel: scsi7 : ata_piix
Mar 18 10:15:04 riri kernel: ATA: abnormal status 0x7F on port
0x0000000000010177
Mar 18 10:15:04 riri kernel: scsi 6:0:0:0: Direct-Access ATA Maxtor
6L200P0 BAH4 PQ: 0 ANSI: 5
Mar 18 10:15:04 riri kernel: SCSI device sde: 398297088 512-byte hdwr sectors
(203928 MB)
Mar 18 10:15:04 riri kernel: sde: Write Protect is off
Mar 18 10:15:04 riri kernel: SCSI device sde: write cache: enabled, read
cache: enabled, doesn't support DPO or FUA
Mar 18 10:15:04 riri kernel: SCSI device sde: 398297088 512-byte hdwr sectors
(203928 MB)
Mar 18 10:15:04 riri kernel: sde: Write Protect is off
Mar 18 10:15:04 riri kernel: SCSI device sde: write cache: enabled, read
cache: enabled, doesn't support DPO or FUA
Mar 18 10:15:04 riri kernel: sde: sde1 sde2 sde3 sde4 < sde5 sde6 >
Mar 18 10:15:04 riri kernel: sd 6:0:0:0: Attached scsi disk sde
Mar 18 10:15:04 riri kernel: sd 6:0:0:0: Attached scsi generic sg4 type 0
Mar 18 10:15:04 riri kernel: scsi 6:0:1:0: CD-ROM ASUS
CRW-5232A3 1.00 PQ: 0 ANSI: 5
Mar 18 10:15:04 riri kernel: sr0: scsi3-mmc drive: 52x/52x writer cd/rw
xa/form2 cdda tray
Mar 18 10:15:04 riri kernel: Uniform CD-ROM driver Revision: 3.20
Mar 18 10:15:04 riri kernel: sr 6:0:1:0: Attached scsi generic sg5 type 5
Mar 18 10:15:04 riri kernel: PCI: Enabling device 0000:02:00.1 (0000 -> 0001)
Mar 18 10:15:04 riri kernel: ACPI: PCI Interrupt 0000:02:00.1[B] -> GSI 16
(level, low) -> IRQ 16
Mar 18 10:15:04 riri kernel: ata9: PATA max UDMA/100 cmd 0x0000000000019c00
ctl 0x0000000000019882 bmdma 0x0000000000019400 irq 16
Mar 18 10:15:04 riri kernel: ata10: PATA max UDMA/100 cmd 0x0000000000019800
ctl 0x0000000000019482 bmdma 0x0000000000019408 irq 16
Mar 18 10:15:04 riri kernel: scsi8 : pata_jmicron
Mar 18 10:15:04 riri kernel: ata9.00: ATAPI, max UDMA/66
Mar 18 10:15:04 riri kernel: ata9.00: configured for UDMA/66
Mar 18 10:15:04 riri kernel: scsi9 : pata_jmicron
Mar 18 10:15:04 riri kernel: ATA: abnormal status 0x7F on port
0x0000000000019807
Mar 18 10:15:04 riri kernel: scsi 8:0:0:0: CD-ROM ASUS
DRW-1608P 1.40 PQ: 0 ANSI: 5
Mar 18 10:15:04 riri kernel: sr1: scsi3-mmc drive: 40x/40x writer cd/rw
xa/form2 cdda tray
Mar 18 10:15:04 riri kernel: sr 8:0:0:0: Attached scsi generic sg6 type 5
Mar 18 10:15:04 riri kernel: video1394: Installed video1394 module
Mar 18 10:15:04 riri kernel: ieee1394: raw1394: /dev/raw1394 device
initialized
Mar 18 10:15:04 riri kernel: ACPI: PCI Interrupt 0000:00:1d.7[A] -> GSI 20
(level, low) -> IRQ 20
Mar 18 10:15:04 riri kernel: ehci_hcd 0000:00:1d.7: EHCI Host Controller
Mar 18 10:15:04 riri kernel: ehci_hcd 0000:00:1d.7: new USB bus registered,
assigned bus number 1
Mar 18 10:15:04 riri kernel: ehci_hcd 0000:00:1d.7: debug port 1
Mar 18 10:15:04 riri kernel: ehci_hcd 0000:00:1d.7: irq 20, io mem 0xffafbc00
Mar 18 10:15:04 riri kernel: ehci_hcd 0000:00:1d.7: USB 2.0 started, EHCI
1.00, driver 10 Dec 2004
Mar 18 10:15:04 riri kernel: usb usb1: configuration #1 chosen from 1 choice
Mar 18 10:15:04 riri kernel: hub 1-0:1.0: USB hub found
Mar 18 10:15:04 riri kernel: hub 1-0:1.0: 8 ports detected
Mar 18 10:15:04 riri kernel: USB Universal Host Controller Interface driver
v3.0
Mar 18 10:15:04 riri kernel: ACPI: PCI Interrupt 0000:00:1d.0[A] -> GSI 20
(level, low) -> IRQ 20
Mar 18 10:15:04 riri kernel: uhci_hcd 0000:00:1d.0: UHCI Host Controller
Mar 18 10:15:04 riri kernel: uhci_hcd 0000:00:1d.0: new USB bus registered,
assigned bus number 2
Mar 18 10:15:04 riri kernel: uhci_hcd 0000:00:1d.0: irq 20, io base 0x0000e480
Mar 18 10:15:04 riri kernel: usb usb2: configuration #1 chosen from 1 choice
Mar 18 10:15:04 riri kernel: hub 2-0:1.0: USB hub found
Mar 18 10:15:04 riri kernel: hub 2-0:1.0: 2 ports detected
Mar 18 10:15:04 riri kernel: ACPI: PCI Interrupt 0000:00:1d.1[B] -> GSI 17
(level, low) -> IRQ 17
Mar 18 10:15:04 riri kernel: uhci_hcd 0000:00:1d.1: UHCI Host Controller
Mar 18 10:15:04 riri kernel: uhci_hcd 0000:00:1d.1: new USB bus registered,
assigned bus number 3
Mar 18 10:15:04 riri kernel: uhci_hcd 0000:00:1d.1: irq 17, io base 0x0000e800
Mar 18 10:15:04 riri kernel: usb usb3: configuration #1 chosen from 1 choice
Mar 18 10:15:04 riri kernel: hub 3-0:1.0: USB hub found
Mar 18 10:15:04 riri kernel: hub 3-0:1.0: 2 ports detected
Mar 18 10:15:04 riri kernel: ACPI: PCI Interrupt 0000:00:1d.2[C] -> GSI 18
(level, low) -> IRQ 18
Mar 18 10:15:04 riri kernel: uhci_hcd 0000:00:1d.2: UHCI Host Controller
Mar 18 10:15:04 riri kernel: uhci_hcd 0000:00:1d.2: new USB bus registered,
assigned bus number 4
Mar 18 10:15:04 riri kernel: uhci_hcd 0000:00:1d.2: irq 18, io base 0x0000e880
Mar 18 10:15:04 riri kernel: usb usb4: configuration #1 chosen from 1 choice
Mar 18 10:15:04 riri kernel: hub 4-0:1.0: USB hub found
Mar 18 10:15:04 riri kernel: hub 4-0:1.0: 2 ports detected
Mar 18 10:15:04 riri kernel: ACPI: PCI Interrupt 0000:00:1d.3[D] -> GSI 19
(level, low) -> IRQ 19
Mar 18 10:15:04 riri kernel: uhci_hcd 0000:00:1d.3: UHCI Host Controller
Mar 18 10:15:04 riri kernel: uhci_hcd 0000:00:1d.3: new USB bus registered,
assigned bus number 5
Mar 18 10:15:04 riri kernel: uhci_hcd 0000:00:1d.3: irq 19, io base 0x0000ec00
Mar 18 10:15:04 riri kernel: usb usb5: configuration #1 chosen from 1 choice
Mar 18 10:15:04 riri kernel: hub 5-0:1.0: USB hub found
Mar 18 10:15:04 riri kernel: hub 5-0:1.0: 2 ports detected
Mar 18 10:15:04 riri kernel: usb 1-7: new high speed USB device using ehci_hcd
and address 3
Mar 18 10:15:04 riri kernel: usb 1-7: configuration #1 chosen from 1 choice
Mar 18 10:15:04 riri kernel: hub 1-7:1.0: USB hub found
Mar 18 10:15:04 riri kernel: hub 1-7:1.0: 4 ports detected
Mar 18 10:15:04 riri kernel: usb 2-2: new full speed USB device using uhci_hcd
and address 2
Mar 18 10:15:04 riri kernel: usb 2-2: configuration #1 chosen from 1 choice
Mar 18 10:15:04 riri kernel: usb 1-7.3: new high speed USB device using
ehci_hcd and address 4
Mar 18 10:15:04 riri kernel: usb 1-7.3: configuration #1 chosen from 1 choice
Mar 18 10:15:04 riri kernel: usbcore: registered new interface driver usblp
Mar 18 10:15:04 riri kernel: drivers/usb/class/usblp.c: v0.13: USB Printer
Device Class driver
Mar 18 10:15:04 riri kernel: Initializing USB Mass Storage driver...
Mar 18 10:15:04 riri kernel: usbcore: registered new interface driver
usb-storage
Mar 18 10:15:04 riri kernel: USB Mass Storage support registered.
Mar 18 10:15:04 riri kernel: usbcore: registered new interface driver hiddev
Mar 18 10:15:04 riri kernel: usbcore: registered new interface driver usbhid
Mar 18 10:15:04 riri kernel: drivers/usb/input/hid-core.c: v2.6:USB HID core
driver
Mar 18 10:15:04 riri kernel: PNP: PS/2 Controller [PNP0303:PS2K,PNP0f03:PS2M]
at 0x60,0x64 irq 1,12
Mar 18 10:15:04 riri kernel: serio: i8042 KBD port at 0x60,0x64 irq 1
Mar 18 10:15:04 riri kernel: serio: i8042 AUX port at 0x60,0x64 irq 12
Mar 18 10:15:04 riri kernel: mice: PS/2 mouse device common for all mice
Mar 18 10:15:04 riri kernel: input: AT Translated Set 2 keyboard as
/class/input/input2
Mar 18 10:15:04 riri kernel: input: PC Speaker as /class/input/input3
Mar 18 10:15:04 riri kernel: input: ImExPS/2 Logitech MX Mouse as
/class/input/input4
Mar 18 10:15:04 riri kernel: I2O subsystem v1.325
Mar 18 10:15:04 riri kernel: i2o: max drivers = 8
Mar 18 10:15:04 riri kernel: I2O Configuration OSM v1.323
Mar 18 10:15:04 riri kernel: I2O Bus Adapter OSM v1.317
Mar 18 10:15:04 riri kernel: I2O Block Device OSM v1.325
Mar 18 10:15:04 riri kernel: I2O ProcFS OSM v1.316
Mar 18 10:15:04 riri kernel: i2c /dev entries driver
Mar 18 10:15:04 riri kernel: ACPI: PCI Interrupt 0000:00:1f.3[B] -> GSI 23
(level, low) -> IRQ 23
Mar 18 10:15:04 riri kernel: md: linear personality registered for level -1
Mar 18 10:15:04 riri kernel: md: raid0 personality registered for level 0
Mar 18 10:15:04 riri kernel: md: raid1 personality registered for level 1
Mar 18 10:15:04 riri kernel: Advanced Linux Sound Architecture Driver Version
1.0.14rc3 (Tue Mar 06 13:10:00 2007 UTC).
Mar 18 10:15:04 riri kernel: ACPI: PCI Interrupt 0000:00:1b.0[A] -> GSI 19
(level, low) -> IRQ 19
Mar 18 10:15:04 riri kernel: ALSA device list:
Mar 18 10:15:04 riri kernel: #0: HDA Intel at 0xffafc000 irq 19
Mar 18 10:15:04 riri kernel: netem: version 1.2
Mar 18 10:15:04 riri kernel: u32 classifier
Mar 18 10:15:04 riri kernel: Performance counters on
Mar 18 10:15:04 riri kernel: OLD policer on
Mar 18 10:15:04 riri kernel: Netfilter messages via NETLINK v0.30.
Mar 18 10:15:04 riri kernel: IPv4 over IPv4 tunneling driver
Mar 18 10:15:04 riri kernel: GRE over IPv4 tunneling driver
Mar 18 10:15:04 riri kernel: TCP cubic registered
Mar 18 10:15:04 riri kernel: Initializing XFRM netlink socket
Mar 18 10:15:04 riri kernel: NET: Registered protocol family 1
Mar 18 10:15:04 riri kernel: NET: Registered protocol family 10
Mar 18 10:15:04 riri kernel: lo: Disabled Privacy Extensions
Mar 18 10:15:04 riri kernel: IPv6: add_dev failed for eql
Mar 18 10:15:04 riri kernel: tunl0: Disabled Privacy Extensions
Mar 18 10:15:04 riri kernel: IPv6 over IPv4 tunneling driver
Mar 18 10:15:04 riri kernel: sit0: Disabled Privacy Extensions
Mar 18 10:15:04 riri kernel: NET: Registered protocol family 17
Mar 18 10:15:04 riri kernel: NET: Registered protocol family 15
Mar 18 10:15:04 riri kernel: 802.1Q VLAN Support v1.8 Ben Greear
<greearb@candelatech.com>
Mar 18 10:15:04 riri kernel: All bugs added by David S. Miller
<davem@redhat.com>
Mar 18 10:15:04 riri kernel: ieee80211: 802.11 data/management/control stack,
git-1.1.13
Mar 18 10:15:04 riri kernel: ieee80211: Copyright (C) 2004-2005 Intel
Corporation <jketreno@linux.intel.com>
Mar 18 10:15:04 riri kernel: drivers/rtc/hctosys.c: unable to open rtc device
(rtc0)
Mar 18 10:15:04 riri kernel: md: Autodetecting RAID arrays.
Mar 18 10:15:04 riri kernel: md: autorun ...
Mar 18 10:15:04 riri kernel: md: ... autorun DONE.
Mar 18 10:15:04 riri kernel: kjournald starting. Commit interval 5 seconds
Mar 18 10:15:04 riri kernel: EXT3-fs: mounted filesystem with ordered data
mode.
Mar 18 10:15:04 riri kernel: VFS: Mounted root (ext3 filesystem) readonly.
Mar 18 10:15:04 riri kernel: Freeing unused kernel memory: 296k freed
Mar 18 10:15:04 riri kernel: EXT3 FS on sde1, internal journal
Mar 18 10:15:04 riri kernel: sky2 eth0: enabling interface
Mar 18 10:15:04 riri kernel: sky2 eth0: ram buffer 48K
Mar 18 10:15:04 riri kernel: ADDRCONF(NETDEV_UP): eth0: link is not ready
Mar 18 10:15:04 riri kernel: sky2 eth0: Link is up at 100 Mbps, full duplex,
flow control both
Mar 18 10:15:04 riri kernel: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Mar 18 10:15:04 riri kernel: kjournald starting. Commit interval 5 seconds
Mar 18 10:15:04 riri kernel: EXT3 FS on sde6, internal journal
Mar 18 10:15:04 riri kernel: EXT3-fs: mounted filesystem with ordered data
mode.
Mar 18 10:15:04 riri kernel: kjournald starting. Commit interval 5 seconds
Mar 18 10:15:04 riri kernel: EXT3 FS on sde3, internal journal
Mar 18 10:15:04 riri kernel: EXT3-fs: mounted filesystem with ordered data
mode.
Mar 18 10:15:04 riri kernel: Adding 2096436k swap on /dev/sde5. Priority:-1
extents:1 across:2096436k
Mar 18 10:15:04 riri kernel: Adding 4192956k swap on /dev/sda3. Priority:-2
extents:1 across:4192956k
Mar 18 10:15:04 riri kernel: ttyS1: LSR safety check engaged!
Mar 18 10:15:04 riri kernel: ttyS1: LSR safety check engaged!
Mar 18 10:15:04 riri hpiod: 0.9.7 accepting connections at 39909...
Mar 18 10:15:06 riri kernel: ttyS1: LSR safety check engaged!
Mar 18 10:15:37 riri kernel: kjournald starting. Commit interval 5 seconds
Mar 18 10:15:37 riri kernel: EXT3 FS on sda2, internal journal
Mar 18 10:15:37 riri kernel: EXT3-fs: mounted filesystem with ordered data
mode.
Mar 18 10:23:10 riri exiting on signal 15
Mar 18 10:23:11 riri syslogd 1.4.1#17ubuntu7: restart.
Mar 18 10:23:26 riri kernel: res 40/00:58:53:6e:31/00:00:0d:00:00/40
Emask 0x2 (HSM violation)
Mar 18 10:23:31 riri last message repeated 28 times
Mar 18 10:23:31 riri kernel: ata1: soft resetting port
Mar 18 10:23:32 riri kernel: ata1: SATA link up 1.5 Gbps (SStatus 113 SControl
300)
Mar 18 10:23:32 riri kernel: ata1.00: configured for UDMA/133
Mar 18 10:23:32 riri kernel: ata1: EH complete
Mar 18 10:23:32 riri kernel: SCSI device sda: 490234752 512-byte hdwr sectors
(251000 MB)
Mar 18 10:23:32 riri kernel: sda: Write Protect is off
Mar 18 10:23:32 riri kernel: SCSI device sda: write cache: enabled, read
cache: enabled, doesn't support DPO or FUA
Mar 18 10:25:07 riri kernel: res 40/00:d8:db:b0:2e/00:00:0d:00:00/40
Emask 0x2 (HSM violation)
Mar 18 10:25:11 riri last message repeated 26 times
Mar 18 10:25:12 riri kernel: ata1: soft resetting port
Mar 18 10:25:12 riri kernel: ata1: SATA link up 1.5 Gbps (SStatus 113 SControl
300)
Mar 18 10:25:12 riri kernel: ata1.00: configured for UDMA/133
Mar 18 10:25:12 riri kernel: ata1: EH complete
Mar 18 10:25:12 riri kernel: SCSI device sda: 490234752 512-byte hdwr sectors
(251000 MB)
Mar 18 10:25:12 riri kernel: sda: Write Protect is off
Mar 18 10:25:12 riri kernel: SCSI device sda: write cache: enabled, read
cache: enabled, doesn't support DPO or FUA
Mar 18 10:25:13 riri exiting on signal 15
Mar 18 10:25:14 riri syslogd 1.4.1#17ubuntu7: restart.
Mar 18 10:32:42 riri kernel: res 40/00:c0:7b:6a:2a/00:00:0d:00:00/40
Em
ask 0x2 (HSM violation)
Mar 18 10:32:46 riri last message repeated 26 times
Mar 18 10:32:46 riri kernel: ata1: soft resetting port
Mar 18 10:32:47 riri kernel: ata1: SATA link up 1.5 Gbps (SStatus 113 SControl
3
00)
Mar 18 10:32:47 riri kernel: ata1.00: configured for UDMA/133
Mar 18 10:32:47 riri kernel: ata1: EH complete
Mar 18 10:32:47 riri kernel: SCSI device sda: 490234752 512-byte hdwr sectors
(2
51000 MB)
Mar 18 10:32:47 riri kernel: sda: Write Protect is off
Mar 18 10:32:47 riri kernel: SCSI device sda: write cache: enabled, read
cache:
enabled, doesn't support DPO or FUA
Mar 18 10:32:47 riri kernel: ata1.00: NCQ disabled due to excessive errors
Mar 18 10:32:47 riri kernel: res 40/00:b8:63:0d:2d/00:00:0d:00:00/40
Em
ask 0x2 (HSM violation)
Mar 18 10:32:52 riri last message repeated 26 times
Mar 18 10:32:52 riri kernel: ata1: soft resetting port
Mar 18 10:32:52 riri kernel: ata1: SATA link up 1.5 Gbps (SStatus 113 SControl
3
00)
Mar 18 10:32:52 riri kernel: ata1.00: configured for UDMA/133
Mar 18 10:32:52 riri kernel: ata1: EH complete
Mar 18 10:32:52 riri kernel: SCSI device sda: 490234752 512-byte hdwr sectors
(2
51000 MB)
Mar 18 10:32:52 riri kernel: sda: Write Protect is off
Mar 18 10:32:53 riri kernel: SCSI device sda: write cache: enabled, read
cache:
enabled, doesn't support DPO or FUA
Mar 18 10:45:14 riri -- MARK --
Is this what you were expecting ?
Regards,
Paul
^ permalink raw reply [flat|nested] 263+ messages in thread
* Re: [git patches] libata fixes
2007-03-18 10:09 ` Paul Rolland
@ 2007-03-18 10:28 ` Tejun Heo
2007-03-18 10:33 ` Paul Rolland
0 siblings, 1 reply; 263+ messages in thread
From: Tejun Heo @ 2007-03-18 10:28 UTC (permalink / raw)
To: rol
Cc: 'Linus Torvalds', 'Jeff Garzik',
'Alan Cox', 'Andrew Morton',
linux-ide, 'LKML', 'Eric D. Mudama'
Paul Rolland wrote:
> Hello,
>
>> Can you put the harddisk under high load and see what happens? How
>> often do those errors occur? Care to post full dmesg?
>
> I started again a stock 2.6.21-rc4, and ran that :
> while (/bin/true); do tar jxf linux-2.6.19.1.tar.bz2; rm -rf linux-2.6.19.1;
> echo -n "."; done
>
> After several minutes (I waited more than 300 loops to be completed), and
> a lot of errors, I finally managed to see :
> Mar 18 10:32:47 riri kernel: ata1.00: NCQ disabled due to excessive errors
>
> Mar 18 10:23:26 riri kernel: res 40/00:58:53:6e:31/00:00:0d:00:00/40
> Emask 0x2 (HSM violation)
> Mar 18 10:25:07 riri kernel: res 40/00:d8:db:b0:2e/00:00:0d:00:00/40
> Emask 0x2 (HSM violation)
> Mar 18 10:32:42 riri kernel: res 40/00:c0:7b:6a:2a/00:00:0d:00:00/40
> Em
> ask 0x2 (HSM violation)
> Mar 18 10:32:47 riri kernel: ata1.00: NCQ disabled due to excessive errors
> Mar 18 10:32:47 riri kernel: res 40/00:b8:63:0d:2d/00:00:0d:00:00/40
> Em
> ask 0x2 (HSM violation)
>
> Is this what you were expecting ?
Yeap, more than three HSM violations in ten minutes. That's the
criteria for turning off NCQ. Good to see it working. It look like a
lot because libata reports all active commands (can't help as on HSM
failure, there's no way to determine which caused it) and the SCSI
prints revalidation messages, but it's still only three errors.
Thanks for verifying that. I wanted to verify it works in the field as
expected.
--
tejun
^ permalink raw reply [flat|nested] 263+ messages in thread
* RE: [git patches] libata fixes
2007-03-18 10:28 ` Tejun Heo
@ 2007-03-18 10:33 ` Paul Rolland
2007-03-18 10:39 ` Tejun Heo
0 siblings, 1 reply; 263+ messages in thread
From: Paul Rolland @ 2007-03-18 10:33 UTC (permalink / raw)
To: 'Tejun Heo'
Cc: 'Linus Torvalds', 'Jeff Garzik',
'Alan Cox', 'Andrew Morton',
linux-ide, 'LKML', 'Eric D. Mudama'
Hello,
> Yeap, more than three HSM violations in ten minutes. That's the
> criteria for turning off NCQ. Good to see it working. It look like a
> lot because libata reports all active commands (can't help as on HSM
> failure, there's no way to determine which caused it) and the SCSI
> prints revalidation messages, but it's still only three errors.
>
> Thanks for verifying that. I wanted to verify it works in
> the field as expected.
Glad to help !
Anyhow, how should I consider these "errors" ? Are they real failure that
can affect data integrity on the disk, or some kind of "protocol" errors
with the disk, that are covered by soft (retry or so), and don't affect
data ?
Regards,
Paul
^ permalink raw reply [flat|nested] 263+ messages in thread
* Re: [git patches] libata fixes
2007-03-18 10:33 ` Paul Rolland
@ 2007-03-18 10:39 ` Tejun Heo
2007-03-18 10:50 ` Paul Rolland
0 siblings, 1 reply; 263+ messages in thread
From: Tejun Heo @ 2007-03-18 10:39 UTC (permalink / raw)
To: rol
Cc: 'Linus Torvalds', 'Jeff Garzik',
'Alan Cox', 'Andrew Morton',
linux-ide, 'LKML', 'Eric D. Mudama'
Paul Rolland wrote:
> Hello,
>
>> Yeap, more than three HSM violations in ten minutes. That's the
>> criteria for turning off NCQ. Good to see it working. It look like a
>> lot because libata reports all active commands (can't help as on HSM
>> failure, there's no way to determine which caused it) and the SCSI
>> prints revalidation messages, but it's still only three errors.
>>
>> Thanks for verifying that. I wanted to verify it works in
>> the field as expected.
>
> Glad to help !
>
> Anyhow, how should I consider these "errors" ? Are they real failure that
> can affect data integrity on the disk, or some kind of "protocol" errors
> with the disk, that are covered by soft (retry or so), and don't affect
> data ?
This is NCQ protocol violation on the drive's side shown on some early
drives. No need to worry too much about it. The drive will just get
blacklisted for NCQ and should work fine.
--
tejun
^ permalink raw reply [flat|nested] 263+ messages in thread
* RE: [git patches] libata fixes
2007-03-18 10:39 ` Tejun Heo
@ 2007-03-18 10:50 ` Paul Rolland
2007-03-18 11:06 ` Paul Rolland
0 siblings, 1 reply; 263+ messages in thread
From: Paul Rolland @ 2007-03-18 10:50 UTC (permalink / raw)
To: 'Tejun Heo'
Cc: 'Linus Torvalds', 'Jeff Garzik',
'Alan Cox', 'Andrew Morton',
linux-ide, 'LKML', 'Eric D. Mudama'
Hi,
> This is NCQ protocol violation on the drive's side shown on some early
> drives. No need to worry too much about it. The drive will just get
> blacklisted for NCQ and should work fine.
>
Thx.
Also, remember one of the problem I have, with ata2 going to timeout
because this port of the ICH7 is connected to a PMT ?
You suggested me to connect a disk to one of the SATA port of the PMT,
and reboot the machine to see if the timeout would vanish... I've just
done it, and here is the relevant part of the boot log :
....
ACPI: PCI Interrupt 0000:00:1f.2[B] -> GSI 23 (level, low) -> IRQ 23
ahci 0000:00:1f.2: AHCI 0001.0100 32 slots 4 ports 3 Gbps 0xf impl SATA mode
ahci 0000:00:1f.2: flags: 64bit ncq led clo pio slum part
ata1: SATA max UDMA/133 cmd 0xffffc2000008e900 ctl 0x0000000000000000 bmdma
0x0000000000000000 irq 504
ata2: SATA max UDMA/133 cmd 0xffffc2000008e980 ctl 0x0000000000000000 bmdma
0x0000000000000000 irq 504
ata3: SATA max UDMA/133 cmd 0xffffc2000008ea00 ctl 0x0000000000000000 bmdma
0x0000000000000000 irq 504
ata4: SATA max UDMA/133 cmd 0xffffc2000008ea80 ctl 0x0000000000000000 bmdma
0x0000000000000000 irq 504
scsi0 : ahci
ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
ata1.00: ATA-7: Maxtor 6L250S0, BANC1G10, max UDMA/133
ata1.00: 490234752 sectors, multi 0: LBA48 NCQ (not used)
ata1.00: configured for UDMA/133
scsi1 : ahci
ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata2.00: ATA-6: External Disk 0, RGL10364, max UDMA/133
ata2.00: 1 sectors, multi 1: LBA48
ata2.00: configured for UDMA/133
scsi2 : ahci
ata3: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
ata3.00: ATA-7: Maxtor 6L250S0, BANC1G10, max UDMA/133
ata3.00: 490234752 sectors, multi 0: LBA48 NCQ (not used)
ata3.00: configured for UDMA/133
scsi3 : ahci
ata4: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata4.00: ATA-7: ST3500641AS, 3.AAB, max UDMA/133
ata4.00: 976773168 sectors, multi 16: LBA48 NCQ (depth 31/32)
ata4.00: configured for UDMA/133
scsi 0:0:0:0: Direct-Access ATA Maxtor 6L250S0 BANC PQ: 0 ANSI: 5
SCSI device sda: 490234752 512-byte hdwr sectors (251000 MB)
sda: Write Protect is off
SCSI device sda: write cache: enabled, read cache: enabled, doesn't support
DPO or FUA
SCSI device sda: 490234752 512-byte hdwr sectors (251000 MB)
sda: Write Protect is off
SCSI device sda: write cache: enabled, read cache: enabled, doesn't support
DPO or FUA
sda: sda1 sda2 sda3
sd 0:0:0:0: Attached scsi disk sda
sd 0:0:0:0: Attached scsi generic sg0 type 0
scsi 1:0:0:0: Direct-Access ATA External Disk 0 RGL1 PQ: 0 ANSI: 5
SCSI device sdb: 1 512-byte hdwr sectors (0 MB)
sdb: Write Protect is off
SCSI device sdb: write cache: enabled, read cache: enabled, doesn't support
DPO or FUA
SCSI device sdb: 1 512-byte hdwr sectors (0 MB)
sdb: Write Protect is off
SCSI device sdb: write cache: enabled, read cache: enabled, doesn't support
DPO or FUA
sdb: unknown partition table
sd 1:0:0:0: Attached scsi disk sdb
sd 1:0:0:0: Attached scsi generic sg1 type 0
scsi 2:0:0:0: Direct-Access ATA Maxtor 6L250S0 BANC PQ: 0 ANSI: 5
SCSI device sdc: 490234752 512-byte hdwr sectors (251000 MB)
sdc: Write Protect is off
SCSI device sdc: write cache: enabled, read cache: enabled, doesn't support
DPO or FUA
SCSI device sdc: 490234752 512-byte hdwr sectors (251000 MB)
sdc: Write Protect is off
SCSI device sdc: write cache: enabled, read cache: enabled, doesn't support
DPO or FUA
sdc: sdc1 sdc2
sd 2:0:0:0: Attached scsi disk sdc
sd 2:0:0:0: Attached scsi generic sg2 type 0
scsi 3:0:0:0: Direct-Access ATA ST3500641AS 3.AA PQ: 0 ANSI: 5
SCSI device sdd: 976773168 512-byte hdwr sectors (500108 MB)
sdd: Write Protect is off
SCSI device sdd: write cache: enabled, read cache: enabled, doesn't support
DPO or FUA
SCSI device sdd: 976773168 512-byte hdwr sectors (500108 MB)
sdd: Write Protect is off
SCSI device sdd: write cache: enabled, read cache: enabled, doesn't support
DPO or FUA
sdd: sdd1 sdd2 sdd3
sd 3:0:0:0: Attached scsi disk sdd
sd 3:0:0:0: Attached scsi generic sg3 type 0
ACPI: PCI Interrupt 0000:02:00.0[A] -> GSI 17 (level, low) -> IRQ 17
ahci 0000:02:00.0: AHCI 0001.0000 32 slots 2 ports 3 Gbps 0x3 impl SATA mode
ahci 0000:02:00.0: flags: 64bit ncq pm led clo pmp pio slum part
...
The good news is that there is no more timeout, which is excellent !
The bad news is that the disk is not detected... but maybe I should do
something in the BIOS configuration. I'll try to have a look at this,
because connecting a disk to avoid TO without being able to use it is not
that good ;)
Regards,
Paul
^ permalink raw reply [flat|nested] 263+ messages in thread
* RE: [git patches] libata fixes
2007-03-18 10:50 ` Paul Rolland
@ 2007-03-18 11:06 ` Paul Rolland
2007-03-19 4:37 ` Tejun Heo
0 siblings, 1 reply; 263+ messages in thread
From: Paul Rolland @ 2007-03-18 11:06 UTC (permalink / raw)
To: rol, 'Tejun Heo'
Cc: 'Linus Torvalds', 'Jeff Garzik',
'Alan Cox', 'Andrew Morton',
linux-ide, 'LKML', 'Eric D. Mudama'
Doh ! Got that :
....
ACPI: PCI Interrupt 0000:00:1f.2[B] -> GSI 23 (level, low) -> IRQ 23
ahci 0000:00:1f.2: AHCI 0001.0100 32 slots 4 ports 3 Gbps 0xf impl SATA mode
ahci 0000:00:1f.2: flags: 64bit ncq led clo pio slum part
ata1: SATA max UDMA/133 cmd 0xffffc2000008e900 ctl 0x0000000000000000 bmdma
0x0000000000000000 irq 504
ata2: SATA max UDMA/133 cmd 0xffffc2000008e980 ctl 0x0000000000000000 bmdma
0x0000000000000000 irq 504
ata3: SATA max UDMA/133 cmd 0xffffc2000008ea00 ctl 0x0000000000000000 bmdma
0x0000000000000000 irq 504
ata4: SATA max UDMA/133 cmd 0xffffc2000008ea80 ctl 0x0000000000000000 bmdma
0x0000000000000000 irq 504
scsi0 : ahci
ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
ata1.00: ATA-7: Maxtor 6L250S0, BANC1G10, max UDMA/133
ata1.00: 490234752 sectors, multi 0: LBA48 NCQ (not used)
ata1.00: configured for UDMA/133
scsi1 : ahci
ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata2.00: ATA-6: External Disk 0, RGL10364, max UDMA/133
ata2.00: 1 sectors, multi 1: LBA48
ata2.00: configured for UDMA/133
scsi2 : ahci
ata3: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
ata3.00: ATA-7: Maxtor 6L250S0, BANC1G10, max UDMA/133
ata3.00: 490234752 sectors, multi 0: LBA48 NCQ (not used)
ata3.00: configured for UDMA/133
scsi3 : ahci
ata4: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata4.00: ATA-7: ST3500641AS, 3.AAB, max UDMA/133
ata4.00: 976773168 sectors, multi 16: LBA48 NCQ (depth 31/32)
ata4.00: configured for UDMA/133
scsi 0:0:0:0: Direct-Access ATA Maxtor 6L250S0 BANC PQ: 0 ANSI: 5
SCSI device sda: 490234752 512-byte hdwr sectors (251000 MB)
sda: Write Protect is off
SCSI device sda: write cache: enabled, read cache: enabled, doesn't support
DPO or FUA
SCSI device sda: 490234752 512-byte hdwr sectors (251000 MB)
sda: Write Protect is off
SCSI device sda: write cache: enabled, read cache: enabled, doesn't support
DPO or FUA
sda: sda1 sda2 sda3
sd 0:0:0:0: Attached scsi disk sda
sd 0:0:0:0: Attached scsi generic sg0 type 0
scsi 1:0:0:0: Direct-Access ATA External Disk 0 RGL1 PQ: 0 ANSI: 5
SCSI device sdb: 1 512-byte hdwr sectors (0 MB)
sdb: Write Protect is off
SCSI device sdb: write cache: enabled, read cache: enabled, doesn't support
DPO or FUA
SCSI device sdb: 1 512-byte hdwr sectors (0 MB)
sdb: Write Protect is off
SCSI device sdb: write cache: enabled, read cache: enabled, doesn't support
DPO or FUA
sdb:<3>irq 504: nobody cared (try booting with the "irqpoll" option)
Call Trace:
<IRQ> [<ffffffff802b0245>] __report_bad_irq+0x35/0x90
[<ffffffff802b04ba>] note_interrupt+0x21a/0x270
[<ffffffff802b128f>] handle_edge_irq+0x10f/0x150
[<ffffffff8026f3eb>] do_IRQ+0x7b/0xf0
[<ffffffff80259e70>] mwait_idle+0x0/0x50
[<ffffffff802612d1>] ret_from_intr+0x0/0xa
<EOI> [<ffffffff8042bff0>] vgacon_cursor+0x0/0x1d0
[<ffffffff80259eb6>] mwait_idle+0x46/0x50
[<ffffffff8024aebc>] cpu_idle+0x5c/0xa0
[<ffffffff808b984a>] start_kernel+0x2aa/0x2c0
[<ffffffff808b9176>] _sinittext+0x176/0x180
handlers:
[<ffffffff804e1c90>] (ahci_interrupt+0x0/0x590)
Disabling IRQ #504
unknown partition table
sd 1:0:0:0: Attached scsi disk sdb
sd 1:0:0:0: Attached scsi generic sg1 type 0
scsi 2:0:0:0: Direct-Access ATA Maxtor 6L250S0 BANC PQ: 0 ANSI: 5
SCSI device sdc: 490234752 512-byte hdwr sectors (251000 MB)
sdc: Write Protect is off
and though it said :
sdb:<3>irq 504: nobody cared (try booting with the "irqpoll" option)
I _am_ booting with the irqpoll option !
Paul
^ permalink raw reply [flat|nested] 263+ messages in thread
* Re: [git patches] libata fixes
2007-03-18 11:06 ` Paul Rolland
@ 2007-03-19 4:37 ` Tejun Heo
2007-03-19 7:48 ` Paul Rolland
0 siblings, 1 reply; 263+ messages in thread
From: Tejun Heo @ 2007-03-19 4:37 UTC (permalink / raw)
To: rol
Cc: 'Linus Torvalds', 'Jeff Garzik',
'Alan Cox', 'Andrew Morton',
linux-ide, 'LKML', 'Eric D. Mudama'
Paul Rolland wrote:
> Doh ! Got that :
>
> ....
> ACPI: PCI Interrupt 0000:00:1f.2[B] -> GSI 23 (level, low) -> IRQ 23
> ahci 0000:00:1f.2: AHCI 0001.0100 32 slots 4 ports 3 Gbps 0xf impl SATA mode
> ahci 0000:00:1f.2: flags: 64bit ncq led clo pio slum part
> ata1: SATA max UDMA/133 cmd 0xffffc2000008e900 ctl 0x0000000000000000 bmdma
> 0x0000000000000000 irq 504
> ata2: SATA max UDMA/133 cmd 0xffffc2000008e980 ctl 0x0000000000000000 bmdma
> 0x0000000000000000 irq 504
> ata3: SATA max UDMA/133 cmd 0xffffc2000008ea00 ctl 0x0000000000000000 bmdma
> 0x0000000000000000 irq 504
> ata4: SATA max UDMA/133 cmd 0xffffc2000008ea80 ctl 0x0000000000000000 bmdma
> 0x0000000000000000 irq 504
> ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
> ata2.00: ATA-6: External Disk 0, RGL10364, max UDMA/133
> ata2.00: 1 sectors, multi 1: LBA48
> ata2.00: configured for UDMA/133
[--snip--]
> scsi 1:0:0:0: Direct-Access ATA External Disk 0 RGL1 PQ: 0 ANSI: 5
> SCSI device sdb: 1 512-byte hdwr sectors (0 MB)
> sdb: Write Protect is off
> SCSI device sdb: write cache: enabled, read cache: enabled, doesn't support
> DPO or FUA
> SCSI device sdb: 1 512-byte hdwr sectors (0 MB)
> sdb: Write Protect is off
> SCSI device sdb: write cache: enabled, read cache: enabled, doesn't support
> DPO or FUA
> sdb:<3>irq 504: nobody cared (try booting with the "irqpoll" option)
>
> Call Trace:
> <IRQ> [<ffffffff802b0245>] __report_bad_irq+0x35/0x90
> [<ffffffff802b04ba>] note_interrupt+0x21a/0x270
> [<ffffffff802b128f>] handle_edge_irq+0x10f/0x150
> [<ffffffff8026f3eb>] do_IRQ+0x7b/0xf0
> [<ffffffff80259e70>] mwait_idle+0x0/0x50
> [<ffffffff802612d1>] ret_from_intr+0x0/0xa
> <EOI> [<ffffffff8042bff0>] vgacon_cursor+0x0/0x1d0
> [<ffffffff80259eb6>] mwait_idle+0x46/0x50
> [<ffffffff8024aebc>] cpu_idle+0x5c/0xa0
> [<ffffffff808b984a>] start_kernel+0x2aa/0x2c0
> [<ffffffff808b9176>] _sinittext+0x176/0x180
>
> handlers:
> [<ffffffff804e1c90>] (ahci_interrupt+0x0/0x590)
> Disabling IRQ #504
> unknown partition table
> sd 1:0:0:0: Attached scsi disk sdb
> sd 1:0:0:0: Attached scsi generic sg1 type 0
> scsi 2:0:0:0: Direct-Access ATA Maxtor 6L250S0 BANC PQ: 0 ANSI: 5
> SCSI device sdc: 490234752 512-byte hdwr sectors (251000 MB)
> sdc: Write Protect is off
>
>
> and though it said :
> sdb:<3>irq 504: nobody cared (try booting with the "irqpoll" option)
> I _am_ booting with the irqpoll option !
Oh... that's just weird. It seems you'll have to continue boot with the
timeouts for the time being. Sorry about that.
--
tejun
^ permalink raw reply [flat|nested] 263+ messages in thread
* RE: [git patches] libata fixes
2007-03-19 4:37 ` Tejun Heo
@ 2007-03-19 7:48 ` Paul Rolland
2007-03-19 7:55 ` Tejun Heo
2007-03-19 11:05 ` Alan Cox
0 siblings, 2 replies; 263+ messages in thread
From: Paul Rolland @ 2007-03-19 7:48 UTC (permalink / raw)
To: 'Tejun Heo'
Cc: 'Linus Torvalds', 'Jeff Garzik',
'Alan Cox', 'Andrew Morton',
linux-ide, 'LKML', 'Eric D. Mudama'
> Oh... that's just weird. It seems you'll have to continue
> boot with the
> timeouts for the time being. Sorry about that.
Would you agree to a patch to add a kernel boot parameter to skip some
ata ports ?
I found some archives refering to some "ataX=noprobe", but it seems
to have no effect, and I'd like to resurrect it for libata, at least to
help me support my configuration ?
If no, I'll just cook it for me, without posting it...
Regards,
Paul
^ permalink raw reply [flat|nested] 263+ messages in thread
* Re: [git patches] libata fixes
2007-03-19 7:48 ` Paul Rolland
@ 2007-03-19 7:55 ` Tejun Heo
2007-03-19 11:05 ` Alan Cox
1 sibling, 0 replies; 263+ messages in thread
From: Tejun Heo @ 2007-03-19 7:55 UTC (permalink / raw)
To: rol
Cc: 'Linus Torvalds', 'Jeff Garzik',
'Alan Cox', 'Andrew Morton',
linux-ide, 'LKML', 'Eric D. Mudama'
Paul Rolland wrote:
>> Oh... that's just weird. It seems you'll have to continue
>> boot with the
>> timeouts for the time being. Sorry about that.
>
> Would you agree to a patch to add a kernel boot parameter to skip some
> ata ports ?
> I found some archives refering to some "ataX=noprobe", but it seems
> to have no effect, and I'd like to resurrect it for libata, at least to
> help me support my configuration ?
> If no, I'll just cook it for me, without posting it...
Why not cook it and share it? :-)
--
tejun
^ permalink raw reply [flat|nested] 263+ messages in thread
* Re: [git patches] libata fixes
2007-03-19 7:48 ` Paul Rolland
2007-03-19 7:55 ` Tejun Heo
@ 2007-03-19 11:05 ` Alan Cox
1 sibling, 0 replies; 263+ messages in thread
From: Alan Cox @ 2007-03-19 11:05 UTC (permalink / raw)
To: Paul Rolland
Cc: 'Tejun Heo', 'Linus Torvalds',
'Jeff Garzik', 'Alan Cox',
'Andrew Morton', linux-ide, 'LKML',
'Eric D. Mudama'
On Mon, Mar 19, 2007 at 08:48:00AM +0100, Paul Rolland wrote:
> Would you agree to a patch to add a kernel boot parameter to skip some
> ata ports ?
It should in theory not be neccessary
> I found some archives refering to some "ataX=noprobe", but it seems
> to have no effect, and I'd like to resurrect it for libata, at least to
> help me support my configuration ?
> If no, I'll just cook it for me, without posting it...
If you get it working please post patches - theory and practice rarely agree 8)
^ permalink raw reply [flat|nested] 263+ messages in thread
* [git patches] libata fixes
@ 2013-04-08 20:30 Jeff Garzik
0 siblings, 0 replies; 263+ messages in thread
From: Jeff Garzik @ 2013-04-08 20:30 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide, LKML
The HDIO_DRIVE_* fix is really the biggie.
Please pull 6d3bfc7be6f80d0c6ee6800d58d573343bf6e260 from
git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev.git tags/upstream-linus
to receive the following updates:
drivers/ata/ata_piix.c | 14 +++++++++++++-
drivers/ata/libata-core.c | 6 +++++-
drivers/ata/libata-scsi.c | 8 ++++----
include/linux/ata.h | 2 +-
include/linux/libata.h | 1 +
5 files changed, 24 insertions(+), 7 deletions(-)
David Woodhouse (1):
libata: fix DMA to stack in reading devslp_timing parameters
Krzysztof Mazur (1):
[libata] Fix HDIO_DRIVE_* ioctl() Linux 3.9 regression
Shan Hai (2):
libata: Use integer return value for atapi_command_packet_set
libata: Set max sector to 65535 for Slimtype DVD A DS8A8SH drive
Youquan Song (1):
ata_piix: Fix DVD not dectected at some Haswell platforms
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index ffdd32d..2f48123 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -150,6 +150,7 @@ enum piix_controller_ids {
tolapai_sata,
piix_pata_vmw, /* PIIX4 for VMware, spurious DMA_ERR */
ich8_sata_snb,
+ ich8_2port_sata_snb,
};
struct piix_map_db {
@@ -304,7 +305,7 @@ static const struct pci_device_id piix_pci_tbl[] = {
/* SATA Controller IDE (Lynx Point) */
{ 0x8086, 0x8c01, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_snb },
/* SATA Controller IDE (Lynx Point) */
- { 0x8086, 0x8c08, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
+ { 0x8086, 0x8c08, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata_snb },
/* SATA Controller IDE (Lynx Point) */
{ 0x8086, 0x8c09, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
/* SATA Controller IDE (Lynx Point-LP) */
@@ -439,6 +440,7 @@ static const struct piix_map_db *piix_map_db_table[] = {
[ich8m_apple_sata] = &ich8m_apple_map_db,
[tolapai_sata] = &tolapai_map_db,
[ich8_sata_snb] = &ich8_map_db,
+ [ich8_2port_sata_snb] = &ich8_2port_map_db,
};
static struct pci_bits piix_enable_bits[] = {
@@ -1242,6 +1244,16 @@ static struct ata_port_info piix_port_info[] = {
.udma_mask = ATA_UDMA6,
.port_ops = &piix_sata_ops,
},
+
+ [ich8_2port_sata_snb] =
+ {
+ .flags = PIIX_SATA_FLAGS | PIIX_FLAG_SIDPR
+ | PIIX_FLAG_PIO16,
+ .pio_mask = ATA_PIO4,
+ .mwdma_mask = ATA_MWDMA2,
+ .udma_mask = ATA_UDMA6,
+ .port_ops = &piix_sata_ops,
+ },
};
#define AHCI_PCI_BAR 5
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 497adea..63c743b 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -2329,7 +2329,7 @@ int ata_dev_configure(struct ata_device *dev)
* from SATA Settings page of Identify Device Data Log.
*/
if (ata_id_has_devslp(dev->id)) {
- u8 sata_setting[ATA_SECT_SIZE];
+ u8 *sata_setting = ap->sector_buf;
int i, j;
dev->flags |= ATA_DFLAG_DEVSLP;
@@ -2439,6 +2439,9 @@ int ata_dev_configure(struct ata_device *dev)
dev->max_sectors = min_t(unsigned int, ATA_MAX_SECTORS_128,
dev->max_sectors);
+ if (dev->horkage & ATA_HORKAGE_MAX_SEC_LBA48)
+ dev->max_sectors = ATA_MAX_SECTORS_LBA48;
+
if (ap->ops->dev_config)
ap->ops->dev_config(dev);
@@ -4100,6 +4103,7 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
/* Weird ATAPI devices */
{ "TORiSAN DVD-ROM DRD-N216", NULL, ATA_HORKAGE_MAX_SEC_128 },
{ "QUANTUM DAT DAT72-000", NULL, ATA_HORKAGE_ATAPI_MOD16_DMA },
+ { "Slimtype DVD A DS8A8SH", NULL, ATA_HORKAGE_MAX_SEC_LBA48 },
/* Devices we expect to fail diagnostics */
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index 318b413..ff44787 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -532,8 +532,8 @@ int ata_cmd_ioctl(struct scsi_device *scsidev, void __user *arg)
struct scsi_sense_hdr sshdr;
scsi_normalize_sense(sensebuf, SCSI_SENSE_BUFFERSIZE,
&sshdr);
- if (sshdr.sense_key == 0 &&
- sshdr.asc == 0 && sshdr.ascq == 0)
+ if (sshdr.sense_key == RECOVERED_ERROR &&
+ sshdr.asc == 0 && sshdr.ascq == 0x1d)
cmd_result &= ~SAM_STAT_CHECK_CONDITION;
}
@@ -618,8 +618,8 @@ int ata_task_ioctl(struct scsi_device *scsidev, void __user *arg)
struct scsi_sense_hdr sshdr;
scsi_normalize_sense(sensebuf, SCSI_SENSE_BUFFERSIZE,
&sshdr);
- if (sshdr.sense_key == 0 &&
- sshdr.asc == 0 && sshdr.ascq == 0)
+ if (sshdr.sense_key == RECOVERED_ERROR &&
+ sshdr.asc == 0 && sshdr.ascq == 0x1d)
cmd_result &= ~SAM_STAT_CHECK_CONDITION;
}
diff --git a/include/linux/ata.h b/include/linux/ata.h
index 8f7a3d6..ee0bd95 100644
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -954,7 +954,7 @@ static inline int atapi_cdb_len(const u16 *dev_id)
}
}
-static inline bool atapi_command_packet_set(const u16 *dev_id)
+static inline int atapi_command_packet_set(const u16 *dev_id)
{
return (dev_id[ATA_ID_CONFIG] >> 8) & 0x1f;
}
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 91c9d10..eae7a05 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -398,6 +398,7 @@ enum {
ATA_HORKAGE_NOSETXFER = (1 << 14), /* skip SETXFER, SATA only */
ATA_HORKAGE_BROKEN_FPDMA_AA = (1 << 15), /* skip AA */
ATA_HORKAGE_DUMP_ID = (1 << 16), /* dump IDENTIFY data */
+ ATA_HORKAGE_MAX_SEC_LBA48 = (1 << 17), /* Set max sects to 65535 */
/* DMA mask for user DMA control: User visible values; DO NOT
renumber */
^ permalink raw reply related [flat|nested] 263+ messages in thread
* Re: [git patches] libata fixes
2013-01-21 19:48 Jeff Garzik
@ 2013-01-22 18:04 ` Linus Torvalds
0 siblings, 0 replies; 263+ messages in thread
From: Linus Torvalds @ 2013-01-22 18:04 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Andrew Morton, IDE-ML, LKML
On Mon, Jan 21, 2013 at 11:48 AM, Jeff Garzik <jeff@garzik.org> wrote:
> Please pull 803739d25c2343da6d2f95eebdcbc08bf67097d4 from
> git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev.git tags/upstream-linus
>From the tag message:
" Thought: I wonder if sparse could have caught this, somehow."
You *can* make sparse catch things like that, but you need to
carefully annotate the bits for that to happen.
In particular, you need to make the variable that contains the
bitfield (in this case 'err_mask') and all the values you use for
testing be its own "__bitwise__" type, which is sparse-speak for "this
is not a plain integer, and you cannot do arithmetic on this, you can
only do bitwise things".
So you need to create the specific type with a typedef, something like this:
typedef unsigned int __bitwise__ err_mask_t;
and then that particular type will now no longer mix with any other
integer types. But that also means that in order to create the bit
definitions that you use to test that type, you have to do something
like this:
#define AC_ERR_MEDIA ((__force err_mask_t) __AC_ERR_MEDIA)
where the "__force" part allows the cast of a normal integer to the
private type without any errors.
So it's fairly invasive (but usually only in the place where you
define the different bits), and we don't do it very much in the
kernel. The main case we do this for is "gfp_t", because we've had
*soo* many cases of people mixing up the order of arguments to the
memory allocation functions (so size or 'allocation order' has been
switched with the gfp_t argument), and by making it a __bitwise__
type, sparse will warn about it (and will warn about it if you test
the field using the wrong constants).
So see what we do about gfp_t in <linux/types.h> and in <linux/gfp.h>.
It's not *hard*, but the explicit typing does tend to mean that it's
not worth it for most random small things. Whether it is worth it for
the libata mask fields or not, I'll leave up to you.
You can do a "git grep __bitwise__" to see other examples. The SCSI
target code use of sense_reason_t probably comes closest to the libata
case.
Linus
^ permalink raw reply [flat|nested] 263+ messages in thread
* [git patches] libata fixes
@ 2013-01-21 19:48 Jeff Garzik
2013-01-22 18:04 ` Linus Torvalds
0 siblings, 1 reply; 263+ messages in thread
From: Jeff Garzik @ 2013-01-21 19:48 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide, LKML
Please pull 803739d25c2343da6d2f95eebdcbc08bf67097d4 from
git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev.git tags/upstream-linus
to receive the following updates:
drivers/ata/ahci.c | 8 +++++++-
drivers/ata/libahci.c | 6 +++---
drivers/ata/libata-core.c | 22 +++++++++++++---------
drivers/ata/libata-eh.c | 2 +-
include/linux/ata.h | 8 +++++---
include/linux/libata.h | 4 ++--
6 files changed, 31 insertions(+), 19 deletions(-)
Bian Yu (1):
[libata] ahci: Fix lack of command retry after a success error handler.
Hugh Daschbach (1):
[libata] ahci: Add support for Enmotus Bobcat device.
Shane Huang (1):
[libata] replace sata_settings with devslp_timing
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 7862d17..4979127 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -53,6 +53,7 @@
enum {
AHCI_PCI_BAR_STA2X11 = 0,
+ AHCI_PCI_BAR_ENMOTUS = 2,
AHCI_PCI_BAR_STANDARD = 5,
};
@@ -410,6 +411,9 @@ static const struct pci_device_id ahci_pci_tbl[] = {
{ PCI_VDEVICE(ASMEDIA, 0x0611), board_ahci }, /* ASM1061 */
{ PCI_VDEVICE(ASMEDIA, 0x0612), board_ahci }, /* ASM1062 */
+ /* Enmotus */
+ { PCI_DEVICE(0x1c44, 0x8000), board_ahci },
+
/* Generic, PCI class code for AHCI */
{ PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff, board_ahci },
@@ -1098,9 +1102,11 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
dev_info(&pdev->dev,
"PDC42819 can only drive SATA devices with this driver\n");
- /* The Connext uses non-standard BAR */
+ /* Both Connext and Enmotus devices use non-standard BARs */
if (pdev->vendor == PCI_VENDOR_ID_STMICRO && pdev->device == 0xCC06)
ahci_pci_bar = AHCI_PCI_BAR_STA2X11;
+ else if (pdev->vendor == 0x1c44 && pdev->device == 0x8000)
+ ahci_pci_bar = AHCI_PCI_BAR_ENMOTUS;
/* acquire resources */
rc = pcim_enable_device(pdev);
diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
index 320712a..6cd7805 100644
--- a/drivers/ata/libahci.c
+++ b/drivers/ata/libahci.c
@@ -1951,13 +1951,13 @@ static void ahci_set_aggressive_devslp(struct ata_port *ap, bool sleep)
/* Use the nominal value 10 ms if the read MDAT is zero,
* the nominal value of DETO is 20 ms.
*/
- if (dev->sata_settings[ATA_LOG_DEVSLP_VALID] &
+ if (dev->devslp_timing[ATA_LOG_DEVSLP_VALID] &
ATA_LOG_DEVSLP_VALID_MASK) {
- mdat = dev->sata_settings[ATA_LOG_DEVSLP_MDAT] &
+ mdat = dev->devslp_timing[ATA_LOG_DEVSLP_MDAT] &
ATA_LOG_DEVSLP_MDAT_MASK;
if (!mdat)
mdat = 10;
- deto = dev->sata_settings[ATA_LOG_DEVSLP_DETO];
+ deto = dev->devslp_timing[ATA_LOG_DEVSLP_DETO];
if (!deto)
deto = 20;
} else {
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 9e8b99a..46cd3f4 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -2325,24 +2325,28 @@ int ata_dev_configure(struct ata_device *dev)
}
}
- /* check and mark DevSlp capability */
- if (ata_id_has_devslp(dev->id))
- dev->flags |= ATA_DFLAG_DEVSLP;
-
- /* Obtain SATA Settings page from Identify Device Data Log,
- * which contains DevSlp timing variables etc.
- * Exclude old devices with ata_id_has_ncq()
+ /* Check and mark DevSlp capability. Get DevSlp timing variables
+ * from SATA Settings page of Identify Device Data Log.
*/
- if (ata_id_has_ncq(dev->id)) {
+ if (ata_id_has_devslp(dev->id)) {
+ u8 sata_setting[ATA_SECT_SIZE];
+ int i, j;
+
+ dev->flags |= ATA_DFLAG_DEVSLP;
err_mask = ata_read_log_page(dev,
ATA_LOG_SATA_ID_DEV_DATA,
ATA_LOG_SATA_SETTINGS,
- dev->sata_settings,
+ sata_setting,
1);
if (err_mask)
ata_dev_dbg(dev,
"failed to get Identify Device Data, Emask 0x%x\n",
err_mask);
+ else
+ for (i = 0; i < ATA_LOG_DEVSLP_SIZE; i++) {
+ j = ATA_LOG_DEVSLP_OFFSET + i;
+ dev->devslp_timing[i] = sata_setting[j];
+ }
}
dev->cdb_len = 16;
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index bf039b0..bcf4437 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -2094,7 +2094,7 @@ static unsigned int ata_eh_speed_down(struct ata_device *dev,
*/
static inline int ata_eh_worth_retry(struct ata_queued_cmd *qc)
{
- if (qc->flags & AC_ERR_MEDIA)
+ if (qc->err_mask & AC_ERR_MEDIA)
return 0; /* don't retry media errors */
if (qc->flags & ATA_QCFLAG_IO)
return 1; /* otherwise retry anything from fs stack */
diff --git a/include/linux/ata.h b/include/linux/ata.h
index 408da95..8f7a3d6 100644
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -297,10 +297,12 @@ enum {
ATA_LOG_SATA_NCQ = 0x10,
ATA_LOG_SATA_ID_DEV_DATA = 0x30,
ATA_LOG_SATA_SETTINGS = 0x08,
- ATA_LOG_DEVSLP_MDAT = 0x30,
+ ATA_LOG_DEVSLP_OFFSET = 0x30,
+ ATA_LOG_DEVSLP_SIZE = 0x08,
+ ATA_LOG_DEVSLP_MDAT = 0x00,
ATA_LOG_DEVSLP_MDAT_MASK = 0x1F,
- ATA_LOG_DEVSLP_DETO = 0x31,
- ATA_LOG_DEVSLP_VALID = 0x37,
+ ATA_LOG_DEVSLP_DETO = 0x01,
+ ATA_LOG_DEVSLP_VALID = 0x07,
ATA_LOG_DEVSLP_VALID_MASK = 0x80,
/* READ/WRITE LONG (obsolete) */
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 83ba0ab..649e5f8 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -652,8 +652,8 @@ struct ata_device {
u32 gscr[SATA_PMP_GSCR_DWORDS]; /* PMP GSCR block */
};
- /* Identify Device Data Log (30h), SATA Settings (page 08h) */
- u8 sata_settings[ATA_SECT_SIZE];
+ /* DEVSLP Timing Variables from Identify Device Data Log */
+ u8 devslp_timing[ATA_LOG_DEVSLP_SIZE];
/* error history */
int spdn_cnt;
^ permalink raw reply related [flat|nested] 263+ messages in thread
* [git patches] libata fixes
@ 2012-11-17 4:39 Jeff Garzik
0 siblings, 0 replies; 263+ messages in thread
From: Jeff Garzik @ 2012-11-17 4:39 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide, LKML
If you were going to shoot me for not sending these earlier, you would be
right. -rc6 beat me by ~2 hours it seems, and they really should have
gone out to libata-dev.git and you long before that.
These have been in libata-dev.git for a day or so (unfortunately
linux-next is on vacation). The main one is #1, with the others being
minor bits. #1 has multiple tested-by, and can be considered a
regression fix IMO.
1) Fix ACPI oops, https://bugzilla.kernel.org/show_bug.cgi?id=48211
2) Temporary WARN_ONCE() debugging patch for further ACPI debugging.
The code already oopses here, and so this merely gives slightly
better info. Related to https://bugzilla.kernel.org/show_bug.cgi?id=49151
which has been bisected down to a patch that _exposes_ a latent bug,
but said bisection target does not actually appear to be the root cause
itself.
3) sata_svw: fix longstanding error recovery bug, which was
preventing kdump, by adding missing DMA-start bit check. Core
code was already checking DMA-start, but ancillary, less-used
routines were not. Fixed.
4) sata_highbank: fix minor __init/__devinit warning
5) Fix minor warning, if CONFIG_PM is set, but CONFIG_PM_SLEEP is not set
6) pata_arasan: proper functioning requires clock setting
Please pull 29448ec129c5c9c7ece2ef28c72a0dafd70c8af2 from
git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev.git tags/upstream-linus
to receive the following updates:
drivers/ata/ahci_platform.c | 2 +-
drivers/ata/libata-acpi.c | 11 ++++++++---
drivers/ata/libata-core.c | 4 ++++
drivers/ata/pata_arasan_cf.c | 8 +++++++-
drivers/ata/sata_highbank.c | 4 ++--
drivers/ata/sata_svw.c | 35 +++++++++++++++++++++++++++++++++++
6 files changed, 57 insertions(+), 7 deletions(-)
Aaron Lu (1):
libata-acpi: Fix NULL ptr derference in ata_acpi_dev_handle
Arnd Bergmann (1):
sata_highbank: mark ahci_highbank_probe as __devinit
Borislav Petkov (1):
libata debugging: Warn when unable to find timing descriptor based on xfer_mode
David Milburn (1):
sata_svw: check DMA start bit before reset
Vipul Kumar Samar (1):
pata_arasan: Initialize cf clock to 166MHz
Yuanhan Liu (1):
[libata] PM callbacks should be conditionally compiled on CONFIG_PM_SLEEP
diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c
index b1ae480..b7078af 100644
--- a/drivers/ata/ahci_platform.c
+++ b/drivers/ata/ahci_platform.c
@@ -238,7 +238,7 @@ static int __devexit ahci_remove(struct platform_device *pdev)
return 0;
}
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
static int ahci_suspend(struct device *dev)
{
struct ahci_platform_data *pdata = dev_get_platdata(dev);
diff --git a/drivers/ata/libata-acpi.c b/drivers/ata/libata-acpi.c
index fd9ecf7..5b0ba3f 100644
--- a/drivers/ata/libata-acpi.c
+++ b/drivers/ata/libata-acpi.c
@@ -1105,10 +1105,15 @@ static int ata_acpi_bind_device(struct ata_port *ap, struct scsi_device *sdev,
struct acpi_device *acpi_dev;
struct acpi_device_power_state *states;
- if (ap->flags & ATA_FLAG_ACPI_SATA)
- ata_dev = &ap->link.device[sdev->channel];
- else
+ if (ap->flags & ATA_FLAG_ACPI_SATA) {
+ if (!sata_pmp_attached(ap))
+ ata_dev = &ap->link.device[sdev->id];
+ else
+ ata_dev = &ap->pmp_link[sdev->channel].device[sdev->id];
+ }
+ else {
ata_dev = &ap->link.device[sdev->id];
+ }
*handle = ata_dev_acpi_handle(ata_dev);
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 3cc7096..f46fbd3 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -2942,6 +2942,10 @@ const struct ata_timing *ata_timing_find_mode(u8 xfer_mode)
if (xfer_mode == t->mode)
return t;
+
+ WARN_ONCE(true, "%s: unable to find timing for xfer_mode 0x%x\n",
+ __func__, xfer_mode);
+
return NULL;
}
diff --git a/drivers/ata/pata_arasan_cf.c b/drivers/ata/pata_arasan_cf.c
index 26201eb..371fd2c 100644
--- a/drivers/ata/pata_arasan_cf.c
+++ b/drivers/ata/pata_arasan_cf.c
@@ -317,6 +317,12 @@ static int cf_init(struct arasan_cf_dev *acdev)
return ret;
}
+ ret = clk_set_rate(acdev->clk, 166000000);
+ if (ret) {
+ dev_warn(acdev->host->dev, "clock set rate failed");
+ return ret;
+ }
+
spin_lock_irqsave(&acdev->host->lock, flags);
/* configure CF interface clock */
writel((pdata->cf_if_clk <= CF_IF_CLK_200M) ? pdata->cf_if_clk :
@@ -908,7 +914,7 @@ static int __devexit arasan_cf_remove(struct platform_device *pdev)
return 0;
}
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
static int arasan_cf_suspend(struct device *dev)
{
struct ata_host *host = dev_get_drvdata(dev);
diff --git a/drivers/ata/sata_highbank.c b/drivers/ata/sata_highbank.c
index 0d7c4c2..400bf1c 100644
--- a/drivers/ata/sata_highbank.c
+++ b/drivers/ata/sata_highbank.c
@@ -260,7 +260,7 @@ static const struct of_device_id ahci_of_match[] = {
};
MODULE_DEVICE_TABLE(of, ahci_of_match);
-static int __init ahci_highbank_probe(struct platform_device *pdev)
+static int __devinit ahci_highbank_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct ahci_host_priv *hpriv;
@@ -378,7 +378,7 @@ static int __devexit ahci_highbank_remove(struct platform_device *pdev)
return 0;
}
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
static int ahci_highbank_suspend(struct device *dev)
{
struct ata_host *host = dev_get_drvdata(dev);
diff --git a/drivers/ata/sata_svw.c b/drivers/ata/sata_svw.c
index 44a4256..08608de 100644
--- a/drivers/ata/sata_svw.c
+++ b/drivers/ata/sata_svw.c
@@ -142,6 +142,39 @@ static int k2_sata_scr_write(struct ata_link *link,
return 0;
}
+static int k2_sata_softreset(struct ata_link *link,
+ unsigned int *class, unsigned long deadline)
+{
+ u8 dmactl;
+ void __iomem *mmio = link->ap->ioaddr.bmdma_addr;
+
+ dmactl = readb(mmio + ATA_DMA_CMD);
+
+ /* Clear the start bit */
+ if (dmactl & ATA_DMA_START) {
+ dmactl &= ~ATA_DMA_START;
+ writeb(dmactl, mmio + ATA_DMA_CMD);
+ }
+
+ return ata_sff_softreset(link, class, deadline);
+}
+
+static int k2_sata_hardreset(struct ata_link *link,
+ unsigned int *class, unsigned long deadline)
+{
+ u8 dmactl;
+ void __iomem *mmio = link->ap->ioaddr.bmdma_addr;
+
+ dmactl = readb(mmio + ATA_DMA_CMD);
+
+ /* Clear the start bit */
+ if (dmactl & ATA_DMA_START) {
+ dmactl &= ~ATA_DMA_START;
+ writeb(dmactl, mmio + ATA_DMA_CMD);
+ }
+
+ return sata_sff_hardreset(link, class, deadline);
+}
static void k2_sata_tf_load(struct ata_port *ap, const struct ata_taskfile *tf)
{
@@ -346,6 +379,8 @@ static struct scsi_host_template k2_sata_sht = {
static struct ata_port_operations k2_sata_ops = {
.inherits = &ata_bmdma_port_ops,
+ .softreset = k2_sata_softreset,
+ .hardreset = k2_sata_hardreset,
.sff_tf_load = k2_sata_tf_load,
.sff_tf_read = k2_sata_tf_read,
.sff_check_status = k2_stat_check_status,
^ permalink raw reply related [flat|nested] 263+ messages in thread
* [git patches] libata fixes
@ 2012-08-25 14:26 Jeff Garzik
0 siblings, 0 replies; 263+ messages in thread
From: Jeff Garzik @ 2012-08-25 14:26 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide, LKML
Changes:
1) libata-acpi regression fix
2) additional or corrected drive quirks for ata_blacklist
3) Kconfig text tweaking
4) new PCI IDs
5) pata_atiixp: quirk for MSI motherboard
6) export ahci_dev_classify for an ahci_platform driver
Please pull d17d794c63e2dc0a5b1ffc8367c9475880427fc7 from
git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev.git tags/upstream-linus
to receive the following updates:
drivers/ata/Kconfig | 2 +-
drivers/ata/ahci.c | 8 ++++++++
drivers/ata/ahci.h | 1 +
drivers/ata/ata_piix.c | 8 ++++++++
drivers/ata/libahci.c | 3 ++-
drivers/ata/libata-acpi.c | 15 ++++-----------
drivers/ata/libata-core.c | 3 ++-
drivers/ata/pata_atiixp.c | 16 ++++++++++++++++
8 files changed, 42 insertions(+), 14 deletions(-)
Aaron Lu (1):
[libata] acpi: call ata_acpi_gtm during ata port init time
Arnd Hannemann (1):
pata_atiixp: override cable detection on MSI E350DM-E33
James Ralston (2):
ahci: Add Device IDs for Intel Lynx Point-LP PCH
ata_piix: Add Device IDs for Intel Lynx Point-LP PCH
Jeff Garzik (1):
[libata] new quirk, lift bridge limits for Buffalo DriveStation Quattro
Paul Menzel (1):
[libata] Kconfig: Elaborate that SFF is meant for legacy and PATA stuff
Prarit Bhargava (1):
libata: Add a space to " 2GB ATA Flash Disk" DMA blacklist entry
Rob Herring (1):
ahci: un-staticize ahci_dev_classify
diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
index 2be8ef1..27cecd3 100644
--- a/drivers/ata/Kconfig
+++ b/drivers/ata/Kconfig
@@ -115,7 +115,7 @@ config SATA_SIL24
If unsure, say N.
config ATA_SFF
- bool "ATA SFF support"
+ bool "ATA SFF support (for legacy IDE and PATA)"
default y
help
This option adds support for ATA controllers with SFF
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 062e6a1..50d5dea 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -256,6 +256,14 @@ static const struct pci_device_id ahci_pci_tbl[] = {
{ PCI_VDEVICE(INTEL, 0x8c07), board_ahci }, /* Lynx Point RAID */
{ PCI_VDEVICE(INTEL, 0x8c0e), board_ahci }, /* Lynx Point RAID */
{ PCI_VDEVICE(INTEL, 0x8c0f), board_ahci }, /* Lynx Point RAID */
+ { PCI_VDEVICE(INTEL, 0x9c02), board_ahci }, /* Lynx Point-LP AHCI */
+ { PCI_VDEVICE(INTEL, 0x9c03), board_ahci }, /* Lynx Point-LP AHCI */
+ { PCI_VDEVICE(INTEL, 0x9c04), board_ahci }, /* Lynx Point-LP RAID */
+ { PCI_VDEVICE(INTEL, 0x9c05), board_ahci }, /* Lynx Point-LP RAID */
+ { PCI_VDEVICE(INTEL, 0x9c06), board_ahci }, /* Lynx Point-LP RAID */
+ { PCI_VDEVICE(INTEL, 0x9c07), board_ahci }, /* Lynx Point-LP RAID */
+ { PCI_VDEVICE(INTEL, 0x9c0e), board_ahci }, /* Lynx Point-LP RAID */
+ { PCI_VDEVICE(INTEL, 0x9c0f), board_ahci }, /* Lynx Point-LP 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,
diff --git a/drivers/ata/ahci.h b/drivers/ata/ahci.h
index c2594dd..57eb1c2 100644
--- a/drivers/ata/ahci.h
+++ b/drivers/ata/ahci.h
@@ -320,6 +320,7 @@ extern struct device_attribute *ahci_sdev_attrs[];
extern struct ata_port_operations ahci_ops;
extern struct ata_port_operations ahci_pmp_retry_srst_ops;
+unsigned int ahci_dev_classify(struct ata_port *ap);
void ahci_fill_cmd_slot(struct ahci_port_priv *pp, unsigned int tag,
u32 opts);
void ahci_save_initial_config(struct device *dev,
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index 3c809bf..ef773e1 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -329,6 +329,14 @@ static const struct pci_device_id piix_pci_tbl[] = {
{ 0x8086, 0x8c08, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
/* SATA Controller IDE (Lynx Point) */
{ 0x8086, 0x8c09, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
+ /* SATA Controller IDE (Lynx Point-LP) */
+ { 0x8086, 0x9c00, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_snb },
+ /* SATA Controller IDE (Lynx Point-LP) */
+ { 0x8086, 0x9c01, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_snb },
+ /* SATA Controller IDE (Lynx Point-LP) */
+ { 0x8086, 0x9c08, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
+ /* SATA Controller IDE (Lynx Point-LP) */
+ { 0x8086, 0x9c09, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
/* SATA Controller IDE (DH89xxCC) */
{ 0x8086, 0x2326, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
{ } /* terminate list */
diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
index f9eaa82..555c07a 100644
--- a/drivers/ata/libahci.c
+++ b/drivers/ata/libahci.c
@@ -1139,7 +1139,7 @@ static void ahci_dev_config(struct ata_device *dev)
}
}
-static unsigned int ahci_dev_classify(struct ata_port *ap)
+unsigned int ahci_dev_classify(struct ata_port *ap)
{
void __iomem *port_mmio = ahci_port_base(ap);
struct ata_taskfile tf;
@@ -1153,6 +1153,7 @@ static unsigned int ahci_dev_classify(struct ata_port *ap)
return ata_dev_classify(&tf);
}
+EXPORT_SYMBOL_GPL(ahci_dev_classify);
void ahci_fill_cmd_slot(struct ahci_port_priv *pp, unsigned int tag,
u32 opts)
diff --git a/drivers/ata/libata-acpi.c b/drivers/ata/libata-acpi.c
index 902b5a4..fd9ecf7 100644
--- a/drivers/ata/libata-acpi.c
+++ b/drivers/ata/libata-acpi.c
@@ -60,17 +60,7 @@ acpi_handle ata_ap_acpi_handle(struct ata_port *ap)
if (ap->flags & ATA_FLAG_ACPI_SATA)
return NULL;
- /*
- * If acpi bind operation has already happened, we can get the handle
- * for the port by checking the corresponding scsi_host device's
- * firmware node, otherwise we will need to find out the handle from
- * its parent's acpi node.
- */
- if (ap->scsi_host)
- return DEVICE_ACPI_HANDLE(&ap->scsi_host->shost_gendev);
- else
- return acpi_get_child(DEVICE_ACPI_HANDLE(ap->host->dev),
- ap->port_no);
+ return acpi_get_child(DEVICE_ACPI_HANDLE(ap->host->dev), ap->port_no);
}
EXPORT_SYMBOL(ata_ap_acpi_handle);
@@ -1101,6 +1091,9 @@ static int ata_acpi_bind_host(struct ata_port *ap, acpi_handle *handle)
if (!*handle)
return -ENODEV;
+ if (ata_acpi_gtm(ap, &ap->__acpi_init_gtm) == 0)
+ ap->pflags |= ATA_PFLAG_INIT_GTM_VALID;
+
return 0;
}
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index fadd586..8e1039c 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -4062,7 +4062,7 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
{ "_NEC DV5800A", NULL, ATA_HORKAGE_NODMA },
{ "SAMSUNG CD-ROM SN-124", "N001", ATA_HORKAGE_NODMA },
{ "Seagate STT20000A", NULL, ATA_HORKAGE_NODMA },
- { "2GB ATA Flash Disk", "ADMA428M", ATA_HORKAGE_NODMA },
+ { " 2GB ATA Flash Disk", "ADMA428M", ATA_HORKAGE_NODMA },
/* Odd clown on sil3726/4726 PMPs */
{ "Config Disk", NULL, ATA_HORKAGE_DISABLE },
@@ -4128,6 +4128,7 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
/* Devices that do not need bridging limits applied */
{ "MTRON MSP-SATA*", NULL, ATA_HORKAGE_BRIDGE_OK, },
+ { "BUFFALO HD-QSU2/R5", NULL, ATA_HORKAGE_BRIDGE_OK, },
/* Devices which aren't very happy with higher link speeds */
{ "WD My Book", NULL, ATA_HORKAGE_1_5_GBPS, },
diff --git a/drivers/ata/pata_atiixp.c b/drivers/ata/pata_atiixp.c
index 361c75c..24e5105 100644
--- a/drivers/ata/pata_atiixp.c
+++ b/drivers/ata/pata_atiixp.c
@@ -20,6 +20,7 @@
#include <linux/delay.h>
#include <scsi/scsi_host.h>
#include <linux/libata.h>
+#include <linux/dmi.h>
#define DRV_NAME "pata_atiixp"
#define DRV_VERSION "0.4.6"
@@ -33,11 +34,26 @@ enum {
ATIIXP_IDE_UDMA_MODE = 0x56
};
+static const struct dmi_system_id attixp_cable_override_dmi_table[] = {
+ {
+ /* Board has onboard PATA<->SATA converters */
+ .ident = "MSI E350DM-E33",
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "MSI"),
+ DMI_MATCH(DMI_BOARD_NAME, "E350DM-E33(MS-7720)"),
+ },
+ },
+ { }
+};
+
static int atiixp_cable_detect(struct ata_port *ap)
{
struct pci_dev *pdev = to_pci_dev(ap->host->dev);
u8 udma;
+ if (dmi_check_system(attixp_cable_override_dmi_table))
+ return ATA_CBL_PATA40_SHORT;
+
/* Hack from drivers/ide/pci. Really we want to know how to do the
raw detection not play follow the bios mode guess */
pci_read_config_byte(pdev, ATIIXP_IDE_UDMA_MODE + ap->port_no, &udma);
^ permalink raw reply related [flat|nested] 263+ messages in thread
* Re: [git patches] libata fixes
2012-05-03 18:31 ` Sergei Shtylyov
2012-05-03 18:38 ` Jeff Garzik
@ 2012-05-04 21:04 ` Calvin Walton
1 sibling, 0 replies; 263+ messages in thread
From: Calvin Walton @ 2012-05-04 21:04 UTC (permalink / raw)
To: Sergei Shtylyov
Cc: Jeff Garzik, Andrew Morton, Linus Torvalds, linux-ide, LKML
On Thu, 2012-05-03 at 22:31 +0400, Sergei Shtylyov wrote:
> Hello.
>
> On 05/03/2012 10:27 PM, Jeff Garzik wrote:
>
> > Please pull 5f098a3ea72e73ad3733c3280fd5ee04816dc999 from
> > git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev.git tag/upstream-linus
>
>
> > to receive the following updates:
>
> > Documentation/devicetree/bindings/ata/ahci-platform.txt | 16 +++++++++++++++
> > Documentation/devicetree/bindings/ata/calxeda-sata.txt | 17 ----------------
>
> Originally it was a file rename -- did that get preserved?
>
> WBR, Sergei
Git actually doesn't do any internal tracking of renames, so there is
nothing to be preserved. It detects renames on the fly on the client
when displaying history. (This can be enabled/disabled in the git
config, or using command line options.)
The issue here is apparently just that Jeff forgot to enable rename
detection when generating the diffstat (using e.g. the -M option).
--
Calvin Walton <calvin.walton@kepstin.ca>
^ permalink raw reply [flat|nested] 263+ messages in thread
* Re: [git patches] libata fixes
2012-05-03 18:38 ` Jeff Garzik
@ 2012-05-04 11:04 ` Sergei Shtylyov
0 siblings, 0 replies; 263+ messages in thread
From: Sergei Shtylyov @ 2012-05-04 11:04 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Andrew Morton, Linus Torvalds, linux-ide, LKML
Hello.
On 03-05-2012 22:38, Jeff Garzik wrote:
>>> Please pull 5f098a3ea72e73ad3733c3280fd5ee04816dc999 from
>>> git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev.git
>>> tag/upstream-linus
>>> to receive the following updates:
>>> Documentation/devicetree/bindings/ata/ahci-platform.txt | 16
>>> +++++++++++++++
>>> Documentation/devicetree/bindings/ata/calxeda-sata.txt | 17
>>> ----------------
>> Originally it was a file rename -- did that get preserved?
> You caught me: I manually generated the diffstat :)
And I didn't read the patch attentiuvely enough...
> It is correct in git, as a file rename.
Sorry for the false alarm. :-)
> Jeff
MBR, Sergei
^ permalink raw reply [flat|nested] 263+ messages in thread
* Re: [git patches] libata fixes
2012-05-03 18:31 ` Sergei Shtylyov
@ 2012-05-03 18:38 ` Jeff Garzik
2012-05-04 11:04 ` Sergei Shtylyov
2012-05-04 21:04 ` Calvin Walton
1 sibling, 1 reply; 263+ messages in thread
From: Jeff Garzik @ 2012-05-03 18:38 UTC (permalink / raw)
To: Sergei Shtylyov; +Cc: Andrew Morton, Linus Torvalds, linux-ide, LKML
On 05/03/2012 02:31 PM, Sergei Shtylyov wrote:
> Hello.
>
> On 05/03/2012 10:27 PM, Jeff Garzik wrote:
>
>> Please pull 5f098a3ea72e73ad3733c3280fd5ee04816dc999 from
>> git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev.git
>> tag/upstream-linus
>
>
>> to receive the following updates:
>
>> Documentation/devicetree/bindings/ata/ahci-platform.txt | 16
>> +++++++++++++++
>> Documentation/devicetree/bindings/ata/calxeda-sata.txt | 17
>> ----------------
>
> Originally it was a file rename -- did that get preserved?
You caught me: I manually generated the diffstat :)
It is correct in git, as a file rename.
Jeff
^ permalink raw reply [flat|nested] 263+ messages in thread
* Re: [git patches] libata fixes
2012-05-03 18:27 Jeff Garzik
@ 2012-05-03 18:31 ` Sergei Shtylyov
2012-05-03 18:38 ` Jeff Garzik
2012-05-04 21:04 ` Calvin Walton
0 siblings, 2 replies; 263+ messages in thread
From: Sergei Shtylyov @ 2012-05-03 18:31 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Andrew Morton, Linus Torvalds, linux-ide, LKML
Hello.
On 05/03/2012 10:27 PM, Jeff Garzik wrote:
> Please pull 5f098a3ea72e73ad3733c3280fd5ee04816dc999 from
> git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev.git tag/upstream-linus
> to receive the following updates:
> Documentation/devicetree/bindings/ata/ahci-platform.txt | 16 +++++++++++++++
> Documentation/devicetree/bindings/ata/calxeda-sata.txt | 17 ----------------
Originally it was a file rename -- did that get preserved?
WBR, Sergei
^ permalink raw reply [flat|nested] 263+ messages in thread
* [git patches] libata fixes
@ 2012-05-03 18:27 Jeff Garzik
2012-05-03 18:31 ` Sergei Shtylyov
0 siblings, 1 reply; 263+ messages in thread
From: Jeff Garzik @ 2012-05-03 18:27 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide, LKML
Please pull 5f098a3ea72e73ad3733c3280fd5ee04816dc999 from
git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev.git tag/upstream-linus
to receive the following updates:
Documentation/devicetree/bindings/ata/ahci-platform.txt | 16 +++++++++++++++
Documentation/devicetree/bindings/ata/calxeda-sata.txt | 17 ----------------
drivers/ata/ahci.c | 2 +
drivers/ata/ahci_platform.c | 1
drivers/ata/libata-core.c | 2 -
drivers/ata/libata-eh.c | 3 +-
drivers/ata/pata_arasan_cf.c | 4 ---
7 files changed, 23 insertions(+), 22 deletions(-)
Lin Ming (1):
libata: skip old error history when counting probe trials
Matt Johnson (1):
ahci: Detect Marvell 88SE9172 SATA controller
Tero Roponen (1):
libata: init ata_print_id to 0
Viresh Kumar (2):
ata/pata_arasan_cf: Move arasan_cf_pm_ops out of #ifdef, #endif macros
ata: ahci_platform: Add synopsys ahci controller in DT's compatible list
diff --git a/Documentation/devicetree/bindings/ata/ahci-platform.txt b/Documentation/devicetree/bindings/ata/ahci-platform.txt
new file mode 100644
index 0000000..8bb8a76
--- /dev/null
+++ b/Documentation/devicetree/bindings/ata/ahci-platform.txt
@@ -0,0 +1,16 @@
+* AHCI SATA Controller
+
+SATA nodes are defined to describe on-chip Serial ATA controllers.
+Each SATA controller should have its own node.
+
+Required properties:
+- compatible : compatible list, contains "calxeda,hb-ahci" or "snps,spear-ahci"
+- interrupts : <interrupt mapping for SATA IRQ>
+- reg : <registers mapping>
+
+Example:
+ sata@ffe08000 {
+ compatible = "calxeda,hb-ahci";
+ reg = <0xffe08000 0x1000>;
+ interrupts = <115>;
+ };
diff --git a/Documentation/devicetree/bindings/ata/calxeda-sata.txt b/Documentation/devicetree/bindings/ata/calxeda-sata.txt
deleted file mode 100644
index 79caa56..0000000
--- a/Documentation/devicetree/bindings/ata/calxeda-sata.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-* Calxeda SATA Controller
-
-SATA nodes are defined to describe on-chip Serial ATA controllers.
-Each SATA controller should have its own node.
-
-Required properties:
-- compatible : compatible list, contains "calxeda,hb-ahci"
-- interrupts : <interrupt mapping for SATA IRQ>
-- reg : <registers mapping>
-
-Example:
- sata@ffe08000 {
- compatible = "calxeda,hb-ahci";
- reg = <0xffe08000 0x1000>;
- interrupts = <115>;
- };
-
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 79a1e9d..ebaf67e 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -394,6 +394,8 @@ static const struct pci_device_id ahci_pci_tbl[] = {
.driver_data = board_ahci_yes_fbs }, /* 88se9128 */
{ PCI_DEVICE(0x1b4b, 0x9125),
.driver_data = board_ahci_yes_fbs }, /* 88se9125 */
+ { PCI_DEVICE(0x1b4b, 0x917a),
+ .driver_data = board_ahci_yes_fbs }, /* 88se9172 */
{ PCI_DEVICE(0x1b4b, 0x91a3),
.driver_data = board_ahci_yes_fbs },
diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c
index 0c86c77..9e419e1 100644
--- a/drivers/ata/ahci_platform.c
+++ b/drivers/ata/ahci_platform.c
@@ -280,6 +280,7 @@ static struct dev_pm_ops ahci_pm_ops = {
static const struct of_device_id ahci_of_match[] = {
{ .compatible = "calxeda,hb-ahci", },
+ { .compatible = "snps,spear-ahci", },
{},
};
MODULE_DEVICE_TABLE(of, ahci_of_match);
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 28db50b..23763a1 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -95,7 +95,7 @@ static unsigned int ata_dev_set_xfermode(struct ata_device *dev);
static void ata_dev_xfermask(struct ata_device *dev);
static unsigned long ata_dev_blacklisted(const struct ata_device *dev);
-atomic_t ata_print_id = ATOMIC_INIT(1);
+atomic_t ata_print_id = ATOMIC_INIT(0);
struct ata_force_param {
const char *name;
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index c61316e..d1fbd59 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -3501,7 +3501,8 @@ static int ata_count_probe_trials_cb(struct ata_ering_entry *ent, void *void_arg
u64 now = get_jiffies_64();
int *trials = void_arg;
- if (ent->timestamp < now - min(now, interval))
+ if ((ent->eflags & ATA_EFLAG_OLD_ER) ||
+ (ent->timestamp < now - min(now, interval)))
return -1;
(*trials)++;
diff --git a/drivers/ata/pata_arasan_cf.c b/drivers/ata/pata_arasan_cf.c
index fc2db2a..3239517 100644
--- a/drivers/ata/pata_arasan_cf.c
+++ b/drivers/ata/pata_arasan_cf.c
@@ -943,9 +943,9 @@ static int arasan_cf_resume(struct device *dev)
return 0;
}
+#endif
static SIMPLE_DEV_PM_OPS(arasan_cf_pm_ops, arasan_cf_suspend, arasan_cf_resume);
-#endif
static struct platform_driver arasan_cf_driver = {
.probe = arasan_cf_probe,
@@ -953,9 +953,7 @@ static struct platform_driver arasan_cf_driver = {
.driver = {
.name = DRIVER_NAME,
.owner = THIS_MODULE,
-#ifdef CONFIG_PM
.pm = &arasan_cf_pm_ops,
-#endif
},
};
^ permalink raw reply related [flat|nested] 263+ messages in thread
* Re: [git patches] libata fixes
2012-04-18 19:34 ` Josh Boyer
@ 2012-04-18 19:45 ` Jeff Garzik
0 siblings, 0 replies; 263+ messages in thread
From: Jeff Garzik @ 2012-04-18 19:45 UTC (permalink / raw)
To: Josh Boyer; +Cc: Andrew Morton, Linus Torvalds, linux-ide, LKML, stable
On 04/18/2012 03:34 PM, Josh Boyer wrote:
> On Wed, Apr 18, 2012 at 2:46 PM, Jeff Garzik<jeff@garzik.org> wrote:
>>
>> NOTE: Includes important regression fix. See signed tag message for more.
>>
>> Please pull 0c8d32c27f5cf6e14ca14b4758d1e994eebd50fd from
>> git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev.git tag/upstream-linus
>>
>>
>> to receive the following updates:
>>
>> drivers/ata/ata_piix.c | 2 ++
>> drivers/ata/libata-core.c | 4 ++--
>> drivers/ata/libata-scsi.c | 4 ++--
>> drivers/ata/libata-transport.c | 1 +
>> drivers/ata/libata.h | 2 +-
>> drivers/ata/sata_mv.c | 3 ++-
>> 6 files changed, 10 insertions(+), 6 deletions(-)
>>
>> Dan Carpenter (1):
>> sata_mv: silence an uninitialized variable warning
>>
>> Dan Williams (1):
>> libata: make ata_print_id atomic
>>
>> Lin Ming (1):
>> libata: forbid port runtime pm by default, fixing regression
>
> I noticed that this regression fix doesn't have the
> CC: stable@vger.kernel.org tag in it, but it's needed on the 3.3
> trees. Should it be sent to the stable list separately?
Good catch.
Stable folks, commit 0c8d32c27f5cf6e14ca14b4758d1e994eebd50fd should be
merged into the 3.3 tree(s).
Jeff
^ permalink raw reply [flat|nested] 263+ messages in thread
* Re: [git patches] libata fixes
2012-04-18 18:46 Jeff Garzik
@ 2012-04-18 19:34 ` Josh Boyer
2012-04-18 19:45 ` Jeff Garzik
0 siblings, 1 reply; 263+ messages in thread
From: Josh Boyer @ 2012-04-18 19:34 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Andrew Morton, Linus Torvalds, linux-ide, LKML
On Wed, Apr 18, 2012 at 2:46 PM, Jeff Garzik <jeff@garzik.org> wrote:
>
> NOTE: Includes important regression fix. See signed tag message for more.
>
> Please pull 0c8d32c27f5cf6e14ca14b4758d1e994eebd50fd from
> git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev.git tag/upstream-linus
>
>
> to receive the following updates:
>
> drivers/ata/ata_piix.c | 2 ++
> drivers/ata/libata-core.c | 4 ++--
> drivers/ata/libata-scsi.c | 4 ++--
> drivers/ata/libata-transport.c | 1 +
> drivers/ata/libata.h | 2 +-
> drivers/ata/sata_mv.c | 3 ++-
> 6 files changed, 10 insertions(+), 6 deletions(-)
>
> Dan Carpenter (1):
> sata_mv: silence an uninitialized variable warning
>
> Dan Williams (1):
> libata: make ata_print_id atomic
>
> Lin Ming (1):
> libata: forbid port runtime pm by default, fixing regression
I noticed that this regression fix doesn't have the
CC: stable@vger.kernel.org tag in it, but it's needed on the 3.3
trees. Should it be sent to the stable list separately?
josh
^ permalink raw reply [flat|nested] 263+ messages in thread
* [git patches] libata fixes
@ 2012-04-18 18:46 Jeff Garzik
2012-04-18 19:34 ` Josh Boyer
0 siblings, 1 reply; 263+ messages in thread
From: Jeff Garzik @ 2012-04-18 18:46 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide, LKML
NOTE: Includes important regression fix. See signed tag message for more.
Please pull 0c8d32c27f5cf6e14ca14b4758d1e994eebd50fd from
git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev.git tag/upstream-linus
to receive the following updates:
drivers/ata/ata_piix.c | 2 ++
drivers/ata/libata-core.c | 4 ++--
drivers/ata/libata-scsi.c | 4 ++--
drivers/ata/libata-transport.c | 1 +
drivers/ata/libata.h | 2 +-
drivers/ata/sata_mv.c | 3 ++-
6 files changed, 10 insertions(+), 6 deletions(-)
Dan Carpenter (1):
sata_mv: silence an uninitialized variable warning
Dan Williams (1):
libata: make ata_print_id atomic
Lin Ming (1):
libata: forbid port runtime pm by default, fixing regression
Seth Heasley (1):
ata_piix: IDE-mode SATA patch for Intel DH89xxCC DeviceIDs
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index 68013f9..7857e8f 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -329,6 +329,8 @@ static const struct pci_device_id piix_pci_tbl[] = {
{ 0x8086, 0x8c08, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
/* SATA Controller IDE (Lynx Point) */
{ 0x8086, 0x8c09, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
+ /* SATA Controller IDE (DH89xxCC) */
+ { 0x8086, 0x2326, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },
{ } /* terminate list */
};
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index e0bda9f..28db50b 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -95,7 +95,7 @@ static unsigned int ata_dev_set_xfermode(struct ata_device *dev);
static void ata_dev_xfermask(struct ata_device *dev);
static unsigned long ata_dev_blacklisted(const struct ata_device *dev);
-unsigned int ata_print_id = 1;
+atomic_t ata_print_id = ATOMIC_INIT(1);
struct ata_force_param {
const char *name;
@@ -6029,7 +6029,7 @@ int ata_host_register(struct ata_host *host, struct scsi_host_template *sht)
/* give ports names and add SCSI hosts */
for (i = 0; i < host->n_ports; i++)
- host->ports[i]->print_id = ata_print_id++;
+ host->ports[i]->print_id = atomic_inc_return(&ata_print_id);
/* Create associated sysfs transport objects */
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index 1ee00c8..93dabdc 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -3843,7 +3843,7 @@ int ata_sas_async_port_init(struct ata_port *ap)
int rc = ap->ops->port_start(ap);
if (!rc) {
- ap->print_id = ata_print_id++;
+ ap->print_id = atomic_inc_return(&ata_print_id);
__ata_port_probe(ap);
}
@@ -3867,7 +3867,7 @@ int ata_sas_port_init(struct ata_port *ap)
int rc = ap->ops->port_start(ap);
if (!rc) {
- ap->print_id = ata_print_id++;
+ ap->print_id = atomic_inc_return(&ata_print_id);
rc = ata_port_probe(ap);
}
diff --git a/drivers/ata/libata-transport.c b/drivers/ata/libata-transport.c
index 74aaee3..c341904 100644
--- a/drivers/ata/libata-transport.c
+++ b/drivers/ata/libata-transport.c
@@ -294,6 +294,7 @@ int ata_tport_add(struct device *parent,
device_enable_async_suspend(dev);
pm_runtime_set_active(dev);
pm_runtime_enable(dev);
+ pm_runtime_forbid(dev);
transport_add_device(dev);
transport_configure_device(dev);
diff --git a/drivers/ata/libata.h b/drivers/ata/libata.h
index 2e26fca..9d0fd0b 100644
--- a/drivers/ata/libata.h
+++ b/drivers/ata/libata.h
@@ -53,7 +53,7 @@ enum {
ATA_DNXFER_QUIET = (1 << 31),
};
-extern unsigned int ata_print_id;
+extern atomic_t ata_print_id;
extern int atapi_passthru16;
extern int libata_fua;
extern int libata_noacpi;
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index 38950ea..7336d4a 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -4025,7 +4025,8 @@ static int mv_platform_probe(struct platform_device *pdev)
struct ata_host *host;
struct mv_host_priv *hpriv;
struct resource *res;
- int n_ports, rc;
+ int n_ports = 0;
+ int rc;
ata_print_version_once(&pdev->dev, DRV_VERSION);
^ permalink raw reply related [flat|nested] 263+ messages in thread
* Re: [git patches] libata fixes
2011-11-24 1:23 Jeff Garzik
@ 2011-11-24 1:32 ` Linus Torvalds
0 siblings, 0 replies; 263+ messages in thread
From: Linus Torvalds @ 2011-11-24 1:32 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Andrew Morton, linux-ide, LKML
On Wed, Nov 23, 2011 at 5:23 PM, Jeff Garzik <jeff@garzik.org> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
You *still* haven't found anybody but Hedrick to sign your key? And he
hasn't found anybody but you?
It kind of makes that whole notion of "pgp network of trust" a bit pointless...
Anyway, pulled,.
Linus
^ permalink raw reply [flat|nested] 263+ messages in thread
* [git patches] libata fixes
@ 2011-11-24 1:23 Jeff Garzik
2011-11-24 1:32 ` Linus Torvalds
0 siblings, 1 reply; 263+ messages in thread
From: Jeff Garzik @ 2011-11-24 1:23 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide, LKML
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Please pull aab9440453d19c1885fa391d4aafd7705f316247 from
git://github.com/jgarzik/libata-dev.git upstream-linus
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iQIVAwUBTs2cLCWzCDIBeCsvAQJDIA//cLLKLlfw/KTo53VYqrvVEtFcIHTaeeBU
r8F0VLswOnn7vYqNdl35q6zidJK6KH/A/UO7+hhmT/CRDZky3YZFW1XUDiispp8D
saoUbQqQvdFCUsi7RxSEf1vbVj7Wc/pbH7taFpsvxjzcTBICfAHB0kGqfoz1oS/F
VKJDKZ3z8k16OQYCzRGmMEZwhjzp/+UK/lHdjzCIdvOX38SvqYALfm4jjzFlzWh9
TSUQPhZQ/08K6h28P73wpTXl/r12Qr3SO5Ir1Pk9KOF69ohb7BOzme0N7iWauEzk
qi4shdtxZOAAnImnH/M3Lp+P/gHhJyNQ9FgO+DeV/sZdh0YeDJPLQpkDE/KIdFOQ
Gg670ek2UGzarorn7cfJinLRbblFKuGSrqUPkBulYntSdwOr7Qwt7HGQgpFjkh5A
Hix4OOGVp0F6X9mdaap4YtzjSTpxbzHWrUql4W4v80Vxhd3YHk5F7DMozOfSg3SE
QeI4pocMDgle550/cIY00DTuPRknnQP1g1ZIItjrJsZhNs4UY6jyOz+LWEu2+Zbi
kua748BSk+wm6EgbgCPK0W+T4CQel2LipHLT15RxZGwqdqVligs21QTlMX0WYWdA
sDDyfeWaDPH1FLIpdKAZW56EfiykIiZ3cvCvz8xqTRYs64b9oikAHJmCdWor7joq
rV934ybVLNo=
=Yu/Q
-----END PGP SIGNATURE-----
to receive the following updates:
drivers/ata/ahci_platform.c | 2 +-
drivers/ata/libata-sff.c | 4 ++++
2 files changed, 5 insertions(+), 1 deletions(-)
Alexander Beregalov (1):
libata: fix build without BMDMA
Rob Herring (1):
[libata] ahci_platform: fix DT probing
diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c
index ec55595..43b8758 100644
--- a/drivers/ata/ahci_platform.c
+++ b/drivers/ata/ahci_platform.c
@@ -67,7 +67,7 @@ static int __init ahci_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct ahci_platform_data *pdata = dev_get_platdata(dev);
const struct platform_device_id *id = platform_get_device_id(pdev);
- struct ata_port_info pi = ahci_port_info[id->driver_data];
+ struct ata_port_info pi = ahci_port_info[id ? id->driver_data : 0];
const struct ata_port_info *ppi[] = { &pi, NULL };
struct ahci_host_priv *hpriv;
struct ata_host *host;
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
index 63d5327..4cadfa2 100644
--- a/drivers/ata/libata-sff.c
+++ b/drivers/ata/libata-sff.c
@@ -2533,10 +2533,12 @@ static int ata_pci_init_one(struct pci_dev *pdev,
if (rc)
goto out;
+#ifdef CONFIG_ATA_BMDMA
if (bmdma)
/* prepare and activate BMDMA host */
rc = ata_pci_bmdma_prepare_host(pdev, ppi, &host);
else
+#endif
/* prepare and activate SFF host */
rc = ata_pci_sff_prepare_host(pdev, ppi, &host);
if (rc)
@@ -2544,10 +2546,12 @@ static int ata_pci_init_one(struct pci_dev *pdev,
host->private_data = host_priv;
host->flags |= hflags;
+#ifdef CONFIG_ATA_BMDMA
if (bmdma) {
pci_set_master(pdev);
rc = ata_pci_sff_activate_host(host, ata_bmdma_interrupt, sht);
} else
+#endif
rc = ata_pci_sff_activate_host(host, ata_sff_interrupt, sht);
out:
if (rc == 0)
^ permalink raw reply related [flat|nested] 263+ messages in thread
* [git patches] libata fixes
@ 2011-08-19 4:45 Jeff Garzik
0 siblings, 0 replies; 263+ messages in thread
From: Jeff Garzik @ 2011-08-19 4:45 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide, LKML
1) avoid a vendor ATAPI device, where memory corruption is seen on
that device + pata_via
2) new freescale PATA driver pata_imx
3) two fixes for minor bugs
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/Kconfig | 9 ++
drivers/ata/Makefile | 1 +
drivers/ata/pata_imx.c | 253 ++++++++++++++++++++++++++++++++++++++++++
drivers/ata/pata_via.c | 18 +++
drivers/ata/sata_dwc_460ex.c | 14 +--
drivers/ata/sata_sil.c | 2 +-
6 files changed, 288 insertions(+), 9 deletions(-)
create mode 100644 drivers/ata/pata_imx.c
Arnaud Patard (1):
ata: Add iMX pata support
Jeff Garzik (1):
[libata] sata_sil: fix used-uninit warning
Julia Lawall (1):
drivers/ata/sata_dwc_460ex.c: add missing kfree
Tejun Heo (1):
pata_via: disable ATAPI DMA on AVERATEC 3200
diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
index ca3e6be..5987e0b 100644
--- a/drivers/ata/Kconfig
+++ b/drivers/ata/Kconfig
@@ -468,6 +468,15 @@ config PATA_ICSIDE
interface card. This is not required for ICS partition support.
If you are unsure, say N to this.
+config PATA_IMX
+ tristate "PATA support for Freescale iMX"
+ depends on ARCH_MXC
+ help
+ This option enables support for the PATA host available on Freescale
+ iMX SoCs.
+
+ If unsure, say N.
+
config PATA_IT8213
tristate "IT8213 PATA support (Experimental)"
depends on PCI && EXPERIMENTAL
diff --git a/drivers/ata/Makefile b/drivers/ata/Makefile
index 8ac64e1..9550d69 100644
--- a/drivers/ata/Makefile
+++ b/drivers/ata/Makefile
@@ -48,6 +48,7 @@ obj-$(CONFIG_PATA_HPT37X) += pata_hpt37x.o
obj-$(CONFIG_PATA_HPT3X2N) += pata_hpt3x2n.o
obj-$(CONFIG_PATA_HPT3X3) += pata_hpt3x3.o
obj-$(CONFIG_PATA_ICSIDE) += pata_icside.o
+obj-$(CONFIG_PATA_IMX) += pata_imx.o
obj-$(CONFIG_PATA_IT8213) += pata_it8213.o
obj-$(CONFIG_PATA_IT821X) += pata_it821x.o
obj-$(CONFIG_PATA_JMICRON) += pata_jmicron.o
diff --git a/drivers/ata/pata_imx.c b/drivers/ata/pata_imx.c
new file mode 100644
index 0000000..ca9d9ca
--- /dev/null
+++ b/drivers/ata/pata_imx.c
@@ -0,0 +1,253 @@
+/*
+ * Freescale iMX PATA driver
+ *
+ * Copyright (C) 2011 Arnaud Patard <arnaud.patard@rtp-net.org>
+ *
+ * Based on pata_platform - Copyright (C) 2006 - 2007 Paul Mundt
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * TODO:
+ * - dmaengine support
+ * - check if timing stuff needed
+ */
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/blkdev.h>
+#include <scsi/scsi_host.h>
+#include <linux/ata.h>
+#include <linux/libata.h>
+#include <linux/platform_device.h>
+#include <linux/clk.h>
+
+#define DRV_NAME "pata_imx"
+
+#define PATA_IMX_ATA_CONTROL 0x24
+#define PATA_IMX_ATA_CTRL_FIFO_RST_B (1<<7)
+#define PATA_IMX_ATA_CTRL_ATA_RST_B (1<<6)
+#define PATA_IMX_ATA_CTRL_IORDY_EN (1<<0)
+#define PATA_IMX_ATA_INT_EN 0x2C
+#define PATA_IMX_ATA_INTR_ATA_INTRQ2 (1<<3)
+#define PATA_IMX_DRIVE_DATA 0xA0
+#define PATA_IMX_DRIVE_CONTROL 0xD8
+
+struct pata_imx_priv {
+ struct clk *clk;
+ /* timings/interrupt/control regs */
+ u8 *host_regs;
+ u32 ata_ctl;
+};
+
+static int pata_imx_set_mode(struct ata_link *link, struct ata_device **unused)
+{
+ struct ata_device *dev;
+ struct ata_port *ap = link->ap;
+ struct pata_imx_priv *priv = ap->host->private_data;
+ u32 val;
+
+ ata_for_each_dev(dev, link, ENABLED) {
+ dev->pio_mode = dev->xfer_mode = XFER_PIO_0;
+ dev->xfer_shift = ATA_SHIFT_PIO;
+ dev->flags |= ATA_DFLAG_PIO;
+
+ val = __raw_readl(priv->host_regs + PATA_IMX_ATA_CONTROL);
+ if (ata_pio_need_iordy(dev))
+ val |= PATA_IMX_ATA_CTRL_IORDY_EN;
+ else
+ val &= ~PATA_IMX_ATA_CTRL_IORDY_EN;
+ __raw_writel(val, priv->host_regs + PATA_IMX_ATA_CONTROL);
+
+ ata_dev_printk(dev, KERN_INFO, "configured for PIO\n");
+ }
+ return 0;
+}
+
+static struct scsi_host_template pata_imx_sht = {
+ ATA_PIO_SHT(DRV_NAME),
+};
+
+static struct ata_port_operations pata_imx_port_ops = {
+ .inherits = &ata_sff_port_ops,
+ .sff_data_xfer = ata_sff_data_xfer_noirq,
+ .cable_detect = ata_cable_unknown,
+ .set_mode = pata_imx_set_mode,
+};
+
+static void pata_imx_setup_port(struct ata_ioports *ioaddr)
+{
+ /* Fixup the port shift for platforms that need it */
+ ioaddr->data_addr = ioaddr->cmd_addr + (ATA_REG_DATA << 2);
+ ioaddr->error_addr = ioaddr->cmd_addr + (ATA_REG_ERR << 2);
+ ioaddr->feature_addr = ioaddr->cmd_addr + (ATA_REG_FEATURE << 2);
+ ioaddr->nsect_addr = ioaddr->cmd_addr + (ATA_REG_NSECT << 2);
+ ioaddr->lbal_addr = ioaddr->cmd_addr + (ATA_REG_LBAL << 2);
+ ioaddr->lbam_addr = ioaddr->cmd_addr + (ATA_REG_LBAM << 2);
+ ioaddr->lbah_addr = ioaddr->cmd_addr + (ATA_REG_LBAH << 2);
+ ioaddr->device_addr = ioaddr->cmd_addr + (ATA_REG_DEVICE << 2);
+ ioaddr->status_addr = ioaddr->cmd_addr + (ATA_REG_STATUS << 2);
+ ioaddr->command_addr = ioaddr->cmd_addr + (ATA_REG_CMD << 2);
+}
+
+static int __devinit pata_imx_probe(struct platform_device *pdev)
+{
+ struct ata_host *host;
+ struct ata_port *ap;
+ struct pata_imx_priv *priv;
+ int irq = 0;
+ struct resource *io_res;
+
+ io_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ if (io_res == NULL)
+ return -EINVAL;
+
+ irq = platform_get_irq(pdev, 0);
+ if (irq <= 0)
+ return -EINVAL;
+
+ priv = devm_kzalloc(&pdev->dev,
+ sizeof(struct pata_imx_priv), GFP_KERNEL);
+ if (!priv)
+ return -ENOMEM;
+
+ priv->clk = clk_get(&pdev->dev, NULL);
+ if (IS_ERR(priv->clk)) {
+ dev_err(&pdev->dev, "Failed to get clock\n");
+ return PTR_ERR(priv->clk);
+ }
+
+ clk_enable(priv->clk);
+
+ host = ata_host_alloc(&pdev->dev, 1);
+ if (!host)
+ goto free_priv;
+
+ host->private_data = priv;
+ ap = host->ports[0];
+
+ ap->ops = &pata_imx_port_ops;
+ ap->pio_mask = ATA_PIO0;
+ ap->flags |= ATA_FLAG_SLAVE_POSS;
+
+ priv->host_regs = devm_ioremap(&pdev->dev, io_res->start,
+ resource_size(io_res));
+ if (!priv->host_regs) {
+ dev_err(&pdev->dev, "failed to map IO/CTL base\n");
+ goto free_priv;
+ }
+
+ ap->ioaddr.cmd_addr = priv->host_regs + PATA_IMX_DRIVE_DATA;
+ ap->ioaddr.ctl_addr = priv->host_regs + PATA_IMX_DRIVE_CONTROL;
+
+ ap->ioaddr.altstatus_addr = ap->ioaddr.ctl_addr;
+
+ pata_imx_setup_port(&ap->ioaddr);
+
+ ata_port_desc(ap, "cmd 0x%llx ctl 0x%llx",
+ (unsigned long long)io_res->start + PATA_IMX_DRIVE_DATA,
+ (unsigned long long)io_res->start + PATA_IMX_DRIVE_CONTROL);
+
+ /* deassert resets */
+ __raw_writel(PATA_IMX_ATA_CTRL_FIFO_RST_B |
+ PATA_IMX_ATA_CTRL_ATA_RST_B,
+ priv->host_regs + PATA_IMX_ATA_CONTROL);
+ /* enable interrupts */
+ __raw_writel(PATA_IMX_ATA_INTR_ATA_INTRQ2,
+ priv->host_regs + PATA_IMX_ATA_INT_EN);
+
+ /* activate */
+ return ata_host_activate(host, irq, ata_sff_interrupt, 0,
+ &pata_imx_sht);
+
+free_priv:
+ clk_disable(priv->clk);
+ clk_put(priv->clk);
+ return -ENOMEM;
+}
+
+static int __devexit pata_imx_remove(struct platform_device *pdev)
+{
+ struct ata_host *host = dev_get_drvdata(&pdev->dev);
+ struct pata_imx_priv *priv = host->private_data;
+
+ ata_host_detach(host);
+
+ __raw_writel(0, priv->host_regs + PATA_IMX_ATA_INT_EN);
+
+ clk_disable(priv->clk);
+ clk_put(priv->clk);
+
+ return 0;
+}
+
+#ifdef CONFIG_PM
+static int pata_imx_suspend(struct device *dev)
+{
+ struct ata_host *host = dev_get_drvdata(dev);
+ struct pata_imx_priv *priv = host->private_data;
+ int ret;
+
+ ret = ata_host_suspend(host, PMSG_SUSPEND);
+ if (!ret) {
+ __raw_writel(0, priv->host_regs + PATA_IMX_ATA_INT_EN);
+ priv->ata_ctl =
+ __raw_readl(priv->host_regs + PATA_IMX_ATA_CONTROL);
+ clk_disable(priv->clk);
+ }
+
+ return ret;
+}
+
+static int pata_imx_resume(struct device *dev)
+{
+ struct ata_host *host = dev_get_drvdata(dev);
+ struct pata_imx_priv *priv = host->private_data;
+
+ clk_enable(priv->clk);
+
+ __raw_writel(priv->ata_ctl, priv->host_regs + PATA_IMX_ATA_CONTROL);
+
+ __raw_writel(PATA_IMX_ATA_INTR_ATA_INTRQ2,
+ priv->host_regs + PATA_IMX_ATA_INT_EN);
+
+ ata_host_resume(host);
+
+ return 0;
+}
+
+static const struct dev_pm_ops pata_imx_pm_ops = {
+ .suspend = pata_imx_suspend,
+ .resume = pata_imx_resume,
+};
+#endif
+
+static struct platform_driver pata_imx_driver = {
+ .probe = pata_imx_probe,
+ .remove = __devexit_p(pata_imx_remove),
+ .driver = {
+ .name = DRV_NAME,
+ .owner = THIS_MODULE,
+#ifdef CONFIG_PM
+ .pm = &pata_imx_pm_ops,
+#endif
+ },
+};
+
+static int __init pata_imx_init(void)
+{
+ return platform_driver_register(&pata_imx_driver);
+}
+
+static void __exit pata_imx_exit(void)
+{
+ platform_driver_unregister(&pata_imx_driver);
+}
+module_init(pata_imx_init);
+module_exit(pata_imx_exit);
+
+MODULE_AUTHOR("Arnaud Patard <arnaud.patard@rtp-net.org>");
+MODULE_DESCRIPTION("low-level driver for iMX PATA");
+MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:" DRV_NAME);
diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c
index 65e4be6..8e9f504 100644
--- a/drivers/ata/pata_via.c
+++ b/drivers/ata/pata_via.c
@@ -124,6 +124,17 @@ static const struct via_isa_bridge {
{ NULL }
};
+static const struct dmi_system_id no_atapi_dma_dmi_table[] = {
+ {
+ .ident = "AVERATEC 3200",
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "AVERATEC"),
+ DMI_MATCH(DMI_BOARD_NAME, "3200"),
+ },
+ },
+ { }
+};
+
struct via_port {
u8 cached_device;
};
@@ -355,6 +366,13 @@ static unsigned long via_mode_filter(struct ata_device *dev, unsigned long mask)
mask &= ~ ATA_MASK_UDMA;
}
}
+
+ if (dev->class == ATA_DEV_ATAPI &&
+ dmi_check_system(no_atapi_dma_dmi_table)) {
+ ata_dev_warn(dev, "controller locks up on ATAPI DMA, forcing PIO\n");
+ mask &= ATA_MASK_PIO;
+ }
+
return mask;
}
diff --git a/drivers/ata/sata_dwc_460ex.c b/drivers/ata/sata_dwc_460ex.c
index 0a9a774..5c42374 100644
--- a/drivers/ata/sata_dwc_460ex.c
+++ b/drivers/ata/sata_dwc_460ex.c
@@ -1329,7 +1329,7 @@ static int sata_dwc_port_start(struct ata_port *ap)
dev_err(ap->dev, "%s: dma_alloc_coherent failed\n",
__func__);
err = -ENOMEM;
- goto CLEANUP;
+ goto CLEANUP_ALLOC;
}
}
@@ -1349,15 +1349,13 @@ static int sata_dwc_port_start(struct ata_port *ap)
/* Clear any error bits before libata starts issuing commands */
clear_serror();
ap->private_data = hsdevp;
+ dev_dbg(ap->dev, "%s: done\n", __func__);
+ return 0;
+CLEANUP_ALLOC:
+ kfree(hsdevp);
CLEANUP:
- if (err) {
- sata_dwc_port_stop(ap);
- dev_dbg(ap->dev, "%s: fail\n", __func__);
- } else {
- dev_dbg(ap->dev, "%s: done\n", __func__);
- }
-
+ dev_dbg(ap->dev, "%s: fail. ap->id = %d\n", __func__, ap->print_id);
return err;
}
diff --git a/drivers/ata/sata_sil.c b/drivers/ata/sata_sil.c
index 98c1d78..9dfb40b 100644
--- a/drivers/ata/sata_sil.c
+++ b/drivers/ata/sata_sil.c
@@ -438,7 +438,7 @@ static void sil_host_intr(struct ata_port *ap, u32 bmdma2)
u8 status;
if (unlikely(bmdma2 & SIL_DMA_SATA_IRQ)) {
- u32 serror;
+ u32 serror = 0xffffffff;
/* SIEN doesn't mask SATA IRQs on some 3112s. Those
* controllers continue to assert IRQ as long as
^ permalink raw reply related [flat|nested] 263+ messages in thread
* [git patches] libata fixes
@ 2011-06-23 20:52 Jeff Garzik
0 siblings, 0 replies; 263+ messages in thread
From: Jeff Garzik @ 2011-06-23 20:52 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide, LKML
1) regression fix for our SAS brethren still using the old EH (== ipr)
2) new PCI IDs, for which apparently I screwed up the credit. Do you
want me to redo, or is there some way to annotate without rewriting git
history?
3) expand Pioneer CD-ROM quirks to cover all firmware versions for
each quirk'd CD-ROM model.
4) speling fix
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/libata-core.c | 6 +++---
drivers/ata/libata-scsi.c | 6 ++++++
drivers/ata/pata_marvell.c | 3 +++
drivers/ata/sata_dwc_460ex.c | 2 +-
4 files changed, 13 insertions(+), 4 deletions(-)
Justin P. Mattock (1):
drivers/ata/sata_dwc_460ex: Fix typo 'corrresponding'
Linus Torvalds (1):
pata_marvell: Add support for 88SE91A0, 88SE91A4
Nishanth Aravamudan (1):
libata/sas: only set FROZEN flag if new EH is supported
Tejun Heo (1):
libata: apply NOSETXFER horkage to the affected Pioneer drives
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 736bee5..000d03a 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -4143,9 +4143,9 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
* Devices which choke on SETXFER. Applies only if both the
* device and controller are SATA.
*/
- { "PIONEER DVD-RW DVRTD08", "1.00", ATA_HORKAGE_NOSETXFER },
- { "PIONEER DVD-RW DVR-212D", "1.28", ATA_HORKAGE_NOSETXFER },
- { "PIONEER DVD-RW DVR-216D", "1.08", ATA_HORKAGE_NOSETXFER },
+ { "PIONEER DVD-RW DVRTD08", NULL, ATA_HORKAGE_NOSETXFER },
+ { "PIONEER DVD-RW DVR-212D", NULL, ATA_HORKAGE_NOSETXFER },
+ { "PIONEER DVD-RW DVR-216D", NULL, ATA_HORKAGE_NOSETXFER },
/* End Marker */
{ }
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index d51f979..927f968 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -3797,6 +3797,12 @@ EXPORT_SYMBOL_GPL(ata_sas_port_alloc);
*/
int ata_sas_port_start(struct ata_port *ap)
{
+ /*
+ * the port is marked as frozen at allocation time, but if we don't
+ * have new eh, we won't thaw it
+ */
+ if (!ap->ops->error_handler)
+ ap->pflags &= ~ATA_PFLAG_FROZEN;
return 0;
}
EXPORT_SYMBOL_GPL(ata_sas_port_start);
diff --git a/drivers/ata/pata_marvell.c b/drivers/ata/pata_marvell.c
index 75a6a0c..5d7f58a 100644
--- a/drivers/ata/pata_marvell.c
+++ b/drivers/ata/pata_marvell.c
@@ -161,6 +161,9 @@ static const struct pci_device_id marvell_pci_tbl[] = {
{ PCI_DEVICE(0x11AB, 0x6121), },
{ PCI_DEVICE(0x11AB, 0x6123), },
{ PCI_DEVICE(0x11AB, 0x6145), },
+ { PCI_DEVICE(0x1B4B, 0x91A0), },
+ { PCI_DEVICE(0x1B4B, 0x91A4), },
+
{ } /* terminate list */
};
diff --git a/drivers/ata/sata_dwc_460ex.c b/drivers/ata/sata_dwc_460ex.c
index 1c4b3aa..dc88a39 100644
--- a/drivers/ata/sata_dwc_460ex.c
+++ b/drivers/ata/sata_dwc_460ex.c
@@ -389,7 +389,7 @@ static void sata_dwc_tf_dump(struct ata_taskfile *tf)
/*
* Function: get_burst_length_encode
* arguments: datalength: length in bytes of data
- * returns value to be programmed in register corrresponding to data length
+ * returns value to be programmed in register corresponding to data length
* This value is effectively the log(base 2) of the length
*/
static int get_burst_length_encode(int datalength)
^ permalink raw reply related [flat|nested] 263+ messages in thread
* [git patches] libata fixes
@ 2010-12-24 18:37 Jeff Garzik
0 siblings, 0 replies; 263+ messages in thread
From: Jeff Garzik @ 2010-12-24 18:37 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide, LKML
Nothing overly notable or major; the libata-sff IRQ fix is probably the
most notable, but even that bug few have noticed.
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/Kconfig | 22 +++++++++++-----------
drivers/ata/Makefile | 2 +-
drivers/ata/libata-core.c | 24 +++++++++++++++---------
drivers/ata/libata-eh.c | 17 ++++++++++++++---
drivers/ata/libata-sff.c | 7 +++----
drivers/ata/pata_cs5536.c | 18 ++++++++++++------
6 files changed, 56 insertions(+), 34 deletions(-)
Tejun Heo (3):
libata-sff: fix HSM_ST_ERR handling in __ata_sff_port_intr()
libata: no special completion processing for EH commands
libata: issue DIPM enable commands with LPM state updated
Wolfram Sang (1):
pata_mpc52xx: driver needs BMDMA
Wu Zhangjin (1):
pata_cs5536: Add support for non-X86_32 platforms
diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
index 11ec911..36e2319 100644
--- a/drivers/ata/Kconfig
+++ b/drivers/ata/Kconfig
@@ -128,16 +128,6 @@ config PDC_ADMA
If unsure, say N.
-config PATA_MPC52xx
- tristate "Freescale MPC52xx SoC internal IDE"
- depends on PPC_MPC52xx && PPC_BESTCOMM
- select PPC_BESTCOMM_ATA
- help
- This option enables support for integrated IDE controller
- of the Freescale MPC52xx SoC.
-
- If unsure, say N.
-
config PATA_OCTEON_CF
tristate "OCTEON Boot Bus Compact Flash support"
depends on CPU_CAVIUM_OCTEON
@@ -366,7 +356,7 @@ config PATA_CS5535
config PATA_CS5536
tristate "CS5536 PATA support"
- depends on PCI && X86 && !X86_64
+ depends on PCI
help
This option enables support for the AMD CS5536
companion chip used with the Geode LX processor family.
@@ -491,6 +481,16 @@ config PATA_MARVELL
If unsure, say N.
+config PATA_MPC52xx
+ tristate "Freescale MPC52xx SoC internal IDE"
+ depends on PPC_MPC52xx && PPC_BESTCOMM
+ select PPC_BESTCOMM_ATA
+ help
+ This option enables support for integrated IDE controller
+ of the Freescale MPC52xx SoC.
+
+ If unsure, say N.
+
config PATA_NETCELL
tristate "NETCELL Revolution RAID support"
depends on PCI
diff --git a/drivers/ata/Makefile b/drivers/ata/Makefile
index c501af5..2b67c90 100644
--- a/drivers/ata/Makefile
+++ b/drivers/ata/Makefile
@@ -11,7 +11,6 @@ obj-$(CONFIG_SATA_DWC) += sata_dwc_460ex.o
# SFF w/ custom DMA
obj-$(CONFIG_PDC_ADMA) += pdc_adma.o
-obj-$(CONFIG_PATA_MPC52xx) += pata_mpc52xx.o
obj-$(CONFIG_PATA_OCTEON_CF) += pata_octeon_cf.o
obj-$(CONFIG_SATA_QSTOR) += sata_qstor.o
obj-$(CONFIG_SATA_SX4) += sata_sx4.o
@@ -52,6 +51,7 @@ obj-$(CONFIG_PATA_IT821X) += pata_it821x.o
obj-$(CONFIG_PATA_JMICRON) += pata_jmicron.o
obj-$(CONFIG_PATA_MACIO) += pata_macio.o
obj-$(CONFIG_PATA_MARVELL) += pata_marvell.o
+obj-$(CONFIG_PATA_MPC52xx) += pata_mpc52xx.o
obj-$(CONFIG_PATA_NETCELL) += pata_netcell.o
obj-$(CONFIG_PATA_NINJA32) += pata_ninja32.o
obj-$(CONFIG_PATA_NS87415) += pata_ns87415.o
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 7f77c67..f23d6d4 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -4807,9 +4807,6 @@ static void ata_verify_xfer(struct ata_queued_cmd *qc)
{
struct ata_device *dev = qc->dev;
- if (ata_tag_internal(qc->tag))
- return;
-
if (ata_is_nodata(qc->tf.protocol))
return;
@@ -4858,14 +4855,23 @@ void ata_qc_complete(struct ata_queued_cmd *qc)
if (unlikely(qc->err_mask))
qc->flags |= ATA_QCFLAG_FAILED;
- if (unlikely(qc->flags & ATA_QCFLAG_FAILED)) {
- /* always fill result TF for failed qc */
+ /*
+ * Finish internal commands without any further processing
+ * and always with the result TF filled.
+ */
+ if (unlikely(ata_tag_internal(qc->tag))) {
fill_result_tf(qc);
+ __ata_qc_complete(qc);
+ return;
+ }
- if (!ata_tag_internal(qc->tag))
- ata_qc_schedule_eh(qc);
- else
- __ata_qc_complete(qc);
+ /*
+ * Non-internal qc has failed. Fill the result TF and
+ * summon EH.
+ */
+ if (unlikely(qc->flags & ATA_QCFLAG_FAILED)) {
+ fill_result_tf(qc);
+ ata_qc_schedule_eh(qc);
return;
}
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 5e59050..17a6378 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -3275,6 +3275,7 @@ static int ata_eh_set_lpm(struct ata_link *link, enum ata_lpm_policy policy,
struct ata_port *ap = ata_is_host_link(link) ? link->ap : NULL;
struct ata_eh_context *ehc = &link->eh_context;
struct ata_device *dev, *link_dev = NULL, *lpm_dev = NULL;
+ enum ata_lpm_policy old_policy = link->lpm_policy;
unsigned int hints = ATA_LPM_EMPTY | ATA_LPM_HIPM;
unsigned int err_mask;
int rc;
@@ -3338,6 +3339,14 @@ static int ata_eh_set_lpm(struct ata_link *link, enum ata_lpm_policy policy,
goto fail;
}
+ /*
+ * Low level driver acked the transition. Issue DIPM command
+ * with the new policy set.
+ */
+ link->lpm_policy = policy;
+ if (ap && ap->slave_link)
+ ap->slave_link->lpm_policy = policy;
+
/* host config updated, enable DIPM if transitioning to MIN_POWER */
ata_for_each_dev(dev, link, ENABLED) {
if (policy == ATA_LPM_MIN_POWER && ata_id_has_dipm(dev->id)) {
@@ -3353,12 +3362,14 @@ static int ata_eh_set_lpm(struct ata_link *link, enum ata_lpm_policy policy,
}
}
- link->lpm_policy = policy;
- if (ap && ap->slave_link)
- ap->slave_link->lpm_policy = policy;
return 0;
fail:
+ /* restore the old policy */
+ link->lpm_policy = old_policy;
+ if (ap && ap->slave_link)
+ ap->slave_link->lpm_policy = old_policy;
+
/* if no device or only one more chance is left, disable LPM */
if (!dev || ehc->tries[dev->devno] <= 2) {
ata_link_printk(link, KERN_WARNING,
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
index d05387d..484697f 100644
--- a/drivers/ata/libata-sff.c
+++ b/drivers/ata/libata-sff.c
@@ -1532,11 +1532,10 @@ static unsigned int __ata_sff_port_intr(struct ata_port *ap,
if (!(qc->dev->flags & ATA_DFLAG_CDB_INTR))
return ata_sff_idle_irq(ap);
break;
- case HSM_ST:
- case HSM_ST_LAST:
- break;
- default:
+ case HSM_ST_IDLE:
return ata_sff_idle_irq(ap);
+ default:
+ break;
}
/* check main status, clearing INTRQ if needed */
diff --git a/drivers/ata/pata_cs5536.c b/drivers/ata/pata_cs5536.c
index 21ee23f..a6e6c96 100644
--- a/drivers/ata/pata_cs5536.c
+++ b/drivers/ata/pata_cs5536.c
@@ -37,10 +37,20 @@
#include <linux/delay.h>
#include <linux/libata.h>
#include <scsi/scsi_host.h>
+
+#ifdef CONFIG_X86_32
#include <asm/msr.h>
+static int use_msr;
+module_param_named(msr, use_msr, int, 0644);
+MODULE_PARM_DESC(msr, "Force using MSR to configure IDE function (Default: 0)");
+#else
+#define rdmsr(x, y, z) do { } while (0)
+#define wrmsr(x, y, z) do { } while (0)
+#define use_msr 0
+#endif
#define DRV_NAME "pata_cs5536"
-#define DRV_VERSION "0.0.7"
+#define DRV_VERSION "0.0.8"
enum {
CFG = 0,
@@ -75,8 +85,6 @@ enum {
IDE_ETC_NODMA = 0x03,
};
-static int use_msr;
-
static const u32 msr_reg[4] = {
MSR_IDE_CFG, MSR_IDE_DTC, MSR_IDE_CAST, MSR_IDE_ETC,
};
@@ -88,7 +96,7 @@ static const u8 pci_reg[4] = {
static inline int cs5536_read(struct pci_dev *pdev, int reg, u32 *val)
{
if (unlikely(use_msr)) {
- u32 dummy;
+ u32 dummy __maybe_unused;
rdmsr(msr_reg[reg], *val, dummy);
return 0;
@@ -294,8 +302,6 @@ MODULE_DESCRIPTION("low-level driver for the CS5536 IDE controller");
MODULE_LICENSE("GPL");
MODULE_DEVICE_TABLE(pci, cs5536);
MODULE_VERSION(DRV_VERSION);
-module_param_named(msr, use_msr, int, 0644);
-MODULE_PARM_DESC(msr, "Force using MSR to configure IDE function (Default: 0)");
module_init(cs5536_init);
module_exit(cs5536_exit);
^ permalink raw reply related [flat|nested] 263+ messages in thread
* [git patches] libata fixes
@ 2010-11-12 22:30 Jeff Garzik
0 siblings, 0 replies; 263+ messages in thread
From: Jeff Garzik @ 2010-11-12 22:30 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide, LKML
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/libata-scsi.c | 5 ++++-
drivers/ata/pata_legacy.c | 2 +-
drivers/ata/pata_octeon_cf.c | 2 --
3 files changed, 5 insertions(+), 4 deletions(-)
Julia Lawall (1):
drivers/ata/pata_octeon_cf.c: delete double assignment
Tejun Heo (2):
libata: fix NULL sdev dereference race in atapi_qc_complete()
pata_legacy: fix CONFIG_PATA_WINBOND_VLB_MODULE test
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index d050e07..3f91c01 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -2552,8 +2552,11 @@ static void atapi_qc_complete(struct ata_queued_cmd *qc)
*
* If door lock fails, always clear sdev->locked to
* avoid this infinite loop.
+ *
+ * This may happen before SCSI scan is complete. Make
+ * sure qc->dev->sdev isn't NULL before dereferencing.
*/
- if (qc->cdb[0] == ALLOW_MEDIUM_REMOVAL)
+ if (qc->cdb[0] == ALLOW_MEDIUM_REMOVAL && qc->dev->sdev)
qc->dev->sdev->locked = 0;
qc->scsicmd->result = SAM_STAT_CHECK_CONDITION;
diff --git a/drivers/ata/pata_legacy.c b/drivers/ata/pata_legacy.c
index eaf1941..6bd9425 100644
--- a/drivers/ata/pata_legacy.c
+++ b/drivers/ata/pata_legacy.c
@@ -142,7 +142,7 @@ static int autospeed; /* Chip present which snoops speed changes */
static int pio_mask = ATA_PIO4; /* PIO range for autospeed devices */
static int iordy_mask = 0xFFFFFFFF; /* Use iordy if available */
-#ifdef PATA_WINBOND_VLB_MODULE
+#ifdef CONFIG_PATA_WINBOND_VLB_MODULE
static int winbond = 1; /* Set to probe Winbond controllers,
give I/O port if non standard */
#else
diff --git a/drivers/ata/pata_octeon_cf.c b/drivers/ata/pata_octeon_cf.c
index 74b8298..fa1b95a 100644
--- a/drivers/ata/pata_octeon_cf.c
+++ b/drivers/ata/pata_octeon_cf.c
@@ -653,8 +653,6 @@ static irqreturn_t octeon_cf_interrupt(int irq, void *dev_instance)
ap = host->ports[i];
ocd = ap->dev->platform_data;
-
- ocd = ap->dev->platform_data;
cf_port = ap->private_data;
dma_int.u64 =
cvmx_read_csr(CVMX_MIO_BOOT_DMA_INTX(ocd->dma_engine));
^ permalink raw reply related [flat|nested] 263+ messages in thread
* [git patches] libata fixes
@ 2010-09-10 2:41 Jeff Garzik
0 siblings, 0 replies; 263+ messages in thread
From: Jeff Garzik @ 2010-09-10 2:41 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide, LKML
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
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 013727b..ff1c945 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -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,
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index 3971bc0..d712675 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -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 */
};
diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
index 666850d..68dc678 100644
--- a/drivers/ata/libahci.c
+++ b/drivers/ata/libahci.c
@@ -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;
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index c035b3d..932eaee 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -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;
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index c9ae299..e48302e 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -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;
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
index 3b82d8e..e30c537 100644
--- a/drivers/ata/libata-sff.c
+++ b/drivers/ata/libata-sff.c
@@ -418,6 +418,7 @@ void ata_sff_tf_load(struct ata_port *ap, const struct ata_taskfile *tf)
if (ioaddr->ctl_addr)
iowrite8(tf->ctl, ioaddr->ctl_addr);
ap->last_ctl = tf->ctl;
+ ata_wait_idle(ap);
}
if (is_addr && (tf->flags & ATA_TFLAG_LBA48)) {
@@ -453,6 +454,8 @@ void ata_sff_tf_load(struct ata_port *ap, const struct ata_taskfile *tf)
iowrite8(tf->device, ioaddr->device_addr);
VPRINTK("device 0x%X\n", tf->device);
}
+
+ ata_wait_idle(ap);
}
EXPORT_SYMBOL_GPL(ata_sff_tf_load);
@@ -1042,7 +1045,8 @@ static void ata_hsm_qc_complete(struct ata_queued_cmd *qc, int in_wq)
int ata_sff_hsm_move(struct ata_port *ap, struct ata_queued_cmd *qc,
u8 status, int in_wq)
{
- struct ata_eh_info *ehi = &ap->link.eh_info;
+ struct ata_link *link = qc->dev->link;
+ struct ata_eh_info *ehi = &link->eh_info;
unsigned long flags = 0;
int poll_next;
@@ -1298,8 +1302,14 @@ fsm_start:
}
EXPORT_SYMBOL_GPL(ata_sff_hsm_move);
-void ata_sff_queue_pio_task(struct ata_port *ap, unsigned long delay)
+void ata_sff_queue_pio_task(struct ata_link *link, unsigned long delay)
{
+ struct ata_port *ap = link->ap;
+
+ WARN_ON((ap->sff_pio_task_link != NULL) &&
+ (ap->sff_pio_task_link != link));
+ ap->sff_pio_task_link = link;
+
/* may fail if ata_sff_flush_pio_task() in progress */
queue_delayed_work(ata_sff_wq, &ap->sff_pio_task,
msecs_to_jiffies(delay));
@@ -1321,14 +1331,18 @@ static void ata_sff_pio_task(struct work_struct *work)
{
struct ata_port *ap =
container_of(work, struct ata_port, sff_pio_task.work);
+ struct ata_link *link = ap->sff_pio_task_link;
struct ata_queued_cmd *qc;
u8 status;
int poll_next;
+ BUG_ON(ap->sff_pio_task_link == NULL);
/* qc can be NULL if timeout occurred */
- qc = ata_qc_from_tag(ap, ap->link.active_tag);
- if (!qc)
+ qc = ata_qc_from_tag(ap, link->active_tag);
+ if (!qc) {
+ ap->sff_pio_task_link = NULL;
return;
+ }
fsm_start:
WARN_ON_ONCE(ap->hsm_task_state == HSM_ST_IDLE);
@@ -1345,11 +1359,16 @@ fsm_start:
msleep(2);
status = ata_sff_busy_wait(ap, ATA_BUSY, 10);
if (status & ATA_BUSY) {
- ata_sff_queue_pio_task(ap, ATA_SHORT_PAUSE);
+ ata_sff_queue_pio_task(link, ATA_SHORT_PAUSE);
return;
}
}
+ /*
+ * hsm_move() may trigger another command to be processed.
+ * clean the link beforehand.
+ */
+ ap->sff_pio_task_link = NULL;
/* move the HSM */
poll_next = ata_sff_hsm_move(ap, qc, status, 1);
@@ -1376,6 +1395,7 @@ fsm_start:
unsigned int ata_sff_qc_issue(struct ata_queued_cmd *qc)
{
struct ata_port *ap = qc->ap;
+ struct ata_link *link = qc->dev->link;
/* Use polling pio if the LLD doesn't handle
* interrupt driven pio and atapi CDB interrupt.
@@ -1396,7 +1416,7 @@ unsigned int ata_sff_qc_issue(struct ata_queued_cmd *qc)
ap->hsm_task_state = HSM_ST_LAST;
if (qc->tf.flags & ATA_TFLAG_POLLING)
- ata_sff_queue_pio_task(ap, 0);
+ ata_sff_queue_pio_task(link, 0);
break;
@@ -1409,7 +1429,7 @@ unsigned int ata_sff_qc_issue(struct ata_queued_cmd *qc)
if (qc->tf.flags & ATA_TFLAG_WRITE) {
/* PIO data out protocol */
ap->hsm_task_state = HSM_ST_FIRST;
- ata_sff_queue_pio_task(ap, 0);
+ ata_sff_queue_pio_task(link, 0);
/* always send first data block using the
* ata_sff_pio_task() codepath.
@@ -1419,7 +1439,7 @@ unsigned int ata_sff_qc_issue(struct ata_queued_cmd *qc)
ap->hsm_task_state = HSM_ST;
if (qc->tf.flags & ATA_TFLAG_POLLING)
- ata_sff_queue_pio_task(ap, 0);
+ ata_sff_queue_pio_task(link, 0);
/* if polling, ata_sff_pio_task() handles the
* rest. otherwise, interrupt handler takes
@@ -1441,7 +1461,7 @@ unsigned int ata_sff_qc_issue(struct ata_queued_cmd *qc)
/* send cdb by polling if no cdb interrupt */
if ((!(qc->dev->flags & ATA_DFLAG_CDB_INTR)) ||
(qc->tf.flags & ATA_TFLAG_POLLING))
- ata_sff_queue_pio_task(ap, 0);
+ ata_sff_queue_pio_task(link, 0);
break;
default:
@@ -2734,6 +2754,7 @@ EXPORT_SYMBOL_GPL(ata_bmdma_dumb_qc_prep);
unsigned int ata_bmdma_qc_issue(struct ata_queued_cmd *qc)
{
struct ata_port *ap = qc->ap;
+ struct ata_link *link = qc->dev->link;
/* defer PIO handling to sff_qc_issue */
if (!ata_is_dma(qc->tf.protocol))
@@ -2762,7 +2783,7 @@ unsigned int ata_bmdma_qc_issue(struct ata_queued_cmd *qc)
/* send cdb by polling if no cdb interrupt */
if (!(qc->dev->flags & ATA_DFLAG_CDB_INTR))
- ata_sff_queue_pio_task(ap, 0);
+ ata_sff_queue_pio_task(link, 0);
break;
default:
diff --git a/drivers/ata/pata_artop.c b/drivers/ata/pata_artop.c
index ba43f0f..2215632 100644
--- a/drivers/ata/pata_artop.c
+++ b/drivers/ata/pata_artop.c
@@ -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);
diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c
index 5e65988..ac8d7d9 100644
--- a/drivers/ata/pata_via.c
+++ b/drivers/ata/pata_via.c
@@ -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)
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index 8198259..a9fd970 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -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;
}
diff --git a/include/linux/libata.h b/include/linux/libata.h
index f010f18..45fb296 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -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,
^ permalink raw reply related [flat|nested] 263+ messages in thread
* [git patches] libata fixes
@ 2010-08-25 23:32 Jeff Garzik
0 siblings, 0 replies; 263+ messages in thread
From: Jeff Garzik @ 2010-08-25 23:32 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide, LKML
Note that the pata_winbond change really is a fix. See
http://marc.info/?t=128084945700004&r=1&w=2 for details and original bug
report from Dan Carpenter. The change updates pata_legacy to support
winbond.
The rest are mostly tiny patches as befitting -rc. sata_mv apparently
needs special handling for the DSM (aka TRIM) command, in addition to
needing an its-broken fix in libata-core.
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/Kconfig | 1 +
drivers/ata/Makefile | 1 -
drivers/ata/ahci.c | 11 ++
drivers/ata/ahci.h | 1 +
drivers/ata/libahci.c | 16 ++-
drivers/ata/libata-core.c | 11 +-
drivers/ata/libata-sff.c | 4 -
drivers/ata/pata_cmd64x.c | 6 -
drivers/ata/pata_legacy.c | 15 ++-
drivers/ata/pata_winbond.c | 282 ------------------------------------------
drivers/ata/sata_dwc_460ex.c | 2 +-
drivers/ata/sata_mv.c | 44 ++++++-
12 files changed, 85 insertions(+), 309 deletions(-)
delete mode 100644 drivers/ata/pata_winbond.c
Bartlomiej Zolnierkiewicz (1):
libata: remove no longer needed pata_winbond driver
Dan Carpenter (1):
[libata] sata_dwc_460ex: signdness bug
Mark Lord (2):
sata_mv: fix broken DSM/TRIM support (v2)
libata-sff: remove harmful BUG_ON from ata_bmdma_qc_issue
Tejun Heo (3):
pata_cmd64x: revert commit d62f5576
ahci: add HFLAG_YES_FBS and apply it to 88SE9128
libata: be less of a drama queen on empty data commands
diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
index 65e3e27..11ec911 100644
--- a/drivers/ata/Kconfig
+++ b/drivers/ata/Kconfig
@@ -828,6 +828,7 @@ config PATA_SAMSUNG_CF
config PATA_WINBOND_VLB
tristate "Winbond W83759A VLB PATA support (Experimental)"
depends on ISA && EXPERIMENTAL
+ select PATA_LEGACY
help
Support for the Winbond W83759A controller on Vesa Local Bus
systems.
diff --git a/drivers/ata/Makefile b/drivers/ata/Makefile
index 158eaa9..d5df04a 100644
--- a/drivers/ata/Makefile
+++ b/drivers/ata/Makefile
@@ -89,7 +89,6 @@ obj-$(CONFIG_PATA_QDI) += pata_qdi.o
obj-$(CONFIG_PATA_RB532) += pata_rb532_cf.o
obj-$(CONFIG_PATA_RZ1000) += pata_rz1000.o
obj-$(CONFIG_PATA_SAMSUNG_CF) += pata_samsung_cf.o
-obj-$(CONFIG_PATA_WINBOND_VLB) += pata_winbond.o
obj-$(CONFIG_PATA_PXA) += pata_pxa.o
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index fe75d8b..013727b 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -60,6 +60,7 @@ enum board_ids {
board_ahci,
board_ahci_ign_iferr,
board_ahci_nosntf,
+ board_ahci_yes_fbs,
/* board IDs for specific chipsets in alphabetical order */
board_ahci_mcp65,
@@ -132,6 +133,14 @@ static const struct ata_port_info ahci_port_info[] = {
.udma_mask = ATA_UDMA6,
.port_ops = &ahci_ops,
},
+ [board_ahci_yes_fbs] =
+ {
+ AHCI_HFLAGS (AHCI_HFLAG_YES_FBS),
+ .flags = AHCI_FLAG_COMMON,
+ .pio_mask = ATA_PIO4,
+ .udma_mask = ATA_UDMA6,
+ .port_ops = &ahci_ops,
+ },
/* by chipsets */
[board_ahci_mcp65] =
{
@@ -362,6 +371,8 @@ static const struct pci_device_id ahci_pci_tbl[] = {
/* Marvell */
{ PCI_VDEVICE(MARVELL, 0x6145), board_ahci_mv }, /* 6145 */
{ PCI_VDEVICE(MARVELL, 0x6121), board_ahci_mv }, /* 6121 */
+ { PCI_DEVICE(0x1b4b, 0x9123),
+ .driver_data = board_ahci_yes_fbs }, /* 88se9128 */
/* Promise */
{ PCI_VDEVICE(PROMISE, 0x3f20), board_ahci }, /* PDC42819 */
diff --git a/drivers/ata/ahci.h b/drivers/ata/ahci.h
index 7113c57..474427b 100644
--- a/drivers/ata/ahci.h
+++ b/drivers/ata/ahci.h
@@ -209,6 +209,7 @@ enum {
link offline */
AHCI_HFLAG_NO_SNTF = (1 << 12), /* no sntf */
AHCI_HFLAG_NO_FPDMA_AA = (1 << 13), /* no FPDMA AA */
+ AHCI_HFLAG_YES_FBS = (1 << 14), /* force FBS cap on */
/* ap->flags bits */
diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
index 81e772a..666850d 100644
--- a/drivers/ata/libahci.c
+++ b/drivers/ata/libahci.c
@@ -430,6 +430,12 @@ void ahci_save_initial_config(struct device *dev,
cap &= ~HOST_CAP_SNTF;
}
+ if (!(cap & HOST_CAP_FBS) && (hpriv->flags & AHCI_HFLAG_YES_FBS)) {
+ dev_printk(KERN_INFO, dev,
+ "controller can do FBS, turning on CAP_FBS\n");
+ cap |= HOST_CAP_FBS;
+ }
+
if (force_port_map && port_map != force_port_map) {
dev_printk(KERN_INFO, dev, "forcing port_map 0x%x -> 0x%x\n",
port_map, force_port_map);
@@ -2036,9 +2042,15 @@ static int ahci_port_start(struct ata_port *ap)
u32 cmd = readl(port_mmio + PORT_CMD);
if (cmd & PORT_CMD_FBSCP)
pp->fbs_supported = true;
- else
+ else if (hpriv->flags & AHCI_HFLAG_YES_FBS) {
+ dev_printk(KERN_INFO, dev,
+ "port %d can do FBS, forcing FBSCP\n",
+ ap->port_no);
+ pp->fbs_supported = true;
+ } else
dev_printk(KERN_WARNING, dev,
- "The port is not capable of FBS\n");
+ "port %d is not capable of FBS\n",
+ ap->port_no);
}
if (pp->fbs_supported) {
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 7ef7c4f..c035b3d 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -5111,15 +5111,18 @@ void ata_qc_issue(struct ata_queued_cmd *qc)
qc->flags |= ATA_QCFLAG_ACTIVE;
ap->qc_active |= 1 << qc->tag;
- /* We guarantee to LLDs that they will have at least one
+ /*
+ * We guarantee to LLDs that they will have at least one
* non-zero sg if the command is a data command.
*/
- BUG_ON(ata_is_data(prot) && (!qc->sg || !qc->n_elem || !qc->nbytes));
+ if (WARN_ON_ONCE(ata_is_data(prot) &&
+ (!qc->sg || !qc->n_elem || !qc->nbytes)))
+ goto sys_err;
if (ata_is_dma(prot) || (ata_is_pio(prot) &&
(ap->flags & ATA_FLAG_PIO_DMA)))
if (ata_sg_setup(qc))
- goto sg_err;
+ goto sys_err;
/* if device is sleeping, schedule reset and abort the link */
if (unlikely(qc->dev->flags & ATA_DFLAG_SLEEPING)) {
@@ -5136,7 +5139,7 @@ void ata_qc_issue(struct ata_queued_cmd *qc)
goto err;
return;
-sg_err:
+sys_err:
qc->err_mask |= AC_ERR_SYSTEM;
err:
ata_qc_complete(qc);
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
index 674c143..3b82d8e 100644
--- a/drivers/ata/libata-sff.c
+++ b/drivers/ata/libata-sff.c
@@ -2735,10 +2735,6 @@ unsigned int ata_bmdma_qc_issue(struct ata_queued_cmd *qc)
{
struct ata_port *ap = qc->ap;
- /* see ata_dma_blacklisted() */
- BUG_ON((ap->flags & ATA_FLAG_PIO_POLLING) &&
- qc->tf.protocol == ATAPI_PROT_DMA);
-
/* defer PIO handling to sff_qc_issue */
if (!ata_is_dma(qc->tf.protocol))
return ata_sff_qc_issue(qc);
diff --git a/drivers/ata/pata_cmd64x.c b/drivers/ata/pata_cmd64x.c
index 9f5da1c..905ff76 100644
--- a/drivers/ata/pata_cmd64x.c
+++ b/drivers/ata/pata_cmd64x.c
@@ -121,14 +121,8 @@ static void cmd64x_set_timing(struct ata_port *ap, struct ata_device *adev, u8 m
if (pair) {
struct ata_timing tp;
-
ata_timing_compute(pair, pair->pio_mode, &tp, T, 0);
ata_timing_merge(&t, &tp, &t, ATA_TIMING_SETUP);
- if (pair->dma_mode) {
- ata_timing_compute(pair, pair->dma_mode,
- &tp, T, 0);
- ata_timing_merge(&tp, &t, &t, ATA_TIMING_SETUP);
- }
}
}
diff --git a/drivers/ata/pata_legacy.c b/drivers/ata/pata_legacy.c
index 9df1ff7..eaf1941 100644
--- a/drivers/ata/pata_legacy.c
+++ b/drivers/ata/pata_legacy.c
@@ -44,6 +44,9 @@
* Specific support is included for the ht6560a/ht6560b/opti82c611a/
* opti82c465mv/promise 20230c/20630/qdi65x0/winbond83759A
*
+ * Support for the Winbond 83759A when operating in advanced mode.
+ * Multichip mode is not currently supported.
+ *
* Use the autospeed and pio_mask options with:
* Appian ADI/2 aka CLPD7220 or AIC25VL01.
* Use the jumpers, autospeed and set pio_mask to the mode on the jumpers with
@@ -135,12 +138,18 @@ static int ht6560b; /* HT 6560A on primary 1, second 2, both 3 */
static int opti82c611a; /* Opti82c611A on primary 1, sec 2, both 3 */
static int opti82c46x; /* Opti 82c465MV present(pri/sec autodetect) */
static int qdi; /* Set to probe QDI controllers */
-static int winbond; /* Set to probe Winbond controllers,
- give I/O port if non standard */
static int autospeed; /* Chip present which snoops speed changes */
static int pio_mask = ATA_PIO4; /* PIO range for autospeed devices */
static int iordy_mask = 0xFFFFFFFF; /* Use iordy if available */
+#ifdef PATA_WINBOND_VLB_MODULE
+static int winbond = 1; /* Set to probe Winbond controllers,
+ give I/O port if non standard */
+#else
+static int winbond; /* Set to probe Winbond controllers,
+ give I/O port if non standard */
+#endif
+
/**
* legacy_probe_add - Add interface to probe list
* @port: Controller port
@@ -1297,6 +1306,7 @@ MODULE_AUTHOR("Alan Cox");
MODULE_DESCRIPTION("low-level driver for legacy ATA");
MODULE_LICENSE("GPL");
MODULE_VERSION(DRV_VERSION);
+MODULE_ALIAS("pata_winbond");
module_param(probe_all, int, 0);
module_param(autospeed, int, 0);
@@ -1305,6 +1315,7 @@ module_param(ht6560b, int, 0);
module_param(opti82c611a, int, 0);
module_param(opti82c46x, int, 0);
module_param(qdi, int, 0);
+module_param(winbond, int, 0);
module_param(pio_mask, int, 0);
module_param(iordy_mask, int, 0);
diff --git a/drivers/ata/pata_winbond.c b/drivers/ata/pata_winbond.c
deleted file mode 100644
index 6d8619b..0000000
--- a/drivers/ata/pata_winbond.c
+++ /dev/null
@@ -1,282 +0,0 @@
-/*
- * pata_winbond.c - Winbond VLB ATA controllers
- * (C) 2006 Red Hat
- *
- * Support for the Winbond 83759A when operating in advanced mode.
- * Multichip mode is not currently supported.
- */
-
-#include <linux/kernel.h>
-#include <linux/module.h>
-#include <linux/init.h>
-#include <linux/blkdev.h>
-#include <linux/delay.h>
-#include <scsi/scsi_host.h>
-#include <linux/libata.h>
-#include <linux/platform_device.h>
-
-#define DRV_NAME "pata_winbond"
-#define DRV_VERSION "0.0.3"
-
-#define NR_HOST 4 /* Two winbond controllers, two channels each */
-
-struct winbond_data {
- unsigned long config;
- struct platform_device *platform_dev;
-};
-
-static struct ata_host *winbond_host[NR_HOST];
-static struct winbond_data winbond_data[NR_HOST];
-static int nr_winbond_host;
-
-#ifdef MODULE
-static int probe_winbond = 1;
-#else
-static int probe_winbond;
-#endif
-
-static DEFINE_SPINLOCK(winbond_lock);
-
-static void winbond_writecfg(unsigned long port, u8 reg, u8 val)
-{
- unsigned long flags;
- spin_lock_irqsave(&winbond_lock, flags);
- outb(reg, port + 0x01);
- outb(val, port + 0x02);
- spin_unlock_irqrestore(&winbond_lock, flags);
-}
-
-static u8 winbond_readcfg(unsigned long port, u8 reg)
-{
- u8 val;
-
- unsigned long flags;
- spin_lock_irqsave(&winbond_lock, flags);
- outb(reg, port + 0x01);
- val = inb(port + 0x02);
- spin_unlock_irqrestore(&winbond_lock, flags);
-
- return val;
-}
-
-static void winbond_set_piomode(struct ata_port *ap, struct ata_device *adev)
-{
- struct ata_timing t;
- struct winbond_data *winbond = ap->host->private_data;
- int active, recovery;
- u8 reg;
- int timing = 0x88 + (ap->port_no * 4) + (adev->devno * 2);
-
- reg = winbond_readcfg(winbond->config, 0x81);
-
- /* Get the timing data in cycles */
- if (reg & 0x40) /* Fast VLB bus, assume 50MHz */
- ata_timing_compute(adev, adev->pio_mode, &t, 20000, 1000);
- else
- ata_timing_compute(adev, adev->pio_mode, &t, 30303, 1000);
-
- active = (clamp_val(t.active, 3, 17) - 1) & 0x0F;
- recovery = (clamp_val(t.recover, 1, 15) + 1) & 0x0F;
- timing = (active << 4) | recovery;
- winbond_writecfg(winbond->config, timing, reg);
-
- /* Load the setup timing */
-
- reg = 0x35;
- if (adev->class != ATA_DEV_ATA)
- reg |= 0x08; /* FIFO off */
- if (!ata_pio_need_iordy(adev))
- reg |= 0x02; /* IORDY off */
- reg |= (clamp_val(t.setup, 0, 3) << 6);
- winbond_writecfg(winbond->config, timing + 1, reg);
-}
-
-
-static unsigned int winbond_data_xfer(struct ata_device *dev,
- unsigned char *buf, unsigned int buflen, int rw)
-{
- struct ata_port *ap = dev->link->ap;
- int slop = buflen & 3;
-
- if (ata_id_has_dword_io(dev->id)) {
- if (rw == READ)
- ioread32_rep(ap->ioaddr.data_addr, buf, buflen >> 2);
- else
- iowrite32_rep(ap->ioaddr.data_addr, buf, buflen >> 2);
-
- if (unlikely(slop)) {
- __le32 pad;
- if (rw == READ) {
- pad = cpu_to_le32(ioread32(ap->ioaddr.data_addr));
- memcpy(buf + buflen - slop, &pad, slop);
- } else {
- memcpy(&pad, buf + buflen - slop, slop);
- iowrite32(le32_to_cpu(pad), ap->ioaddr.data_addr);
- }
- buflen += 4 - slop;
- }
- } else
- buflen = ata_sff_data_xfer(dev, buf, buflen, rw);
-
- return buflen;
-}
-
-static struct scsi_host_template winbond_sht = {
- ATA_PIO_SHT(DRV_NAME),
-};
-
-static struct ata_port_operations winbond_port_ops = {
- .inherits = &ata_sff_port_ops,
- .sff_data_xfer = winbond_data_xfer,
- .cable_detect = ata_cable_40wire,
- .set_piomode = winbond_set_piomode,
-};
-
-/**
- * winbond_init_one - attach a winbond interface
- * @type: Type to display
- * @io: I/O port start
- * @irq: interrupt line
- * @fast: True if on a > 33Mhz VLB
- *
- * Register a VLB bus IDE interface. Such interfaces are PIO and we
- * assume do not support IRQ sharing.
- */
-
-static __init int winbond_init_one(unsigned long port)
-{
- struct platform_device *pdev;
- u8 reg;
- int i, rc;
-
- reg = winbond_readcfg(port, 0x81);
- reg |= 0x80; /* jumpered mode off */
- winbond_writecfg(port, 0x81, reg);
- reg = winbond_readcfg(port, 0x83);
- reg |= 0xF0; /* local control */
- winbond_writecfg(port, 0x83, reg);
- reg = winbond_readcfg(port, 0x85);
- reg |= 0xF0; /* programmable timing */
- winbond_writecfg(port, 0x85, reg);
-
- reg = winbond_readcfg(port, 0x81);
-
- if (!(reg & 0x03)) /* Disabled */
- return -ENODEV;
-
- for (i = 0; i < 2 ; i ++) {
- unsigned long cmd_port = 0x1F0 - (0x80 * i);
- unsigned long ctl_port = cmd_port + 0x206;
- struct ata_host *host;
- struct ata_port *ap;
- void __iomem *cmd_addr, *ctl_addr;
-
- if (!(reg & (1 << i)))
- continue;
-
- pdev = platform_device_register_simple(DRV_NAME, nr_winbond_host, NULL, 0);
- if (IS_ERR(pdev))
- return PTR_ERR(pdev);
-
- rc = -ENOMEM;
- host = ata_host_alloc(&pdev->dev, 1);
- if (!host)
- goto err_unregister;
- ap = host->ports[0];
-
- rc = -ENOMEM;
- cmd_addr = devm_ioport_map(&pdev->dev, cmd_port, 8);
- ctl_addr = devm_ioport_map(&pdev->dev, ctl_port, 1);
- if (!cmd_addr || !ctl_addr)
- goto err_unregister;
-
- ata_port_desc(ap, "cmd 0x%lx ctl 0x%lx", cmd_port, ctl_port);
-
- ap->ops = &winbond_port_ops;
- ap->pio_mask = ATA_PIO4;
- ap->flags |= ATA_FLAG_SLAVE_POSS;
- ap->ioaddr.cmd_addr = cmd_addr;
- ap->ioaddr.altstatus_addr = ctl_addr;
- ap->ioaddr.ctl_addr = ctl_addr;
- ata_sff_std_ports(&ap->ioaddr);
-
- /* hook in a private data structure per channel */
- host->private_data = &winbond_data[nr_winbond_host];
- winbond_data[nr_winbond_host].config = port;
- winbond_data[nr_winbond_host].platform_dev = pdev;
-
- /* activate */
- rc = ata_host_activate(host, 14 + i, ata_sff_interrupt, 0,
- &winbond_sht);
- if (rc)
- goto err_unregister;
-
- winbond_host[nr_winbond_host++] = dev_get_drvdata(&pdev->dev);
- }
-
- return 0;
-
- err_unregister:
- platform_device_unregister(pdev);
- return rc;
-}
-
-/**
- * winbond_init - attach winbond interfaces
- *
- * Attach winbond IDE interfaces by scanning the ports it may occupy.
- */
-
-static __init int winbond_init(void)
-{
- static const unsigned long config[2] = { 0x130, 0x1B0 };
-
- int ct = 0;
- int i;
-
- if (probe_winbond == 0)
- return -ENODEV;
-
- /*
- * Check both base addresses
- */
-
- for (i = 0; i < 2; i++) {
- if (probe_winbond & (1<<i)) {
- int ret = 0;
- unsigned long port = config[i];
-
- if (request_region(port, 2, "pata_winbond")) {
- ret = winbond_init_one(port);
- if (ret <= 0)
- release_region(port, 2);
- else ct+= ret;
- }
- }
- }
- if (ct != 0)
- return 0;
- return -ENODEV;
-}
-
-static __exit void winbond_exit(void)
-{
- int i;
-
- for (i = 0; i < nr_winbond_host; i++) {
- ata_host_detach(winbond_host[i]);
- release_region(winbond_data[i].config, 2);
- platform_device_unregister(winbond_data[i].platform_dev);
- }
-}
-
-MODULE_AUTHOR("Alan Cox");
-MODULE_DESCRIPTION("low-level driver for Winbond VL ATA");
-MODULE_LICENSE("GPL");
-MODULE_VERSION(DRV_VERSION);
-
-module_init(winbond_init);
-module_exit(winbond_exit);
-
-module_param(probe_winbond, int, 0);
-
diff --git a/drivers/ata/sata_dwc_460ex.c b/drivers/ata/sata_dwc_460ex.c
index 2673a3d..6cf57c5 100644
--- a/drivers/ata/sata_dwc_460ex.c
+++ b/drivers/ata/sata_dwc_460ex.c
@@ -1459,7 +1459,7 @@ static void sata_dwc_qc_prep_by_tag(struct ata_queued_cmd *qc, u8 tag)
{
struct scatterlist *sg = qc->sg;
struct ata_port *ap = qc->ap;
- u32 dma_chan;
+ int dma_chan;
struct sata_dwc_device *hsdev = HSDEV_FROM_AP(ap);
struct sata_dwc_device_port *hsdevp = HSDEVP_FROM_AP(ap);
int err;
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index 9463c71..8198259 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -1898,19 +1898,25 @@ static void mv_bmdma_start(struct ata_queued_cmd *qc)
* LOCKING:
* Inherited from caller.
*/
-static void mv_bmdma_stop(struct ata_queued_cmd *qc)
+static void mv_bmdma_stop_ap(struct ata_port *ap)
{
- struct ata_port *ap = qc->ap;
void __iomem *port_mmio = mv_ap_base(ap);
u32 cmd;
/* clear start/stop bit */
cmd = readl(port_mmio + BMDMA_CMD);
- cmd &= ~ATA_DMA_START;
- writelfl(cmd, port_mmio + BMDMA_CMD);
+ if (cmd & ATA_DMA_START) {
+ cmd &= ~ATA_DMA_START;
+ writelfl(cmd, port_mmio + BMDMA_CMD);
+
+ /* one-PIO-cycle guaranteed wait, per spec, for HDMA1:0 transition */
+ ata_sff_dma_pause(ap);
+ }
+}
- /* one-PIO-cycle guaranteed wait, per spec, for HDMA1:0 transition */
- ata_sff_dma_pause(ap);
+static void mv_bmdma_stop(struct ata_queued_cmd *qc)
+{
+ mv_bmdma_stop_ap(qc->ap);
}
/**
@@ -1934,8 +1940,21 @@ static u8 mv_bmdma_status(struct ata_port *ap)
reg = readl(port_mmio + BMDMA_STATUS);
if (reg & ATA_DMA_ACTIVE)
status = ATA_DMA_ACTIVE;
- else
+ else if (reg & ATA_DMA_ERR)
status = (reg & ATA_DMA_ERR) | ATA_DMA_INTR;
+ else {
+ /*
+ * Just because DMA_ACTIVE is 0 (DMA completed),
+ * this does _not_ mean the device is "done".
+ * So we should not yet be signalling ATA_DMA_INTR
+ * in some cases. Eg. DSM/TRIM, and perhaps others.
+ */
+ mv_bmdma_stop_ap(ap);
+ if (ioread8(ap->ioaddr.altstatus_addr) & ATA_BUSY)
+ status = 0;
+ else
+ status = ATA_DMA_INTR;
+ }
return status;
}
@@ -1995,6 +2014,9 @@ static void mv_qc_prep(struct ata_queued_cmd *qc)
switch (tf->protocol) {
case ATA_PROT_DMA:
+ if (tf->command == ATA_CMD_DSM)
+ return;
+ /* fall-thru */
case ATA_PROT_NCQ:
break; /* continue below */
case ATA_PROT_PIO:
@@ -2094,6 +2116,8 @@ static void mv_qc_prep_iie(struct ata_queued_cmd *qc)
if ((tf->protocol != ATA_PROT_DMA) &&
(tf->protocol != ATA_PROT_NCQ))
return;
+ if (tf->command == ATA_CMD_DSM)
+ return; /* use bmdma for this */
/* Fill in Gen IIE command request block */
if (!(tf->flags & ATA_TFLAG_WRITE))
@@ -2289,6 +2313,12 @@ static unsigned int mv_qc_issue(struct ata_queued_cmd *qc)
switch (qc->tf.protocol) {
case ATA_PROT_DMA:
+ if (qc->tf.command == ATA_CMD_DSM) {
+ if (!ap->ops->bmdma_setup) /* no bmdma on GEN_I */
+ return AC_ERR_OTHER;
+ break; /* use bmdma for this */
+ }
+ /* fall thru */
case ATA_PROT_NCQ:
mv_start_edma(ap, port_mmio, pp, qc->tf.protocol);
pp->req_idx = (pp->req_idx + 1) & MV_MAX_Q_DEPTH_MASK;
^ permalink raw reply related [flat|nested] 263+ messages in thread
* [git patches] libata fixes
@ 2010-07-01 20:20 Jeff Garzik
0 siblings, 0 replies; 263+ messages in thread
From: Jeff Garzik @ 2010-07-01 20:20 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide, LKML
1) Some MacBook Pro's don't like ahci, prefer ata_generic for these
2) fix ABI-visible signedness bug for AHCI Enclosure Management (EM)
messages
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 | 10 ++++++++++
drivers/ata/ata_generic.c | 30 ++++++++++++++++++++++++------
drivers/ata/libahci.c | 5 +++--
include/linux/pci_ids.h | 1 +
4 files changed, 38 insertions(+), 8 deletions(-)
Harry Zhang (1):
libahci: Fix bug in storing EM messages
Tejun Heo (2):
ahci,ata_generic: let ata_generic handle new MBP w/ MCP89
ata_generic: implement ATA_GEN_* flags and force enable DMA on MBP 7,1
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 8ca16f5..f252253 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -1053,6 +1053,16 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
if (pdev->vendor == PCI_VENDOR_ID_MARVELL && !marvell_enable)
return -ENODEV;
+ /*
+ * For some reason, MCP89 on MacBook 7,1 doesn't work with
+ * ahci, use ata_generic instead.
+ */
+ if (pdev->vendor == PCI_VENDOR_ID_NVIDIA &&
+ pdev->device == PCI_DEVICE_ID_NVIDIA_NFORCE_MCP89_SATA &&
+ pdev->subsystem_vendor == PCI_VENDOR_ID_APPLE &&
+ pdev->subsystem_device == 0xcb89)
+ return -ENODEV;
+
/* Promise's PDC42819 is a SAS/SATA controller that has an AHCI mode.
* At the moment, we can only use the AHCI mode. Let the users know
* that for SAS drives they're out of luck.
diff --git a/drivers/ata/ata_generic.c b/drivers/ata/ata_generic.c
index 573158a..7107a69 100644
--- a/drivers/ata/ata_generic.c
+++ b/drivers/ata/ata_generic.c
@@ -32,6 +32,11 @@
* A generic parallel ATA driver using libata
*/
+enum {
+ ATA_GEN_CLASS_MATCH = (1 << 0),
+ ATA_GEN_FORCE_DMA = (1 << 1),
+};
+
/**
* generic_set_mode - mode setting
* @link: link to set up
@@ -46,13 +51,17 @@
static int generic_set_mode(struct ata_link *link, struct ata_device **unused)
{
struct ata_port *ap = link->ap;
+ const struct pci_device_id *id = ap->host->private_data;
int dma_enabled = 0;
struct ata_device *dev;
struct pci_dev *pdev = to_pci_dev(ap->host->dev);
- /* Bits 5 and 6 indicate if DMA is active on master/slave */
- if (ap->ioaddr.bmdma_addr)
+ if (id->driver_data & ATA_GEN_FORCE_DMA) {
+ dma_enabled = 0xff;
+ } else if (ap->ioaddr.bmdma_addr) {
+ /* Bits 5 and 6 indicate if DMA is active on master/slave */
dma_enabled = ioread8(ap->ioaddr.bmdma_addr + ATA_DMA_STATUS);
+ }
if (pdev->vendor == PCI_VENDOR_ID_CENATEK)
dma_enabled = 0xFF;
@@ -126,7 +135,7 @@ static int ata_generic_init_one(struct pci_dev *dev, const struct pci_device_id
const struct ata_port_info *ppi[] = { &info, NULL };
/* Don't use the generic entry unless instructed to do so */
- if (id->driver_data == 1 && all_generic_ide == 0)
+ if ((id->driver_data & ATA_GEN_CLASS_MATCH) && all_generic_ide == 0)
return -ENODEV;
/* Devices that need care */
@@ -155,7 +164,7 @@ static int ata_generic_init_one(struct pci_dev *dev, const struct pci_device_id
return rc;
pcim_pin_device(dev);
}
- return ata_pci_bmdma_init_one(dev, ppi, &generic_sht, NULL, 0);
+ return ata_pci_bmdma_init_one(dev, ppi, &generic_sht, (void *)id, 0);
}
static struct pci_device_id ata_generic[] = {
@@ -167,7 +176,15 @@ static struct pci_device_id ata_generic[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_HINT, PCI_DEVICE_ID_HINT_VXPROII_IDE), },
{ PCI_DEVICE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C561), },
{ PCI_DEVICE(PCI_VENDOR_ID_OPTI, PCI_DEVICE_ID_OPTI_82C558), },
- { PCI_DEVICE(PCI_VENDOR_ID_CENATEK,PCI_DEVICE_ID_CENATEK_IDE), },
+ { PCI_DEVICE(PCI_VENDOR_ID_CENATEK,PCI_DEVICE_ID_CENATEK_IDE),
+ .driver_data = ATA_GEN_FORCE_DMA },
+ /*
+ * For some reason, MCP89 on MacBook 7,1 doesn't work with
+ * ahci, use ata_generic instead.
+ */
+ { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP89_SATA,
+ PCI_VENDOR_ID_APPLE, 0xcb89,
+ .driver_data = ATA_GEN_FORCE_DMA },
#if !defined(CONFIG_PATA_TOSHIBA) && !defined(CONFIG_PATA_TOSHIBA_MODULE)
{ PCI_DEVICE(PCI_VENDOR_ID_TOSHIBA,PCI_DEVICE_ID_TOSHIBA_PICCOLO_1), },
{ PCI_DEVICE(PCI_VENDOR_ID_TOSHIBA,PCI_DEVICE_ID_TOSHIBA_PICCOLO_2), },
@@ -175,7 +192,8 @@ static struct pci_device_id ata_generic[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_TOSHIBA,PCI_DEVICE_ID_TOSHIBA_PICCOLO_5), },
#endif
/* Must come last. If you add entries adjust this table appropriately */
- { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_STORAGE_IDE << 8, 0xFFFFFF00UL, 1},
+ { PCI_DEVICE_CLASS(PCI_CLASS_STORAGE_IDE << 8, 0xFFFFFF00UL),
+ .driver_data = ATA_GEN_CLASS_MATCH },
{ 0, },
};
diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
index 261f86d..81e772a 100644
--- a/drivers/ata/libahci.c
+++ b/drivers/ata/libahci.c
@@ -324,6 +324,7 @@ static ssize_t ahci_store_em_buffer(struct device *dev,
struct ahci_host_priv *hpriv = ap->host->private_data;
void __iomem *mmio = hpriv->mmio;
void __iomem *em_mmio = mmio + hpriv->em_loc;
+ const unsigned char *msg_buf = buf;
u32 em_ctl, msg;
unsigned long flags;
int i;
@@ -343,8 +344,8 @@ static ssize_t ahci_store_em_buffer(struct device *dev,
}
for (i = 0; i < size; i += 4) {
- msg = buf[i] | buf[i + 1] << 8 |
- buf[i + 2] << 16 | buf[i + 3] << 24;
+ msg = msg_buf[i] | msg_buf[i + 1] << 8 |
+ msg_buf[i + 2] << 16 | msg_buf[i + 3] << 24;
writel(msg, em_mmio + i);
}
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 4eb4679..3bedcc1 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -1261,6 +1261,7 @@
#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP77_IDE 0x0759
#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP73_SMBUS 0x07D8
#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP79_SMBUS 0x0AA2
+#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP89_SATA 0x0D85
#define PCI_VENDOR_ID_IMS 0x10e0
#define PCI_DEVICE_ID_IMS_TT128 0x9128
^ permalink raw reply related [flat|nested] 263+ messages in thread
* [git patches] libata fixes
@ 2010-06-10 20:09 Jeff Garzik
0 siblings, 0 replies; 263+ messages in thread
From: Jeff Garzik @ 2010-06-10 20:09 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide, LKML
Two sata_sil24 fixes...
1) Add some memory barriers. Gets ARM working.
2) Fix a longstanding but ultimately harmless over-memset.
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/sata_sil24.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
Catalin Marinas (1):
sata_sil24: Use memory barriers before issuing commands
Dan Carpenter (1):
sata_sil24: memset() overflow
diff --git a/drivers/ata/sata_sil24.c b/drivers/ata/sata_sil24.c
index 70b58fe..be7726d 100644
--- a/drivers/ata/sata_sil24.c
+++ b/drivers/ata/sata_sil24.c
@@ -622,6 +622,11 @@ static int sil24_exec_polled_cmd(struct ata_port *ap, int pmp,
irq_enabled = readl(port + PORT_IRQ_ENABLE_SET);
writel(PORT_IRQ_COMPLETE | PORT_IRQ_ERROR, port + PORT_IRQ_ENABLE_CLR);
+ /*
+ * The barrier is required to ensure that writes to cmd_block reach
+ * the memory before the write to PORT_CMD_ACTIVATE.
+ */
+ wmb();
writel((u32)paddr, port + PORT_CMD_ACTIVATE);
writel((u64)paddr >> 32, port + PORT_CMD_ACTIVATE + 4);
@@ -865,7 +870,7 @@ static void sil24_qc_prep(struct ata_queued_cmd *qc)
} else {
prb = &cb->atapi.prb;
sge = cb->atapi.sge;
- memset(cb->atapi.cdb, 0, 32);
+ memset(cb->atapi.cdb, 0, sizeof(cb->atapi.cdb));
memcpy(cb->atapi.cdb, qc->cdb, qc->dev->cdb_len);
if (ata_is_data(qc->tf.protocol)) {
@@ -895,6 +900,11 @@ static unsigned int sil24_qc_issue(struct ata_queued_cmd *qc)
paddr = pp->cmd_block_dma + tag * sizeof(*pp->cmd_block);
activate = port + PORT_CMD_ACTIVATE + tag * 8;
+ /*
+ * The barrier is required to ensure that writes to cmd_block reach
+ * the memory before the write to PORT_CMD_ACTIVATE.
+ */
+ wmb();
writel((u32)paddr, activate);
writel((u64)paddr >> 32, activate + 4);
^ permalink raw reply related [flat|nested] 263+ messages in thread
* [git patches] libata fixes
@ 2010-06-07 20:07 Jeff Garzik
0 siblings, 0 replies; 263+ messages in thread
From: Jeff Garzik @ 2010-06-07 20:07 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide, LKML
Nothing major... Note we added an ID to an existing, ATA-related PCI
quirk.
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/libahci.c | 21 +++------------------
drivers/ata/sata_sil24.c | 12 ++++++------
drivers/ata/sata_via.c | 18 ++++++++++++++++--
drivers/pci/quirks.c | 5 ++++-
include/linux/pci_ids.h | 1 +
5 files changed, 30 insertions(+), 27 deletions(-)
Colin Tuckley (1):
sata_sil24: fix kernel panic on ARM caused by unaligned access in sata_sil24
Tejun Heo (3):
sata_via: explain the magic fix
ahci: add pci quirk for JMB362
ahci: redo stopping DMA engines on empty ports
diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
index 1984a6e..261f86d 100644
--- a/drivers/ata/libahci.c
+++ b/drivers/ata/libahci.c
@@ -541,29 +541,11 @@ static int ahci_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val)
return -EINVAL;
}
-static int ahci_is_device_present(void __iomem *port_mmio)
-{
- u8 status = readl(port_mmio + PORT_TFDATA) & 0xff;
-
- /* Make sure PxTFD.STS.BSY and PxTFD.STS.DRQ are 0 */
- if (status & (ATA_BUSY | ATA_DRQ))
- return 0;
-
- /* Make sure PxSSTS.DET is 3h */
- status = readl(port_mmio + PORT_SCR_STAT) & 0xf;
- if (status != 3)
- return 0;
- return 1;
-}
-
void ahci_start_engine(struct ata_port *ap)
{
void __iomem *port_mmio = ahci_port_base(ap);
u32 tmp;
- if (!ahci_is_device_present(port_mmio))
- return;
-
/* start DMA */
tmp = readl(port_mmio + PORT_CMD);
tmp |= PORT_CMD_START;
@@ -1892,6 +1874,9 @@ static void ahci_error_handler(struct ata_port *ap)
}
sata_pmp_error_handler(ap);
+
+ if (!ata_dev_enabled(ap->link.device))
+ ahci_stop_engine(ap);
}
static void ahci_post_internal_cmd(struct ata_queued_cmd *qc)
diff --git a/drivers/ata/sata_sil24.c b/drivers/ata/sata_sil24.c
index e925051..70b58fe 100644
--- a/drivers/ata/sata_sil24.c
+++ b/drivers/ata/sata_sil24.c
@@ -539,12 +539,12 @@ static void sil24_config_port(struct ata_port *ap)
writel(PORT_CS_IRQ_WOC, port + PORT_CTRL_CLR);
/* zero error counters. */
- writel(0x8000, port + PORT_DECODE_ERR_THRESH);
- writel(0x8000, port + PORT_CRC_ERR_THRESH);
- writel(0x8000, port + PORT_HSHK_ERR_THRESH);
- writel(0x0000, port + PORT_DECODE_ERR_CNT);
- writel(0x0000, port + PORT_CRC_ERR_CNT);
- writel(0x0000, port + PORT_HSHK_ERR_CNT);
+ writew(0x8000, port + PORT_DECODE_ERR_THRESH);
+ writew(0x8000, port + PORT_CRC_ERR_THRESH);
+ writew(0x8000, port + PORT_HSHK_ERR_THRESH);
+ writew(0x0000, port + PORT_DECODE_ERR_CNT);
+ writew(0x0000, port + PORT_CRC_ERR_CNT);
+ writew(0x0000, port + PORT_HSHK_ERR_CNT);
/* always use 64bit activation */
writel(PORT_CS_32BIT_ACTV, port + PORT_CTRL_CLR);
diff --git a/drivers/ata/sata_via.c b/drivers/ata/sata_via.c
index 0ecd0f6..4730c42 100644
--- a/drivers/ata/sata_via.c
+++ b/drivers/ata/sata_via.c
@@ -578,10 +578,24 @@ static void svia_configure(struct pci_dev *pdev)
/*
* vt6421 has problems talking to some drives. The following
- * is the magic fix from Joseph Chan <JosephChan@via.com.tw>.
- * Please add proper documentation if possible.
+ * is the fix from Joseph Chan <JosephChan@via.com.tw>.
+ *
+ * When host issues HOLD, device may send up to 20DW of data
+ * before acknowledging it with HOLDA and the host should be
+ * able to buffer them in FIFO. Unfortunately, some WD drives
+ * send upto 40DW before acknowledging HOLD and, in the
+ * default configuration, this ends up overflowing vt6421's
+ * FIFO, making the controller abort the transaction with
+ * R_ERR.
+ *
+ * Rx52[2] is the internal 128DW FIFO Flow control watermark
+ * adjusting mechanism enable bit and the default value 0
+ * means host will issue HOLD to device when the left FIFO
+ * size goes below 32DW. Setting it to 1 makes the watermark
+ * 64DW.
*
* https://bugzilla.kernel.org/show_bug.cgi?id=15173
+ * http://article.gmane.org/gmane.linux.ide/46352
*/
if (pdev->device == 0x3249) {
pci_read_config_byte(pdev, 0x52, &tmp8);
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index b7512cf..477345d 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -1457,7 +1457,8 @@ static void quirk_jmicron_ata(struct pci_dev *pdev)
conf5 &= ~(1 << 24); /* Clear bit 24 */
switch (pdev->device) {
- case PCI_DEVICE_ID_JMICRON_JMB360:
+ case PCI_DEVICE_ID_JMICRON_JMB360: /* SATA single port */
+ case PCI_DEVICE_ID_JMICRON_JMB362: /* SATA dual ports */
/* The controller should be in single function ahci mode */
conf1 |= 0x0002A100; /* Set 8, 13, 15, 17 */
break;
@@ -1493,12 +1494,14 @@ static void quirk_jmicron_ata(struct pci_dev *pdev)
}
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB360, quirk_jmicron_ata);
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB361, quirk_jmicron_ata);
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB362, quirk_jmicron_ata);
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB363, quirk_jmicron_ata);
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB365, quirk_jmicron_ata);
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB366, quirk_jmicron_ata);
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB368, quirk_jmicron_ata);
DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB360, quirk_jmicron_ata);
DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB361, quirk_jmicron_ata);
+DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB362, quirk_jmicron_ata);
DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB363, quirk_jmicron_ata);
DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB365, quirk_jmicron_ata);
DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB366, quirk_jmicron_ata);
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index f149dd1..4eb4679 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -2321,6 +2321,7 @@
#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_JMB362 0x2362
#define PCI_DEVICE_ID_JMICRON_JMB363 0x2363
#define PCI_DEVICE_ID_JMICRON_JMB365 0x2365
#define PCI_DEVICE_ID_JMICRON_JMB366 0x2366
^ permalink raw reply related [flat|nested] 263+ messages in thread
* [git patches] libata fixes
@ 2010-05-05 18:54 Jeff Garzik
0 siblings, 0 replies; 263+ messages in thread
From: Jeff Garzik @ 2010-05-05 18:54 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide, LKML
A correction for an added-during-rc PCMCIA ID patch,
and a small doc 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:
Documentation/DocBook/libata.tmpl | 49 ++++++++++++-------------------------
drivers/ata/pata_pcmcia.c | 4 +-
drivers/ide/ide-cs.c | 4 +-
3 files changed, 20 insertions(+), 37 deletions(-)
Kristoffer Ericson (1):
pata_pcmcia / ide-cs: Fix bad hashes for Transcend and kingston IDs
Sergei Shtylyov (1):
libata: Fix several inaccuracies in developer's guide
diff --git a/Documentation/DocBook/libata.tmpl b/Documentation/DocBook/libata.tmpl
index ba99757..ff3e5be 100644
--- a/Documentation/DocBook/libata.tmpl
+++ b/Documentation/DocBook/libata.tmpl
@@ -107,10 +107,6 @@ void (*dev_config) (struct ata_port *, struct ata_device *);
issue of SET FEATURES - XFER MODE, and prior to operation.
</para>
<para>
- Called by ata_device_add() after ata_dev_identify() determines
- a device is present.
- </para>
- <para>
This entry may be specified as NULL in ata_port_operations.
</para>
@@ -154,8 +150,8 @@ unsigned int (*mode_filter) (struct ata_port *, struct ata_device *, unsigned in
<sect2><title>Taskfile read/write</title>
<programlisting>
-void (*tf_load) (struct ata_port *ap, struct ata_taskfile *tf);
-void (*tf_read) (struct ata_port *ap, struct ata_taskfile *tf);
+void (*sff_tf_load) (struct ata_port *ap, struct ata_taskfile *tf);
+void (*sff_tf_read) (struct ata_port *ap, struct ata_taskfile *tf);
</programlisting>
<para>
@@ -164,36 +160,35 @@ void (*tf_read) (struct ata_port *ap, struct ata_taskfile *tf);
hardware registers / DMA buffers, to obtain the current set of
taskfile register values.
Most drivers for taskfile-based hardware (PIO or MMIO) use
- ata_tf_load() and ata_tf_read() for these hooks.
+ ata_sff_tf_load() and ata_sff_tf_read() for these hooks.
</para>
</sect2>
<sect2><title>PIO data read/write</title>
<programlisting>
-void (*data_xfer) (struct ata_device *, unsigned char *, unsigned int, int);
+void (*sff_data_xfer) (struct ata_device *, unsigned char *, unsigned int, int);
</programlisting>
<para>
All bmdma-style drivers must implement this hook. This is the low-level
operation that actually copies the data bytes during a PIO data
transfer.
-Typically the driver
-will choose one of ata_pio_data_xfer_noirq(), ata_pio_data_xfer(), or
-ata_mmio_data_xfer().
+Typically the driver will choose one of ata_sff_data_xfer_noirq(),
+ata_sff_data_xfer(), or ata_sff_data_xfer32().
</para>
</sect2>
<sect2><title>ATA command execute</title>
<programlisting>
-void (*exec_command)(struct ata_port *ap, struct ata_taskfile *tf);
+void (*sff_exec_command)(struct ata_port *ap, struct ata_taskfile *tf);
</programlisting>
<para>
causes an ATA command, previously loaded with
->tf_load(), to be initiated in hardware.
- Most drivers for taskfile-based hardware use ata_exec_command()
+ Most drivers for taskfile-based hardware use ata_sff_exec_command()
for this hook.
</para>
@@ -218,8 +213,8 @@ command.
<sect2><title>Read specific ATA shadow registers</title>
<programlisting>
-u8 (*check_status)(struct ata_port *ap);
-u8 (*check_altstatus)(struct ata_port *ap);
+u8 (*sff_check_status)(struct ata_port *ap);
+u8 (*sff_check_altstatus)(struct ata_port *ap);
</programlisting>
<para>
@@ -227,20 +222,14 @@ u8 (*check_altstatus)(struct ata_port *ap);
hardware. On some hardware, reading the Status register has
the side effect of clearing the interrupt condition.
Most drivers for taskfile-based hardware use
- ata_check_status() for this hook.
- </para>
- <para>
- Note that because this is called from ata_device_add(), at
- least a dummy function that clears device interrupts must be
- provided for all drivers, even if the controller doesn't
- actually have a taskfile status register.
+ ata_sff_check_status() for this hook.
</para>
</sect2>
<sect2><title>Select ATA device on bus</title>
<programlisting>
-void (*dev_select)(struct ata_port *ap, unsigned int device);
+void (*sff_dev_select)(struct ata_port *ap, unsigned int device);
</programlisting>
<para>
@@ -251,9 +240,7 @@ void (*dev_select)(struct ata_port *ap, unsigned int device);
</para>
<para>
Most drivers for taskfile-based hardware use
- ata_std_dev_select() for this hook. Controllers which do not
- support second drives on a port (such as SATA contollers) will
- use ata_noop_dev_select().
+ ata_sff_dev_select() for this hook.
</para>
</sect2>
@@ -441,13 +428,13 @@ void (*irq_clear) (struct ata_port *);
to struct ata_host_set.
</para>
<para>
- Most legacy IDE drivers use ata_interrupt() for the
+ Most legacy IDE drivers use ata_sff_interrupt() for the
irq_handler hook, which scans all ports in the host_set,
determines which queued command was active (if any), and calls
- ata_host_intr(ap,qc).
+ ata_sff_host_intr(ap,qc).
</para>
<para>
- Most legacy IDE drivers use ata_bmdma_irq_clear() for the
+ Most legacy IDE drivers use ata_sff_irq_clear() for the
irq_clear() hook, which simply clears the interrupt and error
flags in the DMA status register.
</para>
@@ -496,10 +483,6 @@ void (*host_stop) (struct ata_host_set *host_set);
data from port at this time.
</para>
<para>
- Many drivers use ata_port_stop() as this hook, which frees the
- PRD table.
- </para>
- <para>
->host_stop() is called after all ->port_stop() calls
have completed. The hook must finalize hardware shutdown, release DMA
and other resources, etc.
diff --git a/drivers/ata/pata_pcmcia.c b/drivers/ata/pata_pcmcia.c
index 4164dd2..d94b8f0 100644
--- a/drivers/ata/pata_pcmcia.c
+++ b/drivers/ata/pata_pcmcia.c
@@ -424,7 +424,7 @@ static struct pcmcia_device_id pcmcia_devices[] = {
PCMCIA_DEVICE_PROD_ID12("Hyperstone", "Model1", 0x3d5b9ef5, 0xca6ab420),
PCMCIA_DEVICE_PROD_ID12("IBM", "microdrive", 0xb569a6e5, 0xa6d76178),
PCMCIA_DEVICE_PROD_ID12("IBM", "IBM17JSSFP20", 0xb569a6e5, 0xf2508753),
- PCMCIA_DEVICE_PROD_ID12("KINGSTON", "CF CARD 1GB", 0x2e6d1829, 0x3e520e17),
+ PCMCIA_DEVICE_PROD_ID12("KINGSTON", "CF CARD 1GB", 0x2e6d1829, 0x55d5bffb),
PCMCIA_DEVICE_PROD_ID12("KINGSTON", "CF CARD 4GB", 0x2e6d1829, 0x531e7d10),
PCMCIA_DEVICE_PROD_ID12("KINGSTON", "CF8GB", 0x2e6d1829, 0xacbe682e),
PCMCIA_DEVICE_PROD_ID12("IO DATA", "CBIDE2 ", 0x547e66dc, 0x8671043b),
@@ -446,7 +446,7 @@ static struct pcmcia_device_id pcmcia_devices[] = {
PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS1GCF80", 0x709b1bf1, 0x2a54d4b1),
PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS2GCF120", 0x709b1bf1, 0x969aa4f2),
PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS4GCF120", 0x709b1bf1, 0xf54a91c8),
- PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS4GCF133", 0x709b1bf1, 0x9351e59d),
+ PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS4GCF133", 0x709b1bf1, 0x7558f133),
PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS8GCF133", 0x709b1bf1, 0xb2f89b47),
PCMCIA_DEVICE_PROD_ID12("WIT", "IDE16", 0x244e5994, 0x3e232852),
PCMCIA_DEVICE_PROD_ID12("WEIDA", "TWTTI", 0xcc7cf69c, 0x212bb918),
diff --git a/drivers/ide/ide-cs.c b/drivers/ide/ide-cs.c
index defce28..b854508 100644
--- a/drivers/ide/ide-cs.c
+++ b/drivers/ide/ide-cs.c
@@ -409,7 +409,7 @@ static struct pcmcia_device_id ide_ids[] = {
PCMCIA_DEVICE_PROD_ID12("Hyperstone", "Model1", 0x3d5b9ef5, 0xca6ab420),
PCMCIA_DEVICE_PROD_ID12("IBM", "microdrive", 0xb569a6e5, 0xa6d76178),
PCMCIA_DEVICE_PROD_ID12("IBM", "IBM17JSSFP20", 0xb569a6e5, 0xf2508753),
- PCMCIA_DEVICE_PROD_ID12("KINGSTON", "CF CARD 1GB", 0x2e6d1829, 0x3e520e17),
+ PCMCIA_DEVICE_PROD_ID12("KINGSTON", "CF CARD 1GB", 0x2e6d1829, 0x55d5bffb),
PCMCIA_DEVICE_PROD_ID12("KINGSTON", "CF CARD 4GB", 0x2e6d1829, 0x531e7d10),
PCMCIA_DEVICE_PROD_ID12("KINGSTON", "CF8GB", 0x2e6d1829, 0xacbe682e),
PCMCIA_DEVICE_PROD_ID12("IO DATA", "CBIDE2 ", 0x547e66dc, 0x8671043b),
@@ -431,7 +431,7 @@ static struct pcmcia_device_id ide_ids[] = {
PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS1GCF80", 0x709b1bf1, 0x2a54d4b1),
PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS2GCF120", 0x709b1bf1, 0x969aa4f2),
PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS4GCF120", 0x709b1bf1, 0xf54a91c8),
- PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS4GCF133", 0x709b1bf1, 0x9351e59d),
+ PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS4GCF133", 0x709b1bf1, 0x7558f133),
PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS8GCF133", 0x709b1bf1, 0xb2f89b47),
PCMCIA_DEVICE_PROD_ID12("WIT", "IDE16", 0x244e5994, 0x3e232852),
PCMCIA_DEVICE_PROD_ID12("WEIDA", "TWTTI", 0xcc7cf69c, 0x212bb918),
^ permalink raw reply related [flat|nested] 263+ messages in thread
* [git patches] libata fixes
@ 2010-04-23 2:17 Jeff Garzik
0 siblings, 0 replies; 263+ messages in thread
From: Jeff Garzik @ 2010-04-23 2:17 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide, LKML
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:
Documentation/kernel-parameters.txt | 2 +-
drivers/ata/libata-eh.c | 5 +++++
drivers/ata/pata_pcmcia.c | 4 ++++
drivers/ide/ide-cs.c | 4 ++++
4 files changed, 14 insertions(+), 1 deletions(-)
Jeff Garzik (1):
libata: ensure NCQ error result taskfile is fully initialized
Kristoffer Ericson (1):
pata_pcmcia/ide-cs: add IDs for transcend and kingston cards
Roman Fietze (1):
libata: fix docs, RE port and device of libata.force ID separated by point
Tejun Heo (1):
libata: fix locking around blk_abort_request()
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index e2202e9..839b21b 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -1194,7 +1194,7 @@ and is between 256 and 4096 characters. It is defined in the file
libata.force= [LIBATA] Force configurations. The format is comma
separated list of "[ID:]VAL" where ID is
- PORT[:DEVICE]. PORT and DEVICE are decimal numbers
+ PORT[.DEVICE]. PORT and DEVICE are decimal numbers
matching port, link or device. Basically, it matches
the ATA ID string printed on console by libata. If
the whole ID part is omitted, the last PORT and DEVICE
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 9f6cfac..228740f 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -879,6 +879,8 @@ static void ata_eh_set_pending(struct ata_port *ap, int fastdrain)
void ata_qc_schedule_eh(struct ata_queued_cmd *qc)
{
struct ata_port *ap = qc->ap;
+ struct request_queue *q = qc->scsicmd->device->request_queue;
+ unsigned long flags;
WARN_ON(!ap->ops->error_handler);
@@ -890,7 +892,9 @@ void ata_qc_schedule_eh(struct ata_queued_cmd *qc)
* Note that ATA_QCFLAG_FAILED is unconditionally set after
* this function completes.
*/
+ spin_lock_irqsave(q->queue_lock, flags);
blk_abort_request(qc->scsicmd->request);
+ spin_unlock_irqrestore(q->queue_lock, flags);
}
/**
@@ -1624,6 +1628,7 @@ void ata_eh_analyze_ncq_error(struct ata_link *link)
}
/* okay, this error is ours */
+ memset(&tf, 0, sizeof(tf));
rc = ata_eh_read_log_10h(dev, &tag, &tf);
if (rc) {
ata_link_printk(link, KERN_ERR, "failed to read log page 10h "
diff --git a/drivers/ata/pata_pcmcia.c b/drivers/ata/pata_pcmcia.c
index 3c3172d..4164dd2 100644
--- a/drivers/ata/pata_pcmcia.c
+++ b/drivers/ata/pata_pcmcia.c
@@ -424,6 +424,8 @@ static struct pcmcia_device_id pcmcia_devices[] = {
PCMCIA_DEVICE_PROD_ID12("Hyperstone", "Model1", 0x3d5b9ef5, 0xca6ab420),
PCMCIA_DEVICE_PROD_ID12("IBM", "microdrive", 0xb569a6e5, 0xa6d76178),
PCMCIA_DEVICE_PROD_ID12("IBM", "IBM17JSSFP20", 0xb569a6e5, 0xf2508753),
+ PCMCIA_DEVICE_PROD_ID12("KINGSTON", "CF CARD 1GB", 0x2e6d1829, 0x3e520e17),
+ PCMCIA_DEVICE_PROD_ID12("KINGSTON", "CF CARD 4GB", 0x2e6d1829, 0x531e7d10),
PCMCIA_DEVICE_PROD_ID12("KINGSTON", "CF8GB", 0x2e6d1829, 0xacbe682e),
PCMCIA_DEVICE_PROD_ID12("IO DATA", "CBIDE2 ", 0x547e66dc, 0x8671043b),
PCMCIA_DEVICE_PROD_ID12("IO DATA", "PCIDE", 0x547e66dc, 0x5c5ab149),
@@ -444,6 +446,8 @@ static struct pcmcia_device_id pcmcia_devices[] = {
PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS1GCF80", 0x709b1bf1, 0x2a54d4b1),
PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS2GCF120", 0x709b1bf1, 0x969aa4f2),
PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS4GCF120", 0x709b1bf1, 0xf54a91c8),
+ PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS4GCF133", 0x709b1bf1, 0x9351e59d),
+ PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS8GCF133", 0x709b1bf1, 0xb2f89b47),
PCMCIA_DEVICE_PROD_ID12("WIT", "IDE16", 0x244e5994, 0x3e232852),
PCMCIA_DEVICE_PROD_ID12("WEIDA", "TWTTI", 0xcc7cf69c, 0x212bb918),
PCMCIA_DEVICE_PROD_ID1("STI Flash", 0xe4a13209),
diff --git a/drivers/ide/ide-cs.c b/drivers/ide/ide-cs.c
index ab87e4f..defce28 100644
--- a/drivers/ide/ide-cs.c
+++ b/drivers/ide/ide-cs.c
@@ -409,6 +409,8 @@ static struct pcmcia_device_id ide_ids[] = {
PCMCIA_DEVICE_PROD_ID12("Hyperstone", "Model1", 0x3d5b9ef5, 0xca6ab420),
PCMCIA_DEVICE_PROD_ID12("IBM", "microdrive", 0xb569a6e5, 0xa6d76178),
PCMCIA_DEVICE_PROD_ID12("IBM", "IBM17JSSFP20", 0xb569a6e5, 0xf2508753),
+ PCMCIA_DEVICE_PROD_ID12("KINGSTON", "CF CARD 1GB", 0x2e6d1829, 0x3e520e17),
+ PCMCIA_DEVICE_PROD_ID12("KINGSTON", "CF CARD 4GB", 0x2e6d1829, 0x531e7d10),
PCMCIA_DEVICE_PROD_ID12("KINGSTON", "CF8GB", 0x2e6d1829, 0xacbe682e),
PCMCIA_DEVICE_PROD_ID12("IO DATA", "CBIDE2 ", 0x547e66dc, 0x8671043b),
PCMCIA_DEVICE_PROD_ID12("IO DATA", "PCIDE", 0x547e66dc, 0x5c5ab149),
@@ -429,6 +431,8 @@ static struct pcmcia_device_id ide_ids[] = {
PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS1GCF80", 0x709b1bf1, 0x2a54d4b1),
PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS2GCF120", 0x709b1bf1, 0x969aa4f2),
PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS4GCF120", 0x709b1bf1, 0xf54a91c8),
+ PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS4GCF133", 0x709b1bf1, 0x9351e59d),
+ PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS8GCF133", 0x709b1bf1, 0xb2f89b47),
PCMCIA_DEVICE_PROD_ID12("WIT", "IDE16", 0x244e5994, 0x3e232852),
PCMCIA_DEVICE_PROD_ID12("WEIDA", "TWTTI", 0xcc7cf69c, 0x212bb918),
PCMCIA_DEVICE_PROD_ID1("STI Flash", 0xe4a13209),
^ permalink raw reply related [flat|nested] 263+ messages in thread
* [git patches] libata fixes
@ 2010-04-06 15:22 Jeff Garzik
0 siblings, 0 replies; 263+ messages in thread
From: Jeff Garzik @ 2010-04-06 15:22 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide, LKML
The Host Protected Area (HPA) fix is rather large, but nothing to be
done about that except fix it, unfortunately. The other two fixes are
one/two-liners.
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/libata-core.c | 77 ++++++++++++++++++++++++++++-----------------
drivers/ata/libata-sff.c | 4 --
include/linux/libata.h | 1 +
3 files changed, 49 insertions(+), 33 deletions(-)
Tejun Heo (3):
libata: don't whine on spurious IRQ
libata: disable NCQ on Crucial C300 SSD
libata: unlock HPA if device shrunk
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 3f6771e..49cffb6 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -1494,6 +1494,7 @@ static int ata_hpa_resize(struct ata_device *dev)
{
struct ata_eh_context *ehc = &dev->link->eh_context;
int print_info = ehc->i.flags & ATA_EHI_PRINTINFO;
+ bool unlock_hpa = ata_ignore_hpa || dev->flags & ATA_DFLAG_UNLOCK_HPA;
u64 sectors = ata_id_n_sectors(dev->id);
u64 native_sectors;
int rc;
@@ -1510,7 +1511,7 @@ static int ata_hpa_resize(struct ata_device *dev)
/* If device aborted the command or HPA isn't going to
* be unlocked, skip HPA resizing.
*/
- if (rc == -EACCES || !ata_ignore_hpa) {
+ if (rc == -EACCES || !unlock_hpa) {
ata_dev_printk(dev, KERN_WARNING, "HPA support seems "
"broken, skipping HPA handling\n");
dev->horkage |= ATA_HORKAGE_BROKEN_HPA;
@@ -1525,7 +1526,7 @@ static int ata_hpa_resize(struct ata_device *dev)
dev->n_native_sectors = native_sectors;
/* nothing to do? */
- if (native_sectors <= sectors || !ata_ignore_hpa) {
+ if (native_sectors <= sectors || !unlock_hpa) {
if (!print_info || native_sectors == sectors)
return 0;
@@ -4186,36 +4187,51 @@ int ata_dev_revalidate(struct ata_device *dev, unsigned int new_class,
goto fail;
/* verify n_sectors hasn't changed */
- if (dev->class == ATA_DEV_ATA && n_sectors &&
- dev->n_sectors != n_sectors) {
- ata_dev_printk(dev, KERN_WARNING, "n_sectors mismatch "
- "%llu != %llu\n",
- (unsigned long long)n_sectors,
- (unsigned long long)dev->n_sectors);
- /*
- * Something could have caused HPA to be unlocked
- * involuntarily. If n_native_sectors hasn't changed
- * and the new size matches it, keep the device.
- */
- if (dev->n_native_sectors == n_native_sectors &&
- dev->n_sectors > n_sectors &&
- dev->n_sectors == n_native_sectors) {
- ata_dev_printk(dev, KERN_WARNING,
- "new n_sectors matches native, probably "
- "late HPA unlock, continuing\n");
- /* keep using the old n_sectors */
- dev->n_sectors = n_sectors;
- } else {
- /* restore original n_[native]_sectors and fail */
- dev->n_native_sectors = n_native_sectors;
- dev->n_sectors = n_sectors;
- rc = -ENODEV;
- goto fail;
- }
+ if (dev->class != ATA_DEV_ATA || !n_sectors ||
+ dev->n_sectors == n_sectors)
+ return 0;
+
+ /* n_sectors has changed */
+ ata_dev_printk(dev, KERN_WARNING, "n_sectors mismatch %llu != %llu\n",
+ (unsigned long long)n_sectors,
+ (unsigned long long)dev->n_sectors);
+
+ /*
+ * Something could have caused HPA to be unlocked
+ * involuntarily. If n_native_sectors hasn't changed and the
+ * new size matches it, keep the device.
+ */
+ if (dev->n_native_sectors == n_native_sectors &&
+ dev->n_sectors > n_sectors && dev->n_sectors == n_native_sectors) {
+ ata_dev_printk(dev, KERN_WARNING,
+ "new n_sectors matches native, probably "
+ "late HPA unlock, continuing\n");
+ /* keep using the old n_sectors */
+ dev->n_sectors = n_sectors;
+ return 0;
}
- return 0;
+ /*
+ * Some BIOSes boot w/o HPA but resume w/ HPA locked. Try
+ * unlocking HPA in those cases.
+ *
+ * https://bugzilla.kernel.org/show_bug.cgi?id=15396
+ */
+ if (dev->n_native_sectors == n_native_sectors &&
+ dev->n_sectors < n_sectors && n_sectors == n_native_sectors &&
+ !(dev->horkage & ATA_HORKAGE_BROKEN_HPA)) {
+ ata_dev_printk(dev, KERN_WARNING,
+ "old n_sectors matches native, probably "
+ "late HPA lock, will try to unlock HPA\n");
+ /* try unlocking HPA */
+ dev->flags |= ATA_DFLAG_UNLOCK_HPA;
+ rc = -EIO;
+ } else
+ rc = -ENODEV;
+ /* restore original n_[native_]sectors and fail */
+ dev->n_native_sectors = n_native_sectors;
+ dev->n_sectors = n_sectors;
fail:
ata_dev_printk(dev, KERN_ERR, "revalidation failed (errno=%d)\n", rc);
return rc;
@@ -4354,6 +4370,9 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
{ "HTS541080G9SA00", "MB4OC60D", ATA_HORKAGE_NONCQ, },
{ "HTS541010G9SA00", "MBZOC60D", ATA_HORKAGE_NONCQ, },
+ /* https://bugzilla.kernel.org/show_bug.cgi?id=15573 */
+ { "C300-CTFDDAC128MAG", "0001", ATA_HORKAGE_NONCQ, },
+
/* devices which puke on READ_NATIVE_MAX */
{ "HDS724040KLSA80", "KFAOA20N", ATA_HORKAGE_BROKEN_HPA, },
{ "WDC WD3200JD-00KLB0", "WD-WCAMR1130137", ATA_HORKAGE_BROKEN_HPA },
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
index 6411e0c..e3877b6 100644
--- a/drivers/ata/libata-sff.c
+++ b/drivers/ata/libata-sff.c
@@ -1816,10 +1816,6 @@ retry:
!ap->ops->sff_irq_check(ap))
continue;
- if (printk_ratelimit())
- ata_port_printk(ap, KERN_INFO,
- "clearing spurious IRQ\n");
-
if (idle & (1 << i)) {
ap->ops->sff_check_status(ap);
ap->ops->sff_irq_clear(ap);
diff --git a/include/linux/libata.h b/include/linux/libata.h
index f8ea71e..b2f2003 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -146,6 +146,7 @@ enum {
ATA_DFLAG_SLEEPING = (1 << 15), /* device is sleeping */
ATA_DFLAG_DUBIOUS_XFER = (1 << 16), /* data transfer not verified */
ATA_DFLAG_NO_UNLOAD = (1 << 17), /* device doesn't support unload */
+ ATA_DFLAG_UNLOCK_HPA = (1 << 18), /* unlock HPA */
ATA_DFLAG_INIT_MASK = (1 << 24) - 1,
ATA_DFLAG_DETACH = (1 << 24),
^ permalink raw reply related [flat|nested] 263+ messages in thread
* Re: [git patches] libata fixes
2010-03-26 20:17 ` Pavel Roskin
@ 2010-03-26 21:59 ` Pavel Roskin
0 siblings, 0 replies; 263+ messages in thread
From: Pavel Roskin @ 2010-03-26 21:59 UTC (permalink / raw)
To: Tejun Heo; +Cc: Jeff Garzik, Andrew Morton, Linus Torvalds, linux-ide, LKML
On Fri, 2010-03-26 at 16:17 -0400, Pavel Roskin wrote:
> It looks like I'm still getting "clearing spurious IRQ".
Sorry, my mistake. I reverted the patch by accident. Please ignore.
--
Regards,
Pavel Roskin
^ permalink raw reply [flat|nested] 263+ messages in thread
* Re: [git patches] libata fixes
2010-03-25 16:21 ` Tejun Heo
@ 2010-03-26 20:17 ` Pavel Roskin
2010-03-26 21:59 ` Pavel Roskin
0 siblings, 1 reply; 263+ messages in thread
From: Pavel Roskin @ 2010-03-26 20:17 UTC (permalink / raw)
To: Tejun Heo; +Cc: Jeff Garzik, Andrew Morton, Linus Torvalds, linux-ide, LKML
On Fri, 2010-03-26 at 01:21 +0900, Tejun Heo wrote:
> On 03/24/2010 03:06 AM, Pavel Roskin wrote:
> > By all means, please push this patch to all stable kernels, or more
> > money will be wasted on hard drives ;-)
>
> Oh, the original patch which caused the problem never saw the light of
> the day before 2.6.34-rc1 so there's no stable kernel to push the
> patch into.
It looks like I'm still getting "clearing spurious IRQ". In most cases,
it's not followed by anything, but in one case, there was a lost
interrupt followed by a link reset.
[ 5030.881191] ata2: clearing spurious IRQ
[ 5060.950036] ata2: lost interrupt (Status 0x50)
[ 5060.950055] ata2.01: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6
frozen
[ 5060.950059] ata2.01: failed command: WRITE DMA
[ 5060.950066] ata2.01: cmd ca/00:08:b7:11:a9/00:00:00:00:00/f0 tag 0
dma 4096 out
[ 5060.950068] res 40/00:00:00:4f:c2/00:00:00:00:00/10 Emask
0x4 (timeout)
[ 5060.950071] ata2.01: status: { DRDY }
[ 5060.950080] ata2: soft resetting link
[ 5061.160268] ata2.01: configured for UDMA/133
[ 5061.160275] ata2.01: device reported invalid CHS sector 0
[ 5061.160283] ata2: EH complete
[80540.010652] ata2: clearing spurious IRQ
That last line is apparently a separate event.
--
Regards,
Pavel Roskin
^ permalink raw reply [flat|nested] 263+ messages in thread
* Re: [git patches] libata fixes
2010-03-23 18:06 ` Pavel Roskin
@ 2010-03-25 16:21 ` Tejun Heo
2010-03-26 20:17 ` Pavel Roskin
0 siblings, 1 reply; 263+ messages in thread
From: Tejun Heo @ 2010-03-25 16:21 UTC (permalink / raw)
To: Pavel Roskin; +Cc: Jeff Garzik, Andrew Morton, Linus Torvalds, linux-ide, LKML
On 03/24/2010 03:06 AM, Pavel Roskin wrote:
> By all means, please push this patch to all stable kernels, or more
> money will be wasted on hard drives ;-)
Oh, the original patch which caused the problem never saw the light of
the day before 2.6.34-rc1 so there's no stable kernel to push the
patch into.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 263+ messages in thread
* Re: [git patches] libata fixes
2010-03-23 13:42 Jeff Garzik
@ 2010-03-23 18:06 ` Pavel Roskin
2010-03-25 16:21 ` Tejun Heo
0 siblings, 1 reply; 263+ messages in thread
From: Pavel Roskin @ 2010-03-23 18:06 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Andrew Morton, Linus Torvalds, linux-ide, LKML
On Tue, 2010-03-23 at 09:42 -0400, Jeff Garzik wrote:
> This push includes a fix for the ata_piix timeouts people have been
> seeing... it has seen several successful test reports, and is ready for
> wider testing in 2.6.34-rc.
Tested-by: Pavel Roskin <proski@gnu.org>
My OCZ Solid was giving me timeouts. I thought it was about to die, so
I bought an Intel X-25M urgently, copied my data, but the timeouts
continued.
After some googling I found that a patch for that was sent this very
morning! After applying the patch, the timeouts have stopped. They
would appear minutes after reboot, but it has been over an hour since I
rebooted and no timeouts.
My motherboard is ECS G31T-M, which is not AHCI capable, so I was using
ata_piix, which explains why I was affected. My kernel is 2.6.34-rc2
(actually, wireless-testing.git).
By all means, please push this patch to all stable kernels, or more
money will be wasted on hard drives ;-)
--
Regards,
Pavel Roskin
^ permalink raw reply [flat|nested] 263+ messages in thread
* [git patches] libata fixes
@ 2010-03-23 13:42 Jeff Garzik
2010-03-23 18:06 ` Pavel Roskin
0 siblings, 1 reply; 263+ messages in thread
From: Jeff Garzik @ 2010-03-23 13:42 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide, LKML
This push includes a fix for the ata_piix timeouts people have been
seeing... it has seen several successful test reports, and is ready for
wider testing in 2.6.34-rc.
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/libata-sff.c | 43 ++++++++++++++++++++++++++++++++++++-------
drivers/ata/pata_via.c | 1 +
2 files changed, 37 insertions(+), 7 deletions(-)
JosephChan@via.com.tw (1):
pata_via: Add VIA VX900 support
Tejun Heo (1):
libata-sff: fix spurious IRQ handling
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
index 561dec2..2774772 100644
--- a/drivers/ata/libata-sff.c
+++ b/drivers/ata/libata-sff.c
@@ -1667,6 +1667,7 @@ unsigned int ata_sff_host_intr(struct ata_port *ap,
{
struct ata_eh_info *ehi = &ap->link.eh_info;
u8 status, host_stat = 0;
+ bool bmdma_stopped = false;
VPRINTK("ata%u: protocol %d task_state %d\n",
ap->print_id, qc->tf.protocol, ap->hsm_task_state);
@@ -1699,6 +1700,7 @@ unsigned int ata_sff_host_intr(struct ata_port *ap,
/* before we do anything else, clear DMA-Start bit */
ap->ops->bmdma_stop(qc);
+ bmdma_stopped = true;
if (unlikely(host_stat & ATA_DMA_ERR)) {
/* error when transfering data to/from memory */
@@ -1716,8 +1718,14 @@ unsigned int ata_sff_host_intr(struct ata_port *ap,
/* check main status, clearing INTRQ if needed */
status = ata_sff_irq_status(ap);
- if (status & ATA_BUSY)
- goto idle_irq;
+ if (status & ATA_BUSY) {
+ if (bmdma_stopped) {
+ /* BMDMA engine is already stopped, we're screwed */
+ qc->err_mask |= AC_ERR_HSM;
+ ap->hsm_task_state = HSM_ST_ERR;
+ } else
+ goto idle_irq;
+ }
/* ack bmdma irq events */
ap->ops->sff_irq_clear(ap);
@@ -1762,13 +1770,16 @@ EXPORT_SYMBOL_GPL(ata_sff_host_intr);
irqreturn_t ata_sff_interrupt(int irq, void *dev_instance)
{
struct ata_host *host = dev_instance;
+ bool retried = false;
unsigned int i;
- unsigned int handled = 0, polling = 0;
+ unsigned int handled, idle, polling;
unsigned long flags;
/* TODO: make _irqsave conditional on x86 PCI IDE legacy mode */
spin_lock_irqsave(&host->lock, flags);
+retry:
+ handled = idle = polling = 0;
for (i = 0; i < host->n_ports; i++) {
struct ata_port *ap = host->ports[i];
struct ata_queued_cmd *qc;
@@ -1782,7 +1793,8 @@ irqreturn_t ata_sff_interrupt(int irq, void *dev_instance)
handled |= ata_sff_host_intr(ap, qc);
else
polling |= 1 << i;
- }
+ } else
+ idle |= 1 << i;
}
/*
@@ -1790,7 +1802,9 @@ irqreturn_t ata_sff_interrupt(int irq, void *dev_instance)
* asserting IRQ line, nobody cared will ensue. Check IRQ
* pending status if available and clear spurious IRQ.
*/
- if (!handled) {
+ if (!handled && !retried) {
+ bool retry = false;
+
for (i = 0; i < host->n_ports; i++) {
struct ata_port *ap = host->ports[i];
@@ -1805,8 +1819,23 @@ irqreturn_t ata_sff_interrupt(int irq, void *dev_instance)
ata_port_printk(ap, KERN_INFO,
"clearing spurious IRQ\n");
- ap->ops->sff_check_status(ap);
- ap->ops->sff_irq_clear(ap);
+ if (idle & (1 << i)) {
+ ap->ops->sff_check_status(ap);
+ ap->ops->sff_irq_clear(ap);
+ } else {
+ /* clear INTRQ and check if BUSY cleared */
+ if (!(ap->ops->sff_check_status(ap) & ATA_BUSY))
+ retry |= true;
+ /*
+ * With command in flight, we can't do
+ * sff_irq_clear() w/o racing with completion.
+ */
+ }
+ }
+
+ if (retry) {
+ retried = true;
+ goto retry;
}
}
diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c
index 3059ec0..95d39c3 100644
--- a/drivers/ata/pata_via.c
+++ b/drivers/ata/pata_via.c
@@ -677,6 +677,7 @@ static const struct pci_device_id via[] = {
{ PCI_VDEVICE(VIA, 0x3164), },
{ PCI_VDEVICE(VIA, 0x5324), },
{ PCI_VDEVICE(VIA, 0xC409), VIA_IDFLAG_SINGLE },
+ { PCI_VDEVICE(VIA, 0x9001), VIA_IDFLAG_SINGLE },
{ },
};
^ permalink raw reply related [flat|nested] 263+ messages in thread
* Re: [git patches] libata fixes
2010-03-17 20:04 Jeff Garzik
@ 2010-03-17 22:22 ` Marc Dionne
0 siblings, 0 replies; 263+ messages in thread
From: Marc Dionne @ 2010-03-17 22:22 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Andrew Morton, Linus Torvalds, linux-ide, LKML
On Wed, Mar 17, 2010 at 4:04 PM, Jeff Garzik <jeff@garzik.org> wrote:
>
> The ATA timeout bug is still being worked, testers welcome. Patch posted
> to linux-ide and LKML was also posted to the tracking bug,
> http://bugzilla.kernel.org/show_bug.cgi?id=15537
Since you're asking for testers, that patch does fix the ATA timeout
issue for me - it was easy to trigger when doing a kernel compile when
in IDE mode.
I do still see a few "clearing spurious IRQ" messages that are new
with 2.6.34, but with no visible effect.
Marc
^ permalink raw reply [flat|nested] 263+ messages in thread
* [git patches] libata fixes
@ 2010-03-17 20:04 Jeff Garzik
2010-03-17 22:22 ` Marc Dionne
0 siblings, 1 reply; 263+ messages in thread
From: Jeff Garzik @ 2010-03-17 20:04 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide, LKML
The ATA timeout bug is still being worked, testers welcome. Patch posted
to linux-ide and LKML was also posted to the tracking bug,
http://bugzilla.kernel.org/show_bug.cgi?id=15537
In the meantime, here are some other minor bug fixes,
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 | 66 +++++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 52 insertions(+), 14 deletions(-)
Shane Huang (1):
ahci: pp->active_link is not reliable when FBS is enabled
Tejun Heo (2):
ahci: add missing nv IDs
ahci: use BIOS date in broken_suspend list
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 6bd930b..fdc9bcb 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -641,6 +641,21 @@ static const struct pci_device_id ahci_pci_tbl[] = {
{ PCI_VDEVICE(NVIDIA, 0x055a), board_ahci_yesncq }, /* MCP67 */
{ PCI_VDEVICE(NVIDIA, 0x055b), board_ahci_yesncq }, /* MCP67 */
{ PCI_VDEVICE(NVIDIA, 0x0580), board_ahci_yesncq }, /* Linux ID */
+ { PCI_VDEVICE(NVIDIA, 0x0581), board_ahci_yesncq }, /* Linux ID */
+ { PCI_VDEVICE(NVIDIA, 0x0582), board_ahci_yesncq }, /* Linux ID */
+ { PCI_VDEVICE(NVIDIA, 0x0583), board_ahci_yesncq }, /* Linux ID */
+ { PCI_VDEVICE(NVIDIA, 0x0584), board_ahci_yesncq }, /* Linux ID */
+ { PCI_VDEVICE(NVIDIA, 0x0585), board_ahci_yesncq }, /* Linux ID */
+ { PCI_VDEVICE(NVIDIA, 0x0586), board_ahci_yesncq }, /* Linux ID */
+ { PCI_VDEVICE(NVIDIA, 0x0587), board_ahci_yesncq }, /* Linux ID */
+ { PCI_VDEVICE(NVIDIA, 0x0588), board_ahci_yesncq }, /* Linux ID */
+ { PCI_VDEVICE(NVIDIA, 0x0589), board_ahci_yesncq }, /* Linux ID */
+ { PCI_VDEVICE(NVIDIA, 0x058a), board_ahci_yesncq }, /* Linux ID */
+ { PCI_VDEVICE(NVIDIA, 0x058b), board_ahci_yesncq }, /* Linux ID */
+ { PCI_VDEVICE(NVIDIA, 0x058c), board_ahci_yesncq }, /* Linux ID */
+ { PCI_VDEVICE(NVIDIA, 0x058d), board_ahci_yesncq }, /* Linux ID */
+ { PCI_VDEVICE(NVIDIA, 0x058e), board_ahci_yesncq }, /* Linux ID */
+ { PCI_VDEVICE(NVIDIA, 0x058f), board_ahci_yesncq }, /* Linux ID */
{ PCI_VDEVICE(NVIDIA, 0x07f0), board_ahci_yesncq }, /* MCP73 */
{ PCI_VDEVICE(NVIDIA, 0x07f1), board_ahci_yesncq }, /* MCP73 */
{ PCI_VDEVICE(NVIDIA, 0x07f2), board_ahci_yesncq }, /* MCP73 */
@@ -2263,7 +2278,7 @@ static void ahci_port_intr(struct ata_port *ap)
struct ahci_port_priv *pp = ap->private_data;
struct ahci_host_priv *hpriv = ap->host->private_data;
int resetting = !!(ap->pflags & ATA_PFLAG_RESETTING);
- u32 status, qc_active;
+ u32 status, qc_active = 0;
int rc;
status = readl(port_mmio + PORT_IRQ_STAT);
@@ -2321,11 +2336,22 @@ static void ahci_port_intr(struct ata_port *ap)
}
}
- /* pp->active_link is valid iff any command is in flight */
- if (ap->qc_active && pp->active_link->sactive)
- qc_active = readl(port_mmio + PORT_SCR_ACT);
- else
- qc_active = readl(port_mmio + PORT_CMD_ISSUE);
+ /* pp->active_link is not reliable once FBS is enabled, both
+ * PORT_SCR_ACT and PORT_CMD_ISSUE should be checked because
+ * NCQ and non-NCQ commands may be in flight at the same time.
+ */
+ if (pp->fbs_enabled) {
+ if (ap->qc_active) {
+ qc_active = readl(port_mmio + PORT_SCR_ACT);
+ qc_active |= readl(port_mmio + PORT_CMD_ISSUE);
+ }
+ } else {
+ /* pp->active_link is valid iff any command is in flight */
+ if (ap->qc_active && pp->active_link->sactive)
+ qc_active = readl(port_mmio + PORT_SCR_ACT);
+ else
+ qc_active = readl(port_mmio + PORT_CMD_ISSUE);
+ }
rc = ata_qc_complete_multiple(ap, qc_active);
@@ -3022,6 +3048,14 @@ static bool ahci_broken_suspend(struct pci_dev *pdev)
* On HP dv[4-6] and HDX18 with earlier BIOSen, link
* to the harddisk doesn't become online after
* resuming from STR. Warn and fail suspend.
+ *
+ * http://bugzilla.kernel.org/show_bug.cgi?id=12276
+ *
+ * Use dates instead of versions to match as HP is
+ * apparently recycling both product and version
+ * strings.
+ *
+ * http://bugzilla.kernel.org/show_bug.cgi?id=15462
*/
{
.ident = "dv4",
@@ -3030,7 +3064,7 @@ static bool ahci_broken_suspend(struct pci_dev *pdev)
DMI_MATCH(DMI_PRODUCT_NAME,
"HP Pavilion dv4 Notebook PC"),
},
- .driver_data = "F.30", /* cutoff BIOS version */
+ .driver_data = "20090105", /* F.30 */
},
{
.ident = "dv5",
@@ -3039,7 +3073,7 @@ static bool ahci_broken_suspend(struct pci_dev *pdev)
DMI_MATCH(DMI_PRODUCT_NAME,
"HP Pavilion dv5 Notebook PC"),
},
- .driver_data = "F.16", /* cutoff BIOS version */
+ .driver_data = "20090506", /* F.16 */
},
{
.ident = "dv6",
@@ -3048,7 +3082,7 @@ static bool ahci_broken_suspend(struct pci_dev *pdev)
DMI_MATCH(DMI_PRODUCT_NAME,
"HP Pavilion dv6 Notebook PC"),
},
- .driver_data = "F.21", /* cutoff BIOS version */
+ .driver_data = "20090423", /* F.21 */
},
{
.ident = "HDX18",
@@ -3057,7 +3091,7 @@ static bool ahci_broken_suspend(struct pci_dev *pdev)
DMI_MATCH(DMI_PRODUCT_NAME,
"HP HDX18 Notebook PC"),
},
- .driver_data = "F.23", /* cutoff BIOS version */
+ .driver_data = "20090430", /* F.23 */
},
/*
* Acer eMachines G725 has the same problem. BIOS
@@ -3065,6 +3099,8 @@ static bool ahci_broken_suspend(struct pci_dev *pdev)
* work. Inbetween, there are V1.06, V2.06 and V3.03
* that we don't have much idea about. For now,
* blacklist anything older than V3.04.
+ *
+ * http://bugzilla.kernel.org/show_bug.cgi?id=15104
*/
{
.ident = "G725",
@@ -3072,19 +3108,21 @@ static bool ahci_broken_suspend(struct pci_dev *pdev)
DMI_MATCH(DMI_SYS_VENDOR, "eMachines"),
DMI_MATCH(DMI_PRODUCT_NAME, "eMachines G725"),
},
- .driver_data = "V3.04", /* cutoff BIOS version */
+ .driver_data = "20091216", /* V3.04 */
},
{ } /* terminate list */
};
const struct dmi_system_id *dmi = dmi_first_match(sysids);
- const char *ver;
+ int year, month, date;
+ char buf[9];
if (!dmi || pdev->bus->number || pdev->devfn != PCI_DEVFN(0x1f, 2))
return false;
- ver = dmi_get_system_info(DMI_BIOS_VERSION);
+ dmi_get_date(DMI_BIOS_DATE, &year, &month, &date);
+ snprintf(buf, sizeof(buf), "%04d%02d%02d", year, month, date);
- return !ver || strcmp(ver, dmi->driver_data) < 0;
+ return strcmp(buf, dmi->driver_data) < 0;
}
static bool ahci_broken_online(struct pci_dev *pdev)
^ permalink raw reply related [flat|nested] 263+ messages in thread
* [git patches] libata fixes
@ 2010-02-05 1:29 Jeff Garzik
0 siblings, 0 replies; 263+ messages in thread
From: Jeff Garzik @ 2010-02-05 1:29 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide, LKML
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 | 15 +++++++++++++++
drivers/ata/libata-scsi.c | 2 +-
drivers/ata/libata-sff.c | 3 +++
include/linux/ata.h | 4 ++--
4 files changed, 21 insertions(+), 3 deletions(-)
Catalin Marinas (1):
[libata] Call flush_dcache_page after PIO data transfers in libata-sff.c
Christoph Hellwig (1):
libata: fix ata_id_logical_per_physical_sectors
Douglas Gilbert (1):
libata-scsi passthru: fix bug which truncated LBA48 return values
Tejun Heo (1):
ahci: add Acer G725 to broken suspend list
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index b8bea10..b343903 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -2868,6 +2868,21 @@ static bool ahci_broken_suspend(struct pci_dev *pdev)
},
.driver_data = "F.23", /* cutoff BIOS version */
},
+ /*
+ * Acer eMachines G725 has the same problem. BIOS
+ * V1.03 is known to be broken. V3.04 is known to
+ * work. Inbetween, there are V1.06, V2.06 and V3.03
+ * that we don't have much idea about. For now,
+ * blacklist anything older than V3.04.
+ */
+ {
+ .ident = "G725",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "eMachines"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "eMachines G725"),
+ },
+ .driver_data = "V3.04", /* cutoff BIOS version */
+ },
{ } /* terminate list */
};
const struct dmi_system_id *dmi = dmi_first_match(sysids);
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index f4ea5a8..d096fbc 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -2875,7 +2875,7 @@ static unsigned int ata_scsi_pass_thru(struct ata_queued_cmd *qc)
* write indication (used for PIO/DMA setup), result TF is
* copied back and we don't whine too much about its failure.
*/
- tf->flags = ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE;
+ tf->flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE;
if (scmd->sc_data_direction == DMA_TO_DEVICE)
tf->flags |= ATA_TFLAG_WRITE;
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
index 741065c..730ef3c 100644
--- a/drivers/ata/libata-sff.c
+++ b/drivers/ata/libata-sff.c
@@ -893,6 +893,9 @@ static void ata_pio_sector(struct ata_queued_cmd *qc)
do_write);
}
+ if (!do_write)
+ flush_dcache_page(page);
+
qc->curbytes += qc->sect_size;
qc->cursg_ofs += qc->sect_size;
diff --git a/include/linux/ata.h b/include/linux/ata.h
index 38a6948..20f3156 100644
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -647,9 +647,9 @@ static inline int ata_id_has_large_logical_sectors(const u16 *id)
return id[ATA_ID_SECTOR_SIZE] & (1 << 13);
}
-static inline u8 ata_id_logical_per_physical_sectors(const u16 *id)
+static inline u16 ata_id_logical_per_physical_sectors(const u16 *id)
{
- return id[ATA_ID_SECTOR_SIZE] & 0xf;
+ return 1 << (id[ATA_ID_SECTOR_SIZE] & 0xf);
}
static inline int ata_id_has_lba48(const u16 *id)
^ permalink raw reply related [flat|nested] 263+ messages in thread
* [git patches] libata fixes
@ 2010-01-12 19:36 Jeff Garzik
0 siblings, 0 replies; 263+ messages in thread
From: Jeff Garzik @ 2010-01-12 19:36 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide, LKML
There is one other fix about to go upstream, for a problem discovered by
Russell King related to PATA.
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/ata_piix.c | 2 +-
drivers/ata/libata-core.c | 38 +++++++++++++++++++++++++++++++-------
drivers/ata/sata_promise.c | 2 +-
include/linux/libata.h | 3 +++
4 files changed, 36 insertions(+), 9 deletions(-)
Mikael Pettersson (1):
sata_promise: don't classify overruns as HSM errors
Tejun Heo (2):
ata_piix: enable 32bit PIO on SATA piix
libata: retry link resume if necessary
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index 19136a7..6f3f225 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -329,7 +329,7 @@ static struct ata_port_operations ich_pata_ops = {
};
static struct ata_port_operations piix_sata_ops = {
- .inherits = &ata_bmdma_port_ops,
+ .inherits = &ata_bmdma32_port_ops,
};
static struct ata_port_operations piix_sidpr_sata_ops = {
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 22ff51b..6728328 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -3790,21 +3790,45 @@ int sata_link_debounce(struct ata_link *link, const unsigned long *params,
int sata_link_resume(struct ata_link *link, const unsigned long *params,
unsigned long deadline)
{
+ int tries = ATA_LINK_RESUME_TRIES;
u32 scontrol, serror;
int rc;
if ((rc = sata_scr_read(link, SCR_CONTROL, &scontrol)))
return rc;
- scontrol = (scontrol & 0x0f0) | 0x300;
+ /*
+ * Writes to SControl sometimes get ignored under certain
+ * controllers (ata_piix SIDPR). Make sure DET actually is
+ * cleared.
+ */
+ do {
+ scontrol = (scontrol & 0x0f0) | 0x300;
+ if ((rc = sata_scr_write(link, SCR_CONTROL, scontrol)))
+ return rc;
+ /*
+ * Some PHYs react badly if SStatus is pounded
+ * immediately after resuming. Delay 200ms before
+ * debouncing.
+ */
+ msleep(200);
- if ((rc = sata_scr_write(link, SCR_CONTROL, scontrol)))
- return rc;
+ /* is SControl restored correctly? */
+ if ((rc = sata_scr_read(link, SCR_CONTROL, &scontrol)))
+ return rc;
+ } while ((scontrol & 0xf0f) != 0x300 && --tries);
- /* Some PHYs react badly if SStatus is pounded immediately
- * after resuming. Delay 200ms before debouncing.
- */
- msleep(200);
+ if ((scontrol & 0xf0f) != 0x300) {
+ ata_link_printk(link, KERN_ERR,
+ "failed to resume link (SControl %X)\n",
+ scontrol);
+ return 0;
+ }
+
+ if (tries < ATA_LINK_RESUME_TRIES)
+ ata_link_printk(link, KERN_WARNING,
+ "link resume succeeded after %d retries\n",
+ ATA_LINK_RESUME_TRIES - tries);
if ((rc = sata_link_debounce(link, params, deadline)))
return rc;
diff --git a/drivers/ata/sata_promise.c b/drivers/ata/sata_promise.c
index 07d8d00..6330628 100644
--- a/drivers/ata/sata_promise.c
+++ b/drivers/ata/sata_promise.c
@@ -862,7 +862,7 @@ static void pdc_error_intr(struct ata_port *ap, struct ata_queued_cmd *qc,
if (port_status & PDC_DRIVE_ERR)
ac_err_mask |= AC_ERR_DEV;
if (port_status & (PDC_OVERRUN_ERR | PDC_UNDERRUN_ERR))
- ac_err_mask |= AC_ERR_HSM;
+ ac_err_mask |= AC_ERR_OTHER;
if (port_status & (PDC2_ATA_HBA_ERR | PDC2_ATA_DMA_CNT_ERR))
ac_err_mask |= AC_ERR_ATA_BUS;
if (port_status & (PDC_PH_ERR | PDC_SH_ERR | PDC_DH_ERR | PDC2_HTO_ERR
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 6a9c4dd..7311225 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -354,6 +354,9 @@ enum {
/* max tries if error condition is still set after ->error_handler */
ATA_EH_MAX_TRIES = 5,
+ /* sometimes resuming a link requires several retries */
+ ATA_LINK_RESUME_TRIES = 5,
+
/* how hard are we gonna try to probe/recover devices */
ATA_PROBE_MAX_TRIES = 3,
ATA_EH_DEV_TRIES = 3,
^ permalink raw reply related [flat|nested] 263+ messages in thread
* [git patches] libata fixes
@ 2009-12-20 20:45 Jeff Garzik
0 siblings, 0 replies; 263+ messages in thread
From: Jeff Garzik @ 2009-12-20 20:45 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide, LKML
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/pata_cmd64x.c | 118 ++++-----------------------------------------
1 files changed, 9 insertions(+), 109 deletions(-)
Bartlomiej Zolnierkiewicz (1):
pata_cmd64x: fix overclocking of UDMA0-2 modes
Jeff Garzik (1):
Revert "pata_cmd64x: implement serialization as per notes"
diff --git a/drivers/ata/pata_cmd64x.c b/drivers/ata/pata_cmd64x.c
index dadfc35..0efb1f5 100644
--- a/drivers/ata/pata_cmd64x.c
+++ b/drivers/ata/pata_cmd64x.c
@@ -31,7 +31,7 @@
#include <linux/libata.h>
#define DRV_NAME "pata_cmd64x"
-#define DRV_VERSION "0.3.1"
+#define DRV_VERSION "0.2.5"
/*
* CMD64x specific registers definition.
@@ -219,7 +219,7 @@ static void cmd64x_set_dmamode(struct ata_port *ap, struct ata_device *adev)
regU |= udma_data[adev->dma_mode - XFER_UDMA_0] << shift;
/* Merge the control bits */
regU |= 1 << adev->devno; /* UDMA on */
- if (adev->dma_mode > 2) /* 15nS timing */
+ if (adev->dma_mode > XFER_UDMA_2) /* 15nS timing */
regU |= 4 << adev->devno;
} else {
regU &= ~ (1 << adev->devno); /* UDMA off */
@@ -254,109 +254,17 @@ static void cmd648_bmdma_stop(struct ata_queued_cmd *qc)
}
/**
- * cmd64x_bmdma_stop - DMA stop callback
+ * cmd646r1_dma_stop - DMA stop callback
* @qc: Command in progress
*
- * Track the completion of live DMA commands and clear the
- * host->private_data DMA tracking flag as we do.
+ * Stub for now while investigating the r1 quirk in the old driver.
*/
-static void cmd64x_bmdma_stop(struct ata_queued_cmd *qc)
+static void cmd646r1_bmdma_stop(struct ata_queued_cmd *qc)
{
- struct ata_port *ap = qc->ap;
ata_bmdma_stop(qc);
- WARN_ON(ap->host->private_data != ap);
- ap->host->private_data = NULL;
-}
-
-/**
- * cmd64x_qc_defer - Defer logic for chip limits
- * @qc: queued command
- *
- * Decide whether we can issue the command. Called under the host lock.
- */
-
-static int cmd64x_qc_defer(struct ata_queued_cmd *qc)
-{
- struct ata_host *host = qc->ap->host;
- struct ata_port *alt = host->ports[1 ^ qc->ap->port_no];
- int rc;
- int dma = 0;
-
- /* Apply the ATA rules first */
- rc = ata_std_qc_defer(qc);
- if (rc)
- return rc;
-
- if (qc->tf.protocol == ATAPI_PROT_DMA ||
- qc->tf.protocol == ATA_PROT_DMA)
- dma = 1;
-
- /* If the other port is not live then issue the command */
- if (alt == NULL || !alt->qc_active) {
- if (dma)
- host->private_data = qc->ap;
- return 0;
- }
- /* If there is a live DMA command then wait */
- if (host->private_data != NULL)
- return ATA_DEFER_PORT;
- if (dma)
- /* Cannot overlap our DMA command */
- return ATA_DEFER_PORT;
- return 0;
}
-/**
- * cmd64x_interrupt - ATA host interrupt handler
- * @irq: irq line (unused)
- * @dev_instance: pointer to our ata_host information structure
- *
- * Our interrupt handler for PCI IDE devices. Calls
- * ata_sff_host_intr() for each port that is flagging an IRQ. We cannot
- * use the defaults as we need to avoid touching status/altstatus during
- * a DMA.
- *
- * LOCKING:
- * Obtains host lock during operation.
- *
- * RETURNS:
- * IRQ_NONE or IRQ_HANDLED.
- */
-irqreturn_t cmd64x_interrupt(int irq, void *dev_instance)
-{
- struct ata_host *host = dev_instance;
- struct pci_dev *pdev = to_pci_dev(host->dev);
- unsigned int i;
- unsigned int handled = 0;
- unsigned long flags;
- static const u8 irq_reg[2] = { CFR, ARTTIM23 };
- static const u8 irq_mask[2] = { 1 << 2, 1 << 4 };
-
- /* TODO: make _irqsave conditional on x86 PCI IDE legacy mode */
- spin_lock_irqsave(&host->lock, flags);
-
- for (i = 0; i < host->n_ports; i++) {
- struct ata_port *ap;
- u8 reg;
-
- pci_read_config_byte(pdev, irq_reg[i], ®);
- ap = host->ports[i];
- if (ap && (reg & irq_mask[i]) &&
- !(ap->flags & ATA_FLAG_DISABLED)) {
- struct ata_queued_cmd *qc;
-
- qc = ata_qc_from_tag(ap, ap->link.active_tag);
- if (qc && (!(qc->tf.flags & ATA_TFLAG_POLLING)) &&
- (qc->flags & ATA_QCFLAG_ACTIVE))
- handled |= ata_sff_host_intr(ap, qc);
- }
- }
-
- spin_unlock_irqrestore(&host->lock, flags);
-
- return IRQ_RETVAL(handled);
-}
static struct scsi_host_template cmd64x_sht = {
ATA_BMDMA_SHT(DRV_NAME),
};
@@ -365,8 +273,6 @@ static const struct ata_port_operations cmd64x_base_ops = {
.inherits = &ata_bmdma_port_ops,
.set_piomode = cmd64x_set_piomode,
.set_dmamode = cmd64x_set_dmamode,
- .bmdma_stop = cmd64x_bmdma_stop,
- .qc_defer = cmd64x_qc_defer,
};
static struct ata_port_operations cmd64x_port_ops = {
@@ -376,6 +282,7 @@ static struct ata_port_operations cmd64x_port_ops = {
static struct ata_port_operations cmd646r1_port_ops = {
.inherits = &cmd64x_base_ops,
+ .bmdma_stop = cmd646r1_bmdma_stop,
.cable_detect = ata_cable_40wire,
};
@@ -383,7 +290,6 @@ static struct ata_port_operations cmd648_port_ops = {
.inherits = &cmd64x_base_ops,
.bmdma_stop = cmd648_bmdma_stop,
.cable_detect = cmd648_cable_detect,
- .qc_defer = ata_std_qc_defer
};
static int cmd64x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
@@ -432,7 +338,6 @@ static int cmd64x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
const struct ata_port_info *ppi[] = { &cmd_info[id->driver_data], NULL };
u8 mrdmode;
int rc;
- struct ata_host *host;
rc = pcim_enable_device(pdev);
if (rc)
@@ -450,25 +355,20 @@ static int cmd64x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
ppi[0] = &cmd_info[3];
}
-
pci_write_config_byte(pdev, PCI_LATENCY_TIMER, 64);
pci_read_config_byte(pdev, MRDMODE, &mrdmode);
mrdmode &= ~ 0x30; /* IRQ set up */
mrdmode |= 0x02; /* Memory read line enable */
pci_write_config_byte(pdev, MRDMODE, mrdmode);
+ /* Force PIO 0 here.. */
+
/* PPC specific fixup copied from old driver */
#ifdef CONFIG_PPC
pci_write_config_byte(pdev, UDIDETCR0, 0xF0);
#endif
- rc = ata_pci_sff_prepare_host(pdev, ppi, &host);
- if (rc)
- return rc;
- /* We use this pointer to track the AP which has DMA running */
- host->private_data = NULL;
- pci_set_master(pdev);
- return ata_pci_sff_activate_host(host, cmd64x_interrupt, &cmd64x_sht);
+ return ata_pci_sff_init_one(pdev, ppi, &cmd64x_sht, NULL);
}
#ifdef CONFIG_PM
^ permalink raw reply related [flat|nested] 263+ messages in thread
* [git patches] libata fixes
@ 2009-10-16 10:26 Jeff Garzik
0 siblings, 0 replies; 263+ messages in thread
From: Jeff Garzik @ 2009-10-16 10:26 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide, LKML, David Miller, Greg KH
Note that this touches old-IDE and pci/quirks in trivial ways; vendor
patch, SB900 does not exist / will not exist as chip name.
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/libata-core.c | 12 +++++++-----
drivers/ata/libata-eh.c | 6 ++++--
drivers/ata/pata_atiixp.c | 2 +-
drivers/ata/pata_sc1200.c | 3 +--
drivers/ata/pata_via.c | 2 +-
drivers/ata/sata_mv.c | 29 +++++++++++++++++++++++++++--
drivers/ata/sata_nv.c | 18 +++++++++++++++---
drivers/ide/atiixp.c | 2 +-
drivers/pci/quirks.c | 6 +++---
include/linux/pci_ids.h | 6 ++----
11 files changed, 64 insertions(+), 25 deletions(-)
Alan Cox (1):
pata_sc1200: Fix crash on boot
Gwendal Grignou (1):
sata_mv: Prevent PIO commands to be defered too long if traffic in progress.
JosephChan@via.com.tw (1):
pata_via: extend the rev_max for VT6330
Shane Huang (1):
ahci / atiixp / pci quirks: rename AMD SB900 into Hudson-2
Tejun Heo (3):
sata_nv: make sure link is brough up online when skipping hardreset
libata: fix PMP initialization
libata: fix internal command failure handling
peer chen (1):
ahci: Add the AHCI controller Linux Device ID for NVIDIA chipsets.
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index b1a2577..a06f5d6 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -575,7 +575,7 @@ static const struct pci_device_id ahci_pci_tbl[] = {
{ PCI_VDEVICE(ATI, 0x4395), board_ahci_sb700 }, /* ATI SB700/800 */
/* AMD */
- { PCI_VDEVICE(AMD, 0x7800), board_ahci }, /* AMD SB900 */
+ { PCI_VDEVICE(AMD, 0x7800), board_ahci }, /* AMD Hudson-2 */
/* AMD is using RAID class only for ahci controllers */
{ PCI_VENDOR_ID_AMD, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
PCI_CLASS_STORAGE_RAID << 8, 0xffffff, board_ahci },
@@ -605,6 +605,7 @@ static const struct pci_device_id ahci_pci_tbl[] = {
{ PCI_VDEVICE(NVIDIA, 0x0559), board_ahci_yesncq }, /* MCP67 */
{ PCI_VDEVICE(NVIDIA, 0x055a), board_ahci_yesncq }, /* MCP67 */
{ PCI_VDEVICE(NVIDIA, 0x055b), board_ahci_yesncq }, /* MCP67 */
+ { PCI_VDEVICE(NVIDIA, 0x0580), board_ahci_yesncq }, /* Linux ID */
{ PCI_VDEVICE(NVIDIA, 0x07f0), board_ahci_yesncq }, /* MCP73 */
{ PCI_VDEVICE(NVIDIA, 0x07f1), board_ahci_yesncq }, /* MCP73 */
{ PCI_VDEVICE(NVIDIA, 0x07f2), board_ahci_yesncq }, /* MCP73 */
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index b525a09..d7f0f1b 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -5028,12 +5028,14 @@ void ata_qc_complete(struct ata_queued_cmd *qc)
qc->flags |= ATA_QCFLAG_FAILED;
if (unlikely(qc->flags & ATA_QCFLAG_FAILED)) {
- if (!ata_tag_internal(qc->tag)) {
- /* always fill result TF for failed qc */
- fill_result_tf(qc);
+ /* always fill result TF for failed qc */
+ fill_result_tf(qc);
+
+ if (!ata_tag_internal(qc->tag))
ata_qc_schedule_eh(qc);
- return;
- }
+ else
+ __ata_qc_complete(qc);
+ return;
}
WARN_ON_ONCE(ap->pflags & ATA_PFLAG_FROZEN);
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 0a97822..bba2ae5 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -2981,12 +2981,14 @@ static int ata_eh_revalidate_and_attach(struct ata_link *link,
* device detection messages backwards.
*/
ata_for_each_dev(dev, link, ALL) {
- if (!(new_mask & (1 << dev->devno)) ||
- dev->class == ATA_DEV_PMP)
+ if (!(new_mask & (1 << dev->devno)))
continue;
dev->class = ehc->classes[dev->devno];
+ if (dev->class == ATA_DEV_PMP)
+ continue;
+
ehc->i.flags |= ATA_EHI_PRINTINFO;
rc = ata_dev_configure(dev);
ehc->i.flags &= ~ATA_EHI_PRINTINFO;
diff --git a/drivers/ata/pata_atiixp.c b/drivers/ata/pata_atiixp.c
index aa4b3f6..ae4454d 100644
--- a/drivers/ata/pata_atiixp.c
+++ b/drivers/ata/pata_atiixp.c
@@ -246,7 +246,7 @@ static const struct pci_device_id atiixp[] = {
{ PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_IXP400_IDE), },
{ PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_IXP600_IDE), },
{ PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_IXP700_IDE), },
- { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_SB900_IDE), },
+ { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_HUDSON2_IDE), },
{ },
};
diff --git a/drivers/ata/pata_sc1200.c b/drivers/ata/pata_sc1200.c
index f49814d..3bbed83 100644
--- a/drivers/ata/pata_sc1200.c
+++ b/drivers/ata/pata_sc1200.c
@@ -235,8 +235,7 @@ static int sc1200_init_one(struct pci_dev *dev, const struct pci_device_id *id)
.udma_mask = ATA_UDMA2,
.port_ops = &sc1200_port_ops
};
- /* Can't enable port 2 yet, see top comments */
- const struct ata_port_info *ppi[] = { &info, };
+ const struct ata_port_info *ppi[] = { &info, NULL };
return ata_pci_sff_init_one(dev, ppi, &sc1200_sht, NULL);
}
diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c
index 45657ca..88984b8 100644
--- a/drivers/ata/pata_via.c
+++ b/drivers/ata/pata_via.c
@@ -111,7 +111,7 @@ static const struct via_isa_bridge {
{ "vt8251", PCI_DEVICE_ID_VIA_8251, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
{ "cx700", PCI_DEVICE_ID_VIA_CX700, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST | VIA_SATA_PATA },
{ "vt6410", PCI_DEVICE_ID_VIA_6410, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST | VIA_NO_ENABLES },
- { "vt6415", PCI_DEVICE_ID_VIA_6415, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST | VIA_NO_ENABLES },
+ { "vt6415", PCI_DEVICE_ID_VIA_6415, 0x00, 0xff, VIA_UDMA_133 | VIA_BAD_AST | VIA_NO_ENABLES },
{ "vt8237a", PCI_DEVICE_ID_VIA_8237A, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
{ "vt8237", PCI_DEVICE_ID_VIA_8237, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
{ "vt8235", PCI_DEVICE_ID_VIA_8235, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index 17f9ff9..6f5093b 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -1382,6 +1382,25 @@ static int mv_qc_defer(struct ata_queued_cmd *qc)
*/
if (pp->pp_flags & MV_PP_FLAG_DELAYED_EH)
return ATA_DEFER_PORT;
+
+ /* PIO commands need exclusive link: no other commands [DMA or PIO]
+ * can run concurrently.
+ * set excl_link when we want to send a PIO command in DMA mode
+ * or a non-NCQ command in NCQ mode.
+ * When we receive a command from that link, and there are no
+ * outstanding commands, mark a flag to clear excl_link and let
+ * the command go through.
+ */
+ if (unlikely(ap->excl_link)) {
+ if (link == ap->excl_link) {
+ if (ap->nr_active_links)
+ return ATA_DEFER_PORT;
+ qc->flags |= ATA_QCFLAG_CLEAR_EXCL;
+ return 0;
+ } else
+ return ATA_DEFER_PORT;
+ }
+
/*
* If the port is completely idle, then allow the new qc.
*/
@@ -1395,8 +1414,14 @@ static int mv_qc_defer(struct ata_queued_cmd *qc)
* doesn't allow it.
*/
if ((pp->pp_flags & MV_PP_FLAG_EDMA_EN) &&
- (pp->pp_flags & MV_PP_FLAG_NCQ_EN) && ata_is_ncq(qc->tf.protocol))
- return 0;
+ (pp->pp_flags & MV_PP_FLAG_NCQ_EN)) {
+ if (ata_is_ncq(qc->tf.protocol))
+ return 0;
+ else {
+ ap->excl_link = link;
+ return ATA_DEFER_PORT;
+ }
+ }
return ATA_DEFER_PORT;
}
diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c
index 86a4058..1eb4e02 100644
--- a/drivers/ata/sata_nv.c
+++ b/drivers/ata/sata_nv.c
@@ -1594,9 +1594,21 @@ static int nv_hardreset(struct ata_link *link, unsigned int *class,
!ata_dev_enabled(link->device))
sata_link_hardreset(link, sata_deb_timing_hotplug, deadline,
NULL, NULL);
- else if (!(ehc->i.flags & ATA_EHI_QUIET))
- ata_link_printk(link, KERN_INFO,
- "nv: skipping hardreset on occupied port\n");
+ else {
+ const unsigned long *timing = sata_ehc_deb_timing(ehc);
+ int rc;
+
+ if (!(ehc->i.flags & ATA_EHI_QUIET))
+ ata_link_printk(link, KERN_INFO, "nv: skipping "
+ "hardreset on occupied port\n");
+
+ /* make sure the link is online */
+ rc = sata_link_resume(link, timing, deadline);
+ /* whine about phy resume failure but proceed */
+ if (rc && rc != -EOPNOTSUPP)
+ ata_link_printk(link, KERN_WARNING, "failed to resume "
+ "link (errno=%d)\n", rc);
+ }
/* device signature acquisition is unreliable */
return -EAGAIN;
diff --git a/drivers/ide/atiixp.c b/drivers/ide/atiixp.c
index 6396c3a..837322b 100644
--- a/drivers/ide/atiixp.c
+++ b/drivers/ide/atiixp.c
@@ -177,7 +177,7 @@ static const struct pci_device_id atiixp_pci_tbl[] = {
{ PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_IXP400_IDE), 0 },
{ PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_IXP600_IDE), 1 },
{ PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_IXP700_IDE), 0 },
- { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_SB900_IDE), 0 },
+ { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_HUDSON2_IDE), 0 },
{ 0, },
};
MODULE_DEVICE_TABLE(pci, atiixp_pci_tbl);
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index a790b17..245d2cd 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -1009,7 +1009,7 @@ DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82454NX,
static void __devinit quirk_amd_ide_mode(struct pci_dev *pdev)
{
- /* set SBX00 SATA in IDE mode to AHCI mode */
+ /* set SBX00/Hudson-2 SATA in IDE mode to AHCI mode */
u8 tmp;
pci_read_config_byte(pdev, PCI_CLASS_DEVICE, &tmp);
@@ -1028,8 +1028,8 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP600_SATA, quirk
DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP600_SATA, quirk_amd_ide_mode);
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP700_SATA, quirk_amd_ide_mode);
DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP700_SATA, quirk_amd_ide_mode);
-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_SB900_SATA_IDE, quirk_amd_ide_mode);
-DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_SB900_SATA_IDE, quirk_amd_ide_mode);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_HUDSON2_SATA_IDE, quirk_amd_ide_mode);
+DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_HUDSON2_SATA_IDE, quirk_amd_ide_mode);
/*
* Serverworks CSB5 IDE does not fully support native mode
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index f490e7a..86257a4 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -379,9 +379,6 @@
#define PCI_DEVICE_ID_ATI_IXP600_IDE 0x438c
#define PCI_DEVICE_ID_ATI_IXP700_SATA 0x4390
#define PCI_DEVICE_ID_ATI_IXP700_IDE 0x439c
-/* AMD SB Chipset */
-#define PCI_DEVICE_ID_AMD_SB900_IDE 0x780c
-#define PCI_DEVICE_ID_AMD_SB900_SATA_IDE 0x7800
#define PCI_VENDOR_ID_VLSI 0x1004
#define PCI_DEVICE_ID_VLSI_82C592 0x0005
@@ -553,9 +550,10 @@
#define PCI_DEVICE_ID_AMD_CS5536_UDC 0x2096
#define PCI_DEVICE_ID_AMD_CS5536_UOC 0x2097
#define PCI_DEVICE_ID_AMD_CS5536_IDE 0x209A
-
#define PCI_DEVICE_ID_AMD_LX_VIDEO 0x2081
#define PCI_DEVICE_ID_AMD_LX_AES 0x2082
+#define PCI_DEVICE_ID_AMD_HUDSON2_IDE 0x780c
+#define PCI_DEVICE_ID_AMD_HUDSON2_SATA_IDE 0x7800
#define PCI_VENDOR_ID_TRIDENT 0x1023
#define PCI_DEVICE_ID_TRIDENT_4DWAVE_DX 0x2000
^ permalink raw reply related [flat|nested] 263+ messages in thread
* [git patches] libata fixes
@ 2009-08-12 10:35 Jeff Garzik
0 siblings, 0 replies; 263+ messages in thread
From: Jeff Garzik @ 2009-08-12 10:35 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide, LKML
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:
Documentation/kernel-parameters.txt | 4 ++
drivers/ata/ahci.c | 79 ++++++++++++++++++++++++++++++++--
drivers/ata/libata-core.c | 3 +
drivers/ata/pata_at91.c | 17 ++------
drivers/ata/pata_atiixp.c | 19 ++++----
drivers/ata/sata_nv.c | 8 ++++
6 files changed, 103 insertions(+), 27 deletions(-)
Bartlomiej Zolnierkiewicz (1):
pata_atiixp: fix second channel support
Michael Prokop (1):
Documentation/kernel-parameters.txt: document libata's ignore_hpa option
Shane Huang (1):
ahci: Soften up the dmesg on SB600 PMP softreset failure recovery
Tejun Heo (3):
pata_at91: fix resource release
libata: OCZ Vertex can't do HPA
ahci: add workaround for on-board 5723s on some gigabyte boards
Tony Vroon (1):
sata_nv: MSI support, disabled by default
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index dd1a6d4..7936b80 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -1115,6 +1115,10 @@ and is between 256 and 4096 characters. It is defined in the file
libata.dma=4 Compact Flash DMA only
Combinations also work, so libata.dma=3 enables DMA
for disks and CDROMs, but not CFs.
+
+ libata.ignore_hpa= [LIBATA] Ignore HPA limit
+ libata.ignore_hpa=0 keep BIOS limits (default)
+ libata.ignore_hpa=1 ignore limits, using full disk
libata.noacpi [LIBATA] Disables use of ACPI in libata suspend/resume
when set.
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 958c1fa..fe3eba5 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -219,6 +219,8 @@ enum {
AHCI_HFLAG_SECT255 = (1 << 8), /* max 255 sectors */
AHCI_HFLAG_YES_NCQ = (1 << 9), /* force NCQ cap on */
AHCI_HFLAG_NO_SUSPEND = (1 << 10), /* don't suspend */
+ AHCI_HFLAG_SRST_TOUT_IS_OFFLINE = (1 << 11), /* treat SRST timeout as
+ link offline */
/* ap->flags bits */
@@ -1663,6 +1665,7 @@ static int ahci_do_softreset(struct ata_link *link, unsigned int *class,
int (*check_ready)(struct ata_link *link))
{
struct ata_port *ap = link->ap;
+ struct ahci_host_priv *hpriv = ap->host->private_data;
const char *reason = NULL;
unsigned long now, msecs;
struct ata_taskfile tf;
@@ -1701,12 +1704,21 @@ static int ahci_do_softreset(struct ata_link *link, unsigned int *class,
/* wait for link to become ready */
rc = ata_wait_after_reset(link, deadline, check_ready);
- /* link occupied, -ENODEV too is an error */
- if (rc) {
+ if (rc == -EBUSY && hpriv->flags & AHCI_HFLAG_SRST_TOUT_IS_OFFLINE) {
+ /*
+ * Workaround for cases where link online status can't
+ * be trusted. Treat device readiness timeout as link
+ * offline.
+ */
+ ata_link_printk(link, KERN_INFO,
+ "device not ready, treating as offline\n");
+ *class = ATA_DEV_NONE;
+ } else if (rc) {
+ /* link occupied, -ENODEV too is an error */
reason = "device not ready";
goto fail;
- }
- *class = ahci_dev_classify(ap);
+ } else
+ *class = ahci_dev_classify(ap);
DPRINTK("EXIT, class=%u\n", *class);
return 0;
@@ -1773,7 +1785,8 @@ static int ahci_sb600_softreset(struct ata_link *link, unsigned int *class,
irq_sts = readl(port_mmio + PORT_IRQ_STAT);
if (irq_sts & PORT_IRQ_BAD_PMP) {
ata_link_printk(link, KERN_WARNING,
- "failed due to HW bug, retry pmp=0\n");
+ "applying SB600 PMP SRST workaround "
+ "and retrying\n");
rc = ahci_do_softreset(link, class, 0, deadline,
ahci_check_ready);
}
@@ -2726,6 +2739,56 @@ static bool ahci_broken_suspend(struct pci_dev *pdev)
return !ver || strcmp(ver, dmi->driver_data) < 0;
}
+static bool ahci_broken_online(struct pci_dev *pdev)
+{
+#define ENCODE_BUSDEVFN(bus, slot, func) \
+ (void *)(unsigned long)(((bus) << 8) | PCI_DEVFN((slot), (func)))
+ static const struct dmi_system_id sysids[] = {
+ /*
+ * There are several gigabyte boards which use
+ * SIMG5723s configured as hardware RAID. Certain
+ * 5723 firmware revisions shipped there keep the link
+ * online but fail to answer properly to SRST or
+ * IDENTIFY when no device is attached downstream
+ * causing libata to retry quite a few times leading
+ * to excessive detection delay.
+ *
+ * As these firmwares respond to the second reset try
+ * with invalid device signature, considering unknown
+ * sig as offline works around the problem acceptably.
+ */
+ {
+ .ident = "EP45-DQ6",
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR,
+ "Gigabyte Technology Co., Ltd."),
+ DMI_MATCH(DMI_BOARD_NAME, "EP45-DQ6"),
+ },
+ .driver_data = ENCODE_BUSDEVFN(0x0a, 0x00, 0),
+ },
+ {
+ .ident = "EP45-DS5",
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR,
+ "Gigabyte Technology Co., Ltd."),
+ DMI_MATCH(DMI_BOARD_NAME, "EP45-DS5"),
+ },
+ .driver_data = ENCODE_BUSDEVFN(0x03, 0x00, 0),
+ },
+ { } /* terminate list */
+ };
+#undef ENCODE_BUSDEVFN
+ const struct dmi_system_id *dmi = dmi_first_match(sysids);
+ unsigned int val;
+
+ if (!dmi)
+ return false;
+
+ val = (unsigned long)dmi->driver_data;
+
+ return pdev->bus->number == (val >> 8) && pdev->devfn == (val & 0xff);
+}
+
static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
{
static int printed_version;
@@ -2841,6 +2904,12 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
"BIOS update required for suspend/resume\n");
}
+ if (ahci_broken_online(pdev)) {
+ hpriv->flags |= AHCI_HFLAG_SRST_TOUT_IS_OFFLINE;
+ dev_info(&pdev->dev,
+ "online status unreliable, applying workaround\n");
+ }
+
/* CAP.NP sometimes indicate the index of the last enabled
* port, at other times, that of the last possible port, so
* determining the maximum port number requires looking at
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 8ac98ff..072ba5e 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -4302,6 +4302,9 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
{ "WDC WD2500JD-00HBB0", "WD-WMAL71490727", ATA_HORKAGE_BROKEN_HPA },
{ "MAXTOR 6L080L4", "A93.0500", ATA_HORKAGE_BROKEN_HPA },
+ /* this one allows HPA unlocking but fails IOs on the area */
+ { "OCZ-VERTEX", "1.30", ATA_HORKAGE_BROKEN_HPA },
+
/* Devices which report 1 sector over size HPA */
{ "ST340823A", NULL, ATA_HORKAGE_HPA_SIZE, },
{ "ST320413A", NULL, ATA_HORKAGE_HPA_SIZE, },
diff --git a/drivers/ata/pata_at91.c b/drivers/ata/pata_at91.c
index 5702aff..41c94b1 100644
--- a/drivers/ata/pata_at91.c
+++ b/drivers/ata/pata_at91.c
@@ -250,7 +250,7 @@ static int __devinit pata_at91_probe(struct platform_device *pdev)
ata_port_desc(ap, "no IRQ, using PIO polling");
}
- info = kzalloc(sizeof(*info), GFP_KERNEL);
+ info = devm_kzalloc(dev, sizeof(*info), GFP_KERNEL);
if (!info) {
dev_err(dev, "failed to allocate memory for private data\n");
@@ -275,7 +275,7 @@ static int __devinit pata_at91_probe(struct platform_device *pdev)
if (!info->ide_addr) {
dev_err(dev, "failed to map IO base\n");
ret = -ENOMEM;
- goto err_ide_ioremap;
+ goto err_put;
}
info->alt_addr = devm_ioremap(dev,
@@ -284,7 +284,7 @@ static int __devinit pata_at91_probe(struct platform_device *pdev)
if (!info->alt_addr) {
dev_err(dev, "failed to map CTL base\n");
ret = -ENOMEM;
- goto err_alt_ioremap;
+ goto err_put;
}
ap->ioaddr.cmd_addr = info->ide_addr;
@@ -303,13 +303,8 @@ static int __devinit pata_at91_probe(struct platform_device *pdev)
irq ? ata_sff_interrupt : NULL,
irq_flags, &pata_at91_sht);
-err_alt_ioremap:
- devm_iounmap(dev, info->ide_addr);
-
-err_ide_ioremap:
+err_put:
clk_put(info->mck);
- kfree(info);
-
return ret;
}
@@ -317,7 +312,6 @@ static int __devexit pata_at91_remove(struct platform_device *pdev)
{
struct ata_host *host = dev_get_drvdata(&pdev->dev);
struct at91_ide_info *info;
- struct device *dev = &pdev->dev;
if (!host)
return 0;
@@ -328,11 +322,8 @@ static int __devexit pata_at91_remove(struct platform_device *pdev)
if (!info)
return 0;
- devm_iounmap(dev, info->ide_addr);
- devm_iounmap(dev, info->alt_addr);
clk_put(info->mck);
- kfree(info);
return 0;
}
diff --git a/drivers/ata/pata_atiixp.c b/drivers/ata/pata_atiixp.c
index bec0b8a..4591556 100644
--- a/drivers/ata/pata_atiixp.c
+++ b/drivers/ata/pata_atiixp.c
@@ -1,6 +1,7 @@
/*
* pata_atiixp.c - ATI PATA for new ATA layer
* (C) 2005 Red Hat Inc
+ * (C) 2009 Bartlomiej Zolnierkiewicz
*
* Based on
*
@@ -61,20 +62,19 @@ static void atiixp_set_pio_timing(struct ata_port *ap, struct ata_device *adev,
struct pci_dev *pdev = to_pci_dev(ap->host->dev);
int dn = 2 * ap->port_no + adev->devno;
-
- /* Check this is correct - the order is odd in both drivers */
int timing_shift = (16 * ap->port_no) + 8 * (adev->devno ^ 1);
- u16 pio_mode_data, pio_timing_data;
+ u32 pio_timing_data;
+ u16 pio_mode_data;
pci_read_config_word(pdev, ATIIXP_IDE_PIO_MODE, &pio_mode_data);
pio_mode_data &= ~(0x7 << (4 * dn));
pio_mode_data |= pio << (4 * dn);
pci_write_config_word(pdev, ATIIXP_IDE_PIO_MODE, pio_mode_data);
- pci_read_config_word(pdev, ATIIXP_IDE_PIO_TIMING, &pio_timing_data);
+ pci_read_config_dword(pdev, ATIIXP_IDE_PIO_TIMING, &pio_timing_data);
pio_timing_data &= ~(0xFF << timing_shift);
pio_timing_data |= (pio_timings[pio] << timing_shift);
- pci_write_config_word(pdev, ATIIXP_IDE_PIO_TIMING, pio_timing_data);
+ pci_write_config_dword(pdev, ATIIXP_IDE_PIO_TIMING, pio_timing_data);
}
/**
@@ -119,16 +119,17 @@ static void atiixp_set_dmamode(struct ata_port *ap, struct ata_device *adev)
udma_mode_data |= dma << (4 * dn);
pci_write_config_word(pdev, ATIIXP_IDE_UDMA_MODE, udma_mode_data);
} else {
- u16 mwdma_timing_data;
- /* Check this is correct - the order is odd in both drivers */
int timing_shift = (16 * ap->port_no) + 8 * (adev->devno ^ 1);
+ u32 mwdma_timing_data;
dma -= XFER_MW_DMA_0;
- pci_read_config_word(pdev, ATIIXP_IDE_MWDMA_TIMING, &mwdma_timing_data);
+ pci_read_config_dword(pdev, ATIIXP_IDE_MWDMA_TIMING,
+ &mwdma_timing_data);
mwdma_timing_data &= ~(0xFF << timing_shift);
mwdma_timing_data |= (mwdma_timings[dma] << timing_shift);
- pci_write_config_word(pdev, ATIIXP_IDE_MWDMA_TIMING, mwdma_timing_data);
+ pci_write_config_dword(pdev, ATIIXP_IDE_MWDMA_TIMING,
+ mwdma_timing_data);
}
/*
* We must now look at the PIO mode situation. We may need to
diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c
index b2d11f3..86a4058 100644
--- a/drivers/ata/sata_nv.c
+++ b/drivers/ata/sata_nv.c
@@ -602,6 +602,7 @@ MODULE_VERSION(DRV_VERSION);
static int adma_enabled;
static int swncq_enabled = 1;
+static int msi_enabled;
static void nv_adma_register_mode(struct ata_port *ap)
{
@@ -2459,6 +2460,11 @@ static int nv_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
} else if (type == SWNCQ)
nv_swncq_host_init(host);
+ if (msi_enabled) {
+ dev_printk(KERN_NOTICE, &pdev->dev, "Using MSI\n");
+ pci_enable_msi(pdev);
+ }
+
pci_set_master(pdev);
return ata_host_activate(host, pdev->irq, ipriv->irq_handler,
IRQF_SHARED, ipriv->sht);
@@ -2558,4 +2564,6 @@ module_param_named(adma, adma_enabled, bool, 0444);
MODULE_PARM_DESC(adma, "Enable use of ADMA (Default: false)");
module_param_named(swncq, swncq_enabled, bool, 0444);
MODULE_PARM_DESC(swncq, "Enable use of SWNCQ (Default: true)");
+module_param_named(msi, msi_enabled, bool, 0444);
+MODULE_PARM_DESC(msi, "Enable use of MSI (Default: false)");
^ permalink raw reply related [flat|nested] 263+ messages in thread
* [git patches] libata fixes
@ 2009-07-29 2:02 Jeff Garzik
0 siblings, 0 replies; 263+ messages in thread
From: Jeff Garzik @ 2009-07-29 2:02 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide, LKML
A bunch of one-liners, except for an embedded driver update (pata_at91)
and Tejun's HPA unlocking fix.
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 | 4 ++
drivers/ata/ata_piix.c | 3 ++
drivers/ata/libata-core.c | 30 ++++++++++++++----
drivers/ata/libata-eh.c | 2 +-
drivers/ata/pata_at91.c | 67 ++++++++++++++++++++++-------------------
drivers/ata/pata_octeon_cf.c | 3 +-
drivers/ata/pata_pcmcia.c | 1 +
drivers/ata/sata_mv.c | 2 +-
drivers/ata/sata_sil.c | 2 +-
include/linux/libata.h | 1 +
10 files changed, 73 insertions(+), 42 deletions(-)
Bartlomiej Zolnierkiewicz (2):
libata: add missing NULL pointer check to ata_eh_reset()
libata: remove superfluous NULL pointer checks
David Milburn (1):
ahci: add device IDs for Ibex Peak ahci controllers
Sergey Matyukevich (1):
libata: Updates and fixes for pata_at91 driver
Steve Conklin (2):
ata_piix: Add new laptop short cable IDs
ata_piix: Add new short cable ID
Tejun Heo (1):
libata: accept late unlocking of HPA
Wolfram Sang (1):
pata_pcmcia: add CNF-CDROM-ID
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 336eb1e..958c1fa 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -515,10 +515,14 @@ static const struct pci_device_id ahci_pci_tbl[] = {
{ PCI_VDEVICE(INTEL, 0x3a05), board_ahci }, /* ICH10 */
{ PCI_VDEVICE(INTEL, 0x3a22), board_ahci }, /* ICH10 */
{ PCI_VDEVICE(INTEL, 0x3a25), board_ahci }, /* ICH10 */
+ { PCI_VDEVICE(INTEL, 0x3b22), board_ahci }, /* PCH AHCI */
+ { PCI_VDEVICE(INTEL, 0x3b23), board_ahci }, /* PCH AHCI */
{ PCI_VDEVICE(INTEL, 0x3b24), board_ahci }, /* PCH RAID */
{ PCI_VDEVICE(INTEL, 0x3b25), board_ahci }, /* PCH RAID */
+ { PCI_VDEVICE(INTEL, 0x3b29), board_ahci }, /* PCH AHCI */
{ PCI_VDEVICE(INTEL, 0x3b2b), board_ahci }, /* PCH RAID */
{ PCI_VDEVICE(INTEL, 0x3b2c), board_ahci }, /* PCH RAID */
+ { PCI_VDEVICE(INTEL, 0x3b2f), board_ahci }, /* PCH AHCI */
/* 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,
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index d0a14cf..56b8a3f 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -596,9 +596,12 @@ static const struct ich_laptop ich_laptop[] = {
{ 0x27DF, 0x0005, 0x0280 }, /* ICH7 on Acer 5602WLMi */
{ 0x27DF, 0x1025, 0x0102 }, /* ICH7 on Acer 5602aWLMi */
{ 0x27DF, 0x1025, 0x0110 }, /* ICH7 on Acer 3682WLMi */
+ { 0x27DF, 0x1028, 0x02b0 }, /* ICH7 on unknown Dell */
{ 0x27DF, 0x1043, 0x1267 }, /* ICH7 on Asus W5F */
{ 0x27DF, 0x103C, 0x30A1 }, /* ICH7 on HP Compaq nc2400 */
+ { 0x27DF, 0x103C, 0x361a }, /* ICH7 on unkown HP */
{ 0x27DF, 0x1071, 0xD221 }, /* ICH7 on Hercules EC-900 */
+ { 0x27DF, 0x152D, 0x0778 }, /* ICH7 on unknown Intel */
{ 0x24CA, 0x1025, 0x0061 }, /* ICH4 on ACER Aspire 2023WLMi */
{ 0x24CA, 0x1025, 0x003d }, /* ICH4 on ACER TM290 */
{ 0x266F, 0x1025, 0x0066 }, /* ICH6 on ACER Aspire 1694WLMi */
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 2c6aeda..8ac98ff 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -1515,6 +1515,7 @@ static int ata_hpa_resize(struct ata_device *dev)
return rc;
}
+ dev->n_native_sectors = native_sectors;
/* nothing to do? */
if (native_sectors <= sectors || !ata_ignore_hpa) {
@@ -4099,6 +4100,7 @@ int ata_dev_revalidate(struct ata_device *dev, unsigned int new_class,
unsigned int readid_flags)
{
u64 n_sectors = dev->n_sectors;
+ u64 n_native_sectors = dev->n_native_sectors;
int rc;
if (!ata_dev_enabled(dev))
@@ -4128,16 +4130,30 @@ int ata_dev_revalidate(struct ata_device *dev, unsigned int new_class,
/* verify n_sectors hasn't changed */
if (dev->class == ATA_DEV_ATA && n_sectors &&
dev->n_sectors != n_sectors) {
- ata_dev_printk(dev, KERN_INFO, "n_sectors mismatch "
+ ata_dev_printk(dev, KERN_WARNING, "n_sectors mismatch "
"%llu != %llu\n",
(unsigned long long)n_sectors,
(unsigned long long)dev->n_sectors);
-
- /* restore original n_sectors */
- dev->n_sectors = n_sectors;
-
- rc = -ENODEV;
- goto fail;
+ /*
+ * Something could have caused HPA to be unlocked
+ * involuntarily. If n_native_sectors hasn't changed
+ * and the new size matches it, keep the device.
+ */
+ if (dev->n_native_sectors == n_native_sectors &&
+ dev->n_sectors > n_sectors &&
+ dev->n_sectors == n_native_sectors) {
+ ata_dev_printk(dev, KERN_WARNING,
+ "new n_sectors matches native, probably "
+ "late HPA unlock, continuing\n");
+ /* keep using the old n_sectors */
+ dev->n_sectors = n_sectors;
+ } else {
+ /* restore original n_[native]_sectors and fail */
+ dev->n_native_sectors = n_native_sectors;
+ dev->n_sectors = n_sectors;
+ rc = -ENODEV;
+ goto fail;
+ }
}
return 0;
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 1a07c06..79711b6 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -2327,7 +2327,7 @@ int ata_eh_reset(struct ata_link *link, int classify,
struct ata_port *ap = link->ap;
struct ata_link *slave = ap->slave_link;
struct ata_eh_context *ehc = &link->eh_context;
- struct ata_eh_context *sehc = &slave->eh_context;
+ struct ata_eh_context *sehc = slave ? &slave->eh_context : NULL;
unsigned int *classes = ehc->classes;
unsigned int lflags = link->flags;
int verbose = !(ehc->i.flags & ATA_EHI_QUIET);
diff --git a/drivers/ata/pata_at91.c b/drivers/ata/pata_at91.c
index 8561a9f..5702aff 100644
--- a/drivers/ata/pata_at91.c
+++ b/drivers/ata/pata_at91.c
@@ -26,9 +26,7 @@
#include <linux/platform_device.h>
#include <linux/ata_platform.h>
-#include <mach/at91sam9260_matrix.h>
#include <mach/at91sam9_smc.h>
-#include <mach/at91sam9260.h>
#include <mach/board.h>
#include <mach/gpio.h>
@@ -44,65 +42,62 @@ struct at91_ide_info {
unsigned long mode;
unsigned int cs;
+ struct clk *mck;
+
void __iomem *ide_addr;
void __iomem *alt_addr;
};
-const struct ata_timing initial_timing =
+static const struct ata_timing initial_timing =
{XFER_PIO_0, 70, 290, 240, 600, 165, 150, 600, 0};
-static unsigned int calc_mck_cycles(unsigned int ns, unsigned int mck_hz)
+static unsigned long calc_mck_cycles(unsigned long ns, unsigned long mck_hz)
{
unsigned long mul;
- /*
- * cycles = x [nsec] * f [Hz] / 10^9 [ns in sec] =
- * x * (f / 1_000_000_000) =
- * x * ((f * 65536) / 1_000_000_000) / 65536 =
- * x * (((f / 10_000) * 65536) / 100_000) / 65536 =
- */
+ /*
+ * cycles = x [nsec] * f [Hz] / 10^9 [ns in sec] =
+ * x * (f / 1_000_000_000) =
+ * x * ((f * 65536) / 1_000_000_000) / 65536 =
+ * x * (((f / 10_000) * 65536) / 100_000) / 65536 =
+ */
- mul = (mck_hz / 10000) << 16;
- mul /= 100000;
+ mul = (mck_hz / 10000) << 16;
+ mul /= 100000;
- return (ns * mul + 65536) >> 16; /* rounding */
+ return (ns * mul + 65536) >> 16; /* rounding */
}
static void set_smc_mode(struct at91_ide_info *info)
{
- at91_sys_write(AT91_SMC_MODE(info->cs), info->mode);
- return;
+ at91_sys_write(AT91_SMC_MODE(info->cs), info->mode);
+ return;
}
static void set_smc_timing(struct device *dev,
struct at91_ide_info *info, const struct ata_timing *ata)
{
- int read_cycle, write_cycle, active, recover;
- int nrd_setup, nrd_pulse, nrd_recover;
- int nwe_setup, nwe_pulse;
+ unsigned long read_cycle, write_cycle, active, recover;
+ unsigned long nrd_setup, nrd_pulse, nrd_recover;
+ unsigned long nwe_setup, nwe_pulse;
- int ncs_write_setup, ncs_write_pulse;
- int ncs_read_setup, ncs_read_pulse;
+ unsigned long ncs_write_setup, ncs_write_pulse;
+ unsigned long ncs_read_setup, ncs_read_pulse;
- unsigned int mck_hz;
- struct clk *mck;
+ unsigned long mck_hz;
read_cycle = ata->cyc8b;
nrd_setup = ata->setup;
nrd_pulse = ata->act8b;
nrd_recover = ata->rec8b;
- mck = clk_get(NULL, "mck");
- BUG_ON(IS_ERR(mck));
- mck_hz = clk_get_rate(mck);
+ mck_hz = clk_get_rate(info->mck);
read_cycle = calc_mck_cycles(read_cycle, mck_hz);
nrd_setup = calc_mck_cycles(nrd_setup, mck_hz);
nrd_pulse = calc_mck_cycles(nrd_pulse, mck_hz);
nrd_recover = calc_mck_cycles(nrd_recover, mck_hz);
- clk_put(mck);
-
active = nrd_setup + nrd_pulse;
recover = read_cycle - active;
@@ -121,13 +116,13 @@ static void set_smc_timing(struct device *dev,
ncs_write_setup = ncs_read_setup;
ncs_write_pulse = ncs_read_pulse;
- dev_dbg(dev, "ATA timings: nrd_setup = %d nrd_pulse = %d nrd_cycle = %d\n",
+ dev_dbg(dev, "ATA timings: nrd_setup = %lu nrd_pulse = %lu nrd_cycle = %lu\n",
nrd_setup, nrd_pulse, read_cycle);
- dev_dbg(dev, "ATA timings: nwe_setup = %d nwe_pulse = %d nwe_cycle = %d\n",
+ dev_dbg(dev, "ATA timings: nwe_setup = %lu nwe_pulse = %lu nwe_cycle = %lu\n",
nwe_setup, nwe_pulse, write_cycle);
- dev_dbg(dev, "ATA timings: ncs_read_setup = %d ncs_read_pulse = %d\n",
+ dev_dbg(dev, "ATA timings: ncs_read_setup = %lu ncs_read_pulse = %lu\n",
ncs_read_setup, ncs_read_pulse);
- dev_dbg(dev, "ATA timings: ncs_write_setup = %d ncs_write_pulse = %d\n",
+ dev_dbg(dev, "ATA timings: ncs_write_setup = %lu ncs_write_pulse = %lu\n",
ncs_write_setup, ncs_write_pulse);
at91_sys_write(AT91_SMC_SETUP(info->cs),
@@ -217,6 +212,7 @@ static int __devinit pata_at91_probe(struct platform_device *pdev)
struct resource *mem_res;
struct ata_host *host;
struct ata_port *ap;
+
int irq_flags = 0;
int irq = 0;
int ret;
@@ -261,6 +257,13 @@ static int __devinit pata_at91_probe(struct platform_device *pdev)
return -ENOMEM;
}
+ info->mck = clk_get(NULL, "mck");
+
+ if (IS_ERR(info->mck)) {
+ dev_err(dev, "failed to get access to mck clock\n");
+ return -ENODEV;
+ }
+
info->cs = board->chipselect;
info->mode = AT91_SMC_READMODE | AT91_SMC_WRITEMODE |
AT91_SMC_EXNWMODE_READY | AT91_SMC_BAT_SELECT |
@@ -304,6 +307,7 @@ err_alt_ioremap:
devm_iounmap(dev, info->ide_addr);
err_ide_ioremap:
+ clk_put(info->mck);
kfree(info);
return ret;
@@ -326,6 +330,7 @@ static int __devexit pata_at91_remove(struct platform_device *pdev)
devm_iounmap(dev, info->ide_addr);
devm_iounmap(dev, info->alt_addr);
+ clk_put(info->mck);
kfree(info);
return 0;
diff --git a/drivers/ata/pata_octeon_cf.c b/drivers/ata/pata_octeon_cf.c
index 8d9343a..abdd19f 100644
--- a/drivers/ata/pata_octeon_cf.c
+++ b/drivers/ata/pata_octeon_cf.c
@@ -653,7 +653,8 @@ static irqreturn_t octeon_cf_interrupt(int irq, void *dev_instance)
ap = host->ports[i];
ocd = ap->dev->platform_data;
- if (!ap || (ap->flags & ATA_FLAG_DISABLED))
+
+ if (ap->flags & ATA_FLAG_DISABLED)
continue;
ocd = ap->dev->platform_data;
diff --git a/drivers/ata/pata_pcmcia.c b/drivers/ata/pata_pcmcia.c
index f4d009e..dc99e26 100644
--- a/drivers/ata/pata_pcmcia.c
+++ b/drivers/ata/pata_pcmcia.c
@@ -411,6 +411,7 @@ static struct pcmcia_device_id pcmcia_devices[] = {
PCMCIA_DEVICE_PROD_ID123("PCMCIA", "IDE CARD", "F1", 0x281f1c5d, 0x1907960c, 0xf7fde8b9),
PCMCIA_DEVICE_PROD_ID12("ARGOSY", "CD-ROM", 0x78f308dc, 0x66536591),
PCMCIA_DEVICE_PROD_ID12("ARGOSY", "PnPIDE", 0x78f308dc, 0x0c694728),
+ PCMCIA_DEVICE_PROD_ID12("CNF ", "CD-ROM", 0x46d7db81, 0x66536591),
PCMCIA_DEVICE_PROD_ID12("CNF CD-M", "CD-ROM", 0x7d93b852, 0x66536591),
PCMCIA_DEVICE_PROD_ID12("Creative Technology Ltd.", "PCMCIA CD-ROM Interface Card", 0xff8c8a45, 0xfe8020c4),
PCMCIA_DEVICE_PROD_ID12("Digital Equipment Corporation.", "Digital Mobile Media CD-ROM", 0x17692a66, 0xef1dcbde),
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index 23714ae..c19417e 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -2514,7 +2514,7 @@ static void mv_unexpected_intr(struct ata_port *ap, int edma_was_enabled)
char *when = "idle";
ata_ehi_clear_desc(ehi);
- if (!ap || (ap->flags & ATA_FLAG_DISABLED)) {
+ if (ap->flags & ATA_FLAG_DISABLED) {
when = "disabled";
} else if (edma_was_enabled) {
when = "EDMA enabled";
diff --git a/drivers/ata/sata_sil.c b/drivers/ata/sata_sil.c
index 030ec07..35bd5cc 100644
--- a/drivers/ata/sata_sil.c
+++ b/drivers/ata/sata_sil.c
@@ -532,7 +532,7 @@ static irqreturn_t sil_interrupt(int irq, void *dev_instance)
struct ata_port *ap = host->ports[i];
u32 bmdma2 = readl(mmio_base + sil_port[ap->port_no].bmdma2);
- if (unlikely(!ap || ap->flags & ATA_FLAG_DISABLED))
+ if (unlikely(ap->flags & ATA_FLAG_DISABLED))
continue;
/* turn off SATA_IRQ if not supported */
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 79b6d7f..e5b6e33 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -589,6 +589,7 @@ struct ata_device {
#endif
/* n_sector is CLEAR_BEGIN, read comment above CLEAR_BEGIN */
u64 n_sectors; /* size of device, if ATA */
+ u64 n_native_sectors; /* native size, if ATA */
unsigned int class; /* ATA_DEV_xxx */
unsigned long unpark_deadline;
^ permalink raw reply related [flat|nested] 263+ messages in thread
* [git patches] libata fixes
@ 2009-07-15 3:09 Jeff Garzik
0 siblings, 0 replies; 263+ messages in thread
From: Jeff Garzik @ 2009-07-15 3:09 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide, LKML
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 | 1 +
drivers/ata/libata-core.c | 20 ++++++++++++++++++--
drivers/ata/libata-eh.c | 4 ++++
drivers/ata/pata_at91.c | 3 ++-
include/linux/libata.h | 1 +
5 files changed, 26 insertions(+), 3 deletions(-)
Julia Lawall (1):
drivers/ata: Move a dereference below a NULL test
Mark Goodwin (1):
ahci: add device ID for 82801JI sata controller
Tejun Heo (2):
libata: fix follow-up SRST failure path
libata: implement and use HORKAGE_NOSETXFER, take#2
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 15a2303..336eb1e 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -513,6 +513,7 @@ static const struct pci_device_id ahci_pci_tbl[] = {
{ PCI_VDEVICE(INTEL, 0x502a), board_ahci }, /* Tolapai */
{ PCI_VDEVICE(INTEL, 0x502b), board_ahci }, /* Tolapai */
{ PCI_VDEVICE(INTEL, 0x3a05), board_ahci }, /* ICH10 */
+ { PCI_VDEVICE(INTEL, 0x3a22), board_ahci }, /* ICH10 */
{ PCI_VDEVICE(INTEL, 0x3a25), board_ahci }, /* ICH10 */
{ PCI_VDEVICE(INTEL, 0x3b24), board_ahci }, /* PCH RAID */
{ PCI_VDEVICE(INTEL, 0x3b25), board_ahci }, /* PCH RAID */
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 045a486..2c6aeda 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -3392,17 +3392,27 @@ int ata_down_xfermask_limit(struct ata_device *dev, unsigned int sel)
static int ata_dev_set_mode(struct ata_device *dev)
{
+ struct ata_port *ap = dev->link->ap;
struct ata_eh_context *ehc = &dev->link->eh_context;
+ const bool nosetxfer = dev->horkage & ATA_HORKAGE_NOSETXFER;
const char *dev_err_whine = "";
int ign_dev_err = 0;
- unsigned int err_mask;
+ unsigned int err_mask = 0;
int rc;
dev->flags &= ~ATA_DFLAG_PIO;
if (dev->xfer_shift == ATA_SHIFT_PIO)
dev->flags |= ATA_DFLAG_PIO;
- err_mask = ata_dev_set_xfermode(dev);
+ if (nosetxfer && ap->flags & ATA_FLAG_SATA && ata_id_is_sata(dev->id))
+ dev_err_whine = " (SET_XFERMODE skipped)";
+ else {
+ if (nosetxfer)
+ ata_dev_printk(dev, KERN_WARNING,
+ "NOSETXFER but PATA detected - can't "
+ "skip SETXFER, might malfunction\n");
+ err_mask = ata_dev_set_xfermode(dev);
+ }
if (err_mask & ~AC_ERR_DEV)
goto fail;
@@ -4297,6 +4307,12 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
/* Devices which aren't very happy with higher link speeds */
{ "WD My Book", NULL, ATA_HORKAGE_1_5_GBPS, },
+ /*
+ * Devices which choke on SETXFER. Applies only if both the
+ * device and controller are SATA.
+ */
+ { "PIONEER DVD-RW DVRTD08", "1.00", ATA_HORKAGE_NOSETXFER },
+
/* End Marker */
{ }
};
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index fa22f94..1a07c06 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -2517,6 +2517,10 @@ int ata_eh_reset(struct ata_link *link, int classify,
ata_eh_about_to_do(link, NULL, ATA_EH_RESET);
rc = ata_do_reset(link, reset, classes, deadline, true);
+ if (rc) {
+ failed_link = link;
+ goto fail;
+ }
}
} else {
if (verbose)
diff --git a/drivers/ata/pata_at91.c b/drivers/ata/pata_at91.c
index 4b27617..8561a9f 100644
--- a/drivers/ata/pata_at91.c
+++ b/drivers/ata/pata_at91.c
@@ -312,11 +312,12 @@ err_ide_ioremap:
static int __devexit pata_at91_remove(struct platform_device *pdev)
{
struct ata_host *host = dev_get_drvdata(&pdev->dev);
- struct at91_ide_info *info = host->private_data;
+ struct at91_ide_info *info;
struct device *dev = &pdev->dev;
if (!host)
return 0;
+ info = host->private_data;
ata_host_detach(host);
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 3d501db..79b6d7f 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -385,6 +385,7 @@ enum {
not multiple of 16 bytes */
ATA_HORKAGE_FIRMWARE_WARN = (1 << 12), /* firmware update warning */
ATA_HORKAGE_1_5_GBPS = (1 << 13), /* force 1.5 Gbps */
+ ATA_HORKAGE_NOSETXFER = (1 << 14), /* skip SETXFER, SATA only */
/* DMA mask for user DMA control: User visible values; DO NOT
renumber */
^ permalink raw reply related [flat|nested] 263+ messages in thread
* Re: [git patches] libata fixes
2009-06-05 20:16 ` Alan Cox
@ 2009-06-05 21:15 ` Jeff Garzik
0 siblings, 0 replies; 263+ messages in thread
From: Jeff Garzik @ 2009-06-05 21:15 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Alan Cox, Andrew Morton, linux-ide, LKML
Alan Cox wrote:
> Missing
> libata: Use IGN_SIMPLEX for ALi
> which you said you'd kick upstream and without which lots of ALi users
> now get no DMA on half their devices due to PM changes.
It was in linux-next -- promoted to upstream-fixes.
Linus, please pull from this NEW BRANCH
Please pull from 'upstream-linus2' branch of
master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev.git
upstream-linus2
which is upstream-linus + the following commit:
> commit a3cb900cc408977a11519bc7c760f3e499079589
> Author: Alan Cox <alan@linux.intel.com>
> Date: Wed May 13 15:02:27 2009 +0100
>
> [libata] pata_ali: Use IGN_SIMPLEX
>
> Some ALi devices report simplex if they have been disabled and re-enabled, a
> restoring the byte does not work. Ignore it - the needed supporting logic is
> already present for the SATA ULi ports.
>
> Signed-off-by: Alan Cox <alan@linux.intel.com>
> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
^ permalink raw reply [flat|nested] 263+ messages in thread
* Re: [git patches] libata fixes
2009-06-05 18:46 Jeff Garzik
@ 2009-06-05 20:16 ` Alan Cox
2009-06-05 21:15 ` Jeff Garzik
0 siblings, 1 reply; 263+ messages in thread
From: Alan Cox @ 2009-06-05 20:16 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Andrew Morton, Linus Torvalds, linux-ide, LKML
On Fri, 5 Jun 2009 14:46:08 -0400
Jeff Garzik <jeff@garzik.org> wrote:
>
> Please pull from 'upstream-linus' branch of
> master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev.git upstream-linus
Missing
libata: Use IGN_SIMPLEX for ALi
which you said you'd kick upstream and without which lots of ALi users
now get no DMA on half their devices due to PM changes.
^ permalink raw reply [flat|nested] 263+ messages in thread
* [git patches] libata fixes
@ 2009-06-05 18:46 Jeff Garzik
2009-06-05 20:16 ` Alan Cox
0 siblings, 1 reply; 263+ messages in thread
From: Jeff Garzik @ 2009-06-05 18:46 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide, LKML
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 | 72 +++++++++++++++++++++++++++++++++++++++++++++
drivers/ata/ata_piix.c | 9 +++++
drivers/ata/pata_efar.c | 17 +++++-----
drivers/ata/pata_legacy.c | 2 +
4 files changed, 91 insertions(+), 9 deletions(-)
James Bottomley (1):
pata_legacy: wait for async probing
Sergei Shtylyov (1):
pata_efar: fix PIO2 underclocking
Tejun Heo (1):
ahci: add warning messages for hp laptops with broken suspend
Ville Syrjala (1):
ata_piix: Add HP Compaq nc6000 to the broken poweroff list
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 08186ec..6b91c26 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -220,6 +220,7 @@ enum {
AHCI_HFLAG_NO_HOTPLUG = (1 << 7), /* ignore PxSERR.DIAG.N */
AHCI_HFLAG_SECT255 = (1 << 8), /* max 255 sectors */
AHCI_HFLAG_YES_NCQ = (1 << 9), /* force NCQ cap on */
+ AHCI_HFLAG_NO_SUSPEND = (1 << 10), /* don't suspend */
/* ap->flags bits */
@@ -2316,9 +2317,17 @@ static int ahci_port_suspend(struct ata_port *ap, pm_message_t mesg)
static int ahci_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg)
{
struct ata_host *host = dev_get_drvdata(&pdev->dev);
+ struct ahci_host_priv *hpriv = host->private_data;
void __iomem *mmio = host->iomap[AHCI_PCI_BAR];
u32 ctl;
+ if (mesg.event & PM_EVENT_SUSPEND &&
+ hpriv->flags & AHCI_HFLAG_NO_SUSPEND) {
+ dev_printk(KERN_ERR, &pdev->dev,
+ "BIOS update required for suspend/resume\n");
+ return -EIO;
+ }
+
if (mesg.event & PM_EVENT_SLEEP) {
/* AHCI spec rev1.1 section 8.3.3:
* Software must disable interrupts prior to requesting a
@@ -2610,6 +2619,63 @@ static bool ahci_broken_system_poweroff(struct pci_dev *pdev)
return false;
}
+static bool ahci_broken_suspend(struct pci_dev *pdev)
+{
+ static const struct dmi_system_id sysids[] = {
+ /*
+ * On HP dv[4-6] and HDX18 with earlier BIOSen, link
+ * to the harddisk doesn't become online after
+ * resuming from STR. Warn and fail suspend.
+ */
+ {
+ .ident = "dv4",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
+ DMI_MATCH(DMI_PRODUCT_NAME,
+ "HP Pavilion dv4 Notebook PC"),
+ },
+ .driver_data = "F.30", /* cutoff BIOS version */
+ },
+ {
+ .ident = "dv5",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
+ DMI_MATCH(DMI_PRODUCT_NAME,
+ "HP Pavilion dv5 Notebook PC"),
+ },
+ .driver_data = "F.16", /* cutoff BIOS version */
+ },
+ {
+ .ident = "dv6",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
+ DMI_MATCH(DMI_PRODUCT_NAME,
+ "HP Pavilion dv6 Notebook PC"),
+ },
+ .driver_data = "F.21", /* cutoff BIOS version */
+ },
+ {
+ .ident = "HDX18",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
+ DMI_MATCH(DMI_PRODUCT_NAME,
+ "HP HDX18 Notebook PC"),
+ },
+ .driver_data = "F.23", /* cutoff BIOS version */
+ },
+ { } /* terminate list */
+ };
+ const struct dmi_system_id *dmi = dmi_first_match(sysids);
+ const char *ver;
+
+ if (!dmi || pdev->bus->number || pdev->devfn != PCI_DEVFN(0x1f, 2))
+ return false;
+
+ ver = dmi_get_system_info(DMI_BIOS_VERSION);
+
+ return !ver || strcmp(ver, dmi->driver_data) < 0;
+}
+
static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
{
static int printed_version;
@@ -2715,6 +2781,12 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
"quirky BIOS, skipping spindown on poweroff\n");
}
+ if (ahci_broken_suspend(pdev)) {
+ hpriv->flags |= AHCI_HFLAG_NO_SUSPEND;
+ dev_printk(KERN_WARNING, &pdev->dev,
+ "BIOS update required for suspend/resume\n");
+ }
+
/* CAP.NP sometimes indicate the index of the last enabled
* port, at other times, that of the last possible port, so
* determining the maximum port number requires looking at
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index d51a17c..1aeb708 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -1455,6 +1455,15 @@ static bool piix_broken_system_poweroff(struct pci_dev *pdev)
/* PCI slot number of the controller */
.driver_data = (void *)0x1FUL,
},
+ {
+ .ident = "HP Compaq nc6000",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "HP Compaq nc6000"),
+ },
+ /* PCI slot number of the controller */
+ .driver_data = (void *)0x1FUL,
+ },
{ } /* terminate list */
};
diff --git a/drivers/ata/pata_efar.c b/drivers/ata/pata_efar.c
index 2085e0a..2a6412f 100644
--- a/drivers/ata/pata_efar.c
+++ b/drivers/ata/pata_efar.c
@@ -22,7 +22,7 @@
#include <linux/ata.h>
#define DRV_NAME "pata_efar"
-#define DRV_VERSION "0.4.4"
+#define DRV_VERSION "0.4.5"
/**
* efar_pre_reset - Enable bits
@@ -98,18 +98,17 @@ static void efar_set_piomode (struct ata_port *ap, struct ata_device *adev)
{ 2, 1 },
{ 2, 3 }, };
- if (pio > 2)
- control |= 1; /* TIME1 enable */
+ if (pio > 1)
+ control |= 1; /* TIME */
if (ata_pio_need_iordy(adev)) /* PIO 3/4 require IORDY */
- control |= 2; /* IE enable */
- /* Intel specifies that the PPE functionality is for disk only */
+ control |= 2; /* IE */
+ /* Intel specifies that the prefetch/posting is for disk only */
if (adev->class == ATA_DEV_ATA)
- control |= 4; /* PPE enable */
+ control |= 4; /* PPE */
pci_read_config_word(dev, idetm_port, &idetm_data);
- /* Enable PPE, IE and TIME as appropriate */
-
+ /* Set PPE, IE, and TIME as appropriate */
if (adev->devno == 0) {
idetm_data &= 0xCCF0;
idetm_data |= control;
@@ -129,7 +128,7 @@ static void efar_set_piomode (struct ata_port *ap, struct ata_device *adev)
pci_write_config_byte(dev, 0x44, slave_data);
}
- idetm_data |= 0x4000; /* Ensure SITRE is enabled */
+ idetm_data |= 0x4000; /* Ensure SITRE is set */
pci_write_config_word(dev, idetm_port, idetm_data);
}
diff --git a/drivers/ata/pata_legacy.c b/drivers/ata/pata_legacy.c
index f72c6c5..6932e56 100644
--- a/drivers/ata/pata_legacy.c
+++ b/drivers/ata/pata_legacy.c
@@ -48,6 +48,7 @@
*
*/
+#include <linux/async.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/pci.h>
@@ -1028,6 +1029,7 @@ static __init int legacy_init_one(struct legacy_probe *probe)
&legacy_sht);
if (ret)
goto fail;
+ async_synchronize_full();
ld->platform_dev = pdev;
/* Nothing found means we drop the port as its probably not there */
^ permalink raw reply related [flat|nested] 263+ messages in thread
* [git patches] libata fixes
@ 2009-05-11 18:37 Jeff Garzik
0 siblings, 0 replies; 263+ messages in thread
From: Jeff Garzik @ 2009-05-11 18:37 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide, LKML
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/ata_piix.c | 18 ++++++++--
drivers/ata/libata-core.c | 4 ++-
drivers/ata/libata-eh.c | 34 +++++++++++++++++--
drivers/ata/libata-scsi.c | 4 +-
drivers/ata/pata_pdc202xx_old.c | 6 ++--
drivers/ata/sata_mv.c | 69 +++++++++++++++++++++++++++++++++++++-
6 files changed, 120 insertions(+), 15 deletions(-)
Alan Cox (2):
ata_piix: ICH7 does not support correct MWDMA timings
ata_piix: The Sony TZ90 needs the cable type hardcoding
Bartlomiej Zolnierkiewicz (1):
pata_pdc202xx_old: fix UDMA33 handling
Borislav Petkov (1):
libata: fix suspend/resume for ATA SEMB devices
Martin Michlmayr (1):
sata_mv: use new sata phy register settings for new devices
Tejun Heo (2):
libata: fix attach error handling
libata: clear ering on resume
Vitaly Mayatskikh (1):
Avoid world-writable sysfs files in libata driver.
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index 942d14a..d51a17c 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -72,6 +72,7 @@
* ICH2 spec c #20 - IDE PRD must not cross a 64K boundary
* and must be dword aligned
* ICH2 spec c #24 - UDMA mode 4,5 t85/86 should be 6ns not 3.3
+ * ICH7 errata #16 - MWDMA1 timings are incorrect
*
* Should have been BIOS fixed:
* 450NX: errata #19 - DMA hangs on old 450NX
@@ -94,7 +95,7 @@
#include <linux/dmi.h>
#define DRV_NAME "ata_piix"
-#define DRV_VERSION "2.12"
+#define DRV_VERSION "2.13"
enum {
PIIX_IOCFG = 0x54, /* IDE I/O configuration register */
@@ -136,6 +137,7 @@ enum piix_controller_ids {
ich_pata_33, /* ICH up to UDMA 33 only */
ich_pata_66, /* ICH up to 66 Mhz */
ich_pata_100, /* ICH up to UDMA 100 */
+ ich_pata_100_nomwdma1, /* ICH up to UDMA 100 but with no MWDMA1*/
ich5_sata,
ich6_sata,
ich6m_sata,
@@ -216,8 +218,8 @@ static const struct pci_device_id piix_pci_tbl[] = {
/* ICH6 (and 6) (i915) UDMA 100 */
{ 0x8086, 0x266F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich_pata_100 },
/* ICH7/7-R (i945, i975) UDMA 100*/
- { 0x8086, 0x27DF, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich_pata_100 },
- { 0x8086, 0x269E, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich_pata_100 },
+ { 0x8086, 0x27DF, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich_pata_100_nomwdma1 },
+ { 0x8086, 0x269E, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich_pata_100_nomwdma1 },
/* ICH8 Mobile PATA Controller */
{ 0x8086, 0x2850, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich_pata_100 },
@@ -487,6 +489,15 @@ static struct ata_port_info piix_port_info[] = {
.port_ops = &ich_pata_ops,
},
+ [ich_pata_100_nomwdma1] =
+ {
+ .flags = PIIX_PATA_FLAGS | PIIX_FLAG_CHECKINTR,
+ .pio_mask = ATA_PIO4,
+ .mwdma_mask = ATA_MWDMA2_ONLY,
+ .udma_mask = ATA_UDMA5,
+ .port_ops = &ich_pata_ops,
+ },
+
[ich5_sata] =
{
.flags = PIIX_SATA_FLAGS,
@@ -594,6 +605,7 @@ static const struct ich_laptop ich_laptop[] = {
{ 0x24CA, 0x1025, 0x003d }, /* ICH4 on ACER TM290 */
{ 0x266F, 0x1025, 0x0066 }, /* ICH6 on ACER Aspire 1694WLMi */
{ 0x2653, 0x1043, 0x82D8 }, /* ICH6M on Asus Eee 701 */
+ { 0x27df, 0x104d, 0x900e }, /* ICH7 on Sony TZ-90 */
/* end marker */
{ 0, }
};
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 17c5d48..c924230 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -4091,7 +4091,9 @@ int ata_dev_revalidate(struct ata_device *dev, unsigned int new_class,
/* fail early if !ATA && !ATAPI to avoid issuing [P]IDENTIFY to PMP */
if (ata_class_enabled(new_class) &&
- new_class != ATA_DEV_ATA && new_class != ATA_DEV_ATAPI) {
+ new_class != ATA_DEV_ATA &&
+ new_class != ATA_DEV_ATAPI &&
+ new_class != ATA_DEV_SEMB) {
ata_dev_printk(dev, KERN_INFO, "class mismatch %u != %u\n",
dev->class, new_class);
rc = -ENODEV;
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 0183131..94919ad 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -2783,6 +2783,12 @@ static int ata_eh_revalidate_and_attach(struct ata_link *link,
} else if (dev->class == ATA_DEV_UNKNOWN &&
ehc->tries[dev->devno] &&
ata_class_enabled(ehc->classes[dev->devno])) {
+ /* Temporarily set dev->class, it will be
+ * permanently set once all configurations are
+ * complete. This is necessary because new
+ * device configuration is done in two
+ * separate loops.
+ */
dev->class = ehc->classes[dev->devno];
if (dev->class == ATA_DEV_PMP)
@@ -2790,6 +2796,11 @@ static int ata_eh_revalidate_and_attach(struct ata_link *link,
else
rc = ata_dev_read_id(dev, &dev->class,
readid_flags, dev->id);
+
+ /* read_id might have changed class, store and reset */
+ ehc->classes[dev->devno] = dev->class;
+ dev->class = ATA_DEV_UNKNOWN;
+
switch (rc) {
case 0:
/* clear error info accumulated during probe */
@@ -2799,13 +2810,11 @@ static int ata_eh_revalidate_and_attach(struct ata_link *link,
case -ENOENT:
/* IDENTIFY was issued to non-existent
* device. No need to reset. Just
- * thaw and kill the device.
+ * thaw and ignore the device.
*/
ata_eh_thaw_port(ap);
- dev->class = ATA_DEV_UNKNOWN;
break;
default:
- dev->class = ATA_DEV_UNKNOWN;
goto err;
}
}
@@ -2826,11 +2835,15 @@ static int ata_eh_revalidate_and_attach(struct ata_link *link,
dev->class == ATA_DEV_PMP)
continue;
+ dev->class = ehc->classes[dev->devno];
+
ehc->i.flags |= ATA_EHI_PRINTINFO;
rc = ata_dev_configure(dev);
ehc->i.flags &= ~ATA_EHI_PRINTINFO;
- if (rc)
+ if (rc) {
+ dev->class = ATA_DEV_UNKNOWN;
goto err;
+ }
spin_lock_irqsave(ap->lock, flags);
ap->pflags |= ATA_PFLAG_SCSI_HOTPLUG;
@@ -3494,6 +3507,8 @@ static void ata_eh_handle_port_suspend(struct ata_port *ap)
*/
static void ata_eh_handle_port_resume(struct ata_port *ap)
{
+ struct ata_link *link;
+ struct ata_device *dev;
unsigned long flags;
int rc = 0;
@@ -3508,6 +3523,17 @@ static void ata_eh_handle_port_resume(struct ata_port *ap)
WARN_ON(!(ap->pflags & ATA_PFLAG_SUSPENDED));
+ /*
+ * Error timestamps are in jiffies which doesn't run while
+ * suspended and PHY events during resume isn't too uncommon.
+ * When the two are combined, it can lead to unnecessary speed
+ * downs if the machine is suspended and resumed repeatedly.
+ * Clear error history.
+ */
+ ata_for_each_link(link, ap, HOST_FIRST)
+ ata_for_each_dev(dev, link, ALL)
+ ata_ering_clear(&dev->ering);
+
ata_acpi_set_state(ap, PMSG_ON);
if (ap->ops->port_resume)
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index 2733b0c..68d9132 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -313,7 +313,7 @@ ata_scsi_em_message_show(struct device *dev, struct device_attribute *attr,
return ap->ops->em_show(ap, buf);
return -EINVAL;
}
-DEVICE_ATTR(em_message, S_IRUGO | S_IWUGO,
+DEVICE_ATTR(em_message, S_IRUGO | S_IWUSR,
ata_scsi_em_message_show, ata_scsi_em_message_store);
EXPORT_SYMBOL_GPL(dev_attr_em_message);
@@ -366,7 +366,7 @@ ata_scsi_activity_store(struct device *dev, struct device_attribute *attr,
}
return -EINVAL;
}
-DEVICE_ATTR(sw_activity, S_IWUGO | S_IRUGO, ata_scsi_activity_show,
+DEVICE_ATTR(sw_activity, S_IWUSR | S_IRUGO, ata_scsi_activity_show,
ata_scsi_activity_store);
EXPORT_SYMBOL_GPL(dev_attr_sw_activity);
diff --git a/drivers/ata/pata_pdc202xx_old.c b/drivers/ata/pata_pdc202xx_old.c
index 5fedb3d..2f3c9be 100644
--- a/drivers/ata/pata_pdc202xx_old.c
+++ b/drivers/ata/pata_pdc202xx_old.c
@@ -2,7 +2,7 @@
* pata_pdc202xx_old.c - Promise PDC202xx PATA for new ATA layer
* (C) 2005 Red Hat Inc
* Alan Cox <alan@lxorguk.ukuu.org.uk>
- * (C) 2007 Bartlomiej Zolnierkiewicz
+ * (C) 2007,2009 Bartlomiej Zolnierkiewicz
*
* Based in part on linux/drivers/ide/pci/pdc202xx_old.c
*
@@ -158,7 +158,7 @@ static void pdc2026x_bmdma_start(struct ata_queued_cmd *qc)
u32 len;
/* Check we keep host level locking here */
- if (adev->dma_mode >= XFER_UDMA_2)
+ if (adev->dma_mode > XFER_UDMA_2)
iowrite8(ioread8(clock) | sel66, clock);
else
iowrite8(ioread8(clock) & ~sel66, clock);
@@ -212,7 +212,7 @@ static void pdc2026x_bmdma_stop(struct ata_queued_cmd *qc)
iowrite8(ioread8(clock) & ~sel66, clock);
}
/* Flip back to 33Mhz for PIO */
- if (adev->dma_mode >= XFER_UDMA_2)
+ if (adev->dma_mode > XFER_UDMA_2)
iowrite8(ioread8(clock) & ~sel66, clock);
ata_bmdma_stop(qc);
pdc202xx_set_piomode(ap, adev);
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index 870dcfd..23714ae 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -293,6 +293,10 @@ enum {
FISCFG_WAIT_DEV_ERR = (1 << 8), /* wait for host on DevErr */
FISCFG_SINGLE_SYNC = (1 << 16), /* SYNC on DMA activation */
+ PHY_MODE9_GEN2 = 0x398,
+ PHY_MODE9_GEN1 = 0x39c,
+ PHYCFG_OFS = 0x3a0, /* only in 65n devices */
+
MV5_PHY_MODE = 0x74,
MV5_LTMODE = 0x30,
MV5_PHY_CTL = 0x0C,
@@ -609,6 +613,8 @@ static int mv_soc_reset_hc(struct mv_host_priv *hpriv,
static void mv_soc_reset_flash(struct mv_host_priv *hpriv,
void __iomem *mmio);
static void mv_soc_reset_bus(struct ata_host *host, void __iomem *mmio);
+static void mv_soc_65n_phy_errata(struct mv_host_priv *hpriv,
+ void __iomem *mmio, unsigned int port);
static void mv_reset_pci_bus(struct ata_host *host, void __iomem *mmio);
static void mv_reset_channel(struct mv_host_priv *hpriv, void __iomem *mmio,
unsigned int port_no);
@@ -807,6 +813,14 @@ static const struct mv_hw_ops mv_soc_ops = {
.reset_bus = mv_soc_reset_bus,
};
+static const struct mv_hw_ops mv_soc_65n_ops = {
+ .phy_errata = mv_soc_65n_phy_errata,
+ .enable_leds = mv_soc_enable_leds,
+ .reset_hc = mv_soc_reset_hc,
+ .reset_flash = mv_soc_reset_flash,
+ .reset_bus = mv_soc_reset_bus,
+};
+
/*
* Functions
*/
@@ -3397,6 +3411,53 @@ static void mv_soc_reset_bus(struct ata_host *host, void __iomem *mmio)
return;
}
+static void mv_soc_65n_phy_errata(struct mv_host_priv *hpriv,
+ void __iomem *mmio, unsigned int port)
+{
+ void __iomem *port_mmio = mv_port_base(mmio, port);
+ u32 reg;
+
+ reg = readl(port_mmio + PHY_MODE3);
+ reg &= ~(0x3 << 27); /* SELMUPF (bits 28:27) to 1 */
+ reg |= (0x1 << 27);
+ reg &= ~(0x3 << 29); /* SELMUPI (bits 30:29) to 1 */
+ reg |= (0x1 << 29);
+ writel(reg, port_mmio + PHY_MODE3);
+
+ reg = readl(port_mmio + PHY_MODE4);
+ reg &= ~0x1; /* SATU_OD8 (bit 0) to 0, reserved bit 16 must be set */
+ reg |= (0x1 << 16);
+ writel(reg, port_mmio + PHY_MODE4);
+
+ reg = readl(port_mmio + PHY_MODE9_GEN2);
+ reg &= ~0xf; /* TXAMP[3:0] (bits 3:0) to 8 */
+ reg |= 0x8;
+ reg &= ~(0x1 << 14); /* TXAMP[4] (bit 14) to 0 */
+ writel(reg, port_mmio + PHY_MODE9_GEN2);
+
+ reg = readl(port_mmio + PHY_MODE9_GEN1);
+ reg &= ~0xf; /* TXAMP[3:0] (bits 3:0) to 8 */
+ reg |= 0x8;
+ reg &= ~(0x1 << 14); /* TXAMP[4] (bit 14) to 0 */
+ writel(reg, port_mmio + PHY_MODE9_GEN1);
+}
+
+/**
+ * soc_is_65 - check if the soc is 65 nano device
+ *
+ * Detect the type of the SoC, this is done by reading the PHYCFG_OFS
+ * register, this register should contain non-zero value and it exists only
+ * in the 65 nano devices, when reading it from older devices we get 0.
+ */
+static bool soc_is_65n(struct mv_host_priv *hpriv)
+{
+ void __iomem *port0_mmio = mv_port_base(hpriv->base, 0);
+
+ if (readl(port0_mmio + PHYCFG_OFS))
+ return true;
+ return false;
+}
+
static void mv_setup_ifcfg(void __iomem *port_mmio, int want_gen2i)
{
u32 ifcfg = readl(port_mmio + SATA_IFCFG);
@@ -3737,7 +3798,10 @@ static int mv_chip_id(struct ata_host *host, unsigned int board_idx)
}
break;
case chip_soc:
- hpriv->ops = &mv_soc_ops;
+ if (soc_is_65n(hpriv))
+ hpriv->ops = &mv_soc_65n_ops;
+ else
+ hpriv->ops = &mv_soc_ops;
hp_flags |= MV_HP_FLAG_SOC | MV_HP_GEN_IIE |
MV_HP_ERRATA_60X1C0;
break;
@@ -3800,7 +3864,8 @@ static int mv_init_host(struct ata_host *host, unsigned int board_idx)
n_hc = mv_get_hc_count(host->ports[0]->flags);
for (port = 0; port < host->n_ports; port++)
- hpriv->ops->read_preamp(hpriv, port, mmio);
+ if (hpriv->ops->read_preamp)
+ hpriv->ops->read_preamp(hpriv, port, mmio);
rc = hpriv->ops->reset_hc(hpriv, mmio, n_hc);
if (rc)
^ permalink raw reply related [flat|nested] 263+ messages in thread
* [git patches] libata fixes
@ 2009-04-17 23:07 Jeff Garzik
0 siblings, 0 replies; 263+ messages in thread
From: Jeff Garzik @ 2009-04-17 23:07 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide, LKML
I accidentally pulled the trigger too soon on Alan's 32-bit PIO ioctl
patch, leading to build breakage. This fixes that, plus some other
minor fixes.
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/pata_legacy.c | 13 ++++----
drivers/ata/pata_via.c | 74 ++++++++++++++++++++++++++++++++++++++++----
drivers/ata/sata_mv.c | 58 +++++++++++++++++++++++++++++------
3 files changed, 122 insertions(+), 23 deletions(-)
Alan Cox (1):
pata_via: Cache and rewrite the device bit
Mark Lord (2):
sata_mv: tidy up qc->tf usage in qc_prep() functions
sata_mv: workaround for multi_count errata sata24
Zhenwen Xu (1):
[libata] fix build error on drivers/ata/pata_legacy.c
diff --git a/drivers/ata/pata_legacy.c b/drivers/ata/pata_legacy.c
index 6f985be..f72c6c5 100644
--- a/drivers/ata/pata_legacy.c
+++ b/drivers/ata/pata_legacy.c
@@ -285,10 +285,11 @@ static unsigned int pdc_data_xfer_vlb(struct ata_device *dev,
unsigned char *buf, unsigned int buflen, int rw)
{
int slop = buflen & 3;
+ struct ata_port *ap = dev->link->ap;
+
/* 32bit I/O capable *and* we need to write a whole number of dwords */
if (ata_id_has_dword_io(dev->id) && (slop == 0 || slop == 3)
&& (ap->pflags & ATA_PFLAG_PIO32)) {
- struct ata_port *ap = dev->link->ap;
unsigned long flags;
local_irq_save(flags);
@@ -866,7 +867,7 @@ static struct legacy_controller controllers[] = {
0, 0, NULL },
{"PDC20230", &pdc20230_port_ops, 0x7,
ATA_FLAG_NO_IORDY,
- ATA_PFLAG_PIO32 | ATA_PFLAG_PIO32_CHANGE, NULL },
+ ATA_PFLAG_PIO32 | ATA_PFLAG_PIO32CHANGE, NULL },
{"HT6560A", &ht6560a_port_ops, 0x07,
ATA_FLAG_NO_IORDY, 0, NULL },
{"HT6560B", &ht6560b_port_ops, 0x1F,
@@ -877,13 +878,13 @@ static struct legacy_controller controllers[] = {
0, 0, NULL },
{"QDI6500", &qdi6500_port_ops, 0x07,
ATA_FLAG_NO_IORDY,
- ATA_PFLAG_PIO32 | ATA_PFLAG_PIO32_CHANGE, qdi_port },
+ ATA_PFLAG_PIO32 | ATA_PFLAG_PIO32CHANGE, qdi_port },
{"QDI6580", &qdi6580_port_ops, 0x1F,
- 0, ATA_PFLAG_PIO32 | ATA_PFLAG_PIO32_CHANGE, qdi_port },
+ 0, ATA_PFLAG_PIO32 | ATA_PFLAG_PIO32CHANGE, qdi_port },
{"QDI6580DP", &qdi6580dp_port_ops, 0x1F,
- 0, ATA_PFLAG_PIO32 | ATA_PFLAG_PIO32_CHANGE, qdi_port },
+ 0, ATA_PFLAG_PIO32 | ATA_PFLAG_PIO32CHANGE, qdi_port },
{"W83759A", &winbond_port_ops, 0x1F,
- 0, ATA_PFLAG_PIO32 | ATA_PFLAG_PIO32_CHANGE,
+ 0, ATA_PFLAG_PIO32 | ATA_PFLAG_PIO32CHANGE,
winbond_port }
};
diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c
index b08e6e0..45657ca 100644
--- a/drivers/ata/pata_via.c
+++ b/drivers/ata/pata_via.c
@@ -62,7 +62,7 @@
#include <linux/dmi.h>
#define DRV_NAME "pata_via"
-#define DRV_VERSION "0.3.3"
+#define DRV_VERSION "0.3.4"
/*
* The following comes directly from Vojtech Pavlik's ide/pci/via82cxxx
@@ -136,6 +136,9 @@ static const struct via_isa_bridge {
{ NULL }
};
+struct via_port {
+ u8 cached_device;
+};
/*
* Cable special cases
@@ -346,14 +349,70 @@ static void via_set_dmamode(struct ata_port *ap, struct ata_device *adev)
*/
static void via_tf_load(struct ata_port *ap, const struct ata_taskfile *tf)
{
- struct ata_taskfile tmp_tf;
+ struct ata_ioports *ioaddr = &ap->ioaddr;
+ struct via_port *vp = ap->private_data;
+ unsigned int is_addr = tf->flags & ATA_TFLAG_ISADDR;
+ int newctl = 0;
+
+ if (tf->ctl != ap->last_ctl) {
+ iowrite8(tf->ctl, ioaddr->ctl_addr);
+ ap->last_ctl = tf->ctl;
+ ata_wait_idle(ap);
+ newctl = 1;
+ }
+
+ if (tf->flags & ATA_TFLAG_DEVICE) {
+ iowrite8(tf->device, ioaddr->device_addr);
+ vp->cached_device = tf->device;
+ } else if (newctl)
+ iowrite8(vp->cached_device, ioaddr->device_addr);
+
+ if (is_addr && (tf->flags & ATA_TFLAG_LBA48)) {
+ WARN_ON_ONCE(!ioaddr->ctl_addr);
+ iowrite8(tf->hob_feature, ioaddr->feature_addr);
+ iowrite8(tf->hob_nsect, ioaddr->nsect_addr);
+ iowrite8(tf->hob_lbal, ioaddr->lbal_addr);
+ iowrite8(tf->hob_lbam, ioaddr->lbam_addr);
+ iowrite8(tf->hob_lbah, ioaddr->lbah_addr);
+ VPRINTK("hob: feat 0x%X nsect 0x%X, lba 0x%X 0x%X 0x%X\n",
+ tf->hob_feature,
+ tf->hob_nsect,
+ tf->hob_lbal,
+ tf->hob_lbam,
+ tf->hob_lbah);
+ }
- if (ap->ctl != ap->last_ctl && !(tf->flags & ATA_TFLAG_DEVICE)) {
- tmp_tf = *tf;
- tmp_tf.flags |= ATA_TFLAG_DEVICE;
- tf = &tmp_tf;
+ if (is_addr) {
+ iowrite8(tf->feature, ioaddr->feature_addr);
+ iowrite8(tf->nsect, ioaddr->nsect_addr);
+ iowrite8(tf->lbal, ioaddr->lbal_addr);
+ iowrite8(tf->lbam, ioaddr->lbam_addr);
+ iowrite8(tf->lbah, ioaddr->lbah_addr);
+ VPRINTK("feat 0x%X nsect 0x%X lba 0x%X 0x%X 0x%X\n",
+ tf->feature,
+ tf->nsect,
+ tf->lbal,
+ tf->lbam,
+ tf->lbah);
}
- ata_sff_tf_load(ap, tf);
+
+ ata_wait_idle(ap);
+}
+
+static int via_port_start(struct ata_port *ap)
+{
+ struct via_port *vp;
+ struct pci_dev *pdev = to_pci_dev(ap->host->dev);
+
+ int ret = ata_sff_port_start(ap);
+ if (ret < 0)
+ return ret;
+
+ vp = devm_kzalloc(&pdev->dev, sizeof(struct via_port), GFP_KERNEL);
+ if (vp == NULL)
+ return -ENOMEM;
+ ap->private_data = vp;
+ return 0;
}
static struct scsi_host_template via_sht = {
@@ -367,6 +426,7 @@ static struct ata_port_operations via_port_ops = {
.set_dmamode = via_set_dmamode,
.prereset = via_pre_reset,
.sff_tf_load = via_tf_load,
+ .port_start = via_port_start,
};
static struct ata_port_operations via_port_ops_noirq = {
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index 37ae5dc..870dcfd 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -1881,6 +1881,39 @@ static u8 mv_bmdma_status(struct ata_port *ap)
return status;
}
+static void mv_rw_multi_errata_sata24(struct ata_queued_cmd *qc)
+{
+ struct ata_taskfile *tf = &qc->tf;
+ /*
+ * Workaround for 88SX60x1 FEr SATA#24.
+ *
+ * Chip may corrupt WRITEs if multi_count >= 4kB.
+ * Note that READs are unaffected.
+ *
+ * It's not clear if this errata really means "4K bytes",
+ * or if it always happens for multi_count > 7
+ * regardless of device sector_size.
+ *
+ * So, for safety, any write with multi_count > 7
+ * gets converted here into a regular PIO write instead:
+ */
+ if ((tf->flags & ATA_TFLAG_WRITE) && is_multi_taskfile(tf)) {
+ if (qc->dev->multi_count > 7) {
+ switch (tf->command) {
+ case ATA_CMD_WRITE_MULTI:
+ tf->command = ATA_CMD_PIO_WRITE;
+ break;
+ case ATA_CMD_WRITE_MULTI_FUA_EXT:
+ tf->flags &= ~ATA_TFLAG_FUA; /* ugh */
+ /* fall through */
+ case ATA_CMD_WRITE_MULTI_EXT:
+ tf->command = ATA_CMD_PIO_WRITE_EXT;
+ break;
+ }
+ }
+ }
+}
+
/**
* mv_qc_prep - Host specific command preparation.
* @qc: queued command to prepare
@@ -1898,17 +1931,24 @@ static void mv_qc_prep(struct ata_queued_cmd *qc)
struct ata_port *ap = qc->ap;
struct mv_port_priv *pp = ap->private_data;
__le16 *cw;
- struct ata_taskfile *tf;
+ struct ata_taskfile *tf = &qc->tf;
u16 flags = 0;
unsigned in_index;
- if ((qc->tf.protocol != ATA_PROT_DMA) &&
- (qc->tf.protocol != ATA_PROT_NCQ))
+ switch (tf->protocol) {
+ case ATA_PROT_DMA:
+ case ATA_PROT_NCQ:
+ break; /* continue below */
+ case ATA_PROT_PIO:
+ mv_rw_multi_errata_sata24(qc);
+ return;
+ default:
return;
+ }
/* Fill in command request block
*/
- if (!(qc->tf.flags & ATA_TFLAG_WRITE))
+ if (!(tf->flags & ATA_TFLAG_WRITE))
flags |= CRQB_FLAG_READ;
WARN_ON(MV_MAX_Q_DEPTH <= qc->tag);
flags |= qc->tag << CRQB_TAG_SHIFT;
@@ -1924,7 +1964,6 @@ static void mv_qc_prep(struct ata_queued_cmd *qc)
pp->crqb[in_index].ctrl_flags = cpu_to_le16(flags);
cw = &pp->crqb[in_index].ata_cmd[0];
- tf = &qc->tf;
/* Sadly, the CRQB cannot accomodate all registers--there are
* only 11 bytes...so we must pick and choose required
@@ -1990,16 +2029,16 @@ static void mv_qc_prep_iie(struct ata_queued_cmd *qc)
struct ata_port *ap = qc->ap;
struct mv_port_priv *pp = ap->private_data;
struct mv_crqb_iie *crqb;
- struct ata_taskfile *tf;
+ struct ata_taskfile *tf = &qc->tf;
unsigned in_index;
u32 flags = 0;
- if ((qc->tf.protocol != ATA_PROT_DMA) &&
- (qc->tf.protocol != ATA_PROT_NCQ))
+ if ((tf->protocol != ATA_PROT_DMA) &&
+ (tf->protocol != ATA_PROT_NCQ))
return;
/* Fill in Gen IIE command request block */
- if (!(qc->tf.flags & ATA_TFLAG_WRITE))
+ if (!(tf->flags & ATA_TFLAG_WRITE))
flags |= CRQB_FLAG_READ;
WARN_ON(MV_MAX_Q_DEPTH <= qc->tag);
@@ -2015,7 +2054,6 @@ static void mv_qc_prep_iie(struct ata_queued_cmd *qc)
crqb->addr_hi = cpu_to_le32((pp->sg_tbl_dma[qc->tag] >> 16) >> 16);
crqb->flags = cpu_to_le32(flags);
- tf = &qc->tf;
crqb->ata_cmd[0] = cpu_to_le32(
(tf->command << 16) |
(tf->feature << 24)
^ permalink raw reply related [flat|nested] 263+ messages in thread
* Re: [git patches] libata fixes
2009-04-16 19:39 Jeff Garzik
@ 2009-04-16 20:28 ` Mark Lord
0 siblings, 0 replies; 263+ messages in thread
From: Mark Lord @ 2009-04-16 20:28 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Andrew Morton, Linus Torvalds, linux-ide, LKML
Jeff Garzik wrote:
> Various minor fixes, and a small libata.h cleanup.
..
Any chance you could also push out the last of the sata_mv errata workarounds?
That's the one that prevents data corruption for multisector WRITEs.
[PATCH 01/02] sata_mv: tidy up qc->tf usage in qc_prep() functions
[PATCH 02/02] sata_mv: workaround for multi_count errata sata24
Thanks
^ permalink raw reply [flat|nested] 263+ messages in thread
* [git patches] libata fixes
@ 2009-04-16 19:39 Jeff Garzik
2009-04-16 20:28 ` Mark Lord
0 siblings, 1 reply; 263+ messages in thread
From: Jeff Garzik @ 2009-04-16 19:39 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide, LKML
Various minor fixes, and a small libata.h cleanup.
Alan's fix is mildly notable because we missed a userland-visible
change: when 32-bit PIO data xfer support was merged
(871af1210f13966ab911ed2166e4ab2ce775b99d), the userland ioctl reporting
and controlling 32-bit PIO remained hardcoded to 16-bit.
This is an old and increasingly irrelevant feature, so application
impact is likely none-to-minimal... you couldn't change from the
hardcoded 16-bit PIO prior to Alan's change, which guaranteed that no
one ever tried :)
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/libata-core.c | 25 ++++++++++++++++++++-----
drivers/ata/libata-scsi.c | 30 ++++++++++++++++++++++++++----
drivers/ata/libata-sff.c | 27 +++++++++++++++++++++++++++
drivers/ata/pata_hpt37x.c | 22 ++--------------------
drivers/ata/pata_legacy.c | 34 +++++++++++++++++++++-------------
drivers/ata/pata_ninja32.c | 4 +++-
include/linux/libata.h | 8 ++++++++
7 files changed, 107 insertions(+), 43 deletions(-)
Alan Cox (1):
ata: Report 16/32bit PIO as best we can
Sergei Shtylyov (2):
pata_hpt37x: fix HPT370 DMA timeouts
libata: use ATA_ID_CFA_*
Tejun Heo (2):
libata: handle SEMB signature better
pata_legacy: fix no device fail path
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 065507c..17c5d48 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -1231,6 +1231,9 @@ unsigned int ata_dev_classify(const struct ata_taskfile *tf)
*
* We follow the current spec and consider that 0x69/0x96
* identifies a port multiplier and 0x3c/0xc3 a SEMB device.
+ * Unfortunately, WDC WD1600JS-62MHB5 (a hard drive) reports
+ * SEMB signature. This is worked around in
+ * ata_dev_read_id().
*/
if ((tf->lbam == 0) && (tf->lbah == 0)) {
DPRINTK("found ATA device by sig\n");
@@ -1248,8 +1251,8 @@ unsigned int ata_dev_classify(const struct ata_taskfile *tf)
}
if ((tf->lbam == 0x3c) && (tf->lbah == 0xc3)) {
- printk(KERN_INFO "ata: SEMB device ignored\n");
- return ATA_DEV_SEMB_UNSUP; /* not yet */
+ DPRINTK("found SEMB device by sig (could be ATA device)\n");
+ return ATA_DEV_SEMB;
}
DPRINTK("unknown device\n");
@@ -1653,8 +1656,8 @@ unsigned long ata_id_xfermask(const u16 *id)
/*
* Process compact flash extended modes
*/
- int pio = id[163] & 0x7;
- int dma = (id[163] >> 3) & 7;
+ int pio = (id[ATA_ID_CFA_MODES] >> 0) & 0x7;
+ int dma = (id[ATA_ID_CFA_MODES] >> 3) & 0x7;
if (pio)
pio_mask |= (1 << 5);
@@ -2080,6 +2083,7 @@ int ata_dev_read_id(struct ata_device *dev, unsigned int *p_class,
struct ata_taskfile tf;
unsigned int err_mask = 0;
const char *reason;
+ bool is_semb = class == ATA_DEV_SEMB;
int may_fallback = 1, tried_spinup = 0;
int rc;
@@ -2090,6 +2094,8 @@ retry:
ata_tf_init(dev, &tf);
switch (class) {
+ case ATA_DEV_SEMB:
+ class = ATA_DEV_ATA; /* some hard drives report SEMB sig */
case ATA_DEV_ATA:
tf.command = ATA_CMD_ID_ATA;
break;
@@ -2126,6 +2132,14 @@ retry:
return -ENOENT;
}
+ if (is_semb) {
+ ata_dev_printk(dev, KERN_INFO, "IDENTIFY failed on "
+ "device w/ SEMB sig, disabled\n");
+ /* SEMB is not supported yet */
+ *p_class = ATA_DEV_SEMB_UNSUP;
+ return 0;
+ }
+
if ((err_mask == AC_ERR_DEV) && (tf.feature & ATA_ABORTED)) {
/* Device or controller might have reported
* the wrong device class. Give a shot at the
@@ -2412,7 +2426,8 @@ int ata_dev_configure(struct ata_device *dev)
/* ATA-specific feature tests */
if (dev->class == ATA_DEV_ATA) {
if (ata_id_is_cfa(id)) {
- if (id[162] & 1) /* CPRM may make this media unusable */
+ /* CPRM may make this media unusable */
+ if (id[ATA_ID_CFA_KEY_MGMT] & 1)
ata_dev_printk(dev, KERN_WARNING,
"supports DRM functions and may "
"not be fully accessable.\n");
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index b9747fa..2733b0c 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -647,23 +647,45 @@ int ata_task_ioctl(struct scsi_device *scsidev, void __user *arg)
return rc;
}
+static int ata_ioc32(struct ata_port *ap)
+{
+ if (ap->flags & ATA_FLAG_PIO_DMA)
+ return 1;
+ if (ap->pflags & ATA_PFLAG_PIO32)
+ return 1;
+ return 0;
+}
+
int ata_sas_scsi_ioctl(struct ata_port *ap, struct scsi_device *scsidev,
int cmd, void __user *arg)
{
int val = -EINVAL, rc = -EINVAL;
+ unsigned long flags;
switch (cmd) {
case ATA_IOC_GET_IO32:
- val = 0;
+ spin_lock_irqsave(ap->lock, flags);
+ val = ata_ioc32(ap);
+ spin_unlock_irqrestore(ap->lock, flags);
if (copy_to_user(arg, &val, 1))
return -EFAULT;
return 0;
case ATA_IOC_SET_IO32:
val = (unsigned long) arg;
- if (val != 0)
- return -EINVAL;
- return 0;
+ rc = 0;
+ spin_lock_irqsave(ap->lock, flags);
+ if (ap->pflags & ATA_PFLAG_PIO32CHANGE) {
+ if (val)
+ ap->pflags |= ATA_PFLAG_PIO32;
+ else
+ ap->pflags &= ~ATA_PFLAG_PIO32;
+ } else {
+ if (val != ata_ioc32(ap))
+ rc = -EINVAL;
+ }
+ spin_unlock_irqrestore(ap->lock, flags);
+ return rc;
case HDIO_GET_IDENTITY:
return ata_get_identity(ap, scsidev, arg);
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
index 8332e97..bb18415 100644
--- a/drivers/ata/libata-sff.c
+++ b/drivers/ata/libata-sff.c
@@ -87,6 +87,7 @@ const struct ata_port_operations ata_bmdma32_port_ops = {
.inherits = &ata_bmdma_port_ops,
.sff_data_xfer = ata_sff_data_xfer32,
+ .port_start = ata_sff_port_start32,
};
EXPORT_SYMBOL_GPL(ata_bmdma32_port_ops);
@@ -769,6 +770,9 @@ unsigned int ata_sff_data_xfer32(struct ata_device *dev, unsigned char *buf,
void __iomem *data_addr = ap->ioaddr.data_addr;
unsigned int words = buflen >> 2;
int slop = buflen & 3;
+
+ if (!(ap->pflags & ATA_PFLAG_PIO32))
+ return ata_sff_data_xfer(dev, buf, buflen, rw);
/* Transfer multiple of 4 bytes */
if (rw == READ)
@@ -2402,6 +2406,29 @@ int ata_sff_port_start(struct ata_port *ap)
EXPORT_SYMBOL_GPL(ata_sff_port_start);
/**
+ * ata_sff_port_start32 - Set port up for dma.
+ * @ap: Port to initialize
+ *
+ * Called just after data structures for each port are
+ * initialized. Allocates space for PRD table if the device
+ * is DMA capable SFF.
+ *
+ * May be used as the port_start() entry in ata_port_operations for
+ * devices that are capable of 32bit PIO.
+ *
+ * LOCKING:
+ * Inherited from caller.
+ */
+int ata_sff_port_start32(struct ata_port *ap)
+{
+ ap->pflags |= ATA_PFLAG_PIO32 | ATA_PFLAG_PIO32CHANGE;
+ if (ap->ioaddr.bmdma_addr)
+ return ata_port_start(ap);
+ return 0;
+}
+EXPORT_SYMBOL_GPL(ata_sff_port_start32);
+
+/**
* ata_sff_std_ports - initialize ioaddr with standard port offsets.
* @ioaddr: IO address structure to be initialized
*
diff --git a/drivers/ata/pata_hpt37x.c b/drivers/ata/pata_hpt37x.c
index 81ab570..122c786 100644
--- a/drivers/ata/pata_hpt37x.c
+++ b/drivers/ata/pata_hpt37x.c
@@ -8,7 +8,7 @@
* Copyright (C) 1999-2003 Andre Hedrick <andre@linux-ide.org>
* Portions Copyright (C) 2001 Sun Microsystems, Inc.
* Portions Copyright (C) 2003 Red Hat Inc
- * Portions Copyright (C) 2005-2007 MontaVista Software, Inc.
+ * Portions Copyright (C) 2005-2009 MontaVista Software, Inc.
*
* TODO
* Look into engine reset on timeout errors. Should not be required.
@@ -24,7 +24,7 @@
#include <linux/libata.h>
#define DRV_NAME "pata_hpt37x"
-#define DRV_VERSION "0.6.11"
+#define DRV_VERSION "0.6.12"
struct hpt_clock {
u8 xfer_speed;
@@ -445,23 +445,6 @@ static void hpt370_set_dmamode(struct ata_port *ap, struct ata_device *adev)
}
/**
- * hpt370_bmdma_start - DMA engine begin
- * @qc: ATA command
- *
- * The 370 and 370A want us to reset the DMA engine each time we
- * use it. The 372 and later are fine.
- */
-
-static void hpt370_bmdma_start(struct ata_queued_cmd *qc)
-{
- struct ata_port *ap = qc->ap;
- struct pci_dev *pdev = to_pci_dev(ap->host->dev);
- pci_write_config_byte(pdev, 0x50 + 4 * ap->port_no, 0x37);
- udelay(10);
- ata_bmdma_start(qc);
-}
-
-/**
* hpt370_bmdma_end - DMA engine stop
* @qc: ATA command
*
@@ -598,7 +581,6 @@ static struct scsi_host_template hpt37x_sht = {
static struct ata_port_operations hpt370_port_ops = {
.inherits = &ata_bmdma_port_ops,
- .bmdma_start = hpt370_bmdma_start,
.bmdma_stop = hpt370_bmdma_stop,
.mode_filter = hpt370_filter,
diff --git a/drivers/ata/pata_legacy.c b/drivers/ata/pata_legacy.c
index 3f830f0..6f985be 100644
--- a/drivers/ata/pata_legacy.c
+++ b/drivers/ata/pata_legacy.c
@@ -108,6 +108,7 @@ struct legacy_controller {
struct ata_port_operations *ops;
unsigned int pio_mask;
unsigned int flags;
+ unsigned int pflags;
int (*setup)(struct platform_device *, struct legacy_probe *probe,
struct legacy_data *data);
};
@@ -285,7 +286,8 @@ static unsigned int pdc_data_xfer_vlb(struct ata_device *dev,
{
int slop = buflen & 3;
/* 32bit I/O capable *and* we need to write a whole number of dwords */
- if (ata_id_has_dword_io(dev->id) && (slop == 0 || slop == 3)) {
+ if (ata_id_has_dword_io(dev->id) && (slop == 0 || slop == 3)
+ && (ap->pflags & ATA_PFLAG_PIO32)) {
struct ata_port *ap = dev->link->ap;
unsigned long flags;
@@ -736,7 +738,8 @@ static unsigned int vlb32_data_xfer(struct ata_device *adev, unsigned char *buf,
struct ata_port *ap = adev->link->ap;
int slop = buflen & 3;
- if (ata_id_has_dword_io(adev->id) && (slop == 0 || slop == 3)) {
+ if (ata_id_has_dword_io(adev->id) && (slop == 0 || slop == 3)
+ && (ap->pflags & ATA_PFLAG_PIO32)) {
if (rw == WRITE)
iowrite32_rep(ap->ioaddr.data_addr, buf, buflen >> 2);
else
@@ -858,27 +861,30 @@ static struct ata_port_operations winbond_port_ops = {
static struct legacy_controller controllers[] = {
{"BIOS", &legacy_port_ops, 0x1F,
- ATA_FLAG_NO_IORDY, NULL },
+ ATA_FLAG_NO_IORDY, 0, NULL },
{"Snooping", &simple_port_ops, 0x1F,
- 0 , NULL },
+ 0, 0, NULL },
{"PDC20230", &pdc20230_port_ops, 0x7,
- ATA_FLAG_NO_IORDY, NULL },
+ ATA_FLAG_NO_IORDY,
+ ATA_PFLAG_PIO32 | ATA_PFLAG_PIO32_CHANGE, NULL },
{"HT6560A", &ht6560a_port_ops, 0x07,
- ATA_FLAG_NO_IORDY, NULL },
+ ATA_FLAG_NO_IORDY, 0, NULL },
{"HT6560B", &ht6560b_port_ops, 0x1F,
- ATA_FLAG_NO_IORDY, NULL },
+ ATA_FLAG_NO_IORDY, 0, NULL },
{"OPTI82C611A", &opti82c611a_port_ops, 0x0F,
- 0 , NULL },
+ 0, 0, NULL },
{"OPTI82C46X", &opti82c46x_port_ops, 0x0F,
- 0 , NULL },
+ 0, 0, NULL },
{"QDI6500", &qdi6500_port_ops, 0x07,
- ATA_FLAG_NO_IORDY, qdi_port },
+ ATA_FLAG_NO_IORDY,
+ ATA_PFLAG_PIO32 | ATA_PFLAG_PIO32_CHANGE, qdi_port },
{"QDI6580", &qdi6580_port_ops, 0x1F,
- 0 , qdi_port },
+ 0, ATA_PFLAG_PIO32 | ATA_PFLAG_PIO32_CHANGE, qdi_port },
{"QDI6580DP", &qdi6580dp_port_ops, 0x1F,
- 0 , qdi_port },
+ 0, ATA_PFLAG_PIO32 | ATA_PFLAG_PIO32_CHANGE, qdi_port },
{"W83759A", &winbond_port_ops, 0x1F,
- 0 , winbond_port }
+ 0, ATA_PFLAG_PIO32 | ATA_PFLAG_PIO32_CHANGE,
+ winbond_port }
};
/**
@@ -1008,6 +1014,7 @@ static __init int legacy_init_one(struct legacy_probe *probe)
ap->ops = ops;
ap->pio_mask = pio_modes;
ap->flags |= ATA_FLAG_SLAVE_POSS | iordy;
+ ap->pflags |= controller->pflags;
ap->ioaddr.cmd_addr = io_addr;
ap->ioaddr.altstatus_addr = ctrl_addr;
ap->ioaddr.ctl_addr = ctrl_addr;
@@ -1032,6 +1039,7 @@ static __init int legacy_init_one(struct legacy_probe *probe)
return 0;
}
}
+ ata_host_detach(host);
fail:
platform_device_unregister(pdev);
return ret;
diff --git a/drivers/ata/pata_ninja32.c b/drivers/ata/pata_ninja32.c
index 0fb6b1b..dd53a66 100644
--- a/drivers/ata/pata_ninja32.c
+++ b/drivers/ata/pata_ninja32.c
@@ -44,7 +44,7 @@
#include <linux/libata.h>
#define DRV_NAME "pata_ninja32"
-#define DRV_VERSION "0.1.3"
+#define DRV_VERSION "0.1.5"
/**
@@ -86,6 +86,7 @@ static struct ata_port_operations ninja32_port_ops = {
.sff_dev_select = ninja32_dev_select,
.cable_detect = ata_cable_40wire,
.set_piomode = ninja32_set_piomode,
+ .sff_data_xfer = ata_sff_data_xfer32
};
static void ninja32_program(void __iomem *base)
@@ -144,6 +145,7 @@ static int ninja32_init_one(struct pci_dev *dev, const struct pci_device_id *id)
ap->ioaddr.altstatus_addr = base + 0x1E;
ap->ioaddr.bmdma_addr = base;
ata_sff_std_ports(&ap->ioaddr);
+ ap->pflags = ATA_PFLAG_PIO32 | ATA_PFLAG_PIO32CHANGE;
ninja32_program(base);
/* FIXME: Should we disable them at remove ? */
diff --git a/include/linux/libata.h b/include/linux/libata.h
index b450a26..3d501db 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -209,6 +209,7 @@ enum {
/* bits 24:31 of ap->flags are reserved for LLD specific flags */
+
/* struct ata_port pflags */
ATA_PFLAG_EH_PENDING = (1 << 0), /* EH pending */
ATA_PFLAG_EH_IN_PROGRESS = (1 << 1), /* EH in progress */
@@ -225,6 +226,9 @@ enum {
ATA_PFLAG_PM_PENDING = (1 << 18), /* PM operation pending */
ATA_PFLAG_INIT_GTM_VALID = (1 << 19), /* initial gtm data valid */
+ ATA_PFLAG_PIO32 = (1 << 20), /* 32bit PIO */
+ ATA_PFLAG_PIO32CHANGE = (1 << 21), /* 32bit PIO can be turned on/off */
+
/* struct ata_queued_cmd flags */
ATA_QCFLAG_ACTIVE = (1 << 0), /* cmd not yet ack'd to scsi lyer */
ATA_QCFLAG_DMAMAP = (1 << 1), /* SG table is DMA mapped */
@@ -689,7 +693,10 @@ struct ata_port {
struct Scsi_Host *scsi_host; /* our co-allocated scsi host */
struct ata_port_operations *ops;
spinlock_t *lock;
+ /* Flags owned by the EH context. Only EH should touch these once the
+ port is active */
unsigned long flags; /* ATA_FLAG_xxx */
+ /* Flags that change dynamically, protected by ap->lock */
unsigned int pflags; /* ATA_PFLAG_xxx */
unsigned int print_id; /* user visible unique port ID */
unsigned int port_no; /* 0 based port no. inside the host */
@@ -1595,6 +1602,7 @@ extern void ata_sff_drain_fifo(struct ata_queued_cmd *qc);
extern void ata_sff_error_handler(struct ata_port *ap);
extern void ata_sff_post_internal_cmd(struct ata_queued_cmd *qc);
extern int ata_sff_port_start(struct ata_port *ap);
+extern int ata_sff_port_start32(struct ata_port *ap);
extern void ata_sff_std_ports(struct ata_ioports *ioaddr);
extern unsigned long ata_bmdma_mode_filter(struct ata_device *dev,
unsigned long xfer_mask);
^ permalink raw reply related [flat|nested] 263+ messages in thread
* [git patches] libata fixes
@ 2009-04-13 9:27 Jeff Garzik
0 siblings, 0 replies; 263+ messages in thread
From: Jeff Garzik @ 2009-04-13 9:27 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide, LKML
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 | 57 ++++++++++++++++++++++++++-------------------
drivers/ata/libata-core.c | 4 +--
drivers/ata/sata_via.c | 2 +-
3 files changed, 35 insertions(+), 28 deletions(-)
Jeff Garzik (1):
[libata] sata_via: kill uninit'd var warning
Tejun Heo (1):
ahci: force CAP_NCQ for earlier NV MCPs
Vegard Nossum (1):
ata: fix obviously wrong comment
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 57be6be..08186ec 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -114,6 +114,7 @@ enum {
board_ahci_sb700 = 5, /* for SB700 and SB800 */
board_ahci_mcp65 = 6,
board_ahci_nopmp = 7,
+ board_ahci_yesncq = 8,
/* global controller registers */
HOST_CAP = 0x00, /* host capabilities */
@@ -469,6 +470,14 @@ static const struct ata_port_info ahci_port_info[] = {
.udma_mask = ATA_UDMA6,
.port_ops = &ahci_ops,
},
+ /* board_ahci_yesncq */
+ {
+ AHCI_HFLAGS (AHCI_HFLAG_YES_NCQ),
+ .flags = AHCI_FLAG_COMMON,
+ .pio_mask = ATA_PIO4,
+ .udma_mask = ATA_UDMA6,
+ .port_ops = &ahci_ops,
+ },
};
static const struct pci_device_id ahci_pci_tbl[] = {
@@ -535,30 +544,30 @@ static const struct pci_device_id ahci_pci_tbl[] = {
{ PCI_VDEVICE(NVIDIA, 0x045d), board_ahci_mcp65 }, /* MCP65 */
{ PCI_VDEVICE(NVIDIA, 0x045e), board_ahci_mcp65 }, /* MCP65 */
{ PCI_VDEVICE(NVIDIA, 0x045f), board_ahci_mcp65 }, /* MCP65 */
- { PCI_VDEVICE(NVIDIA, 0x0550), board_ahci }, /* MCP67 */
- { PCI_VDEVICE(NVIDIA, 0x0551), board_ahci }, /* MCP67 */
- { PCI_VDEVICE(NVIDIA, 0x0552), board_ahci }, /* MCP67 */
- { PCI_VDEVICE(NVIDIA, 0x0553), board_ahci }, /* MCP67 */
- { PCI_VDEVICE(NVIDIA, 0x0554), board_ahci }, /* MCP67 */
- { PCI_VDEVICE(NVIDIA, 0x0555), board_ahci }, /* MCP67 */
- { PCI_VDEVICE(NVIDIA, 0x0556), board_ahci }, /* MCP67 */
- { PCI_VDEVICE(NVIDIA, 0x0557), board_ahci }, /* MCP67 */
- { PCI_VDEVICE(NVIDIA, 0x0558), board_ahci }, /* MCP67 */
- { PCI_VDEVICE(NVIDIA, 0x0559), board_ahci }, /* MCP67 */
- { PCI_VDEVICE(NVIDIA, 0x055a), board_ahci }, /* MCP67 */
- { PCI_VDEVICE(NVIDIA, 0x055b), board_ahci }, /* MCP67 */
- { PCI_VDEVICE(NVIDIA, 0x07f0), board_ahci }, /* MCP73 */
- { PCI_VDEVICE(NVIDIA, 0x07f1), board_ahci }, /* MCP73 */
- { PCI_VDEVICE(NVIDIA, 0x07f2), board_ahci }, /* MCP73 */
- { PCI_VDEVICE(NVIDIA, 0x07f3), board_ahci }, /* MCP73 */
- { PCI_VDEVICE(NVIDIA, 0x07f4), board_ahci }, /* MCP73 */
- { PCI_VDEVICE(NVIDIA, 0x07f5), board_ahci }, /* MCP73 */
- { PCI_VDEVICE(NVIDIA, 0x07f6), board_ahci }, /* MCP73 */
- { PCI_VDEVICE(NVIDIA, 0x07f7), board_ahci }, /* MCP73 */
- { PCI_VDEVICE(NVIDIA, 0x07f8), board_ahci }, /* MCP73 */
- { PCI_VDEVICE(NVIDIA, 0x07f9), board_ahci }, /* MCP73 */
- { PCI_VDEVICE(NVIDIA, 0x07fa), board_ahci }, /* MCP73 */
- { PCI_VDEVICE(NVIDIA, 0x07fb), board_ahci }, /* MCP73 */
+ { PCI_VDEVICE(NVIDIA, 0x0550), board_ahci_yesncq }, /* MCP67 */
+ { PCI_VDEVICE(NVIDIA, 0x0551), board_ahci_yesncq }, /* MCP67 */
+ { PCI_VDEVICE(NVIDIA, 0x0552), board_ahci_yesncq }, /* MCP67 */
+ { PCI_VDEVICE(NVIDIA, 0x0553), board_ahci_yesncq }, /* MCP67 */
+ { PCI_VDEVICE(NVIDIA, 0x0554), board_ahci_yesncq }, /* MCP67 */
+ { PCI_VDEVICE(NVIDIA, 0x0555), board_ahci_yesncq }, /* MCP67 */
+ { PCI_VDEVICE(NVIDIA, 0x0556), board_ahci_yesncq }, /* MCP67 */
+ { PCI_VDEVICE(NVIDIA, 0x0557), board_ahci_yesncq }, /* MCP67 */
+ { PCI_VDEVICE(NVIDIA, 0x0558), board_ahci_yesncq }, /* MCP67 */
+ { PCI_VDEVICE(NVIDIA, 0x0559), board_ahci_yesncq }, /* MCP67 */
+ { PCI_VDEVICE(NVIDIA, 0x055a), board_ahci_yesncq }, /* MCP67 */
+ { PCI_VDEVICE(NVIDIA, 0x055b), board_ahci_yesncq }, /* MCP67 */
+ { PCI_VDEVICE(NVIDIA, 0x07f0), board_ahci_yesncq }, /* MCP73 */
+ { PCI_VDEVICE(NVIDIA, 0x07f1), board_ahci_yesncq }, /* MCP73 */
+ { PCI_VDEVICE(NVIDIA, 0x07f2), board_ahci_yesncq }, /* MCP73 */
+ { PCI_VDEVICE(NVIDIA, 0x07f3), board_ahci_yesncq }, /* MCP73 */
+ { PCI_VDEVICE(NVIDIA, 0x07f4), board_ahci_yesncq }, /* MCP73 */
+ { PCI_VDEVICE(NVIDIA, 0x07f5), board_ahci_yesncq }, /* MCP73 */
+ { PCI_VDEVICE(NVIDIA, 0x07f6), board_ahci_yesncq }, /* MCP73 */
+ { PCI_VDEVICE(NVIDIA, 0x07f7), board_ahci_yesncq }, /* MCP73 */
+ { PCI_VDEVICE(NVIDIA, 0x07f8), board_ahci_yesncq }, /* MCP73 */
+ { PCI_VDEVICE(NVIDIA, 0x07f9), board_ahci_yesncq }, /* MCP73 */
+ { PCI_VDEVICE(NVIDIA, 0x07fa), board_ahci_yesncq }, /* MCP73 */
+ { PCI_VDEVICE(NVIDIA, 0x07fb), board_ahci_yesncq }, /* MCP73 */
{ PCI_VDEVICE(NVIDIA, 0x0ad0), board_ahci }, /* MCP77 */
{ PCI_VDEVICE(NVIDIA, 0x0ad1), board_ahci }, /* MCP77 */
{ PCI_VDEVICE(NVIDIA, 0x0ad2), board_ahci }, /* MCP77 */
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index e7ea77c..065507c 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -6110,13 +6110,11 @@ int ata_host_register(struct ata_host *host, struct scsi_host_template *sht)
ata_port_printk(ap, KERN_INFO, "DUMMY\n");
}
- /* perform each probe synchronously */
- DPRINTK("probe begin\n");
+ /* perform each probe asynchronously */
for (i = 0; i < host->n_ports; i++) {
struct ata_port *ap = host->ports[i];
async_schedule(async_port_probe, ap);
}
- DPRINTK("probe end\n");
return 0;
}
diff --git a/drivers/ata/sata_via.c b/drivers/ata/sata_via.c
index 98e8c50..bdd43c7 100644
--- a/drivers/ata/sata_via.c
+++ b/drivers/ata/sata_via.c
@@ -566,7 +566,7 @@ static int svia_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
static int printed_version;
unsigned int i;
int rc;
- struct ata_host *host;
+ struct ata_host *host = NULL;
int board_id = (int) ent->driver_data;
const unsigned *bar_sizes;
^ permalink raw reply related [flat|nested] 263+ messages in thread
* [git patches] libata fixes
@ 2009-03-13 19:03 Jeff Garzik
0 siblings, 0 replies; 263+ messages in thread
From: Jeff Garzik @ 2009-03-13 19:03 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide, LKML
The ata_piix and sata_mv problems are reasonable isolated,
but the libata core fix is notable...
Failure to maintain the cached version of that register properly
could (and probably did) lead to screaming interrupt situations,
or situations where PIO polling data xfer failed.
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/ata_piix.c | 37 +++++++++++++++++++++++++++++++++++++
drivers/ata/libata-sff.c | 6 +++++-
drivers/ata/sata_mv.c | 3 ++-
3 files changed, 44 insertions(+), 2 deletions(-)
Mark Lord (1):
sata_mv: fix MSI irq race condition
Stuart MENEFY (1):
libata: Keep shadow last_ctl up to date during resets
Tejun Heo (1):
ata_piix: add workaround for Samsung DB-P70
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index 54961c0..ef8b30d 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -1289,6 +1289,39 @@ static const int *__devinit piix_init_sata_map(struct pci_dev *pdev,
return map;
}
+static bool piix_no_sidpr(struct ata_host *host)
+{
+ struct pci_dev *pdev = to_pci_dev(host->dev);
+
+ /*
+ * Samsung DB-P70 only has three ATA ports exposed and
+ * curiously the unconnected first port reports link online
+ * while not responding to SRST protocol causing excessive
+ * detection delay.
+ *
+ * Unfortunately, the system doesn't carry enough DMI
+ * information to identify the machine but does have subsystem
+ * vendor and device set. As it's unclear whether the
+ * subsystem vendor/device is used only for this specific
+ * board, the port can't be disabled solely with the
+ * information; however, turning off SIDPR access works around
+ * the problem. Turn it off.
+ *
+ * This problem is reported in bnc#441240.
+ *
+ * https://bugzilla.novell.com/show_bug.cgi?id=441420
+ */
+ if (pdev->vendor == PCI_VENDOR_ID_INTEL && pdev->device == 0x2920 &&
+ pdev->subsystem_vendor == PCI_VENDOR_ID_SAMSUNG &&
+ pdev->subsystem_device == 0xb049) {
+ dev_printk(KERN_WARNING, host->dev,
+ "Samsung DB-P70 detected, disabling SIDPR\n");
+ return true;
+ }
+
+ return false;
+}
+
static int __devinit piix_init_sidpr(struct ata_host *host)
{
struct pci_dev *pdev = to_pci_dev(host->dev);
@@ -1302,6 +1335,10 @@ static int __devinit piix_init_sidpr(struct ata_host *host)
if (hpriv->map[i] == IDE)
return 0;
+ /* is it blacklisted? */
+ if (piix_no_sidpr(host))
+ return 0;
+
if (!(host->ports[0]->flags & PIIX_FLAG_SIDPR))
return 0;
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
index 714cb04..f93dc02 100644
--- a/drivers/ata/libata-sff.c
+++ b/drivers/ata/libata-sff.c
@@ -2066,6 +2066,7 @@ static int ata_bus_softreset(struct ata_port *ap, unsigned int devmask,
iowrite8(ap->ctl | ATA_SRST, ioaddr->ctl_addr);
udelay(20); /* FIXME: flush */
iowrite8(ap->ctl, ioaddr->ctl_addr);
+ ap->last_ctl = ap->ctl;
/* wait the port to become ready */
return ata_sff_wait_after_reset(&ap->link, devmask, deadline);
@@ -2190,8 +2191,10 @@ void ata_sff_postreset(struct ata_link *link, unsigned int *classes)
}
/* set up device control */
- if (ap->ioaddr.ctl_addr)
+ if (ap->ioaddr.ctl_addr) {
iowrite8(ap->ctl, ap->ioaddr.ctl_addr);
+ ap->last_ctl = ap->ctl;
+ }
}
EXPORT_SYMBOL_GPL(ata_sff_postreset);
@@ -2534,6 +2537,7 @@ void ata_bus_reset(struct ata_port *ap)
if (ap->flags & (ATA_FLAG_SATA_RESET | ATA_FLAG_SRST)) {
/* set up device control for ATA_FLAG_SATA_RESET */
iowrite8(ap->ctl, ioaddr->ctl_addr);
+ ap->last_ctl = ap->ctl;
}
DPRINTK("EXIT\n");
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index 7007edd..74b1080 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -2218,12 +2218,13 @@ static irqreturn_t mv_interrupt(int irq, void *dev_instance)
else
handled = mv_host_intr(host, pending_irqs);
}
- spin_unlock(&host->lock);
/* for MSI: unmask; interrupt cause bits will retrigger now */
if (using_msi)
writel(hpriv->main_irq_mask, hpriv->main_irq_mask_addr);
+ spin_unlock(&host->lock);
+
return IRQ_RETVAL(handled);
}
^ permalink raw reply related [flat|nested] 263+ messages in thread
* [git patches] libata fixes
@ 2009-03-05 12:34 Jeff Garzik
0 siblings, 0 replies; 263+ messages in thread
From: Jeff Garzik @ 2009-03-05 12:34 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide, LKML
Various fixes, nothing major, and some NVIDIA PCI ID maintenance in ahci.
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 | 24 ++++++++++++------------
drivers/ata/libata-core.c | 14 ++++++++------
drivers/ata/libata-eh.c | 7 +++++--
drivers/ata/sata_nv.c | 2 +-
include/linux/libata.h | 6 ++++--
5 files changed, 30 insertions(+), 23 deletions(-)
Brandon Ehle (1):
sata_nv: fix module parameter description
FUJITA Tomonori (1):
libata: fix dma_unmap_sg misuse
Robert Hancock (1):
libata: Don't trust current capacity values in identify words 57-58
Stuart Hayes (1):
libata: change drive ready wait after hard reset to 5s
Tejun Heo (3):
libata: align ap->sector_buf
libata: don't use on-stack sense buffer
libata: make sure port is thawed when skipping resets
peerchen (1):
ahci: Add the Device IDs for MCP89 and remove IDs of MCP7B to/from ahci.c
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index a603bbf..66e012c 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -582,18 +582,18 @@ static const struct pci_device_id ahci_pci_tbl[] = {
{ PCI_VDEVICE(NVIDIA, 0x0abd), board_ahci }, /* MCP79 */
{ PCI_VDEVICE(NVIDIA, 0x0abe), board_ahci }, /* MCP79 */
{ PCI_VDEVICE(NVIDIA, 0x0abf), board_ahci }, /* MCP79 */
- { PCI_VDEVICE(NVIDIA, 0x0bc8), board_ahci }, /* MCP7B */
- { PCI_VDEVICE(NVIDIA, 0x0bc9), board_ahci }, /* MCP7B */
- { PCI_VDEVICE(NVIDIA, 0x0bca), board_ahci }, /* MCP7B */
- { PCI_VDEVICE(NVIDIA, 0x0bcb), board_ahci }, /* MCP7B */
- { PCI_VDEVICE(NVIDIA, 0x0bcc), board_ahci }, /* MCP7B */
- { PCI_VDEVICE(NVIDIA, 0x0bcd), board_ahci }, /* MCP7B */
- { PCI_VDEVICE(NVIDIA, 0x0bce), board_ahci }, /* MCP7B */
- { PCI_VDEVICE(NVIDIA, 0x0bcf), board_ahci }, /* MCP7B */
- { PCI_VDEVICE(NVIDIA, 0x0bc4), board_ahci }, /* MCP7B */
- { PCI_VDEVICE(NVIDIA, 0x0bc5), board_ahci }, /* MCP7B */
- { PCI_VDEVICE(NVIDIA, 0x0bc6), board_ahci }, /* MCP7B */
- { PCI_VDEVICE(NVIDIA, 0x0bc7), board_ahci }, /* MCP7B */
+ { PCI_VDEVICE(NVIDIA, 0x0d84), board_ahci }, /* MCP89 */
+ { PCI_VDEVICE(NVIDIA, 0x0d85), board_ahci }, /* MCP89 */
+ { PCI_VDEVICE(NVIDIA, 0x0d86), board_ahci }, /* MCP89 */
+ { PCI_VDEVICE(NVIDIA, 0x0d87), board_ahci }, /* MCP89 */
+ { PCI_VDEVICE(NVIDIA, 0x0d88), board_ahci }, /* MCP89 */
+ { PCI_VDEVICE(NVIDIA, 0x0d89), board_ahci }, /* MCP89 */
+ { PCI_VDEVICE(NVIDIA, 0x0d8a), board_ahci }, /* MCP89 */
+ { PCI_VDEVICE(NVIDIA, 0x0d8b), board_ahci }, /* MCP89 */
+ { PCI_VDEVICE(NVIDIA, 0x0d8c), board_ahci }, /* MCP89 */
+ { PCI_VDEVICE(NVIDIA, 0x0d8d), board_ahci }, /* MCP89 */
+ { PCI_VDEVICE(NVIDIA, 0x0d8e), board_ahci }, /* MCP89 */
+ { PCI_VDEVICE(NVIDIA, 0x0d8f), board_ahci }, /* MCP89 */
/* SiS */
{ PCI_VDEVICE(SI, 0x1184), board_ahci }, /* SiS 966 */
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 9fbf059..060bcd6 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -1322,14 +1322,16 @@ static u64 ata_id_n_sectors(const u16 *id)
{
if (ata_id_has_lba(id)) {
if (ata_id_has_lba48(id))
- return ata_id_u64(id, 100);
+ return ata_id_u64(id, ATA_ID_LBA_CAPACITY_2);
else
- return ata_id_u32(id, 60);
+ return ata_id_u32(id, ATA_ID_LBA_CAPACITY);
} else {
if (ata_id_current_chs_valid(id))
- return ata_id_u32(id, 57);
+ return id[ATA_ID_CUR_CYLS] * id[ATA_ID_CUR_HEADS] *
+ id[ATA_ID_CUR_SECTORS];
else
- return id[1] * id[3] * id[6];
+ return id[ATA_ID_CYLS] * id[ATA_ID_HEADS] *
+ id[ATA_ID_SECTORS];
}
}
@@ -4612,7 +4614,7 @@ void ata_sg_clean(struct ata_queued_cmd *qc)
VPRINTK("unmapping %u sg elements\n", qc->n_elem);
if (qc->n_elem)
- dma_unmap_sg(ap->dev, sg, qc->n_elem, dir);
+ dma_unmap_sg(ap->dev, sg, qc->orig_n_elem, dir);
qc->flags &= ~ATA_QCFLAG_DMAMAP;
qc->sg = NULL;
@@ -4727,7 +4729,7 @@ static int ata_sg_setup(struct ata_queued_cmd *qc)
return -1;
DPRINTK("%d sg elements mapped\n", n_elem);
-
+ qc->orig_n_elem = qc->n_elem;
qc->n_elem = n_elem;
qc->flags |= ATA_QCFLAG_DMAMAP;
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index ce2ef04..ea89091 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -2423,11 +2423,14 @@ int ata_eh_reset(struct ata_link *link, int classify,
}
/* prereset() might have cleared ATA_EH_RESET. If so,
- * bang classes and return.
+ * bang classes, thaw and return.
*/
if (reset && !(ehc->i.action & ATA_EH_RESET)) {
ata_for_each_dev(dev, link, ALL)
classes[dev->devno] = ATA_DEV_NONE;
+ if ((ap->pflags & ATA_PFLAG_FROZEN) &&
+ ata_is_host_link(link))
+ ata_eh_thaw_port(ap);
rc = 0;
goto out;
}
@@ -2901,7 +2904,7 @@ static int atapi_eh_clear_ua(struct ata_device *dev)
int i;
for (i = 0; i < ATA_EH_UA_TRIES; i++) {
- u8 sense_buffer[SCSI_SENSE_BUFFERSIZE];
+ u8 *sense_buffer = dev->link->ap->sector_buf;
u8 sense_key = 0;
unsigned int err_mask;
diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c
index 55a8eed..f65b537 100644
--- a/drivers/ata/sata_nv.c
+++ b/drivers/ata/sata_nv.c
@@ -2523,7 +2523,7 @@ static void __exit nv_exit(void)
module_init(nv_init);
module_exit(nv_exit);
module_param_named(adma, adma_enabled, bool, 0444);
-MODULE_PARM_DESC(adma, "Enable use of ADMA (Default: true)");
+MODULE_PARM_DESC(adma, "Enable use of ADMA (Default: false)");
module_param_named(swncq, swncq_enabled, bool, 0444);
MODULE_PARM_DESC(swncq, "Enable use of SWNCQ (Default: true)");
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 5d87bc0..dc18b87 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -275,7 +275,7 @@ enum {
* advised to wait only for the following duration before
* doing SRST.
*/
- ATA_TMOUT_PMP_SRST_WAIT = 1000,
+ ATA_TMOUT_PMP_SRST_WAIT = 5000,
/* ATA bus states */
BUS_UNKNOWN = 0,
@@ -530,6 +530,7 @@ struct ata_queued_cmd {
unsigned long flags; /* ATA_QCFLAG_xxx */
unsigned int tag;
unsigned int n_elem;
+ unsigned int orig_n_elem;
int dma_dir;
@@ -750,7 +751,8 @@ struct ata_port {
acpi_handle acpi_handle;
struct ata_acpi_gtm __acpi_init_gtm; /* use ata_acpi_init_gtm() */
#endif
- u8 sector_buf[ATA_SECT_SIZE]; /* owned by EH */
+ /* owned by EH */
+ u8 sector_buf[ATA_SECT_SIZE] ____cacheline_aligned;
};
/* The following initializer overrides a method to NULL whether one of
^ permalink raw reply related [flat|nested] 263+ messages in thread
* [git patches] libata fixes
@ 2009-02-25 20:36 Jeff Garzik
0 siblings, 0 replies; 263+ messages in thread
From: Jeff Garzik @ 2009-02-25 20:36 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide, LKML
Notable notes: Alan's two fixes haven't seen much testing, but they
really need to go in to work correctly with the 32bit PIO support
introduced in this release.
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/pata_amd.c | 76 +++++++++++++++++++++++++++++++++++----------
drivers/ata/pata_it821x.c | 3 ++
drivers/ata/pata_legacy.c | 7 ++--
drivers/ata/sata_mv.c | 20 +++++------
4 files changed, 75 insertions(+), 31 deletions(-)
Alan Cox (2):
[libata] pata_amd: program FIFO
[libata] pata_legacy: for VLB 32bit PIO don't try tricks with slop
Mark Lord (1):
sata_mv: fix SoC interrupt breakage
Ondrej Zary (1):
pata_it821x: resume from hibernation fails with RAID volume
diff --git a/drivers/ata/pata_amd.c b/drivers/ata/pata_amd.c
index 63719ab..115b1cd 100644
--- a/drivers/ata/pata_amd.c
+++ b/drivers/ata/pata_amd.c
@@ -24,7 +24,7 @@
#include <linux/libata.h>
#define DRV_NAME "pata_amd"
-#define DRV_VERSION "0.3.11"
+#define DRV_VERSION "0.4.1"
/**
* timing_setup - shared timing computation and load
@@ -145,6 +145,13 @@ static int amd_pre_reset(struct ata_link *link, unsigned long deadline)
return ata_sff_prereset(link, deadline);
}
+/**
+ * amd_cable_detect - report cable type
+ * @ap: port
+ *
+ * AMD controller/BIOS setups record the cable type in word 0x42
+ */
+
static int amd_cable_detect(struct ata_port *ap)
{
static const u32 bitmask[2] = {0x03, 0x0C};
@@ -158,6 +165,40 @@ static int amd_cable_detect(struct ata_port *ap)
}
/**
+ * amd_fifo_setup - set the PIO FIFO for ATA/ATAPI
+ * @ap: ATA interface
+ * @adev: ATA device
+ *
+ * Set the PCI fifo for this device according to the devices present
+ * on the bus at this point in time. We need to turn the post write buffer
+ * off for ATAPI devices as we may need to issue a word sized write to the
+ * device as the final I/O
+ */
+
+static void amd_fifo_setup(struct ata_port *ap)
+{
+ struct ata_device *adev;
+ struct pci_dev *pdev = to_pci_dev(ap->host->dev);
+ static const u8 fifobit[2] = { 0xC0, 0x30};
+ u8 fifo = fifobit[ap->port_no];
+ u8 r;
+
+
+ ata_for_each_dev(adev, &ap->link, ENABLED) {
+ if (adev->class == ATA_DEV_ATAPI)
+ fifo = 0;
+ }
+ if (pdev->device == PCI_DEVICE_ID_AMD_VIPER_7411) /* FIFO is broken */
+ fifo = 0;
+
+ /* On the later chips the read prefetch bits become no-op bits */
+ pci_read_config_byte(pdev, 0x41, &r);
+ r &= ~fifobit[ap->port_no];
+ r |= fifo;
+ pci_write_config_byte(pdev, 0x41, r);
+}
+
+/**
* amd33_set_piomode - set initial PIO mode data
* @ap: ATA interface
* @adev: ATA device
@@ -167,21 +208,25 @@ static int amd_cable_detect(struct ata_port *ap)
static void amd33_set_piomode(struct ata_port *ap, struct ata_device *adev)
{
+ amd_fifo_setup(ap);
timing_setup(ap, adev, 0x40, adev->pio_mode, 1);
}
static void amd66_set_piomode(struct ata_port *ap, struct ata_device *adev)
{
+ amd_fifo_setup(ap);
timing_setup(ap, adev, 0x40, adev->pio_mode, 2);
}
static void amd100_set_piomode(struct ata_port *ap, struct ata_device *adev)
{
+ amd_fifo_setup(ap);
timing_setup(ap, adev, 0x40, adev->pio_mode, 3);
}
static void amd133_set_piomode(struct ata_port *ap, struct ata_device *adev)
{
+ amd_fifo_setup(ap);
timing_setup(ap, adev, 0x40, adev->pio_mode, 4);
}
@@ -397,6 +442,16 @@ static struct ata_port_operations nv133_port_ops = {
.set_dmamode = nv133_set_dmamode,
};
+static void amd_clear_fifo(struct pci_dev *pdev)
+{
+ u8 fifo;
+ /* Disable the FIFO, the FIFO logic will re-enable it as
+ appropriate */
+ pci_read_config_byte(pdev, 0x41, &fifo);
+ fifo &= 0x0F;
+ pci_write_config_byte(pdev, 0x41, fifo);
+}
+
static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
{
static const struct ata_port_info info[10] = {
@@ -503,14 +558,8 @@ static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
if (type < 3)
ata_pci_bmdma_clear_simplex(pdev);
-
- /* Check for AMD7411 */
- if (type == 3)
- /* FIFO is broken */
- pci_write_config_byte(pdev, 0x41, fifo & 0x0F);
- else
- pci_write_config_byte(pdev, 0x41, fifo | 0xF0);
-
+ if (pdev->vendor == PCI_VENDOR_ID_AMD)
+ amd_clear_fifo(pdev);
/* Cable detection on Nvidia chips doesn't work too well,
* cache BIOS programmed UDMA mode.
*/
@@ -536,18 +585,11 @@ static int amd_reinit_one(struct pci_dev *pdev)
return rc;
if (pdev->vendor == PCI_VENDOR_ID_AMD) {
- u8 fifo;
- pci_read_config_byte(pdev, 0x41, &fifo);
- if (pdev->device == PCI_DEVICE_ID_AMD_VIPER_7411)
- /* FIFO is broken */
- pci_write_config_byte(pdev, 0x41, fifo & 0x0F);
- else
- pci_write_config_byte(pdev, 0x41, fifo | 0xF0);
+ amd_clear_fifo(pdev);
if (pdev->device == PCI_DEVICE_ID_AMD_VIPER_7409 ||
pdev->device == PCI_DEVICE_ID_AMD_COBRA_7401)
ata_pci_bmdma_clear_simplex(pdev);
}
-
ata_host_resume(host);
return 0;
}
diff --git a/drivers/ata/pata_it821x.c b/drivers/ata/pata_it821x.c
index f1bb2f9..b05b86a 100644
--- a/drivers/ata/pata_it821x.c
+++ b/drivers/ata/pata_it821x.c
@@ -557,6 +557,9 @@ static unsigned int it821x_read_id(struct ata_device *adev,
id[83] |= 0x4400; /* Word 83 is valid and LBA48 */
id[86] |= 0x0400; /* LBA48 on */
id[ATA_ID_MAJOR_VER] |= 0x1F;
+ /* Clear the serial number because it's different each boot
+ which breaks validation on resume */
+ memset(&id[ATA_ID_SERNO], 0x20, ATA_ID_SERNO_LEN);
}
return err_mask;
}
diff --git a/drivers/ata/pata_legacy.c b/drivers/ata/pata_legacy.c
index 6c1d778..e3bc1b4 100644
--- a/drivers/ata/pata_legacy.c
+++ b/drivers/ata/pata_legacy.c
@@ -283,9 +283,10 @@ static void pdc20230_set_piomode(struct ata_port *ap, struct ata_device *adev)
static unsigned int pdc_data_xfer_vlb(struct ata_device *dev,
unsigned char *buf, unsigned int buflen, int rw)
{
- if (ata_id_has_dword_io(dev->id)) {
+ int slop = buflen & 3;
+ /* 32bit I/O capable *and* we need to write a whole number of dwords */
+ if (ata_id_has_dword_io(dev->id) && (slop == 0 || slop == 3)) {
struct ata_port *ap = dev->link->ap;
- int slop = buflen & 3;
unsigned long flags;
local_irq_save(flags);
@@ -735,7 +736,7 @@ static unsigned int vlb32_data_xfer(struct ata_device *adev, unsigned char *buf,
struct ata_port *ap = adev->link->ap;
int slop = buflen & 3;
- if (ata_id_has_dword_io(adev->id)) {
+ if (ata_id_has_dword_io(adev->id) && (slop == 0 || slop == 3)) {
if (rw == WRITE)
iowrite32_rep(ap->ioaddr.data_addr, buf, buflen >> 2);
else
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index 4ae1a41..7007edd 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -3114,19 +3114,17 @@ static int mv_init_host(struct ata_host *host, unsigned int board_idx)
writelfl(0, hc_mmio + HC_IRQ_CAUSE_OFS);
}
- if (!IS_SOC(hpriv)) {
- /* Clear any currently outstanding host interrupt conditions */
- writelfl(0, mmio + hpriv->irq_cause_ofs);
+ /* Clear any currently outstanding host interrupt conditions */
+ writelfl(0, mmio + hpriv->irq_cause_ofs);
- /* and unmask interrupt generation for host regs */
- writelfl(hpriv->unmask_all_irqs, mmio + hpriv->irq_mask_ofs);
+ /* and unmask interrupt generation for host regs */
+ writelfl(hpriv->unmask_all_irqs, mmio + hpriv->irq_mask_ofs);
- /*
- * enable only global host interrupts for now.
- * The per-port interrupts get done later as ports are set up.
- */
- mv_set_main_irq_mask(host, 0, PCI_ERR);
- }
+ /*
+ * enable only global host interrupts for now.
+ * The per-port interrupts get done later as ports are set up.
+ */
+ mv_set_main_irq_mask(host, 0, PCI_ERR);
done:
return rc;
}
^ permalink raw reply related [flat|nested] 263+ messages in thread
* [git patches] libata fixes
@ 2009-02-17 21:25 Jeff Garzik
0 siblings, 0 replies; 263+ messages in thread
From: Jeff Garzik @ 2009-02-17 21:25 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide, LKML
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/libata-sff.c | 28 +++++++++++++++++++++-------
drivers/ata/sata_nv.c | 14 ++++++++------
2 files changed, 29 insertions(+), 13 deletions(-)
Sergei Shtylyov (1):
libata-sff: fix 32-bit PIO ATAPI regression
Tejun Heo (1):
sata_nv: give up hardreset on nf2
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
index 0b299b0..714cb04 100644
--- a/drivers/ata/libata-sff.c
+++ b/drivers/ata/libata-sff.c
@@ -773,18 +773,32 @@ unsigned int ata_sff_data_xfer32(struct ata_device *dev, unsigned char *buf,
else
iowrite32_rep(data_addr, buf, words);
+ /* Transfer trailing bytes, if any */
if (unlikely(slop)) {
- __le32 pad;
+ unsigned char pad[4];
+
+ /* Point buf to the tail of buffer */
+ buf += buflen - slop;
+
+ /*
+ * Use io*_rep() accessors here as well to avoid pointlessly
+ * swapping bytes to and fro on the big endian machines...
+ */
if (rw == READ) {
- pad = cpu_to_le32(ioread32(ap->ioaddr.data_addr));
- memcpy(buf + buflen - slop, &pad, slop);
+ if (slop < 3)
+ ioread16_rep(data_addr, pad, 1);
+ else
+ ioread32_rep(data_addr, pad, 1);
+ memcpy(buf, pad, slop);
} else {
- memcpy(&pad, buf + buflen - slop, slop);
- iowrite32(le32_to_cpu(pad), ap->ioaddr.data_addr);
+ memcpy(pad, buf, slop);
+ if (slop < 3)
+ iowrite16_rep(data_addr, pad, 1);
+ else
+ iowrite32_rep(data_addr, pad, 1);
}
- words++;
}
- return words << 2;
+ return (buflen + 1) & ~1;
}
EXPORT_SYMBOL_GPL(ata_sff_data_xfer32);
diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c
index 444af04..55a8eed 100644
--- a/drivers/ata/sata_nv.c
+++ b/drivers/ata/sata_nv.c
@@ -421,19 +421,21 @@ static struct ata_port_operations nv_generic_ops = {
.hardreset = ATA_OP_NULL,
};
-/* OSDL bz3352 reports that nf2/3 controllers can't determine device
- * signature reliably. Also, the following thread reports detection
- * failure on cold boot with the standard debouncing timing.
+/* nf2 is ripe with hardreset related problems.
+ *
+ * kernel bz#3352 reports nf2/3 controllers can't determine device
+ * signature reliably. The following thread reports detection failure
+ * on cold boot with the standard debouncing timing.
*
* http://thread.gmane.org/gmane.linux.ide/34098
*
- * Debounce with hotplug timing and request follow-up SRST.
+ * And bz#12176 reports that hardreset simply doesn't work on nf2.
+ * Give up on it and just don't do hardreset.
*/
static struct ata_port_operations nv_nf2_ops = {
- .inherits = &nv_common_ops,
+ .inherits = &nv_generic_ops,
.freeze = nv_nf2_freeze,
.thaw = nv_nf2_thaw,
- .hardreset = nv_noclassify_hardreset,
};
/* For initial probing after boot and hot plugging, hardreset mostly
^ permalink raw reply related [flat|nested] 263+ messages in thread
* Re: [git patches] libata fixes
2009-01-27 19:02 ` Linus Torvalds
@ 2009-01-27 23:04 ` Tejun Heo
0 siblings, 0 replies; 263+ messages in thread
From: Tejun Heo @ 2009-01-27 23:04 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Jeff Garzik, Andrew Morton, linux-ide, LKML
Hello, Linus, Jeff.
Linus Torvalds wrote:
>
> On Tue, 27 Jan 2009, Jeff Garzik wrote:
>> I also habitually _avoid_ "git commit -a", so I am surprised that I actually
>> made this mistake. I am 100% certain that I issued neither "git rm" nor "git
>> update-index" commands on that file.
>>
>> Granted, I should have been more careful, but I am also surprised this
>> happened at all.
>
> Well, it's attributed to Tejun, and he probably sent you a "git diff". The
> delete part of such a diff is pretty small, so you both probably missed
> it at the top of the diff:
>
> diff --git a/arch/arm/mach-integrator/clock.h b/arch/arm/mach-integrator/clock.h
> deleted file mode 100644
> index e69de29..0000000
>
> and then you used "git am -s" or something to apply it and delete that
> file.
>
> No "git commit -a" necessary - just a simple "git diff" after having done
> a "make distclean" and then sending the result off by email without
> looking any closer..
Yes, that patch was generated with "git diff" and distclean was done
cuz I just began to use separate output directories for build. I've
restored the empty file for several times for other patches but it
slipped this time. My apologies. I'll be more careful.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 263+ messages in thread
* Re: [git patches] libata fixes
2009-01-27 18:37 ` Jeff Garzik
@ 2009-01-27 19:02 ` Linus Torvalds
2009-01-27 23:04 ` Tejun Heo
0 siblings, 1 reply; 263+ messages in thread
From: Linus Torvalds @ 2009-01-27 19:02 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Tejun Heo, Andrew Morton, linux-ide, LKML
On Tue, 27 Jan 2009, Jeff Garzik wrote:
>
> I also habitually _avoid_ "git commit -a", so I am surprised that I actually
> made this mistake. I am 100% certain that I issued neither "git rm" nor "git
> update-index" commands on that file.
>
> Granted, I should have been more careful, but I am also surprised this
> happened at all.
Well, it's attributed to Tejun, and he probably sent you a "git diff". The
delete part of such a diff is pretty small, so you both probably missed
it at the top of the diff:
diff --git a/arch/arm/mach-integrator/clock.h b/arch/arm/mach-integrator/clock.h
deleted file mode 100644
index e69de29..0000000
and then you used "git am -s" or something to apply it and delete that
file.
No "git commit -a" necessary - just a simple "git diff" after having done
a "make distclean" and then sending the result off by email without
looking any closer..
Linus
^ permalink raw reply [flat|nested] 263+ messages in thread
* Re: [git patches] libata fixes
2009-01-27 15:50 ` Linus Torvalds
@ 2009-01-27 18:37 ` Jeff Garzik
2009-01-27 19:02 ` Linus Torvalds
0 siblings, 1 reply; 263+ messages in thread
From: Jeff Garzik @ 2009-01-27 18:37 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Tejun Heo, Andrew Morton, linux-ide, LKML
Linus Torvalds wrote:
>
> On Tue, 27 Jan 2009, Jeff Garzik wrote:
>> 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/Kconfig | 6 ++--
>> drivers/ata/libata-sff.c | 12 ++++++-
>> drivers/ata/pata_rb532_cf.c | 2 -
>> drivers/ata/pata_via.c | 22 +++++++++---
>> drivers/ata/sata_mv.c | 56 ++++++++++++++----------------
>> drivers/ata/sata_nv.c | 70 +++++++++++++++++++++++--------------
>> include/linux/pci_ids.h | 4 ++
>> 7 files changed, 104 insertions(+), 68 deletions(-)
>> delete mode 100644 arch/arm/mach-integrator/clock.h
>
> Hmm. That delete of the empty file is "correct" (and probably came as a
> result of somebody doing "make distclean" which deletes empty files), but
> should not have been committed as part of "libata-sff: fix incorrect EH
> message".
>
> Seems to be a mistake, and a small one, but still.. Be more careful.
Er, oops. Sorry about that. Yeah, I habitually do 'make distclean' as
part of my kclean and kbuild standard workflow scripts.
I also habitually _avoid_ "git commit -a", so I am surprised that I
actually made this mistake. I am 100% certain that I issued neither
"git rm" nor "git update-index" commands on that file.
Granted, I should have been more careful, but I am also surprised this
happened at all.
Jeff
^ permalink raw reply [flat|nested] 263+ messages in thread
* Re: [git patches] libata fixes
2009-01-27 7:30 Jeff Garzik
@ 2009-01-27 15:50 ` Linus Torvalds
2009-01-27 18:37 ` Jeff Garzik
0 siblings, 1 reply; 263+ messages in thread
From: Linus Torvalds @ 2009-01-27 15:50 UTC (permalink / raw)
To: Jeff Garzik, Tejun Heo; +Cc: Andrew Morton, linux-ide, LKML
On Tue, 27 Jan 2009, Jeff Garzik wrote:
>
> 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/Kconfig | 6 ++--
> drivers/ata/libata-sff.c | 12 ++++++-
> drivers/ata/pata_rb532_cf.c | 2 -
> drivers/ata/pata_via.c | 22 +++++++++---
> drivers/ata/sata_mv.c | 56 ++++++++++++++----------------
> drivers/ata/sata_nv.c | 70 +++++++++++++++++++++++--------------
> include/linux/pci_ids.h | 4 ++
> 7 files changed, 104 insertions(+), 68 deletions(-)
> delete mode 100644 arch/arm/mach-integrator/clock.h
Hmm. That delete of the empty file is "correct" (and probably came as a
result of somebody doing "make distclean" which deletes empty files), but
should not have been committed as part of "libata-sff: fix incorrect EH
message".
Seems to be a mistake, and a small one, but still.. Be more careful.
Linus
^ permalink raw reply [flat|nested] 263+ messages in thread
* [git patches] libata fixes
@ 2009-01-27 7:30 Jeff Garzik
2009-01-27 15:50 ` Linus Torvalds
0 siblings, 1 reply; 263+ messages in thread
From: Jeff Garzik @ 2009-01-27 7:30 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide, LKML
The sata_mv 8-port fix was for a longstanding and ugly bug, for those
who owned 8-port cards (4-port cards unaffected).
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/Kconfig | 6 ++--
drivers/ata/libata-sff.c | 12 ++++++-
drivers/ata/pata_rb532_cf.c | 2 -
drivers/ata/pata_via.c | 22 +++++++++---
drivers/ata/sata_mv.c | 56 ++++++++++++++----------------
drivers/ata/sata_nv.c | 70 +++++++++++++++++++++++--------------
include/linux/pci_ids.h | 4 ++
7 files changed, 104 insertions(+), 68 deletions(-)
delete mode 100644 arch/arm/mach-integrator/clock.h
JosephChan@via.com.tw (1):
[libata] pata_via: support VX855, future chips whose IDE controller use 0x0571
Mark Lord (5):
sata_mv: fix 8-port timeouts on 508x/6081 chips
sata_mv: don't read hc_irq_cause
sata_mv: remove bogus nsect restriction
sata_mv: msi masking fix (v2)
sata_mv: no longer experimental (v2)
Phil Sutter (1):
pata-rb532-cf: remove set_irq_type from finish_io
Tejun Heo (4):
libata-sff: fix incorrect EH message
libata: set NODEV_HINT for 0x7f status
sata_nv: rename nv_nf2_hardreset()
sata_nv: fix MCP5x reset
Thomas Reitmayr (1):
sata_mv: Properly initialize main irq mask
diff --git a/arch/arm/mach-integrator/clock.h b/arch/arm/mach-integrator/clock.h
deleted file mode 100644
index e69de29..0000000
diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
index 503a908..0bcf264 100644
--- a/drivers/ata/Kconfig
+++ b/drivers/ata/Kconfig
@@ -112,11 +112,11 @@ config ATA_PIIX
If unsure, say N.
config SATA_MV
- tristate "Marvell SATA support (HIGHLY EXPERIMENTAL)"
- depends on EXPERIMENTAL
+ tristate "Marvell SATA support"
help
This option enables support for the Marvell Serial ATA family.
- Currently supports 88SX[56]0[48][01] chips.
+ Currently supports 88SX[56]0[48][01] PCI(-X) chips,
+ as well as the newer [67]042 PCI-X/PCIe and SOC devices.
If unsure, say N.
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
index 5a4aad1..0b299b0 100644
--- a/drivers/ata/libata-sff.c
+++ b/drivers/ata/libata-sff.c
@@ -1322,7 +1322,7 @@ fsm_start:
* condition. Mark hint.
*/
ata_ehi_push_desc(ehi, "ST-ATA: "
- "DRQ=1 with device error, "
+ "DRQ=0 without device error, "
"dev_stat 0x%X", status);
qc->err_mask |= AC_ERR_HSM |
AC_ERR_NODEV_HINT;
@@ -1358,6 +1358,16 @@ fsm_start:
qc->err_mask |= AC_ERR_HSM;
}
+ /* There are oddball controllers with
+ * status register stuck at 0x7f and
+ * lbal/m/h at zero which makes it
+ * pass all other presence detection
+ * mechanisms we have. Set NODEV_HINT
+ * for it. Kernel bz#7241.
+ */
+ if (status == 0x7f)
+ qc->err_mask |= AC_ERR_NODEV_HINT;
+
/* ata_pio_sectors() might change the
* state to HSM_ST_LAST. so, the state
* is changed after ata_pio_sectors().
diff --git a/drivers/ata/pata_rb532_cf.c b/drivers/ata/pata_rb532_cf.c
index c2e6fb9..ebfcda2 100644
--- a/drivers/ata/pata_rb532_cf.c
+++ b/drivers/ata/pata_rb532_cf.c
@@ -63,8 +63,6 @@ static inline void rb532_pata_finish_io(struct ata_port *ap)
ata_sff_sync might be sufficient. */
ata_sff_dma_pause(ap);
ndelay(RB500_CF_IO_DELAY);
-
- set_irq_type(info->irq, IRQ_TYPE_LEVEL_HIGH);
}
static void rb532_pata_exec_command(struct ata_port *ap,
diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c
index 681169c..79a6c9a 100644
--- a/drivers/ata/pata_via.c
+++ b/drivers/ata/pata_via.c
@@ -86,6 +86,10 @@ enum {
VIA_SATA_PATA = 0x800, /* SATA/PATA combined configuration */
};
+enum {
+ VIA_IDFLAG_SINGLE = (1 << 0), /* single channel controller) */
+};
+
/*
* VIA SouthBridge chips.
*/
@@ -97,8 +101,12 @@ static const struct via_isa_bridge {
u8 rev_max;
u16 flags;
} via_isa_bridges[] = {
+ { "vx855", PCI_DEVICE_ID_VIA_VX855, 0x00, 0x2f,
+ VIA_UDMA_133 | VIA_BAD_AST | VIA_SATA_PATA },
{ "vx800", PCI_DEVICE_ID_VIA_VX800, 0x00, 0x2f, VIA_UDMA_133 |
VIA_BAD_AST | VIA_SATA_PATA },
+ { "vt8261", PCI_DEVICE_ID_VIA_8261, 0x00, 0x2f,
+ VIA_UDMA_133 | VIA_BAD_AST },
{ "vt8237s", PCI_DEVICE_ID_VIA_8237S, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
{ "vt8251", PCI_DEVICE_ID_VIA_8251, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
{ "cx700", PCI_DEVICE_ID_VIA_CX700, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST | VIA_SATA_PATA },
@@ -122,6 +130,8 @@ static const struct via_isa_bridge {
{ "vt82c586", PCI_DEVICE_ID_VIA_82C586_0, 0x00, 0x0f, VIA_UDMA_NONE | VIA_SET_FIFO },
{ "vt82c576", PCI_DEVICE_ID_VIA_82C576, 0x00, 0x2f, VIA_UDMA_NONE | VIA_SET_FIFO | VIA_NO_UNMASK },
{ "vt82c576", PCI_DEVICE_ID_VIA_82C576, 0x00, 0x2f, VIA_UDMA_NONE | VIA_SET_FIFO | VIA_NO_UNMASK | VIA_BAD_ID },
+ { "vtxxxx", PCI_DEVICE_ID_VIA_ANON, 0x00, 0x2f,
+ VIA_UDMA_133 | VIA_BAD_AST },
{ NULL }
};
@@ -460,6 +470,7 @@ static int via_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
static int printed_version;
u8 enable;
u32 timing;
+ unsigned long flags = id->driver_data;
int rc;
if (!printed_version++)
@@ -469,9 +480,13 @@ static int via_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
if (rc)
return rc;
+ if (flags & VIA_IDFLAG_SINGLE)
+ ppi[1] = &ata_dummy_port_info;
+
/* To find out how the IDE will behave and what features we
actually have to look at the bridge not the IDE controller */
- for (config = via_isa_bridges; config->id; config++)
+ for (config = via_isa_bridges; config->id != PCI_DEVICE_ID_VIA_ANON;
+ config++)
if ((isa = pci_get_device(PCI_VENDOR_ID_VIA +
!!(config->flags & VIA_BAD_ID),
config->id, NULL))) {
@@ -482,10 +497,6 @@ static int via_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
pci_dev_put(isa);
}
- if (!config->id) {
- printk(KERN_WARNING "via: Unknown VIA SouthBridge, disabling.\n");
- return -ENODEV;
- }
pci_dev_put(isa);
if (!(config->flags & VIA_NO_ENABLES)) {
@@ -587,6 +598,7 @@ static const struct pci_device_id via[] = {
{ PCI_VDEVICE(VIA, 0x1571), },
{ PCI_VDEVICE(VIA, 0x3164), },
{ PCI_VDEVICE(VIA, 0x5324), },
+ { PCI_VDEVICE(VIA, 0xC409), VIA_IDFLAG_SINGLE },
{ },
};
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index 8691863..f2d8a02 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -33,10 +33,6 @@
*
* --> ATAPI support (Marvell claims the 60xx/70xx chips can do it).
*
- * --> Investigate problems with PCI Message Signalled Interrupts (MSI).
- *
- * --> Cache frequently-accessed registers in mv_port_priv to reduce overhead.
- *
* --> Develop a low-power-consumption strategy, and implement it.
*
* --> [Experiment, low priority] Investigate interrupt coalescing.
@@ -72,7 +68,7 @@
#include <linux/libata.h>
#define DRV_NAME "sata_mv"
-#define DRV_VERSION "1.24"
+#define DRV_VERSION "1.25"
enum {
/* BAR's are enumerated in terms of pci_resource_start() terms */
@@ -351,8 +347,6 @@ enum {
EDMA_HALTCOND_OFS = 0x60, /* GenIIe halt conditions */
- GEN_II_NCQ_MAX_SECTORS = 256, /* max sects/io on Gen2 w/NCQ */
-
/* Host private flags (hp_flags) */
MV_HP_FLAG_MSI = (1 << 0),
MV_HP_ERRATA_50XXB0 = (1 << 1),
@@ -883,19 +877,15 @@ static void mv_start_dma(struct ata_port *ap, void __iomem *port_mmio,
struct mv_host_priv *hpriv = ap->host->private_data;
int hardport = mv_hardport_from_port(ap->port_no);
void __iomem *hc_mmio = mv_hc_base_from_port(
- mv_host_base(ap->host), hardport);
- u32 hc_irq_cause, ipending;
+ mv_host_base(ap->host), ap->port_no);
+ u32 hc_irq_cause;
/* clear EDMA event indicators, if any */
writelfl(0, port_mmio + EDMA_ERR_IRQ_CAUSE_OFS);
- /* clear EDMA interrupt indicator, if any */
- hc_irq_cause = readl(hc_mmio + HC_IRQ_CAUSE_OFS);
- ipending = (DEV_IRQ | DMA_IRQ) << hardport;
- if (hc_irq_cause & ipending) {
- writelfl(hc_irq_cause & ~ipending,
- hc_mmio + HC_IRQ_CAUSE_OFS);
- }
+ /* clear pending irq events */
+ hc_irq_cause = ~((DEV_IRQ | DMA_IRQ) << hardport);
+ writelfl(hc_irq_cause, hc_mmio + HC_IRQ_CAUSE_OFS);
mv_edma_cfg(ap, want_ncq);
@@ -1099,20 +1089,12 @@ static void mv6_dev_config(struct ata_device *adev)
*
* Gen-II does not support NCQ over a port multiplier
* (no FIS-based switching).
- *
- * We don't have hob_nsect when doing NCQ commands on Gen-II.
- * See mv_qc_prep() for more info.
*/
if (adev->flags & ATA_DFLAG_NCQ) {
if (sata_pmp_attached(adev->link->ap)) {
adev->flags &= ~ATA_DFLAG_NCQ;
ata_dev_printk(adev, KERN_INFO,
"NCQ disabled for command-based switching\n");
- } else if (adev->max_sectors > GEN_II_NCQ_MAX_SECTORS) {
- adev->max_sectors = GEN_II_NCQ_MAX_SECTORS;
- ata_dev_printk(adev, KERN_INFO,
- "max_sectors limited to %u for NCQ\n",
- adev->max_sectors);
}
}
}
@@ -1450,7 +1432,8 @@ static void mv_qc_prep(struct ata_queued_cmd *qc)
* only 11 bytes...so we must pick and choose required
* registers based on the command. So, we drop feature and
* hob_feature for [RW] DMA commands, but they are needed for
- * NCQ. NCQ will drop hob_nsect.
+ * NCQ. NCQ will drop hob_nsect, which is not needed there
+ * (nsect is used only for the tag; feat/hob_feat hold true nsect).
*/
switch (tf->command) {
case ATA_CMD_READ:
@@ -2214,9 +2197,15 @@ static irqreturn_t mv_interrupt(int irq, void *dev_instance)
struct ata_host *host = dev_instance;
struct mv_host_priv *hpriv = host->private_data;
unsigned int handled = 0;
+ int using_msi = hpriv->hp_flags & MV_HP_FLAG_MSI;
u32 main_irq_cause, pending_irqs;
spin_lock(&host->lock);
+
+ /* for MSI: block new interrupts while in here */
+ if (using_msi)
+ writel(0, hpriv->main_irq_mask_addr);
+
main_irq_cause = readl(hpriv->main_irq_cause_addr);
pending_irqs = main_irq_cause & hpriv->main_irq_mask;
/*
@@ -2230,6 +2219,11 @@ static irqreturn_t mv_interrupt(int irq, void *dev_instance)
handled = mv_host_intr(host, pending_irqs);
}
spin_unlock(&host->lock);
+
+ /* for MSI: unmask; interrupt cause bits will retrigger now */
+ if (using_msi)
+ writel(hpriv->main_irq_mask, hpriv->main_irq_mask_addr);
+
return IRQ_RETVAL(handled);
}
@@ -2821,8 +2815,7 @@ static void mv_eh_thaw(struct ata_port *ap)
writel(0, port_mmio + EDMA_ERR_IRQ_CAUSE_OFS);
/* clear pending irq events */
- hc_irq_cause = readl(hc_mmio + HC_IRQ_CAUSE_OFS);
- hc_irq_cause &= ~((DEV_IRQ | DMA_IRQ) << hardport);
+ hc_irq_cause = ~((DEV_IRQ | DMA_IRQ) << hardport);
writelfl(hc_irq_cause, hc_mmio + HC_IRQ_CAUSE_OFS);
mv_enable_port_irqs(ap, ERR_IRQ);
@@ -3075,6 +3068,9 @@ static int mv_init_host(struct ata_host *host, unsigned int board_idx)
hpriv->main_irq_mask_addr = mmio + PCI_HC_MAIN_IRQ_MASK_OFS;
}
+ /* initialize shadow irq mask with register's value */
+ hpriv->main_irq_mask = readl(hpriv->main_irq_mask_addr);
+
/* global interrupt mask: 0 == mask everything */
mv_set_main_irq_mask(host, ~0, 0);
@@ -3430,9 +3426,9 @@ static int mv_pci_init_one(struct pci_dev *pdev,
if (rc)
return rc;
- /* Enable interrupts */
- if (msi && pci_enable_msi(pdev))
- pci_intx(pdev, 1);
+ /* Enable message-switched interrupts, if requested */
+ if (msi && pci_enable_msi(pdev) == 0)
+ hpriv->hp_flags |= MV_HP_FLAG_MSI;
mv_dump_pci_cfg(pdev, 0x68);
mv_print_info(host);
diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c
index 6f14606..c49ad0e 100644
--- a/drivers/ata/sata_nv.c
+++ b/drivers/ata/sata_nv.c
@@ -305,10 +305,10 @@ static irqreturn_t nv_ck804_interrupt(int irq, void *dev_instance);
static int nv_scr_read(struct ata_link *link, unsigned int sc_reg, u32 *val);
static int nv_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val);
+static int nv_noclassify_hardreset(struct ata_link *link, unsigned int *class,
+ unsigned long deadline);
static void nv_nf2_freeze(struct ata_port *ap);
static void nv_nf2_thaw(struct ata_port *ap);
-static int nv_nf2_hardreset(struct ata_link *link, unsigned int *class,
- unsigned long deadline);
static void nv_ck804_freeze(struct ata_port *ap);
static void nv_ck804_thaw(struct ata_port *ap);
static int nv_adma_slave_config(struct scsi_device *sdev);
@@ -352,6 +352,7 @@ enum nv_host_type
NFORCE3 = NFORCE2, /* NF2 == NF3 as far as sata_nv is concerned */
CK804,
ADMA,
+ MCP5x,
SWNCQ,
};
@@ -363,10 +364,10 @@ static const struct pci_device_id nv_pci_tbl[] = {
{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_SATA2), CK804 },
{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA), CK804 },
{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA2), CK804 },
- { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA), SWNCQ },
- { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA2), SWNCQ },
- { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA), SWNCQ },
- { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA2), SWNCQ },
+ { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA), MCP5x },
+ { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA2), MCP5x },
+ { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA), MCP5x },
+ { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA2), MCP5x },
{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA), GENERIC },
{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA2), GENERIC },
{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA3), GENERIC },
@@ -432,7 +433,7 @@ static struct ata_port_operations nv_nf2_ops = {
.inherits = &nv_common_ops,
.freeze = nv_nf2_freeze,
.thaw = nv_nf2_thaw,
- .hardreset = nv_nf2_hardreset,
+ .hardreset = nv_noclassify_hardreset,
};
/* CK804 finally gets hardreset right */
@@ -467,8 +468,19 @@ static struct ata_port_operations nv_adma_ops = {
.host_stop = nv_adma_host_stop,
};
+/* Kernel bz#12351 reports that when SWNCQ is enabled, for hotplug to
+ * work, hardreset should be used and hardreset can't report proper
+ * signature, which suggests that mcp5x is closer to nf2 as long as
+ * reset quirkiness is concerned. Define separate ops for mcp5x with
+ * nv_noclassify_hardreset().
+ */
+static struct ata_port_operations nv_mcp5x_ops = {
+ .inherits = &nv_common_ops,
+ .hardreset = nv_noclassify_hardreset,
+};
+
static struct ata_port_operations nv_swncq_ops = {
- .inherits = &nv_generic_ops,
+ .inherits = &nv_mcp5x_ops,
.qc_defer = ata_std_qc_defer,
.qc_prep = nv_swncq_qc_prep,
@@ -531,6 +543,15 @@ static const struct ata_port_info nv_port_info[] = {
.port_ops = &nv_adma_ops,
.private_data = NV_PI_PRIV(nv_adma_interrupt, &nv_adma_sht),
},
+ /* MCP5x */
+ {
+ .flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY,
+ .pio_mask = NV_PIO_MASK,
+ .mwdma_mask = NV_MWDMA_MASK,
+ .udma_mask = NV_UDMA_MASK,
+ .port_ops = &nv_mcp5x_ops,
+ .private_data = NV_PI_PRIV(nv_generic_interrupt, &nv_sht),
+ },
/* SWNCQ */
{
.flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
@@ -1530,6 +1551,17 @@ static int nv_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val)
return 0;
}
+static int nv_noclassify_hardreset(struct ata_link *link, unsigned int *class,
+ unsigned long deadline)
+{
+ bool online;
+ int rc;
+
+ rc = sata_link_hardreset(link, sata_deb_timing_hotplug, deadline,
+ &online, NULL);
+ return online ? -EAGAIN : rc;
+}
+
static void nv_nf2_freeze(struct ata_port *ap)
{
void __iomem *scr_addr = ap->host->ports[0]->ioaddr.scr_addr;
@@ -1554,17 +1586,6 @@ static void nv_nf2_thaw(struct ata_port *ap)
iowrite8(mask, scr_addr + NV_INT_ENABLE);
}
-static int nv_nf2_hardreset(struct ata_link *link, unsigned int *class,
- unsigned long deadline)
-{
- bool online;
- int rc;
-
- rc = sata_link_hardreset(link, sata_deb_timing_hotplug, deadline,
- &online, NULL);
- return online ? -EAGAIN : rc;
-}
-
static void nv_ck804_freeze(struct ata_port *ap)
{
void __iomem *mmio_base = ap->host->iomap[NV_MMIO_BAR];
@@ -2355,14 +2376,9 @@ static int nv_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
if (type == CK804 && adma_enabled) {
dev_printk(KERN_NOTICE, &pdev->dev, "Using ADMA mode\n");
type = ADMA;
- }
-
- if (type == SWNCQ) {
- if (swncq_enabled)
- dev_printk(KERN_NOTICE, &pdev->dev,
- "Using SWNCQ mode\n");
- else
- type = GENERIC;
+ } else if (type == MCP5x && swncq_enabled) {
+ dev_printk(KERN_NOTICE, &pdev->dev, "Using SWNCQ mode\n");
+ type = SWNCQ;
}
ppi[0] = &nv_port_info[type];
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index d56ad9c..febc10e 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -1357,6 +1357,7 @@
#define PCI_DEVICE_ID_VIA_8783_0 0x3208
#define PCI_DEVICE_ID_VIA_8237 0x3227
#define PCI_DEVICE_ID_VIA_8251 0x3287
+#define PCI_DEVICE_ID_VIA_8261 0x3402
#define PCI_DEVICE_ID_VIA_8237A 0x3337
#define PCI_DEVICE_ID_VIA_8237S 0x3372
#define PCI_DEVICE_ID_VIA_SATA_EIDE 0x5324
@@ -1366,10 +1367,13 @@
#define PCI_DEVICE_ID_VIA_CX700 0x8324
#define PCI_DEVICE_ID_VIA_CX700_IDE 0x0581
#define PCI_DEVICE_ID_VIA_VX800 0x8353
+#define PCI_DEVICE_ID_VIA_VX855 0x8409
#define PCI_DEVICE_ID_VIA_8371_1 0x8391
#define PCI_DEVICE_ID_VIA_82C598_1 0x8598
#define PCI_DEVICE_ID_VIA_838X_1 0xB188
#define PCI_DEVICE_ID_VIA_83_87XX_1 0xB198
+#define PCI_DEVICE_ID_VIA_C409_IDE 0XC409
+#define PCI_DEVICE_ID_VIA_ANON 0xFFFF
#define PCI_VENDOR_ID_SIEMENS 0x110A
#define PCI_DEVICE_ID_SIEMENS_DSCC4 0x2102
^ permalink raw reply related [flat|nested] 263+ messages in thread
* Re: [git patches] libata fixes
2009-01-16 19:21 ` David Daney
@ 2009-01-16 23:13 ` David Daney
0 siblings, 0 replies; 263+ messages in thread
From: David Daney @ 2009-01-16 23:13 UTC (permalink / raw)
To: Andrew Morton; +Cc: Jeff Garzik, Linus Torvalds, linux-ide, LKML
David Daney wrote:
> Andrew Morton wrote:
>> On Fri, 16 Jan 2009 10:27:21 -0500 Jeff Garzik <jeff@garzik.org> wrote:
> [...]
>>>
>>> +static irqreturn_t octeon_cf_interrupt(int irq, void *dev_instance)
>>> +{
>>> + struct ata_host *host = dev_instance;
>>> + struct octeon_cf_port *cf_port;
>>> + int i;
>>> + unsigned int handled = 0;
>>> + unsigned long flags;
>>> +
>>> + spin_lock_irqsave(&host->lock, flags);
>>
>> Would spin_lock() suffice here?
>
> I have to think about that one.
>
The answer is an empirically determined No.
After switching to a spin_lock() as you suggested, I get:
BUG: spinlock recursion on CPU#0, pata_octeon_cf/700
lock: a80000041e8bd218, .magic: dead4ead, .owner: pata_octeon_cf/700,
.owner_cpu: 0
Call Trace:
[<ffffffffc000c3ec>] dump_stack+0x8/0x34
[<ffffffffc01b9a14>] _raw_spin_lock+0xdc/0x1b0
[<ffffffffc0211680>] ata_scsi_queuecmd+0x40/0x2d8
[<ffffffffc01f4358>] scsi_dispatch_cmd+0x108/0x280
[<ffffffffc01fa778>] scsi_request_fn+0x3a0/0x4a0
[<ffffffffc019a2ec>] blk_invoke_request_fn+0xd4/0x1c0
[<ffffffffc019a9f8>] blk_run_queue+0x28/0x48
[<ffffffffc01f9b74>] scsi_run_queue+0xf4/0x398
[<ffffffffc01faafc>] scsi_next_command+0x3c/0x58
[<ffffffffc01fb7e4>] scsi_io_completion+0x344/0x520
[<ffffffffc019f8a8>] blk_done_softirq+0x98/0xb8
[<ffffffffc004dc18>] __do_softirq+0xd8/0x1f8
[<ffffffffc004ddc0>] do_softirq+0x88/0xa0
[<ffffffffc004e084>] irq_exit+0xac/0xd0
[<ffffffffc0011090>] plat_irq_dispatch+0x100/0x200
[<ffffffffc0000980>] ret_from_irq+0x0/0x4
[<ffffffffc019fa84>] __blk_complete_request+0x114/0x140
[<ffffffffc020f1a8>] ata_scsi_qc_complete+0x1b8/0x400
[<ffffffffc0219dec>] ata_sff_hsm_move+0x10c/0x860
[<ffffffffc021cb20>] octeon_cf_dma_finished+0x188/0x228
[<ffffffffc021ccd8>] octeon_cf_delayed_finish+0x118/0x138
[<ffffffffc005cf94>] run_workqueue+0xcc/0x1a8
[<ffffffffc005d448>] worker_thread+0x60/0xd0
[<ffffffffc0062058>] kthread+0x58/0xa8
[<ffffffffc001a020>] kernel_thread_helper+0x10/0x18
Apparently scsi_io_completion() is called from a softirq, so calls to
ata_sff_hsm_move() must be done with interrupts disabled so that a
softirq on the same CPU doesn't deadlock with itself.
I am sure you all will correct me if my interpretation of the trace is
incorrect.
David Daney
^ permalink raw reply [flat|nested] 263+ messages in thread
* Re: [git patches] libata fixes
2009-01-16 17:31 ` Andrew Morton
` (2 preceding siblings ...)
2009-01-16 18:49 ` Grant Grundler
@ 2009-01-16 19:21 ` David Daney
2009-01-16 23:13 ` David Daney
3 siblings, 1 reply; 263+ messages in thread
From: David Daney @ 2009-01-16 19:21 UTC (permalink / raw)
To: Andrew Morton; +Cc: Jeff Garzik, Linus Torvalds, linux-ide, LKML
Andrew Morton wrote:
> On Fri, 16 Jan 2009 10:27:21 -0500 Jeff Garzik <jeff@garzik.org> wrote:
>> +/**
>> + * Convert nanosecond based time to setting used in the
>> + * boot bus timing register, based on timing multiple
>> + */
>
> There are comments in this file which use the kerneldoc token, but
> which aren't in kerneldoc format.
>
I will endeavor to improve it.
>> +static unsigned int ns_to_tim_reg(unsigned int tim_mult, unsigned int nsecs)
>> +{
>> + unsigned int val;
>> +
>> + /*
>> + * Compute # of eclock periods to get desired duration in
>> + * nanoseconds.
>> + */
>> + val = DIV_ROUND_UP(nsecs * (octeon_get_clock_rate() / 1000000),
>> + 1000 * tim_mult);
>> +
>> + return val;
>> +}
>>
>
> There's great potential for overflows here, but I couldn't be bothered
> picking through it. Are we sure that it's watertight?
>
We are calculating timing register values, there will not be overflow
given that the delays are all under 1000nS and the clock rate will
never be greater than 10GHz.
> There's a 64-bit divide in there. Will it link on 32-bit platforms?
It might not...
>
> Or is this all 64-bit-only code?
>
... but we are currently only supporting 64 bit kernels.
> wtf is an octeon anyway? (greps). Some MIPS thing.
Multicore MIPS64 SOC.
> I guess it's 64-bit-only.
Current, yes. See above.
[...]
>> +/**
>> + * Called after libata determines the needed PIO mode. This
>> + * function programs the Octeon bootbus regions to support the
>> + * timing requirements of the PIO mode.
>> + *
>> + * @ap: ATA port information
>> + * @dev: ATA device
>> + */
>
> That's getting more kerneldoccy, but isn't there yet.
As with the others, I will try to improve it.
[...]
>> + T = (int)(2000000000000LL / octeon_get_clock_rate());
>
> 64/64 divide.
>
As with the case above, it works as only 64 bit kernel supported.
[...]
>> +static void octeon_cf_tf_read16(struct ata_port *ap, struct ata_taskfile *tf)
>> +{
>> + u16 blob;
>> + /* The base of the registers is at ioaddr.data_addr. */
>> + void __iomem *base = ap->ioaddr.data_addr;
>> +
>> + blob = __raw_readw(base + 0xc);
>
> why __raw?
>
readw() does byte swapping, we don't want that, hence the __raw.
[...]
>> +
>> + cf_port = (struct octeon_cf_port *)ap->private_data;
>
> Unneeded, undesirable cast of void* (multiple instances).
>
I will fix it.
[...]
>>
>> +static irqreturn_t octeon_cf_interrupt(int irq, void *dev_instance)
>> +{
>> + struct ata_host *host = dev_instance;
>> + struct octeon_cf_port *cf_port;
>> + int i;
>> + unsigned int handled = 0;
>> + unsigned long flags;
>> +
>> + spin_lock_irqsave(&host->lock, flags);
>
> Would spin_lock() suffice here?
I have to think about that one.
Thanks for looking at it,
David daney
^ permalink raw reply [flat|nested] 263+ messages in thread
* Re: [git patches] libata fixes
2009-01-16 17:31 ` Andrew Morton
2009-01-16 18:21 ` Alan Cox
2009-01-16 18:45 ` Sergei Shtylyov
@ 2009-01-16 18:49 ` Grant Grundler
2009-01-16 19:21 ` David Daney
3 siblings, 0 replies; 263+ messages in thread
From: Grant Grundler @ 2009-01-16 18:49 UTC (permalink / raw)
To: Andrew Morton; +Cc: Jeff Garzik, Linus Torvalds, linux-ide, LKML
On Fri, Jan 16, 2009 at 9:31 AM, Andrew Morton
<akpm@linux-foundation.org> wrote:
...
>> +static void octeon_cf_tf_read16(struct ata_port *ap, struct ata_taskfile *tf)
>> +{
>> + u16 blob;
>> + /* The base of the registers is at ioaddr.data_addr. */
>> + void __iomem *base = ap->ioaddr.data_addr;
>> +
>> + blob = __raw_readw(base + 0xc);
>
> why __raw?
Avoid byte swapping. If it's "native" HW on Big Endian platform,
byte swapping isn't needed. If it's working, it's correct.
hth,
grant
^ permalink raw reply [flat|nested] 263+ messages in thread
* Re: [git patches] libata fixes
2009-01-16 17:31 ` Andrew Morton
2009-01-16 18:21 ` Alan Cox
@ 2009-01-16 18:45 ` Sergei Shtylyov
2009-01-16 18:49 ` Grant Grundler
2009-01-16 19:21 ` David Daney
3 siblings, 0 replies; 263+ messages in thread
From: Sergei Shtylyov @ 2009-01-16 18:45 UTC (permalink / raw)
To: Andrew Morton; +Cc: Jeff Garzik, Linus Torvalds, linux-ide, LKML
Hello.
Andrew Morton wrote:
>>+static unsigned int ns_to_tim_reg(unsigned int tim_mult, unsigned int nsecs)
>>+{
>>+ unsigned int val;
>>+
>>+ /*
>>+ * Compute # of eclock periods to get desired duration in
>>+ * nanoseconds.
>>+ */
>>+ val = DIV_ROUND_UP(nsecs * (octeon_get_clock_rate() / 1000000),
>>+ 1000 * tim_mult);
>>+
>>+ return val;
>>+}
> There's great potential for overflows here, but I couldn't be bothered
> picking through it. Are we sure that it's watertight?
> There's a 64-bit divide in there. Will it link on 32-bit platforms?
> Or is this all 64-bit-only code?
> wtf is an octeon anyway? (greps). Some MIPS thing. I guess it's
> 64-bit-only.
Yes, it's multicore MIPS64. AFAIK, it should be able to run 32-bit kernel
(don't think that it's really worth it).
WBR, Sergei
^ permalink raw reply [flat|nested] 263+ messages in thread
* Re: [git patches] libata fixes
2009-01-16 17:31 ` Andrew Morton
@ 2009-01-16 18:21 ` Alan Cox
2009-01-16 18:45 ` Sergei Shtylyov
` (2 subsequent siblings)
3 siblings, 0 replies; 263+ messages in thread
From: Alan Cox @ 2009-01-16 18:21 UTC (permalink / raw)
To: Andrew Morton; +Cc: Jeff Garzik, Linus Torvalds, linux-ide, LKML
> > + for (i = 0; i < 2; i++)
>
> s/2/ARRAY_SIZE/
It's 2. It's always 2 for a SFF controller. ARRAY_SIZE is just confusing
in this case as the array won't change size.
> There's a 64-bit divide in there. Will it link on 32-bit platforms?
> Or is this all 64-bit-only code?
>
> wtf is an octeon anyway? (greps). Some MIPS thing. I guess it's
> 64-bit-only.
Board specific driver anyway
^ permalink raw reply [flat|nested] 263+ messages in thread
* Re: [git patches] libata fixes
2009-01-16 15:27 Jeff Garzik
@ 2009-01-16 17:31 ` Andrew Morton
2009-01-16 18:21 ` Alan Cox
` (3 more replies)
0 siblings, 4 replies; 263+ messages in thread
From: Andrew Morton @ 2009-01-16 17:31 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Linus Torvalds, linux-ide, LKML
On Fri, 16 Jan 2009 10:27:21 -0500 Jeff Garzik <jeff@garzik.org> wrote:
>
> And a new, oft-reposted, finally ready cfl driver.
>
> The ioctl fix is notable, an ugly bug.
>
> 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:
>
> ...
>
> Andrew Morton (1):
> drivers/ata/pata_ali.c: s/isa_bridge/ali_isa_bridge/ to fix alpha build
hi, mom.
>
> ...
>
> -static int atiixp_init_one(struct pci_dev *dev, const struct pci_device_id *id)
> +static int atiixp_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
> {
> static const struct ata_port_info info = {
> .flags = ATA_FLAG_SLAVE_POSS,
> @@ -241,8 +225,18 @@ static int atiixp_init_one(struct pci_dev *dev, const struct pci_device_id *id)
> .udma_mask = 0x3F,
> .port_ops = &atiixp_port_ops
> };
> - const struct ata_port_info *ppi[] = { &info, NULL };
> - return ata_pci_sff_init_one(dev, ppi, &atiixp_sht, NULL);
> + static const struct pci_bits atiixp_enable_bits[] = {
> + { 0x48, 1, 0x01, 0x00 },
> + { 0x48, 1, 0x08, 0x00 }
> + };
> + const struct ata_port_info *ppi[] = { &info, &info };
> + int i;
> +
> + for (i = 0; i < 2; i++)
s/2/ARRAY_SIZE/
> + if (!pci_test_config_bits(pdev, &atiixp_enable_bits[i]))
> + ppi[i] = &ata_dummy_port_info;
> +
> + return ata_pci_sff_init_one(pdev, ppi, &atiixp_sht, NULL);
> }
>
>
> ...
>
> --- /dev/null
> +++ b/drivers/ata/pata_octeon_cf.c
> @@ -0,0 +1,965 @@
> +/*
> + * Driver for the Octeon bootbus compact flash.
> + *
> + * This file is subject to the terms and conditions of the GNU General Public
> + * License. See the file "COPYING" in the main directory of this archive
> + * for more details.
> + *
> + * Copyright (C) 2005 - 2009 Cavium Networks
> + * Copyright (C) 2008 Wind River Systems
> + */
> +
> +#include <linux/kernel.h>
> +#include <linux/module.h>
> +#include <linux/libata.h>
> +#include <linux/irq.h>
> +#include <linux/platform_device.h>
> +#include <linux/workqueue.h>
> +#include <scsi/scsi_host.h>
> +
> +#include <asm/octeon/octeon.h>
> +
> +/*
> + * The Octeon bootbus compact flash interface is connected in at least
> + * 3 different configurations on various evaluation boards:
> + *
> + * -- 8 bits no irq, no DMA
> + * -- 16 bits no irq, no DMA
> + * -- 16 bits True IDE mode with DMA, but no irq.
> + *
> + * In the last case the DMA engine can generate an interrupt when the
> + * transfer is complete. For the first two cases only PIO is supported.
> + *
> + */
> +
> +#define DRV_NAME "pata_octeon_cf"
> +#define DRV_VERSION "2.1"
> +
> +
> +struct octeon_cf_port {
> + struct workqueue_struct *wq;
> + struct delayed_work delayed_finish;
> + struct ata_port *ap;
> + int dma_finished;
> +};
> +
> +static struct scsi_host_template octeon_cf_sht = {
> + ATA_PIO_SHT(DRV_NAME),
> +};
> +
> +/**
> + * Convert nanosecond based time to setting used in the
> + * boot bus timing register, based on timing multiple
> + */
There are comments in this file which use the kerneldoc token, but
which aren't in kerneldoc format.
> +static unsigned int ns_to_tim_reg(unsigned int tim_mult, unsigned int nsecs)
> +{
> + unsigned int val;
> +
> + /*
> + * Compute # of eclock periods to get desired duration in
> + * nanoseconds.
> + */
> + val = DIV_ROUND_UP(nsecs * (octeon_get_clock_rate() / 1000000),
> + 1000 * tim_mult);
> +
> + return val;
> +}
>
There's great potential for overflows here, but I couldn't be bothered
picking through it. Are we sure that it's watertight?
There's a 64-bit divide in there. Will it link on 32-bit platforms?
Or is this all 64-bit-only code?
wtf is an octeon anyway? (greps). Some MIPS thing. I guess it's
64-bit-only.
> +static void octeon_cf_set_boot_reg_cfg(int cs)
> +{
> + union cvmx_mio_boot_reg_cfgx reg_cfg;
> + reg_cfg.u64 = cvmx_read_csr(CVMX_MIO_BOOT_REG_CFGX(cs));
> + reg_cfg.s.dmack = 0; /* Don't assert DMACK on access */
> + reg_cfg.s.tim_mult = 2; /* Timing mutiplier 2x */
> + reg_cfg.s.rd_dly = 0; /* Sample on falling edge of BOOT_OE */
> + reg_cfg.s.sam = 0; /* Don't combine write and output enable */
> + reg_cfg.s.we_ext = 0; /* No write enable extension */
> + reg_cfg.s.oe_ext = 0; /* No read enable extension */
> + reg_cfg.s.en = 1; /* Enable this region */
> + reg_cfg.s.orbit = 0; /* Don't combine with previous region */
> + reg_cfg.s.ale = 0; /* Don't do address multiplexing */
> + cvmx_write_csr(CVMX_MIO_BOOT_REG_CFGX(cs), reg_cfg.u64);
> +}
> +
> +/**
> + * Called after libata determines the needed PIO mode. This
> + * function programs the Octeon bootbus regions to support the
> + * timing requirements of the PIO mode.
> + *
> + * @ap: ATA port information
> + * @dev: ATA device
> + */
That's getting more kerneldoccy, but isn't there yet.
> +static void octeon_cf_set_piomode(struct ata_port *ap, struct ata_device *dev)
> +{
> + struct octeon_cf_data *ocd = ap->dev->platform_data;
> + union cvmx_mio_boot_reg_timx reg_tim;
> + int cs = ocd->base_region;
> + int T;
> + struct ata_timing timing;
> +
> + int use_iordy;
> + int trh;
> + int pause;
> + /* These names are timing parameters from the ATA spec */
> + int t1;
> + int t2;
> + int t2i;
> +
> + T = (int)(2000000000000LL / octeon_get_clock_rate());
64/64 divide.
> + if (ata_timing_compute(dev, dev->pio_mode, &timing, T, T))
> + BUG();
> +
> + t1 = timing.setup;
> + if (t1)
> + t1--;
> + t2 = timing.active;
> + if (t2)
> + t2--;
> + t2i = timing.act8b;
> + if (t2i)
> + t2i--;
> +
> + trh = ns_to_tim_reg(2, 20);
> + if (trh)
> + trh--;
> +
> + pause = timing.cycle - timing.active - timing.setup - trh;
> + if (pause)
> + pause--;
> +
> + octeon_cf_set_boot_reg_cfg(cs);
> + if (ocd->dma_engine >= 0)
> + /* True IDE mode, program both chip selects. */
> + octeon_cf_set_boot_reg_cfg(cs + 1);
> +
> +
> + use_iordy = ata_pio_need_iordy(dev);
> +
> + reg_tim.u64 = cvmx_read_csr(CVMX_MIO_BOOT_REG_TIMX(cs));
> + /* Disable page mode */
> + reg_tim.s.pagem = 0;
> + /* Enable dynamic timing */
> + reg_tim.s.waitm = use_iordy;
> + /* Pages are disabled */
> + reg_tim.s.pages = 0;
> + /* We don't use multiplexed address mode */
> + reg_tim.s.ale = 0;
> + /* Not used */
> + reg_tim.s.page = 0;
> + /* Time after IORDY to coninue to assert the data */
> + reg_tim.s.wait = 0;
> + /* Time to wait to complete the cycle. */
> + reg_tim.s.pause = pause;
> + /* How long to hold after a write to de-assert CE. */
> + reg_tim.s.wr_hld = trh;
> + /* How long to wait after a read to de-assert CE. */
> + reg_tim.s.rd_hld = trh;
> + /* How long write enable is asserted */
> + reg_tim.s.we = t2;
> + /* How long read enable is asserted */
> + reg_tim.s.oe = t2;
> + /* Time after CE that read/write starts */
> + reg_tim.s.ce = ns_to_tim_reg(2, 5);
> + /* Time before CE that address is valid */
> + reg_tim.s.adr = 0;
> +
> + /* Program the bootbus region timing for the data port chip select. */
> + cvmx_write_csr(CVMX_MIO_BOOT_REG_TIMX(cs), reg_tim.u64);
> + if (ocd->dma_engine >= 0)
> + /* True IDE mode, program both chip selects. */
> + cvmx_write_csr(CVMX_MIO_BOOT_REG_TIMX(cs + 1), reg_tim.u64);
> +}
> +
>
> ...
>
> +static void octeon_cf_tf_read16(struct ata_port *ap, struct ata_taskfile *tf)
> +{
> + u16 blob;
> + /* The base of the registers is at ioaddr.data_addr. */
> + void __iomem *base = ap->ioaddr.data_addr;
> +
> + blob = __raw_readw(base + 0xc);
why __raw?
> + tf->feature = blob >> 8;
> +
> + blob = __raw_readw(base + 2);
> + tf->nsect = blob & 0xff;
> + tf->lbal = blob >> 8;
> +
> + blob = __raw_readw(base + 4);
> + tf->lbam = blob & 0xff;
> + tf->lbah = blob >> 8;
> +
> + blob = __raw_readw(base + 6);
> + tf->device = blob & 0xff;
> + tf->command = blob >> 8;
> +
> + if (tf->flags & ATA_TFLAG_LBA48) {
> + if (likely(ap->ioaddr.ctl_addr)) {
> + iowrite8(tf->ctl | ATA_HOB, ap->ioaddr.ctl_addr);
> +
> + blob = __raw_readw(base + 0xc);
> + tf->hob_feature = blob >> 8;
> +
> + blob = __raw_readw(base + 2);
> + tf->hob_nsect = blob & 0xff;
> + tf->hob_lbal = blob >> 8;
> +
> + blob = __raw_readw(base + 4);
> + tf->hob_lbam = blob & 0xff;
> + tf->hob_lbah = blob >> 8;
> +
> + iowrite8(tf->ctl, ap->ioaddr.ctl_addr);
> + ap->last_ctl = tf->ctl;
> + } else {
> + WARN_ON(1);
> + }
> + }
> +}
> +
>
> ...
>
> +static void octeon_cf_dma_setup(struct ata_queued_cmd *qc)
> +{
> + struct ata_port *ap = qc->ap;
> + struct octeon_cf_port *cf_port;
> +
> + cf_port = (struct octeon_cf_port *)ap->private_data;
Unneeded, undesirable cast of void* (multiple instances).
> + DPRINTK("ENTER\n");
> + /* issue r/w command */
> + qc->cursg = qc->sg;
> + cf_port->dma_finished = 0;
> + ap->ops->sff_exec_command(ap, &qc->tf);
> + DPRINTK("EXIT\n");
> +}
> +
>
> ...
>
> +static irqreturn_t octeon_cf_interrupt(int irq, void *dev_instance)
> +{
> + struct ata_host *host = dev_instance;
> + struct octeon_cf_port *cf_port;
> + int i;
> + unsigned int handled = 0;
> + unsigned long flags;
> +
> + spin_lock_irqsave(&host->lock, flags);
Would spin_lock() suffice here?
> + DPRINTK("ENTER\n");
> + for (i = 0; i < host->n_ports; i++) {
> + u8 status;
> + struct ata_port *ap;
> + struct ata_queued_cmd *qc;
> + union cvmx_mio_boot_dma_intx dma_int;
> + union cvmx_mio_boot_dma_cfgx dma_cfg;
> + struct octeon_cf_data *ocd;
> +
> + ap = host->ports[i];
> + ocd = ap->dev->platform_data;
> + if (!ap || (ap->flags & ATA_FLAG_DISABLED))
> + continue;
> +
> + ocd = ap->dev->platform_data;
> + cf_port = (struct octeon_cf_port *)ap->private_data;
> + dma_int.u64 =
> + cvmx_read_csr(CVMX_MIO_BOOT_DMA_INTX(ocd->dma_engine));
> + dma_cfg.u64 =
> + cvmx_read_csr(CVMX_MIO_BOOT_DMA_CFGX(ocd->dma_engine));
> +
> + qc = ata_qc_from_tag(ap, ap->link.active_tag);
> +
> + if (qc && (!(qc->tf.flags & ATA_TFLAG_POLLING)) &&
> + (qc->flags & ATA_QCFLAG_ACTIVE)) {
> + if (dma_int.s.done && !dma_cfg.s.en) {
> + if (!sg_is_last(qc->cursg)) {
> + qc->cursg = sg_next(qc->cursg);
> + handled = 1;
> + octeon_cf_dma_start(qc);
> + continue;
> + } else {
> + cf_port->dma_finished = 1;
> + }
> + }
> + if (!cf_port->dma_finished)
> + continue;
> + status = ioread8(ap->ioaddr.altstatus_addr);
> + if (status & (ATA_BUSY | ATA_DRQ)) {
> + /*
> + * We are busy, try to handle it
> + * later. This is the DMA finished
> + * interrupt, and it could take a
> + * little while for the card to be
> + * ready for more commands.
> + */
> + /* Clear DMA irq. */
> + dma_int.u64 = 0;
> + dma_int.s.done = 1;
> + cvmx_write_csr(CVMX_MIO_BOOT_DMA_INTX(ocd->dma_engine),
> + dma_int.u64);
> +
> + queue_delayed_work(cf_port->wq,
> + &cf_port->delayed_finish, 1);
> + handled = 1;
> + } else {
> + handled |= octeon_cf_dma_finished(ap, qc);
> + }
> + }
> + }
> + spin_unlock_irqrestore(&host->lock, flags);
> + DPRINTK("EXIT\n");
> + return IRQ_RETVAL(handled);
> +}
> +
>
> ...
>
^ permalink raw reply [flat|nested] 263+ messages in thread
* [git patches] libata fixes
@ 2009-01-16 15:27 Jeff Garzik
2009-01-16 17:31 ` Andrew Morton
0 siblings, 1 reply; 263+ messages in thread
From: Jeff Garzik @ 2009-01-16 15:27 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide, LKML
And a new, oft-reposted, finally ready cfl driver.
The ioctl fix is notable, an ugly bug.
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/Kconfig | 9 +
drivers/ata/Makefile | 1 +
drivers/ata/libata-core.c | 73 ++--
drivers/ata/libata-scsi.c | 17 +-
drivers/ata/pata_ali.c | 28 +-
drivers/ata/pata_atiixp.c | 32 +-
drivers/ata/pata_octeon_cf.c | 965 +++++++++++++++++++++++++++++++++++
drivers/ata/sata_fsl.c | 2 +-
drivers/ata/sata_via.c | 2 +
drivers/scsi/ipr.c | 2 +-
drivers/scsi/libsas/sas_scsi_host.c | 2 +-
include/linux/libata.h | 11 +-
12 files changed, 1065 insertions(+), 79 deletions(-)
create mode 100644 drivers/ata/pata_octeon_cf.c
Andrew Morton (1):
drivers/ata/pata_ali.c: s/isa_bridge/ali_isa_bridge/ to fix alpha build
David Daney (2):
libata: Add another column to the ata_timing table.
libata: New driver for OCTEON SOC Compact Flash interface (v7).
Jeff Garzik (1):
[libata] get-identity ioctl: Fix use of invalid memory pointer
JosephChan@via.com.tw (1):
sata_via: Add VT8261 support
Michal Sojka (1):
sata_fsl: Return non-zero on error in probe()
Tejun Heo (1):
pata_atiixp: update port enabledness test handling
diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
index 1a7be96..503a908 100644
--- a/drivers/ata/Kconfig
+++ b/drivers/ata/Kconfig
@@ -698,6 +698,15 @@ config PATA_IXP4XX_CF
If unsure, say N.
+config PATA_OCTEON_CF
+ tristate "OCTEON Boot Bus Compact Flash support"
+ depends on CPU_CAVIUM_OCTEON
+ help
+ This option enables a polled compact flash driver for use with
+ compact flash cards attached to the OCTEON boot bus.
+
+ If unsure, say N.
+
config PATA_SCC
tristate "Toshiba's Cell Reference Set IDE support"
depends on PCI && PPC_CELLEB
diff --git a/drivers/ata/Makefile b/drivers/ata/Makefile
index 674965f..7f1ecf9 100644
--- a/drivers/ata/Makefile
+++ b/drivers/ata/Makefile
@@ -69,6 +69,7 @@ obj-$(CONFIG_PATA_IXP4XX_CF) += pata_ixp4xx_cf.o
obj-$(CONFIG_PATA_SCC) += pata_scc.o
obj-$(CONFIG_PATA_SCH) += pata_sch.o
obj-$(CONFIG_PATA_BF54X) += pata_bf54x.o
+obj-$(CONFIG_PATA_OCTEON_CF) += pata_octeon_cf.o
obj-$(CONFIG_PATA_PLATFORM) += pata_platform.o
obj-$(CONFIG_PATA_OF_PLATFORM) += pata_of_platform.o
obj-$(CONFIG_PATA_ICSIDE) += pata_icside.o
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 71218d7..88c2428 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -3029,33 +3029,33 @@ int sata_set_spd(struct ata_link *link)
*/
static const struct ata_timing ata_timing[] = {
-/* { XFER_PIO_SLOW, 120, 290, 240, 960, 290, 240, 960, 0 }, */
- { XFER_PIO_0, 70, 290, 240, 600, 165, 150, 600, 0 },
- { XFER_PIO_1, 50, 290, 93, 383, 125, 100, 383, 0 },
- { XFER_PIO_2, 30, 290, 40, 330, 100, 90, 240, 0 },
- { XFER_PIO_3, 30, 80, 70, 180, 80, 70, 180, 0 },
- { XFER_PIO_4, 25, 70, 25, 120, 70, 25, 120, 0 },
- { XFER_PIO_5, 15, 65, 25, 100, 65, 25, 100, 0 },
- { XFER_PIO_6, 10, 55, 20, 80, 55, 20, 80, 0 },
-
- { XFER_SW_DMA_0, 120, 0, 0, 0, 480, 480, 960, 0 },
- { XFER_SW_DMA_1, 90, 0, 0, 0, 240, 240, 480, 0 },
- { XFER_SW_DMA_2, 60, 0, 0, 0, 120, 120, 240, 0 },
-
- { XFER_MW_DMA_0, 60, 0, 0, 0, 215, 215, 480, 0 },
- { XFER_MW_DMA_1, 45, 0, 0, 0, 80, 50, 150, 0 },
- { XFER_MW_DMA_2, 25, 0, 0, 0, 70, 25, 120, 0 },
- { XFER_MW_DMA_3, 25, 0, 0, 0, 65, 25, 100, 0 },
- { XFER_MW_DMA_4, 25, 0, 0, 0, 55, 20, 80, 0 },
-
-/* { XFER_UDMA_SLOW, 0, 0, 0, 0, 0, 0, 0, 150 }, */
- { XFER_UDMA_0, 0, 0, 0, 0, 0, 0, 0, 120 },
- { XFER_UDMA_1, 0, 0, 0, 0, 0, 0, 0, 80 },
- { XFER_UDMA_2, 0, 0, 0, 0, 0, 0, 0, 60 },
- { XFER_UDMA_3, 0, 0, 0, 0, 0, 0, 0, 45 },
- { XFER_UDMA_4, 0, 0, 0, 0, 0, 0, 0, 30 },
- { XFER_UDMA_5, 0, 0, 0, 0, 0, 0, 0, 20 },
- { XFER_UDMA_6, 0, 0, 0, 0, 0, 0, 0, 15 },
+/* { XFER_PIO_SLOW, 120, 290, 240, 960, 290, 240, 0, 960, 0 }, */
+ { XFER_PIO_0, 70, 290, 240, 600, 165, 150, 0, 600, 0 },
+ { XFER_PIO_1, 50, 290, 93, 383, 125, 100, 0, 383, 0 },
+ { XFER_PIO_2, 30, 290, 40, 330, 100, 90, 0, 240, 0 },
+ { XFER_PIO_3, 30, 80, 70, 180, 80, 70, 0, 180, 0 },
+ { XFER_PIO_4, 25, 70, 25, 120, 70, 25, 0, 120, 0 },
+ { XFER_PIO_5, 15, 65, 25, 100, 65, 25, 0, 100, 0 },
+ { XFER_PIO_6, 10, 55, 20, 80, 55, 20, 0, 80, 0 },
+
+ { XFER_SW_DMA_0, 120, 0, 0, 0, 480, 480, 50, 960, 0 },
+ { XFER_SW_DMA_1, 90, 0, 0, 0, 240, 240, 30, 480, 0 },
+ { XFER_SW_DMA_2, 60, 0, 0, 0, 120, 120, 20, 240, 0 },
+
+ { XFER_MW_DMA_0, 60, 0, 0, 0, 215, 215, 20, 480, 0 },
+ { XFER_MW_DMA_1, 45, 0, 0, 0, 80, 50, 5, 150, 0 },
+ { XFER_MW_DMA_2, 25, 0, 0, 0, 70, 25, 5, 120, 0 },
+ { XFER_MW_DMA_3, 25, 0, 0, 0, 65, 25, 5, 100, 0 },
+ { XFER_MW_DMA_4, 25, 0, 0, 0, 55, 20, 5, 80, 0 },
+
+/* { XFER_UDMA_SLOW, 0, 0, 0, 0, 0, 0, 0, 0, 150 }, */
+ { XFER_UDMA_0, 0, 0, 0, 0, 0, 0, 0, 0, 120 },
+ { XFER_UDMA_1, 0, 0, 0, 0, 0, 0, 0, 0, 80 },
+ { XFER_UDMA_2, 0, 0, 0, 0, 0, 0, 0, 0, 60 },
+ { XFER_UDMA_3, 0, 0, 0, 0, 0, 0, 0, 0, 45 },
+ { XFER_UDMA_4, 0, 0, 0, 0, 0, 0, 0, 0, 30 },
+ { XFER_UDMA_5, 0, 0, 0, 0, 0, 0, 0, 0, 20 },
+ { XFER_UDMA_6, 0, 0, 0, 0, 0, 0, 0, 0, 15 },
{ 0xFF }
};
@@ -3065,14 +3065,15 @@ static const struct ata_timing ata_timing[] = {
static void ata_timing_quantize(const struct ata_timing *t, struct ata_timing *q, int T, int UT)
{
- q->setup = EZ(t->setup * 1000, T);
- q->act8b = EZ(t->act8b * 1000, T);
- q->rec8b = EZ(t->rec8b * 1000, T);
- q->cyc8b = EZ(t->cyc8b * 1000, T);
- q->active = EZ(t->active * 1000, T);
- q->recover = EZ(t->recover * 1000, T);
- q->cycle = EZ(t->cycle * 1000, T);
- q->udma = EZ(t->udma * 1000, UT);
+ q->setup = EZ(t->setup * 1000, T);
+ q->act8b = EZ(t->act8b * 1000, T);
+ q->rec8b = EZ(t->rec8b * 1000, T);
+ q->cyc8b = EZ(t->cyc8b * 1000, T);
+ q->active = EZ(t->active * 1000, T);
+ q->recover = EZ(t->recover * 1000, T);
+ q->dmack_hold = EZ(t->dmack_hold * 1000, T);
+ q->cycle = EZ(t->cycle * 1000, T);
+ q->udma = EZ(t->udma * 1000, UT);
}
void ata_timing_merge(const struct ata_timing *a, const struct ata_timing *b,
@@ -3084,6 +3085,7 @@ void ata_timing_merge(const struct ata_timing *a, const struct ata_timing *b,
if (what & ATA_TIMING_CYC8B ) m->cyc8b = max(a->cyc8b, b->cyc8b);
if (what & ATA_TIMING_ACTIVE ) m->active = max(a->active, b->active);
if (what & ATA_TIMING_RECOVER) m->recover = max(a->recover, b->recover);
+ if (what & ATA_TIMING_DMACK_HOLD) m->dmack_hold = max(a->dmack_hold, b->dmack_hold);
if (what & ATA_TIMING_CYCLE ) m->cycle = max(a->cycle, b->cycle);
if (what & ATA_TIMING_UDMA ) m->udma = max(a->udma, b->udma);
}
@@ -6638,7 +6640,6 @@ EXPORT_SYMBOL_GPL(ata_dev_pair);
EXPORT_SYMBOL_GPL(ata_port_disable);
EXPORT_SYMBOL_GPL(ata_ratelimit);
EXPORT_SYMBOL_GPL(ata_wait_register);
-EXPORT_SYMBOL_GPL(ata_scsi_ioctl);
EXPORT_SYMBOL_GPL(ata_scsi_queuecmd);
EXPORT_SYMBOL_GPL(ata_scsi_slave_config);
EXPORT_SYMBOL_GPL(ata_scsi_slave_destroy);
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index 9e92107..a1a6e62 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -423,9 +423,9 @@ int ata_std_bios_param(struct scsi_device *sdev, struct block_device *bdev,
* RETURNS:
* Zero on success, negative errno on error.
*/
-static int ata_get_identity(struct scsi_device *sdev, void __user *arg)
+static int ata_get_identity(struct ata_port *ap, struct scsi_device *sdev,
+ void __user *arg)
{
- struct ata_port *ap = ata_shost_to_port(sdev->host);
struct ata_device *dev = ata_scsi_find_dev(ap, sdev);
u16 __user *dst = arg;
char buf[40];
@@ -645,7 +645,8 @@ int ata_task_ioctl(struct scsi_device *scsidev, void __user *arg)
return rc;
}
-int ata_scsi_ioctl(struct scsi_device *scsidev, int cmd, void __user *arg)
+int ata_sas_scsi_ioctl(struct ata_port *ap, struct scsi_device *scsidev,
+ int cmd, void __user *arg)
{
int val = -EINVAL, rc = -EINVAL;
@@ -663,7 +664,7 @@ int ata_scsi_ioctl(struct scsi_device *scsidev, int cmd, void __user *arg)
return 0;
case HDIO_GET_IDENTITY:
- return ata_get_identity(scsidev, arg);
+ return ata_get_identity(ap, scsidev, arg);
case HDIO_DRIVE_CMD:
if (!capable(CAP_SYS_ADMIN) || !capable(CAP_SYS_RAWIO))
@@ -682,6 +683,14 @@ int ata_scsi_ioctl(struct scsi_device *scsidev, int cmd, void __user *arg)
return rc;
}
+EXPORT_SYMBOL_GPL(ata_sas_scsi_ioctl);
+
+int ata_scsi_ioctl(struct scsi_device *scsidev, int cmd, void __user *arg)
+{
+ return ata_sas_scsi_ioctl(ata_shost_to_port(scsidev->host),
+ scsidev, cmd, arg);
+}
+EXPORT_SYMBOL_GPL(ata_scsi_ioctl);
/**
* ata_scsi_qc_new - acquire new ata_queued_cmd reference
diff --git a/drivers/ata/pata_ali.c b/drivers/ata/pata_ali.c
index a7999c1..eb99dbe 100644
--- a/drivers/ata/pata_ali.c
+++ b/drivers/ata/pata_ali.c
@@ -41,7 +41,7 @@ static int ali_atapi_dma = 0;
module_param_named(atapi_dma, ali_atapi_dma, int, 0644);
MODULE_PARM_DESC(atapi_dma, "Enable ATAPI DMA (0=disable, 1=enable)");
-static struct pci_dev *isa_bridge;
+static struct pci_dev *ali_isa_bridge;
/*
* Cable special cases
@@ -346,13 +346,13 @@ static void ali_c2_c3_postreset(struct ata_link *link, unsigned int *classes)
int port_bit = 4 << link->ap->port_no;
/* If our bridge is an ALI 1533 then do the extra work */
- if (isa_bridge) {
+ if (ali_isa_bridge) {
/* Tristate and re-enable the bus signals */
- pci_read_config_byte(isa_bridge, 0x58, &r);
+ pci_read_config_byte(ali_isa_bridge, 0x58, &r);
r &= ~port_bit;
- pci_write_config_byte(isa_bridge, 0x58, r);
+ pci_write_config_byte(ali_isa_bridge, 0x58, r);
r |= port_bit;
- pci_write_config_byte(isa_bridge, 0x58, r);
+ pci_write_config_byte(ali_isa_bridge, 0x58, r);
}
ata_sff_postreset(link, classes);
}
@@ -467,14 +467,14 @@ static void ali_init_chipset(struct pci_dev *pdev)
pci_write_config_byte(pdev, 0x53, tmp);
}
north = pci_get_bus_and_slot(0, PCI_DEVFN(0,0));
- if (north && north->vendor == PCI_VENDOR_ID_AL && isa_bridge) {
+ if (north && north->vendor == PCI_VENDOR_ID_AL && ali_isa_bridge) {
/* Configure the ALi bridge logic. For non ALi rely on BIOS.
Set the south bridge enable bit */
- pci_read_config_byte(isa_bridge, 0x79, &tmp);
+ pci_read_config_byte(ali_isa_bridge, 0x79, &tmp);
if (pdev->revision == 0xC2)
- pci_write_config_byte(isa_bridge, 0x79, tmp | 0x04);
+ pci_write_config_byte(ali_isa_bridge, 0x79, tmp | 0x04);
else if (pdev->revision > 0xC2 && pdev->revision < 0xC5)
- pci_write_config_byte(isa_bridge, 0x79, tmp | 0x02);
+ pci_write_config_byte(ali_isa_bridge, 0x79, tmp | 0x02);
}
pci_dev_put(north);
ata_pci_bmdma_clear_simplex(pdev);
@@ -571,9 +571,9 @@ static int ali_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
ali_init_chipset(pdev);
- if (isa_bridge && pdev->revision >= 0x20 && pdev->revision < 0xC2) {
+ if (ali_isa_bridge && pdev->revision >= 0x20 && pdev->revision < 0xC2) {
/* Are we paired with a UDMA capable chip */
- pci_read_config_byte(isa_bridge, 0x5E, &tmp);
+ pci_read_config_byte(ali_isa_bridge, 0x5E, &tmp);
if ((tmp & 0x1E) == 0x12)
ppi[0] = &info_20_udma;
}
@@ -617,11 +617,11 @@ static struct pci_driver ali_pci_driver = {
static int __init ali_init(void)
{
int ret;
- isa_bridge = pci_get_device(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M1533, NULL);
+ ali_isa_bridge = pci_get_device(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M1533, NULL);
ret = pci_register_driver(&ali_pci_driver);
if (ret < 0)
- pci_dev_put(isa_bridge);
+ pci_dev_put(ali_isa_bridge);
return ret;
}
@@ -629,7 +629,7 @@ static int __init ali_init(void)
static void __exit ali_exit(void)
{
pci_unregister_driver(&ali_pci_driver);
- pci_dev_put(isa_bridge);
+ pci_dev_put(ali_isa_bridge);
}
diff --git a/drivers/ata/pata_atiixp.c b/drivers/ata/pata_atiixp.c
index 0e2cde8..506adde 100644
--- a/drivers/ata/pata_atiixp.c
+++ b/drivers/ata/pata_atiixp.c
@@ -32,21 +32,6 @@ enum {
ATIIXP_IDE_UDMA_MODE = 0x56
};
-static int atiixp_pre_reset(struct ata_link *link, unsigned long deadline)
-{
- struct ata_port *ap = link->ap;
- static const struct pci_bits atiixp_enable_bits[] = {
- { 0x48, 1, 0x01, 0x00 },
- { 0x48, 1, 0x08, 0x00 }
- };
- struct pci_dev *pdev = to_pci_dev(ap->host->dev);
-
- if (!pci_test_config_bits(pdev, &atiixp_enable_bits[ap->port_no]))
- return -ENOENT;
-
- return ata_sff_prereset(link, deadline);
-}
-
static int atiixp_cable_detect(struct ata_port *ap)
{
struct pci_dev *pdev = to_pci_dev(ap->host->dev);
@@ -229,10 +214,9 @@ static struct ata_port_operations atiixp_port_ops = {
.cable_detect = atiixp_cable_detect,
.set_piomode = atiixp_set_piomode,
.set_dmamode = atiixp_set_dmamode,
- .prereset = atiixp_pre_reset,
};
-static int atiixp_init_one(struct pci_dev *dev, const struct pci_device_id *id)
+static int atiixp_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
{
static const struct ata_port_info info = {
.flags = ATA_FLAG_SLAVE_POSS,
@@ -241,8 +225,18 @@ static int atiixp_init_one(struct pci_dev *dev, const struct pci_device_id *id)
.udma_mask = 0x3F,
.port_ops = &atiixp_port_ops
};
- const struct ata_port_info *ppi[] = { &info, NULL };
- return ata_pci_sff_init_one(dev, ppi, &atiixp_sht, NULL);
+ static const struct pci_bits atiixp_enable_bits[] = {
+ { 0x48, 1, 0x01, 0x00 },
+ { 0x48, 1, 0x08, 0x00 }
+ };
+ const struct ata_port_info *ppi[] = { &info, &info };
+ int i;
+
+ for (i = 0; i < 2; i++)
+ if (!pci_test_config_bits(pdev, &atiixp_enable_bits[i]))
+ ppi[i] = &ata_dummy_port_info;
+
+ return ata_pci_sff_init_one(pdev, ppi, &atiixp_sht, NULL);
}
static const struct pci_device_id atiixp[] = {
diff --git a/drivers/ata/pata_octeon_cf.c b/drivers/ata/pata_octeon_cf.c
new file mode 100644
index 0000000..0fe4ef3
--- /dev/null
+++ b/drivers/ata/pata_octeon_cf.c
@@ -0,0 +1,965 @@
+/*
+ * Driver for the Octeon bootbus compact flash.
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2005 - 2009 Cavium Networks
+ * Copyright (C) 2008 Wind River Systems
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/libata.h>
+#include <linux/irq.h>
+#include <linux/platform_device.h>
+#include <linux/workqueue.h>
+#include <scsi/scsi_host.h>
+
+#include <asm/octeon/octeon.h>
+
+/*
+ * The Octeon bootbus compact flash interface is connected in at least
+ * 3 different configurations on various evaluation boards:
+ *
+ * -- 8 bits no irq, no DMA
+ * -- 16 bits no irq, no DMA
+ * -- 16 bits True IDE mode with DMA, but no irq.
+ *
+ * In the last case the DMA engine can generate an interrupt when the
+ * transfer is complete. For the first two cases only PIO is supported.
+ *
+ */
+
+#define DRV_NAME "pata_octeon_cf"
+#define DRV_VERSION "2.1"
+
+
+struct octeon_cf_port {
+ struct workqueue_struct *wq;
+ struct delayed_work delayed_finish;
+ struct ata_port *ap;
+ int dma_finished;
+};
+
+static struct scsi_host_template octeon_cf_sht = {
+ ATA_PIO_SHT(DRV_NAME),
+};
+
+/**
+ * Convert nanosecond based time to setting used in the
+ * boot bus timing register, based on timing multiple
+ */
+static unsigned int ns_to_tim_reg(unsigned int tim_mult, unsigned int nsecs)
+{
+ unsigned int val;
+
+ /*
+ * Compute # of eclock periods to get desired duration in
+ * nanoseconds.
+ */
+ val = DIV_ROUND_UP(nsecs * (octeon_get_clock_rate() / 1000000),
+ 1000 * tim_mult);
+
+ return val;
+}
+
+static void octeon_cf_set_boot_reg_cfg(int cs)
+{
+ union cvmx_mio_boot_reg_cfgx reg_cfg;
+ reg_cfg.u64 = cvmx_read_csr(CVMX_MIO_BOOT_REG_CFGX(cs));
+ reg_cfg.s.dmack = 0; /* Don't assert DMACK on access */
+ reg_cfg.s.tim_mult = 2; /* Timing mutiplier 2x */
+ reg_cfg.s.rd_dly = 0; /* Sample on falling edge of BOOT_OE */
+ reg_cfg.s.sam = 0; /* Don't combine write and output enable */
+ reg_cfg.s.we_ext = 0; /* No write enable extension */
+ reg_cfg.s.oe_ext = 0; /* No read enable extension */
+ reg_cfg.s.en = 1; /* Enable this region */
+ reg_cfg.s.orbit = 0; /* Don't combine with previous region */
+ reg_cfg.s.ale = 0; /* Don't do address multiplexing */
+ cvmx_write_csr(CVMX_MIO_BOOT_REG_CFGX(cs), reg_cfg.u64);
+}
+
+/**
+ * Called after libata determines the needed PIO mode. This
+ * function programs the Octeon bootbus regions to support the
+ * timing requirements of the PIO mode.
+ *
+ * @ap: ATA port information
+ * @dev: ATA device
+ */
+static void octeon_cf_set_piomode(struct ata_port *ap, struct ata_device *dev)
+{
+ struct octeon_cf_data *ocd = ap->dev->platform_data;
+ union cvmx_mio_boot_reg_timx reg_tim;
+ int cs = ocd->base_region;
+ int T;
+ struct ata_timing timing;
+
+ int use_iordy;
+ int trh;
+ int pause;
+ /* These names are timing parameters from the ATA spec */
+ int t1;
+ int t2;
+ int t2i;
+
+ T = (int)(2000000000000LL / octeon_get_clock_rate());
+
+ if (ata_timing_compute(dev, dev->pio_mode, &timing, T, T))
+ BUG();
+
+ t1 = timing.setup;
+ if (t1)
+ t1--;
+ t2 = timing.active;
+ if (t2)
+ t2--;
+ t2i = timing.act8b;
+ if (t2i)
+ t2i--;
+
+ trh = ns_to_tim_reg(2, 20);
+ if (trh)
+ trh--;
+
+ pause = timing.cycle - timing.active - timing.setup - trh;
+ if (pause)
+ pause--;
+
+ octeon_cf_set_boot_reg_cfg(cs);
+ if (ocd->dma_engine >= 0)
+ /* True IDE mode, program both chip selects. */
+ octeon_cf_set_boot_reg_cfg(cs + 1);
+
+
+ use_iordy = ata_pio_need_iordy(dev);
+
+ reg_tim.u64 = cvmx_read_csr(CVMX_MIO_BOOT_REG_TIMX(cs));
+ /* Disable page mode */
+ reg_tim.s.pagem = 0;
+ /* Enable dynamic timing */
+ reg_tim.s.waitm = use_iordy;
+ /* Pages are disabled */
+ reg_tim.s.pages = 0;
+ /* We don't use multiplexed address mode */
+ reg_tim.s.ale = 0;
+ /* Not used */
+ reg_tim.s.page = 0;
+ /* Time after IORDY to coninue to assert the data */
+ reg_tim.s.wait = 0;
+ /* Time to wait to complete the cycle. */
+ reg_tim.s.pause = pause;
+ /* How long to hold after a write to de-assert CE. */
+ reg_tim.s.wr_hld = trh;
+ /* How long to wait after a read to de-assert CE. */
+ reg_tim.s.rd_hld = trh;
+ /* How long write enable is asserted */
+ reg_tim.s.we = t2;
+ /* How long read enable is asserted */
+ reg_tim.s.oe = t2;
+ /* Time after CE that read/write starts */
+ reg_tim.s.ce = ns_to_tim_reg(2, 5);
+ /* Time before CE that address is valid */
+ reg_tim.s.adr = 0;
+
+ /* Program the bootbus region timing for the data port chip select. */
+ cvmx_write_csr(CVMX_MIO_BOOT_REG_TIMX(cs), reg_tim.u64);
+ if (ocd->dma_engine >= 0)
+ /* True IDE mode, program both chip selects. */
+ cvmx_write_csr(CVMX_MIO_BOOT_REG_TIMX(cs + 1), reg_tim.u64);
+}
+
+static void octeon_cf_set_dmamode(struct ata_port *ap, struct ata_device *dev)
+{
+ struct octeon_cf_data *ocd = dev->link->ap->dev->platform_data;
+ union cvmx_mio_boot_dma_timx dma_tim;
+ unsigned int oe_a;
+ unsigned int oe_n;
+ unsigned int dma_ackh;
+ unsigned int dma_arq;
+ unsigned int pause;
+ unsigned int T0, Tkr, Td;
+ unsigned int tim_mult;
+
+ const struct ata_timing *timing;
+
+ timing = ata_timing_find_mode(dev->dma_mode);
+ T0 = timing->cycle;
+ Td = timing->active;
+ Tkr = timing->recover;
+ dma_ackh = timing->dmack_hold;
+
+ dma_tim.u64 = 0;
+ /* dma_tim.s.tim_mult = 0 --> 4x */
+ tim_mult = 4;
+
+ /* not spec'ed, value in eclocks, not affected by tim_mult */
+ dma_arq = 8;
+ pause = 25 - dma_arq * 1000 /
+ (octeon_get_clock_rate() / 1000000); /* Tz */
+
+ oe_a = Td;
+ /* Tkr from cf spec, lengthened to meet T0 */
+ oe_n = max(T0 - oe_a, Tkr);
+
+ dma_tim.s.dmack_pi = 1;
+
+ dma_tim.s.oe_n = ns_to_tim_reg(tim_mult, oe_n);
+ dma_tim.s.oe_a = ns_to_tim_reg(tim_mult, oe_a);
+
+ /*
+ * This is tI, C.F. spec. says 0, but Sony CF card requires
+ * more, we use 20 nS.
+ */
+ dma_tim.s.dmack_s = ns_to_tim_reg(tim_mult, 20);;
+ dma_tim.s.dmack_h = ns_to_tim_reg(tim_mult, dma_ackh);
+
+ dma_tim.s.dmarq = dma_arq;
+ dma_tim.s.pause = ns_to_tim_reg(tim_mult, pause);
+
+ dma_tim.s.rd_dly = 0; /* Sample right on edge */
+
+ /* writes only */
+ dma_tim.s.we_n = ns_to_tim_reg(tim_mult, oe_n);
+ dma_tim.s.we_a = ns_to_tim_reg(tim_mult, oe_a);
+
+ pr_debug("ns to ticks (mult %d) of %d is: %d\n", tim_mult, 60,
+ ns_to_tim_reg(tim_mult, 60));
+ pr_debug("oe_n: %d, oe_a: %d, dmack_s: %d, dmack_h: "
+ "%d, dmarq: %d, pause: %d\n",
+ dma_tim.s.oe_n, dma_tim.s.oe_a, dma_tim.s.dmack_s,
+ dma_tim.s.dmack_h, dma_tim.s.dmarq, dma_tim.s.pause);
+
+ cvmx_write_csr(CVMX_MIO_BOOT_DMA_TIMX(ocd->dma_engine),
+ dma_tim.u64);
+
+}
+
+/**
+ * Handle an 8 bit I/O request.
+ *
+ * @dev: Device to access
+ * @buffer: Data buffer
+ * @buflen: Length of the buffer.
+ * @rw: True to write.
+ */
+static unsigned int octeon_cf_data_xfer8(struct ata_device *dev,
+ unsigned char *buffer,
+ unsigned int buflen,
+ int rw)
+{
+ struct ata_port *ap = dev->link->ap;
+ void __iomem *data_addr = ap->ioaddr.data_addr;
+ unsigned long words;
+ int count;
+
+ words = buflen;
+ if (rw) {
+ count = 16;
+ while (words--) {
+ iowrite8(*buffer, data_addr);
+ buffer++;
+ /*
+ * Every 16 writes do a read so the bootbus
+ * FIFO doesn't fill up.
+ */
+ if (--count == 0) {
+ ioread8(ap->ioaddr.altstatus_addr);
+ count = 16;
+ }
+ }
+ } else {
+ ioread8_rep(data_addr, buffer, words);
+ }
+ return buflen;
+}
+
+/**
+ * Handle a 16 bit I/O request.
+ *
+ * @dev: Device to access
+ * @buffer: Data buffer
+ * @buflen: Length of the buffer.
+ * @rw: True to write.
+ */
+static unsigned int octeon_cf_data_xfer16(struct ata_device *dev,
+ unsigned char *buffer,
+ unsigned int buflen,
+ int rw)
+{
+ struct ata_port *ap = dev->link->ap;
+ void __iomem *data_addr = ap->ioaddr.data_addr;
+ unsigned long words;
+ int count;
+
+ words = buflen / 2;
+ if (rw) {
+ count = 16;
+ while (words--) {
+ iowrite16(*(uint16_t *)buffer, data_addr);
+ buffer += sizeof(uint16_t);
+ /*
+ * Every 16 writes do a read so the bootbus
+ * FIFO doesn't fill up.
+ */
+ if (--count == 0) {
+ ioread8(ap->ioaddr.altstatus_addr);
+ count = 16;
+ }
+ }
+ } else {
+ while (words--) {
+ *(uint16_t *)buffer = ioread16(data_addr);
+ buffer += sizeof(uint16_t);
+ }
+ }
+ /* Transfer trailing 1 byte, if any. */
+ if (unlikely(buflen & 0x01)) {
+ __le16 align_buf[1] = { 0 };
+
+ if (rw == READ) {
+ align_buf[0] = cpu_to_le16(ioread16(data_addr));
+ memcpy(buffer, align_buf, 1);
+ } else {
+ memcpy(align_buf, buffer, 1);
+ iowrite16(le16_to_cpu(align_buf[0]), data_addr);
+ }
+ words++;
+ }
+ return buflen;
+}
+
+/**
+ * Read the taskfile for 16bit non-True IDE only.
+ */
+static void octeon_cf_tf_read16(struct ata_port *ap, struct ata_taskfile *tf)
+{
+ u16 blob;
+ /* The base of the registers is at ioaddr.data_addr. */
+ void __iomem *base = ap->ioaddr.data_addr;
+
+ blob = __raw_readw(base + 0xc);
+ tf->feature = blob >> 8;
+
+ blob = __raw_readw(base + 2);
+ tf->nsect = blob & 0xff;
+ tf->lbal = blob >> 8;
+
+ blob = __raw_readw(base + 4);
+ tf->lbam = blob & 0xff;
+ tf->lbah = blob >> 8;
+
+ blob = __raw_readw(base + 6);
+ tf->device = blob & 0xff;
+ tf->command = blob >> 8;
+
+ if (tf->flags & ATA_TFLAG_LBA48) {
+ if (likely(ap->ioaddr.ctl_addr)) {
+ iowrite8(tf->ctl | ATA_HOB, ap->ioaddr.ctl_addr);
+
+ blob = __raw_readw(base + 0xc);
+ tf->hob_feature = blob >> 8;
+
+ blob = __raw_readw(base + 2);
+ tf->hob_nsect = blob & 0xff;
+ tf->hob_lbal = blob >> 8;
+
+ blob = __raw_readw(base + 4);
+ tf->hob_lbam = blob & 0xff;
+ tf->hob_lbah = blob >> 8;
+
+ iowrite8(tf->ctl, ap->ioaddr.ctl_addr);
+ ap->last_ctl = tf->ctl;
+ } else {
+ WARN_ON(1);
+ }
+ }
+}
+
+static u8 octeon_cf_check_status16(struct ata_port *ap)
+{
+ u16 blob;
+ void __iomem *base = ap->ioaddr.data_addr;
+
+ blob = __raw_readw(base + 6);
+ return blob >> 8;
+}
+
+static int octeon_cf_softreset16(struct ata_link *link, unsigned int *classes,
+ unsigned long deadline)
+{
+ struct ata_port *ap = link->ap;
+ void __iomem *base = ap->ioaddr.data_addr;
+ int rc;
+ u8 err;
+
+ DPRINTK("about to softreset\n");
+ __raw_writew(ap->ctl, base + 0xe);
+ udelay(20);
+ __raw_writew(ap->ctl | ATA_SRST, base + 0xe);
+ udelay(20);
+ __raw_writew(ap->ctl, base + 0xe);
+
+ rc = ata_sff_wait_after_reset(link, 1, deadline);
+ if (rc) {
+ ata_link_printk(link, KERN_ERR, "SRST failed (errno=%d)\n", rc);
+ return rc;
+ }
+
+ /* determine by signature whether we have ATA or ATAPI devices */
+ classes[0] = ata_sff_dev_classify(&link->device[0], 1, &err);
+ DPRINTK("EXIT, classes[0]=%u [1]=%u\n", classes[0], classes[1]);
+ return 0;
+}
+
+/**
+ * Load the taskfile for 16bit non-True IDE only. The device_addr is
+ * not loaded, we do this as part of octeon_cf_exec_command16.
+ */
+static void octeon_cf_tf_load16(struct ata_port *ap,
+ const struct ata_taskfile *tf)
+{
+ unsigned int is_addr = tf->flags & ATA_TFLAG_ISADDR;
+ /* The base of the registers is at ioaddr.data_addr. */
+ void __iomem *base = ap->ioaddr.data_addr;
+
+ if (tf->ctl != ap->last_ctl) {
+ iowrite8(tf->ctl, ap->ioaddr.ctl_addr);
+ ap->last_ctl = tf->ctl;
+ ata_wait_idle(ap);
+ }
+ if (is_addr && (tf->flags & ATA_TFLAG_LBA48)) {
+ __raw_writew(tf->hob_feature << 8, base + 0xc);
+ __raw_writew(tf->hob_nsect | tf->hob_lbal << 8, base + 2);
+ __raw_writew(tf->hob_lbam | tf->hob_lbah << 8, base + 4);
+ VPRINTK("hob: feat 0x%X nsect 0x%X, lba 0x%X 0x%X 0x%X\n",
+ tf->hob_feature,
+ tf->hob_nsect,
+ tf->hob_lbal,
+ tf->hob_lbam,
+ tf->hob_lbah);
+ }
+ if (is_addr) {
+ __raw_writew(tf->feature << 8, base + 0xc);
+ __raw_writew(tf->nsect | tf->lbal << 8, base + 2);
+ __raw_writew(tf->lbam | tf->lbah << 8, base + 4);
+ VPRINTK("feat 0x%X nsect 0x%X, lba 0x%X 0x%X 0x%X\n",
+ tf->feature,
+ tf->nsect,
+ tf->lbal,
+ tf->lbam,
+ tf->lbah);
+ }
+ ata_wait_idle(ap);
+}
+
+
+static void octeon_cf_dev_select(struct ata_port *ap, unsigned int device)
+{
+/* There is only one device, do nothing. */
+ return;
+}
+
+/*
+ * Issue ATA command to host controller. The device_addr is also sent
+ * as it must be written in a combined write with the command.
+ */
+static void octeon_cf_exec_command16(struct ata_port *ap,
+ const struct ata_taskfile *tf)
+{
+ /* The base of the registers is at ioaddr.data_addr. */
+ void __iomem *base = ap->ioaddr.data_addr;
+ u16 blob;
+
+ if (tf->flags & ATA_TFLAG_DEVICE) {
+ VPRINTK("device 0x%X\n", tf->device);
+ blob = tf->device;
+ } else {
+ blob = 0;
+ }
+
+ DPRINTK("ata%u: cmd 0x%X\n", ap->print_id, tf->command);
+ blob |= (tf->command << 8);
+ __raw_writew(blob, base + 6);
+
+
+ ata_wait_idle(ap);
+}
+
+static u8 octeon_cf_irq_on(struct ata_port *ap)
+{
+ return 0;
+}
+
+static void octeon_cf_irq_clear(struct ata_port *ap)
+{
+ return;
+}
+
+static void octeon_cf_dma_setup(struct ata_queued_cmd *qc)
+{
+ struct ata_port *ap = qc->ap;
+ struct octeon_cf_port *cf_port;
+
+ cf_port = (struct octeon_cf_port *)ap->private_data;
+ DPRINTK("ENTER\n");
+ /* issue r/w command */
+ qc->cursg = qc->sg;
+ cf_port->dma_finished = 0;
+ ap->ops->sff_exec_command(ap, &qc->tf);
+ DPRINTK("EXIT\n");
+}
+
+/**
+ * Start a DMA transfer that was already setup
+ *
+ * @qc: Information about the DMA
+ */
+static void octeon_cf_dma_start(struct ata_queued_cmd *qc)
+{
+ struct octeon_cf_data *ocd = qc->ap->dev->platform_data;
+ union cvmx_mio_boot_dma_cfgx mio_boot_dma_cfg;
+ union cvmx_mio_boot_dma_intx mio_boot_dma_int;
+ struct scatterlist *sg;
+
+ VPRINTK("%d scatterlists\n", qc->n_elem);
+
+ /* Get the scatter list entry we need to DMA into */
+ sg = qc->cursg;
+ BUG_ON(!sg);
+
+ /*
+ * Clear the DMA complete status.
+ */
+ mio_boot_dma_int.u64 = 0;
+ mio_boot_dma_int.s.done = 1;
+ cvmx_write_csr(CVMX_MIO_BOOT_DMA_INTX(ocd->dma_engine),
+ mio_boot_dma_int.u64);
+
+ /* Enable the interrupt. */
+ cvmx_write_csr(CVMX_MIO_BOOT_DMA_INT_ENX(ocd->dma_engine),
+ mio_boot_dma_int.u64);
+
+ /* Set the direction of the DMA */
+ mio_boot_dma_cfg.u64 = 0;
+ mio_boot_dma_cfg.s.en = 1;
+ mio_boot_dma_cfg.s.rw = ((qc->tf.flags & ATA_TFLAG_WRITE) != 0);
+
+ /*
+ * Don't stop the DMA if the device deasserts DMARQ. Many
+ * compact flashes deassert DMARQ for a short time between
+ * sectors. Instead of stopping and restarting the DMA, we'll
+ * let the hardware do it. If the DMA is really stopped early
+ * due to an error condition, a later timeout will force us to
+ * stop.
+ */
+ mio_boot_dma_cfg.s.clr = 0;
+
+ /* Size is specified in 16bit words and minus one notation */
+ mio_boot_dma_cfg.s.size = sg_dma_len(sg) / 2 - 1;
+
+ /* We need to swap the high and low bytes of every 16 bits */
+ mio_boot_dma_cfg.s.swap8 = 1;
+
+ mio_boot_dma_cfg.s.adr = sg_dma_address(sg);
+
+ VPRINTK("%s %d bytes address=%p\n",
+ (mio_boot_dma_cfg.s.rw) ? "write" : "read", sg->length,
+ (void *)(unsigned long)mio_boot_dma_cfg.s.adr);
+
+ cvmx_write_csr(CVMX_MIO_BOOT_DMA_CFGX(ocd->dma_engine),
+ mio_boot_dma_cfg.u64);
+}
+
+/**
+ *
+ * LOCKING:
+ * spin_lock_irqsave(host lock)
+ *
+ */
+static unsigned int octeon_cf_dma_finished(struct ata_port *ap,
+ struct ata_queued_cmd *qc)
+{
+ struct ata_eh_info *ehi = &ap->link.eh_info;
+ struct octeon_cf_data *ocd = ap->dev->platform_data;
+ union cvmx_mio_boot_dma_cfgx dma_cfg;
+ union cvmx_mio_boot_dma_intx dma_int;
+ struct octeon_cf_port *cf_port;
+ u8 status;
+
+ VPRINTK("ata%u: protocol %d task_state %d\n",
+ ap->print_id, qc->tf.protocol, ap->hsm_task_state);
+
+
+ if (ap->hsm_task_state != HSM_ST_LAST)
+ return 0;
+
+ cf_port = (struct octeon_cf_port *)ap->private_data;
+
+ dma_cfg.u64 = cvmx_read_csr(CVMX_MIO_BOOT_DMA_CFGX(ocd->dma_engine));
+ if (dma_cfg.s.size != 0xfffff) {
+ /* Error, the transfer was not complete. */
+ qc->err_mask |= AC_ERR_HOST_BUS;
+ ap->hsm_task_state = HSM_ST_ERR;
+ }
+
+ /* Stop and clear the dma engine. */
+ dma_cfg.u64 = 0;
+ dma_cfg.s.size = -1;
+ cvmx_write_csr(CVMX_MIO_BOOT_DMA_CFGX(ocd->dma_engine), dma_cfg.u64);
+
+ /* Disable the interrupt. */
+ dma_int.u64 = 0;
+ cvmx_write_csr(CVMX_MIO_BOOT_DMA_INT_ENX(ocd->dma_engine), dma_int.u64);
+
+ /* Clear the DMA complete status */
+ dma_int.s.done = 1;
+ cvmx_write_csr(CVMX_MIO_BOOT_DMA_INTX(ocd->dma_engine), dma_int.u64);
+
+ status = ap->ops->sff_check_status(ap);
+
+ ata_sff_hsm_move(ap, qc, status, 0);
+
+ if (unlikely(qc->err_mask) && (qc->tf.protocol == ATA_PROT_DMA))
+ ata_ehi_push_desc(ehi, "DMA stat 0x%x", status);
+
+ return 1;
+}
+
+/*
+ * Check if any queued commands have more DMAs, if so start the next
+ * transfer, else do end of transfer handling.
+ */
+static irqreturn_t octeon_cf_interrupt(int irq, void *dev_instance)
+{
+ struct ata_host *host = dev_instance;
+ struct octeon_cf_port *cf_port;
+ int i;
+ unsigned int handled = 0;
+ unsigned long flags;
+
+ spin_lock_irqsave(&host->lock, flags);
+
+ DPRINTK("ENTER\n");
+ for (i = 0; i < host->n_ports; i++) {
+ u8 status;
+ struct ata_port *ap;
+ struct ata_queued_cmd *qc;
+ union cvmx_mio_boot_dma_intx dma_int;
+ union cvmx_mio_boot_dma_cfgx dma_cfg;
+ struct octeon_cf_data *ocd;
+
+ ap = host->ports[i];
+ ocd = ap->dev->platform_data;
+ if (!ap || (ap->flags & ATA_FLAG_DISABLED))
+ continue;
+
+ ocd = ap->dev->platform_data;
+ cf_port = (struct octeon_cf_port *)ap->private_data;
+ dma_int.u64 =
+ cvmx_read_csr(CVMX_MIO_BOOT_DMA_INTX(ocd->dma_engine));
+ dma_cfg.u64 =
+ cvmx_read_csr(CVMX_MIO_BOOT_DMA_CFGX(ocd->dma_engine));
+
+ qc = ata_qc_from_tag(ap, ap->link.active_tag);
+
+ if (qc && (!(qc->tf.flags & ATA_TFLAG_POLLING)) &&
+ (qc->flags & ATA_QCFLAG_ACTIVE)) {
+ if (dma_int.s.done && !dma_cfg.s.en) {
+ if (!sg_is_last(qc->cursg)) {
+ qc->cursg = sg_next(qc->cursg);
+ handled = 1;
+ octeon_cf_dma_start(qc);
+ continue;
+ } else {
+ cf_port->dma_finished = 1;
+ }
+ }
+ if (!cf_port->dma_finished)
+ continue;
+ status = ioread8(ap->ioaddr.altstatus_addr);
+ if (status & (ATA_BUSY | ATA_DRQ)) {
+ /*
+ * We are busy, try to handle it
+ * later. This is the DMA finished
+ * interrupt, and it could take a
+ * little while for the card to be
+ * ready for more commands.
+ */
+ /* Clear DMA irq. */
+ dma_int.u64 = 0;
+ dma_int.s.done = 1;
+ cvmx_write_csr(CVMX_MIO_BOOT_DMA_INTX(ocd->dma_engine),
+ dma_int.u64);
+
+ queue_delayed_work(cf_port->wq,
+ &cf_port->delayed_finish, 1);
+ handled = 1;
+ } else {
+ handled |= octeon_cf_dma_finished(ap, qc);
+ }
+ }
+ }
+ spin_unlock_irqrestore(&host->lock, flags);
+ DPRINTK("EXIT\n");
+ return IRQ_RETVAL(handled);
+}
+
+static void octeon_cf_delayed_finish(struct work_struct *work)
+{
+ struct octeon_cf_port *cf_port = container_of(work,
+ struct octeon_cf_port,
+ delayed_finish.work);
+ struct ata_port *ap = cf_port->ap;
+ struct ata_host *host = ap->host;
+ struct ata_queued_cmd *qc;
+ unsigned long flags;
+ u8 status;
+
+ spin_lock_irqsave(&host->lock, flags);
+
+ /*
+ * If the port is not waiting for completion, it must have
+ * handled it previously. The hsm_task_state is
+ * protected by host->lock.
+ */
+ if (ap->hsm_task_state != HSM_ST_LAST || !cf_port->dma_finished)
+ goto out;
+
+ status = ioread8(ap->ioaddr.altstatus_addr);
+ if (status & (ATA_BUSY | ATA_DRQ)) {
+ /* Still busy, try again. */
+ queue_delayed_work(cf_port->wq,
+ &cf_port->delayed_finish, 1);
+ goto out;
+ }
+ qc = ata_qc_from_tag(ap, ap->link.active_tag);
+ if (qc && (!(qc->tf.flags & ATA_TFLAG_POLLING)) &&
+ (qc->flags & ATA_QCFLAG_ACTIVE))
+ octeon_cf_dma_finished(ap, qc);
+out:
+ spin_unlock_irqrestore(&host->lock, flags);
+}
+
+static void octeon_cf_dev_config(struct ata_device *dev)
+{
+ /*
+ * A maximum of 2^20 - 1 16 bit transfers are possible with
+ * the bootbus DMA. So we need to throttle max_sectors to
+ * (2^12 - 1 == 4095) to assure that this can never happen.
+ */
+ dev->max_sectors = min(dev->max_sectors, 4095U);
+}
+
+/*
+ * Trap if driver tries to do standard bmdma commands. They are not
+ * supported.
+ */
+static void unreachable_qc(struct ata_queued_cmd *qc)
+{
+ BUG();
+}
+
+static u8 unreachable_port(struct ata_port *ap)
+{
+ BUG();
+}
+
+/*
+ * We don't do ATAPI DMA so return 0.
+ */
+static int octeon_cf_check_atapi_dma(struct ata_queued_cmd *qc)
+{
+ return 0;
+}
+
+static unsigned int octeon_cf_qc_issue(struct ata_queued_cmd *qc)
+{
+ struct ata_port *ap = qc->ap;
+
+ switch (qc->tf.protocol) {
+ case ATA_PROT_DMA:
+ WARN_ON(qc->tf.flags & ATA_TFLAG_POLLING);
+
+ ap->ops->sff_tf_load(ap, &qc->tf); /* load tf registers */
+ octeon_cf_dma_setup(qc); /* set up dma */
+ octeon_cf_dma_start(qc); /* initiate dma */
+ ap->hsm_task_state = HSM_ST_LAST;
+ break;
+
+ case ATAPI_PROT_DMA:
+ dev_err(ap->dev, "Error, ATAPI not supported\n");
+ BUG();
+
+ default:
+ return ata_sff_qc_issue(qc);
+ }
+
+ return 0;
+}
+
+static struct ata_port_operations octeon_cf_ops = {
+ .inherits = &ata_sff_port_ops,
+ .check_atapi_dma = octeon_cf_check_atapi_dma,
+ .qc_prep = ata_noop_qc_prep,
+ .qc_issue = octeon_cf_qc_issue,
+ .sff_dev_select = octeon_cf_dev_select,
+ .sff_irq_on = octeon_cf_irq_on,
+ .sff_irq_clear = octeon_cf_irq_clear,
+ .bmdma_setup = unreachable_qc,
+ .bmdma_start = unreachable_qc,
+ .bmdma_stop = unreachable_qc,
+ .bmdma_status = unreachable_port,
+ .cable_detect = ata_cable_40wire,
+ .set_piomode = octeon_cf_set_piomode,
+ .set_dmamode = octeon_cf_set_dmamode,
+ .dev_config = octeon_cf_dev_config,
+};
+
+static int __devinit octeon_cf_probe(struct platform_device *pdev)
+{
+ struct resource *res_cs0, *res_cs1;
+
+ void __iomem *cs0;
+ void __iomem *cs1 = NULL;
+ struct ata_host *host;
+ struct ata_port *ap;
+ struct octeon_cf_data *ocd;
+ int irq = 0;
+ irq_handler_t irq_handler = NULL;
+ void __iomem *base;
+ struct octeon_cf_port *cf_port;
+
+ res_cs0 = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+
+ if (!res_cs0)
+ return -EINVAL;
+
+ ocd = pdev->dev.platform_data;
+
+ cs0 = devm_ioremap_nocache(&pdev->dev, res_cs0->start,
+ res_cs0->end - res_cs0->start + 1);
+
+ if (!cs0)
+ return -ENOMEM;
+
+ /* Determine from availability of DMA if True IDE mode or not */
+ if (ocd->dma_engine >= 0) {
+ res_cs1 = platform_get_resource(pdev, IORESOURCE_MEM, 1);
+ if (!res_cs1)
+ return -EINVAL;
+
+ cs1 = devm_ioremap_nocache(&pdev->dev, res_cs1->start,
+ res_cs0->end - res_cs1->start + 1);
+
+ if (!cs1)
+ return -ENOMEM;
+ }
+
+ cf_port = kzalloc(sizeof(*cf_port), GFP_KERNEL);
+ if (!cf_port)
+ return -ENOMEM;
+
+ /* allocate host */
+ host = ata_host_alloc(&pdev->dev, 1);
+ if (!host)
+ goto free_cf_port;
+
+ ap = host->ports[0];
+ ap->private_data = cf_port;
+ cf_port->ap = ap;
+ ap->ops = &octeon_cf_ops;
+ ap->pio_mask = 0x7f; /* Support PIO 0-6 */
+ ap->flags |= ATA_FLAG_MMIO | ATA_FLAG_NO_LEGACY
+ | ATA_FLAG_NO_ATAPI | ATA_FLAG_PIO_POLLING;
+
+ base = cs0 + ocd->base_region_bias;
+ if (!ocd->is16bit) {
+ ap->ioaddr.cmd_addr = base;
+ ata_sff_std_ports(&ap->ioaddr);
+
+ ap->ioaddr.altstatus_addr = base + 0xe;
+ ap->ioaddr.ctl_addr = base + 0xe;
+ octeon_cf_ops.sff_data_xfer = octeon_cf_data_xfer8;
+ } else if (cs1) {
+ /* Presence of cs1 indicates True IDE mode. */
+ ap->ioaddr.cmd_addr = base + (ATA_REG_CMD << 1) + 1;
+ ap->ioaddr.data_addr = base + (ATA_REG_DATA << 1);
+ ap->ioaddr.error_addr = base + (ATA_REG_ERR << 1) + 1;
+ ap->ioaddr.feature_addr = base + (ATA_REG_FEATURE << 1) + 1;
+ ap->ioaddr.nsect_addr = base + (ATA_REG_NSECT << 1) + 1;
+ ap->ioaddr.lbal_addr = base + (ATA_REG_LBAL << 1) + 1;
+ ap->ioaddr.lbam_addr = base + (ATA_REG_LBAM << 1) + 1;
+ ap->ioaddr.lbah_addr = base + (ATA_REG_LBAH << 1) + 1;
+ ap->ioaddr.device_addr = base + (ATA_REG_DEVICE << 1) + 1;
+ ap->ioaddr.status_addr = base + (ATA_REG_STATUS << 1) + 1;
+ ap->ioaddr.command_addr = base + (ATA_REG_CMD << 1) + 1;
+ ap->ioaddr.altstatus_addr = cs1 + (6 << 1) + 1;
+ ap->ioaddr.ctl_addr = cs1 + (6 << 1) + 1;
+ octeon_cf_ops.sff_data_xfer = octeon_cf_data_xfer16;
+
+ ap->mwdma_mask = 0x1f; /* Support MWDMA 0-4 */
+ irq = platform_get_irq(pdev, 0);
+ irq_handler = octeon_cf_interrupt;
+
+ /* True IDE mode needs delayed work to poll for not-busy. */
+ cf_port->wq = create_singlethread_workqueue(DRV_NAME);
+ if (!cf_port->wq)
+ goto free_cf_port;
+ INIT_DELAYED_WORK(&cf_port->delayed_finish,
+ octeon_cf_delayed_finish);
+
+ } else {
+ /* 16 bit but not True IDE */
+ octeon_cf_ops.sff_data_xfer = octeon_cf_data_xfer16;
+ octeon_cf_ops.softreset = octeon_cf_softreset16;
+ octeon_cf_ops.sff_check_status = octeon_cf_check_status16;
+ octeon_cf_ops.sff_tf_read = octeon_cf_tf_read16;
+ octeon_cf_ops.sff_tf_load = octeon_cf_tf_load16;
+ octeon_cf_ops.sff_exec_command = octeon_cf_exec_command16;
+
+ ap->ioaddr.data_addr = base + ATA_REG_DATA;
+ ap->ioaddr.nsect_addr = base + ATA_REG_NSECT;
+ ap->ioaddr.lbal_addr = base + ATA_REG_LBAL;
+ ap->ioaddr.ctl_addr = base + 0xe;
+ ap->ioaddr.altstatus_addr = base + 0xe;
+ }
+
+ ata_port_desc(ap, "cmd %p ctl %p", base, ap->ioaddr.ctl_addr);
+
+
+ dev_info(&pdev->dev, "version " DRV_VERSION" %d bit%s.\n",
+ (ocd->is16bit) ? 16 : 8,
+ (cs1) ? ", True IDE" : "");
+
+
+ return ata_host_activate(host, irq, irq_handler, 0, &octeon_cf_sht);
+
+free_cf_port:
+ kfree(cf_port);
+ return -ENOMEM;
+}
+
+static struct platform_driver octeon_cf_driver = {
+ .probe = octeon_cf_probe,
+ .driver = {
+ .name = DRV_NAME,
+ .owner = THIS_MODULE,
+ },
+};
+
+static int __init octeon_cf_init(void)
+{
+ return platform_driver_register(&octeon_cf_driver);
+}
+
+
+MODULE_AUTHOR("David Daney <ddaney@caviumnetworks.com>");
+MODULE_DESCRIPTION("low-level driver for Cavium OCTEON Compact Flash PATA");
+MODULE_LICENSE("GPL");
+MODULE_VERSION(DRV_VERSION);
+MODULE_ALIAS("platform:" DRV_NAME);
+
+module_init(octeon_cf_init);
diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c
index 1a56db9..55bc88c 100644
--- a/drivers/ata/sata_fsl.c
+++ b/drivers/ata/sata_fsl.c
@@ -1288,7 +1288,7 @@ static const struct ata_port_info sata_fsl_port_info[] = {
static int sata_fsl_probe(struct of_device *ofdev,
const struct of_device_id *match)
{
- int retval = 0;
+ int retval = -ENXIO;
void __iomem *hcr_base = NULL;
void __iomem *ssr_base = NULL;
void __iomem *csr_base = NULL;
diff --git a/drivers/ata/sata_via.c b/drivers/ata/sata_via.c
index c18935f..5c62da9 100644
--- a/drivers/ata/sata_via.c
+++ b/drivers/ata/sata_via.c
@@ -92,6 +92,8 @@ static const struct pci_device_id svia_pci_tbl[] = {
{ PCI_VDEVICE(VIA, 0x5372), vt6420 },
{ PCI_VDEVICE(VIA, 0x7372), vt6420 },
{ PCI_VDEVICE(VIA, 0x5287), vt8251 }, /* 2 sata chnls (Master/Slave) */
+ { PCI_VDEVICE(VIA, 0x9000), vt8251 },
+ { PCI_VDEVICE(VIA, 0x9040), vt8251 },
{ } /* terminate list */
};
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
index 841f460..0782900 100644
--- a/drivers/scsi/ipr.c
+++ b/drivers/scsi/ipr.c
@@ -4912,7 +4912,7 @@ static int ipr_ioctl(struct scsi_device *sdev, int cmd, void __user *arg)
if (res && ipr_is_gata(res)) {
if (cmd == HDIO_GET_IDENTITY)
return -ENOTTY;
- return ata_scsi_ioctl(sdev, cmd, arg);
+ return ata_sas_scsi_ioctl(res->sata_port->ap, sdev, cmd, arg);
}
return -EINVAL;
diff --git a/drivers/scsi/libsas/sas_scsi_host.c b/drivers/scsi/libsas/sas_scsi_host.c
index 7448387..1c558d3 100644
--- a/drivers/scsi/libsas/sas_scsi_host.c
+++ b/drivers/scsi/libsas/sas_scsi_host.c
@@ -717,7 +717,7 @@ int sas_ioctl(struct scsi_device *sdev, int cmd, void __user *arg)
struct domain_device *dev = sdev_to_domain_dev(sdev);
if (dev_is_sata(dev))
- return ata_scsi_ioctl(sdev, cmd, arg);
+ return ata_sas_scsi_ioctl(dev->sata_dev.ap, sdev, cmd, arg);
return -EINVAL;
}
diff --git a/include/linux/libata.h b/include/linux/libata.h
index b6b8a7f..2c6bd66 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -401,12 +401,14 @@ enum {
ATA_TIMING_CYC8B,
ATA_TIMING_ACTIVE = (1 << 4),
ATA_TIMING_RECOVER = (1 << 5),
- ATA_TIMING_CYCLE = (1 << 6),
- ATA_TIMING_UDMA = (1 << 7),
+ ATA_TIMING_DMACK_HOLD = (1 << 6),
+ ATA_TIMING_CYCLE = (1 << 7),
+ ATA_TIMING_UDMA = (1 << 8),
ATA_TIMING_ALL = ATA_TIMING_SETUP | ATA_TIMING_ACT8B |
ATA_TIMING_REC8B | ATA_TIMING_CYC8B |
ATA_TIMING_ACTIVE | ATA_TIMING_RECOVER |
- ATA_TIMING_CYCLE | ATA_TIMING_UDMA,
+ ATA_TIMING_DMACK_HOLD | ATA_TIMING_CYCLE |
+ ATA_TIMING_UDMA,
};
enum ata_xfer_mask {
@@ -866,6 +868,7 @@ struct ata_timing {
unsigned short cyc8b; /* t0 for 8-bit I/O */
unsigned short active; /* t2 or tD */
unsigned short recover; /* t2i or tK */
+ unsigned short dmack_hold; /* tj */
unsigned short cycle; /* t0 */
unsigned short udma; /* t2CYCTYP/2 */
};
@@ -927,6 +930,8 @@ extern void ata_host_init(struct ata_host *, struct device *,
extern int ata_scsi_detect(struct scsi_host_template *sht);
extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg);
extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *));
+extern int ata_sas_scsi_ioctl(struct ata_port *ap, struct scsi_device *dev,
+ int cmd, void __user *arg);
extern void ata_sas_port_destroy(struct ata_port *);
extern struct ata_port *ata_sas_port_alloc(struct ata_host *,
struct ata_port_info *, struct Scsi_Host *);
^ permalink raw reply related [flat|nested] 263+ messages in thread
* [git patches] libata fixes
@ 2009-01-13 15:39 Jeff Garzik
0 siblings, 0 replies; 263+ messages in thread
From: Jeff Garzik @ 2009-01-13 15:39 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide, LKML
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/libata-sff.c | 9 ++++++---
drivers/ata/pata_it821x.c | 17 +++++++++++++----
2 files changed, 19 insertions(+), 7 deletions(-)
Alan Cox (1):
pata_it821x: Update RDC UDMA handling
Christian Borntraeger (1):
ata: fix wrong WARN_ON_ONCE
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
index 0eae9b4..5a4aad1 100644
--- a/drivers/ata/libata-sff.c
+++ b/drivers/ata/libata-sff.c
@@ -1013,9 +1013,12 @@ next_sg:
qc->cursg_ofs = 0;
}
- /* consumed can be larger than count only for the last transfer */
- WARN_ON_ONCE(qc->cursg && count != consumed);
-
+ /*
+ * There used to be a WARN_ON_ONCE(qc->cursg && count != consumed);
+ * Unfortunately __atapi_pio_bytes doesn't know enough to do the WARN
+ * check correctly as it doesn't know if it is the last request being
+ * made. Somebody should implement a proper sanity check.
+ */
if (bytes)
goto next_sg;
return 0;
diff --git a/drivers/ata/pata_it821x.c b/drivers/ata/pata_it821x.c
index f828a29..f1bb2f9 100644
--- a/drivers/ata/pata_it821x.c
+++ b/drivers/ata/pata_it821x.c
@@ -80,7 +80,7 @@
#define DRV_NAME "pata_it821x"
-#define DRV_VERSION "0.4.0"
+#define DRV_VERSION "0.4.2"
struct it821x_dev
{
@@ -494,8 +494,6 @@ static int it821x_smart_set_mode(struct ata_link *link, struct ata_device **unus
* special. In our case we need to lock the sector count to avoid
* blowing the brains out of the firmware with large LBA48 requests
*
- * FIXME: When FUA appears we need to block FUA too. And SMART and
- * basically we need to filter commands for this chip.
*/
static void it821x_dev_config(struct ata_device *adev)
@@ -890,6 +888,13 @@ static int it821x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
.flags = ATA_FLAG_SLAVE_POSS,
.pio_mask = 0x1f,
.mwdma_mask = 0x07,
+ .udma_mask = ATA_UDMA6,
+ .port_ops = &it821x_rdc_port_ops
+ };
+ static const struct ata_port_info info_rdc_11 = {
+ .flags = ATA_FLAG_SLAVE_POSS,
+ .pio_mask = 0x1f,
+ .mwdma_mask = 0x07,
/* No UDMA */
.port_ops = &it821x_rdc_port_ops
};
@@ -903,7 +908,11 @@ static int it821x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
return rc;
if (pdev->vendor == PCI_VENDOR_ID_RDC) {
- ppi[0] = &info_rdc;
+ /* Deal with Vortex86SX */
+ if (pdev->revision == 0x11)
+ ppi[0] = &info_rdc_11;
+ else
+ ppi[0] = &info_rdc;
} else {
/* Force the card into bypass mode if so requested */
if (it8212_noraid) {
^ permalink raw reply related [flat|nested] 263+ messages in thread
* [git patches] libata fixes
@ 2008-12-16 11:05 Jeff Garzik
0 siblings, 0 replies; 263+ messages in thread
From: Jeff Garzik @ 2008-12-16 11:05 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide, LKML
1) More pata_hpt366 [major] fixes
2) Fix NCQ blacklist. A better fix will shorten this list through
smarter blacklist wildcard code, but that better fix is not
appropriate for -rc. This is actually the minimal -rc/stable fix.
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/libata-core.c | 65 ++++++++++++++++++++++++++++++++++++++++----
drivers/ata/pata_hpt366.c | 12 ++++++--
2 files changed, 68 insertions(+), 9 deletions(-)
Tejun Heo (3):
libata: fix Seagate NCQ+FLUSH blacklist
pata_hpt366: fix cable detection,
pata_hpt366: no ATAPI DMA
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 5e2eb74..bc6695e 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -4050,17 +4050,70 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
{ "ST3160023AS", "3.42", ATA_HORKAGE_NONCQ },
/* Seagate NCQ + FLUSH CACHE firmware bug */
- { "ST31500341AS", "9JU138", ATA_HORKAGE_NONCQ |
+ { "ST31500341AS", "SD15", ATA_HORKAGE_NONCQ |
ATA_HORKAGE_FIRMWARE_WARN },
- { "ST31000333AS", "9FZ136", ATA_HORKAGE_NONCQ |
+ { "ST31500341AS", "SD16", ATA_HORKAGE_NONCQ |
ATA_HORKAGE_FIRMWARE_WARN },
- { "ST3640623AS", "9FZ164", ATA_HORKAGE_NONCQ |
+ { "ST31500341AS", "SD17", ATA_HORKAGE_NONCQ |
ATA_HORKAGE_FIRMWARE_WARN },
- { "ST3640323AS", "9FZ134", ATA_HORKAGE_NONCQ |
+ { "ST31500341AS", "SD18", ATA_HORKAGE_NONCQ |
ATA_HORKAGE_FIRMWARE_WARN },
- { "ST3320813AS", "9FZ182", ATA_HORKAGE_NONCQ |
+ { "ST31500341AS", "SD19", ATA_HORKAGE_NONCQ |
ATA_HORKAGE_FIRMWARE_WARN },
- { "ST3320613AS", "9FZ162", ATA_HORKAGE_NONCQ |
+
+ { "ST31000333AS", "SD15", ATA_HORKAGE_NONCQ |
+ ATA_HORKAGE_FIRMWARE_WARN },
+ { "ST31000333AS", "SD16", ATA_HORKAGE_NONCQ |
+ ATA_HORKAGE_FIRMWARE_WARN },
+ { "ST31000333AS", "SD17", ATA_HORKAGE_NONCQ |
+ ATA_HORKAGE_FIRMWARE_WARN },
+ { "ST31000333AS", "SD18", ATA_HORKAGE_NONCQ |
+ ATA_HORKAGE_FIRMWARE_WARN },
+ { "ST31000333AS", "SD19", ATA_HORKAGE_NONCQ |
+ ATA_HORKAGE_FIRMWARE_WARN },
+
+ { "ST3640623AS", "SD15", ATA_HORKAGE_NONCQ |
+ ATA_HORKAGE_FIRMWARE_WARN },
+ { "ST3640623AS", "SD16", ATA_HORKAGE_NONCQ |
+ ATA_HORKAGE_FIRMWARE_WARN },
+ { "ST3640623AS", "SD17", ATA_HORKAGE_NONCQ |
+ ATA_HORKAGE_FIRMWARE_WARN },
+ { "ST3640623AS", "SD18", ATA_HORKAGE_NONCQ |
+ ATA_HORKAGE_FIRMWARE_WARN },
+ { "ST3640623AS", "SD19", ATA_HORKAGE_NONCQ |
+ ATA_HORKAGE_FIRMWARE_WARN },
+
+ { "ST3640323AS", "SD15", ATA_HORKAGE_NONCQ |
+ ATA_HORKAGE_FIRMWARE_WARN },
+ { "ST3640323AS", "SD16", ATA_HORKAGE_NONCQ |
+ ATA_HORKAGE_FIRMWARE_WARN },
+ { "ST3640323AS", "SD17", ATA_HORKAGE_NONCQ |
+ ATA_HORKAGE_FIRMWARE_WARN },
+ { "ST3640323AS", "SD18", ATA_HORKAGE_NONCQ |
+ ATA_HORKAGE_FIRMWARE_WARN },
+ { "ST3640323AS", "SD19", ATA_HORKAGE_NONCQ |
+ ATA_HORKAGE_FIRMWARE_WARN },
+
+ { "ST3320813AS", "SD15", ATA_HORKAGE_NONCQ |
+ ATA_HORKAGE_FIRMWARE_WARN },
+ { "ST3320813AS", "SD16", ATA_HORKAGE_NONCQ |
+ ATA_HORKAGE_FIRMWARE_WARN },
+ { "ST3320813AS", "SD17", ATA_HORKAGE_NONCQ |
+ ATA_HORKAGE_FIRMWARE_WARN },
+ { "ST3320813AS", "SD18", ATA_HORKAGE_NONCQ |
+ ATA_HORKAGE_FIRMWARE_WARN },
+ { "ST3320813AS", "SD19", ATA_HORKAGE_NONCQ |
+ ATA_HORKAGE_FIRMWARE_WARN },
+
+ { "ST3320613AS", "SD15", ATA_HORKAGE_NONCQ |
+ ATA_HORKAGE_FIRMWARE_WARN },
+ { "ST3320613AS", "SD16", ATA_HORKAGE_NONCQ |
+ ATA_HORKAGE_FIRMWARE_WARN },
+ { "ST3320613AS", "SD17", ATA_HORKAGE_NONCQ |
+ ATA_HORKAGE_FIRMWARE_WARN },
+ { "ST3320613AS", "SD18", ATA_HORKAGE_NONCQ |
+ ATA_HORKAGE_FIRMWARE_WARN },
+ { "ST3320613AS", "SD19", ATA_HORKAGE_NONCQ |
ATA_HORKAGE_FIRMWARE_WARN },
/* Blacklist entries taken from Silicon Image 3124/3132
diff --git a/drivers/ata/pata_hpt366.c b/drivers/ata/pata_hpt366.c
index a098ba8..e0c4f05 100644
--- a/drivers/ata/pata_hpt366.c
+++ b/drivers/ata/pata_hpt366.c
@@ -183,7 +183,9 @@ static unsigned long hpt366_filter(struct ata_device *adev, unsigned long mask)
mask &= ~(0xF8 << ATA_SHIFT_UDMA);
if (hpt_dma_blacklisted(adev, "UDMA4", bad_ata66_4))
mask &= ~(0xF0 << ATA_SHIFT_UDMA);
- }
+ } else if (adev->class == ATA_DEV_ATAPI)
+ mask &= ~(ATA_MASK_MWDMA | ATA_MASK_UDMA);
+
return ata_bmdma_mode_filter(adev, mask);
}
@@ -211,11 +213,15 @@ static u32 hpt36x_find_mode(struct ata_port *ap, int speed)
static int hpt36x_cable_detect(struct ata_port *ap)
{
- u8 ata66;
struct pci_dev *pdev = to_pci_dev(ap->host->dev);
+ u8 ata66;
+ /*
+ * Each channel of pata_hpt366 occupies separate PCI function
+ * as the primary channel and bit1 indicates the cable type.
+ */
pci_read_config_byte(pdev, 0x5A, &ata66);
- if (ata66 & (1 << ap->port_no))
+ if (ata66 & 2)
return ATA_CBL_PATA40;
return ATA_CBL_PATA80;
}
^ permalink raw reply related [flat|nested] 263+ messages in thread
* Re: [git patches] libata fixes
[not found] ` <200812091825.mB9IPRwq027199@lxorguk.ukuu.org.uk>
@ 2008-12-09 18:28 ` Alan Cox
0 siblings, 0 replies; 263+ messages in thread
From: Alan Cox @ 2008-12-09 18:28 UTC (permalink / raw)
To: Andrey Borzenkov; +Cc: Jeff Garzik, linux-kernel, linux-ide
> Not willing to sound as if I'm nitpicking, but it still has issues with ATAPI DMA on some chipsets and runs with ATAPI DMA disabled by default. Should not it be mentioned somehow?
That and a lot of other information is in the libata wiki.
Alan
^ permalink raw reply [flat|nested] 263+ messages in thread
* [git patches] libata fixes
@ 2008-12-09 5:51 Jeff Garzik
[not found] ` <200812091825.mB9IPRwq027199@lxorguk.ukuu.org.uk>
0 siblings, 1 reply; 263+ messages in thread
From: Jeff Garzik @ 2008-12-09 5:51 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide, LKML
The largest (yet least significant) part of this is Alan's Kconfig
patch, which updates the tags to reflect the state of the drivers --
largely a documentation patch.
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/Kconfig | 44 ++++++++++++++++++++++----------------------
drivers/ata/ata_piix.c | 9 ++++++++-
drivers/ata/pata_hpt366.c | 4 ++--
drivers/ata/pata_ninja32.c | 9 +++++++--
drivers/ata/pata_sis.c | 1 -
5 files changed, 39 insertions(+), 28 deletions(-)
Alan Cox (3):
pata_sis: Remove bogus cable match
pata_ninja32: update ID table
ata: Fix experimental tags
Jiri Slaby (1):
ATA: piix, fix pointer deref on suspend
Tejun Heo (1):
pata_hpt366: fix clock detection
diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
index 78fbec8..421b7c7 100644
--- a/drivers/ata/Kconfig
+++ b/drivers/ata/Kconfig
@@ -153,7 +153,7 @@ config SATA_PROMISE
If unsure, say N.
config SATA_SX4
- tristate "Promise SATA SX4 support"
+ tristate "Promise SATA SX4 support (Experimental)"
depends on PCI && EXPERIMENTAL
help
This option enables support for Promise Serial ATA SX4.
@@ -219,8 +219,8 @@ config PATA_ACPI
otherwise unsupported hardware.
config PATA_ALI
- tristate "ALi PATA support (Experimental)"
- depends on PCI && EXPERIMENTAL
+ tristate "ALi PATA support"
+ depends on PCI
help
This option enables support for the ALi ATA interfaces
found on the many ALi chipsets.
@@ -263,7 +263,7 @@ config PATA_ATIIXP
If unsure, say N.
config PATA_CMD640_PCI
- tristate "CMD640 PCI PATA support (Very Experimental)"
+ tristate "CMD640 PCI PATA support (Experimental)"
depends on PCI && EXPERIMENTAL
help
This option enables support for the CMD640 PCI IDE
@@ -291,8 +291,8 @@ config PATA_CS5520
If unsure, say N.
config PATA_CS5530
- tristate "CS5530 PATA support (Experimental)"
- depends on PCI && EXPERIMENTAL
+ tristate "CS5530 PATA support"
+ depends on PCI
help
This option enables support for the Cyrix/NatSemi/AMD CS5530
companion chip used with the MediaGX/Geode processor family.
@@ -309,8 +309,8 @@ config PATA_CS5535
If unsure, say N.
config PATA_CS5536
- tristate "CS5536 PATA support (Experimental)"
- depends on PCI && X86 && !X86_64 && EXPERIMENTAL
+ tristate "CS5536 PATA support"
+ depends on PCI && X86 && !X86_64
help
This option enables support for the AMD CS5536
companion chip used with the Geode LX processor family.
@@ -363,7 +363,7 @@ config PATA_HPT37X
If unsure, say N.
config PATA_HPT3X2N
- tristate "HPT 372N/302N PATA support (Very Experimental)"
+ tristate "HPT 372N/302N PATA support (Experimental)"
depends on PCI && EXPERIMENTAL
help
This option enables support for the N variant HPT PATA
@@ -389,8 +389,8 @@ config PATA_HPT3X3_DMA
problems with DMA on this chipset.
config PATA_ISAPNP
- tristate "ISA Plug and Play PATA support (Experimental)"
- depends on EXPERIMENTAL && ISAPNP
+ tristate "ISA Plug and Play PATA support"
+ depends on ISAPNP
help
This option enables support for ISA plug & play ATA
controllers such as those found on old soundcards.
@@ -498,8 +498,8 @@ config PATA_NINJA32
If unsure, say N.
config PATA_NS87410
- tristate "Nat Semi NS87410 PATA support (Experimental)"
- depends on PCI && EXPERIMENTAL
+ tristate "Nat Semi NS87410 PATA support"
+ depends on PCI
help
This option enables support for the National Semiconductor
NS87410 PCI-IDE controller.
@@ -507,8 +507,8 @@ config PATA_NS87410
If unsure, say N.
config PATA_NS87415
- tristate "Nat Semi NS87415 PATA support (Experimental)"
- depends on PCI && EXPERIMENTAL
+ tristate "Nat Semi NS87415 PATA support"
+ depends on PCI
help
This option enables support for the National Semiconductor
NS87415 PCI-IDE controller.
@@ -544,8 +544,8 @@ config PATA_PCMCIA
If unsure, say N.
config PATA_PDC_OLD
- tristate "Older Promise PATA controller support (Experimental)"
- depends on PCI && EXPERIMENTAL
+ tristate "Older Promise PATA controller support"
+ depends on PCI
help
This option enables support for the Promise 20246, 20262, 20263,
20265 and 20267 adapters.
@@ -559,7 +559,7 @@ config PATA_QDI
Support for QDI 6500 and 6580 PATA controllers on VESA local bus.
config PATA_RADISYS
- tristate "RADISYS 82600 PATA support (Very Experimental)"
+ tristate "RADISYS 82600 PATA support (Experimental)"
depends on PCI && EXPERIMENTAL
help
This option enables support for the RADISYS 82600
@@ -586,8 +586,8 @@ config PATA_RZ1000
If unsure, say N.
config PATA_SC1200
- tristate "SC1200 PATA support (Very Experimental)"
- depends on PCI && EXPERIMENTAL
+ tristate "SC1200 PATA support"
+ depends on PCI
help
This option enables support for the NatSemi/AMD SC1200 SoC
companion chip used with the Geode processor family.
@@ -620,8 +620,8 @@ config PATA_SIL680
If unsure, say N.
config PATA_SIS
- tristate "SiS PATA support (Experimental)"
- depends on PCI && EXPERIMENTAL
+ tristate "SiS PATA support"
+ depends on PCI
help
This option enables support for SiS PATA controllers
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index d6d97d8..c11936e 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -1072,7 +1072,14 @@ static int piix_broken_suspend(void)
* matching is necessary because dmi_system_id.matches is
* limited to four entries.
*/
- if (!strcmp(dmi_get_system_info(DMI_SYS_VENDOR), "TOSHIBA") &&
+ if (dmi_get_system_info(DMI_SYS_VENDOR) &&
+ dmi_get_system_info(DMI_PRODUCT_NAME) &&
+ dmi_get_system_info(DMI_PRODUCT_VERSION) &&
+ dmi_get_system_info(DMI_PRODUCT_SERIAL) &&
+ dmi_get_system_info(DMI_BOARD_VENDOR) &&
+ dmi_get_system_info(DMI_BOARD_NAME) &&
+ dmi_get_system_info(DMI_BOARD_VERSION) &&
+ !strcmp(dmi_get_system_info(DMI_SYS_VENDOR), "TOSHIBA") &&
!strcmp(dmi_get_system_info(DMI_PRODUCT_NAME), "000000") &&
!strcmp(dmi_get_system_info(DMI_PRODUCT_VERSION), "000000") &&
!strcmp(dmi_get_system_info(DMI_PRODUCT_SERIAL), "000000") &&
diff --git a/drivers/ata/pata_hpt366.c b/drivers/ata/pata_hpt366.c
index f2b83ea..a098ba8 100644
--- a/drivers/ata/pata_hpt366.c
+++ b/drivers/ata/pata_hpt366.c
@@ -382,10 +382,10 @@ static int hpt36x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
/* PCI clocking determines the ATA timing values to use */
/* info_hpt366 is safe against re-entry so we can scribble on it */
switch((reg1 & 0x700) >> 8) {
- case 5:
+ case 9:
hpriv = &hpt366_40;
break;
- case 9:
+ case 5:
hpriv = &hpt366_25;
break;
default:
diff --git a/drivers/ata/pata_ninja32.c b/drivers/ata/pata_ninja32.c
index 4e466ea..4dd9a3b 100644
--- a/drivers/ata/pata_ninja32.c
+++ b/drivers/ata/pata_ninja32.c
@@ -44,7 +44,7 @@
#include <linux/libata.h>
#define DRV_NAME "pata_ninja32"
-#define DRV_VERSION "0.1.1"
+#define DRV_VERSION "0.1.3"
/**
@@ -130,7 +130,8 @@ static int ninja32_init_one(struct pci_dev *dev, const struct pci_device_id *id)
return rc;
pci_set_master(dev);
- /* Set up the register mappings */
+ /* Set up the register mappings. We use the I/O mapping as only the
+ older chips also have MMIO on BAR 1 */
base = host->iomap[0];
if (!base)
return -ENOMEM;
@@ -167,8 +168,12 @@ static int ninja32_reinit_one(struct pci_dev *pdev)
#endif
static const struct pci_device_id ninja32[] = {
+ { 0x10FC, 0x0003, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ { 0x1145, 0x8008, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ { 0x1145, 0xf008, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
{ 0x1145, 0xf021, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
{ 0x1145, 0xf024, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ { 0x1145, 0xf02C, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
{ },
};
diff --git a/drivers/ata/pata_sis.c b/drivers/ata/pata_sis.c
index d342366..e4be55e 100644
--- a/drivers/ata/pata_sis.c
+++ b/drivers/ata/pata_sis.c
@@ -56,7 +56,6 @@ static const struct sis_laptop sis_laptop[] = {
{ 0x5513, 0x1043, 0x1107 }, /* ASUS A6K */
{ 0x5513, 0x1734, 0x105F }, /* FSC Amilo A1630 */
{ 0x5513, 0x1071, 0x8640 }, /* EasyNote K5305 */
- { 0x5513, 0x1039, 0x5513 }, /* Targa Visionary 1000 */
/* end marker */
{ 0, }
};
^ permalink raw reply related [flat|nested] 263+ messages in thread
* [git patches] libata fixes
@ 2008-12-01 19:06 Jeff Garzik
0 siblings, 0 replies; 263+ messages in thread
From: Jeff Garzik @ 2008-12-01 19:06 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide, LKML
1) pata_rb532_cf significant fixes
2) laptop- and drive-specific workarounds
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/ata_piix.c | 15 +++++++++++++++
drivers/ata/libata-core.c | 21 +++++++++++++++++++++
drivers/ata/pata_rb532_cf.c | 15 ++++++++++-----
include/linux/libata.h | 1 +
4 files changed, 47 insertions(+), 5 deletions(-)
Phil Sutter (2):
[libata] pata_rb532_cf: fix and rename register definitions
[libata] pata_rb532_cf: fix signature of the xfer function
Tejun Heo (2):
ata_piix: add borked Tecra M4 to broken suspend list
libata: blacklist Seagate drives which time out FLUSH_CACHE when used with NCQ
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index 8e37be1..d6d97d8 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -1066,6 +1066,21 @@ static int piix_broken_suspend(void)
if (dmi_find_device(DMI_DEV_TYPE_OEM_STRING, oemstrs[i], NULL))
return 1;
+ /* TECRA M4 sometimes forgets its identify and reports bogus
+ * DMI information. As the bogus information is a bit
+ * generic, match as many entries as possible. This manual
+ * matching is necessary because dmi_system_id.matches is
+ * limited to four entries.
+ */
+ if (!strcmp(dmi_get_system_info(DMI_SYS_VENDOR), "TOSHIBA") &&
+ !strcmp(dmi_get_system_info(DMI_PRODUCT_NAME), "000000") &&
+ !strcmp(dmi_get_system_info(DMI_PRODUCT_VERSION), "000000") &&
+ !strcmp(dmi_get_system_info(DMI_PRODUCT_SERIAL), "000000") &&
+ !strcmp(dmi_get_system_info(DMI_BOARD_VENDOR), "TOSHIBA") &&
+ !strcmp(dmi_get_system_info(DMI_BOARD_NAME), "Portable PC") &&
+ !strcmp(dmi_get_system_info(DMI_BOARD_VERSION), "Version A0"))
+ return 1;
+
return 0;
}
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 4214bfb..5e2eb74 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -2492,6 +2492,13 @@ int ata_dev_configure(struct ata_device *dev)
}
}
+ if ((dev->horkage & ATA_HORKAGE_FIRMWARE_WARN) && print_info) {
+ ata_dev_printk(dev, KERN_WARNING, "WARNING: device requires "
+ "firmware update to be fully functional.\n");
+ ata_dev_printk(dev, KERN_WARNING, " contact the vendor "
+ "or visit http://ata.wiki.kernel.org.\n");
+ }
+
return 0;
err_out_nosup:
@@ -4042,6 +4049,20 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
{ "ST380817AS", "3.42", ATA_HORKAGE_NONCQ },
{ "ST3160023AS", "3.42", ATA_HORKAGE_NONCQ },
+ /* Seagate NCQ + FLUSH CACHE firmware bug */
+ { "ST31500341AS", "9JU138", ATA_HORKAGE_NONCQ |
+ ATA_HORKAGE_FIRMWARE_WARN },
+ { "ST31000333AS", "9FZ136", ATA_HORKAGE_NONCQ |
+ ATA_HORKAGE_FIRMWARE_WARN },
+ { "ST3640623AS", "9FZ164", ATA_HORKAGE_NONCQ |
+ ATA_HORKAGE_FIRMWARE_WARN },
+ { "ST3640323AS", "9FZ134", ATA_HORKAGE_NONCQ |
+ ATA_HORKAGE_FIRMWARE_WARN },
+ { "ST3320813AS", "9FZ182", ATA_HORKAGE_NONCQ |
+ ATA_HORKAGE_FIRMWARE_WARN },
+ { "ST3320613AS", "9FZ162", ATA_HORKAGE_NONCQ |
+ ATA_HORKAGE_FIRMWARE_WARN },
+
/* Blacklist entries taken from Silicon Image 3124/3132
Windows driver .inf file - also several Linux problem reports */
{ "HTS541060G9SA00", "MB3OC60D", ATA_HORKAGE_NONCQ, },
diff --git a/drivers/ata/pata_rb532_cf.c b/drivers/ata/pata_rb532_cf.c
index f8b3ffc..c2e6fb9 100644
--- a/drivers/ata/pata_rb532_cf.c
+++ b/drivers/ata/pata_rb532_cf.c
@@ -39,9 +39,11 @@
#define RB500_CF_MAXPORTS 1
#define RB500_CF_IO_DELAY 400
-#define RB500_CF_REG_CMD 0x0800
+#define RB500_CF_REG_BASE 0x0800
+#define RB500_CF_REG_ERR 0x080D
#define RB500_CF_REG_CTRL 0x080E
-#define RB500_CF_REG_DATA 0x0C00
+/* 32bit buffered data register offset */
+#define RB500_CF_REG_DBUF32 0x0C00
struct rb532_cf_info {
void __iomem *iobase;
@@ -72,11 +74,12 @@ static void rb532_pata_exec_command(struct ata_port *ap,
rb532_pata_finish_io(ap);
}
-static void rb532_pata_data_xfer(struct ata_device *adev, unsigned char *buf,
+static unsigned int rb532_pata_data_xfer(struct ata_device *adev, unsigned char *buf,
unsigned int buflen, int write_data)
{
struct ata_port *ap = adev->link->ap;
void __iomem *ioaddr = ap->ioaddr.data_addr;
+ int retlen = buflen;
if (write_data) {
for (; buflen > 0; buflen--, buf++)
@@ -87,6 +90,7 @@ static void rb532_pata_data_xfer(struct ata_device *adev, unsigned char *buf,
}
rb532_pata_finish_io(adev->link->ap);
+ return retlen;
}
static void rb532_pata_freeze(struct ata_port *ap)
@@ -146,13 +150,14 @@ static void rb532_pata_setup_ports(struct ata_host *ah)
ap->pio_mask = 0x1f; /* PIO4 */
ap->flags = ATA_FLAG_NO_LEGACY | ATA_FLAG_MMIO;
- ap->ioaddr.cmd_addr = info->iobase + RB500_CF_REG_CMD;
+ ap->ioaddr.cmd_addr = info->iobase + RB500_CF_REG_BASE;
ap->ioaddr.ctl_addr = info->iobase + RB500_CF_REG_CTRL;
ap->ioaddr.altstatus_addr = info->iobase + RB500_CF_REG_CTRL;
ata_sff_std_ports(&ap->ioaddr);
- ap->ioaddr.data_addr = info->iobase + RB500_CF_REG_DATA;
+ ap->ioaddr.data_addr = info->iobase + RB500_CF_REG_DBUF32;
+ ap->ioaddr.error_addr = info->iobase + RB500_CF_REG_ERR;
}
static __devinit int rb532_pata_driver_probe(struct platform_device *pdev)
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 59b0f1c..ed3f26e 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -375,6 +375,7 @@ enum {
ATA_HORKAGE_BRIDGE_OK = (1 << 10), /* no bridge limits */
ATA_HORKAGE_ATAPI_MOD16_DMA = (1 << 11), /* use ATAPI DMA for commands
not multiple of 16 bytes */
+ ATA_HORKAGE_FIRMWARE_WARN = (1 << 12), /* firwmare update warning */
/* DMA mask for user DMA control: User visible values; DO NOT
renumber */
^ permalink raw reply related [flat|nested] 263+ messages in thread
* [git patches] libata fixes
@ 2008-11-11 8:06 Jeff Garzik
0 siblings, 0 replies; 263+ messages in thread
From: Jeff Garzik @ 2008-11-11 8:06 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide, LKML
* pata_sch failed to probe and support PATA slave devices... doh
* another 1.5TB drive fix (Roland)
* PMP fix from Tejun
* other minor stuff
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/libata-core.c | 2 +-
drivers/ata/libata-eh.c | 21 +++++++++++----------
drivers/ata/pata_cs5535.c | 1 -
drivers/ata/pata_cs5536.c | 1 -
drivers/ata/pata_pcmcia.c | 1 +
drivers/ata/pata_sch.c | 2 +-
6 files changed, 14 insertions(+), 14 deletions(-)
Marc Pignat (1):
[libata] pata_pcmcia: another memory card support
Mark Salter (1):
[libata] pata_sch: notice attached slave devices
Qinghuang Feng (1):
[libata] pata_cs553*.c: cleanup kernel-doc
Roland Dreier (1):
libata: Avoid overflow in ata_tf_read_block() when tf->hba_lbal > 127
Tejun Heo (1):
libata: fix last_reset timestamp handling
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 0cd3ad4..4214bfb 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -612,7 +612,7 @@ u64 ata_tf_read_block(struct ata_taskfile *tf, struct ata_device *dev)
if (tf->flags & ATA_TFLAG_LBA48) {
block |= (u64)tf->hob_lbah << 40;
block |= (u64)tf->hob_lbam << 32;
- block |= tf->hob_lbal << 24;
+ block |= (u64)tf->hob_lbal << 24;
} else
block |= (tf->device & 0xf) << 24;
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 8077bdf..32da9a9 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -610,9 +610,6 @@ void ata_scsi_error(struct Scsi_Host *host)
if (ata_ncq_enabled(dev))
ehc->saved_ncq_enabled |= 1 << devno;
}
-
- /* set last reset timestamp to some time in the past */
- ehc->last_reset = jiffies - 60 * HZ;
}
ap->pflags |= ATA_PFLAG_EH_IN_PROGRESS;
@@ -2281,17 +2278,21 @@ int ata_eh_reset(struct ata_link *link, int classify,
if (link->flags & ATA_LFLAG_NO_SRST)
softreset = NULL;
- now = jiffies;
- deadline = ata_deadline(ehc->last_reset, ATA_EH_RESET_COOL_DOWN);
- if (time_before(now, deadline))
- schedule_timeout_uninterruptible(deadline - now);
+ /* make sure each reset attemp is at least COOL_DOWN apart */
+ if (ehc->i.flags & ATA_EHI_DID_RESET) {
+ now = jiffies;
+ WARN_ON(time_after(ehc->last_reset, now));
+ deadline = ata_deadline(ehc->last_reset,
+ ATA_EH_RESET_COOL_DOWN);
+ if (time_before(now, deadline))
+ schedule_timeout_uninterruptible(deadline - now);
+ }
spin_lock_irqsave(ap->lock, flags);
ap->pflags |= ATA_PFLAG_RESETTING;
spin_unlock_irqrestore(ap->lock, flags);
ata_eh_about_to_do(link, NULL, ATA_EH_RESET);
- ehc->last_reset = jiffies;
ata_link_for_each_dev(dev, link) {
/* If we issue an SRST then an ATA drive (not ATAPI)
@@ -2379,7 +2380,6 @@ int ata_eh_reset(struct ata_link *link, int classify,
/*
* Perform reset
*/
- ehc->last_reset = jiffies;
if (ata_is_host_link(link))
ata_eh_freeze_port(ap);
@@ -2391,6 +2391,7 @@ int ata_eh_reset(struct ata_link *link, int classify,
reset == softreset ? "soft" : "hard");
/* mark that this EH session started with reset */
+ ehc->last_reset = jiffies;
if (reset == hardreset)
ehc->i.flags |= ATA_EHI_DID_HARDRESET;
else
@@ -2535,7 +2536,7 @@ int ata_eh_reset(struct ata_link *link, int classify,
ata_eh_done(link, NULL, ATA_EH_RESET);
if (slave)
ata_eh_done(slave, NULL, ATA_EH_RESET);
- ehc->last_reset = jiffies;
+ ehc->last_reset = jiffies; /* update to completion time */
ehc->i.action |= ATA_EH_REVALIDATE;
rc = 0;
diff --git a/drivers/ata/pata_cs5535.c b/drivers/ata/pata_cs5535.c
index 1b2d4a0..8b236af 100644
--- a/drivers/ata/pata_cs5535.c
+++ b/drivers/ata/pata_cs5535.c
@@ -72,7 +72,6 @@
/**
* cs5535_cable_detect - detect cable type
* @ap: Port to detect on
- * @deadline: deadline jiffies for the operation
*
* Perform cable detection for ATA66 capable cable. Return a libata
* cable type.
diff --git a/drivers/ata/pata_cs5536.c b/drivers/ata/pata_cs5536.c
index 73f8332..afed929 100644
--- a/drivers/ata/pata_cs5536.c
+++ b/drivers/ata/pata_cs5536.c
@@ -110,7 +110,6 @@ static inline int cs5536_write(struct pci_dev *pdev, int reg, int val)
/**
* cs5536_cable_detect - detect cable type
* @ap: Port to detect on
- * @deadline: deadline jiffies for the operation
*
* Perform cable detection for ATA66 capable cable. Return a libata
* cable type.
diff --git a/drivers/ata/pata_pcmcia.c b/drivers/ata/pata_pcmcia.c
index 271cb64..64b2e22 100644
--- a/drivers/ata/pata_pcmcia.c
+++ b/drivers/ata/pata_pcmcia.c
@@ -416,6 +416,7 @@ static struct pcmcia_device_id pcmcia_devices[] = {
PCMCIA_DEVICE_PROD_ID1("STI Flash", 0xe4a13209),
PCMCIA_DEVICE_PROD_ID12("STI", "Flash 5.0", 0xbf2df18d, 0x8cb57a0e),
PCMCIA_MFC_DEVICE_PROD_ID12(1, "SanDisk", "ConnectPlus", 0x7a954bd9, 0x74be00c6),
+ PCMCIA_DEVICE_PROD_ID2("Flash Card", 0x5a362506),
PCMCIA_DEVICE_NULL,
};
diff --git a/drivers/ata/pata_sch.c b/drivers/ata/pata_sch.c
index c8cc027..6aeeeeb 100644
--- a/drivers/ata/pata_sch.c
+++ b/drivers/ata/pata_sch.c
@@ -83,7 +83,7 @@ static struct ata_port_operations sch_pata_ops = {
};
static struct ata_port_info sch_port_info = {
- .flags = 0,
+ .flags = ATA_FLAG_SLAVE_POSS,
.pio_mask = ATA_PIO4, /* pio0-4 */
.mwdma_mask = ATA_MWDMA2, /* mwdma0-2 */
.udma_mask = ATA_UDMA5, /* udma0-5 */
^ permalink raw reply related [flat|nested] 263+ messages in thread
* [git patches] libata fixes
@ 2008-11-04 6:20 Jeff Garzik
0 siblings, 0 replies; 263+ messages in thread
From: Jeff Garzik @ 2008-11-04 6:20 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide, LKML
_Hopefully_ nailing down the last of the sata_nv EH problems.
Plus a key sata_promise fix.
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/libata-core.c | 6 +++-
drivers/ata/libata-scsi.c | 7 +++--
drivers/ata/sata_nv.c | 53 ++++++++++++++++++++-----------------------
drivers/ata/sata_promise.c | 20 ++++++++++++++++
drivers/ata/sata_via.c | 4 ++-
include/linux/libata.h | 2 +
6 files changed, 58 insertions(+), 34 deletions(-)
Elias Oltmanns (1):
libata: Fix a potential race condition in ata_scsi_park_show()
Marcin Slusarz (1):
sata_via: restore vt*_prepare_host error handling
Mikael Pettersson (1):
sata_promise: add ATA engine reset to reset ops
Tejun Heo (3):
sata_nv: fix generic, nf2/3 detection regression
libata: implement ATA_HORKAGE_ATAPI_MOD16_DMA and apply it
libata: mask off DET when restoring SControl for detach
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 82af701..622350d 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -4024,6 +4024,7 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
/* Weird ATAPI devices */
{ "TORiSAN DVD-ROM DRD-N216", NULL, ATA_HORKAGE_MAX_SEC_128 },
+ { "QUANTUM DAT DAT72-000", NULL, ATA_HORKAGE_ATAPI_MOD16_DMA },
/* Devices we expect to fail diagnostics */
@@ -4444,7 +4445,8 @@ int atapi_check_dma(struct ata_queued_cmd *qc)
/* Don't allow DMA if it isn't multiple of 16 bytes. Quite a
* few ATAPI devices choke on such DMA requests.
*/
- if (unlikely(qc->nbytes & 15))
+ if (!(qc->dev->horkage & ATA_HORKAGE_ATAPI_MOD16_DMA) &&
+ unlikely(qc->nbytes & 15))
return 1;
if (ap->ops->check_atapi_dma)
@@ -5934,7 +5936,7 @@ static void ata_port_detach(struct ata_port *ap)
* to us. Restore SControl and disable all existing devices.
*/
__ata_port_for_each_link(link, ap) {
- sata_scr_write(link, SCR_CONTROL, link->saved_scontrol);
+ sata_scr_write(link, SCR_CONTROL, link->saved_scontrol & 0xff0);
ata_link_for_each_dev(dev, link)
ata_dev_disable(dev);
}
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index bbb30d8..3fa75ea 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -190,7 +190,7 @@ static ssize_t ata_scsi_park_show(struct device *device,
struct ata_port *ap;
struct ata_link *link;
struct ata_device *dev;
- unsigned long flags;
+ unsigned long flags, now;
unsigned int uninitialized_var(msecs);
int rc = 0;
@@ -208,10 +208,11 @@ static ssize_t ata_scsi_park_show(struct device *device,
}
link = dev->link;
+ now = jiffies;
if (ap->pflags & ATA_PFLAG_EH_IN_PROGRESS &&
link->eh_context.unloaded_mask & (1 << dev->devno) &&
- time_after(dev->unpark_deadline, jiffies))
- msecs = jiffies_to_msecs(dev->unpark_deadline - jiffies);
+ time_after(dev->unpark_deadline, now))
+ msecs = jiffies_to_msecs(dev->unpark_deadline - now);
else
msecs = 0;
diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c
index fae3841..6f14606 100644
--- a/drivers/ata/sata_nv.c
+++ b/drivers/ata/sata_nv.c
@@ -307,10 +307,10 @@ static int nv_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val);
static void nv_nf2_freeze(struct ata_port *ap);
static void nv_nf2_thaw(struct ata_port *ap);
+static int nv_nf2_hardreset(struct ata_link *link, unsigned int *class,
+ unsigned long deadline);
static void nv_ck804_freeze(struct ata_port *ap);
static void nv_ck804_thaw(struct ata_port *ap);
-static int nv_hardreset(struct ata_link *link, unsigned int *class,
- unsigned long deadline);
static int nv_adma_slave_config(struct scsi_device *sdev);
static int nv_adma_check_atapi_dma(struct ata_queued_cmd *qc);
static void nv_adma_qc_prep(struct ata_queued_cmd *qc);
@@ -405,17 +405,8 @@ static struct scsi_host_template nv_swncq_sht = {
.slave_configure = nv_swncq_slave_config,
};
-/* OSDL bz3352 reports that some nv controllers can't determine device
- * signature reliably and nv_hardreset is implemented to work around
- * the problem. This was reported on nf3 and it's unclear whether any
- * other controllers are affected. However, the workaround has been
- * applied to all variants and there isn't much to gain by trying to
- * find out exactly which ones are affected at this point especially
- * because NV has moved over to ahci for newer controllers.
- */
static struct ata_port_operations nv_common_ops = {
.inherits = &ata_bmdma_port_ops,
- .hardreset = nv_hardreset,
.scr_read = nv_scr_read,
.scr_write = nv_scr_write,
};
@@ -429,12 +420,22 @@ static struct ata_port_operations nv_generic_ops = {
.hardreset = ATA_OP_NULL,
};
+/* OSDL bz3352 reports that nf2/3 controllers can't determine device
+ * signature reliably. Also, the following thread reports detection
+ * failure on cold boot with the standard debouncing timing.
+ *
+ * http://thread.gmane.org/gmane.linux.ide/34098
+ *
+ * Debounce with hotplug timing and request follow-up SRST.
+ */
static struct ata_port_operations nv_nf2_ops = {
.inherits = &nv_common_ops,
.freeze = nv_nf2_freeze,
.thaw = nv_nf2_thaw,
+ .hardreset = nv_nf2_hardreset,
};
+/* CK804 finally gets hardreset right */
static struct ata_port_operations nv_ck804_ops = {
.inherits = &nv_common_ops,
.freeze = nv_ck804_freeze,
@@ -443,7 +444,7 @@ static struct ata_port_operations nv_ck804_ops = {
};
static struct ata_port_operations nv_adma_ops = {
- .inherits = &nv_common_ops,
+ .inherits = &nv_ck804_ops,
.check_atapi_dma = nv_adma_check_atapi_dma,
.sff_tf_read = nv_adma_tf_read,
@@ -467,7 +468,7 @@ static struct ata_port_operations nv_adma_ops = {
};
static struct ata_port_operations nv_swncq_ops = {
- .inherits = &nv_common_ops,
+ .inherits = &nv_generic_ops,
.qc_defer = ata_std_qc_defer,
.qc_prep = nv_swncq_qc_prep,
@@ -1553,6 +1554,17 @@ static void nv_nf2_thaw(struct ata_port *ap)
iowrite8(mask, scr_addr + NV_INT_ENABLE);
}
+static int nv_nf2_hardreset(struct ata_link *link, unsigned int *class,
+ unsigned long deadline)
+{
+ bool online;
+ int rc;
+
+ rc = sata_link_hardreset(link, sata_deb_timing_hotplug, deadline,
+ &online, NULL);
+ return online ? -EAGAIN : rc;
+}
+
static void nv_ck804_freeze(struct ata_port *ap)
{
void __iomem *mmio_base = ap->host->iomap[NV_MMIO_BAR];
@@ -1605,21 +1617,6 @@ static void nv_mcp55_thaw(struct ata_port *ap)
ata_sff_thaw(ap);
}
-static int nv_hardreset(struct ata_link *link, unsigned int *class,
- unsigned long deadline)
-{
- int rc;
-
- /* SATA hardreset fails to retrieve proper device signature on
- * some controllers. Request follow up SRST. For more info,
- * see http://bugzilla.kernel.org/show_bug.cgi?id=3352
- */
- rc = sata_sff_hardreset(link, class, deadline);
- if (rc)
- return rc;
- return -EAGAIN;
-}
-
static void nv_adma_error_handler(struct ata_port *ap)
{
struct nv_adma_port_priv *pp = ap->private_data;
diff --git a/drivers/ata/sata_promise.c b/drivers/ata/sata_promise.c
index 750d8cd..ba9a257 100644
--- a/drivers/ata/sata_promise.c
+++ b/drivers/ata/sata_promise.c
@@ -153,6 +153,10 @@ static void pdc_freeze(struct ata_port *ap);
static void pdc_sata_freeze(struct ata_port *ap);
static void pdc_thaw(struct ata_port *ap);
static void pdc_sata_thaw(struct ata_port *ap);
+static int pdc_pata_softreset(struct ata_link *link, unsigned int *class,
+ unsigned long deadline);
+static int pdc_sata_hardreset(struct ata_link *link, unsigned int *class,
+ unsigned long deadline);
static void pdc_error_handler(struct ata_port *ap);
static void pdc_post_internal_cmd(struct ata_queued_cmd *qc);
static int pdc_pata_cable_detect(struct ata_port *ap);
@@ -186,6 +190,7 @@ static struct ata_port_operations pdc_sata_ops = {
.scr_read = pdc_sata_scr_read,
.scr_write = pdc_sata_scr_write,
.port_start = pdc_sata_port_start,
+ .hardreset = pdc_sata_hardreset,
};
/* First-generation chips need a more restrictive ->check_atapi_dma op */
@@ -200,6 +205,7 @@ static struct ata_port_operations pdc_pata_ops = {
.freeze = pdc_freeze,
.thaw = pdc_thaw,
.port_start = pdc_common_port_start,
+ .softreset = pdc_pata_softreset,
};
static const struct ata_port_info pdc_port_info[] = {
@@ -693,6 +699,20 @@ static void pdc_sata_thaw(struct ata_port *ap)
readl(host_mmio + hotplug_offset); /* flush */
}
+static int pdc_pata_softreset(struct ata_link *link, unsigned int *class,
+ unsigned long deadline)
+{
+ pdc_reset_port(link->ap);
+ return ata_sff_softreset(link, class, deadline);
+}
+
+static int pdc_sata_hardreset(struct ata_link *link, unsigned int *class,
+ unsigned long deadline)
+{
+ pdc_reset_port(link->ap);
+ return sata_sff_hardreset(link, class, deadline);
+}
+
static void pdc_error_handler(struct ata_port *ap)
{
if (!(ap->pflags & ATA_PFLAG_FROZEN))
diff --git a/drivers/ata/sata_via.c b/drivers/ata/sata_via.c
index 62367fe..c18935f 100644
--- a/drivers/ata/sata_via.c
+++ b/drivers/ata/sata_via.c
@@ -602,8 +602,10 @@ static int svia_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
rc = vt8251_prepare_host(pdev, &host);
break;
default:
- return -EINVAL;
+ rc = -EINVAL;
}
+ if (rc)
+ return rc;
svia_configure(pdev);
diff --git a/include/linux/libata.h b/include/linux/libata.h
index f5441ed..c7665a4 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -373,6 +373,8 @@ enum {
ATA_HORKAGE_IVB = (1 << 8), /* cbl det validity bit bugs */
ATA_HORKAGE_STUCK_ERR = (1 << 9), /* stuck ERR on next PACKET */
ATA_HORKAGE_BRIDGE_OK = (1 << 10), /* no bridge limits */
+ ATA_HORKAGE_ATAPI_MOD16_DMA = (1 << 11), /* use ATAPI DMA for commands
+ not multiple of 16 bytes */
/* DMA mask for user DMA control: User visible values; DO NOT
renumber */
^ permalink raw reply related [flat|nested] 263+ messages in thread
* Re: [git patches] libata fixes
2008-11-02 20:18 ` Greg Freemyer
@ 2008-11-02 23:42 ` Mark Lord
0 siblings, 0 replies; 263+ messages in thread
From: Mark Lord @ 2008-11-02 23:42 UTC (permalink / raw)
To: Greg Freemyer; +Cc: Jeff Garzik, Andrew Morton, Linus Torvalds, linux-ide, LKML
Greg Freemyer wrote:
> On Sun, Nov 2, 2008 at 8:21 AM, Jeff Garzik <jeff@garzik.org> wrote:
>> Greg Freemyer wrote:
>>> On Fri, Oct 31, 2008 at 1:49 AM, Jeff Garzik <jeff@garzik.org> wrote:
>>>> Notes:
>>>>
>>>> 1) 1.5TB drive fix from Roland
>>>>
>>>> 2) Tejun's sata_via brings a non-working via configuration thanks to a
>>>> new facility also being used in recent (ICH9/10) ata_piix.
>>>>
>>>> Change is longer than one might like, but it accurately describes the
>>>> hardware now, the previous stuff wasn't working, and the newly added
>>>> support code shouldn't touch non-broken VIA controllers.
>>>>
>>>>
>>>>
>>>> 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/ata_piix.c | 1 -
>>>> drivers/ata/libata-core.c | 11 +++-
>>>> drivers/ata/sata_via.c | 155
>>>> +++++++++++++++++++++++++++++++++++++++++----
>>>> include/linux/libata.h | 1 +
>>>> 4 files changed, 152 insertions(+), 16 deletions(-)
>>>>
>>>> Jens Axboe (1):
>>>> libata: add whitelist for devices with known good pata-sata bridges
>>>>
>>>> Randy Dunlap (1):
>>>> ATA: remove excess kernel-doc notation
>>>>
>>>> Roland Dreier (1):
>>>> libata: Avoid overflow in ata_tf_to_lba48() when tf->hba_lbal > 127
>>>>
>>>> Tejun Heo (1):
>>>> sata_via: fix support for 5287
>>> <snip>
>>>
>>>> diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
>>>> index 2ff633c..82af701 100644
>>>> --- a/drivers/ata/libata-core.c
>>>> +++ b/drivers/ata/libata-core.c
>>>> @@ -1268,7 +1268,7 @@ u64 ata_tf_to_lba48(const struct ata_taskfile *tf)
>>>>
>>>> sectors |= ((u64)(tf->hob_lbah & 0xff)) << 40;
>>>> sectors |= ((u64)(tf->hob_lbam & 0xff)) << 32;
>>>> - sectors |= (tf->hob_lbal & 0xff) << 24;
>>>> + sectors |= ((u64)(tf->hob_lbal & 0xff)) << 24;
>>>> sectors |= (tf->lbah & 0xff) << 16;
>>>> sectors |= (tf->lbam & 0xff) << 8;
>>>> sectors |= (tf->lbal & 0xff);
>>> <snip>
>>>
>>> That looks really serious.
>>>
>>> What happens with all previous / stable kernels when connecting up a
>>> 1.5TB drive and the user tries to use the last portion of the drive?
>> tf-to-lba48 is a far less common operation, generally used for error
>> reporting (and in Host-Protected Area code as well, it appears).
>>
>> Jeff
>
> So are you saying it is not on any data read / write paths?
>
> Or that it is only on rarely used data read/write paths?
>
> Because if this is on a data read/write path at all, it looks like it
> could cause major data corruption with 1.5 TB drives (or larger).
..
It's on the initialization path for all lba48 devices which have
a configured HPA (Host Protected Area, mostly seen in brand-name
consumer-level systems).
The data it generates is then used on subsequent R/W commands.
I recommend the fix be backported for earlier kernels.
Cheers
^ permalink raw reply [flat|nested] 263+ messages in thread
* Re: [git patches] libata fixes
2008-11-02 13:21 ` Jeff Garzik
@ 2008-11-02 20:18 ` Greg Freemyer
2008-11-02 23:42 ` Mark Lord
0 siblings, 1 reply; 263+ messages in thread
From: Greg Freemyer @ 2008-11-02 20:18 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Andrew Morton, Linus Torvalds, linux-ide, LKML
On Sun, Nov 2, 2008 at 8:21 AM, Jeff Garzik <jeff@garzik.org> wrote:
> Greg Freemyer wrote:
>>
>> On Fri, Oct 31, 2008 at 1:49 AM, Jeff Garzik <jeff@garzik.org> wrote:
>>>
>>> Notes:
>>>
>>> 1) 1.5TB drive fix from Roland
>>>
>>> 2) Tejun's sata_via brings a non-working via configuration thanks to a
>>> new facility also being used in recent (ICH9/10) ata_piix.
>>>
>>> Change is longer than one might like, but it accurately describes the
>>> hardware now, the previous stuff wasn't working, and the newly added
>>> support code shouldn't touch non-broken VIA controllers.
>>>
>>>
>>>
>>> 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/ata_piix.c | 1 -
>>> drivers/ata/libata-core.c | 11 +++-
>>> drivers/ata/sata_via.c | 155
>>> +++++++++++++++++++++++++++++++++++++++++----
>>> include/linux/libata.h | 1 +
>>> 4 files changed, 152 insertions(+), 16 deletions(-)
>>>
>>> Jens Axboe (1):
>>> libata: add whitelist for devices with known good pata-sata bridges
>>>
>>> Randy Dunlap (1):
>>> ATA: remove excess kernel-doc notation
>>>
>>> Roland Dreier (1):
>>> libata: Avoid overflow in ata_tf_to_lba48() when tf->hba_lbal > 127
>>>
>>> Tejun Heo (1):
>>> sata_via: fix support for 5287
>>
>> <snip>
>>
>>> diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
>>> index 2ff633c..82af701 100644
>>> --- a/drivers/ata/libata-core.c
>>> +++ b/drivers/ata/libata-core.c
>>> @@ -1268,7 +1268,7 @@ u64 ata_tf_to_lba48(const struct ata_taskfile *tf)
>>>
>>> sectors |= ((u64)(tf->hob_lbah & 0xff)) << 40;
>>> sectors |= ((u64)(tf->hob_lbam & 0xff)) << 32;
>>> - sectors |= (tf->hob_lbal & 0xff) << 24;
>>> + sectors |= ((u64)(tf->hob_lbal & 0xff)) << 24;
>>> sectors |= (tf->lbah & 0xff) << 16;
>>> sectors |= (tf->lbam & 0xff) << 8;
>>> sectors |= (tf->lbal & 0xff);
>>
>> <snip>
>>
>> That looks really serious.
>>
>> What happens with all previous / stable kernels when connecting up a
>> 1.5TB drive and the user tries to use the last portion of the drive?
>
> tf-to-lba48 is a far less common operation, generally used for error
> reporting (and in Host-Protected Area code as well, it appears).
>
> Jeff
So are you saying it is not on any data read / write paths?
Or that it is only on rarely used data read/write paths?
Because if this is on a data read/write path at all, it looks like it
could cause major data corruption with 1.5 TB drives (or larger).
Greg
--
Greg Freemyer
Litigation Triage Solutions Specialist
http://www.linkedin.com/in/gregfreemyer
First 99 Days Litigation White Paper -
http://www.norcrossgroup.com/forms/whitepapers/99%20Days%20whitepaper.pdf
The Norcross Group
The Intersection of Evidence & Technology
http://www.norcrossgroup.com
^ permalink raw reply [flat|nested] 263+ messages in thread
* Re: [git patches] libata fixes
2008-10-31 13:20 ` Greg Freemyer
@ 2008-11-02 13:21 ` Jeff Garzik
2008-11-02 20:18 ` Greg Freemyer
0 siblings, 1 reply; 263+ messages in thread
From: Jeff Garzik @ 2008-11-02 13:21 UTC (permalink / raw)
To: Greg Freemyer; +Cc: Andrew Morton, Linus Torvalds, linux-ide, LKML
Greg Freemyer wrote:
> On Fri, Oct 31, 2008 at 1:49 AM, Jeff Garzik <jeff@garzik.org> wrote:
>> Notes:
>>
>> 1) 1.5TB drive fix from Roland
>>
>> 2) Tejun's sata_via brings a non-working via configuration thanks to a
>> new facility also being used in recent (ICH9/10) ata_piix.
>>
>> Change is longer than one might like, but it accurately describes the
>> hardware now, the previous stuff wasn't working, and the newly added
>> support code shouldn't touch non-broken VIA controllers.
>>
>>
>>
>> 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/ata_piix.c | 1 -
>> drivers/ata/libata-core.c | 11 +++-
>> drivers/ata/sata_via.c | 155 +++++++++++++++++++++++++++++++++++++++++----
>> include/linux/libata.h | 1 +
>> 4 files changed, 152 insertions(+), 16 deletions(-)
>>
>> Jens Axboe (1):
>> libata: add whitelist for devices with known good pata-sata bridges
>>
>> Randy Dunlap (1):
>> ATA: remove excess kernel-doc notation
>>
>> Roland Dreier (1):
>> libata: Avoid overflow in ata_tf_to_lba48() when tf->hba_lbal > 127
>>
>> Tejun Heo (1):
>> sata_via: fix support for 5287
> <snip>
>
>> diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
>> index 2ff633c..82af701 100644
>> --- a/drivers/ata/libata-core.c
>> +++ b/drivers/ata/libata-core.c
>> @@ -1268,7 +1268,7 @@ u64 ata_tf_to_lba48(const struct ata_taskfile *tf)
>>
>> sectors |= ((u64)(tf->hob_lbah & 0xff)) << 40;
>> sectors |= ((u64)(tf->hob_lbam & 0xff)) << 32;
>> - sectors |= (tf->hob_lbal & 0xff) << 24;
>> + sectors |= ((u64)(tf->hob_lbal & 0xff)) << 24;
>> sectors |= (tf->lbah & 0xff) << 16;
>> sectors |= (tf->lbam & 0xff) << 8;
>> sectors |= (tf->lbal & 0xff);
> <snip>
>
> That looks really serious.
>
> What happens with all previous / stable kernels when connecting up a
> 1.5TB drive and the user tries to use the last portion of the drive?
tf-to-lba48 is a far less common operation, generally used for error
reporting (and in Host-Protected Area code as well, it appears).
Jeff
^ permalink raw reply [flat|nested] 263+ messages in thread
* Re: [git patches] libata fixes
2008-10-31 5:49 Jeff Garzik
@ 2008-10-31 13:20 ` Greg Freemyer
2008-11-02 13:21 ` Jeff Garzik
0 siblings, 1 reply; 263+ messages in thread
From: Greg Freemyer @ 2008-10-31 13:20 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Andrew Morton, Linus Torvalds, linux-ide, LKML
On Fri, Oct 31, 2008 at 1:49 AM, Jeff Garzik <jeff@garzik.org> wrote:
>
> Notes:
>
> 1) 1.5TB drive fix from Roland
>
> 2) Tejun's sata_via brings a non-working via configuration thanks to a
> new facility also being used in recent (ICH9/10) ata_piix.
>
> Change is longer than one might like, but it accurately describes the
> hardware now, the previous stuff wasn't working, and the newly added
> support code shouldn't touch non-broken VIA controllers.
>
>
>
> 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/ata_piix.c | 1 -
> drivers/ata/libata-core.c | 11 +++-
> drivers/ata/sata_via.c | 155 +++++++++++++++++++++++++++++++++++++++++----
> include/linux/libata.h | 1 +
> 4 files changed, 152 insertions(+), 16 deletions(-)
>
> Jens Axboe (1):
> libata: add whitelist for devices with known good pata-sata bridges
>
> Randy Dunlap (1):
> ATA: remove excess kernel-doc notation
>
> Roland Dreier (1):
> libata: Avoid overflow in ata_tf_to_lba48() when tf->hba_lbal > 127
>
> Tejun Heo (1):
> sata_via: fix support for 5287
<snip>
> diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
> index 2ff633c..82af701 100644
> --- a/drivers/ata/libata-core.c
> +++ b/drivers/ata/libata-core.c
> @@ -1268,7 +1268,7 @@ u64 ata_tf_to_lba48(const struct ata_taskfile *tf)
>
> sectors |= ((u64)(tf->hob_lbah & 0xff)) << 40;
> sectors |= ((u64)(tf->hob_lbam & 0xff)) << 32;
> - sectors |= (tf->hob_lbal & 0xff) << 24;
> + sectors |= ((u64)(tf->hob_lbal & 0xff)) << 24;
> sectors |= (tf->lbah & 0xff) << 16;
> sectors |= (tf->lbam & 0xff) << 8;
> sectors |= (tf->lbal & 0xff);
<snip>
That looks really serious.
What happens with all previous / stable kernels when connecting up a
1.5TB drive and the user tries to use the last portion of the drive?
Greg
--
Greg Freemyer
Litigation Triage Solutions Specialist
http://www.linkedin.com/in/gregfreemyer
First 99 Days Litigation White Paper -
http://www.norcrossgroup.com/forms/whitepapers/99%20Days%20whitepaper.pdf
The Norcross Group
The Intersection of Evidence & Technology
http://www.norcrossgroup.com
^ permalink raw reply [flat|nested] 263+ messages in thread
* [git patches] libata fixes
@ 2008-10-31 5:49 Jeff Garzik
2008-10-31 13:20 ` Greg Freemyer
0 siblings, 1 reply; 263+ messages in thread
From: Jeff Garzik @ 2008-10-31 5:49 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide, LKML
Notes:
1) 1.5TB drive fix from Roland
2) Tejun's sata_via brings a non-working via configuration thanks to a
new facility also being used in recent (ICH9/10) ata_piix.
Change is longer than one might like, but it accurately describes the
hardware now, the previous stuff wasn't working, and the newly added
support code shouldn't touch non-broken VIA controllers.
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/ata_piix.c | 1 -
drivers/ata/libata-core.c | 11 +++-
drivers/ata/sata_via.c | 155 +++++++++++++++++++++++++++++++++++++++++----
include/linux/libata.h | 1 +
4 files changed, 152 insertions(+), 16 deletions(-)
Jens Axboe (1):
libata: add whitelist for devices with known good pata-sata bridges
Randy Dunlap (1):
ATA: remove excess kernel-doc notation
Roland Dreier (1):
libata: Avoid overflow in ata_tf_to_lba48() when tf->hba_lbal > 127
Tejun Heo (1):
sata_via: fix support for 5287
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index 52dc2d8..8e37be1 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -738,7 +738,6 @@ static void piix_set_piomode(struct ata_port *ap, struct ata_device *adev)
* do_pata_set_dmamode - Initialize host controller PATA PIO timings
* @ap: Port whose timings we are configuring
* @adev: Drive in question
- * @udma: udma mode, 0 - 6
* @isich: set if the chip is an ICH device
*
* Set UDMA mode for device, in host controller PCI config space.
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 2ff633c..82af701 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -1268,7 +1268,7 @@ u64 ata_tf_to_lba48(const struct ata_taskfile *tf)
sectors |= ((u64)(tf->hob_lbah & 0xff)) << 40;
sectors |= ((u64)(tf->hob_lbam & 0xff)) << 32;
- sectors |= (tf->hob_lbal & 0xff) << 24;
+ sectors |= ((u64)(tf->hob_lbal & 0xff)) << 24;
sectors |= (tf->lbah & 0xff) << 16;
sectors |= (tf->lbam & 0xff) << 8;
sectors |= (tf->lbal & 0xff);
@@ -1602,7 +1602,6 @@ unsigned long ata_id_xfermask(const u16 *id)
/**
* ata_pio_queue_task - Queue port_task
* @ap: The ata_port to queue port_task for
- * @fn: workqueue function to be scheduled
* @data: data for @fn to use
* @delay: delay time in msecs for workqueue function
*
@@ -2159,6 +2158,10 @@ retry:
static inline u8 ata_dev_knobble(struct ata_device *dev)
{
struct ata_port *ap = dev->link->ap;
+
+ if (ata_dev_blacklisted(dev) & ATA_HORKAGE_BRIDGE_OK)
+ return 0;
+
return ((ap->cbl == ATA_CBL_SATA) && (!ata_id_is_sata(dev->id)));
}
@@ -4063,6 +4066,9 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
{ "TSSTcorp CDDVDW SH-S202N", "SB00", ATA_HORKAGE_IVB, },
{ "TSSTcorp CDDVDW SH-S202N", "SB01", ATA_HORKAGE_IVB, },
+ /* Devices that do not need bridging limits applied */
+ { "MTRON MSP-SATA*", NULL, ATA_HORKAGE_BRIDGE_OK, },
+
/* End Marker */
{ }
};
@@ -4648,7 +4654,6 @@ static void ata_verify_xfer(struct ata_queued_cmd *qc)
/**
* ata_qc_complete - Complete an active ATA command
* @qc: Command to complete
- * @err_mask: ATA Status register contents
*
* Indicate to the mid and upper layers that an ATA
* command has completed, with either an ok or not-ok status.
diff --git a/drivers/ata/sata_via.c b/drivers/ata/sata_via.c
index 5b72e73..62367fe 100644
--- a/drivers/ata/sata_via.c
+++ b/drivers/ata/sata_via.c
@@ -44,11 +44,16 @@
#include <linux/libata.h>
#define DRV_NAME "sata_via"
-#define DRV_VERSION "2.3"
+#define DRV_VERSION "2.4"
+/*
+ * vt8251 is different from other sata controllers of VIA. It has two
+ * channels, each channel has both Master and Slave slot.
+ */
enum board_ids_enum {
vt6420,
vt6421,
+ vt8251,
};
enum {
@@ -70,6 +75,8 @@ enum {
static int svia_init_one(struct pci_dev *pdev, const struct pci_device_id *ent);
static int svia_scr_read(struct ata_link *link, unsigned int sc_reg, u32 *val);
static int svia_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val);
+static int vt8251_scr_read(struct ata_link *link, unsigned int scr, u32 *val);
+static int vt8251_scr_write(struct ata_link *link, unsigned int scr, u32 val);
static void svia_tf_load(struct ata_port *ap, const struct ata_taskfile *tf);
static void svia_noop_freeze(struct ata_port *ap);
static int vt6420_prereset(struct ata_link *link, unsigned long deadline);
@@ -79,12 +86,12 @@ static void vt6421_set_dma_mode(struct ata_port *ap, struct ata_device *adev);
static const struct pci_device_id svia_pci_tbl[] = {
{ PCI_VDEVICE(VIA, 0x5337), vt6420 },
- { PCI_VDEVICE(VIA, 0x0591), vt6420 },
- { PCI_VDEVICE(VIA, 0x3149), vt6420 },
- { PCI_VDEVICE(VIA, 0x3249), vt6421 },
- { PCI_VDEVICE(VIA, 0x5287), vt6420 },
+ { PCI_VDEVICE(VIA, 0x0591), vt6420 }, /* 2 sata chnls (Master) */
+ { PCI_VDEVICE(VIA, 0x3149), vt6420 }, /* 2 sata chnls (Master) */
+ { PCI_VDEVICE(VIA, 0x3249), vt6421 }, /* 2 sata chnls, 1 pata chnl */
{ PCI_VDEVICE(VIA, 0x5372), vt6420 },
{ PCI_VDEVICE(VIA, 0x7372), vt6420 },
+ { PCI_VDEVICE(VIA, 0x5287), vt8251 }, /* 2 sata chnls (Master/Slave) */
{ } /* terminate list */
};
@@ -128,6 +135,13 @@ static struct ata_port_operations vt6421_sata_ops = {
.scr_write = svia_scr_write,
};
+static struct ata_port_operations vt8251_ops = {
+ .inherits = &svia_base_ops,
+ .hardreset = sata_std_hardreset,
+ .scr_read = vt8251_scr_read,
+ .scr_write = vt8251_scr_write,
+};
+
static const struct ata_port_info vt6420_port_info = {
.flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY,
.pio_mask = 0x1f,
@@ -152,6 +166,15 @@ static struct ata_port_info vt6421_pport_info = {
.port_ops = &vt6421_pata_ops,
};
+static struct ata_port_info vt8251_port_info = {
+ .flags = ATA_FLAG_SATA | ATA_FLAG_SLAVE_POSS |
+ ATA_FLAG_NO_LEGACY,
+ .pio_mask = 0x1f,
+ .mwdma_mask = 0x07,
+ .udma_mask = ATA_UDMA6,
+ .port_ops = &vt8251_ops,
+};
+
MODULE_AUTHOR("Jeff Garzik");
MODULE_DESCRIPTION("SCSI low-level driver for VIA SATA controllers");
MODULE_LICENSE("GPL");
@@ -174,6 +197,83 @@ static int svia_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val)
return 0;
}
+static int vt8251_scr_read(struct ata_link *link, unsigned int scr, u32 *val)
+{
+ static const u8 ipm_tbl[] = { 1, 2, 6, 0 };
+ struct pci_dev *pdev = to_pci_dev(link->ap->host->dev);
+ int slot = 2 * link->ap->port_no + link->pmp;
+ u32 v = 0;
+ u8 raw;
+
+ switch (scr) {
+ case SCR_STATUS:
+ pci_read_config_byte(pdev, 0xA0 + slot, &raw);
+
+ /* read the DET field, bit0 and 1 of the config byte */
+ v |= raw & 0x03;
+
+ /* read the SPD field, bit4 of the configure byte */
+ if (raw & (1 << 4))
+ v |= 0x02 << 4;
+ else
+ v |= 0x01 << 4;
+
+ /* read the IPM field, bit2 and 3 of the config byte */
+ v |= ipm_tbl[(raw >> 2) & 0x3];
+ break;
+
+ case SCR_ERROR:
+ /* devices other than 5287 uses 0xA8 as base */
+ WARN_ON(pdev->device != 0x5287);
+ pci_read_config_dword(pdev, 0xB0 + slot * 4, &v);
+ break;
+
+ case SCR_CONTROL:
+ pci_read_config_byte(pdev, 0xA4 + slot, &raw);
+
+ /* read the DET field, bit0 and bit1 */
+ v |= ((raw & 0x02) << 1) | (raw & 0x01);
+
+ /* read the IPM field, bit2 and bit3 */
+ v |= ((raw >> 2) & 0x03) << 8;
+ break;
+
+ default:
+ return -EINVAL;
+ }
+
+ *val = v;
+ return 0;
+}
+
+static int vt8251_scr_write(struct ata_link *link, unsigned int scr, u32 val)
+{
+ struct pci_dev *pdev = to_pci_dev(link->ap->host->dev);
+ int slot = 2 * link->ap->port_no + link->pmp;
+ u32 v = 0;
+
+ switch (scr) {
+ case SCR_ERROR:
+ /* devices other than 5287 uses 0xA8 as base */
+ WARN_ON(pdev->device != 0x5287);
+ pci_write_config_dword(pdev, 0xB0 + slot * 4, val);
+ return 0;
+
+ case SCR_CONTROL:
+ /* set the DET field */
+ v |= ((val & 0x4) >> 1) | (val & 0x1);
+
+ /* set the IPM field */
+ v |= ((val >> 8) & 0x3) << 2;
+
+ pci_write_config_byte(pdev, 0xA4 + slot, v);
+ return 0;
+
+ default:
+ return -EINVAL;
+ }
+}
+
/**
* svia_tf_load - send taskfile registers to host controller
* @ap: Port to which output is sent
@@ -396,6 +496,30 @@ static int vt6421_prepare_host(struct pci_dev *pdev, struct ata_host **r_host)
return 0;
}
+static int vt8251_prepare_host(struct pci_dev *pdev, struct ata_host **r_host)
+{
+ const struct ata_port_info *ppi[] = { &vt8251_port_info, NULL };
+ struct ata_host *host;
+ int i, rc;
+
+ rc = ata_pci_sff_prepare_host(pdev, ppi, &host);
+ if (rc)
+ return rc;
+ *r_host = host;
+
+ rc = pcim_iomap_regions(pdev, 1 << 5, DRV_NAME);
+ if (rc) {
+ dev_printk(KERN_ERR, &pdev->dev, "failed to iomap PCI BAR 5\n");
+ return rc;
+ }
+
+ /* 8251 hosts four sata ports as M/S of the two channels */
+ for (i = 0; i < host->n_ports; i++)
+ ata_slave_link_init(host->ports[i]);
+
+ return 0;
+}
+
static void svia_configure(struct pci_dev *pdev)
{
u8 tmp8;
@@ -451,10 +575,10 @@ static int svia_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
if (rc)
return rc;
- if (board_id == vt6420)
- bar_sizes = &svia_bar_sizes[0];
- else
+ if (board_id == vt6421)
bar_sizes = &vt6421_bar_sizes[0];
+ else
+ bar_sizes = &svia_bar_sizes[0];
for (i = 0; i < ARRAY_SIZE(svia_bar_sizes); i++)
if ((pci_resource_start(pdev, i) == 0) ||
@@ -467,12 +591,19 @@ static int svia_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
return -ENODEV;
}
- if (board_id == vt6420)
+ switch (board_id) {
+ case vt6420:
rc = vt6420_prepare_host(pdev, &host);
- else
+ break;
+ case vt6421:
rc = vt6421_prepare_host(pdev, &host);
- if (rc)
- return rc;
+ break;
+ case vt8251:
+ rc = vt8251_prepare_host(pdev, &host);
+ break;
+ default:
+ return -EINVAL;
+ }
svia_configure(pdev);
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 507f53e..f5441ed 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -372,6 +372,7 @@ enum {
ATA_HORKAGE_IPM = (1 << 7), /* Link PM problems */
ATA_HORKAGE_IVB = (1 << 8), /* cbl det validity bit bugs */
ATA_HORKAGE_STUCK_ERR = (1 << 9), /* stuck ERR on next PACKET */
+ ATA_HORKAGE_BRIDGE_OK = (1 << 10), /* no bridge limits */
/* DMA mask for user DMA control: User visible values; DO NOT
renumber */
^ permalink raw reply related [flat|nested] 263+ messages in thread
* [git patches] libata fixes
@ 2008-10-23 0:48 Jeff Garzik
0 siblings, 0 replies; 263+ messages in thread
From: Jeff Garzik @ 2008-10-23 0:48 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide, LKML
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/libata-core.c | 2 ++
drivers/ata/libata-eh.c | 26 +++++++++++++++++---------
drivers/ata/libata-sff.c | 11 ++++++++++-
drivers/ata/sata_via.c | 35 ++++++++++++++++++++++++++++++++---
include/linux/libata.h | 3 +++
5 files changed, 64 insertions(+), 13 deletions(-)
Tejun Heo (6):
libata: initialize port_task when !CONFIG_ATA_SFF
libata-sff: fix ata_sff_post_internal_cmd()
libata: transfer EHI control flags to slave ehc.i
libata-eh: fix slave link EH action mask handling
libata: set device class to NONE if phys_offline
sata_via: load DEVICE register when CTL changes
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 1ee9499..bbb3cae 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -5373,6 +5373,8 @@ struct ata_port *ata_port_alloc(struct ata_host *host)
#ifdef CONFIG_ATA_SFF
INIT_DELAYED_WORK(&ap->port_task, ata_pio_task);
+#else
+ INIT_DELAYED_WORK(&ap->port_task, NULL);
#endif
INIT_DELAYED_WORK(&ap->hotplug_task, ata_scsi_hotplug);
INIT_WORK(&ap->scsi_rescan_task, ata_scsi_dev_rescan);
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index a93247c..5d687d7 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -1206,7 +1206,10 @@ void ata_eh_about_to_do(struct ata_link *link, struct ata_device *dev,
ata_eh_clear_action(link, dev, ehi, action);
- if (!(ehc->i.flags & ATA_EHI_QUIET))
+ /* About to take EH action, set RECOVERED. Ignore actions on
+ * slave links as master will do them again.
+ */
+ if (!(ehc->i.flags & ATA_EHI_QUIET) && link != ap->slave_link)
ap->pflags |= ATA_PFLAG_RECOVERED;
spin_unlock_irqrestore(ap->lock, flags);
@@ -2010,8 +2013,13 @@ void ata_eh_autopsy(struct ata_port *ap)
struct ata_eh_context *mehc = &ap->link.eh_context;
struct ata_eh_context *sehc = &ap->slave_link->eh_context;
+ /* transfer control flags from master to slave */
+ sehc->i.flags |= mehc->i.flags & ATA_EHI_TO_SLAVE_MASK;
+
+ /* perform autopsy on the slave link */
ata_eh_link_autopsy(ap->slave_link);
+ /* transfer actions from slave to master and clear slave */
ata_eh_about_to_do(ap->slave_link, NULL, ATA_EH_ALL_ACTIONS);
mehc->i.action |= sehc->i.action;
mehc->i.dev_action[1] |= sehc->i.dev_action[1];
@@ -2447,14 +2455,14 @@ int ata_eh_reset(struct ata_link *link, int classify,
dev->pio_mode = XFER_PIO_0;
dev->flags &= ~ATA_DFLAG_SLEEPING;
- if (ata_phys_link_offline(ata_dev_phys_link(dev)))
- continue;
-
- /* apply class override */
- if (lflags & ATA_LFLAG_ASSUME_ATA)
- classes[dev->devno] = ATA_DEV_ATA;
- else if (lflags & ATA_LFLAG_ASSUME_SEMB)
- classes[dev->devno] = ATA_DEV_SEMB_UNSUP; /* not yet */
+ if (!ata_phys_link_offline(ata_dev_phys_link(dev))) {
+ /* apply class override */
+ if (lflags & ATA_LFLAG_ASSUME_ATA)
+ classes[dev->devno] = ATA_DEV_ATA;
+ else if (lflags & ATA_LFLAG_ASSUME_SEMB)
+ classes[dev->devno] = ATA_DEV_SEMB_UNSUP;
+ } else
+ classes[dev->devno] = ATA_DEV_NONE;
}
/* record current link speed */
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
index 2a4c516..4b47394 100644
--- a/drivers/ata/libata-sff.c
+++ b/drivers/ata/libata-sff.c
@@ -2153,8 +2153,17 @@ void ata_sff_error_handler(struct ata_port *ap)
*/
void ata_sff_post_internal_cmd(struct ata_queued_cmd *qc)
{
- if (qc->ap->ioaddr.bmdma_addr)
+ struct ata_port *ap = qc->ap;
+ unsigned long flags;
+
+ spin_lock_irqsave(ap->lock, flags);
+
+ ap->hsm_task_state = HSM_ST_IDLE;
+
+ if (ap->ioaddr.bmdma_addr)
ata_bmdma_stop(qc);
+
+ spin_unlock_irqrestore(ap->lock, flags);
}
/**
diff --git a/drivers/ata/sata_via.c b/drivers/ata/sata_via.c
index 1cfa745..5b72e73 100644
--- a/drivers/ata/sata_via.c
+++ b/drivers/ata/sata_via.c
@@ -70,6 +70,7 @@ enum {
static int svia_init_one(struct pci_dev *pdev, const struct pci_device_id *ent);
static int svia_scr_read(struct ata_link *link, unsigned int sc_reg, u32 *val);
static int svia_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val);
+static void svia_tf_load(struct ata_port *ap, const struct ata_taskfile *tf);
static void svia_noop_freeze(struct ata_port *ap);
static int vt6420_prereset(struct ata_link *link, unsigned long deadline);
static int vt6421_pata_cable_detect(struct ata_port *ap);
@@ -103,21 +104,26 @@ static struct scsi_host_template svia_sht = {
ATA_BMDMA_SHT(DRV_NAME),
};
-static struct ata_port_operations vt6420_sata_ops = {
+static struct ata_port_operations svia_base_ops = {
.inherits = &ata_bmdma_port_ops,
+ .sff_tf_load = svia_tf_load,
+};
+
+static struct ata_port_operations vt6420_sata_ops = {
+ .inherits = &svia_base_ops,
.freeze = svia_noop_freeze,
.prereset = vt6420_prereset,
};
static struct ata_port_operations vt6421_pata_ops = {
- .inherits = &ata_bmdma_port_ops,
+ .inherits = &svia_base_ops,
.cable_detect = vt6421_pata_cable_detect,
.set_piomode = vt6421_set_pio_mode,
.set_dmamode = vt6421_set_dma_mode,
};
static struct ata_port_operations vt6421_sata_ops = {
- .inherits = &ata_bmdma_port_ops,
+ .inherits = &svia_base_ops,
.scr_read = svia_scr_read,
.scr_write = svia_scr_write,
};
@@ -168,6 +174,29 @@ static int svia_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val)
return 0;
}
+/**
+ * svia_tf_load - send taskfile registers to host controller
+ * @ap: Port to which output is sent
+ * @tf: ATA taskfile register set
+ *
+ * Outputs ATA taskfile to standard ATA host controller.
+ *
+ * This is to fix the internal bug of via chipsets, which will
+ * reset the device register after changing the IEN bit on ctl
+ * register.
+ */
+static void svia_tf_load(struct ata_port *ap, const struct ata_taskfile *tf)
+{
+ struct ata_taskfile ttf;
+
+ if (tf->ctl != ap->last_ctl) {
+ ttf = *tf;
+ ttf.flags |= ATA_TFLAG_DEVICE;
+ tf = &ttf;
+ }
+ ata_sff_tf_load(ap, tf);
+}
+
static void svia_noop_freeze(struct ata_port *ap)
{
/* Some VIA controllers choke if ATA_NIEN is manipulated in
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 947cf84..c261aa0 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -340,6 +340,9 @@ enum {
ATA_EHI_DID_RESET = ATA_EHI_DID_SOFTRESET | ATA_EHI_DID_HARDRESET,
+ /* mask of flags to transfer *to* the slave link */
+ ATA_EHI_TO_SLAVE_MASK = ATA_EHI_NO_AUTOPSY | ATA_EHI_QUIET,
+
/* max tries if error condition is still set after ->error_handler */
ATA_EH_MAX_TRIES = 5,
^ permalink raw reply related [flat|nested] 263+ messages in thread
* [git patches] libata fixes
@ 2008-09-13 20:59 Jeff Garzik
0 siblings, 0 replies; 263+ messages in thread
From: Jeff Garzik @ 2008-09-13 20:59 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide, LKML
The off-by-one bug fix is notable; see extended commit description.
Verified by several people as fixing their problem here.
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/ata_piix.c | 2 +-
drivers/ata/sata_inic162x.c | 3 ++-
include/linux/ata.h | 2 +-
3 files changed, 4 insertions(+), 3 deletions(-)
Bob Stewart (1):
sata_inic162x: enable LED blinking
Stephen Hemminger (1):
ata: duplicate variable sparse warning
Taisuke Yamada (1):
[libata] LBA28/LBA48 off-by-one bug in ata.h
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index b1d08a8..e6b4606 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -1499,7 +1499,7 @@ static int __devinit piix_init_one(struct pci_dev *pdev,
* off.
*/
if (pdev->vendor == PCI_VENDOR_ID_INTEL && pdev->device == 0x2652) {
- int rc = piix_disable_ahci(pdev);
+ rc = piix_disable_ahci(pdev);
if (rc)
return rc;
}
diff --git a/drivers/ata/sata_inic162x.c b/drivers/ata/sata_inic162x.c
index 3ead02f..5032c32 100644
--- a/drivers/ata/sata_inic162x.c
+++ b/drivers/ata/sata_inic162x.c
@@ -96,6 +96,7 @@ enum {
PORT_SCR = 0x20,
/* HOST_CTL bits */
+ HCTL_LEDEN = (1 << 3), /* enable LED operation */
HCTL_IRQOFF = (1 << 8), /* global IRQ off */
HCTL_FTHD0 = (1 << 10), /* fifo threshold 0 */
HCTL_FTHD1 = (1 << 11), /* fifo threshold 1*/
@@ -540,7 +541,7 @@ static unsigned int inic_qc_issue(struct ata_queued_cmd *qc)
void __iomem *port_base = inic_port_base(ap);
/* fire up the ADMA engine */
- writew(HCTL_FTHD0, port_base + HOST_CTL);
+ writew(HCTL_FTHD0 | HCTL_LEDEN, port_base + HOST_CTL);
writew(IDMA_CTL_GO, port_base + PORT_IDMA_CTL);
writeb(0, port_base + PORT_CPB_PTQFIFO);
diff --git a/include/linux/ata.h b/include/linux/ata.h
index 1ce19c1..8a12d71 100644
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -745,7 +745,7 @@ static inline int ata_ok(u8 status)
static inline int lba_28_ok(u64 block, u32 n_block)
{
/* check the ending block number */
- return ((block + n_block - 1) < ((u64)1 << 28)) && (n_block <= 256);
+ return ((block + n_block) < ((u64)1 << 28)) && (n_block <= 256);
}
static inline int lba_48_ok(u64 block, u32 n_block)
^ permalink raw reply related [flat|nested] 263+ messages in thread
* [git patches] libata fixes
@ 2008-06-19 0:59 Jeff Garzik
0 siblings, 0 replies; 263+ messages in thread
From: Jeff Garzik @ 2008-06-19 0:59 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide, LKML
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/Kconfig | 10 +++++++++-
drivers/ata/ahci.c | 23 ++++++++++++++++++++---
drivers/ata/ata_piix.c | 7 +++++++
drivers/ata/libata-core.c | 4 ++--
drivers/ata/libata-scsi.c | 16 +++++++---------
drivers/ata/libata.h | 2 +-
drivers/ata/sata_mv.c | 21 +++++++++++++++++++++
7 files changed, 67 insertions(+), 16 deletions(-)
Ben Dooks (1):
LIBATA: Add HAVE_PATA_PLATFORM to select PATA_PLATFORM driver
Mark Lord (2):
sata_mv: enable async_notify for 60x1 Rev.C0 and higher
sata_mv: warn on PIO with multiple DRQs
Tejun Heo (4):
ahci: jmb361 has only one port
libata: don't check whether to use DMA or not for no data commands
ata_piix: add TECRA M4 to broken suspend list
ahci: sis can't do PMP
diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
index 9bf2986..ae84949 100644
--- a/drivers/ata/Kconfig
+++ b/drivers/ata/Kconfig
@@ -651,9 +651,17 @@ config PATA_WINBOND_VLB
Support for the Winbond W83759A controller on Vesa Local Bus
systems.
+config HAVE_PATA_PLATFORM
+ bool
+ help
+ This is an internal configuration node for any machine that
+ uses pata-platform driver to enable the relevant driver in the
+ configuration structure without having to submit endless patches
+ to update the PATA_PLATFORM entry.
+
config PATA_PLATFORM
tristate "Generic platform device PATA support"
- depends on EMBEDDED || ARCH_RPC || PPC
+ depends on EMBEDDED || ARCH_RPC || PPC || HAVE_PATA_PLATFORM
help
This option enables support for generic directly connected ATA
devices commonly found on embedded systems.
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 966ab40..6a4a2a2 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -90,6 +90,7 @@ enum {
board_ahci_mv = 4,
board_ahci_sb700 = 5,
board_ahci_mcp65 = 6,
+ board_ahci_nopmp = 7,
/* global controller registers */
HOST_CAP = 0x00, /* host capabilities */
@@ -401,6 +402,14 @@ static const struct ata_port_info ahci_port_info[] = {
.udma_mask = ATA_UDMA6,
.port_ops = &ahci_ops,
},
+ /* board_ahci_nopmp */
+ {
+ AHCI_HFLAGS (AHCI_HFLAG_NO_PMP),
+ .flags = AHCI_FLAG_COMMON,
+ .pio_mask = 0x1f, /* pio0-4 */
+ .udma_mask = ATA_UDMA6,
+ .port_ops = &ahci_ops,
+ },
};
static const struct pci_device_id ahci_pci_tbl[] = {
@@ -525,9 +534,9 @@ static const struct pci_device_id ahci_pci_tbl[] = {
{ PCI_VDEVICE(NVIDIA, 0x0bc7), board_ahci }, /* MCP7B */
/* SiS */
- { PCI_VDEVICE(SI, 0x1184), board_ahci }, /* SiS 966 */
- { PCI_VDEVICE(SI, 0x1185), board_ahci }, /* SiS 966 */
- { PCI_VDEVICE(SI, 0x0186), board_ahci }, /* SiS 968 */
+ { PCI_VDEVICE(SI, 0x1184), board_ahci_nopmp }, /* SiS 966 */
+ { PCI_VDEVICE(SI, 0x1185), board_ahci_nopmp }, /* SiS 968 */
+ { PCI_VDEVICE(SI, 0x0186), board_ahci_nopmp }, /* SiS 968 */
/* Marvell */
{ PCI_VDEVICE(MARVELL, 0x6145), board_ahci_mv }, /* 6145 */
@@ -653,6 +662,14 @@ static void ahci_save_initial_config(struct pci_dev *pdev,
cap &= ~HOST_CAP_PMP;
}
+ if (pdev->vendor == PCI_VENDOR_ID_JMICRON && pdev->device == 0x2361 &&
+ port_map != 1) {
+ dev_printk(KERN_INFO, &pdev->dev,
+ "JMB361 has only one port, port_map 0x%x -> 0x%x\n",
+ port_map, 1);
+ port_map = 1;
+ }
+
/*
* Temporary Marvell 6145 hack: PATA port presence
* is asserted through the standard AHCI port
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index 81b7ae3..a90ae03 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -1043,6 +1043,13 @@ static int piix_broken_suspend(void)
},
},
{
+ .ident = "TECRA M4",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "TECRA M4"),
+ },
+ },
+ {
.ident = "TECRA M5",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index cc816ca..303fc0d 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -4297,7 +4297,7 @@ void ata_sg_clean(struct ata_queued_cmd *qc)
}
/**
- * ata_check_atapi_dma - Check whether ATAPI DMA can be supported
+ * atapi_check_dma - Check whether ATAPI DMA can be supported
* @qc: Metadata associated with taskfile to check
*
* Allow low-level driver to filter ATA PACKET commands, returning
@@ -4310,7 +4310,7 @@ void ata_sg_clean(struct ata_queued_cmd *qc)
* RETURNS: 0 when ATAPI DMA can be used
* nonzero otherwise
*/
-int ata_check_atapi_dma(struct ata_queued_cmd *qc)
+int atapi_check_dma(struct ata_queued_cmd *qc)
{
struct ata_port *ap = qc->ap;
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index 2e6e162..57a4364 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -2343,8 +2343,8 @@ static unsigned int atapi_xlat(struct ata_queued_cmd *qc)
{
struct scsi_cmnd *scmd = qc->scsicmd;
struct ata_device *dev = qc->dev;
- int using_pio = (dev->flags & ATA_DFLAG_PIO);
int nodata = (scmd->sc_data_direction == DMA_NONE);
+ int using_pio = !nodata && (dev->flags & ATA_DFLAG_PIO);
unsigned int nbytes;
memset(qc->cdb, 0, dev->cdb_len);
@@ -2362,7 +2362,7 @@ static unsigned int atapi_xlat(struct ata_queued_cmd *qc)
ata_qc_set_pc_nbytes(qc);
/* check whether ATAPI DMA is safe */
- if (!using_pio && ata_check_atapi_dma(qc))
+ if (!nodata && !using_pio && atapi_check_dma(qc))
using_pio = 1;
/* Some controller variants snoop this value for Packet
@@ -2402,13 +2402,11 @@ static unsigned int atapi_xlat(struct ata_queued_cmd *qc)
qc->tf.lbam = (nbytes & 0xFF);
qc->tf.lbah = (nbytes >> 8);
- if (using_pio || nodata) {
- /* no data, or PIO data xfer */
- if (nodata)
- qc->tf.protocol = ATAPI_PROT_NODATA;
- else
- qc->tf.protocol = ATAPI_PROT_PIO;
- } else {
+ if (nodata)
+ qc->tf.protocol = ATAPI_PROT_NODATA;
+ else if (using_pio)
+ qc->tf.protocol = ATAPI_PROT_PIO;
+ else {
/* DMA data xfer */
qc->tf.protocol = ATAPI_PROT_DMA;
qc->tf.feature |= ATAPI_PKT_DMA;
diff --git a/drivers/ata/libata.h b/drivers/ata/libata.h
index 4514283..1cf803a 100644
--- a/drivers/ata/libata.h
+++ b/drivers/ata/libata.h
@@ -106,7 +106,7 @@ extern void ata_sg_clean(struct ata_queued_cmd *qc);
extern void ata_qc_free(struct ata_queued_cmd *qc);
extern void ata_qc_issue(struct ata_queued_cmd *qc);
extern void __ata_qc_complete(struct ata_queued_cmd *qc);
-extern int ata_check_atapi_dma(struct ata_queued_cmd *qc);
+extern int atapi_check_dma(struct ata_queued_cmd *qc);
extern void swap_buf_le16(u16 *buf, unsigned int buf_words);
extern void ata_dev_init(struct ata_device *dev);
extern void ata_link_init(struct ata_port *ap, struct ata_link *link, int pmp);
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index 60391e9..28092bc 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -1322,6 +1322,9 @@ static int mv_port_start(struct ata_port *ap)
goto out_port_free_dma_mem;
memset(pp->crpb, 0, MV_CRPB_Q_SZ);
+ /* 6041/6081 Rev. "C0" (and newer) are okay with async notify */
+ if (hpriv->hp_flags & MV_HP_ERRATA_60X1C0)
+ ap->flags |= ATA_FLAG_AN;
/*
* For GEN_I, there's no NCQ, so we only allocate a single sg_tbl.
* For later hardware, we need one unique sg_tbl per NCQ tag.
@@ -1592,6 +1595,24 @@ static unsigned int mv_qc_issue(struct ata_queued_cmd *qc)
if ((qc->tf.protocol != ATA_PROT_DMA) &&
(qc->tf.protocol != ATA_PROT_NCQ)) {
+ static int limit_warnings = 10;
+ /*
+ * Errata SATA#16, SATA#24: warn if multiple DRQs expected.
+ *
+ * Someday, we might implement special polling workarounds
+ * for these, but it all seems rather unnecessary since we
+ * normally use only DMA for commands which transfer more
+ * than a single block of data.
+ *
+ * Much of the time, this could just work regardless.
+ * So for now, just log the incident, and allow the attempt.
+ */
+ if (limit_warnings && (qc->nbytes / qc->sect_size) > 1) {
+ --limit_warnings;
+ ata_link_printk(qc->dev->link, KERN_WARNING, DRV_NAME
+ ": attempting PIO w/multiple DRQ: "
+ "this may fail due to h/w errata\n");
+ }
/*
* We're about to send a non-EDMA capable command to the
* port. Turn off EDMA so there won't be problems accessing
^ permalink raw reply related [flat|nested] 263+ messages in thread
* [git patches] libata fixes
@ 2008-06-13 7:03 Jeff Garzik
0 siblings, 0 replies; 263+ messages in thread
From: Jeff Garzik @ 2008-06-13 7:03 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide, LKML
More code than I'd like for -rc6, but it's adding a hardware workaround
for a specific chip (ATI SB600/SB700).
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 | 137 ++++++++++++++++++++++++++++++++++++++++++----------
1 files changed, 112 insertions(+), 25 deletions(-)
Shane Huang (1):
ahci: Workaround HW bug for SB600/700 SATA controller PMP support
Tejun Heo (1):
ahci: workarounds for mcp65
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 544b7d6..966ab40 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -89,6 +89,7 @@ enum {
board_ahci_sb600 = 3,
board_ahci_mv = 4,
board_ahci_sb700 = 5,
+ board_ahci_mcp65 = 6,
/* global controller registers */
HOST_CAP = 0x00, /* host capabilities */
@@ -190,6 +191,7 @@ enum {
AHCI_HFLAG_NO_PMP = (1 << 6), /* no PMP */
AHCI_HFLAG_NO_HOTPLUG = (1 << 7), /* ignore PxSERR.DIAG.N */
AHCI_HFLAG_SECT255 = (1 << 8), /* max 255 sectors */
+ AHCI_HFLAG_YES_NCQ = (1 << 9), /* force NCQ cap on */
/* ap->flags bits */
@@ -253,6 +255,8 @@ static void ahci_pmp_attach(struct ata_port *ap);
static void ahci_pmp_detach(struct ata_port *ap);
static int ahci_softreset(struct ata_link *link, unsigned int *class,
unsigned long deadline);
+static int ahci_sb600_softreset(struct ata_link *link, unsigned int *class,
+ unsigned long deadline);
static int ahci_hardreset(struct ata_link *link, unsigned int *class,
unsigned long deadline);
static int ahci_vt8251_hardreset(struct ata_link *link, unsigned int *class,
@@ -329,6 +333,12 @@ static struct ata_port_operations ahci_p5wdh_ops = {
.hardreset = ahci_p5wdh_hardreset,
};
+static struct ata_port_operations ahci_sb600_ops = {
+ .inherits = &ahci_ops,
+ .softreset = ahci_sb600_softreset,
+ .pmp_softreset = ahci_sb600_softreset,
+};
+
#define AHCI_HFLAGS(flags) .private_data = (void *)(flags)
static const struct ata_port_info ahci_port_info[] = {
@@ -359,11 +369,11 @@ static const struct ata_port_info ahci_port_info[] = {
{
AHCI_HFLAGS (AHCI_HFLAG_IGN_SERR_INTERNAL |
AHCI_HFLAG_32BIT_ONLY | AHCI_HFLAG_NO_MSI |
- AHCI_HFLAG_SECT255 | AHCI_HFLAG_NO_PMP),
+ AHCI_HFLAG_SECT255),
.flags = AHCI_FLAG_COMMON,
.pio_mask = 0x1f, /* pio0-4 */
.udma_mask = ATA_UDMA6,
- .port_ops = &ahci_ops,
+ .port_ops = &ahci_sb600_ops,
},
/* board_ahci_mv */
{
@@ -377,8 +387,15 @@ static const struct ata_port_info ahci_port_info[] = {
},
/* board_ahci_sb700 */
{
- AHCI_HFLAGS (AHCI_HFLAG_IGN_SERR_INTERNAL |
- AHCI_HFLAG_NO_PMP),
+ AHCI_HFLAGS (AHCI_HFLAG_IGN_SERR_INTERNAL),
+ .flags = AHCI_FLAG_COMMON,
+ .pio_mask = 0x1f, /* pio0-4 */
+ .udma_mask = ATA_UDMA6,
+ .port_ops = &ahci_sb600_ops,
+ },
+ /* board_ahci_mcp65 */
+ {
+ AHCI_HFLAGS (AHCI_HFLAG_YES_NCQ),
.flags = AHCI_FLAG_COMMON,
.pio_mask = 0x1f, /* pio0-4 */
.udma_mask = ATA_UDMA6,
@@ -438,14 +455,14 @@ static const struct pci_device_id ahci_pci_tbl[] = {
{ PCI_VDEVICE(VIA, 0x6287), board_ahci_vt8251 }, /* VIA VT8251 */
/* NVIDIA */
- { PCI_VDEVICE(NVIDIA, 0x044c), board_ahci }, /* MCP65 */
- { PCI_VDEVICE(NVIDIA, 0x044d), board_ahci }, /* MCP65 */
- { PCI_VDEVICE(NVIDIA, 0x044e), board_ahci }, /* MCP65 */
- { PCI_VDEVICE(NVIDIA, 0x044f), board_ahci }, /* MCP65 */
- { PCI_VDEVICE(NVIDIA, 0x045c), board_ahci }, /* MCP65 */
- { PCI_VDEVICE(NVIDIA, 0x045d), board_ahci }, /* MCP65 */
- { PCI_VDEVICE(NVIDIA, 0x045e), board_ahci }, /* MCP65 */
- { PCI_VDEVICE(NVIDIA, 0x045f), board_ahci }, /* MCP65 */
+ { PCI_VDEVICE(NVIDIA, 0x044c), board_ahci_mcp65 }, /* MCP65 */
+ { PCI_VDEVICE(NVIDIA, 0x044d), board_ahci_mcp65 }, /* MCP65 */
+ { PCI_VDEVICE(NVIDIA, 0x044e), board_ahci_mcp65 }, /* MCP65 */
+ { PCI_VDEVICE(NVIDIA, 0x044f), board_ahci_mcp65 }, /* MCP65 */
+ { PCI_VDEVICE(NVIDIA, 0x045c), board_ahci_mcp65 }, /* MCP65 */
+ { PCI_VDEVICE(NVIDIA, 0x045d), board_ahci_mcp65 }, /* MCP65 */
+ { PCI_VDEVICE(NVIDIA, 0x045e), board_ahci_mcp65 }, /* MCP65 */
+ { PCI_VDEVICE(NVIDIA, 0x045f), board_ahci_mcp65 }, /* MCP65 */
{ PCI_VDEVICE(NVIDIA, 0x0550), board_ahci }, /* MCP67 */
{ PCI_VDEVICE(NVIDIA, 0x0551), board_ahci }, /* MCP67 */
{ PCI_VDEVICE(NVIDIA, 0x0552), board_ahci }, /* MCP67 */
@@ -624,6 +641,12 @@ static void ahci_save_initial_config(struct pci_dev *pdev,
cap &= ~HOST_CAP_NCQ;
}
+ if (!(cap & HOST_CAP_NCQ) && (hpriv->flags & AHCI_HFLAG_YES_NCQ)) {
+ dev_printk(KERN_INFO, &pdev->dev,
+ "controller can do NCQ, turning on CAP_NCQ\n");
+ cap |= HOST_CAP_NCQ;
+ }
+
if ((cap & HOST_CAP_PMP) && (hpriv->flags & AHCI_HFLAG_NO_PMP)) {
dev_printk(KERN_INFO, &pdev->dev,
"controller can't do PMP, turning off CAP_PMP\n");
@@ -1262,19 +1285,11 @@ static int ahci_exec_polled_cmd(struct ata_port *ap, int pmp,
return 0;
}
-static int ahci_check_ready(struct ata_link *link)
-{
- void __iomem *port_mmio = ahci_port_base(link->ap);
- u8 status = readl(port_mmio + PORT_TFDATA) & 0xFF;
-
- return ata_check_ready(status);
-}
-
-static int ahci_softreset(struct ata_link *link, unsigned int *class,
- unsigned long deadline)
+static int ahci_do_softreset(struct ata_link *link, unsigned int *class,
+ int pmp, unsigned long deadline,
+ int (*check_ready)(struct ata_link *link))
{
struct ata_port *ap = link->ap;
- int pmp = sata_srst_pmp(link);
const char *reason = NULL;
unsigned long now, msecs;
struct ata_taskfile tf;
@@ -1312,7 +1327,7 @@ static int ahci_softreset(struct ata_link *link, unsigned int *class,
ahci_exec_polled_cmd(ap, pmp, &tf, 0, 0, 0);
/* wait for link to become ready */
- rc = ata_wait_after_reset(link, deadline, ahci_check_ready);
+ rc = ata_wait_after_reset(link, deadline, check_ready);
/* link occupied, -ENODEV too is an error */
if (rc) {
reason = "device not ready";
@@ -1328,6 +1343,72 @@ static int ahci_softreset(struct ata_link *link, unsigned int *class,
return rc;
}
+static int ahci_check_ready(struct ata_link *link)
+{
+ void __iomem *port_mmio = ahci_port_base(link->ap);
+ u8 status = readl(port_mmio + PORT_TFDATA) & 0xFF;
+
+ return ata_check_ready(status);
+}
+
+static int ahci_softreset(struct ata_link *link, unsigned int *class,
+ unsigned long deadline)
+{
+ int pmp = sata_srst_pmp(link);
+
+ DPRINTK("ENTER\n");
+
+ return ahci_do_softreset(link, class, pmp, deadline, ahci_check_ready);
+}
+
+static int ahci_sb600_check_ready(struct ata_link *link)
+{
+ void __iomem *port_mmio = ahci_port_base(link->ap);
+ u8 status = readl(port_mmio + PORT_TFDATA) & 0xFF;
+ u32 irq_status = readl(port_mmio + PORT_IRQ_STAT);
+
+ /*
+ * There is no need to check TFDATA if BAD PMP is found due to HW bug,
+ * which can save timeout delay.
+ */
+ if (irq_status & PORT_IRQ_BAD_PMP)
+ return -EIO;
+
+ return ata_check_ready(status);
+}
+
+static int ahci_sb600_softreset(struct ata_link *link, unsigned int *class,
+ unsigned long deadline)
+{
+ struct ata_port *ap = link->ap;
+ void __iomem *port_mmio = ahci_port_base(ap);
+ int pmp = sata_srst_pmp(link);
+ int rc;
+ u32 irq_sts;
+
+ DPRINTK("ENTER\n");
+
+ rc = ahci_do_softreset(link, class, pmp, deadline,
+ ahci_sb600_check_ready);
+
+ /*
+ * Soft reset fails on some ATI chips with IPMS set when PMP
+ * is enabled but SATA HDD/ODD is connected to SATA port,
+ * do soft reset again to port 0.
+ */
+ if (rc == -EIO) {
+ irq_sts = readl(port_mmio + PORT_IRQ_STAT);
+ if (irq_sts & PORT_IRQ_BAD_PMP) {
+ ata_link_printk(link, KERN_WARNING,
+ "failed due to HW bug, retry pmp=0\n");
+ rc = ahci_do_softreset(link, class, 0, deadline,
+ ahci_check_ready);
+ }
+ }
+
+ return rc;
+}
+
static int ahci_hardreset(struct ata_link *link, unsigned int *class,
unsigned long deadline)
{
@@ -2118,7 +2199,8 @@ static void ahci_p5wdh_workaround(struct ata_host *host)
static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
{
static int printed_version;
- struct ata_port_info pi = ahci_port_info[ent->driver_data];
+ unsigned int board_id = ent->driver_data;
+ struct ata_port_info pi = ahci_port_info[board_id];
const struct ata_port_info *ppi[] = { &pi, NULL };
struct device *dev = &pdev->dev;
struct ahci_host_priv *hpriv;
@@ -2167,6 +2249,11 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
return -ENOMEM;
hpriv->flags |= (unsigned long)pi.private_data;
+ /* MCP65 revision A1 and A2 can't do MSI */
+ if (board_id == board_ahci_mcp65 &&
+ (pdev->revision == 0xa1 || pdev->revision == 0xa2))
+ hpriv->flags |= AHCI_HFLAG_NO_MSI;
+
if ((hpriv->flags & AHCI_HFLAG_NO_MSI) || pci_enable_msi(pdev))
pci_intx(pdev, 1);
^ permalink raw reply related [flat|nested] 263+ messages in thread
* [git patches] libata fixes
@ 2008-06-04 10:45 Jeff Garzik
0 siblings, 0 replies; 263+ messages in thread
From: Jeff Garzik @ 2008-06-04 10:45 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds; +Cc: linux-ide, LKML
Alan's next-to-last patch revision, a much-needed ACPI fix-a-rama, ...
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/ata_piix.c | 2 +
drivers/ata/libata-acpi.c | 165 +++++++++++++++++++++++++++++-------------
drivers/ata/libata-sff.c | 115 ++++++++++++++++++++++++++----
drivers/ata/pata_icside.c | 2 +-
drivers/ata/pata_rb532_cf.c | 4 +-
drivers/ata/pata_scc.c | 5 +-
drivers/ata/sata_mv.c | 24 ++++---
include/linux/libata.h | 19 +-----
8 files changed, 239 insertions(+), 97 deletions(-)
Alan Cox (1):
libata-sff: Fix oops reported in kerneloops.org for pnp devices with no ctl
Colin Ian King (1):
[libata] ata_piix: more acer short cable quirks
Holger Macht (1):
[libata] ACPI: Properly handle bay devices in dock stations
Mark Lord (1):
sata_mv: PHY_MODE4 cleanups
Tejun Heo (1):
libata: kill unused constants
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index 3548ee7..81b7ae3 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -574,6 +574,8 @@ static const struct ich_laptop ich_laptop[] = {
{ 0x27DF, 0x1043, 0x1267 }, /* ICH7 on Asus W5F */
{ 0x27DF, 0x103C, 0x30A1 }, /* ICH7 on HP Compaq nc2400 */
{ 0x24CA, 0x1025, 0x0061 }, /* ICH4 on ACER Aspire 2023WLMi */
+ { 0x24CA, 0x1025, 0x003d }, /* ICH4 on ACER TM290 */
+ { 0x266F, 0x1025, 0x0066 }, /* ICH6 on ACER Aspire 1694WLMi */
{ 0x2653, 0x1043, 0x82D8 }, /* ICH6M on Asus Eee 701 */
/* end marker */
{ 0, }
diff --git a/drivers/ata/libata-acpi.c b/drivers/ata/libata-acpi.c
index dbf6ca7..3ff8b14 100644
--- a/drivers/ata/libata-acpi.c
+++ b/drivers/ata/libata-acpi.c
@@ -118,12 +118,62 @@ static void ata_acpi_associate_ide_port(struct ata_port *ap)
ap->pflags |= ATA_PFLAG_INIT_GTM_VALID;
}
-static void ata_acpi_handle_hotplug(struct ata_port *ap, struct ata_device
- *dev, u32 event)
+static void ata_acpi_eject_device(acpi_handle handle)
+{
+ struct acpi_object_list arg_list;
+ union acpi_object arg;
+
+ arg_list.count = 1;
+ arg_list.pointer = &arg;
+ arg.type = ACPI_TYPE_INTEGER;
+ arg.integer.value = 1;
+
+ if (ACPI_FAILURE(acpi_evaluate_object(handle, "_EJ0",
+ &arg_list, NULL)))
+ printk(KERN_ERR "Failed to evaluate _EJ0!\n");
+}
+
+/* @ap and @dev are the same as ata_acpi_handle_hotplug() */
+static void ata_acpi_detach_device(struct ata_port *ap, struct ata_device *dev)
+{
+ if (dev)
+ dev->flags |= ATA_DFLAG_DETACH;
+ else {
+ struct ata_link *tlink;
+ struct ata_device *tdev;
+
+ ata_port_for_each_link(tlink, ap)
+ ata_link_for_each_dev(tdev, tlink)
+ tdev->flags |= ATA_DFLAG_DETACH;
+ }
+
+ ata_port_schedule_eh(ap);
+}
+
+/**
+ * ata_acpi_handle_hotplug - ACPI event handler backend
+ * @ap: ATA port ACPI event occurred
+ * @dev: ATA device ACPI event occurred (can be NULL)
+ * @event: ACPI event which occurred
+ * @is_dock_event: boolean indicating whether the event was a dock one
+ *
+ * All ACPI bay / device realted events end up in this function. If
+ * the event is port-wide @dev is NULL. If the event is specific to a
+ * device, @dev points to it.
+ *
+ * Hotplug (as opposed to unplug) notification is always handled as
+ * port-wide while unplug only kills the target device on device-wide
+ * event.
+ *
+ * LOCKING:
+ * ACPI notify handler context. May sleep.
+ */
+static void ata_acpi_handle_hotplug(struct ata_port *ap, struct ata_device *dev,
+ u32 event, int is_dock_event)
{
char event_string[12];
char *envp[] = { event_string, NULL };
- struct ata_eh_info *ehi;
+ struct ata_eh_info *ehi = &ap->link.eh_info;
struct kobject *kobj = NULL;
int wait = 0;
unsigned long flags;
@@ -131,87 +181,100 @@ static void ata_acpi_handle_hotplug(struct ata_port *ap, struct ata_device
unsigned long sta;
acpi_status status;
- if (!ap)
- ap = dev->link->ap;
- ehi = &ap->link.eh_info;
-
- spin_lock_irqsave(ap->lock, flags);
-
- if (dev)
+ if (dev) {
+ if (dev->sdev)
+ kobj = &dev->sdev->sdev_gendev.kobj;
handle = dev->acpi_handle;
- else
+ } else {
+ kobj = &ap->dev->kobj;
handle = ap->acpi_handle;
+ }
status = acpi_get_handle(handle, "_EJ0", &tmphandle);
- if (ACPI_FAILURE(status)) {
- /* This device is not ejectable */
- spin_unlock_irqrestore(ap->lock, flags);
+ if (ACPI_FAILURE(status))
+ /* This device does not support hotplug */
return;
- }
- status = acpi_evaluate_integer(handle, "_STA", NULL, &sta);
- if (ACPI_FAILURE(status)) {
- printk ("Unable to determine bay status\n");
- spin_unlock_irqrestore(ap->lock, flags);
- return;
- }
+ spin_lock_irqsave(ap->lock, flags);
switch (event) {
case ACPI_NOTIFY_BUS_CHECK:
case ACPI_NOTIFY_DEVICE_CHECK:
ata_ehi_push_desc(ehi, "ACPI event");
- if (!sta) {
- /* Device has been unplugged */
- if (dev)
- dev->flags |= ATA_DFLAG_DETACH;
- else {
- struct ata_link *tlink;
- struct ata_device *tdev;
-
- ata_port_for_each_link(tlink, ap) {
- ata_link_for_each_dev(tdev, tlink) {
- tdev->flags |=
- ATA_DFLAG_DETACH;
- }
- }
- }
- ata_port_schedule_eh(ap);
- wait = 1;
- } else {
+
+ status = acpi_evaluate_integer(handle, "_STA", NULL, &sta);
+ if (ACPI_FAILURE(status)) {
+ ata_port_printk(ap, KERN_ERR,
+ "acpi: failed to determine bay status (0x%x)\n",
+ status);
+ break;
+ }
+
+ if (sta) {
ata_ehi_hotplugged(ehi);
ata_port_freeze(ap);
+ } else {
+ /* The device has gone - unplug it */
+ ata_acpi_detach_device(ap, dev);
+ wait = 1;
}
+ break;
+ case ACPI_NOTIFY_EJECT_REQUEST:
+ ata_ehi_push_desc(ehi, "ACPI event");
+
+ if (!is_dock_event)
+ break;
+
+ /* undock event - immediate unplug */
+ ata_acpi_detach_device(ap, dev);
+ wait = 1;
+ break;
}
+ /* make sure kobj doesn't go away while ap->lock is released */
+ kobject_get(kobj);
+
spin_unlock_irqrestore(ap->lock, flags);
- if (wait)
+ if (wait) {
ata_port_wait_eh(ap);
+ ata_acpi_eject_device(handle);
+ }
- if (dev) {
- if (dev->sdev)
- kobj = &dev->sdev->sdev_gendev.kobj;
- } else
- kobj = &ap->dev->kobj;
-
- if (kobj) {
+ if (kobj && !is_dock_event) {
sprintf(event_string, "BAY_EVENT=%d", event);
kobject_uevent_env(kobj, KOBJ_CHANGE, envp);
}
+
+ kobject_put(kobj);
+}
+
+static void ata_acpi_dev_notify_dock(acpi_handle handle, u32 event, void *data)
+{
+ struct ata_device *dev = data;
+
+ ata_acpi_handle_hotplug(dev->link->ap, dev, event, 1);
+}
+
+static void ata_acpi_ap_notify_dock(acpi_handle handle, u32 event, void *data)
+{
+ struct ata_port *ap = data;
+
+ ata_acpi_handle_hotplug(ap, NULL, event, 1);
}
static void ata_acpi_dev_notify(acpi_handle handle, u32 event, void *data)
{
struct ata_device *dev = data;
- ata_acpi_handle_hotplug(NULL, dev, event);
+ ata_acpi_handle_hotplug(dev->link->ap, dev, event, 0);
}
static void ata_acpi_ap_notify(acpi_handle handle, u32 event, void *data)
{
struct ata_port *ap = data;
- ata_acpi_handle_hotplug(ap, NULL, event);
+ ata_acpi_handle_hotplug(ap, NULL, event, 0);
}
/**
@@ -252,7 +315,7 @@ void ata_acpi_associate(struct ata_host *host)
ata_acpi_ap_notify, ap);
/* we might be on a docking station */
register_hotplug_dock_device(ap->acpi_handle,
- ata_acpi_ap_notify, ap);
+ ata_acpi_ap_notify_dock, ap);
}
for (j = 0; j < ata_link_max_devices(&ap->link); j++) {
@@ -264,7 +327,7 @@ void ata_acpi_associate(struct ata_host *host)
ata_acpi_dev_notify, dev);
/* we might be on a docking station */
register_hotplug_dock_device(dev->acpi_handle,
- ata_acpi_dev_notify, dev);
+ ata_acpi_dev_notify_dock, dev);
}
}
}
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
index 3c2d228..90d20c6 100644
--- a/drivers/ata/libata-sff.c
+++ b/drivers/ata/libata-sff.c
@@ -247,7 +247,7 @@ u8 ata_sff_check_status(struct ata_port *ap)
* LOCKING:
* Inherited from caller.
*/
-u8 ata_sff_altstatus(struct ata_port *ap)
+static u8 ata_sff_altstatus(struct ata_port *ap)
{
if (ap->ops->sff_check_altstatus)
return ap->ops->sff_check_altstatus(ap);
@@ -256,6 +256,93 @@ u8 ata_sff_altstatus(struct ata_port *ap)
}
/**
+ * ata_sff_irq_status - Check if the device is busy
+ * @ap: port where the device is
+ *
+ * Determine if the port is currently busy. Uses altstatus
+ * if available in order to avoid clearing shared IRQ status
+ * when finding an IRQ source. Non ctl capable devices don't
+ * share interrupt lines fortunately for us.
+ *
+ * LOCKING:
+ * Inherited from caller.
+ */
+static u8 ata_sff_irq_status(struct ata_port *ap)
+{
+ u8 status;
+
+ if (ap->ops->sff_check_altstatus || ap->ioaddr.altstatus_addr) {
+ status = ata_sff_altstatus(ap);
+ /* Not us: We are busy */
+ if (status & ATA_BUSY)
+ return status;
+ }
+ /* Clear INTRQ latch */
+ status = ata_sff_check_status(ap);
+ return status;
+}
+
+/**
+ * ata_sff_sync - Flush writes
+ * @ap: Port to wait for.
+ *
+ * CAUTION:
+ * If we have an mmio device with no ctl and no altstatus
+ * method this will fail. No such devices are known to exist.
+ *
+ * LOCKING:
+ * Inherited from caller.
+ */
+
+static void ata_sff_sync(struct ata_port *ap)
+{
+ if (ap->ops->sff_check_altstatus)
+ ap->ops->sff_check_altstatus(ap);
+ else if (ap->ioaddr.altstatus_addr)
+ ioread8(ap->ioaddr.altstatus_addr);
+}
+
+/**
+ * ata_sff_pause - Flush writes and wait 400nS
+ * @ap: Port to pause for.
+ *
+ * CAUTION:
+ * If we have an mmio device with no ctl and no altstatus
+ * method this will fail. No such devices are known to exist.
+ *
+ * LOCKING:
+ * Inherited from caller.
+ */
+
+void ata_sff_pause(struct ata_port *ap)
+{
+ ata_sff_sync(ap);
+ ndelay(400);
+}
+
+/**
+ * ata_sff_dma_pause - Pause before commencing DMA
+ * @ap: Port to pause for.
+ *
+ * Perform I/O fencing and ensure sufficient cycle delays occur
+ * for the HDMA1:0 transition
+ */
+
+void ata_sff_dma_pause(struct ata_port *ap)
+{
+ if (ap->ops->sff_check_altstatus || ap->ioaddr.altstatus_addr) {
+ /* An altstatus read will cause the needed delay without
+ messing up the IRQ status */
+ ata_sff_altstatus(ap);
+ return;
+ }
+ /* There are no DMA controllers without ctl. BUG here to ensure
+ we never violate the HDMA1:0 transition timing and risk
+ corruption. */
+ BUG();
+}
+
+/**
* ata_sff_busy_sleep - sleep until BSY clears, or timeout
* @ap: port containing status register to be polled
* @tmout_pat: impatience timeout
@@ -742,7 +829,7 @@ static void ata_pio_sectors(struct ata_queued_cmd *qc)
} else
ata_pio_sector(qc);
- ata_sff_altstatus(qc->ap); /* flush */
+ ata_sff_sync(qc->ap); /* flush */
}
/**
@@ -763,8 +850,9 @@ static void atapi_send_cdb(struct ata_port *ap, struct ata_queued_cmd *qc)
WARN_ON(qc->dev->cdb_len < 12);
ap->ops->sff_data_xfer(qc->dev, qc->cdb, qc->dev->cdb_len, 1);
- ata_sff_altstatus(ap); /* flush */
-
+ ata_sff_sync(ap);
+ /* FIXME: If the CDB is for DMA do we need to do the transition delay
+ or is bmdma_start guaranteed to do it ? */
switch (qc->tf.protocol) {
case ATAPI_PROT_PIO:
ap->hsm_task_state = HSM_ST;
@@ -905,7 +993,7 @@ static void atapi_pio_bytes(struct ata_queued_cmd *qc)
if (unlikely(__atapi_pio_bytes(qc, bytes)))
goto err_out;
- ata_sff_altstatus(ap); /* flush */
+ ata_sff_sync(ap); /* flush */
return;
@@ -1489,14 +1577,10 @@ inline unsigned int ata_sff_host_intr(struct ata_port *ap,
goto idle_irq;
}
- /* check altstatus */
- status = ata_sff_altstatus(ap);
- if (status & ATA_BUSY)
- goto idle_irq;
- /* check main status, clearing INTRQ */
- status = ap->ops->sff_check_status(ap);
- if (unlikely(status & ATA_BUSY))
+ /* check main status, clearing INTRQ if needed */
+ status = ata_sff_irq_status(ap);
+ if (status & ATA_BUSY)
goto idle_irq;
/* ack bmdma irq events */
@@ -2030,7 +2114,7 @@ void ata_sff_error_handler(struct ata_port *ap)
ap->ops->bmdma_stop(qc);
}
- ata_sff_altstatus(ap);
+ ata_sff_sync(ap); /* FIXME: We don't need this */
ap->ops->sff_check_status(ap);
ap->ops->sff_irq_clear(ap);
@@ -2203,7 +2287,7 @@ void ata_bmdma_stop(struct ata_queued_cmd *qc)
mmio + ATA_DMA_CMD);
/* one-PIO-cycle guaranteed wait, per spec, for HDMA1:0 transition */
- ata_sff_altstatus(ap); /* dummy read */
+ ata_sff_dma_pause(ap);
}
/**
@@ -2722,7 +2806,8 @@ EXPORT_SYMBOL_GPL(ata_sff_qc_prep);
EXPORT_SYMBOL_GPL(ata_sff_dumb_qc_prep);
EXPORT_SYMBOL_GPL(ata_sff_dev_select);
EXPORT_SYMBOL_GPL(ata_sff_check_status);
-EXPORT_SYMBOL_GPL(ata_sff_altstatus);
+EXPORT_SYMBOL_GPL(ata_sff_dma_pause);
+EXPORT_SYMBOL_GPL(ata_sff_pause);
EXPORT_SYMBOL_GPL(ata_sff_busy_sleep);
EXPORT_SYMBOL_GPL(ata_sff_wait_ready);
EXPORT_SYMBOL_GPL(ata_sff_tf_load);
diff --git a/drivers/ata/pata_icside.c b/drivers/ata/pata_icside.c
index 1713843..cf9e984 100644
--- a/drivers/ata/pata_icside.c
+++ b/drivers/ata/pata_icside.c
@@ -270,7 +270,7 @@ static void pata_icside_bmdma_stop(struct ata_queued_cmd *qc)
disable_dma(state->dma);
/* see ata_bmdma_stop */
- ata_sff_altstatus(ap);
+ ata_sff_dma_pause(ap);
}
static u8 pata_icside_bmdma_status(struct ata_port *ap)
diff --git a/drivers/ata/pata_rb532_cf.c b/drivers/ata/pata_rb532_cf.c
index a108d25..f8b3ffc 100644
--- a/drivers/ata/pata_rb532_cf.c
+++ b/drivers/ata/pata_rb532_cf.c
@@ -57,7 +57,9 @@ static inline void rb532_pata_finish_io(struct ata_port *ap)
struct ata_host *ah = ap->host;
struct rb532_cf_info *info = ah->private_data;
- ata_sff_altstatus(ap);
+ /* FIXME: Keep previous delay. If this is merely a fence then
+ ata_sff_sync might be sufficient. */
+ ata_sff_dma_pause(ap);
ndelay(RB500_CF_IO_DELAY);
set_irq_type(info->irq, IRQ_TYPE_LEVEL_HIGH);
diff --git a/drivers/ata/pata_scc.c b/drivers/ata/pata_scc.c
index e965b25..bbf5aa3 100644
--- a/drivers/ata/pata_scc.c
+++ b/drivers/ata/pata_scc.c
@@ -726,7 +726,7 @@ static void scc_bmdma_stop (struct ata_queued_cmd *qc)
in_be32(bmid_base + SCC_DMA_CMD) & ~ATA_DMA_START);
/* one-PIO-cycle guaranteed wait, per spec, for HDMA1:0 transition */
- ata_sff_altstatus(ap); /* dummy read */
+ ata_sff_dma_pause(ap); /* dummy read */
}
/**
@@ -747,7 +747,8 @@ static u8 scc_bmdma_status (struct ata_port *ap)
return host_stat;
/* errata A252,A308 workaround: Step4 */
- if ((ata_sff_altstatus(ap) & ATA_ERR) && (int_status & INTSTS_INTRQ))
+ if ((scc_check_altstatus(ap) & ATA_ERR)
+ && (int_status & INTSTS_INTRQ))
return (host_stat | ATA_DMA_INTR);
/* errata A308 workaround Step5 */
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index acf347f..60391e9 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -224,6 +224,11 @@ enum {
PHY_MODE3 = 0x310,
PHY_MODE4 = 0x314,
+ PHY_MODE4_CFG_MASK = 0x00000003, /* phy internal config field */
+ PHY_MODE4_CFG_VALUE = 0x00000001, /* phy internal config field */
+ PHY_MODE4_RSVD_ZEROS = 0x5de3fffa, /* Gen2e always write zeros */
+ PHY_MODE4_RSVD_ONES = 0x00000005, /* Gen2e always write ones */
+
PHY_MODE2 = 0x330,
SATA_IFCTL_OFS = 0x344,
SATA_TESTCTL_OFS = 0x348,
@@ -2563,17 +2568,16 @@ static void mv6_phy_errata(struct mv_host_priv *hpriv, void __iomem *mmio,
m3 &= ~0x1c;
if (fix_phy_mode4) {
- u32 m4;
-
- m4 = readl(port_mmio + PHY_MODE4);
-
- /* workaround for errata FEr SATA#10 (part 1) */
- m4 = (m4 & ~(1 << 1)) | (1 << 0);
-
- /* enforce bit restrictions on GenIIe devices */
+ u32 m4 = readl(port_mmio + PHY_MODE4);
+ /*
+ * Enforce reserved-bit restrictions on GenIIe devices only.
+ * For earlier chipsets, force only the internal config field
+ * (workaround for errata FEr SATA#10 part 1).
+ */
if (IS_GEN_IIE(hpriv))
- m4 = (m4 & ~0x5DE3FFFC) | (1 << 2);
-
+ m4 = (m4 & ~PHY_MODE4_RSVD_ZEROS) | PHY_MODE4_RSVD_ONES;
+ else
+ m4 = (m4 & ~PHY_MODE4_CFG_MASK) | PHY_MODE4_CFG_VALUE;
writel(m4, port_mmio + PHY_MODE4);
}
/*
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 4a92fba..e57e5d0 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -111,13 +111,10 @@ enum {
/* various global constants */
LIBATA_MAX_PRD = ATA_MAX_PRD / 2,
LIBATA_DUMB_MAX_PRD = ATA_MAX_PRD / 4, /* Worst case */
- ATA_MAX_PORTS = 8,
ATA_DEF_QUEUE = 1,
/* tag ATA_MAX_QUEUE - 1 is reserved for internal commands */
ATA_MAX_QUEUE = 32,
ATA_TAG_INTERNAL = ATA_MAX_QUEUE - 1,
- ATA_MAX_BUS = 2,
- ATA_DEF_BUSY_WAIT = 10000,
ATA_SHORT_PAUSE = (HZ >> 6) + 1,
ATAPI_MAX_DRAIN = 16 << 10,
@@ -1435,7 +1432,8 @@ extern void ata_sff_qc_prep(struct ata_queued_cmd *qc);
extern void ata_sff_dumb_qc_prep(struct ata_queued_cmd *qc);
extern void ata_sff_dev_select(struct ata_port *ap, unsigned int device);
extern u8 ata_sff_check_status(struct ata_port *ap);
-extern u8 ata_sff_altstatus(struct ata_port *ap);
+extern void ata_sff_pause(struct ata_port *ap);
+extern void ata_sff_dma_pause(struct ata_port *ap);
extern int ata_sff_busy_sleep(struct ata_port *ap,
unsigned long timeout_pat, unsigned long timeout);
extern int ata_sff_wait_ready(struct ata_link *link, unsigned long deadline);
@@ -1496,19 +1494,6 @@ extern int ata_pci_sff_init_one(struct pci_dev *pdev,
#endif /* CONFIG_PCI */
/**
- * ata_sff_pause - Flush writes and pause 400 nanoseconds.
- * @ap: Port to wait for.
- *
- * LOCKING:
- * Inherited from caller.
- */
-static inline void ata_sff_pause(struct ata_port *ap)
-{
- ata_sff_altstatus(ap);
- ndelay(400);
-}
-
-/**
* ata_sff_busy_wait - Wait for a port status register
* @ap: Port to wait for.
* @bits: bits that must be clear
^ permalink