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

* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
libata: don't check n_sectors during revalidation if zero
pata_via: Add Arima W730-K8 and other rebadgings
pata_sis: Add the FSC Amilo and friends
pata_pdc2027x: PLL detection fixes
libata: fix n_sectors failure handling during revalidation

+20 -11
+6 -1
drivers/ata/libata-core.c
··· 3700 3700 goto fail; 3701 3701 3702 3702 /* verify n_sectors hasn't changed */ 3703 - if (dev->class == ATA_DEV_ATA && dev->n_sectors != n_sectors) { 3703 + if (dev->class == ATA_DEV_ATA && n_sectors && 3704 + dev->n_sectors != n_sectors) { 3704 3705 ata_dev_printk(dev, KERN_INFO, "n_sectors mismatch " 3705 3706 "%llu != %llu\n", 3706 3707 (unsigned long long)n_sectors, 3707 3708 (unsigned long long)dev->n_sectors); 3709 + 3710 + /* restore original n_sectors */ 3711 + dev->n_sectors = n_sectors; 3712 + 3708 3713 rc = -ENODEV; 3709 3714 goto fail; 3710 3715 }
+9 -9
drivers/ata/pata_pdc2027x.c
··· 563 563 u32 bccrl, bccrh, bccrlv, bccrhv; 564 564 565 565 retry: 566 - bccrl = readl(mmio_base + PDC_BYTE_COUNT) & 0xffff; 567 - bccrh = readl(mmio_base + PDC_BYTE_COUNT + 0x100) & 0xffff; 566 + bccrl = readl(mmio_base + PDC_BYTE_COUNT) & 0x7fff; 567 + bccrh = readl(mmio_base + PDC_BYTE_COUNT + 0x100) & 0x7fff; 568 568 rmb(); 569 569 570 570 /* Read the counter values again for verification */ 571 - bccrlv = readl(mmio_base + PDC_BYTE_COUNT) & 0xffff; 572 - bccrhv = readl(mmio_base + PDC_BYTE_COUNT + 0x100) & 0xffff; 571 + bccrlv = readl(mmio_base + PDC_BYTE_COUNT) & 0x7fff; 572 + bccrhv = readl(mmio_base + PDC_BYTE_COUNT + 0x100) & 0x7fff; 573 573 rmb(); 574 574 575 575 counter = (bccrh << 15) | bccrl; ··· 692 692 struct timeval start_time, end_time; 693 693 long pll_clock, usec_elapsed; 694 694 695 - /* Read current counter value */ 696 - start_count = pdc_read_counter(host); 697 - do_gettimeofday(&start_time); 698 - 699 695 /* Start the test mode */ 700 696 scr = readl(mmio_base + PDC_SYS_CTL); 701 697 PDPRINTK("scr[%X]\n", scr); 702 698 writel(scr | (0x01 << 14), mmio_base + PDC_SYS_CTL); 703 699 readl(mmio_base + PDC_SYS_CTL); /* flush */ 700 + 701 + /* Read current counter value */ 702 + start_count = pdc_read_counter(host); 703 + do_gettimeofday(&start_time); 704 704 705 705 /* Let the counter run for 100 ms. */ 706 706 mdelay(100); ··· 719 719 usec_elapsed = (end_time.tv_sec - start_time.tv_sec) * 1000000 + 720 720 (end_time.tv_usec - start_time.tv_usec); 721 721 722 - pll_clock = (start_count - end_count) / 100 * 722 + pll_clock = ((start_count - end_count) & 0x3fffffff) / 100 * 723 723 (100000000 / usec_elapsed); 724 724 725 725 PDPRINTK("start[%ld] end[%ld] \n", start_count, end_count);
+1
drivers/ata/pata_sis.c
··· 54 54 static const struct sis_laptop sis_laptop[] = { 55 55 /* devid, subvendor, subdev */ 56 56 { 0x5513, 0x1043, 0x1107 }, /* ASUS A6K */ 57 + { 0x5513, 0x1734, 0x105F }, /* FSC Amilo A1630 */ 57 58 /* end marker */ 58 59 { 0, } 59 60 };
+4 -1
drivers/ata/pata_via.c
··· 63 63 #include <linux/dmi.h> 64 64 65 65 #define DRV_NAME "pata_via" 66 - #define DRV_VERSION "0.3.1" 66 + #define DRV_VERSION "0.3.2" 67 67 68 68 /* 69 69 * The following comes directly from Vojtech Pavlik's ide/pci/via82cxxx ··· 143 143 { 144 144 /* Systems by DMI */ 145 145 if (dmi_check_system(cable_dmi_table)) 146 + return 1; 147 + /* Arima W730-K8/Targa Visionary 811/... */ 148 + if (pdev->subsystem_vendor == 0x161F && pdev->subsystem_device == 0x2032) 146 149 return 1; 147 150 return 0; 148 151 }