Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
ata_piix: Add HP Compaq nc6000 to the broken poweroff list
ahci: add warning messages for hp laptops with broken suspend
pata_efar: fix PIO2 underclocking
pata_legacy: wait for async probing

+91 -9
+72
drivers/ata/ahci.c
··· 220 220 AHCI_HFLAG_NO_HOTPLUG = (1 << 7), /* ignore PxSERR.DIAG.N */ 221 221 AHCI_HFLAG_SECT255 = (1 << 8), /* max 255 sectors */ 222 222 AHCI_HFLAG_YES_NCQ = (1 << 9), /* force NCQ cap on */ 223 + AHCI_HFLAG_NO_SUSPEND = (1 << 10), /* don't suspend */ 223 224 224 225 /* ap->flags bits */ 225 226 ··· 2317 2316 static int ahci_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg) 2318 2317 { 2319 2318 struct ata_host *host = dev_get_drvdata(&pdev->dev); 2319 + struct ahci_host_priv *hpriv = host->private_data; 2320 2320 void __iomem *mmio = host->iomap[AHCI_PCI_BAR]; 2321 2321 u32 ctl; 2322 + 2323 + if (mesg.event & PM_EVENT_SUSPEND && 2324 + hpriv->flags & AHCI_HFLAG_NO_SUSPEND) { 2325 + dev_printk(KERN_ERR, &pdev->dev, 2326 + "BIOS update required for suspend/resume\n"); 2327 + return -EIO; 2328 + } 2322 2329 2323 2330 if (mesg.event & PM_EVENT_SLEEP) { 2324 2331 /* AHCI spec rev1.1 section 8.3.3: ··· 2619 2610 return false; 2620 2611 } 2621 2612 2613 + static bool ahci_broken_suspend(struct pci_dev *pdev) 2614 + { 2615 + static const struct dmi_system_id sysids[] = { 2616 + /* 2617 + * On HP dv[4-6] and HDX18 with earlier BIOSen, link 2618 + * to the harddisk doesn't become online after 2619 + * resuming from STR. Warn and fail suspend. 2620 + */ 2621 + { 2622 + .ident = "dv4", 2623 + .matches = { 2624 + DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), 2625 + DMI_MATCH(DMI_PRODUCT_NAME, 2626 + "HP Pavilion dv4 Notebook PC"), 2627 + }, 2628 + .driver_data = "F.30", /* cutoff BIOS version */ 2629 + }, 2630 + { 2631 + .ident = "dv5", 2632 + .matches = { 2633 + DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), 2634 + DMI_MATCH(DMI_PRODUCT_NAME, 2635 + "HP Pavilion dv5 Notebook PC"), 2636 + }, 2637 + .driver_data = "F.16", /* cutoff BIOS version */ 2638 + }, 2639 + { 2640 + .ident = "dv6", 2641 + .matches = { 2642 + DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), 2643 + DMI_MATCH(DMI_PRODUCT_NAME, 2644 + "HP Pavilion dv6 Notebook PC"), 2645 + }, 2646 + .driver_data = "F.21", /* cutoff BIOS version */ 2647 + }, 2648 + { 2649 + .ident = "HDX18", 2650 + .matches = { 2651 + DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), 2652 + DMI_MATCH(DMI_PRODUCT_NAME, 2653 + "HP HDX18 Notebook PC"), 2654 + }, 2655 + .driver_data = "F.23", /* cutoff BIOS version */ 2656 + }, 2657 + { } /* terminate list */ 2658 + }; 2659 + const struct dmi_system_id *dmi = dmi_first_match(sysids); 2660 + const char *ver; 2661 + 2662 + if (!dmi || pdev->bus->number || pdev->devfn != PCI_DEVFN(0x1f, 2)) 2663 + return false; 2664 + 2665 + ver = dmi_get_system_info(DMI_BIOS_VERSION); 2666 + 2667 + return !ver || strcmp(ver, dmi->driver_data) < 0; 2668 + } 2669 + 2622 2670 static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) 2623 2671 { 2624 2672 static int printed_version; ··· 2779 2713 pi.flags |= ATA_FLAG_NO_POWEROFF_SPINDOWN; 2780 2714 dev_info(&pdev->dev, 2781 2715 "quirky BIOS, skipping spindown on poweroff\n"); 2716 + } 2717 + 2718 + if (ahci_broken_suspend(pdev)) { 2719 + hpriv->flags |= AHCI_HFLAG_NO_SUSPEND; 2720 + dev_printk(KERN_WARNING, &pdev->dev, 2721 + "BIOS update required for suspend/resume\n"); 2782 2722 } 2783 2723 2784 2724 /* CAP.NP sometimes indicate the index of the last enabled
+9
drivers/ata/ata_piix.c
··· 1455 1455 /* PCI slot number of the controller */ 1456 1456 .driver_data = (void *)0x1FUL, 1457 1457 }, 1458 + { 1459 + .ident = "HP Compaq nc6000", 1460 + .matches = { 1461 + DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), 1462 + DMI_MATCH(DMI_PRODUCT_NAME, "HP Compaq nc6000"), 1463 + }, 1464 + /* PCI slot number of the controller */ 1465 + .driver_data = (void *)0x1FUL, 1466 + }, 1458 1467 1459 1468 { } /* terminate list */ 1460 1469 };
+8 -9
drivers/ata/pata_efar.c
··· 22 22 #include <linux/ata.h> 23 23 24 24 #define DRV_NAME "pata_efar" 25 - #define DRV_VERSION "0.4.4" 25 + #define DRV_VERSION "0.4.5" 26 26 27 27 /** 28 28 * efar_pre_reset - Enable bits ··· 98 98 { 2, 1 }, 99 99 { 2, 3 }, }; 100 100 101 - if (pio > 2) 102 - control |= 1; /* TIME1 enable */ 101 + if (pio > 1) 102 + control |= 1; /* TIME */ 103 103 if (ata_pio_need_iordy(adev)) /* PIO 3/4 require IORDY */ 104 - control |= 2; /* IE enable */ 105 - /* Intel specifies that the PPE functionality is for disk only */ 104 + control |= 2; /* IE */ 105 + /* Intel specifies that the prefetch/posting is for disk only */ 106 106 if (adev->class == ATA_DEV_ATA) 107 - control |= 4; /* PPE enable */ 107 + control |= 4; /* PPE */ 108 108 109 109 pci_read_config_word(dev, idetm_port, &idetm_data); 110 110 111 - /* Enable PPE, IE and TIME as appropriate */ 112 - 111 + /* Set PPE, IE, and TIME as appropriate */ 113 112 if (adev->devno == 0) { 114 113 idetm_data &= 0xCCF0; 115 114 idetm_data |= control; ··· 128 129 pci_write_config_byte(dev, 0x44, slave_data); 129 130 } 130 131 131 - idetm_data |= 0x4000; /* Ensure SITRE is enabled */ 132 + idetm_data |= 0x4000; /* Ensure SITRE is set */ 132 133 pci_write_config_word(dev, idetm_port, idetm_data); 133 134 } 134 135
+2
drivers/ata/pata_legacy.c
··· 48 48 * 49 49 */ 50 50 51 + #include <linux/async.h> 51 52 #include <linux/kernel.h> 52 53 #include <linux/module.h> 53 54 #include <linux/pci.h> ··· 1029 1028 &legacy_sht); 1030 1029 if (ret) 1031 1030 goto fail; 1031 + async_synchronize_full(); 1032 1032 ld->platform_dev = pdev; 1033 1033 1034 1034 /* Nothing found means we drop the port as its probably not there */