libata updates for 2.6.40
Subsystems (3)
PATCH 1/1 libata updates for 2.6.40
Not a big list for 2.6.40. Note the "fix oops" commit you already have; git will DTRT and notice that when you merge.
There remains a big pile of minor Bart patches I'm sorting through, probably slated for 2.6.41 at this point.
We'll have to watch for regressions with the "power off empty ports" change from Intel. Everything looks good with the change, and it saves power, but it's the kind of change that really just needs wide field testing before we can have full confidence.
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/acard-ahci.c | 2 drivers/ata/libata-core.c | 10 + drivers/ata/libata-eh.c | 4 drivers/ata/libata-pmp.c | 10 + drivers/ata/libata-scsi.c | 2 drivers/ata/libata-sff.c | 9 + drivers/ata/pata_at91.c | 297 ++++++++++++++++++++++++++++++--------------- drivers/ata/pata_cmd64x.c | 42 +++++- drivers/ata/pata_triflex.c | 23 +++ include/linux/libata.h | 1 include/linux/pci_ids.h | 2 11 files changed, 290 insertions(+), 112 deletions(-)
Igor Plyatov (1):
pata_at91: SMC settings calculation bugfixes, support for t6z and IORDY
James Bottomley (2):
pata_cm64x: fix boot crash on parisc
libata-sff: prevent irq descriptions for dummy ports
Jeff Garzik (1):
drivers/ata/acard-ahci.c: fix enum warning
Kristen Carlson Accardi (1):
libata: Power off empty ports
Martin K. Petersen (1):
libata: Use Maximum Write Same Length to report discard size limit
Mikulas Patocka (1):
ATA: Don't powerdown Compaq Triflex IDE device on suspend
Pavel Herrmann (1):
libata-pmp: add support for Thermaltake BlackX Duet esata drive dock
Tejun Heo (1):
libata: fix oops when LPM is used with PMP
drivers/ata/acard-ahci.c +1 -1
@@ -417,7 +417,7 @@ static int acard_ahci_init_one(struct pci_dev *pdev, const struct pci_device_idVPRINTK ("ENTER\n" ); -WARN_ON (ATA_MAX_QUEUE >AHCI_MAX_CMDS ); +WARN_ON ((int )ATA_MAX_QUEUE >AHCI_MAX_CMDS );if (!printed_version++)dev_printk (KERN_DEBUG , &pdev->dev,"version " DRV_VERSION "\n" );
drivers/ata/libata-core.c +8 -2
@@ -3619,8 +3619,14 @@ int sata_link_scr_lpm(struct ata_link *link, enum ata_lpm_policy policy, scontrol |= (0x2 <<8 );break ;case ATA_LPM_MIN_POWER : -/* no restrictions on LPM transitions */ - scontrol &= ~(0x3 <<8 ); +if (ata_link_nr_enabled (link) >0 ) +/* no restrictions on LPM transitions */ + scontrol &= ~(0x3 <<8 ); +else { +/* empty port, power off */ + scontrol &= ~0xf ; + scontrol |= (0x1 <<2 ); + }break ;default :WARN_ON (1 );
drivers/ata/libata-eh.c +2 -2
@@ -3316,7 +3316,7 @@ static int ata_eh_set_lpm(struct ata_link *link, enum ata_lpm_policy policy,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; -bool no_dipm = ap->flags &ATA_FLAG_NO_DIPM ; +bool no_dipm = link->ap->flags &ATA_FLAG_NO_DIPM ;unsigned int hints =ATA_LPM_EMPTY |ATA_LPM_HIPM ;unsigned int err_mask;int rc;
@@ -3423,7 +3423,7 @@ fail:return rc; } -static int ata_link_nr_enabled (struct ata_link *link) +int ata_link_nr_enabled (struct ata_link *link) {struct ata_device *dev;int cnt =0 ;
drivers/ata/libata-pmp.c +10 -0
@@ -449,6 +449,16 @@ static void sata_pmp_quirks(struct ata_port *ap)* otherwise. Don't try hard to recover it. */ ap->pmp_link[ap->nr_pmp_links -1 ].flags |=ATA_LFLAG_NO_RETRY ; + }else if (vendor ==0x197b && devid ==0x2352 ) { +/* chip found in Thermaltake BlackX Duet, jmicron JMB350? */ +ata_for_each_link (link, ap,EDGE ) { +/* SRST breaks detection and disks get misclassified +* LPM disabled to avoid potential problems +*/ + link->flags |=ATA_LFLAG_NO_LPM | +ATA_LFLAG_NO_SRST | +ATA_LFLAG_ASSUME_ATA ; + } } }
drivers/ata/libata-scsi.c +1 -1
@@ -2138,7 +2138,7 @@ static unsigned int ata_scsiop_inq_b0(struct ata_scsi_args *args, u8 *rbuf)* with the unmap bit set. */ if (ata_id_has_trim (args->id)) { -put_unaligned_be32 (65535 *512 /8 , &rbuf[20 ]); +put_unaligned_be64 (65535 *512 /8 , &rbuf[36 ]);put_unaligned_be32 (1 , &rbuf[28 ]); }
drivers/ata/libata-sff.c +7 -2
@@ -2447,13 +2447,18 @@ int ata_pci_sff_activate_host(struct ata_host *host,return -ENOMEM ;if (!legacy_mode && pdev->irq) { +int i; + rc =devm_request_irq (dev, pdev->irq, irq_handler,IRQF_SHARED , drv_name, host);if (rc) goto out; -ata_port_desc (host->ports[0 ],"irq %d" , pdev->irq); -ata_port_desc (host->ports[1 ],"irq %d" , pdev->irq); +for (i =0 ; i <2 ; i++) { +if (ata_port_is_dummy (host->ports[i])) +continue ; +ata_port_desc (host->ports[i],"irq %d" , pdev->irq); + } }else if (legacy_mode) {if (!ata_port_is_dummy (host->ports[0 ])) { rc = devm_request_irq(dev, ATA_PRIMARY_IRQ(pdev),
drivers/ata/pata_at91.c +198 -99
349 lines not on this page · raw message
drivers/ata/pata_cmd64x.c +38 -4
70 lines not on this page · raw message
drivers/ata/pata_triflex.c +22 -1
@@ -210,13 +210,34 @@ static const struct pci_device_id triflex[] = { { }, }; +#ifdef CONFIG_PM +static int triflex_ata_pci_device_suspend (struct pci_dev *pdev,pm_message_t mesg) +{ +struct ata_host *host =dev_get_drvdata (&pdev->dev); +int rc =0 ; + + rc =ata_host_suspend (host, mesg); +if (rc) +return rc; + +/* +* We must not disable or powerdown the device. +* APM bios refuses to suspend if IDE is not accessible. +*/ +pci_save_state (pdev); + +return 0 ; +} + +#endif +static struct pci_driver triflex_pci_driver = { .name =DRV_NAME , .id_table = triflex, .probe = triflex_init_one, .remove = ata_pci_remove_one, #ifdef CONFIG_PM - .suspend = ata_pci_device_suspend, + .suspend = triflex_ata_pci_device_suspend, .resume = ata_pci_device_resume, #endif };
include/linux/libata.h +1 -0
@@ -1151,6 +1151,7 @@ extern void ata_do_eh(struct ata_port *ap, ata_prereset_fn_t prereset, ata_reset_fn_t softreset, ata_reset_fn_t hardreset, ata_postreset_fn_t postreset);extern void ata_std_error_handler (struct ata_port *ap); +extern int ata_link_nr_enabled (struct ata_link *link);/* * Base operations to inherit from and initializers for sht
include/linux/pci_ids.h +2 -0
@@ -608,6 +608,8 @@#define PCI_DEVICE_ID_MATROX_G550 0x2527#define PCI_DEVICE_ID_MATROX_VIA 0x4536 +#define PCI_VENDOR_ID_MOBILITY_ELECTRONICS 0x14f2 +#define PCI_VENDOR_ID_CT 0x102c#define PCI_DEVICE_ID_CT_69000 0x00c0#define PCI_DEVICE_ID_CT_65545 0x00d8