libata fixes
Subsystems (3)
PATCH 1/1 libata 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:
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
Documentation/kernel-parameters.txt +4 -0
@@ -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.
drivers/ata/ahci.c +74 -5
117 lines not on this page · raw message
drivers/ata/libata-core.c +3 -0
@@ -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, },
drivers/ata/pata_at91.c +4 -13
@@ -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 ; }
drivers/ata/pata_atiixp.c +10 -9
@@ -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
drivers/ata/sata_nv.c +8 -0
@@ -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)" );