diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-09-11 07:37:28 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-09-11 07:37:28 -0400 |
commit | 09b22a2f678ae733801b888c44756d0abd686b8a (patch) | |
tree | 6ca52d4011ce6b11c6450d3a574ea6a53cc0d339 /drivers | |
parent | 3ba35573ad9a149a3af19625b502679283382f6b (diff) | |
parent | adee14b2e1557d0a8559f29681732d05a89dfc35 (diff) |
Merge commit 'v2.6.27-rc6' into sched/devel
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ata/Kconfig | 6 | ||||
-rw-r--r-- | drivers/ata/ahci.c | 21 | ||||
-rw-r--r-- | drivers/ata/libata-sff.c | 5 | ||||
-rw-r--r-- | drivers/ata/pata_marvell.c | 51 | ||||
-rw-r--r-- | drivers/ata/pata_sil680.c | 3 | ||||
-rw-r--r-- | drivers/ata/sata_mv.c | 3 | ||||
-rw-r--r-- | drivers/ata/sata_nv.c | 19 | ||||
-rw-r--r-- | drivers/clocksource/acpi_pm.c | 54 | ||||
-rw-r--r-- | drivers/input/mouse/bcm5974.c | 74 | ||||
-rw-r--r-- | drivers/input/serio/i8042-x86ia64io.h | 2 | ||||
-rw-r--r-- | drivers/s390/cio/chp.c | 7 | ||||
-rw-r--r-- | drivers/s390/cio/cio.c | 4 | ||||
-rw-r--r-- | drivers/s390/cio/css.c | 32 | ||||
-rw-r--r-- | drivers/s390/cio/device_fsm.c | 7 | ||||
-rw-r--r-- | drivers/usb/host/ohci-omap.c | 2 | ||||
-rw-r--r-- | drivers/usb/serial/console.c | 2 | ||||
-rw-r--r-- | drivers/xen/balloon.c | 2 |
17 files changed, 191 insertions, 103 deletions
diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig index ae8494944c45..11c8c19f0fb7 100644 --- a/drivers/ata/Kconfig +++ b/drivers/ata/Kconfig | |||
@@ -448,8 +448,10 @@ config PATA_MARVELL | |||
448 | tristate "Marvell PATA support via legacy mode" | 448 | tristate "Marvell PATA support via legacy mode" |
449 | depends on PCI | 449 | depends on PCI |
450 | help | 450 | help |
451 | This option enables limited support for the Marvell 88SE6145 ATA | 451 | This option enables limited support for the Marvell 88SE61xx ATA |
452 | controller. | 452 | controllers. If you wish to use only the SATA ports then select |
453 | the AHCI driver alone. If you wish to the use the PATA port or | ||
454 | both SATA and PATA include this driver. | ||
453 | 455 | ||
454 | If unsure, say N. | 456 | If unsure, say N. |
455 | 457 | ||
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index c729e6988bbb..2e1a7cb2ed5f 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c | |||
@@ -420,7 +420,7 @@ static const struct ata_port_info ahci_port_info[] = { | |||
420 | /* board_ahci_mv */ | 420 | /* board_ahci_mv */ |
421 | { | 421 | { |
422 | AHCI_HFLAGS (AHCI_HFLAG_NO_NCQ | AHCI_HFLAG_NO_MSI | | 422 | AHCI_HFLAGS (AHCI_HFLAG_NO_NCQ | AHCI_HFLAG_NO_MSI | |
423 | AHCI_HFLAG_MV_PATA), | 423 | AHCI_HFLAG_MV_PATA | AHCI_HFLAG_NO_PMP), |
424 | .flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | | 424 | .flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | |
425 | ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA, | 425 | ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA, |
426 | .pio_mask = 0x1f, /* pio0-4 */ | 426 | .pio_mask = 0x1f, /* pio0-4 */ |
@@ -487,7 +487,9 @@ static const struct pci_device_id ahci_pci_tbl[] = { | |||
487 | { PCI_VDEVICE(INTEL, 0x3a05), board_ahci }, /* ICH10 */ | 487 | { PCI_VDEVICE(INTEL, 0x3a05), board_ahci }, /* ICH10 */ |
488 | { PCI_VDEVICE(INTEL, 0x3a25), board_ahci }, /* ICH10 */ | 488 | { PCI_VDEVICE(INTEL, 0x3a25), board_ahci }, /* ICH10 */ |
489 | { PCI_VDEVICE(INTEL, 0x3b24), board_ahci }, /* PCH RAID */ | 489 | { PCI_VDEVICE(INTEL, 0x3b24), board_ahci }, /* PCH RAID */ |
490 | { PCI_VDEVICE(INTEL, 0x3b25), board_ahci }, /* PCH RAID */ | ||
490 | { PCI_VDEVICE(INTEL, 0x3b2b), board_ahci }, /* PCH RAID */ | 491 | { PCI_VDEVICE(INTEL, 0x3b2b), board_ahci }, /* PCH RAID */ |
492 | { PCI_VDEVICE(INTEL, 0x3b2c), board_ahci }, /* PCH RAID */ | ||
491 | 493 | ||
492 | /* JMicron 360/1/3/5/6, match class to avoid IDE function */ | 494 | /* JMicron 360/1/3/5/6, match class to avoid IDE function */ |
493 | { PCI_VENDOR_ID_JMICRON, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, | 495 | { PCI_VENDOR_ID_JMICRON, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, |
@@ -610,6 +612,15 @@ module_param(ahci_em_messages, int, 0444); | |||
610 | MODULE_PARM_DESC(ahci_em_messages, | 612 | MODULE_PARM_DESC(ahci_em_messages, |
611 | "Set AHCI Enclosure Management Message type (0 = disabled, 1 = LED"); | 613 | "Set AHCI Enclosure Management Message type (0 = disabled, 1 = LED"); |
612 | 614 | ||
615 | #if defined(CONFIG_PATA_MARVELL) || defined(CONFIG_PATA_MARVELL_MODULE) | ||
616 | static int marvell_enable; | ||
617 | #else | ||
618 | static int marvell_enable = 1; | ||
619 | #endif | ||
620 | module_param(marvell_enable, int, 0644); | ||
621 | MODULE_PARM_DESC(marvell_enable, "Marvell SATA via AHCI (1 = enabled)"); | ||
622 | |||
623 | |||
613 | static inline int ahci_nr_ports(u32 cap) | 624 | static inline int ahci_nr_ports(u32 cap) |
614 | { | 625 | { |
615 | return (cap & 0x1f) + 1; | 626 | return (cap & 0x1f) + 1; |
@@ -732,6 +743,8 @@ static void ahci_save_initial_config(struct pci_dev *pdev, | |||
732 | "MV_AHCI HACK: port_map %x -> %x\n", | 743 | "MV_AHCI HACK: port_map %x -> %x\n", |
733 | port_map, | 744 | port_map, |
734 | port_map & mv); | 745 | port_map & mv); |
746 | dev_printk(KERN_ERR, &pdev->dev, | ||
747 | "Disabling your PATA port. Use the boot option 'ahci.marvell_enable=0' to avoid this.\n"); | ||
735 | 748 | ||
736 | port_map &= mv; | 749 | port_map &= mv; |
737 | } | 750 | } |
@@ -2533,6 +2546,12 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
2533 | if (!printed_version++) | 2546 | if (!printed_version++) |
2534 | dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n"); | 2547 | dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n"); |
2535 | 2548 | ||
2549 | /* The AHCI driver can only drive the SATA ports, the PATA driver | ||
2550 | can drive them all so if both drivers are selected make sure | ||
2551 | AHCI stays out of the way */ | ||
2552 | if (pdev->vendor == PCI_VENDOR_ID_MARVELL && !marvell_enable) | ||
2553 | return -ENODEV; | ||
2554 | |||
2536 | /* acquire resources */ | 2555 | /* acquire resources */ |
2537 | rc = pcim_enable_device(pdev); | 2556 | rc = pcim_enable_device(pdev); |
2538 | if (rc) | 2557 | if (rc) |
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c index 304fdc6f1dc2..2a4c516894f0 100644 --- a/drivers/ata/libata-sff.c +++ b/drivers/ata/libata-sff.c | |||
@@ -1315,11 +1315,6 @@ fsm_start: | |||
1315 | break; | 1315 | break; |
1316 | 1316 | ||
1317 | case HSM_ST_ERR: | 1317 | case HSM_ST_ERR: |
1318 | /* make sure qc->err_mask is available to | ||
1319 | * know what's wrong and recover | ||
1320 | */ | ||
1321 | WARN_ON(!(qc->err_mask & (AC_ERR_DEV | AC_ERR_HSM))); | ||
1322 | |||
1323 | ap->hsm_task_state = HSM_ST_IDLE; | 1318 | ap->hsm_task_state = HSM_ST_IDLE; |
1324 | 1319 | ||
1325 | /* complete taskfile transaction */ | 1320 | /* complete taskfile transaction */ |
diff --git a/drivers/ata/pata_marvell.c b/drivers/ata/pata_marvell.c index 24a011b25024..0d87eec84966 100644 --- a/drivers/ata/pata_marvell.c +++ b/drivers/ata/pata_marvell.c | |||
@@ -20,29 +20,30 @@ | |||
20 | #include <linux/ata.h> | 20 | #include <linux/ata.h> |
21 | 21 | ||
22 | #define DRV_NAME "pata_marvell" | 22 | #define DRV_NAME "pata_marvell" |
23 | #define DRV_VERSION "0.1.4" | 23 | #define DRV_VERSION "0.1.6" |
24 | 24 | ||
25 | /** | 25 | /** |
26 | * marvell_pre_reset - check for 40/80 pin | 26 | * marvell_pata_active - check if PATA is active |
27 | * @link: link | 27 | * @pdev: PCI device |
28 | * @deadline: deadline jiffies for the operation | ||
29 | * | 28 | * |
30 | * Perform the PATA port setup we need. | 29 | * Returns 1 if the PATA port may be active. We know how to check this |
30 | * for the 6145 but not the other devices | ||
31 | */ | 31 | */ |
32 | 32 | ||
33 | static int marvell_pre_reset(struct ata_link *link, unsigned long deadline) | 33 | static int marvell_pata_active(struct pci_dev *pdev) |
34 | { | 34 | { |
35 | struct ata_port *ap = link->ap; | 35 | int i; |
36 | struct pci_dev *pdev = to_pci_dev(ap->host->dev); | ||
37 | u32 devices; | 36 | u32 devices; |
38 | void __iomem *barp; | 37 | void __iomem *barp; |
39 | int i; | ||
40 | 38 | ||
41 | /* Check if our port is enabled */ | 39 | /* We don't yet know how to do this for other devices */ |
40 | if (pdev->device != 0x6145) | ||
41 | return 1; | ||
42 | 42 | ||
43 | barp = pci_iomap(pdev, 5, 0x10); | 43 | barp = pci_iomap(pdev, 5, 0x10); |
44 | if (barp == NULL) | 44 | if (barp == NULL) |
45 | return -ENOMEM; | 45 | return -ENOMEM; |
46 | |||
46 | printk("BAR5:"); | 47 | printk("BAR5:"); |
47 | for(i = 0; i <= 0x0F; i++) | 48 | for(i = 0; i <= 0x0F; i++) |
48 | printk("%02X:%02X ", i, ioread8(barp + i)); | 49 | printk("%02X:%02X ", i, ioread8(barp + i)); |
@@ -51,9 +52,27 @@ static int marvell_pre_reset(struct ata_link *link, unsigned long deadline) | |||
51 | devices = ioread32(barp + 0x0C); | 52 | devices = ioread32(barp + 0x0C); |
52 | pci_iounmap(pdev, barp); | 53 | pci_iounmap(pdev, barp); |
53 | 54 | ||
54 | if ((pdev->device == 0x6145) && (ap->port_no == 0) && | 55 | if (devices & 0x10) |
55 | (!(devices & 0x10))) /* PATA enable ? */ | 56 | return 1; |
56 | return -ENOENT; | 57 | return 0; |
58 | } | ||
59 | |||
60 | /** | ||
61 | * marvell_pre_reset - check for 40/80 pin | ||
62 | * @link: link | ||
63 | * @deadline: deadline jiffies for the operation | ||
64 | * | ||
65 | * Perform the PATA port setup we need. | ||
66 | */ | ||
67 | |||
68 | static int marvell_pre_reset(struct ata_link *link, unsigned long deadline) | ||
69 | { | ||
70 | struct ata_port *ap = link->ap; | ||
71 | struct pci_dev *pdev = to_pci_dev(ap->host->dev); | ||
72 | |||
73 | if (pdev->device == 0x6145 && ap->port_no == 0 && | ||
74 | !marvell_pata_active(pdev)) /* PATA enable ? */ | ||
75 | return -ENOENT; | ||
57 | 76 | ||
58 | return ata_sff_prereset(link, deadline); | 77 | return ata_sff_prereset(link, deadline); |
59 | } | 78 | } |
@@ -128,6 +147,12 @@ static int marvell_init_one (struct pci_dev *pdev, const struct pci_device_id *i | |||
128 | if (pdev->device == 0x6101) | 147 | if (pdev->device == 0x6101) |
129 | ppi[1] = &ata_dummy_port_info; | 148 | ppi[1] = &ata_dummy_port_info; |
130 | 149 | ||
150 | #if defined(CONFIG_AHCI) || defined(CONFIG_AHCI_MODULE) | ||
151 | if (!marvell_pata_active(pdev)) { | ||
152 | printk(KERN_INFO DRV_NAME ": PATA port not active, deferring to AHCI driver.\n"); | ||
153 | return -ENODEV; | ||
154 | } | ||
155 | #endif | ||
131 | return ata_pci_sff_init_one(pdev, ppi, &marvell_sht, NULL); | 156 | return ata_pci_sff_init_one(pdev, ppi, &marvell_sht, NULL); |
132 | } | 157 | } |
133 | 158 | ||
diff --git a/drivers/ata/pata_sil680.c b/drivers/ata/pata_sil680.c index 720b8645f58a..e970b227fbce 100644 --- a/drivers/ata/pata_sil680.c +++ b/drivers/ata/pata_sil680.c | |||
@@ -322,9 +322,6 @@ static int __devinit sil680_init_one(struct pci_dev *pdev, | |||
322 | /* Try to acquire MMIO resources and fallback to PIO if | 322 | /* Try to acquire MMIO resources and fallback to PIO if |
323 | * that fails | 323 | * that fails |
324 | */ | 324 | */ |
325 | rc = pcim_enable_device(pdev); | ||
326 | if (rc) | ||
327 | return rc; | ||
328 | rc = pcim_iomap_regions(pdev, 1 << SIL680_MMIO_BAR, DRV_NAME); | 325 | rc = pcim_iomap_regions(pdev, 1 << SIL680_MMIO_BAR, DRV_NAME); |
329 | if (rc) | 326 | if (rc) |
330 | goto use_ioports; | 327 | goto use_ioports; |
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index 13c1d2af18ac..c815f8ecf6e6 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c | |||
@@ -667,7 +667,8 @@ static const struct pci_device_id mv_pci_tbl[] = { | |||
667 | { PCI_VDEVICE(MARVELL, 0x5041), chip_504x }, | 667 | { PCI_VDEVICE(MARVELL, 0x5041), chip_504x }, |
668 | { PCI_VDEVICE(MARVELL, 0x5080), chip_5080 }, | 668 | { PCI_VDEVICE(MARVELL, 0x5080), chip_5080 }, |
669 | { PCI_VDEVICE(MARVELL, 0x5081), chip_508x }, | 669 | { PCI_VDEVICE(MARVELL, 0x5081), chip_508x }, |
670 | /* RocketRAID 1740/174x have different identifiers */ | 670 | /* RocketRAID 1720/174x have different identifiers */ |
671 | { PCI_VDEVICE(TTI, 0x1720), chip_6042 }, | ||
671 | { PCI_VDEVICE(TTI, 0x1740), chip_508x }, | 672 | { PCI_VDEVICE(TTI, 0x1740), chip_508x }, |
672 | { PCI_VDEVICE(TTI, 0x1742), chip_508x }, | 673 | { PCI_VDEVICE(TTI, 0x1742), chip_508x }, |
673 | 674 | ||
diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c index 858f70610eda..1e1f3f3757ae 100644 --- a/drivers/ata/sata_nv.c +++ b/drivers/ata/sata_nv.c | |||
@@ -309,8 +309,6 @@ static void nv_nf2_freeze(struct ata_port *ap); | |||
309 | static void nv_nf2_thaw(struct ata_port *ap); | 309 | static void nv_nf2_thaw(struct ata_port *ap); |
310 | static void nv_ck804_freeze(struct ata_port *ap); | 310 | static void nv_ck804_freeze(struct ata_port *ap); |
311 | static void nv_ck804_thaw(struct ata_port *ap); | 311 | static void nv_ck804_thaw(struct ata_port *ap); |
312 | static int nv_hardreset(struct ata_link *link, unsigned int *class, | ||
313 | unsigned long deadline); | ||
314 | static int nv_adma_slave_config(struct scsi_device *sdev); | 312 | static int nv_adma_slave_config(struct scsi_device *sdev); |
315 | static int nv_adma_check_atapi_dma(struct ata_queued_cmd *qc); | 313 | static int nv_adma_check_atapi_dma(struct ata_queued_cmd *qc); |
316 | static void nv_adma_qc_prep(struct ata_queued_cmd *qc); | 314 | static void nv_adma_qc_prep(struct ata_queued_cmd *qc); |
@@ -407,7 +405,7 @@ static struct scsi_host_template nv_swncq_sht = { | |||
407 | 405 | ||
408 | static struct ata_port_operations nv_generic_ops = { | 406 | static struct ata_port_operations nv_generic_ops = { |
409 | .inherits = &ata_bmdma_port_ops, | 407 | .inherits = &ata_bmdma_port_ops, |
410 | .hardreset = nv_hardreset, | 408 | .hardreset = ATA_OP_NULL, |
411 | .scr_read = nv_scr_read, | 409 | .scr_read = nv_scr_read, |
412 | .scr_write = nv_scr_write, | 410 | .scr_write = nv_scr_write, |
413 | }; | 411 | }; |
@@ -1588,21 +1586,6 @@ static void nv_mcp55_thaw(struct ata_port *ap) | |||
1588 | ata_sff_thaw(ap); | 1586 | ata_sff_thaw(ap); |
1589 | } | 1587 | } |
1590 | 1588 | ||
1591 | static int nv_hardreset(struct ata_link *link, unsigned int *class, | ||
1592 | unsigned long deadline) | ||
1593 | { | ||
1594 | int rc; | ||
1595 | |||
1596 | /* SATA hardreset fails to retrieve proper device signature on | ||
1597 | * some controllers. Request follow up SRST. For more info, | ||
1598 | * see http://bugzilla.kernel.org/show_bug.cgi?id=3352 | ||
1599 | */ | ||
1600 | rc = sata_sff_hardreset(link, class, deadline); | ||
1601 | if (rc) | ||
1602 | return rc; | ||
1603 | return -EAGAIN; | ||
1604 | } | ||
1605 | |||
1606 | static void nv_adma_error_handler(struct ata_port *ap) | 1589 | static void nv_adma_error_handler(struct ata_port *ap) |
1607 | { | 1590 | { |
1608 | struct nv_adma_port_priv *pp = ap->private_data; | 1591 | struct nv_adma_port_priv *pp = ap->private_data; |
diff --git a/drivers/clocksource/acpi_pm.c b/drivers/clocksource/acpi_pm.c index 5ca1d80de182..4eee533f3f4a 100644 --- a/drivers/clocksource/acpi_pm.c +++ b/drivers/clocksource/acpi_pm.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/errno.h> | 21 | #include <linux/errno.h> |
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <linux/pci.h> | 23 | #include <linux/pci.h> |
24 | #include <linux/delay.h> | ||
24 | #include <asm/io.h> | 25 | #include <asm/io.h> |
25 | 26 | ||
26 | /* | 27 | /* |
@@ -151,13 +152,13 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_LE, | |||
151 | */ | 152 | */ |
152 | static int verify_pmtmr_rate(void) | 153 | static int verify_pmtmr_rate(void) |
153 | { | 154 | { |
154 | u32 value1, value2; | 155 | cycle_t value1, value2; |
155 | unsigned long count, delta; | 156 | unsigned long count, delta; |
156 | 157 | ||
157 | mach_prepare_counter(); | 158 | mach_prepare_counter(); |
158 | value1 = read_pmtmr(); | 159 | value1 = clocksource_acpi_pm.read(); |
159 | mach_countup(&count); | 160 | mach_countup(&count); |
160 | value2 = read_pmtmr(); | 161 | value2 = clocksource_acpi_pm.read(); |
161 | delta = (value2 - value1) & ACPI_PM_MASK; | 162 | delta = (value2 - value1) & ACPI_PM_MASK; |
162 | 163 | ||
163 | /* Check that the PMTMR delta is within 5% of what we expect */ | 164 | /* Check that the PMTMR delta is within 5% of what we expect */ |
@@ -175,10 +176,13 @@ static int verify_pmtmr_rate(void) | |||
175 | #define verify_pmtmr_rate() (0) | 176 | #define verify_pmtmr_rate() (0) |
176 | #endif | 177 | #endif |
177 | 178 | ||
179 | /* Number of monotonicity checks to perform during initialization */ | ||
180 | #define ACPI_PM_MONOTONICITY_CHECKS 10 | ||
181 | |||
178 | static int __init init_acpi_pm_clocksource(void) | 182 | static int __init init_acpi_pm_clocksource(void) |
179 | { | 183 | { |
180 | u32 value1, value2; | 184 | cycle_t value1, value2; |
181 | unsigned int i; | 185 | unsigned int i, j, good = 0; |
182 | 186 | ||
183 | if (!pmtmr_ioport) | 187 | if (!pmtmr_ioport) |
184 | return -ENODEV; | 188 | return -ENODEV; |
@@ -187,24 +191,32 @@ static int __init init_acpi_pm_clocksource(void) | |||
187 | clocksource_acpi_pm.shift); | 191 | clocksource_acpi_pm.shift); |
188 | 192 | ||
189 | /* "verify" this timing source: */ | 193 | /* "verify" this timing source: */ |
190 | value1 = read_pmtmr(); | 194 | for (j = 0; j < ACPI_PM_MONOTONICITY_CHECKS; j++) { |
191 | for (i = 0; i < 10000; i++) { | 195 | value1 = clocksource_acpi_pm.read(); |
192 | value2 = read_pmtmr(); | 196 | for (i = 0; i < 10000; i++) { |
193 | if (value2 == value1) | 197 | value2 = clocksource_acpi_pm.read(); |
194 | continue; | 198 | if (value2 == value1) |
195 | if (value2 > value1) | 199 | continue; |
196 | goto pm_good; | 200 | if (value2 > value1) |
197 | if ((value2 < value1) && ((value2) < 0xFFF)) | 201 | good++; |
198 | goto pm_good; | 202 | break; |
199 | printk(KERN_INFO "PM-Timer had inconsistent results:" | 203 | if ((value2 < value1) && ((value2) < 0xFFF)) |
200 | " 0x%#x, 0x%#x - aborting.\n", value1, value2); | 204 | good++; |
201 | return -EINVAL; | 205 | break; |
206 | printk(KERN_INFO "PM-Timer had inconsistent results:" | ||
207 | " 0x%#llx, 0x%#llx - aborting.\n", | ||
208 | value1, value2); | ||
209 | return -EINVAL; | ||
210 | } | ||
211 | udelay(300 * i); | ||
212 | } | ||
213 | |||
214 | if (good != ACPI_PM_MONOTONICITY_CHECKS) { | ||
215 | printk(KERN_INFO "PM-Timer failed consistency check " | ||
216 | " (0x%#llx) - aborting.\n", value1); | ||
217 | return -ENODEV; | ||
202 | } | 218 | } |
203 | printk(KERN_INFO "PM-Timer had no reasonable result:" | ||
204 | " 0x%#x - aborting.\n", value1); | ||
205 | return -ENODEV; | ||
206 | 219 | ||
207 | pm_good: | ||
208 | if (verify_pmtmr_rate() != 0) | 220 | if (verify_pmtmr_rate() != 0) |
209 | return -ENODEV; | 221 | return -ENODEV; |
210 | 222 | ||
diff --git a/drivers/input/mouse/bcm5974.c b/drivers/input/mouse/bcm5974.c index 2ec921bf3c60..18f4d7f6ce6d 100644 --- a/drivers/input/mouse/bcm5974.c +++ b/drivers/input/mouse/bcm5974.c | |||
@@ -63,7 +63,7 @@ | |||
63 | } | 63 | } |
64 | 64 | ||
65 | /* table of devices that work with this driver */ | 65 | /* table of devices that work with this driver */ |
66 | static const struct usb_device_id bcm5974_table [] = { | 66 | static const struct usb_device_id bcm5974_table[] = { |
67 | /* MacbookAir1.1 */ | 67 | /* MacbookAir1.1 */ |
68 | BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING_ANSI), | 68 | BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING_ANSI), |
69 | BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING_ISO), | 69 | BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING_ISO), |
@@ -105,7 +105,7 @@ struct tp_header { | |||
105 | 105 | ||
106 | /* trackpad finger structure */ | 106 | /* trackpad finger structure */ |
107 | struct tp_finger { | 107 | struct tp_finger { |
108 | __le16 origin; /* left/right origin? */ | 108 | __le16 origin; /* zero when switching track finger */ |
109 | __le16 abs_x; /* absolute x coodinate */ | 109 | __le16 abs_x; /* absolute x coodinate */ |
110 | __le16 abs_y; /* absolute y coodinate */ | 110 | __le16 abs_y; /* absolute y coodinate */ |
111 | __le16 rel_x; /* relative x coodinate */ | 111 | __le16 rel_x; /* relative x coodinate */ |
@@ -159,6 +159,7 @@ struct bcm5974 { | |||
159 | struct bt_data *bt_data; /* button transferred data */ | 159 | struct bt_data *bt_data; /* button transferred data */ |
160 | struct urb *tp_urb; /* trackpad usb request block */ | 160 | struct urb *tp_urb; /* trackpad usb request block */ |
161 | struct tp_data *tp_data; /* trackpad transferred data */ | 161 | struct tp_data *tp_data; /* trackpad transferred data */ |
162 | int fingers; /* number of fingers on trackpad */ | ||
162 | }; | 163 | }; |
163 | 164 | ||
164 | /* logical dimensions */ | 165 | /* logical dimensions */ |
@@ -172,6 +173,10 @@ struct bcm5974 { | |||
172 | #define SN_WIDTH 100 /* width signal-to-noise ratio */ | 173 | #define SN_WIDTH 100 /* width signal-to-noise ratio */ |
173 | #define SN_COORD 250 /* coordinate signal-to-noise ratio */ | 174 | #define SN_COORD 250 /* coordinate signal-to-noise ratio */ |
174 | 175 | ||
176 | /* pressure thresholds */ | ||
177 | #define PRESSURE_LOW (2 * DIM_PRESSURE / SN_PRESSURE) | ||
178 | #define PRESSURE_HIGH (3 * PRESSURE_LOW) | ||
179 | |||
175 | /* device constants */ | 180 | /* device constants */ |
176 | static const struct bcm5974_config bcm5974_config_table[] = { | 181 | static const struct bcm5974_config bcm5974_config_table[] = { |
177 | { | 182 | { |
@@ -248,6 +253,7 @@ static void setup_events_to_report(struct input_dev *input_dev, | |||
248 | 0, cfg->y.dim, cfg->y.fuzz, 0); | 253 | 0, cfg->y.dim, cfg->y.fuzz, 0); |
249 | 254 | ||
250 | __set_bit(EV_KEY, input_dev->evbit); | 255 | __set_bit(EV_KEY, input_dev->evbit); |
256 | __set_bit(BTN_TOUCH, input_dev->keybit); | ||
251 | __set_bit(BTN_TOOL_FINGER, input_dev->keybit); | 257 | __set_bit(BTN_TOOL_FINGER, input_dev->keybit); |
252 | __set_bit(BTN_TOOL_DOUBLETAP, input_dev->keybit); | 258 | __set_bit(BTN_TOOL_DOUBLETAP, input_dev->keybit); |
253 | __set_bit(BTN_TOOL_TRIPLETAP, input_dev->keybit); | 259 | __set_bit(BTN_TOOL_TRIPLETAP, input_dev->keybit); |
@@ -273,32 +279,66 @@ static int report_tp_state(struct bcm5974 *dev, int size) | |||
273 | const struct tp_finger *f = dev->tp_data->finger; | 279 | const struct tp_finger *f = dev->tp_data->finger; |
274 | struct input_dev *input = dev->input; | 280 | struct input_dev *input = dev->input; |
275 | const int fingers = (size - 26) / 28; | 281 | const int fingers = (size - 26) / 28; |
276 | int p = 0, w, x, y, n = 0; | 282 | int raw_p, raw_w, raw_x, raw_y; |
283 | int ptest = 0, origin = 0, nmin = 0, nmax = 0; | ||
284 | int abs_p = 0, abs_w = 0, abs_x = 0, abs_y = 0; | ||
277 | 285 | ||
278 | if (size < 26 || (size - 26) % 28 != 0) | 286 | if (size < 26 || (size - 26) % 28 != 0) |
279 | return -EIO; | 287 | return -EIO; |
280 | 288 | ||
289 | /* always track the first finger; when detached, start over */ | ||
281 | if (fingers) { | 290 | if (fingers) { |
282 | p = raw2int(f->force_major); | 291 | raw_p = raw2int(f->force_major); |
283 | w = raw2int(f->size_major); | 292 | raw_w = raw2int(f->size_major); |
284 | x = raw2int(f->abs_x); | 293 | raw_x = raw2int(f->abs_x); |
285 | y = raw2int(f->abs_y); | 294 | raw_y = raw2int(f->abs_y); |
286 | n = p > 0 ? fingers : 0; | ||
287 | 295 | ||
288 | dprintk(9, | 296 | dprintk(9, |
289 | "bcm5974: p: %+05d w: %+05d x: %+05d y: %+05d n: %d\n", | 297 | "bcm5974: raw: p: %+05d w: %+05d x: %+05d y: %+05d\n", |
290 | p, w, x, y, n); | 298 | raw_p, raw_w, raw_x, raw_y); |
299 | |||
300 | ptest = int2bound(&c->p, raw_p); | ||
301 | origin = raw2int(f->origin); | ||
302 | } | ||
291 | 303 | ||
292 | input_report_abs(input, ABS_TOOL_WIDTH, int2bound(&c->w, w)); | 304 | /* while tracking finger still valid, count all fingers */ |
293 | input_report_abs(input, ABS_X, int2bound(&c->x, x - c->x.devmin)); | 305 | if (ptest > PRESSURE_LOW && origin) { |
294 | input_report_abs(input, ABS_Y, int2bound(&c->y, c->y.devmax - y)); | 306 | abs_p = ptest; |
307 | abs_w = int2bound(&c->w, raw_w); | ||
308 | abs_x = int2bound(&c->x, raw_x - c->x.devmin); | ||
309 | abs_y = int2bound(&c->y, c->y.devmax - raw_y); | ||
310 | for (; f != dev->tp_data->finger + fingers; f++) { | ||
311 | ptest = int2bound(&c->p, raw2int(f->force_major)); | ||
312 | if (ptest > PRESSURE_LOW) | ||
313 | nmax++; | ||
314 | if (ptest > PRESSURE_HIGH) | ||
315 | nmin++; | ||
316 | } | ||
295 | } | 317 | } |
296 | 318 | ||
297 | input_report_abs(input, ABS_PRESSURE, int2bound(&c->p, p)); | 319 | if (dev->fingers < nmin) |
320 | dev->fingers = nmin; | ||
321 | if (dev->fingers > nmax) | ||
322 | dev->fingers = nmax; | ||
323 | |||
324 | input_report_key(input, BTN_TOUCH, dev->fingers > 0); | ||
325 | input_report_key(input, BTN_TOOL_FINGER, dev->fingers == 1); | ||
326 | input_report_key(input, BTN_TOOL_DOUBLETAP, dev->fingers == 2); | ||
327 | input_report_key(input, BTN_TOOL_TRIPLETAP, dev->fingers > 2); | ||
298 | 328 | ||
299 | input_report_key(input, BTN_TOOL_FINGER, n == 1); | 329 | input_report_abs(input, ABS_PRESSURE, abs_p); |
300 | input_report_key(input, BTN_TOOL_DOUBLETAP, n == 2); | 330 | input_report_abs(input, ABS_TOOL_WIDTH, abs_w); |
301 | input_report_key(input, BTN_TOOL_TRIPLETAP, n > 2); | 331 | |
332 | if (abs_p) { | ||
333 | input_report_abs(input, ABS_X, abs_x); | ||
334 | input_report_abs(input, ABS_Y, abs_y); | ||
335 | |||
336 | dprintk(8, | ||
337 | "bcm5974: abs: p: %+05d w: %+05d x: %+05d y: %+05d " | ||
338 | "nmin: %d nmax: %d n: %d\n", | ||
339 | abs_p, abs_w, abs_x, abs_y, nmin, nmax, dev->fingers); | ||
340 | |||
341 | } | ||
302 | 342 | ||
303 | input_sync(input); | 343 | input_sync(input); |
304 | 344 | ||
diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h index 3282b741e246..5aafe24984c5 100644 --- a/drivers/input/serio/i8042-x86ia64io.h +++ b/drivers/input/serio/i8042-x86ia64io.h | |||
@@ -305,7 +305,7 @@ static struct dmi_system_id __initdata i8042_dmi_nomux_table[] = { | |||
305 | .ident = "Lenovo 3000 n100", | 305 | .ident = "Lenovo 3000 n100", |
306 | .matches = { | 306 | .matches = { |
307 | DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), | 307 | DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), |
308 | DMI_MATCH(DMI_PRODUCT_VERSION, "3000 N100"), | 308 | DMI_MATCH(DMI_PRODUCT_NAME, "076804U"), |
309 | }, | 309 | }, |
310 | }, | 310 | }, |
311 | { | 311 | { |
diff --git a/drivers/s390/cio/chp.c b/drivers/s390/cio/chp.c index db00b0591733..f1216cf6fa8f 100644 --- a/drivers/s390/cio/chp.c +++ b/drivers/s390/cio/chp.c | |||
@@ -423,7 +423,7 @@ int chp_new(struct chp_id chpid) | |||
423 | ret = sysfs_create_group(&chp->dev.kobj, &chp_attr_group); | 423 | ret = sysfs_create_group(&chp->dev.kobj, &chp_attr_group); |
424 | if (ret) { | 424 | if (ret) { |
425 | device_unregister(&chp->dev); | 425 | device_unregister(&chp->dev); |
426 | goto out_free; | 426 | goto out; |
427 | } | 427 | } |
428 | mutex_lock(&channel_subsystems[chpid.cssid]->mutex); | 428 | mutex_lock(&channel_subsystems[chpid.cssid]->mutex); |
429 | if (channel_subsystems[chpid.cssid]->cm_enabled) { | 429 | if (channel_subsystems[chpid.cssid]->cm_enabled) { |
@@ -432,14 +432,15 @@ int chp_new(struct chp_id chpid) | |||
432 | sysfs_remove_group(&chp->dev.kobj, &chp_attr_group); | 432 | sysfs_remove_group(&chp->dev.kobj, &chp_attr_group); |
433 | device_unregister(&chp->dev); | 433 | device_unregister(&chp->dev); |
434 | mutex_unlock(&channel_subsystems[chpid.cssid]->mutex); | 434 | mutex_unlock(&channel_subsystems[chpid.cssid]->mutex); |
435 | goto out_free; | 435 | goto out; |
436 | } | 436 | } |
437 | } | 437 | } |
438 | channel_subsystems[chpid.cssid]->chps[chpid.id] = chp; | 438 | channel_subsystems[chpid.cssid]->chps[chpid.id] = chp; |
439 | mutex_unlock(&channel_subsystems[chpid.cssid]->mutex); | 439 | mutex_unlock(&channel_subsystems[chpid.cssid]->mutex); |
440 | return ret; | 440 | goto out; |
441 | out_free: | 441 | out_free: |
442 | kfree(chp); | 442 | kfree(chp); |
443 | out: | ||
443 | return ret; | 444 | return ret; |
444 | } | 445 | } |
445 | 446 | ||
diff --git a/drivers/s390/cio/cio.c b/drivers/s390/cio/cio.c index 33bff8fec7d1..5954b905e3ca 100644 --- a/drivers/s390/cio/cio.c +++ b/drivers/s390/cio/cio.c | |||
@@ -208,8 +208,10 @@ cio_start_key (struct subchannel *sch, /* subchannel structure */ | |||
208 | case 1: /* status pending */ | 208 | case 1: /* status pending */ |
209 | case 2: /* busy */ | 209 | case 2: /* busy */ |
210 | return -EBUSY; | 210 | return -EBUSY; |
211 | default: /* device/path not operational */ | 211 | case 3: /* device/path not operational */ |
212 | return cio_start_handle_notoper(sch, lpm); | 212 | return cio_start_handle_notoper(sch, lpm); |
213 | default: | ||
214 | return ccode; | ||
213 | } | 215 | } |
214 | } | 216 | } |
215 | 217 | ||
diff --git a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c index 51489eff6b0b..1261e1a9e8cd 100644 --- a/drivers/s390/cio/css.c +++ b/drivers/s390/cio/css.c | |||
@@ -633,6 +633,11 @@ channel_subsystem_release(struct device *dev) | |||
633 | 633 | ||
634 | css = to_css(dev); | 634 | css = to_css(dev); |
635 | mutex_destroy(&css->mutex); | 635 | mutex_destroy(&css->mutex); |
636 | if (css->pseudo_subchannel) { | ||
637 | /* Implies that it has been generated but never registered. */ | ||
638 | css_subchannel_release(&css->pseudo_subchannel->dev); | ||
639 | css->pseudo_subchannel = NULL; | ||
640 | } | ||
636 | kfree(css); | 641 | kfree(css); |
637 | } | 642 | } |
638 | 643 | ||
@@ -785,11 +790,15 @@ init_channel_subsystem (void) | |||
785 | } | 790 | } |
786 | channel_subsystems[i] = css; | 791 | channel_subsystems[i] = css; |
787 | ret = setup_css(i); | 792 | ret = setup_css(i); |
788 | if (ret) | 793 | if (ret) { |
789 | goto out_free; | 794 | kfree(channel_subsystems[i]); |
795 | goto out_unregister; | ||
796 | } | ||
790 | ret = device_register(&css->device); | 797 | ret = device_register(&css->device); |
791 | if (ret) | 798 | if (ret) { |
792 | goto out_free_all; | 799 | put_device(&css->device); |
800 | goto out_unregister; | ||
801 | } | ||
793 | if (css_chsc_characteristics.secm) { | 802 | if (css_chsc_characteristics.secm) { |
794 | ret = device_create_file(&css->device, | 803 | ret = device_create_file(&css->device, |
795 | &dev_attr_cm_enable); | 804 | &dev_attr_cm_enable); |
@@ -802,7 +811,7 @@ init_channel_subsystem (void) | |||
802 | } | 811 | } |
803 | ret = register_reboot_notifier(&css_reboot_notifier); | 812 | ret = register_reboot_notifier(&css_reboot_notifier); |
804 | if (ret) | 813 | if (ret) |
805 | goto out_pseudo; | 814 | goto out_unregister; |
806 | css_init_done = 1; | 815 | css_init_done = 1; |
807 | 816 | ||
808 | /* Enable default isc for I/O subchannels. */ | 817 | /* Enable default isc for I/O subchannels. */ |
@@ -810,18 +819,12 @@ init_channel_subsystem (void) | |||
810 | 819 | ||
811 | for_each_subchannel(__init_channel_subsystem, NULL); | 820 | for_each_subchannel(__init_channel_subsystem, NULL); |
812 | return 0; | 821 | return 0; |
813 | out_pseudo: | ||
814 | device_unregister(&channel_subsystems[i]->pseudo_subchannel->dev); | ||
815 | out_file: | 822 | out_file: |
816 | device_remove_file(&channel_subsystems[i]->device, | 823 | if (css_chsc_characteristics.secm) |
817 | &dev_attr_cm_enable); | 824 | device_remove_file(&channel_subsystems[i]->device, |
825 | &dev_attr_cm_enable); | ||
818 | out_device: | 826 | out_device: |
819 | device_unregister(&channel_subsystems[i]->device); | 827 | device_unregister(&channel_subsystems[i]->device); |
820 | out_free_all: | ||
821 | kfree(channel_subsystems[i]->pseudo_subchannel->lock); | ||
822 | kfree(channel_subsystems[i]->pseudo_subchannel); | ||
823 | out_free: | ||
824 | kfree(channel_subsystems[i]); | ||
825 | out_unregister: | 828 | out_unregister: |
826 | while (i > 0) { | 829 | while (i > 0) { |
827 | struct channel_subsystem *css; | 830 | struct channel_subsystem *css; |
@@ -829,6 +832,7 @@ out_unregister: | |||
829 | i--; | 832 | i--; |
830 | css = channel_subsystems[i]; | 833 | css = channel_subsystems[i]; |
831 | device_unregister(&css->pseudo_subchannel->dev); | 834 | device_unregister(&css->pseudo_subchannel->dev); |
835 | css->pseudo_subchannel = NULL; | ||
832 | if (css_chsc_characteristics.secm) | 836 | if (css_chsc_characteristics.secm) |
833 | device_remove_file(&css->device, | 837 | device_remove_file(&css->device, |
834 | &dev_attr_cm_enable); | 838 | &dev_attr_cm_enable); |
diff --git a/drivers/s390/cio/device_fsm.c b/drivers/s390/cio/device_fsm.c index 550508df952b..84cc9ea346db 100644 --- a/drivers/s390/cio/device_fsm.c +++ b/drivers/s390/cio/device_fsm.c | |||
@@ -658,6 +658,13 @@ ccw_device_offline(struct ccw_device *cdev) | |||
658 | { | 658 | { |
659 | struct subchannel *sch; | 659 | struct subchannel *sch; |
660 | 660 | ||
661 | /* Allow ccw_device_offline while disconnected. */ | ||
662 | if (cdev->private->state == DEV_STATE_DISCONNECTED || | ||
663 | cdev->private->state == DEV_STATE_NOT_OPER) { | ||
664 | cdev->private->flags.donotify = 0; | ||
665 | ccw_device_done(cdev, DEV_STATE_NOT_OPER); | ||
666 | return 0; | ||
667 | } | ||
661 | if (ccw_device_is_orphan(cdev)) { | 668 | if (ccw_device_is_orphan(cdev)) { |
662 | ccw_device_done(cdev, DEV_STATE_OFFLINE); | 669 | ccw_device_done(cdev, DEV_STATE_OFFLINE); |
663 | return 0; | 670 | return 0; |
diff --git a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c index 1eb64d08b60a..95b3ec89c126 100644 --- a/drivers/usb/host/ohci-omap.c +++ b/drivers/usb/host/ohci-omap.c | |||
@@ -208,7 +208,7 @@ static int ohci_omap_init(struct usb_hcd *hcd) | |||
208 | if (cpu_is_omap16xx()) | 208 | if (cpu_is_omap16xx()) |
209 | ocpi_enable(); | 209 | ocpi_enable(); |
210 | 210 | ||
211 | #ifdef CONFIG_ARCH_OMAP_OTG | 211 | #ifdef CONFIG_USB_OTG |
212 | if (need_transceiver) { | 212 | if (need_transceiver) { |
213 | ohci->transceiver = otg_get_transceiver(); | 213 | ohci->transceiver = otg_get_transceiver(); |
214 | if (ohci->transceiver) { | 214 | if (ohci->transceiver) { |
diff --git a/drivers/usb/serial/console.c b/drivers/usb/serial/console.c index 7b74238ad1c7..e980766bb84b 100644 --- a/drivers/usb/serial/console.c +++ b/drivers/usb/serial/console.c | |||
@@ -161,7 +161,7 @@ static int usb_console_setup(struct console *co, char *options) | |||
161 | if (serial->type->set_termios) { | 161 | if (serial->type->set_termios) { |
162 | termios->c_cflag = cflag; | 162 | termios->c_cflag = cflag; |
163 | tty_termios_encode_baud_rate(termios, baud, baud); | 163 | tty_termios_encode_baud_rate(termios, baud, baud); |
164 | serial->type->set_termios(NULL, port, &dummy); | 164 | serial->type->set_termios(tty, port, &dummy); |
165 | 165 | ||
166 | port->port.tty = NULL; | 166 | port->port.tty = NULL; |
167 | kfree(termios); | 167 | kfree(termios); |
diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c index d4427cb86979..2e15da5459cf 100644 --- a/drivers/xen/balloon.c +++ b/drivers/xen/balloon.c | |||
@@ -60,7 +60,7 @@ | |||
60 | 60 | ||
61 | #define PAGES2KB(_p) ((_p)<<(PAGE_SHIFT-10)) | 61 | #define PAGES2KB(_p) ((_p)<<(PAGE_SHIFT-10)) |
62 | 62 | ||
63 | #define BALLOON_CLASS_NAME "memory" | 63 | #define BALLOON_CLASS_NAME "xen_memory" |
64 | 64 | ||
65 | struct balloon_stats { | 65 | struct balloon_stats { |
66 | /* We aim for 'current allocation' == 'target allocation'. */ | 66 | /* We aim for 'current allocation' == 'target allocation'. */ |