From 9f7897554eeca34ec23dd877cc27402bd327a1ce Mon Sep 17 00:00:00 2001 From: Peer Chen Date: Thu, 7 Jun 2007 18:23:12 +0800 Subject: PATA: Add the MCP73/77 support to PATA driver Add the MCP73/MCP77 support to PATA driver. The patch base on kernel 2.6.22-rc4 Signed-off-by: Peer Chen Signed-off-by: Jeff Garzik --- drivers/ata/pata_amd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/ata/pata_amd.c b/drivers/ata/pata_amd.c index b439351f1fd..a16f629b7b3 100644 --- a/drivers/ata/pata_amd.c +++ b/drivers/ata/pata_amd.c @@ -693,6 +693,8 @@ static const struct pci_device_id amd[] = { { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_IDE), 8 }, { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP65_IDE), 8 }, { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP67_IDE), 8 }, + { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP73_IDE), 8 }, + { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP77_IDE), 8 }, { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_CS5536_IDE), 9 }, { }, -- cgit v1.2.3-18-g5258 From 374abf2cb16a9df8be96675c606996458872e8b3 Mon Sep 17 00:00:00 2001 From: Bartlomiej Zolnierkiewicz Date: Mon, 11 Jun 2007 11:40:07 +0200 Subject: pata_it821x: (partially) fix DMA in RAID mode Code intended to check DMA status was checking DMA command register. Moreover firmware seems to "forget" to set DMA capable bit for the slave device (at least in RAID mode but without ITE RAID volumes) so check device ID for DMA capable bit when deciding whether to use DMA and remove DMA status check completely. Thanks to Pavol Simo for the bugreport and testing the initial fix. This change unfortunately still doesn't fix DMA in RAID mode (which works fine with IDE it821x) but Alan is working on the missing pieces (pata_it821x vs libata EH issues). Signed-off-by: Bartlomiej Zolnierkiewicz Acked-by: Alan Cox Cc: Tejun Heo Signed-off-by: Jeff Garzik --- drivers/ata/pata_it821x.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/ata/pata_it821x.c b/drivers/ata/pata_it821x.c index b3456d7a592..525c9c14289 100644 --- a/drivers/ata/pata_it821x.c +++ b/drivers/ata/pata_it821x.c @@ -2,6 +2,7 @@ * pata_it821x.c - IT821x PATA for new ATA layer * (C) 2005 Red Hat Inc * Alan Cox + * (C) 2007 Bartlomiej Zolnierkiewicz * * based upon * @@ -79,7 +80,7 @@ #define DRV_NAME "pata_it821x" -#define DRV_VERSION "0.3.6" +#define DRV_VERSION "0.3.7" struct it821x_dev { @@ -460,14 +461,8 @@ static unsigned int it821x_passthru_qc_issue_prot(struct ata_queued_cmd *qc) static int it821x_smart_set_mode(struct ata_port *ap, struct ata_device **unused) { - int dma_enabled = 0; int i; - /* Bits 5 and 6 indicate if DMA is active on master/slave */ - /* It is possible that BMDMA isn't allocated */ - if (ap->ioaddr.bmdma_addr) - dma_enabled = ioread8(ap->ioaddr.bmdma_addr + ATA_DMA_CMD); - for (i = 0; i < ATA_MAX_DEVICES; i++) { struct ata_device *dev = &ap->device[i]; if (ata_dev_enabled(dev)) { @@ -476,7 +471,7 @@ static int it821x_smart_set_mode(struct ata_port *ap, struct ata_device **unused dev->dma_mode = XFER_MW_DMA_0; /* We do need the right mode information for DMA or PIO and this comes from the current configuration flags */ - if (dma_enabled & (1 << (5 + i))) { + if (ata_id_has_dma(dev->id)) { ata_dev_printk(dev, KERN_INFO, "configured for DMA\n"); dev->xfer_mode = XFER_MW_DMA_0; dev->xfer_shift = ATA_SHIFT_MWDMA; -- cgit v1.2.3-18-g5258 From 2f8fcebbf5c8dd2ee7eb5711c03318c011d50d39 Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Mon, 18 Jun 2007 14:38:41 +0900 Subject: libata: more NONCQ devices More for the NCQ blacklist. One hitachi and one raptor. Other members of these families of drives are already on the list, so no surprises. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik --- drivers/ata/libata-core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 047eabd7536..35628123ca7 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -3802,6 +3802,8 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = { { "HTS541010G9SA00", "MBZOC60D", ATA_HORKAGE_NONCQ, }, /* Drives which do spurious command completion */ { "HTS541680J9SA00", "SB2IC7EP", ATA_HORKAGE_NONCQ, }, + { "HTS541612J9SA00", "SBDIC7JP", ATA_HORKAGE_NONCQ, }, + { "WDC WD740ADFD-00NLR1", NULL, ATA_HORKAGE_NONCQ, }, /* Devices with NCQ limits */ -- cgit v1.2.3-18-g5258 From 3fae450c68d06b8890e1530bdd0910e938e7251d Mon Sep 17 00:00:00 2001 From: Henrik Kretzschmar Date: Tue, 19 Jun 2007 10:10:50 +0200 Subject: kerneldoc fix in libata Fix parameter name from ata_dev_reread_id() in libata-core.c for kerneldoc. Signed-off-by: Henrik Kretzschmar Signed-off-by: Jeff Garzik --- drivers/ata/libata-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 35628123ca7..adfae9d1ceb 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -3659,7 +3659,7 @@ static int ata_dev_same_device(struct ata_device *dev, unsigned int new_class, /** * ata_dev_reread_id - Re-read IDENTIFY data - * @adev: target ATA device + * @dev: target ATA device * @readid_flags: read ID flags * * Re-read IDENTIFY page and make sure @dev is still attached to -- cgit v1.2.3-18-g5258 From a3d2cc5e742f82a87fdf9e2b730f41ff381c0a73 Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Tue, 19 Jun 2007 18:52:56 +0900 Subject: ahci: fix PORTS_IMPL override If PORTS_IMPL register is zero, ahci initialize it to full mask corresponding to nr_ports in the CAP register. hpriv->cap, which is initialized at the end of the function, is incorrectly used as value of CAP causing ahci to always override PORTS_IMPL to 0x1 if it's zero. Fix it. This fixes a bug where early ich6 ahci can only access the first port. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik --- drivers/ata/ahci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 545f330e59a..ca5229d24d8 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -527,7 +527,7 @@ static void ahci_save_initial_config(struct pci_dev *pdev, /* fixup zero port_map */ if (!port_map) { - port_map = (1 << ahci_nr_ports(hpriv->cap)) - 1; + port_map = (1 << ahci_nr_ports(cap)) - 1; dev_printk(KERN_WARNING, &pdev->dev, "PORTS_IMPL is zero, forcing 0x%x\n", port_map); -- cgit v1.2.3-18-g5258 From 5fe675e2b3e41349deb0c81667065b9cb229ea1d Mon Sep 17 00:00:00 2001 From: Stas Sergeev Date: Wed, 20 Jun 2007 22:42:13 +0400 Subject: fix module_param mistake in it821x The attached patch fixes a trivial mistake in a MODULE_PARAM_DESC of pata_it821x driver. The parameter name in MODULE_PARAM_DESC should match the one in module_param_named. Signed-off-by: Stas Sergeev Signed-off-by: Jeff Garzik --- drivers/ata/pata_it821x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ata/pata_it821x.c b/drivers/ata/pata_it821x.c index 525c9c14289..dab4e7cf8cd 100644 --- a/drivers/ata/pata_it821x.c +++ b/drivers/ata/pata_it821x.c @@ -794,7 +794,7 @@ MODULE_VERSION(DRV_VERSION); module_param_named(noraid, it8212_noraid, int, S_IRUGO); -MODULE_PARM_DESC(it8212_noraid, "Force card into bypass mode"); +MODULE_PARM_DESC(noraid, "Force card into bypass mode"); module_init(it821x_init); module_exit(it821x_exit); -- cgit v1.2.3-18-g5258