From 4438974747fea0535ac14452bafd76b0a8555b5a Mon Sep 17 00:00:00 2001 From: Mark Lord Date: Tue, 27 May 2008 17:54:48 -0400 Subject: [PATCH] --- yaml --- r: 97528 b: refs/heads/master c: 1f39847255a02c69190ae30c33b8ccf4c10840df h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/Documentation/lguest/lguest.c | 12 +- trunk/arch/x86/lguest/boot.c | 5 +- trunk/drivers/ata/sata_mv.c | 27 ++- trunk/drivers/block/virtio_blk.c | 7 +- trunk/drivers/char/hw_random/Kconfig | 9 - trunk/drivers/char/hw_random/Makefile | 1 - trunk/drivers/char/hw_random/virtio-rng.c | 155 ------------------ trunk/drivers/input/keyboard/atkbd.c | 2 - trunk/drivers/input/keyboard/pxa27x_keypad.c | 38 ++--- trunk/drivers/input/misc/apanel.c | 1 + trunk/drivers/input/serio/i8042-x86ia64io.h | 7 - trunk/drivers/input/serio/i8042.c | 33 +--- trunk/drivers/input/tablet/gtco.c | 17 +- trunk/drivers/input/touchscreen/wm9713.c | 22 --- trunk/drivers/input/touchscreen/wm97xx-core.c | 25 ++- trunk/drivers/lguest/lguest_device.c | 25 +-- trunk/drivers/pci/hotplug/rpadlpar_sysfs.c | 8 +- trunk/drivers/s390/kvm/kvm_virtio.c | 18 +- trunk/drivers/virtio/virtio.c | 8 +- trunk/drivers/virtio/virtio_pci.c | 7 + trunk/drivers/virtio/virtio_ring.c | 8 + trunk/drivers/watchdog/geodewdt.c | 3 +- trunk/include/linux/input.h | 4 +- trunk/include/linux/virtio_blk.h | 9 +- trunk/include/linux/virtio_config.h | 6 +- trunk/include/linux/virtio_rng.h | 8 - trunk/include/linux/wm97xx.h | 1 - trunk/scripts/decodecode | 0 29 files changed, 116 insertions(+), 352 deletions(-) delete mode 100644 trunk/drivers/char/hw_random/virtio-rng.c delete mode 100644 trunk/include/linux/virtio_rng.h mode change 100755 => 100644 trunk/scripts/decodecode diff --git a/[refs] b/[refs] index 8d7235552850..32f962594551 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 14d03fd98e076c6e60e1085a962410dc4d70ab59 +refs/heads/master: 1f39847255a02c69190ae30c33b8ccf4c10840df diff --git a/trunk/Documentation/lguest/lguest.c b/trunk/Documentation/lguest/lguest.c index 82fafe0429fe..3be8ab2a886a 100644 --- a/trunk/Documentation/lguest/lguest.c +++ b/trunk/Documentation/lguest/lguest.c @@ -157,9 +157,6 @@ struct virtqueue /* The routine to call when the Guest pings us. */ void (*handle_output)(int fd, struct virtqueue *me); - - /* Outstanding buffers */ - unsigned int inflight; }; /* Remember the arguments to the program so we can "reboot" */ @@ -705,7 +702,6 @@ static unsigned get_vq_desc(struct virtqueue *vq, errx(1, "Looped descriptor"); } while ((i = next_desc(vq, i)) != vq->vring.num); - vq->inflight++; return head; } @@ -723,7 +719,6 @@ static void add_used(struct virtqueue *vq, unsigned int head, int len) /* Make sure buffer is written before we update index. */ wmb(); vq->vring.used->idx++; - vq->inflight--; } /* This actually sends the interrupt for this virtqueue */ @@ -731,9 +726,8 @@ static void trigger_irq(int fd, struct virtqueue *vq) { unsigned long buf[] = { LHREQ_IRQ, vq->config.irq }; - /* If they don't want an interrupt, don't send one, unless empty. */ - if ((vq->vring.avail->flags & VRING_AVAIL_F_NO_INTERRUPT) - && vq->inflight) + /* If they don't want an interrupt, don't send one. */ + if (vq->vring.avail->flags & VRING_AVAIL_F_NO_INTERRUPT) return; /* Send the Guest an interrupt tell them we used something up. */ @@ -1113,7 +1107,6 @@ static void add_virtqueue(struct device *dev, unsigned int num_descs, vq->next = NULL; vq->last_avail_idx = 0; vq->dev = dev; - vq->inflight = 0; /* Initialize the configuration. */ vq->config.num = num_descs; @@ -1375,7 +1368,6 @@ static void setup_tun_net(const char *arg) /* Tell Guest what MAC address to use. */ add_feature(dev, VIRTIO_NET_F_MAC); - add_feature(dev, VIRTIO_F_NOTIFY_ON_EMPTY); set_config(dev, sizeof(conf), &conf); /* We don't need the socket any more; setup is done. */ diff --git a/trunk/arch/x86/lguest/boot.c b/trunk/arch/x86/lguest/boot.c index 5c7e2fd52075..af65b2da3ba0 100644 --- a/trunk/arch/x86/lguest/boot.c +++ b/trunk/arch/x86/lguest/boot.c @@ -582,9 +582,8 @@ static void __init lguest_init_IRQ(void) int vector = FIRST_EXTERNAL_VECTOR + i; if (vector != SYSCALL_VECTOR) { set_intr_gate(vector, interrupt[i]); - set_irq_chip_and_handler_name(i, &lguest_irq_controller, - handle_level_irq, - "level"); + set_irq_chip_and_handler(i, &lguest_irq_controller, + handle_level_irq); } } /* This call is required to set up for 4k stacks, where we have diff --git a/trunk/drivers/ata/sata_mv.c b/trunk/drivers/ata/sata_mv.c index fb81f0c7a8c2..f6a716ef5a16 100644 --- a/trunk/drivers/ata/sata_mv.c +++ b/trunk/drivers/ata/sata_mv.c @@ -122,8 +122,6 @@ enum { /* Host Flags */ MV_FLAG_DUAL_HC = (1 << 30), /* two SATA Host Controllers */ MV_FLAG_IRQ_COALESCE = (1 << 29), /* IRQ coalescing capability */ - /* SoC integrated controllers, no PCI interface */ - MV_FLAG_SOC = (1 << 28), MV_COMMON_FLAGS = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | ATA_FLAG_MMIO | ATA_FLAG_NO_ATAPI | @@ -362,6 +360,7 @@ enum { MV_HP_GEN_IIE = (1 << 8), /* Generation IIE: 6042/7042 */ MV_HP_PCIE = (1 << 9), /* PCIe bus/regs: 7042 */ MV_HP_CUT_THROUGH = (1 << 10), /* can use EDMA cut-through */ + MV_HP_FLAG_SOC = (1 << 11), /* SystemOnChip, no PCI */ /* Port private flags (pp_flags) */ MV_PP_FLAG_EDMA_EN = (1 << 0), /* is EDMA engine enabled? */ @@ -374,7 +373,7 @@ enum { #define IS_GEN_II(hpriv) ((hpriv)->hp_flags & MV_HP_GEN_II) #define IS_GEN_IIE(hpriv) ((hpriv)->hp_flags & MV_HP_GEN_IIE) #define IS_PCIE(hpriv) ((hpriv)->hp_flags & MV_HP_PCIE) -#define HAS_PCI(host) (!((host)->ports[0]->flags & MV_FLAG_SOC)) +#define IS_SOC(hpriv) ((hpriv)->hp_flags & MV_HP_FLAG_SOC) #define WINDOW_CTRL(i) (0x20030 + ((i) << 4)) #define WINDOW_BASE(i) (0x20034 + ((i) << 4)) @@ -652,7 +651,7 @@ static const struct ata_port_info mv_port_info[] = { .port_ops = &mv_iie_ops, }, { /* chip_soc */ - .flags = MV_GENIIE_FLAGS | MV_FLAG_SOC, + .flags = MV_GENIIE_FLAGS, .pio_mask = 0x1f, /* pio0-4 */ .udma_mask = ATA_UDMA6, .port_ops = &mv_iie_ops, @@ -1254,7 +1253,7 @@ static void mv_edma_cfg(struct ata_port *ap, int want_ncq) cfg |= (1 << 23); /* do not mask PM field in rx'd FIS */ cfg |= (1 << 22); /* enab 4-entry host queue cache */ - if (HAS_PCI(ap->host)) + if (!IS_SOC(hpriv)) cfg |= (1 << 18); /* enab early completion */ if (hpriv->hp_flags & MV_HP_CUT_THROUGH) cfg |= (1 << 17); /* enab cut-thru (dis stor&forwrd) */ @@ -2225,7 +2224,7 @@ static irqreturn_t mv_interrupt(int irq, void *dev_instance) * a bogus register value which can indicate HW removal or PCI fault. */ if (pending_irqs && main_irq_cause != 0xffffffffU) { - if (unlikely((pending_irqs & PCI_ERR) && HAS_PCI(host))) + if (unlikely((pending_irqs & PCI_ERR) && !IS_SOC(hpriv))) handled = mv_pci_error(host, hpriv->base); else handled = mv_host_intr(host, pending_irqs); @@ -2876,7 +2875,7 @@ static unsigned int mv_in_pcix_mode(struct ata_host *host) void __iomem *mmio = hpriv->base; u32 reg; - if (!HAS_PCI(host) || !IS_PCIE(hpriv)) + if (IS_SOC(hpriv) || !IS_PCIE(hpriv)) return 0; /* not PCI-X capable */ reg = readl(mmio + MV_PCI_MODE_OFS); if ((reg & MV_PCI_MODE_MASK) == 0) @@ -3018,7 +3017,7 @@ static int mv_chip_id(struct ata_host *host, unsigned int board_idx) break; case chip_soc: hpriv->ops = &mv_soc_ops; - hp_flags |= MV_HP_ERRATA_60X1C0; + hp_flags |= MV_HP_FLAG_SOC | MV_HP_ERRATA_60X1C0; break; default: @@ -3062,12 +3061,12 @@ static int mv_init_host(struct ata_host *host, unsigned int board_idx) if (rc) goto done; - if (HAS_PCI(host)) { - hpriv->main_irq_cause_addr = mmio + PCI_HC_MAIN_IRQ_CAUSE_OFS; - hpriv->main_irq_mask_addr = mmio + PCI_HC_MAIN_IRQ_MASK_OFS; - } else { + if (IS_SOC(hpriv)) { hpriv->main_irq_cause_addr = mmio + SOC_HC_MAIN_IRQ_CAUSE_OFS; hpriv->main_irq_mask_addr = mmio + SOC_HC_MAIN_IRQ_MASK_OFS; + } else { + hpriv->main_irq_cause_addr = mmio + PCI_HC_MAIN_IRQ_CAUSE_OFS; + hpriv->main_irq_mask_addr = mmio + PCI_HC_MAIN_IRQ_MASK_OFS; } /* global interrupt mask: 0 == mask everything */ @@ -3093,7 +3092,7 @@ static int mv_init_host(struct ata_host *host, unsigned int board_idx) mv_port_init(&ap->ioaddr, port_mmio); #ifdef CONFIG_PCI - if (HAS_PCI(host)) { + if (!IS_SOC(hpriv)) { unsigned int offset = port_mmio - mmio; ata_port_pbar_desc(ap, MV_PRIMARY_BAR, -1, "mmio"); ata_port_pbar_desc(ap, MV_PRIMARY_BAR, offset, "port"); @@ -3113,7 +3112,7 @@ static int mv_init_host(struct ata_host *host, unsigned int board_idx) writelfl(0, hc_mmio + HC_IRQ_CAUSE_OFS); } - if (HAS_PCI(host)) { + if (!IS_SOC(hpriv)) { /* Clear any currently outstanding host interrupt conditions */ writelfl(0, mmio + hpriv->irq_cause_ofs); diff --git a/trunk/drivers/block/virtio_blk.c b/trunk/drivers/block/virtio_blk.c index dd7ea203f940..84e064ffee52 100644 --- a/trunk/drivers/block/virtio_blk.c +++ b/trunk/drivers/block/virtio_blk.c @@ -260,10 +260,6 @@ static int virtblk_probe(struct virtio_device *vdev) if (virtio_has_feature(vdev, VIRTIO_BLK_F_BARRIER)) blk_queue_ordered(vblk->disk->queue, QUEUE_ORDERED_TAG, NULL); - /* If disk is read-only in the host, the guest should obey */ - if (virtio_has_feature(vdev, VIRTIO_BLK_F_RO)) - set_disk_ro(vblk->disk, 1); - /* Host must always specify the capacity. */ vdev->config->get(vdev, offsetof(struct virtio_blk_config, capacity), &cap, sizeof(cap)); @@ -315,7 +311,6 @@ static void virtblk_remove(struct virtio_device *vdev) /* Stop all the virtqueues. */ vdev->config->reset(vdev); - del_gendisk(vblk->disk); blk_cleanup_queue(vblk->disk->queue); put_disk(vblk->disk); mempool_destroy(vblk->pool); @@ -330,7 +325,7 @@ static struct virtio_device_id id_table[] = { static unsigned int features[] = { VIRTIO_BLK_F_BARRIER, VIRTIO_BLK_F_SEG_MAX, VIRTIO_BLK_F_SIZE_MAX, - VIRTIO_BLK_F_GEOMETRY, VIRTIO_BLK_F_RO, + VIRTIO_BLK_F_GEOMETRY, }; static struct virtio_driver virtio_blk = { diff --git a/trunk/drivers/char/hw_random/Kconfig b/trunk/drivers/char/hw_random/Kconfig index efd0b4db7c8e..8d6c2089d2a8 100644 --- a/trunk/drivers/char/hw_random/Kconfig +++ b/trunk/drivers/char/hw_random/Kconfig @@ -112,12 +112,3 @@ config HW_RANDOM_PASEMI If unsure, say Y. -config HW_RANDOM_VIRTIO - tristate "VirtIO Random Number Generator support" - depends on HW_RANDOM && VIRTIO - ---help--- - This driver provides kernel-side support for the virtual Random Number - Generator hardware. - - To compile this driver as a module, choose M here: the - module will be called virtio-rng. If unsure, say N. diff --git a/trunk/drivers/char/hw_random/Makefile b/trunk/drivers/char/hw_random/Makefile index b4940ddbb35f..c8b7300e2fb1 100644 --- a/trunk/drivers/char/hw_random/Makefile +++ b/trunk/drivers/char/hw_random/Makefile @@ -11,4 +11,3 @@ obj-$(CONFIG_HW_RANDOM_VIA) += via-rng.o obj-$(CONFIG_HW_RANDOM_IXP4XX) += ixp4xx-rng.o obj-$(CONFIG_HW_RANDOM_OMAP) += omap-rng.o obj-$(CONFIG_HW_RANDOM_PASEMI) += pasemi-rng.o -obj-$(CONFIG_HW_RANDOM_VIRTIO) += virtio-rng.o diff --git a/trunk/drivers/char/hw_random/virtio-rng.c b/trunk/drivers/char/hw_random/virtio-rng.c deleted file mode 100644 index d0e563e4fc39..000000000000 --- a/trunk/drivers/char/hw_random/virtio-rng.c +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Randomness driver for virtio - * Copyright (C) 2007, 2008 Rusty Russell IBM Corporation - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ -#include -#include -#include -#include -#include -#include - -/* The host will fill any buffer we give it with sweet, sweet randomness. We - * give it 64 bytes at a time, and the hwrng framework takes it 4 bytes at a - * time. */ -#define RANDOM_DATA_SIZE 64 - -static struct virtqueue *vq; -static u32 *random_data; -static unsigned int data_left; -static DECLARE_COMPLETION(have_data); - -static void random_recv_done(struct virtqueue *vq) -{ - int len; - - /* We never get spurious callbacks. */ - if (!vq->vq_ops->get_buf(vq, &len)) - BUG(); - - data_left = len / sizeof(random_data[0]); - complete(&have_data); -} - -static void register_buffer(void) -{ - struct scatterlist sg; - - sg_init_one(&sg, random_data, RANDOM_DATA_SIZE); - /* There should always be room for one buffer. */ - if (vq->vq_ops->add_buf(vq, &sg, 0, 1, random_data) != 0) - BUG(); - vq->vq_ops->kick(vq); -} - -/* At least we don't udelay() in a loop like some other drivers. */ -static int virtio_data_present(struct hwrng *rng, int wait) -{ - if (data_left) - return 1; - - if (!wait) - return 0; - - wait_for_completion(&have_data); - return 1; -} - -/* virtio_data_present() must have succeeded before this is called. */ -static int virtio_data_read(struct hwrng *rng, u32 *data) -{ - BUG_ON(!data_left); - - *data = random_data[--data_left]; - - if (!data_left) { - init_completion(&have_data); - register_buffer(); - } - return sizeof(*data); -} - -static struct hwrng virtio_hwrng = { - .name = "virtio", - .data_present = virtio_data_present, - .data_read = virtio_data_read, -}; - -static int virtrng_probe(struct virtio_device *vdev) -{ - int err; - - /* We expect a single virtqueue. */ - vq = vdev->config->find_vq(vdev, 0, random_recv_done); - if (IS_ERR(vq)) - return PTR_ERR(vq); - - err = hwrng_register(&virtio_hwrng); - if (err) { - vdev->config->del_vq(vq); - return err; - } - - register_buffer(); - return 0; -} - -static void virtrng_remove(struct virtio_device *vdev) -{ - vdev->config->reset(vdev); - hwrng_unregister(&virtio_hwrng); - vdev->config->del_vq(vq); -} - -static struct virtio_device_id id_table[] = { - { VIRTIO_ID_RNG, VIRTIO_DEV_ANY_ID }, - { 0 }, -}; - -static struct virtio_driver virtio_rng = { - .driver.name = KBUILD_MODNAME, - .driver.owner = THIS_MODULE, - .id_table = id_table, - .probe = virtrng_probe, - .remove = __devexit_p(virtrng_remove), -}; - -static int __init init(void) -{ - int err; - - random_data = kmalloc(RANDOM_DATA_SIZE, GFP_KERNEL); - if (!random_data) - return -ENOMEM; - - err = register_virtio_driver(&virtio_rng); - if (err) - kfree(random_data); - return err; -} - -static void __exit fini(void) -{ - kfree(random_data); - unregister_virtio_driver(&virtio_rng); -} -module_init(init); -module_exit(fini); - -MODULE_DEVICE_TABLE(virtio, id_table); -MODULE_DESCRIPTION("Virtio random number driver"); -MODULE_LICENSE("GPL"); diff --git a/trunk/drivers/input/keyboard/atkbd.c b/trunk/drivers/input/keyboard/atkbd.c index af58a6f1e898..4a95adc4cc78 100644 --- a/trunk/drivers/input/keyboard/atkbd.c +++ b/trunk/drivers/input/keyboard/atkbd.c @@ -807,8 +807,6 @@ static int atkbd_activate(struct atkbd *atkbd) static void atkbd_cleanup(struct serio *serio) { struct atkbd *atkbd = serio_get_drvdata(serio); - - atkbd_disable(atkbd); ps2_command(&atkbd->ps2dev, NULL, ATKBD_CMD_RESET_BAT); } diff --git a/trunk/drivers/input/keyboard/pxa27x_keypad.c b/trunk/drivers/input/keyboard/pxa27x_keypad.c index 45767e73f071..3dea0c5077a9 100644 --- a/trunk/drivers/input/keyboard/pxa27x_keypad.c +++ b/trunk/drivers/input/keyboard/pxa27x_keypad.c @@ -136,9 +136,6 @@ static void pxa27x_keypad_build_keycode(struct pxa27x_keypad *keypad) set_bit(code, input_dev->keybit); } - for (i = 0; i < pdata->direct_key_num; i++) - set_bit(pdata->direct_key_map[i], input_dev->keybit); - keypad->rotary_up_key[0] = pdata->rotary0_up_key; keypad->rotary_up_key[1] = pdata->rotary1_up_key; keypad->rotary_down_key[0] = pdata->rotary0_down_key; @@ -146,21 +143,17 @@ static void pxa27x_keypad_build_keycode(struct pxa27x_keypad *keypad) keypad->rotary_rel_code[0] = pdata->rotary0_rel_code; keypad->rotary_rel_code[1] = pdata->rotary1_rel_code; - if (pdata->enable_rotary0) { - if (pdata->rotary0_up_key && pdata->rotary0_down_key) { - set_bit(pdata->rotary0_up_key, input_dev->keybit); - set_bit(pdata->rotary0_down_key, input_dev->keybit); - } else - set_bit(pdata->rotary0_rel_code, input_dev->relbit); - } - - if (pdata->enable_rotary1) { - if (pdata->rotary1_up_key && pdata->rotary1_down_key) { - set_bit(pdata->rotary1_up_key, input_dev->keybit); - set_bit(pdata->rotary1_down_key, input_dev->keybit); - } else - set_bit(pdata->rotary1_rel_code, input_dev->relbit); - } + if (pdata->rotary0_up_key && pdata->rotary0_down_key) { + set_bit(pdata->rotary0_up_key, input_dev->keybit); + set_bit(pdata->rotary0_down_key, input_dev->keybit); + } else + set_bit(pdata->rotary0_rel_code, input_dev->relbit); + + if (pdata->rotary1_up_key && pdata->rotary1_down_key) { + set_bit(pdata->rotary1_up_key, input_dev->keybit); + set_bit(pdata->rotary1_down_key, input_dev->keybit); + } else + set_bit(pdata->rotary1_rel_code, input_dev->relbit); } static inline unsigned int lookup_matrix_keycode( @@ -491,13 +484,8 @@ static int __devinit pxa27x_keypad_probe(struct platform_device *pdev) keypad->input_dev = input_dev; input_set_drvdata(input_dev, keypad); - input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REP); - if ((keypad->pdata->enable_rotary0 && - keypad->pdata->rotary0_rel_code) || - (keypad->pdata->enable_rotary1 && - keypad->pdata->rotary1_rel_code)) { - input_dev->evbit[0] |= BIT_MASK(EV_REL); - } + input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REP) | + BIT_MASK(EV_REL); pxa27x_keypad_build_keycode(keypad); platform_set_drvdata(pdev, keypad); diff --git a/trunk/drivers/input/misc/apanel.c b/trunk/drivers/input/misc/apanel.c index d82f7f727f7a..9531d8c7444f 100644 --- a/trunk/drivers/input/misc/apanel.c +++ b/trunk/drivers/input/misc/apanel.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/drivers/input/serio/i8042-x86ia64io.h b/trunk/drivers/input/serio/i8042-x86ia64io.h index 9aafa96cb746..5ece9f56babc 100644 --- a/trunk/drivers/input/serio/i8042-x86ia64io.h +++ b/trunk/drivers/input/serio/i8042-x86ia64io.h @@ -330,13 +330,6 @@ static struct dmi_system_id __initdata i8042_dmi_dritek_table[] = { DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 9110"), }, }, - { - .ident = "Acer TravelMate 660", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Acer"), - DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 660"), - }, - }, { .ident = "Acer TravelMate 2490", .matches = { diff --git a/trunk/drivers/input/serio/i8042.c b/trunk/drivers/input/serio/i8042.c index 592ff55b62d0..65a74cfc187b 100644 --- a/trunk/drivers/input/serio/i8042.c +++ b/trunk/drivers/input/serio/i8042.c @@ -885,20 +885,6 @@ static long i8042_panic_blink(long count) #undef DELAY -#ifdef CONFIG_X86 -static void i8042_dritek_enable(void) -{ - char param = 0x90; - int error; - - error = i8042_command(¶m, 0x1059); - if (error) - printk(KERN_WARNING - "Failed to enable DRITEK extension: %d\n", - error); -} -#endif - #ifdef CONFIG_PM /* * Here we try to restore the original BIOS settings. We only want to @@ -956,12 +942,6 @@ static int i8042_resume(struct platform_device *dev) return -EIO; } - -#ifdef CONFIG_X86 - if (i8042_dritek) - i8042_dritek_enable(); -#endif - if (i8042_mux_present) { if (i8042_set_mux_mode(1, NULL) || i8042_enable_mux_ports()) printk(KERN_WARNING @@ -1180,11 +1160,6 @@ static int __devinit i8042_probe(struct platform_device *dev) if (error) return error; -#ifdef CONFIG_X86 - if (i8042_dritek) - i8042_dritek_enable(); -#endif - if (!i8042_noaux) { error = i8042_setup_aux(); if (error && error != -ENODEV && error != -EBUSY) @@ -1196,6 +1171,14 @@ static int __devinit i8042_probe(struct platform_device *dev) if (error) goto out_fail; } +#ifdef CONFIG_X86 + if (i8042_dritek) { + char param = 0x90; + error = i8042_command(¶m, 0x1059); + if (error) + goto out_fail; + } +#endif /* * Ok, everything is ready, let's register all serio ports */ diff --git a/trunk/drivers/input/tablet/gtco.c b/trunk/drivers/input/tablet/gtco.c index 1e748e46d12e..c5a8661a1baa 100644 --- a/trunk/drivers/input/tablet/gtco.c +++ b/trunk/drivers/input/tablet/gtco.c @@ -830,7 +830,7 @@ static int gtco_probe(struct usb_interface *usbinterface, struct gtco *gtco; struct input_dev *input_dev; struct hid_descriptor *hid_desc; - char *report; + char *report = NULL; int result = 0, retry; int error; struct usb_endpoint_descriptor *endpoint; @@ -916,16 +916,12 @@ static int gtco_probe(struct usb_interface *usbinterface, le16_to_cpu(hid_desc->wDescriptorLength), 5000); /* 5 secs */ - dbg("usb_control_msg result: %d", result); - if (result == le16_to_cpu(hid_desc->wDescriptorLength)) { - parse_hid_report_descriptor(gtco, report, result); + if (result == le16_to_cpu(hid_desc->wDescriptorLength)) break; - } } - kfree(report); - /* If we didn't get the report, fail */ + dbg("usb_control_msg result: :%d", result); if (result != le16_to_cpu(hid_desc->wDescriptorLength)) { err("Failed to get HID Report Descriptor of size: %d", hid_desc->wDescriptorLength); @@ -933,6 +929,12 @@ static int gtco_probe(struct usb_interface *usbinterface, goto err_free_urb; } + /* Now we parse the report */ + parse_hid_report_descriptor(gtco, report, result); + + /* Now we delete it */ + kfree(report); + /* Create a device file node */ usb_make_path(gtco->usbdev, gtco->usbpath, sizeof(gtco->usbpath)); strlcat(gtco->usbpath, "/input0", sizeof(gtco->usbpath)); @@ -986,6 +988,7 @@ static int gtco_probe(struct usb_interface *usbinterface, usb_buffer_free(gtco->usbdev, REPORT_MAX_SIZE, gtco->buffer, gtco->buf_dma); err_free_devs: + kfree(report); input_free_device(input_dev); kfree(gtco); return error; diff --git a/trunk/drivers/input/touchscreen/wm9713.c b/trunk/drivers/input/touchscreen/wm9713.c index 838458792ea0..01278bd7e65c 100644 --- a/trunk/drivers/input/touchscreen/wm9713.c +++ b/trunk/drivers/input/touchscreen/wm9713.c @@ -84,15 +84,6 @@ static int delay = 4; module_param(delay, int, 0); MODULE_PARM_DESC(delay, "Set adc sample delay."); -/* - * Set five_wire = 1 to use a 5 wire touchscreen. - * - * NOTE: Five wire mode does not allow for readback of pressure. - */ -static int five_wire; -module_param(five_wire, int, 0); -MODULE_PARM_DESC(five_wire, "Set to '1' to use 5-wire touchscreen."); - /* * Set adc mask function. * @@ -171,19 +162,6 @@ static void wm9713_phy_init(struct wm97xx *wm) 64000 / rpu); } - /* Five wire panel? */ - if (five_wire) { - dig3 |= WM9713_45W; - dev_info(wm->dev, "setting 5-wire touchscreen mode."); - - if (pil) { - dev_warn(wm->dev, - "Pressure measurement not supported in 5 " - "wire mode, disabling\n"); - pil = 0; - } - } - /* touchpanel pressure */ if (pil == 2) { dig3 |= WM9712_PIL; diff --git a/trunk/drivers/input/touchscreen/wm97xx-core.c b/trunk/drivers/input/touchscreen/wm97xx-core.c index cdc24ad314e0..e9c7ea46b6e3 100644 --- a/trunk/drivers/input/touchscreen/wm97xx-core.c +++ b/trunk/drivers/input/touchscreen/wm97xx-core.c @@ -608,17 +608,6 @@ static int wm97xx_probe(struct device *dev) goto alloc_err; } - /* set up physical characteristics */ - wm->codec->phy_init(wm); - - /* load gpio cache */ - wm->gpio[0] = wm97xx_reg_read(wm, AC97_GPIO_CFG); - wm->gpio[1] = wm97xx_reg_read(wm, AC97_GPIO_POLARITY); - wm->gpio[2] = wm97xx_reg_read(wm, AC97_GPIO_STICKY); - wm->gpio[3] = wm97xx_reg_read(wm, AC97_GPIO_WAKEUP); - wm->gpio[4] = wm97xx_reg_read(wm, AC97_GPIO_STATUS); - wm->gpio[5] = wm97xx_reg_read(wm, AC97_MISC_AFE); - wm->input_dev = input_allocate_device(); if (wm->input_dev == NULL) { ret = -ENOMEM; @@ -627,7 +616,6 @@ static int wm97xx_probe(struct device *dev) /* set up touch configuration */ wm->input_dev->name = "wm97xx touchscreen"; - wm->input_dev->phys = "wm97xx"; wm->input_dev->open = wm97xx_ts_input_open; wm->input_dev->close = wm97xx_ts_input_close; set_bit(EV_ABS, wm->input_dev->evbit); @@ -646,6 +634,17 @@ static int wm97xx_probe(struct device *dev) if (ret < 0) goto dev_alloc_err; + /* set up physical characteristics */ + wm->codec->phy_init(wm); + + /* load gpio cache */ + wm->gpio[0] = wm97xx_reg_read(wm, AC97_GPIO_CFG); + wm->gpio[1] = wm97xx_reg_read(wm, AC97_GPIO_POLARITY); + wm->gpio[2] = wm97xx_reg_read(wm, AC97_GPIO_STICKY); + wm->gpio[3] = wm97xx_reg_read(wm, AC97_GPIO_WAKEUP); + wm->gpio[4] = wm97xx_reg_read(wm, AC97_GPIO_STATUS); + wm->gpio[5] = wm97xx_reg_read(wm, AC97_MISC_AFE); + /* register our battery device */ wm->battery_dev = platform_device_alloc("wm97xx-battery", -1); if (!wm->battery_dev) { @@ -802,7 +801,7 @@ void wm97xx_unregister_mach_ops(struct wm97xx *wm) EXPORT_SYMBOL_GPL(wm97xx_unregister_mach_ops); static struct device_driver wm97xx_driver = { - .name = "wm97xx-ts", + .name = "ac97", .bus = &ac97_bus_type, .owner = THIS_MODULE, .probe = wm97xx_probe, diff --git a/trunk/drivers/lguest/lguest_device.c b/trunk/drivers/lguest/lguest_device.c index 1a8de57289eb..8080249957af 100644 --- a/trunk/drivers/lguest/lguest_device.c +++ b/trunk/drivers/lguest/lguest_device.c @@ -20,11 +20,14 @@ /* The pointer to our (page) of device descriptions. */ static void *lguest_devices; +/* Unique numbering for lguest devices. */ +static unsigned int dev_index; + /* For Guests, device memory can be used as normal memory, so we cast away the * __iomem to quieten sparse. */ static inline void *lguest_map(unsigned long phys_addr, unsigned long pages) { - return (__force void *)ioremap_cache(phys_addr, PAGE_SIZE*pages); + return (__force void *)ioremap(phys_addr, PAGE_SIZE*pages); } static inline void lguest_unmap(void *addr) @@ -322,10 +325,8 @@ static struct device lguest_root = { * As Andrew Tridgell says, "Untested code is buggy code". * * It's worth reading this carefully: we start with a pointer to the new device - * descriptor in the "lguest_devices" page, and the offset into the device - * descriptor page so we can uniquely identify it if things go badly wrong. */ -static void add_lguest_device(struct lguest_device_desc *d, - unsigned int offset) + * descriptor in the "lguest_devices" page. */ +static void add_lguest_device(struct lguest_device_desc *d) { struct lguest_device *ldev; @@ -333,14 +334,18 @@ static void add_lguest_device(struct lguest_device_desc *d, * it. */ ldev = kzalloc(sizeof(*ldev), GFP_KERNEL); if (!ldev) { - printk(KERN_EMERG "Cannot allocate lguest dev %u type %u\n", - offset, d->type); + printk(KERN_EMERG "Cannot allocate lguest dev %u\n", + dev_index++); return; } /* This devices' parent is the lguest/ dir. */ ldev->vdev.dev.parent = &lguest_root; /* We have a unique device index thanks to the dev_index counter. */ + ldev->vdev.index = dev_index++; + /* The device type comes straight from the descriptor. There's also a + * device vendor field in the virtio_device struct, which we leave as + * 0. */ ldev->vdev.id.device = d->type; /* We have a simple set of routines for querying the device's * configuration information and setting its status. */ @@ -352,8 +357,8 @@ static void add_lguest_device(struct lguest_device_desc *d, * virtio_device and calls device_register(). This makes the bus * infrastructure look for a matching driver. */ if (register_virtio_device(&ldev->vdev) != 0) { - printk(KERN_ERR "Failed to register lguest dev %u type %u\n", - offset, d->type); + printk(KERN_ERR "Failed to register lguest device %u\n", + ldev->vdev.index); kfree(ldev); } } @@ -374,7 +379,7 @@ static void scan_devices(void) break; printk("Device at %i has size %u\n", i, desc_size(d)); - add_lguest_device(d, i); + add_lguest_device(d); } } diff --git a/trunk/drivers/pci/hotplug/rpadlpar_sysfs.c b/trunk/drivers/pci/hotplug/rpadlpar_sysfs.c index 779c5db71be4..e32148a8fa12 100644 --- a/trunk/drivers/pci/hotplug/rpadlpar_sysfs.c +++ b/trunk/drivers/pci/hotplug/rpadlpar_sysfs.c @@ -18,12 +18,8 @@ #include "rpadlpar.h" #define DLPAR_KOBJ_NAME "control" - -/* Those two have no quotes because they are passed to __ATTR() which - * stringifies the argument (yuck !) - */ -#define ADD_SLOT_ATTR_NAME add_slot -#define REMOVE_SLOT_ATTR_NAME remove_slot +#define ADD_SLOT_ATTR_NAME "add_slot" +#define REMOVE_SLOT_ATTR_NAME "remove_slot" #define MAX_DRC_NAME_LEN 64 diff --git a/trunk/drivers/s390/kvm/kvm_virtio.c b/trunk/drivers/s390/kvm/kvm_virtio.c index 5ab34340919b..9f55ce6f3c78 100644 --- a/trunk/drivers/s390/kvm/kvm_virtio.c +++ b/trunk/drivers/s390/kvm/kvm_virtio.c @@ -31,6 +31,11 @@ */ static void *kvm_devices; +/* + * Unique numbering for kvm devices. + */ +static unsigned int dev_index; + struct kvm_device { struct virtio_device vdev; struct kvm_device_desc *desc; @@ -245,25 +250,26 @@ static struct device kvm_root = { * adds a new device and register it with virtio * appropriate drivers are loaded by the device model */ -static void add_kvm_device(struct kvm_device_desc *d, unsigned int offset) +static void add_kvm_device(struct kvm_device_desc *d) { struct kvm_device *kdev; kdev = kzalloc(sizeof(*kdev), GFP_KERNEL); if (!kdev) { - printk(KERN_EMERG "Cannot allocate kvm dev %u type %u\n", - offset, d->type); + printk(KERN_EMERG "Cannot allocate kvm dev %u\n", + dev_index++); return; } kdev->vdev.dev.parent = &kvm_root; + kdev->vdev.index = dev_index++; kdev->vdev.id.device = d->type; kdev->vdev.config = &kvm_vq_configspace_ops; kdev->desc = d; if (register_virtio_device(&kdev->vdev) != 0) { - printk(KERN_ERR "Failed to register kvm device %u type %u\n", - offset, d->type); + printk(KERN_ERR "Failed to register kvm device %u\n", + kdev->vdev.index); kfree(kdev); } } @@ -283,7 +289,7 @@ static void scan_devices(void) if (d->type == 0) break; - add_kvm_device(d, i); + add_kvm_device(d); } } diff --git a/trunk/drivers/virtio/virtio.c b/trunk/drivers/virtio/virtio.c index 0f3c2bb7bf35..13866789b356 100644 --- a/trunk/drivers/virtio/virtio.c +++ b/trunk/drivers/virtio/virtio.c @@ -2,9 +2,6 @@ #include #include -/* Unique numbering for virtio devices. */ -static unsigned int dev_index; - static ssize_t device_show(struct device *_d, struct device_attribute *attr, char *buf) { @@ -169,10 +166,7 @@ int register_virtio_device(struct virtio_device *dev) int err; dev->dev.bus = &virtio_bus; - - /* Assign a unique device index and hence name. */ - dev->index = dev_index++; - sprintf(dev->dev.bus_id, "virtio%u", dev->index); + sprintf(dev->dev.bus_id, "%u", dev->index); /* We always start by resetting the device, in case a previous * driver messed it up. This also tests that code path a little. */ diff --git a/trunk/drivers/virtio/virtio_pci.c b/trunk/drivers/virtio/virtio_pci.c index eae7236310e4..27e9fc9117cd 100644 --- a/trunk/drivers/virtio/virtio_pci.c +++ b/trunk/drivers/virtio/virtio_pci.c @@ -78,6 +78,9 @@ static struct device virtio_pci_root = { .bus_id = "virtio-pci", }; +/* Unique numbering for devices under the kvm root */ +static unsigned int dev_index; + /* Convert a generic virtio device to our structure */ static struct virtio_pci_device *to_vp_device(struct virtio_device *vdev) { @@ -322,6 +325,10 @@ static int __devinit virtio_pci_probe(struct pci_dev *pci_dev, if (vp_dev == NULL) return -ENOMEM; + snprintf(vp_dev->vdev.dev.bus_id, BUS_ID_SIZE, "virtio%d", dev_index); + vp_dev->vdev.index = dev_index; + dev_index++; + vp_dev->vdev.dev.parent = &virtio_pci_root; vp_dev->vdev.config = &virtio_pci_config_ops; vp_dev->pci_dev = pci_dev; diff --git a/trunk/drivers/virtio/virtio_ring.c b/trunk/drivers/virtio/virtio_ring.c index 72bf8bc09014..937a49d6772c 100644 --- a/trunk/drivers/virtio/virtio_ring.c +++ b/trunk/drivers/virtio/virtio_ring.c @@ -227,6 +227,7 @@ static bool vring_enable_cb(struct virtqueue *_vq) struct vring_virtqueue *vq = to_vvq(_vq); START_USE(vq); + BUG_ON(!(vq->vring.avail->flags & VRING_AVAIL_F_NO_INTERRUPT)); /* We optimistically turn back on interrupts, then check if there was * more to do. */ @@ -253,6 +254,13 @@ irqreturn_t vring_interrupt(int irq, void *_vq) if (unlikely(vq->broken)) return IRQ_HANDLED; + /* Other side may have missed us turning off the interrupt, + * but we should preserve disable semantic for virtio users. */ + if (unlikely(vq->vring.avail->flags & VRING_AVAIL_F_NO_INTERRUPT)) { + pr_debug("virtqueue interrupt after disable for %p\n", vq); + return IRQ_HANDLED; + } + pr_debug("virtqueue callback for %p (%p)\n", vq, vq->vq.callback); if (vq->vq.callback) vq->vq.callback(&vq->vq); diff --git a/trunk/drivers/watchdog/geodewdt.c b/trunk/drivers/watchdog/geodewdt.c index 30d09cbbad94..f85b19625f97 100644 --- a/trunk/drivers/watchdog/geodewdt.c +++ b/trunk/drivers/watchdog/geodewdt.c @@ -221,7 +221,8 @@ geodewdt_probe(struct platform_device *dev) { int ret, timer; - timer = geode_mfgpt_alloc_timer(MFGPT_TIMER_ANY, MFGPT_DOMAIN_WORKING); + timer = geode_mfgpt_alloc_timer(MFGPT_TIMER_ANY, + MFGPT_DOMAIN_WORKING, THIS_MODULE); if (timer == -1) { printk(KERN_ERR "geodewdt: No timers were available\n"); diff --git a/trunk/include/linux/input.h b/trunk/include/linux/input.h index e075c4b762fb..28a094fcfe20 100644 --- a/trunk/include/linux/input.h +++ b/trunk/include/linux/input.h @@ -637,9 +637,7 @@ struct input_absinfo { #define SW_LID 0x00 /* set = lid shut */ #define SW_TABLET_MODE 0x01 /* set = tablet mode */ #define SW_HEADPHONE_INSERT 0x02 /* set = inserted */ -#define SW_RFKILL_ALL 0x03 /* rfkill master switch, type "any" - set = radio enabled */ -#define SW_RADIO SW_RFKILL_ALL /* deprecated */ +#define SW_RADIO 0x03 /* set = radio enabled */ #define SW_MAX 0x0f #define SW_CNT (SW_MAX+1) diff --git a/trunk/include/linux/virtio_blk.h b/trunk/include/linux/virtio_blk.h index 5f79a5f9de79..d4695a3356d0 100644 --- a/trunk/include/linux/virtio_blk.h +++ b/trunk/include/linux/virtio_blk.h @@ -10,19 +10,18 @@ #define VIRTIO_BLK_F_SIZE_MAX 1 /* Indicates maximum segment size */ #define VIRTIO_BLK_F_SEG_MAX 2 /* Indicates maximum # of segments */ #define VIRTIO_BLK_F_GEOMETRY 4 /* Legacy geometry available */ -#define VIRTIO_BLK_F_RO 5 /* Disk is read-only */ struct virtio_blk_config { /* The capacity (in 512-byte sectors). */ - __u64 capacity; + __le64 capacity; /* The maximum segment size (if VIRTIO_BLK_F_SIZE_MAX) */ - __u32 size_max; + __le32 size_max; /* The maximum number of segments (if VIRTIO_BLK_F_SEG_MAX) */ - __u32 seg_max; + __le32 seg_max; /* geometry the device (if VIRTIO_BLK_F_GEOMETRY) */ struct virtio_blk_geometry { - __u16 cylinders; + __le16 cylinders; __u8 heads; __u8 sectors; } geometry; diff --git a/trunk/include/linux/virtio_config.h b/trunk/include/linux/virtio_config.h index f364bbf63c34..50db245c81ad 100644 --- a/trunk/include/linux/virtio_config.h +++ b/trunk/include/linux/virtio_config.h @@ -15,10 +15,6 @@ /* We've given up on this device. */ #define VIRTIO_CONFIG_S_FAILED 0x80 -/* Do we get callbacks when the ring is completely used, even if we've - * suppressed them? */ -#define VIRTIO_F_NOTIFY_ON_EMPTY 24 - #ifdef __KERNEL__ #include @@ -103,7 +99,7 @@ static inline bool virtio_has_feature(const struct virtio_device *vdev, * The return value is -ENOENT if the feature doesn't exist. Otherwise * the config value is copied into whatever is pointed to by v. */ #define virtio_config_val(vdev, fbit, offset, v) \ - virtio_config_buf((vdev), (fbit), (offset), (v), sizeof(*v)) + virtio_config_buf((vdev), (fbit), (offset), (v), sizeof(v)) static inline int virtio_config_buf(struct virtio_device *vdev, unsigned int fbit, diff --git a/trunk/include/linux/virtio_rng.h b/trunk/include/linux/virtio_rng.h deleted file mode 100644 index 331afb6c9f62..000000000000 --- a/trunk/include/linux/virtio_rng.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef _LINUX_VIRTIO_RNG_H -#define _LINUX_VIRTIO_RNG_H -#include - -/* The ID for virtio_rng */ -#define VIRTIO_ID_RNG 4 - -#endif /* _LINUX_VIRTIO_RNG_H */ diff --git a/trunk/include/linux/wm97xx.h b/trunk/include/linux/wm97xx.h index 6f69968eab24..4d13732e9cf0 100644 --- a/trunk/include/linux/wm97xx.h +++ b/trunk/include/linux/wm97xx.h @@ -100,7 +100,6 @@ #define WM9713_ADCSEL_Y 0x0004 /* Y measurement */ #define WM9713_ADCSEL_PRES 0x0008 /* Pressure measurement */ #define WM9713_COO 0x0001 /* enable coordinate mode */ -#define WM9713_45W 0x1000 /* set for 5 wire panel */ #define WM9713_PDEN 0x0800 /* measure only when pen down */ #define WM9713_ADCSEL_MASK 0x00fe /* ADC selection mask */ #define WM9713_WAIT 0x0200 /* coordinate wait */ diff --git a/trunk/scripts/decodecode b/trunk/scripts/decodecode old mode 100755 new mode 100644