From 709266d4e3ae0b5f9e53a24ba85b0388c0840568 Mon Sep 17 00:00:00 2001 From: Harvey Harrison Date: Wed, 28 May 2008 12:49:56 -0500 Subject: [PATCH] --- yaml --- r: 97574 b: refs/heads/master c: 827e609b4581282b98bdf7666f6e93ff1bd1a63e h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/Documentation/lguest/lguest.c | 12 +- trunk/arch/blackfin/kernel/gptimers.c | 2 +- trunk/arch/blackfin/lib/outs.S | 2 +- trunk/arch/blackfin/mach-bf527/boards/ezkit.c | 4 +- .../arch/blackfin/mach-bf537/boards/Makefile | 2 +- trunk/arch/blackfin/mach-bf537/boards/led.S | 183 +++++++ .../arch/blackfin/mach-bf548/boards/Makefile | 2 +- .../blackfin/mach-bf548/boards/cm_bf548.c | 2 +- trunk/arch/blackfin/mach-bf548/boards/led.S | 172 +++++++ trunk/arch/ia64/kernel/ivt.S | 84 ++-- trunk/arch/ia64/kernel/minstate.h | 46 +- trunk/arch/ia64/kernel/patch.c | 23 - trunk/arch/ia64/kernel/setup.c | 11 - trunk/arch/ia64/kernel/vmlinux.lds.S | 7 - trunk/arch/powerpc/boot/dts/mpc8610_hpcd.dts | 10 +- trunk/arch/powerpc/configs/pasemi_defconfig | 172 +++---- .../powerpc/platforms/52xx/mpc52xx_gpio.c | 14 +- .../powerpc/platforms/cell/celleb_scc_pciex.c | 5 +- trunk/arch/ppc/kernel/ppc_ksyms.c | 2 - trunk/arch/s390/Kconfig | 3 - trunk/arch/s390/appldata/appldata_base.c | 8 - trunk/arch/s390/defconfig | 11 +- trunk/arch/s390/kernel/dis.c | 2 +- trunk/arch/s390/kernel/smp.c | 2 +- trunk/arch/s390/mm/init.c | 49 +- trunk/arch/s390/mm/vmem.c | 18 +- trunk/arch/x86/lguest/boot.c | 5 +- trunk/crypto/cts.c | 6 - trunk/drivers/ata/ahci.c | 8 +- trunk/drivers/ata/ata_piix.c | 7 +- trunk/drivers/ata/libata-core.c | 2 +- trunk/drivers/ata/libata-pmp.c | 7 +- trunk/drivers/ata/libata-scsi.c | 3 +- trunk/drivers/ata/sata_fsl.c | 224 +++------ trunk/drivers/ata/sata_mv.c | 83 ++-- trunk/drivers/base/core.c | 15 - 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/cpufreq/cpufreq.c | 4 +- trunk/drivers/hwmon/ibmaem.c | 12 +- 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/misc/kgdbts.c | 5 +- trunk/drivers/misc/thinkpad_acpi.c | 10 +- trunk/drivers/net/s2io.c | 10 +- trunk/drivers/net/wireless/b43/b43.h | 1 - trunk/drivers/net/wireless/b43/main.c | 70 +-- .../net/wireless/iwlwifi/iwl-4965-rs.c | 3 +- trunk/drivers/net/wireless/rndis_wlan.c | 65 +-- trunk/drivers/net/wireless/rt2x00/rt2x00.h | 5 - .../net/wireless/rt2x00/rt2x00config.c | 1 - trunk/drivers/net/wireless/rt2x00/rt2x00dev.c | 8 +- trunk/drivers/net/wireless/rt2x00/rt2x00mac.c | 1 - trunk/drivers/net/wireless/rtl8180_grf5101.c | 2 +- trunk/drivers/net/wireless/rtl8180_max2820.c | 5 +- trunk/drivers/net/wireless/rtl8180_sa2400.c | 2 +- trunk/drivers/pci/hotplug/rpadlpar_sysfs.c | 8 +- trunk/drivers/pcmcia/electra_cf.c | 1 - trunk/drivers/pnp/quirks.c | 2 +- trunk/drivers/pnp/system.c | 2 +- trunk/drivers/s390/block/dasd.c | 28 +- trunk/drivers/s390/char/raw3270.c | 9 +- trunk/drivers/s390/char/sclp_config.c | 2 +- trunk/drivers/s390/char/sclp_vt220.c | 27 +- trunk/drivers/s390/char/tape.h | 3 - trunk/drivers/s390/char/tape_block.c | 4 +- trunk/drivers/s390/char/tape_core.c | 16 +- trunk/drivers/s390/kvm/kvm_virtio.c | 18 +- trunk/drivers/serial/8250.c | 4 +- trunk/drivers/serial/8250.h | 5 + trunk/drivers/serial/serial_core.c | 10 - trunk/drivers/usb/c67x00/c67x00-ll-hpi.c | 12 +- trunk/drivers/usb/class/cdc-wdm.c | 4 +- trunk/drivers/usb/core/generic.c | 5 + trunk/drivers/usb/core/hcd.h | 2 - trunk/drivers/usb/core/hub.c | 15 +- trunk/drivers/usb/core/quirks.c | 4 - trunk/drivers/usb/core/sysfs.c | 44 +- trunk/drivers/usb/gadget/fsl_usb2_udc.c | 2 - trunk/drivers/usb/host/ehci-au1xxx.c | 1 - trunk/drivers/usb/host/ehci-fsl.c | 7 +- trunk/drivers/usb/host/ehci-hub.c | 16 +- trunk/drivers/usb/host/ehci-ixp4xx.c | 4 +- trunk/drivers/usb/host/ehci-orion.c | 8 +- trunk/drivers/usb/host/ehci-pci.c | 4 +- trunk/drivers/usb/host/ehci-ppc-of.c | 2 - trunk/drivers/usb/host/ehci-ppc-soc.c | 1 - trunk/drivers/usb/host/ehci-ps3.c | 1 - trunk/drivers/usb/host/ehci-sched.c | 67 +-- trunk/drivers/usb/host/ehci.h | 5 +- trunk/drivers/usb/host/isp1760-if.c | 4 +- trunk/drivers/usb/misc/Kconfig | 11 - trunk/drivers/usb/misc/Makefile | 1 - trunk/drivers/usb/misc/isight_firmware.c | 131 ----- trunk/drivers/usb/serial/ftdi_sio.c | 264 +---------- trunk/drivers/usb/serial/ftdi_sio.h | 267 +---------- trunk/drivers/usb/serial/option.c | 34 +- trunk/drivers/usb/serial/pl2303.c | 1 - trunk/drivers/usb/serial/pl2303.h | 1 - trunk/drivers/usb/storage/unusual_devs.h | 10 +- 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/fs/cifs/cifssmb.c | 6 +- trunk/fs/ocfs2/cluster/tcp.c | 28 +- trunk/fs/ocfs2/cluster/tcp.h | 12 +- trunk/fs/ocfs2/cluster/tcp_internal.h | 32 -- trunk/fs/ocfs2/dlm/dlmdebug.h | 12 +- trunk/fs/ocfs2/stack_user.c | 34 +- trunk/include/asm-blackfin/bfin-global.h | 7 + .../include/asm-blackfin/mach-bf527/anomaly.h | 5 +- .../include/asm-blackfin/mach-bf533/anomaly.h | 31 +- .../include/asm-blackfin/mach-bf537/anomaly.h | 10 +- .../include/asm-blackfin/mach-bf548/anomaly.h | 2 - .../include/asm-blackfin/mach-bf561/anomaly.h | 2 +- trunk/include/asm-ia64/patch.h | 1 - trunk/include/asm-ia64/ptrace.h | 2 +- trunk/include/asm-ia64/sections.h | 1 - trunk/include/asm-powerpc/io.h | 12 +- trunk/include/asm-s390/types.h | 6 - trunk/include/linux/device.h | 3 - trunk/include/linux/input.h | 4 +- trunk/include/linux/sched.h | 1 + trunk/include/linux/serial_core.h | 1 - trunk/include/linux/spi/mmc_spi.h | 2 - trunk/include/linux/topology.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/kernel/kgdb.c | 16 +- trunk/kernel/sched.c | 447 ++++++++++++++++-- trunk/kernel/sched_clock.c | 18 +- trunk/kernel/sched_debug.c | 5 + trunk/kernel/sched_fair.c | 254 ++++++---- trunk/kernel/sched_rt.c | 4 + trunk/kernel/sched_stats.h | 1 - trunk/net/bluetooth/rfcomm/core.c | 2 +- trunk/net/dccp/ccids/ccid3.c | 13 +- trunk/net/dccp/ipv4.c | 4 +- trunk/net/ipv6/ip6mr.c | 2 +- trunk/net/llc/llc_sap.c | 10 +- trunk/net/mac80211/cfg.c | 4 +- trunk/net/mac80211/main.c | 2 +- trunk/net/mac80211/mlme.c | 29 +- trunk/net/mac80211/rx.c | 4 +- trunk/net/mac80211/util.c | 4 +- trunk/net/mac80211/wext.c | 11 +- trunk/net/netfilter/nf_conntrack_expect.c | 4 +- trunk/scripts/Makefile.modpost | 6 - trunk/scripts/decodecode | 0 162 files changed, 1673 insertions(+), 2258 deletions(-) create mode 100644 trunk/arch/blackfin/mach-bf537/boards/led.S create mode 100644 trunk/arch/blackfin/mach-bf548/boards/led.S delete mode 100644 trunk/drivers/char/hw_random/virtio-rng.c delete mode 100644 trunk/drivers/usb/misc/isight_firmware.c delete mode 100644 trunk/include/linux/virtio_rng.h mode change 100755 => 100644 trunk/scripts/decodecode diff --git a/[refs] b/[refs] index 896684369cd6..63980f616840 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d430a227d272fa514bade388bf511dba4ec2962a +refs/heads/master: 827e609b4581282b98bdf7666f6e93ff1bd1a63e 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/blackfin/kernel/gptimers.c b/trunk/arch/blackfin/kernel/gptimers.c index 3a3e9615b002..e698554895a7 100644 --- a/trunk/arch/blackfin/kernel/gptimers.c +++ b/trunk/arch/blackfin/kernel/gptimers.c @@ -10,8 +10,8 @@ #include #include -#include +#include #include #include diff --git a/trunk/arch/blackfin/lib/outs.S b/trunk/arch/blackfin/lib/outs.S index 4685b7aa0080..3daf96035bf6 100644 --- a/trunk/arch/blackfin/lib/outs.S +++ b/trunk/arch/blackfin/lib/outs.S @@ -76,4 +76,4 @@ ENTRY(_outsw_8) R0 = R0 + R1; .Lword8_loop_e: W[P0] = R0; RTS; -ENDPROC(_outsw_8) +ENDPROC(_outsw) diff --git a/trunk/arch/blackfin/mach-bf527/boards/ezkit.c b/trunk/arch/blackfin/mach-bf527/boards/ezkit.c index fa4f4e833e84..bb6d58c931de 100644 --- a/trunk/arch/blackfin/mach-bf527/boards/ezkit.c +++ b/trunk/arch/blackfin/mach-bf527/boards/ezkit.c @@ -647,10 +647,10 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { { .modalias = "ad7877", .platform_data = &bfin_ad7877_ts_info, - .irq = IRQ_PF8, + .irq = IRQ_PF6, .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ .bus_num = 0, - .chip_select = 2, + .chip_select = 1, .controller_data = &spi_ad7877_chip_info, }, #endif diff --git a/trunk/arch/blackfin/mach-bf537/boards/Makefile b/trunk/arch/blackfin/mach-bf537/boards/Makefile index c94f7a5b8211..87e450f29e37 100644 --- a/trunk/arch/blackfin/mach-bf537/boards/Makefile +++ b/trunk/arch/blackfin/mach-bf537/boards/Makefile @@ -3,7 +3,7 @@ # obj-$(CONFIG_GENERIC_BF537_BOARD) += generic_board.o -obj-$(CONFIG_BFIN537_STAMP) += stamp.o +obj-$(CONFIG_BFIN537_STAMP) += stamp.o led.o obj-$(CONFIG_BFIN537_BLUETECHNIX_CM) += cm_bf537.o obj-$(CONFIG_PNAV10) += pnav10.o obj-$(CONFIG_CAMSIG_MINOTAUR) += minotaur.o diff --git a/trunk/arch/blackfin/mach-bf537/boards/led.S b/trunk/arch/blackfin/mach-bf537/boards/led.S new file mode 100644 index 000000000000..4e9ea4283e5f --- /dev/null +++ b/trunk/arch/blackfin/mach-bf537/boards/led.S @@ -0,0 +1,183 @@ +/**************************************************** + * LED1 ---- PF6 LED2 ---- PF7 * + * LED3 ---- PF8 LED4 ---- PF9 * + * LED5 ---- PF10 LED6 ---- PF11 * + ****************************************************/ + +#include +#include + +/* All functions in this file save the registers they uses. + So there is no need to save any registers before calling them. */ + + .text; + +/* Initialize LEDs. */ + +ENTRY(_led_init) + LINK 12; + [--SP] = P0; + [--SP] = R0; + [--SP] = R1; + [--SP] = R2; + R1 = PF6|PF7|PF8|PF9|PF10|PF11 (Z); + R2 = ~R1; + + P0.H = hi(PORTF_FER); + P0.L = lo(PORTF_FER); + R0 = W[P0](Z); + SSYNC; + R0 = R0 & R2; + W[P0] = R0.L; + SSYNC; + + P0.H = hi(PORTFIO_DIR); + P0.L = lo(PORTFIO_DIR); + R0 = W[P0](Z); + SSYNC; + R0 = R0 | R1; + W[P0] = R0.L; + SSYNC; + + P0.H = hi(PORTFIO_INEN); + P0.L = lo(PORTFIO_INEN); + R0 = W[P0](Z); + SSYNC; + R0 = R0 & R2; + W[P0] = R0.L; + SSYNC; + + R2 = [SP++]; + R1 = [SP++]; + R0 = [SP++]; + P0 = [SP++]; + UNLINK; + RTS; + .size _led_init, .-_led_init + +/* Set one LED on. Leave other LEDs unchanged. + It expects the LED number passed through R0. */ + +ENTRY(_led_on) + LINK 12; + [--SP] = P0; + [--SP] = R1; + CALL _led_init; + R1 = 1; + R0 += 5; + R1 <<= R0; + P0.H = hi(PORTFIO); + P0.L = lo(PORTFIO); + R0 = W[P0](Z); + SSYNC; + R0 = R0 | R1; + W[P0] = R0.L; + SSYNC; + R1 = [SP++]; + P0 = [SP++]; + UNLINK; + RTS; + .size _led_on, .-_led_on + +/* Set one LED off. Leave other LEDs unchanged. */ + +ENTRY(_led_off) + LINK 12; + [--SP] = P0; + [--SP] = R1; + CALL _led_init; + R1 = 1; + R0 += 5; + R1 <<= R0; + R1 = ~R1; + P0.H = hi(PORTFIO); + P0.L = lo(PORTFIO); + R0 = W[P0](Z); + SSYNC; + R0 = R0 & R1; + W[P0] = R0.L; + SSYNC; + R1 = [SP++]; + P0 = [SP++]; + UNLINK; + RTS; + .size _led_off, .-_led_off + +/* Toggle one LED. Leave other LEDs unchanged. */ + +ENTRY(_led_toggle) + LINK 12; + [--SP] = P0; + [--SP] = R1; + CALL _led_init; + R1 = 1; + R0 += 5; + R1 <<= R0; + P0.H = hi(PORTFIO); + P0.L = lo(PORTFIO); + R0 = W[P0](Z); + SSYNC; + R0 = R0 ^ R1; + W[P0] = R0.L; + SSYNC; + R1 = [SP++]; + P0 = [SP++]; + UNLINK; + RTS; + .size _led_toggle, .-_led_toggle + +/* Display the number using LEDs in binary format. */ + +ENTRY(_led_disp_num) + LINK 12; + [--SP] = P0; + [--SP] = R1; + [--SP] = R2; + CALL _led_init; + R1 = 0x3f(X); + R0 = R0 & R1; + R2 = 6(X); + R0 <<= R2; + R1 <<= R2; + P0.H = hi(PORTFIO); + P0.L = lo(PORTFIO); + R2 = W[P0](Z); + SSYNC; + R1 = ~R1; + R2 = R2 & R1; + R2 = R2 | R0; + W[P0] = R2.L; + SSYNC; + R2 = [SP++]; + R1 = [SP++]; + P0 = [SP++]; + UNLINK; + RTS; + .size _led_disp_num, .-_led_disp_num + +/* Toggle the number using LEDs in binary format. */ + +ENTRY(_led_toggle_num) + LINK 12; + [--SP] = P0; + [--SP] = R1; + [--SP] = R2; + CALL _led_init; + R1 = 0x3f(X); + R0 = R0 & R1; + R1 = 6(X); + R0 <<= R1; + P0.H = hi(PORTFIO); + P0.L = lo(PORTFIO); + R1 = W[P0](Z); + SSYNC; + R1 = R1 ^ R0; + W[P0] = R1.L; + SSYNC; + R2 = [SP++]; + R1 = [SP++]; + P0 = [SP++]; + UNLINK; + RTS; + .size _led_toggle_num, .-_led_toggle_num + diff --git a/trunk/arch/blackfin/mach-bf548/boards/Makefile b/trunk/arch/blackfin/mach-bf548/boards/Makefile index 319ef54c4221..eed161dd7845 100644 --- a/trunk/arch/blackfin/mach-bf548/boards/Makefile +++ b/trunk/arch/blackfin/mach-bf548/boards/Makefile @@ -2,5 +2,5 @@ # arch/blackfin/mach-bf548/boards/Makefile # -obj-$(CONFIG_BFIN548_EZKIT) += ezkit.o +obj-$(CONFIG_BFIN548_EZKIT) += ezkit.o led.o obj-$(CONFIG_BFIN548_BLUETECHNIX_CM) += cm_bf548.o diff --git a/trunk/arch/blackfin/mach-bf548/boards/cm_bf548.c b/trunk/arch/blackfin/mach-bf548/boards/cm_bf548.c index 4f4ae8787edf..3b74f96d3590 100644 --- a/trunk/arch/blackfin/mach-bf548/boards/cm_bf548.c +++ b/trunk/arch/blackfin/mach-bf548/boards/cm_bf548.c @@ -684,7 +684,7 @@ static struct platform_device *cm_bf548_devices[] __initdata = { static int __init cm_bf548_init(void) { - printk(KERN_INFO "%s(): registering device resources\n", __func__); + printk(KERN_INFO "%s(): registering device resources\n", __FUNCTION__); platform_add_devices(cm_bf548_devices, ARRAY_SIZE(cm_bf548_devices)); #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) diff --git a/trunk/arch/blackfin/mach-bf548/boards/led.S b/trunk/arch/blackfin/mach-bf548/boards/led.S new file mode 100644 index 000000000000..f47daf3770d0 --- /dev/null +++ b/trunk/arch/blackfin/mach-bf548/boards/led.S @@ -0,0 +1,172 @@ +/**************************************************** + * LED1 ---- PG6 LED2 ---- PG7 * + * LED3 ---- PG8 LED4 ---- PG9 * + * LED5 ---- PG10 LED6 ---- PG11 * + ****************************************************/ + +#include +#include + +/* All functions in this file save the registers they uses. + So there is no need to save any registers before calling them. */ + + .text; + +/* Initialize LEDs. */ + +ENTRY(_led_init) + LINK 0; + [--SP] = P0; + [--SP] = R0; + [--SP] = R1; + [--SP] = R2; + R1 = (PG6|PG7|PG8|PG9|PG10|PG11)(Z); + R2 = ~R1; + + P0.H = hi(PORTG_FER); + P0.L = lo(PORTG_FER); + R0 = W[P0](Z); + SSYNC; + R0 = R0 & R2; + W[P0] = R0.L; + SSYNC; + + P0.H = hi(PORTG_DIR_SET); + P0.L = lo(PORTG_DIR_SET); + W[P0] = R1.L; + SSYNC; + + P0.H = hi(PORTG_INEN); + P0.L = lo(PORTG_INEN); + R0 = W[P0](Z); + SSYNC; + R0 = R0 & R2; + W[P0] = R0.L; + SSYNC; + + R2 = [SP++]; + R1 = [SP++]; + R0 = [SP++]; + P0 = [SP++]; + RTS; + .size _led_init, .-_led_init + +/* Set one LED on. Leave other LEDs unchanged. + It expects the LED number passed through R0. */ + +ENTRY(_led_on) + LINK 0; + [--SP] = P0; + [--SP] = R1; + CALL _led_init; + R1 = 1; + R0 += 5; + R1 <<= R0; + P0.H = hi(PORTG_SET); + P0.L = lo(PORTG_SET); + W[P0] = R1.L; + SSYNC; + R1 = [SP++]; + P0 = [SP++]; + UNLINK; + RTS; + .size _led_on, .-_led_on + +/* Set one LED off. Leave other LEDs unchanged. */ + +ENTRY(_led_off) + LINK 0; + [--SP] = P0; + [--SP] = R1; + CALL _led_init; + R1 = 1; + R0 += 5; + R1 <<= R0; + P0.H = hi(PORTG_CLEAR); + P0.L = lo(PORTG_CLEAR); + W[P0] = R1.L; + SSYNC; + R1 = [SP++]; + P0 = [SP++]; + UNLINK; + RTS; + .size _led_off, .-_led_off + +/* Toggle one LED. Leave other LEDs unchanged. */ + +ENTRY(_led_toggle) + LINK 0; + [--SP] = P0; + [--SP] = R1; + CALL _led_init; + R1 = 1; + R0 += 5; + R1 <<= R0; + P0.H = hi(PORTG); + P0.L = lo(PORTG); + R0 = W[P0](Z); + SSYNC; + R0 = R0 ^ R1; + W[P0] = R0.L; + SSYNC; + R1 = [SP++]; + P0 = [SP++]; + UNLINK; + RTS; + .size _led_toggle, .-_led_toggle + +/* Display the number using LEDs in binary format. */ + +ENTRY(_led_disp_num) + LINK 0; + [--SP] = P0; + [--SP] = R1; + [--SP] = R2; + CALL _led_init; + R1 = 0x3f(X); + R0 = R0 & R1; + R2 = 6(X); + R0 <<= R2; + R1 <<= R2; + P0.H = hi(PORTG); + P0.L = lo(PORTG); + R2 = W[P0](Z); + SSYNC; + R1 = ~R1; + R2 = R2 & R1; + R2 = R2 | R0; + W[P0] = R2.L; + SSYNC; + R2 = [SP++]; + R1 = [SP++]; + P0 = [SP++]; + UNLINK; + RTS; + .size _led_disp_num, .-_led_disp_num + +/* Toggle the number using LEDs in binary format. */ + +ENTRY(_led_toggle_num) + LINK 0; + [--SP] = P0; + [--SP] = R1; + [--SP] = R2; + CALL _led_init; + R1 = 0x3f(X); + R0 = R0 & R1; + R1 = 6(X); + R0 <<= R1; + P0.H = hi(PORTG); + P0.L = lo(PORTG); + R1 = W[P0](Z); + SSYNC; + R1 = R1 ^ R0; + W[P0] = R1.L; + SSYNC; + R2 = [SP++]; + R1 = [SP++]; + P0 = [SP++]; + UNLINK; + RTS; + .size _led_toggle_num, .-_led_toggle_num + diff --git a/trunk/arch/ia64/kernel/ivt.S b/trunk/arch/ia64/kernel/ivt.S index 80b44ea052d7..6678c49daba3 100644 --- a/trunk/arch/ia64/kernel/ivt.S +++ b/trunk/arch/ia64/kernel/ivt.S @@ -1076,6 +1076,48 @@ END(ia64_syscall_setup) DBG_FAULT(15) FAULT(15) + /* + * Squatting in this space ... + * + * This special case dispatcher for illegal operation faults allows preserved + * registers to be modified through a callback function (asm only) that is handed + * back from the fault handler in r8. Up to three arguments can be passed to the + * callback function by returning an aggregate with the callback as its first + * element, followed by the arguments. + */ +ENTRY(dispatch_illegal_op_fault) + .prologue + .body + SAVE_MIN_WITH_COVER + ssm psr.ic | PSR_DEFAULT_BITS + ;; + srlz.i // guarantee that interruption collection is on + ;; +(p15) ssm psr.i // restore psr.i + adds r3=8,r2 // set up second base pointer for SAVE_REST + ;; + alloc r14=ar.pfs,0,0,1,0 // must be first in insn group + mov out0=ar.ec + ;; + SAVE_REST + PT_REGS_UNWIND_INFO(0) + ;; + br.call.sptk.many rp=ia64_illegal_op_fault +.ret0: ;; + alloc r14=ar.pfs,0,0,3,0 // must be first in insn group + mov out0=r9 + mov out1=r10 + mov out2=r11 + movl r15=ia64_leave_kernel + ;; + mov rp=r15 + mov b6=r8 + ;; + cmp.ne p6,p0=0,r8 +(p6) br.call.dpnt.many b6=b6 // call returns to ia64_leave_kernel + br.sptk.many ia64_leave_kernel +END(dispatch_illegal_op_fault) + .org ia64_ivt+0x4000 ///////////////////////////////////////////////////////////////////////////////////////// // 0x4000 Entry 16 (size 64 bundles) Reserved @@ -1673,48 +1715,6 @@ END(ia32_interrupt) DBG_FAULT(67) FAULT(67) - /* - * Squatting in this space ... - * - * This special case dispatcher for illegal operation faults allows preserved - * registers to be modified through a callback function (asm only) that is handed - * back from the fault handler in r8. Up to three arguments can be passed to the - * callback function by returning an aggregate with the callback as its first - * element, followed by the arguments. - */ -ENTRY(dispatch_illegal_op_fault) - .prologue - .body - SAVE_MIN_WITH_COVER - ssm psr.ic | PSR_DEFAULT_BITS - ;; - srlz.i // guarantee that interruption collection is on - ;; -(p15) ssm psr.i // restore psr.i - adds r3=8,r2 // set up second base pointer for SAVE_REST - ;; - alloc r14=ar.pfs,0,0,1,0 // must be first in insn group - mov out0=ar.ec - ;; - SAVE_REST - PT_REGS_UNWIND_INFO(0) - ;; - br.call.sptk.many rp=ia64_illegal_op_fault -.ret0: ;; - alloc r14=ar.pfs,0,0,3,0 // must be first in insn group - mov out0=r9 - mov out1=r10 - mov out2=r11 - movl r15=ia64_leave_kernel - ;; - mov rp=r15 - mov b6=r8 - ;; - cmp.ne p6,p0=0,r8 -(p6) br.call.dpnt.many b6=b6 // call returns to ia64_leave_kernel - br.sptk.many ia64_leave_kernel -END(dispatch_illegal_op_fault) - #ifdef CONFIG_IA32_SUPPORT /* diff --git a/trunk/arch/ia64/kernel/minstate.h b/trunk/arch/ia64/kernel/minstate.h index 74b6d670aaef..7c548ac52bbc 100644 --- a/trunk/arch/ia64/kernel/minstate.h +++ b/trunk/arch/ia64/kernel/minstate.h @@ -15,9 +15,6 @@ #define ACCOUNT_SYS_ENTER #endif -.section ".data.patch.rse", "a" -.previous - /* * DO_SAVE_MIN switches to the kernel stacks (if necessary) and saves * the minimum state necessary that allows us to turn psr.ic back @@ -43,7 +40,7 @@ * Note that psr.ic is NOT turned on by this macro. This is so that * we can pass interruption state as arguments to a handler. */ -#define DO_SAVE_MIN(COVER,SAVE_IFS,EXTRA,WORKAROUND) \ +#define DO_SAVE_MIN(COVER,SAVE_IFS,EXTRA) \ mov r16=IA64_KR(CURRENT); /* M */ \ mov r27=ar.rsc; /* M */ \ mov r20=r1; /* A */ \ @@ -90,7 +87,6 @@ tbit.nz p15,p0=r29,IA64_PSR_I_BIT; \ mov r29=b0 \ ;; \ - WORKAROUND; \ adds r16=PT(R8),r1; /* initialize first base pointer */ \ adds r17=PT(R9),r1; /* initialize second base pointer */ \ (pKStk) mov r18=r0; /* make sure r18 isn't NaT */ \ @@ -210,40 +206,6 @@ st8 [r25]=r10; /* ar.ssd */ \ ;; -#define RSE_WORKAROUND \ -(pUStk) extr.u r17=r18,3,6; \ -(pUStk) sub r16=r18,r22; \ -[1:](pKStk) br.cond.sptk.many 1f; \ - .xdata4 ".data.patch.rse",1b-. \ - ;; \ - cmp.ge p6,p7 = 33,r17; \ - ;; \ -(p6) mov r17=0x310; \ -(p7) mov r17=0x308; \ - ;; \ - cmp.leu p1,p0=r16,r17; \ -(p1) br.cond.sptk.many 1f; \ - dep.z r17=r26,0,62; \ - movl r16=2f; \ - ;; \ - mov ar.pfs=r17; \ - dep r27=r0,r27,16,14; \ - mov b0=r16; \ - ;; \ - br.ret.sptk b0; \ - ;; \ -2: \ - mov ar.rsc=r0 \ - ;; \ - flushrs; \ - ;; \ - mov ar.bspstore=r22 \ - ;; \ - mov r18=ar.bsp; \ - ;; \ -1: \ - .pred.rel "mutex", pKStk, pUStk - -#define SAVE_MIN_WITH_COVER DO_SAVE_MIN(cover, mov r30=cr.ifs, , RSE_WORKAROUND) -#define SAVE_MIN_WITH_COVER_R19 DO_SAVE_MIN(cover, mov r30=cr.ifs, mov r15=r19, RSE_WORKAROUND) -#define SAVE_MIN DO_SAVE_MIN( , mov r30=r0, , ) +#define SAVE_MIN_WITH_COVER DO_SAVE_MIN(cover, mov r30=cr.ifs,) +#define SAVE_MIN_WITH_COVER_R19 DO_SAVE_MIN(cover, mov r30=cr.ifs, mov r15=r19) +#define SAVE_MIN DO_SAVE_MIN( , mov r30=r0, ) diff --git a/trunk/arch/ia64/kernel/patch.c b/trunk/arch/ia64/kernel/patch.c index b83b2c516008..e0dca8743dbb 100644 --- a/trunk/arch/ia64/kernel/patch.c +++ b/trunk/arch/ia64/kernel/patch.c @@ -115,29 +115,6 @@ ia64_patch_vtop (unsigned long start, unsigned long end) ia64_srlz_i(); } -/* - * Disable the RSE workaround by turning the conditional branch - * that we tagged in each place the workaround was used into an - * unconditional branch. - */ -void __init -ia64_patch_rse (unsigned long start, unsigned long end) -{ - s32 *offp = (s32 *) start; - u64 ip, *b; - - while (offp < (s32 *) end) { - ip = (u64) offp + *offp; - - b = (u64 *)(ip & -16); - b[1] &= ~0xf800000L; - ia64_fc((void *) ip); - ++offp; - } - ia64_sync_i(); - ia64_srlz_i(); -} - void __init ia64_patch_mckinley_e9 (unsigned long start, unsigned long end) { diff --git a/trunk/arch/ia64/kernel/setup.c b/trunk/arch/ia64/kernel/setup.c index f48a809c686d..e9596cd0cdab 100644 --- a/trunk/arch/ia64/kernel/setup.c +++ b/trunk/arch/ia64/kernel/setup.c @@ -560,17 +560,6 @@ setup_arch (char **cmdline_p) /* process SAL system table: */ ia64_sal_init(__va(efi.sal_systab)); -#ifdef CONFIG_ITANIUM - ia64_patch_rse((u64) __start___rse_patchlist, (u64) __end___rse_patchlist); -#else - { - u64 num_phys_stacked; - - if (ia64_pal_rse_info(&num_phys_stacked, 0) == 0 && num_phys_stacked > 96) - ia64_patch_rse((u64) __start___rse_patchlist, (u64) __end___rse_patchlist); - } -#endif - #ifdef CONFIG_SMP cpu_physical_id(0) = hard_smp_processor_id(); #endif diff --git a/trunk/arch/ia64/kernel/vmlinux.lds.S b/trunk/arch/ia64/kernel/vmlinux.lds.S index 5929ab10a289..80622acc95de 100644 --- a/trunk/arch/ia64/kernel/vmlinux.lds.S +++ b/trunk/arch/ia64/kernel/vmlinux.lds.S @@ -156,13 +156,6 @@ SECTIONS __end___vtop_patchlist = .; } - .data.patch.rse : AT(ADDR(.data.patch.rse) - LOAD_OFFSET) - { - __start___rse_patchlist = .; - *(.data.patch.rse) - __end___rse_patchlist = .; - } - .data.patch.mckinley_e9 : AT(ADDR(.data.patch.mckinley_e9) - LOAD_OFFSET) { __start___mckinley_e9_bundles = .; diff --git a/trunk/arch/powerpc/boot/dts/mpc8610_hpcd.dts b/trunk/arch/powerpc/boot/dts/mpc8610_hpcd.dts index fa9b6bbeb5af..08a780d89807 100644 --- a/trunk/arch/powerpc/boot/dts/mpc8610_hpcd.dts +++ b/trunk/arch/powerpc/boot/dts/mpc8610_hpcd.dts @@ -251,14 +251,14 @@ dma@c300 { #address-cells = <1>; #size-cells = <1>; - compatible = "fsl,mpc8610-dma", "fsl,eloplus-dma"; + compatible = "fsl,mpc8610-dma", "fsl,mpc8540-dma"; cell-index = <1>; reg = <0xc300 0x4>; /* DMA general status register */ ranges = <0x0 0xc100 0x200>; dma-channel@0 { compatible = "fsl,mpc8610-dma-channel", - "fsl,eloplus-dma-channel"; + "fsl,mpc8540-dma-channel"; cell-index = <0>; reg = <0x0 0x80>; interrupt-parent = <&mpic>; @@ -266,7 +266,7 @@ }; dma-channel@1 { compatible = "fsl,mpc8610-dma-channel", - "fsl,eloplus-dma-channel"; + "fsl,mpc8540-dma-channel"; cell-index = <1>; reg = <0x80 0x80>; interrupt-parent = <&mpic>; @@ -274,7 +274,7 @@ }; dma-channel@2 { compatible = "fsl,mpc8610-dma-channel", - "fsl,eloplus-dma-channel"; + "fsl,mpc8540-dma-channel"; cell-index = <2>; reg = <0x100 0x80>; interrupt-parent = <&mpic>; @@ -282,7 +282,7 @@ }; dma-channel@3 { compatible = "fsl,mpc8610-dma-channel", - "fsl,eloplus-dma-channel"; + "fsl,mpc8540-dma-channel"; cell-index = <3>; reg = <0x180 0x80>; interrupt-parent = <&mpic>; diff --git a/trunk/arch/powerpc/configs/pasemi_defconfig b/trunk/arch/powerpc/configs/pasemi_defconfig index 199e5f59d7a6..09f306248f2e 100644 --- a/trunk/arch/powerpc/configs/pasemi_defconfig +++ b/trunk/arch/powerpc/configs/pasemi_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.26-rc3 -# Tue May 27 16:08:06 2008 +# Linux kernel version: 2.6.25-rc6 +# Tue Mar 25 10:25:48 2008 # CONFIG_PPC64=y @@ -29,9 +29,6 @@ CONFIG_GENERIC_CLOCKEVENTS=y CONFIG_GENERIC_HARDIRQS=y CONFIG_HAVE_SETUP_PER_CPU_AREA=y CONFIG_IRQ_PER_CPU=y -CONFIG_STACKTRACE_SUPPORT=y -CONFIG_TRACE_IRQFLAGS_SUPPORT=y -CONFIG_LOCKDEP_SUPPORT=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y CONFIG_ARCH_HAS_ILOG2_U32=y CONFIG_ARCH_HAS_ILOG2_U64=y @@ -90,7 +87,6 @@ CONFIG_INITRAMFS_SOURCE="" CONFIG_SYSCTL=y # CONFIG_EMBEDDED is not set CONFIG_SYSCTL_SYSCALL=y -CONFIG_SYSCTL_SYSCALL_CHECK=y CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set # CONFIG_KALLSYMS_EXTRA_PASS is not set @@ -119,14 +115,12 @@ CONFIG_HAVE_OPROFILE=y # CONFIG_KPROBES is not set CONFIG_HAVE_KPROBES=y CONFIG_HAVE_KRETPROBES=y -# CONFIG_HAVE_DMA_ATTRS is not set CONFIG_PROC_PAGE_MONITOR=y CONFIG_SLABINFO=y CONFIG_RT_MUTEXES=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 CONFIG_MODULES=y -# CONFIG_MODULE_FORCE_LOAD is not set CONFIG_MODULE_UNLOAD=y # CONFIG_MODULE_FORCE_UNLOAD is not set # CONFIG_MODVERSIONS is not set @@ -173,11 +167,11 @@ CONFIG_PPC_PASEMI=y CONFIG_PPC_PASEMI_IOMMU=y # CONFIG_PPC_PASEMI_IOMMU_DMA_FORCE is not set CONFIG_PPC_PASEMI_MDIO=y +# CONFIG_PPC_CELLEB is not set # CONFIG_PPC_PS3 is not set # CONFIG_PPC_CELL is not set # CONFIG_PPC_CELL_NATIVE is not set # CONFIG_PPC_IBM_CELL_BLADE is not set -# CONFIG_PPC_CELLEB is not set # CONFIG_PQ2ADS is not set CONFIG_PPC_NATIVE=y # CONFIG_IPIC is not set @@ -198,7 +192,6 @@ CONFIG_CPU_FREQ_DEBUG=y CONFIG_CPU_FREQ_STAT=y # CONFIG_CPU_FREQ_STAT_DETAILS is not set CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set # CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set # CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set @@ -233,6 +226,7 @@ CONFIG_PREEMPT_NONE=y CONFIG_BINFMT_ELF=y CONFIG_COMPAT_BINFMT_ELF=y # CONFIG_BINFMT_MISC is not set +CONFIG_FORCE_MAX_ZONEORDER=9 CONFIG_HUGETLB_PAGE_SIZE_VARIABLE=y CONFIG_IOMMU_VMERGE=y CONFIG_IOMMU_HELPER=y @@ -255,14 +249,12 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y -CONFIG_PAGEFLAGS_EXTENDED=y CONFIG_SPLIT_PTLOCK_CPUS=4 CONFIG_RESOURCES_64BIT=y CONFIG_ZONE_DMA_FLAG=1 CONFIG_BOUNCE=y CONFIG_PPC_HAS_HASH_64K=y CONFIG_PPC_64K_PAGES=y -CONFIG_FORCE_MAX_ZONEORDER=9 # CONFIG_PPC_SUBPAGE_PROT is not set # CONFIG_SCHED_SMT is not set CONFIG_PROC_DEVICETREE=y @@ -298,12 +290,9 @@ CONFIG_CARDBUS=y # CONFIG_YENTA is not set # CONFIG_PD6729 is not set # CONFIG_I82092 is not set -CONFIG_ELECTRA_CF=y +# CONFIG_ELECTRA_CF is not set # CONFIG_HOTPLUG_PCI is not set -# CONFIG_HAS_RAPIDIO is not set -CONFIG_PAGE_OFFSET=0xc000000000000000 CONFIG_KERNEL_START=0xc000000000000000 -CONFIG_PHYSICAL_START=0x00000000 # # Networking @@ -352,6 +341,8 @@ CONFIG_TCP_CONG_CUBIC=y CONFIG_DEFAULT_TCP_CONG="cubic" # CONFIG_TCP_MD5SIG is not set # CONFIG_IPV6 is not set +# CONFIG_INET6_XFRM_TUNNEL is not set +# CONFIG_INET6_TUNNEL is not set # CONFIG_NETWORK_SECMARK is not set # CONFIG_NETFILTER is not set # CONFIG_IP_DCCP is not set @@ -482,7 +473,6 @@ CONFIG_MTD_NAND_PASEMI=y # # CONFIG_MTD_UBI is not set CONFIG_OF_DEVICE=y -CONFIG_OF_I2C=y # CONFIG_PARPORT is not set CONFIG_BLK_DEV=y # CONFIG_BLK_DEV_FD is not set @@ -530,6 +520,7 @@ CONFIG_IDE_PROC_FS=y # # IDE chipset support/bugfixes # +# CONFIG_IDE_GENERIC is not set # CONFIG_BLK_DEV_PLATFORM is not set # @@ -563,7 +554,7 @@ CONFIG_IDE_PROC_FS=y # CONFIG_BLK_DEV_VIA82CXXX is not set # CONFIG_BLK_DEV_TC86C001 is not set # CONFIG_BLK_DEV_IDEDMA is not set -# CONFIG_BLK_DEV_HD_ONLY is not set +CONFIG_IDE_ARCH_OBSOLETE_INIT=y # CONFIG_BLK_DEV_HD is not set # @@ -641,10 +632,7 @@ CONFIG_SCSI_LOWLEVEL=y # CONFIG_SCSI_LOWLEVEL_PCMCIA is not set CONFIG_ATA=y # CONFIG_ATA_NONSTANDARD is not set -CONFIG_SATA_PMP=y # CONFIG_SATA_AHCI is not set -CONFIG_SATA_SIL24=y -CONFIG_ATA_SFF=y # CONFIG_SATA_SVW is not set # CONFIG_ATA_PIIX is not set CONFIG_SATA_MV=y @@ -654,6 +642,7 @@ CONFIG_SATA_MV=y # CONFIG_SATA_PROMISE is not set # CONFIG_SATA_SX4 is not set # CONFIG_SATA_SIL is not set +CONFIG_SATA_SIL24=y # CONFIG_SATA_SIS is not set # CONFIG_SATA_ULI is not set # CONFIG_SATA_VIA is not set @@ -700,7 +689,6 @@ CONFIG_PATA_PCMCIA=y # CONFIG_PATA_WINBOND is not set CONFIG_PATA_PLATFORM=y CONFIG_PATA_OF_PLATFORM=y -# CONFIG_PATA_SCH is not set CONFIG_MD=y CONFIG_BLK_DEV_MD=y CONFIG_MD_LINEAR=y @@ -803,6 +791,7 @@ CONFIG_E1000_NAPI=y # CONFIG_SIS190 is not set # CONFIG_SKGE is not set # CONFIG_SKY2 is not set +# CONFIG_SK98LIN is not set # CONFIG_VIA_VELOCITY is not set CONFIG_TIGON3=y # CONFIG_BNX2 is not set @@ -821,7 +810,6 @@ CONFIG_PASEMI_MAC=y # CONFIG_MLX4_CORE is not set # CONFIG_TEHUTI is not set # CONFIG_BNX2X is not set -# CONFIG_SFC is not set # CONFIG_TR is not set # @@ -829,7 +817,6 @@ CONFIG_PASEMI_MAC=y # # CONFIG_WLAN_PRE80211 is not set # CONFIG_WLAN_80211 is not set -# CONFIG_IWLWIFI_LEDS is not set # # USB Network Adapters @@ -903,7 +890,6 @@ CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y # CONFIG_VT_HW_CONSOLE_BINDING is not set -CONFIG_DEVKMEM=y # CONFIG_SERIAL_NONSTANDARD is not set # CONFIG_NOZOMI is not set @@ -931,6 +917,7 @@ CONFIG_LEGACY_PTY_COUNT=4 # CONFIG_IPMI_HANDLER is not set CONFIG_HW_RANDOM=y CONFIG_HW_RANDOM_PASEMI=y +# CONFIG_GEN_RTC is not set # CONFIG_R3964 is not set # CONFIG_APPLICOM is not set @@ -949,7 +936,13 @@ CONFIG_DEVPORT=y CONFIG_I2C=y CONFIG_I2C_BOARDINFO=y CONFIG_I2C_CHARDEV=y + +# +# I2C Algorithms +# CONFIG_I2C_ALGOBIT=y +CONFIG_I2C_ALGOPCF=y +CONFIG_I2C_ALGOPCA=y # # I2C Hardware Bus support @@ -978,7 +971,6 @@ CONFIG_I2C_PASEMI=y # CONFIG_I2C_VIA is not set # CONFIG_I2C_VIAPRO is not set # CONFIG_I2C_VOODOO3 is not set -# CONFIG_I2C_PCA_PLATFORM is not set # # Miscellaneous I2C Chip support @@ -988,13 +980,19 @@ CONFIG_SENSORS_EEPROM=y # CONFIG_SENSORS_PCF8574 is not set # CONFIG_PCF8575 is not set # CONFIG_SENSORS_PCF8591 is not set +# CONFIG_TPS65010 is not set # CONFIG_SENSORS_MAX6875 is not set # CONFIG_SENSORS_TSL2550 is not set # CONFIG_I2C_DEBUG_CORE is not set # CONFIG_I2C_DEBUG_ALGO is not set # CONFIG_I2C_DEBUG_BUS is not set # CONFIG_I2C_DEBUG_CHIP is not set + +# +# SPI support +# # CONFIG_SPI is not set +# CONFIG_SPI_MASTER is not set # CONFIG_W1 is not set # CONFIG_POWER_SUPPLY is not set CONFIG_HWMON=y @@ -1064,22 +1062,12 @@ CONFIG_SSB_POSSIBLE=y # Multifunction device drivers # # CONFIG_MFD_SM501 is not set -# CONFIG_HTC_PASIC3 is not set # # Multimedia devices # - -# -# Multimedia core support -# # CONFIG_VIDEO_DEV is not set # CONFIG_DVB_CORE is not set -# CONFIG_VIDEO_MEDIA is not set - -# -# Multimedia drivers -# CONFIG_DAB=y # CONFIG_USB_DABUSB is not set @@ -1106,8 +1094,8 @@ CONFIG_FB_CFB_IMAGEBLIT=y # CONFIG_FB_SYS_FILLRECT is not set # CONFIG_FB_SYS_COPYAREA is not set # CONFIG_FB_SYS_IMAGEBLIT is not set -# CONFIG_FB_FOREIGN_ENDIAN is not set # CONFIG_FB_SYS_FOPS is not set +CONFIG_FB_DEFERRED_IO=y # CONFIG_FB_SVGALIB is not set CONFIG_FB_MACMODES=y CONFIG_FB_BACKLIGHT=y @@ -1225,7 +1213,6 @@ CONFIG_SND_VERBOSE_PROCFS=y # CONFIG_SND_AU8810 is not set # CONFIG_SND_AU8820 is not set # CONFIG_SND_AU8830 is not set -# CONFIG_SND_AW2 is not set # CONFIG_SND_AZT3328 is not set # CONFIG_SND_BT87X is not set # CONFIG_SND_CA0106 is not set @@ -1305,11 +1292,11 @@ CONFIG_SND_USB_USX2Y=y # CONFIG_SND_SOC is not set # -# ALSA SoC audio for Freescale SOCs +# SoC Audio support for SuperH # # -# SoC Audio for the Texas Instruments OMAP +# ALSA SoC audio for Freescale SOCs # # @@ -1347,13 +1334,11 @@ CONFIG_USB_DEVICEFS=y # # USB Host Controller Drivers # -# CONFIG_USB_C67X00_HCD is not set CONFIG_USB_EHCI_HCD=y # CONFIG_USB_EHCI_ROOT_HUB_TT is not set # CONFIG_USB_EHCI_TT_NEWSCHED is not set CONFIG_USB_EHCI_HCD_PPC_OF=y # CONFIG_USB_ISP116X_HCD is not set -# CONFIG_USB_ISP1760_HCD is not set CONFIG_USB_OHCI_HCD=y # CONFIG_USB_OHCI_HCD_PPC_OF is not set # CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set @@ -1369,7 +1354,6 @@ CONFIG_USB_SL811_HCD=y # # CONFIG_USB_ACM is not set # CONFIG_USB_PRINTER is not set -# CONFIG_USB_WDM is not set # # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' @@ -1391,7 +1375,6 @@ CONFIG_USB_STORAGE=y # CONFIG_USB_STORAGE_ALAUDA is not set # CONFIG_USB_STORAGE_ONETOUCH is not set # CONFIG_USB_STORAGE_KARMA is not set -# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set CONFIG_USB_LIBUSUAL=y # @@ -1433,7 +1416,6 @@ CONFIG_USB_LIBUSUAL=y # CONFIG_MMC is not set # CONFIG_MEMSTICK is not set # CONFIG_NEW_LEDS is not set -# CONFIG_ACCESSIBILITY is not set # CONFIG_INFINIBAND is not set CONFIG_EDAC=y @@ -1493,6 +1475,10 @@ CONFIG_RTC_DRV_DS1307=y # on-CPU RTC drivers # # CONFIG_DMADEVICES is not set + +# +# Userspace I/O +# # CONFIG_UIO is not set # @@ -1590,10 +1576,12 @@ CONFIG_NFS_FS=y CONFIG_NFS_V3=y # CONFIG_NFS_V3_ACL is not set # CONFIG_NFS_V4 is not set +# CONFIG_NFS_DIRECTIO is not set CONFIG_NFSD=y CONFIG_NFSD_V3=y # CONFIG_NFSD_V3_ACL is not set CONFIG_NFSD_V4=y +CONFIG_NFSD_TCP=y CONFIG_ROOT_NFS=y CONFIG_LOCKD=y CONFIG_LOCKD_V4=y @@ -1677,10 +1665,9 @@ CONFIG_NLS_ISO8859_1=y # Library routines # CONFIG_BITREVERSE=y -# CONFIG_GENERIC_FIND_FIRST_BIT is not set CONFIG_CRC_CCITT=y # CONFIG_CRC16 is not set -CONFIG_CRC_ITU_T=y +# CONFIG_CRC_ITU_T is not set CONFIG_CRC32=y # CONFIG_CRC7 is not set CONFIG_LIBCRC32C=m @@ -1690,7 +1677,6 @@ CONFIG_PLIST=y CONFIG_HAS_IOMEM=y CONFIG_HAS_IOPORT=y CONFIG_HAS_DMA=y -CONFIG_HAVE_LMB=y # # Kernel hacking @@ -1698,7 +1684,6 @@ CONFIG_HAVE_LMB=y # CONFIG_PRINTK_TIME is not set CONFIG_ENABLE_WARN_DEPRECATED=y CONFIG_ENABLE_MUST_CHECK=y -CONFIG_FRAME_WARN=2048 CONFIG_MAGIC_SYSRQ=y # CONFIG_UNUSED_SYMBOLS is not set # CONFIG_DEBUG_FS is not set @@ -1709,23 +1694,18 @@ CONFIG_DETECT_SOFTLOCKUP=y # CONFIG_SCHED_DEBUG is not set # CONFIG_SCHEDSTATS is not set # CONFIG_TIMER_STATS is not set -# CONFIG_DEBUG_OBJECTS is not set # CONFIG_SLUB_DEBUG_ON is not set # CONFIG_SLUB_STATS is not set # CONFIG_DEBUG_RT_MUTEXES is not set # CONFIG_RT_MUTEX_TESTER is not set # CONFIG_DEBUG_SPINLOCK is not set # CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_LOCK_ALLOC is not set -# CONFIG_PROVE_LOCKING is not set -# CONFIG_LOCK_STAT is not set # CONFIG_DEBUG_SPINLOCK_SLEEP is not set # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set # CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_BUGVERBOSE=y # CONFIG_DEBUG_INFO is not set # CONFIG_DEBUG_VM is not set -# CONFIG_DEBUG_WRITECOUNT is not set # CONFIG_DEBUG_LIST is not set # CONFIG_DEBUG_SG is not set # CONFIG_BOOT_PRINTK_DELAY is not set @@ -1755,83 +1735,53 @@ CONFIG_ASYNC_CORE=y CONFIG_ASYNC_MEMCPY=y CONFIG_ASYNC_XOR=y CONFIG_CRYPTO=y - -# -# Crypto core or helper -# CONFIG_CRYPTO_ALGAPI=y CONFIG_CRYPTO_AEAD=y CONFIG_CRYPTO_BLKCIPHER=y +# CONFIG_CRYPTO_SEQIV is not set CONFIG_CRYPTO_HASH=y CONFIG_CRYPTO_MANAGER=y -# CONFIG_CRYPTO_GF128MUL is not set -# CONFIG_CRYPTO_NULL is not set -# CONFIG_CRYPTO_CRYPTD is not set -CONFIG_CRYPTO_AUTHENC=y -# CONFIG_CRYPTO_TEST is not set - -# -# Authenticated Encryption with Associated Data -# -# CONFIG_CRYPTO_CCM is not set -# CONFIG_CRYPTO_GCM is not set -# CONFIG_CRYPTO_SEQIV is not set - -# -# Block modes -# -CONFIG_CRYPTO_CBC=y -# CONFIG_CRYPTO_CTR is not set -# CONFIG_CRYPTO_CTS is not set -# CONFIG_CRYPTO_ECB is not set -# CONFIG_CRYPTO_LRW is not set -# CONFIG_CRYPTO_PCBC is not set -# CONFIG_CRYPTO_XTS is not set - -# -# Hash modes -# CONFIG_CRYPTO_HMAC=y # CONFIG_CRYPTO_XCBC is not set - -# -# Digest -# -# CONFIG_CRYPTO_CRC32C is not set +# CONFIG_CRYPTO_NULL is not set CONFIG_CRYPTO_MD4=y CONFIG_CRYPTO_MD5=y -# CONFIG_CRYPTO_MICHAEL_MIC is not set CONFIG_CRYPTO_SHA1=y CONFIG_CRYPTO_SHA256=y CONFIG_CRYPTO_SHA512=y -# CONFIG_CRYPTO_TGR192 is not set # CONFIG_CRYPTO_WP512 is not set - -# -# Ciphers -# -CONFIG_CRYPTO_AES=y -# CONFIG_CRYPTO_ANUBIS is not set -# CONFIG_CRYPTO_ARC4 is not set +# CONFIG_CRYPTO_TGR192 is not set +# CONFIG_CRYPTO_GF128MUL is not set +# CONFIG_CRYPTO_ECB is not set +CONFIG_CRYPTO_CBC=y +# CONFIG_CRYPTO_PCBC is not set +# CONFIG_CRYPTO_LRW is not set +# CONFIG_CRYPTO_XTS is not set +# CONFIG_CRYPTO_CTR is not set +# CONFIG_CRYPTO_GCM is not set +# CONFIG_CRYPTO_CCM is not set +# CONFIG_CRYPTO_CRYPTD is not set +CONFIG_CRYPTO_DES=y +# CONFIG_CRYPTO_FCRYPT is not set CONFIG_CRYPTO_BLOWFISH=y -# CONFIG_CRYPTO_CAMELLIA is not set +# CONFIG_CRYPTO_TWOFISH is not set +# CONFIG_CRYPTO_SERPENT is not set +CONFIG_CRYPTO_AES=y # CONFIG_CRYPTO_CAST5 is not set # CONFIG_CRYPTO_CAST6 is not set -CONFIG_CRYPTO_DES=y -# CONFIG_CRYPTO_FCRYPT is not set +# CONFIG_CRYPTO_TEA is not set +# CONFIG_CRYPTO_ARC4 is not set # CONFIG_CRYPTO_KHAZAD is not set -# CONFIG_CRYPTO_SALSA20 is not set +# CONFIG_CRYPTO_ANUBIS is not set # CONFIG_CRYPTO_SEED is not set -# CONFIG_CRYPTO_SERPENT is not set -# CONFIG_CRYPTO_TEA is not set -# CONFIG_CRYPTO_TWOFISH is not set - -# -# Compression -# +# CONFIG_CRYPTO_SALSA20 is not set # CONFIG_CRYPTO_DEFLATE is not set +# CONFIG_CRYPTO_MICHAEL_MIC is not set +# CONFIG_CRYPTO_CRC32C is not set +# CONFIG_CRYPTO_CAMELLIA is not set +# CONFIG_CRYPTO_TEST is not set +CONFIG_CRYPTO_AUTHENC=y # CONFIG_CRYPTO_LZO is not set CONFIG_CRYPTO_HW=y # CONFIG_CRYPTO_DEV_HIFN_795X is not set # CONFIG_PPC_CLOCK is not set -# CONFIG_VIRTUALIZATION is not set diff --git a/trunk/arch/powerpc/platforms/52xx/mpc52xx_gpio.c b/trunk/arch/powerpc/platforms/52xx/mpc52xx_gpio.c index 8a455ebce98d..48da5dfe4856 100644 --- a/trunk/arch/powerpc/platforms/52xx/mpc52xx_gpio.c +++ b/trunk/arch/powerpc/platforms/52xx/mpc52xx_gpio.c @@ -100,7 +100,7 @@ static int mpc52xx_wkup_gpio_dir_in(struct gpio_chip *gc, unsigned int gpio) struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc); struct mpc52xx_gpiochip *chip = container_of(mm_gc, struct mpc52xx_gpiochip, mmchip); - struct mpc52xx_gpio_wkup __iomem *regs = mm_gc->regs; + struct mpc52xx_gpio_wkup *regs = mm_gc->regs; unsigned long flags; spin_lock_irqsave(&gpio_lock, flags); @@ -122,7 +122,7 @@ static int mpc52xx_wkup_gpio_dir_out(struct gpio_chip *gc, unsigned int gpio, int val) { struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc); - struct mpc52xx_gpio_wkup __iomem *regs = mm_gc->regs; + struct mpc52xx_gpio_wkup *regs = mm_gc->regs; struct mpc52xx_gpiochip *chip = container_of(mm_gc, struct mpc52xx_gpiochip, mmchip); unsigned long flags; @@ -150,7 +150,7 @@ static int __devinit mpc52xx_wkup_gpiochip_probe(struct of_device *ofdev, const struct of_device_id *match) { struct mpc52xx_gpiochip *chip; - struct mpc52xx_gpio_wkup __iomem *regs; + struct mpc52xx_gpio_wkup *regs; struct of_gpio_chip *ofchip; int ret; @@ -260,7 +260,7 @@ static int mpc52xx_simple_gpio_dir_in(struct gpio_chip *gc, unsigned int gpio) struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc); struct mpc52xx_gpiochip *chip = container_of(mm_gc, struct mpc52xx_gpiochip, mmchip); - struct mpc52xx_gpio __iomem *regs = mm_gc->regs; + struct mpc52xx_gpio *regs = mm_gc->regs; unsigned long flags; spin_lock_irqsave(&gpio_lock, flags); @@ -284,7 +284,7 @@ mpc52xx_simple_gpio_dir_out(struct gpio_chip *gc, unsigned int gpio, int val) struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc); struct mpc52xx_gpiochip *chip = container_of(mm_gc, struct mpc52xx_gpiochip, mmchip); - struct mpc52xx_gpio __iomem *regs = mm_gc->regs; + struct mpc52xx_gpio *regs = mm_gc->regs; unsigned long flags; spin_lock_irqsave(&gpio_lock, flags); @@ -312,7 +312,7 @@ static int __devinit mpc52xx_simple_gpiochip_probe(struct of_device *ofdev, { struct mpc52xx_gpiochip *chip; struct of_gpio_chip *ofchip; - struct mpc52xx_gpio __iomem *regs; + struct mpc52xx_gpio *regs; int ret; chip = kzalloc(sizeof(*chip), GFP_KERNEL); @@ -387,7 +387,7 @@ mpc52xx_gpt_gpio_set(struct gpio_chip *gc, unsigned int gpio, int val) static int mpc52xx_gpt_gpio_dir_in(struct gpio_chip *gc, unsigned int gpio) { struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc); - struct mpc52xx_gpt __iomem *regs = mm_gc->regs; + struct mpc52xx_gpt *regs = mm_gc->regs; out_be32(®s->mode, 0x04); diff --git a/trunk/arch/powerpc/platforms/cell/celleb_scc_pciex.c b/trunk/arch/powerpc/platforms/cell/celleb_scc_pciex.c index 0e04f8fb152a..31da84c458d2 100644 --- a/trunk/arch/powerpc/platforms/cell/celleb_scc_pciex.c +++ b/trunk/arch/powerpc/platforms/cell/celleb_scc_pciex.c @@ -217,7 +217,7 @@ static u##size scc_pciex_in##name(unsigned long port) \ static void scc_pciex_ins##name(unsigned long p, void *b, unsigned long c) \ { \ struct iowa_bus *bus = iowa_pio_find_bus(p); \ - __le##size *dst = b; \ + u##size *dst = b; \ for (; c != 0; c--, dst++) \ *dst = cpu_to_le##size(__scc_pciex_in##name(bus->phb, p)); \ scc_pciex_io_flush(bus); \ @@ -231,11 +231,10 @@ static void scc_pciex_outs##name(unsigned long p, const void *b, \ unsigned long c) \ { \ struct iowa_bus *bus = iowa_pio_find_bus(p); \ - const __le##size *src = b; \ + const u##size *src = b; \ for (; c != 0; c--, src++) \ __scc_pciex_out##name(bus->phb, le##size##_to_cpu(*src), p); \ } -#define __le8 u8 #define cpu_to_le8(x) (x) #define le8_to_cpu(x) (x) PCIEX_PIO_FUNC(8, b) diff --git a/trunk/arch/ppc/kernel/ppc_ksyms.c b/trunk/arch/ppc/kernel/ppc_ksyms.c index 5d529bcbeee9..602c268fc8a2 100644 --- a/trunk/arch/ppc/kernel/ppc_ksyms.c +++ b/trunk/arch/ppc/kernel/ppc_ksyms.c @@ -60,10 +60,8 @@ long long __ashrdi3(long long, int); long long __ashldi3(long long, int); long long __lshrdi3(long long, int); -EXPORT_SYMBOL(empty_zero_page); EXPORT_SYMBOL(clear_pages); EXPORT_SYMBOL(clear_user_page); -EXPORT_SYMBOL(copy_page); EXPORT_SYMBOL(transfer_to_handler); EXPORT_SYMBOL(do_IRQ); EXPORT_SYMBOL(machine_check_exception); diff --git a/trunk/arch/s390/Kconfig b/trunk/arch/s390/Kconfig index 93acb3c1859d..1d035082e78e 100644 --- a/trunk/arch/s390/Kconfig +++ b/trunk/arch/s390/Kconfig @@ -308,9 +308,6 @@ config ARCH_SPARSEMEM_ENABLE config ARCH_SPARSEMEM_DEFAULT def_bool y -config ARCH_SELECT_MEMORY_MODEL - def_bool y - source "mm/Kconfig" comment "I/O subsystem configuration" diff --git a/trunk/arch/s390/appldata/appldata_base.c b/trunk/arch/s390/appldata/appldata_base.c index ad40729bec3d..655d52543e2d 100644 --- a/trunk/arch/s390/appldata/appldata_base.c +++ b/trunk/arch/s390/appldata/appldata_base.c @@ -130,7 +130,6 @@ static void appldata_work_fn(struct work_struct *work) P_DEBUG(" -= Work Queue =-\n"); i = 0; - get_online_cpus(); spin_lock(&appldata_ops_lock); list_for_each(lh, &appldata_ops_list) { ops = list_entry(lh, struct appldata_ops, list); @@ -141,7 +140,6 @@ static void appldata_work_fn(struct work_struct *work) } } spin_unlock(&appldata_ops_lock); - put_online_cpus(); } /* @@ -268,14 +266,12 @@ appldata_timer_handler(ctl_table *ctl, int write, struct file *filp, len = *lenp; if (copy_from_user(buf, buffer, len > sizeof(buf) ? sizeof(buf) : len)) return -EFAULT; - get_online_cpus(); spin_lock(&appldata_timer_lock); if (buf[0] == '1') __appldata_vtimer_setup(APPLDATA_ADD_TIMER); else if (buf[0] == '0') __appldata_vtimer_setup(APPLDATA_DEL_TIMER); spin_unlock(&appldata_timer_lock); - put_online_cpus(); out: *lenp = len; *ppos += len; @@ -318,12 +314,10 @@ appldata_interval_handler(ctl_table *ctl, int write, struct file *filp, return -EINVAL; } - get_online_cpus(); spin_lock(&appldata_timer_lock); appldata_interval = interval; __appldata_vtimer_setup(APPLDATA_MOD_TIMER); spin_unlock(&appldata_timer_lock); - put_online_cpus(); P_INFO("Monitoring CPU interval set to %u milliseconds.\n", interval); @@ -562,10 +556,8 @@ static int __init appldata_init(void) return -ENOMEM; } - get_online_cpus(); for_each_online_cpu(i) appldata_online_cpu(i); - put_online_cpus(); /* Register cpu hotplug notifier */ register_hotcpu_notifier(&appldata_nb); diff --git a/trunk/arch/s390/defconfig b/trunk/arch/s390/defconfig index c5cdb975d590..aa341d0ea1e6 100644 --- a/trunk/arch/s390/defconfig +++ b/trunk/arch/s390/defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.26-rc4 -# Fri May 30 09:49:33 2008 +# Linux kernel version: 2.6.25 +# Wed Apr 30 11:07:45 2008 # CONFIG_SCHED_MC=y CONFIG_MMU=y @@ -103,7 +103,6 @@ CONFIG_RT_MUTEXES=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 CONFIG_MODULES=y -# CONFIG_MODULE_FORCE_LOAD is not set CONFIG_MODULE_UNLOAD=y # CONFIG_MODULE_FORCE_UNLOAD is not set CONFIG_MODVERSIONS=y @@ -174,7 +173,6 @@ CONFIG_PREEMPT=y # CONFIG_PREEMPT_RCU is not set CONFIG_ARCH_SPARSEMEM_ENABLE=y CONFIG_ARCH_SPARSEMEM_DEFAULT=y -CONFIG_ARCH_SELECT_MEMORY_MODEL=y CONFIG_SELECT_MEMORY_MODEL=y # CONFIG_FLATMEM_MANUAL is not set # CONFIG_DISCONTIGMEM_MANUAL is not set @@ -212,7 +210,6 @@ CONFIG_FORCE_MAX_ZONEORDER=9 CONFIG_PFAULT=y # CONFIG_SHARED_KERNEL is not set # CONFIG_CMM is not set -# CONFIG_PAGE_STATES is not set CONFIG_VIRT_TIMER=y CONFIG_VIRT_CPU_ACCOUNTING=y # CONFIG_APPLDATA_BASE is not set @@ -623,7 +620,6 @@ CONFIG_S390_VMUR=m # # CONFIG_MEMSTICK is not set # CONFIG_NEW_LEDS is not set -CONFIG_ACCESSIBILITY=y # # File systems @@ -758,12 +754,11 @@ CONFIG_FRAME_WARN=2048 CONFIG_MAGIC_SYSRQ=y # CONFIG_UNUSED_SYMBOLS is not set CONFIG_DEBUG_FS=y -# CONFIG_HEADERS_CHECK is not set +CONFIG_HEADERS_CHECK=y CONFIG_DEBUG_KERNEL=y # CONFIG_SCHED_DEBUG is not set # CONFIG_SCHEDSTATS is not set # CONFIG_TIMER_STATS is not set -# CONFIG_DEBUG_OBJECTS is not set # CONFIG_DEBUG_SLAB is not set CONFIG_DEBUG_PREEMPT=y # CONFIG_DEBUG_RT_MUTEXES is not set diff --git a/trunk/arch/s390/kernel/dis.c b/trunk/arch/s390/kernel/dis.c index d2f270c995d9..c14a336f6300 100644 --- a/trunk/arch/s390/kernel/dis.c +++ b/trunk/arch/s390/kernel/dis.c @@ -208,7 +208,7 @@ static const unsigned char formats[][7] = { [INSTR_RRF_F0FF] = { 0xff, F_16,F_24,F_28,0,0,0 }, /* e.g. madbr */ [INSTR_RRF_FUFF] = { 0xff, F_24,F_16,F_28,U4_20,0,0 },/* e.g. didbr */ [INSTR_RRF_RURR] = { 0xff, R_24,R_28,R_16,U4_20,0,0 },/* e.g. .insn */ - [INSTR_RRF_R0RR] = { 0xff, R_24,R_16,R_28,0,0,0 }, /* e.g. idte */ + [INSTR_RRF_R0RR] = { 0xff, R_24,R_28,R_16,0,0,0 }, /* e.g. idte */ [INSTR_RRF_U0FF] = { 0xff, F_24,U4_16,F_28,0,0,0 }, /* e.g. fixr */ [INSTR_RRF_U0RF] = { 0xff, R_24,U4_16,F_28,0,0,0 }, /* e.g. cfebr */ [INSTR_RRF_M0RR] = { 0xff, R_24,R_28,M_16,0,0,0 }, /* e.g. sske */ diff --git a/trunk/arch/s390/kernel/smp.c b/trunk/arch/s390/kernel/smp.c index 42b1d12ebb10..1f4228948dc4 100644 --- a/trunk/arch/s390/kernel/smp.c +++ b/trunk/arch/s390/kernel/smp.c @@ -1089,7 +1089,7 @@ static int __devinit smp_add_present_cpu(int cpu) #ifdef CONFIG_HOTPLUG_CPU -int __ref smp_rescan_cpus(void) +int smp_rescan_cpus(void) { cpumask_t newcpus; int cpu; diff --git a/trunk/arch/s390/mm/init.c b/trunk/arch/s390/mm/init.c index 05598649b326..29f3a63806b9 100644 --- a/trunk/arch/s390/mm/init.c +++ b/trunk/arch/s390/mm/init.c @@ -44,34 +44,37 @@ char empty_zero_page[PAGE_SIZE] __attribute__((__aligned__(PAGE_SIZE))); void show_mem(void) { - unsigned long i, total = 0, reserved = 0; - unsigned long shared = 0, cached = 0; - unsigned long flags; + int i, total = 0, reserved = 0; + int shared = 0, cached = 0; struct page *page; - pg_data_t *pgdat; printk("Mem-info:\n"); show_free_areas(); - for_each_online_pgdat(pgdat) { - pgdat_resize_lock(pgdat, &flags); - for (i = 0; i < pgdat->node_spanned_pages; i++) { - if (!pfn_valid(pgdat->node_start_pfn + i)) - continue; - page = pfn_to_page(pgdat->node_start_pfn + i); - total++; - if (PageReserved(page)) - reserved++; - else if (PageSwapCache(page)) - cached++; - else if (page_count(page)) - shared += page_count(page) - 1; - } - pgdat_resize_unlock(pgdat, &flags); + i = max_mapnr; + while (i-- > 0) { + if (!pfn_valid(i)) + continue; + page = pfn_to_page(i); + total++; + if (PageReserved(page)) + reserved++; + else if (PageSwapCache(page)) + cached++; + else if (page_count(page)) + shared += page_count(page) - 1; } - printk("%ld pages of RAM\n", total); - printk("%ld reserved pages\n", reserved); - printk("%ld pages shared\n", shared); - printk("%ld pages swap cached\n", cached); + printk("%d pages of RAM\n", total); + printk("%d reserved pages\n", reserved); + printk("%d pages shared\n", shared); + printk("%d pages swap cached\n", cached); + + printk("%lu pages dirty\n", global_page_state(NR_FILE_DIRTY)); + printk("%lu pages writeback\n", global_page_state(NR_WRITEBACK)); + printk("%lu pages mapped\n", global_page_state(NR_FILE_MAPPED)); + printk("%lu pages slab\n", + global_page_state(NR_SLAB_RECLAIMABLE) + + global_page_state(NR_SLAB_UNRECLAIMABLE)); + printk("%lu pages pagetables\n", global_page_state(NR_PAGETABLE)); } /* diff --git a/trunk/arch/s390/mm/vmem.c b/trunk/arch/s390/mm/vmem.c index f591188fa2c0..ea2804808f39 100644 --- a/trunk/arch/s390/mm/vmem.c +++ b/trunk/arch/s390/mm/vmem.c @@ -27,19 +27,12 @@ struct memory_segment { static LIST_HEAD(mem_segs); -static void __ref *vmem_alloc_pages(unsigned int order) -{ - if (slab_is_available()) - return (void *)__get_free_pages(GFP_KERNEL, order); - return alloc_bootmem_pages((1 << order) * PAGE_SIZE); -} - -static inline pud_t *vmem_pud_alloc(void) +static pud_t *vmem_pud_alloc(void) { pud_t *pud = NULL; #ifdef CONFIG_64BIT - pud = vmem_alloc_pages(2); + pud = vmemmap_alloc_block(PAGE_SIZE * 4, 0); if (!pud) return NULL; clear_table((unsigned long *) pud, _REGION3_ENTRY_EMPTY, PAGE_SIZE * 4); @@ -47,12 +40,12 @@ static inline pud_t *vmem_pud_alloc(void) return pud; } -static inline pmd_t *vmem_pmd_alloc(void) +static pmd_t *vmem_pmd_alloc(void) { pmd_t *pmd = NULL; #ifdef CONFIG_64BIT - pmd = vmem_alloc_pages(2); + pmd = vmemmap_alloc_block(PAGE_SIZE * 4, 0); if (!pmd) return NULL; clear_table((unsigned long *) pmd, _SEGMENT_ENTRY_EMPTY, PAGE_SIZE * 4); @@ -214,14 +207,13 @@ int __meminit vmemmap_populate(struct page *start, unsigned long nr, int node) if (pte_none(*pt_dir)) { unsigned long new_page; - new_page =__pa(vmem_alloc_pages(0)); + new_page =__pa(vmemmap_alloc_block(PAGE_SIZE, 0)); if (!new_page) goto out; pte = pfn_pte(new_page >> PAGE_SHIFT, PAGE_KERNEL); *pt_dir = pte; } } - memset(start, 0, nr * sizeof(struct page)); ret = 0; out: flush_tlb_kernel_range(start_addr, end_addr); 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/crypto/cts.c b/trunk/crypto/cts.c index ccf9c5de3958..c4e70bfb4970 100644 --- a/trunk/crypto/cts.c +++ b/trunk/crypto/cts.c @@ -89,9 +89,6 @@ static int cts_cbc_encrypt(struct crypto_cts_ctx *ctx, if (lastn < 0) return -EINVAL; - sg_init_table(sgsrc, 1); - sg_init_table(sgdst, 1); - memset(s, 0, sizeof(s)); scatterwalk_map_and_copy(s, src, offset, nbytes, 0); @@ -175,9 +172,6 @@ static int cts_cbc_decrypt(struct crypto_cts_ctx *ctx, if (lastn < 0) return -EINVAL; - sg_init_table(sgsrc, 1); - sg_init_table(sgdst, 1); - scatterwalk_map_and_copy(s, src, offset, nbytes, 0); lcldesc.tfm = ctx->child; diff --git a/trunk/drivers/ata/ahci.c b/trunk/drivers/ata/ahci.c index 544b7d6c617c..97f83fb2ee2e 100644 --- a/trunk/drivers/ata/ahci.c +++ b/trunk/drivers/ata/ahci.c @@ -502,10 +502,10 @@ static const struct pci_device_id ahci_pci_tbl[] = { { PCI_VDEVICE(NVIDIA, 0x0bcd), board_ahci }, /* MCP7B */ { PCI_VDEVICE(NVIDIA, 0x0bce), board_ahci }, /* MCP7B */ { PCI_VDEVICE(NVIDIA, 0x0bcf), board_ahci }, /* MCP7B */ - { PCI_VDEVICE(NVIDIA, 0x0bc4), board_ahci }, /* MCP7B */ - { PCI_VDEVICE(NVIDIA, 0x0bc5), board_ahci }, /* MCP7B */ - { PCI_VDEVICE(NVIDIA, 0x0bc6), board_ahci }, /* MCP7B */ - { PCI_VDEVICE(NVIDIA, 0x0bc7), board_ahci }, /* MCP7B */ + { PCI_VDEVICE(NVIDIA, 0x0bd0), board_ahci }, /* MCP7B */ + { PCI_VDEVICE(NVIDIA, 0x0bd1), board_ahci }, /* MCP7B */ + { PCI_VDEVICE(NVIDIA, 0x0bd2), board_ahci }, /* MCP7B */ + { PCI_VDEVICE(NVIDIA, 0x0bd3), board_ahci }, /* MCP7B */ /* SiS */ { PCI_VDEVICE(SI, 0x1184), board_ahci }, /* SiS 966 */ diff --git a/trunk/drivers/ata/ata_piix.c b/trunk/drivers/ata/ata_piix.c index 3548ee7014ca..a9027b8fbdd5 100644 --- a/trunk/drivers/ata/ata_piix.c +++ b/trunk/drivers/ata/ata_piix.c @@ -247,11 +247,10 @@ static const struct pci_device_id piix_pci_tbl[] = { { 0x8086, 0x2820, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata }, /* SATA Controller 2 IDE (ICH8) */ { 0x8086, 0x2825, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata }, - /* Mobile SATA Controller IDE (ICH8M), Apple */ - { 0x8086, 0x2828, 0x106b, 0x00a0, 0, 0, ich8m_apple_sata }, - { 0x8086, 0x2828, 0x106b, 0x00a1, 0, 0, ich8m_apple_sata }, /* Mobile SATA Controller IDE (ICH8M) */ { 0x8086, 0x2828, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata }, + /* Mobile SATA Controller IDE (ICH8M), Apple */ + { 0x8086, 0x2828, 0x106b, 0x00a0, 0, 0, ich8m_apple_sata }, /* SATA Controller IDE (ICH9) */ { 0x8086, 0x2920, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata }, /* SATA Controller IDE (ICH9) */ @@ -527,7 +526,7 @@ static struct ata_port_info piix_port_info[] = { [ich8m_apple_sata] = { - .flags = PIIX_SATA_FLAGS, + .flags = PIIX_SATA_FLAGS | PIIX_FLAG_SIDPR, .pio_mask = 0x1f, /* pio0-4 */ .mwdma_mask = 0x07, /* mwdma0-2 */ .udma_mask = ATA_UDMA6, diff --git a/trunk/drivers/ata/libata-core.c b/trunk/drivers/ata/libata-core.c index cc816ca623d3..3c89f205c83f 100644 --- a/trunk/drivers/ata/libata-core.c +++ b/trunk/drivers/ata/libata-core.c @@ -5403,7 +5403,7 @@ static void ata_host_stop(struct device *gendev, void *res) */ static void ata_finalize_port_ops(struct ata_port_operations *ops) { - static DEFINE_SPINLOCK(lock); + static spinlock_t lock = SPIN_LOCK_UNLOCKED; const struct ata_port_operations *cur; void **begin = (void **)ops; void **end = (void **)&ops->inherits; diff --git a/trunk/drivers/ata/libata-pmp.c b/trunk/drivers/ata/libata-pmp.c index 7daf4c0f6216..0f9386d4a5a0 100644 --- a/trunk/drivers/ata/libata-pmp.c +++ b/trunk/drivers/ata/libata-pmp.c @@ -322,12 +322,9 @@ static void sata_pmp_quirks(struct ata_port *ap) if (vendor == 0x1095 && devid == 0x3726) { /* sil3726 quirks */ ata_port_for_each_link(link, ap) { - /* Class code report is unreliable and SRST - * times out under certain configurations. - */ + /* class code report is unreliable */ if (link->pmp < 5) - link->flags |= ATA_LFLAG_NO_SRST | - ATA_LFLAG_ASSUME_ATA; + link->flags |= ATA_LFLAG_ASSUME_ATA; /* port 5 is for SEMB device and it doesn't like SRST */ if (link->pmp == 5) diff --git a/trunk/drivers/ata/libata-scsi.c b/trunk/drivers/ata/libata-scsi.c index 2e6e1622dc6d..aeb6e01d82ce 100644 --- a/trunk/drivers/ata/libata-scsi.c +++ b/trunk/drivers/ata/libata-scsi.c @@ -1637,7 +1637,6 @@ static int ata_scsi_translate(struct ata_device *dev, struct scsi_cmnd *cmd, /** * ata_scsi_rbuf_get - Map response buffer. - * @cmd: SCSI command containing buffer to be mapped. * @flags: unsigned long variable to store irq enable status * @copy_in: copy in from user buffer * @@ -1955,7 +1954,7 @@ static unsigned int ata_msense_ctl_mode(u8 *buf) /** * ata_msense_rw_recovery - Simulate MODE SENSE r/w error recovery page - * @buf: output buffer + * @bufp: output buffer * * Generate a generic MODE SENSE r/w error recovery page. * diff --git a/trunk/drivers/ata/sata_fsl.c b/trunk/drivers/ata/sata_fsl.c index 3924e7209a44..853559e32315 100644 --- a/trunk/drivers/ata/sata_fsl.c +++ b/trunk/drivers/ata/sata_fsl.c @@ -34,7 +34,7 @@ enum { SATA_FSL_HOST_FLAGS = (ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA | - ATA_FLAG_PMP | ATA_FLAG_NCQ), + ATA_FLAG_NCQ), SATA_FSL_MAX_CMDS = SATA_FSL_QUEUE_DEPTH, SATA_FSL_CMD_HDR_SIZE = 16, /* 4 DWORDS */ @@ -395,7 +395,7 @@ static void sata_fsl_qc_prep(struct ata_queued_cmd *qc) cd = (struct command_desc *)pp->cmdentry + tag; cd_paddr = pp->cmdentry_paddr + tag * SATA_FSL_CMD_DESC_SIZE; - ata_tf_to_fis(&qc->tf, qc->dev->link->pmp, 1, (u8 *) &cd->cfis); + ata_tf_to_fis(&qc->tf, 0, 1, (u8 *) &cd->cfis); VPRINTK("Dumping cfis : 0x%x, 0x%x, 0x%x\n", cd->cfis[0], cd->cfis[1], cd->cfis[2]); @@ -438,8 +438,6 @@ static unsigned int sata_fsl_qc_issue(struct ata_queued_cmd *qc) ioread32(CA + hcr_base), ioread32(CE + hcr_base), ioread32(CC + hcr_base)); - iowrite32(qc->dev->link->pmp, CQPMP + hcr_base); - /* Simply queue command to the controller/device */ iowrite32(1 << tag, CQ + hcr_base); @@ -560,36 +558,11 @@ static void sata_fsl_thaw(struct ata_port *ap) ioread32(hcr_base + HCONTROL), ioread32(hcr_base + HSTATUS)); } -static void sata_fsl_pmp_attach(struct ata_port *ap) -{ - struct sata_fsl_host_priv *host_priv = ap->host->private_data; - void __iomem *hcr_base = host_priv->hcr_base; - u32 temp; - - temp = ioread32(hcr_base + HCONTROL); - iowrite32((temp | HCONTROL_PMP_ATTACHED), hcr_base + HCONTROL); -} - -static void sata_fsl_pmp_detach(struct ata_port *ap) -{ - struct sata_fsl_host_priv *host_priv = ap->host->private_data; - void __iomem *hcr_base = host_priv->hcr_base; - u32 temp; - - temp = ioread32(hcr_base + HCONTROL); - temp &= ~HCONTROL_PMP_ATTACHED; - iowrite32(temp, hcr_base + HCONTROL); - - /* enable interrupts on the controller/port */ - temp = ioread32(hcr_base + HCONTROL); - iowrite32((temp | DEFAULT_PORT_IRQ_ENABLE_MASK), hcr_base + HCONTROL); - -} - static int sata_fsl_port_start(struct ata_port *ap) { struct device *dev = ap->host->dev; struct sata_fsl_port_priv *pp; + int retval; void *mem; dma_addr_t mem_dma; struct sata_fsl_host_priv *host_priv = ap->host->private_data; @@ -715,13 +688,12 @@ static int sata_fsl_prereset(struct ata_link *link, unsigned long deadline) } static int sata_fsl_softreset(struct ata_link *link, unsigned int *class, - unsigned long deadline) + unsigned long deadline) { struct ata_port *ap = link->ap; struct sata_fsl_port_priv *pp = ap->private_data; struct sata_fsl_host_priv *host_priv = ap->host->private_data; void __iomem *hcr_base = host_priv->hcr_base; - int pmp = sata_srst_pmp(link); u32 temp; struct ata_taskfile tf; u8 *cfis; @@ -731,9 +703,6 @@ static int sata_fsl_softreset(struct ata_link *link, unsigned int *class, DPRINTK("in xx_softreset\n"); - if (pmp != SATA_PMP_CTRL_PORT) - goto issue_srst; - try_offline_again: /* * Force host controller to go off-line, aborting current operations @@ -777,7 +746,6 @@ static int sata_fsl_softreset(struct ata_link *link, unsigned int *class, temp = ioread32(hcr_base + HCONTROL); temp |= (HCONTROL_ONLINE_PHY_RST | HCONTROL_SNOOP_ENABLE); - temp |= HCONTROL_PMP_ATTACHED; iowrite32(temp, hcr_base + HCONTROL); temp = ata_wait_register(hcr_base + HSTATUS, ONLINE, 0, 1, 500); @@ -803,8 +771,7 @@ static int sata_fsl_softreset(struct ata_link *link, unsigned int *class, ata_port_printk(ap, KERN_WARNING, "No Device OR PHYRDY change,Hstatus = 0x%x\n", ioread32(hcr_base + HSTATUS)); - *class = ATA_DEV_NONE; - goto out; + goto err; } /* @@ -816,8 +783,7 @@ static int sata_fsl_softreset(struct ata_link *link, unsigned int *class, if ((temp & 0xFF) != 0x18) { ata_port_printk(ap, KERN_WARNING, "No Signature Update\n"); - *class = ATA_DEV_NONE; - goto out; + goto err; } else { ata_port_printk(ap, KERN_INFO, "Signature Update detected @ %d msecs\n", @@ -832,7 +798,6 @@ static int sata_fsl_softreset(struct ata_link *link, unsigned int *class, * reached here, we can send a command to the target device */ -issue_srst: DPRINTK("Sending SRST/device reset\n"); ata_tf_init(link->device, &tf); @@ -843,7 +808,7 @@ static int sata_fsl_softreset(struct ata_link *link, unsigned int *class, SRST_CMD | CMD_DESC_SNOOP_ENABLE, 0, 0, 5); tf.ctl |= ATA_SRST; /* setup SRST bit in taskfile control reg */ - ata_tf_to_fis(&tf, pmp, 0, cfis); + ata_tf_to_fis(&tf, 0, 0, cfis); DPRINTK("Dumping cfis : 0x%x, 0x%x, 0x%x, 0x%x\n", cfis[0], cfis[1], cfis[2], cfis[3]); @@ -889,10 +854,8 @@ static int sata_fsl_softreset(struct ata_link *link, unsigned int *class, sata_fsl_setup_cmd_hdr_entry(pp, 0, CMD_DESC_SNOOP_ENABLE, 0, 0, 5); tf.ctl &= ~ATA_SRST; /* 2nd H2D Ctl. register FIS */ - ata_tf_to_fis(&tf, pmp, 0, cfis); + ata_tf_to_fis(&tf, 0, 0, cfis); - if (pmp != SATA_PMP_CTRL_PORT) - iowrite32(pmp, CQPMP + hcr_base); iowrite32(1, CQ + hcr_base); msleep(150); /* ?? */ @@ -923,21 +886,12 @@ static int sata_fsl_softreset(struct ata_link *link, unsigned int *class, VPRINTK("cereg = 0x%x\n", ioread32(hcr_base + CE)); } -out: return 0; err: return -EIO; } -static void sata_fsl_error_handler(struct ata_port *ap) -{ - - DPRINTK("in xx_error_handler\n"); - sata_pmp_error_handler(ap); - -} - static void sata_fsl_post_internal_cmd(struct ata_queued_cmd *qc) { if (qc->flags & ATA_QCFLAG_FAILED) @@ -951,21 +905,18 @@ static void sata_fsl_post_internal_cmd(struct ata_queued_cmd *qc) static void sata_fsl_error_intr(struct ata_port *ap) { + struct ata_link *link = &ap->link; + struct ata_eh_info *ehi = &link->eh_info; struct sata_fsl_host_priv *host_priv = ap->host->private_data; void __iomem *hcr_base = host_priv->hcr_base; - u32 hstatus, dereg=0, cereg = 0, SError = 0; + u32 hstatus, dereg, cereg = 0, SError = 0; unsigned int err_mask = 0, action = 0; - int freeze = 0, abort=0; - struct ata_link *link = NULL; - struct ata_queued_cmd *qc = NULL; - struct ata_eh_info *ehi; + struct ata_queued_cmd *qc; + int freeze = 0; hstatus = ioread32(hcr_base + HSTATUS); cereg = ioread32(hcr_base + CE); - /* first, analyze and record host port events */ - link = &ap->link; - ehi = &link->eh_info; ata_ehi_clear_desc(ehi); /* @@ -975,41 +926,12 @@ static void sata_fsl_error_intr(struct ata_port *ap) sata_fsl_scr_read(ap, SCR_ERROR, &SError); if (unlikely(SError & 0xFFFF0000)) { sata_fsl_scr_write(ap, SCR_ERROR, SError); + err_mask |= AC_ERR_ATA_BUS; } DPRINTK("error_intr,hStat=0x%x,CE=0x%x,DE =0x%x,SErr=0x%x\n", hstatus, cereg, ioread32(hcr_base + DE), SError); - /* handle fatal errors */ - if (hstatus & FATAL_ERROR_DECODE) { - ehi->err_mask |= AC_ERR_ATA_BUS; - ehi->action |= ATA_EH_SOFTRESET; - - /* - * Ignore serror in case of fatal errors as we always want - * to do a soft-reset of the FSL SATA controller. Analyzing - * serror may cause libata to schedule a hard-reset action, - * and hard-reset currently does not do controller - * offline/online, causing command timeouts and leads to an - * un-recoverable state, hence make libATA ignore - * autopsy in case of fatal errors. - */ - - ehi->flags |= ATA_EHI_NO_AUTOPSY; - - freeze = 1; - } - - /* Handle PHYRDY change notification */ - if (hstatus & INT_ON_PHYRDY_CHG) { - DPRINTK("SATA FSL: PHYRDY change indication\n"); - - /* Setup a soft-reset EH action */ - ata_ehi_hotplugged(ehi); - ata_ehi_push_desc(ehi, "%s", "PHY RDY changed"); - freeze = 1; - } - /* handle single device errors */ if (cereg) { /* @@ -1021,68 +943,58 @@ static void sata_fsl_error_intr(struct ata_port *ap) * clearing the device error, we can issue commands to the * device to interrogate it to find the source of the error. */ - abort = 1; + dereg = ioread32(hcr_base + DE); + iowrite32(dereg, hcr_base + DE); + iowrite32(cereg, hcr_base + CE); DPRINTK("single device error, CE=0x%x, DE=0x%x\n", ioread32(hcr_base + CE), ioread32(hcr_base + DE)); + /* + * We should consider this as non fatal error, and TF must + * be updated as done below. + */ - /* find out the offending link and qc */ - if (ap->nr_pmp_links) { - dereg = ioread32(hcr_base + DE); - iowrite32(dereg, hcr_base + DE); - iowrite32(cereg, hcr_base + CE); - - if (dereg < ap->nr_pmp_links) { - link = &ap->pmp_link[dereg]; - ehi = &link->eh_info; - qc = ata_qc_from_tag(ap, link->active_tag); - /* - * We should consider this as non fatal error, - * and TF must be updated as done below. - */ - - err_mask |= AC_ERR_DEV; - - } else { - err_mask |= AC_ERR_HSM; - action |= ATA_EH_HARDRESET; - freeze = 1; - } - } else { - dereg = ioread32(hcr_base + DE); - iowrite32(dereg, hcr_base + DE); - iowrite32(cereg, hcr_base + CE); - - qc = ata_qc_from_tag(ap, link->active_tag); - /* - * We should consider this as non fatal error, - * and TF must be updated as done below. - */ - err_mask |= AC_ERR_DEV; - } + err_mask |= AC_ERR_DEV; + } + + /* handle fatal errors */ + if (hstatus & FATAL_ERROR_DECODE) { + err_mask |= AC_ERR_ATA_BUS; + action |= ATA_EH_RESET; + /* how will fatal error interrupts be completed ?? */ + freeze = 1; + } + + /* Handle PHYRDY change notification */ + if (hstatus & INT_ON_PHYRDY_CHG) { + DPRINTK("SATA FSL: PHYRDY change indication\n"); + + /* Setup a soft-reset EH action */ + ata_ehi_hotplugged(ehi); + freeze = 1; } /* record error info */ - if (qc) { + qc = ata_qc_from_tag(ap, link->active_tag); + + if (qc) qc->err_mask |= err_mask; - } else + else ehi->err_mask |= err_mask; ehi->action |= action; + ehi->serror |= SError; /* freeze or abort */ if (freeze) ata_port_freeze(ap); - else if (abort) { - if (qc) - ata_link_abort(qc->dev->link); - else - ata_port_abort(ap); - } + else + ata_port_abort(ap); } static void sata_fsl_host_intr(struct ata_port *ap) { + struct ata_link *link = &ap->link; struct sata_fsl_host_priv *host_priv = ap->host->private_data; void __iomem *hcr_base = host_priv->hcr_base; u32 hstatus, qc_active = 0; @@ -1105,19 +1017,10 @@ static void sata_fsl_host_intr(struct ata_port *ap) return; } - /* Read command completed register */ - qc_active = ioread32(hcr_base + CC); - - VPRINTK("Status of all queues :\n"); - VPRINTK("qc_active/CC = 0x%x, CA = 0x%x, CE=0x%x,CQ=0x%x,apqa=0x%x\n", - qc_active, - ioread32(hcr_base + CA), - ioread32(hcr_base + CE), - ioread32(hcr_base + CQ), - ap->qc_active); - - if (qc_active & ap->qc_active) { + if (link->sactive) { /* only true for NCQ commands */ int i; + /* Read command completed register */ + qc_active = ioread32(hcr_base + CC); /* clear CC bit, this will also complete the interrupt */ iowrite32(qc_active, hcr_base + CC); @@ -1129,9 +1032,8 @@ static void sata_fsl_host_intr(struct ata_port *ap) for (i = 0; i < SATA_FSL_QUEUE_DEPTH; i++) { if (qc_active & (1 << i)) { qc = ata_qc_from_tag(ap, i); - if (qc) { + if (qc) ata_qc_complete(qc); - } DPRINTK ("completing ncq cmd,tag=%d,CC=0x%x,CA=0x%x\n", i, ioread32(hcr_base + CC), @@ -1140,21 +1042,19 @@ static void sata_fsl_host_intr(struct ata_port *ap) } return; - } else if ((ap->qc_active & (1 << ATA_TAG_INTERNAL))) { + } else if (ap->qc_active) { iowrite32(1, hcr_base + CC); - qc = ata_qc_from_tag(ap, ATA_TAG_INTERNAL); + qc = ata_qc_from_tag(ap, link->active_tag); - DPRINTK("completing non-ncq cmd, CC=0x%x\n", - ioread32(hcr_base + CC)); + DPRINTK("completing non-ncq cmd, tag=%d,CC=0x%x\n", + link->active_tag, ioread32(hcr_base + CC)); - if (qc) { + if (qc) ata_qc_complete(qc); - } } else { /* Spurious Interrupt!! */ DPRINTK("spurious interrupt!!, CC = 0x%x\n", ioread32(hcr_base + CC)); - iowrite32(qc_active, hcr_base + CC); return; } } @@ -1230,6 +1130,9 @@ static int sata_fsl_init_controller(struct ata_host *host) iowrite32(0x00000FFFF, hcr_base + CE); iowrite32(0x00000FFFF, hcr_base + DE); + /* initially assuming no Port multiplier, set CQPMP to 0 */ + iowrite32(0x0, hcr_base + CQPMP); + /* * host controller will be brought on-line, during xx_port_start() * callback, that should also initiate the OOB, COMINIT sequence @@ -1251,8 +1154,8 @@ static struct scsi_host_template sata_fsl_sht = { .dma_boundary = ATA_DMA_BOUNDARY, }; -static struct ata_port_operations sata_fsl_ops = { - .inherits = &sata_pmp_port_ops, +static const struct ata_port_operations sata_fsl_ops = { + .inherits = &sata_port_ops, .qc_prep = sata_fsl_qc_prep, .qc_issue = sata_fsl_qc_issue, @@ -1265,15 +1168,10 @@ static struct ata_port_operations sata_fsl_ops = { .thaw = sata_fsl_thaw, .prereset = sata_fsl_prereset, .softreset = sata_fsl_softreset, - .pmp_softreset = sata_fsl_softreset, - .error_handler = sata_fsl_error_handler, .post_internal_cmd = sata_fsl_post_internal_cmd, .port_start = sata_fsl_port_start, .port_stop = sata_fsl_port_stop, - - .pmp_attach = sata_fsl_pmp_attach, - .pmp_detach = sata_fsl_pmp_detach, }; static const struct ata_port_info sata_fsl_port_info[] = { diff --git a/trunk/drivers/ata/sata_mv.c b/trunk/drivers/ata/sata_mv.c index acf347f71a2f..fb81f0c7a8c2 100644 --- a/trunk/drivers/ata/sata_mv.c +++ b/trunk/drivers/ata/sata_mv.c @@ -72,7 +72,7 @@ #include #define DRV_NAME "sata_mv" -#define DRV_VERSION "1.24" +#define DRV_VERSION "1.21" enum { /* BAR's are enumerated in terms of pci_resource_start() terms */ @@ -122,6 +122,8 @@ 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 | @@ -354,12 +356,12 @@ enum { MV_HP_ERRATA_50XXB2 = (1 << 2), MV_HP_ERRATA_60X1B2 = (1 << 3), MV_HP_ERRATA_60X1C0 = (1 << 4), + MV_HP_ERRATA_XX42A0 = (1 << 5), MV_HP_GEN_I = (1 << 6), /* Generation I: 50xx */ MV_HP_GEN_II = (1 << 7), /* Generation II: 60xx */ 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? */ @@ -372,7 +374,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 IS_SOC(hpriv) ((hpriv)->hp_flags & MV_HP_FLAG_SOC) +#define HAS_PCI(host) (!((host)->ports[0]->flags & MV_FLAG_SOC)) #define WINDOW_CTRL(i) (0x20030 + ((i) << 4)) #define WINDOW_BASE(i) (0x20034 + ((i) << 4)) @@ -650,7 +652,7 @@ static const struct ata_port_info mv_port_info[] = { .port_ops = &mv_iie_ops, }, { /* chip_soc */ - .flags = MV_GENIIE_FLAGS, + .flags = MV_GENIIE_FLAGS | MV_FLAG_SOC, .pio_mask = 0x1f, /* pio0-4 */ .udma_mask = ATA_UDMA6, .port_ops = &mv_iie_ops, @@ -810,7 +812,12 @@ static void mv_set_edma_ptrs(void __iomem *port_mmio, writel((pp->crqb_dma >> 16) >> 16, port_mmio + EDMA_REQ_Q_BASE_HI_OFS); writelfl((pp->crqb_dma & EDMA_REQ_Q_BASE_LO_MASK) | index, port_mmio + EDMA_REQ_Q_IN_PTR_OFS); - writelfl(index, port_mmio + EDMA_REQ_Q_OUT_PTR_OFS); + + if (hpriv->hp_flags & MV_HP_ERRATA_XX42A0) + writelfl((pp->crqb_dma & 0xffffffff) | index, + port_mmio + EDMA_REQ_Q_OUT_PTR_OFS); + else + writelfl(index, port_mmio + EDMA_REQ_Q_OUT_PTR_OFS); /* * initialize response queue @@ -820,7 +827,13 @@ static void mv_set_edma_ptrs(void __iomem *port_mmio, WARN_ON(pp->crpb_dma & 0xff); writel((pp->crpb_dma >> 16) >> 16, port_mmio + EDMA_RSP_Q_BASE_HI_OFS); - writelfl(index, port_mmio + EDMA_RSP_Q_IN_PTR_OFS); + + if (hpriv->hp_flags & MV_HP_ERRATA_XX42A0) + writelfl((pp->crpb_dma & 0xffffffff) | index, + port_mmio + EDMA_RSP_Q_IN_PTR_OFS); + else + writelfl(index, port_mmio + EDMA_RSP_Q_IN_PTR_OFS); + writelfl((pp->crpb_dma & EDMA_RSP_Q_BASE_LO_MASK) | index, port_mmio + EDMA_RSP_Q_OUT_PTR_OFS); } @@ -1241,7 +1254,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 (!IS_SOC(hpriv)) + if (HAS_PCI(ap->host)) cfg |= (1 << 18); /* enab early completion */ if (hpriv->hp_flags & MV_HP_CUT_THROUGH) cfg |= (1 << 17); /* enab cut-thru (dis stor&forwrd) */ @@ -2212,7 +2225,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) && !IS_SOC(hpriv))) + if (unlikely((pending_irqs & PCI_ERR) && HAS_PCI(host))) handled = mv_pci_error(host, hpriv->base); else handled = mv_host_intr(host, pending_irqs); @@ -2534,7 +2547,7 @@ static void mv6_phy_errata(struct mv_host_priv *hpriv, void __iomem *mmio, hp_flags & (MV_HP_ERRATA_60X1B2 | MV_HP_ERRATA_60X1C0); int fix_phy_mode4 = hp_flags & (MV_HP_ERRATA_60X1B2 | MV_HP_ERRATA_60X1C0); - u32 m2, m3; + u32 m2, tmp; if (fix_phy_mode2) { m2 = readl(port_mmio + PHY_MODE2); @@ -2551,37 +2564,28 @@ static void mv6_phy_errata(struct mv_host_priv *hpriv, void __iomem *mmio, udelay(200); } - /* - * Gen-II/IIe PHY_MODE3 errata RM#2: - * Achieves better receiver noise performance than the h/w default: - */ - m3 = readl(port_mmio + PHY_MODE3); - m3 = (m3 & 0x1f) | (0x5555601 << 5); - - /* Guideline 88F5182 (GL# SATA-S11) */ - if (IS_SOC(hpriv)) - m3 &= ~0x1c; + /* who knows what this magic does */ + tmp = readl(port_mmio + PHY_MODE3); + tmp &= ~0x7F800000; + tmp |= 0x2A800000; + writel(tmp, port_mmio + PHY_MODE3); if (fix_phy_mode4) { u32 m4; m4 = readl(port_mmio + PHY_MODE4); + if (hp_flags & MV_HP_ERRATA_60X1B2) + tmp = readl(port_mmio + PHY_MODE3); + /* workaround for errata FEr SATA#10 (part 1) */ m4 = (m4 & ~(1 << 1)) | (1 << 0); - /* enforce bit restrictions on GenIIe devices */ - if (IS_GEN_IIE(hpriv)) - m4 = (m4 & ~0x5DE3FFFC) | (1 << 2); - writel(m4, port_mmio + PHY_MODE4); + + if (hp_flags & MV_HP_ERRATA_60X1B2) + writel(tmp, port_mmio + PHY_MODE3); } - /* - * Workaround for 60x1-B2 errata SATA#13: - * Any write to PHY_MODE4 (above) may corrupt PHY_MODE3, - * so we must always rewrite PHY_MODE3 after PHY_MODE4. - */ - writel(m3, port_mmio + PHY_MODE3); /* Revert values of pre-emphasis and signal amps to the saved ones */ m2 = readl(port_mmio + PHY_MODE2); @@ -2872,7 +2876,7 @@ static unsigned int mv_in_pcix_mode(struct ata_host *host) void __iomem *mmio = hpriv->base; u32 reg; - if (IS_SOC(hpriv) || !IS_PCIE(hpriv)) + if (!HAS_PCI(host) || !IS_PCIE(hpriv)) return 0; /* not PCI-X capable */ reg = readl(mmio + MV_PCI_MODE_OFS); if ((reg & MV_PCI_MODE_MASK) == 0) @@ -2999,7 +3003,10 @@ static int mv_chip_id(struct ata_host *host, unsigned int board_idx) hp_flags |= MV_HP_CUT_THROUGH; switch (pdev->revision) { - case 0x2: /* Rev.B0: the first/only public release */ + case 0x0: + hp_flags |= MV_HP_ERRATA_XX42A0; + break; + case 0x1: hp_flags |= MV_HP_ERRATA_60X1C0; break; default: @@ -3011,7 +3018,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_FLAG_SOC | MV_HP_ERRATA_60X1C0; + hp_flags |= MV_HP_ERRATA_60X1C0; break; default: @@ -3055,12 +3062,12 @@ static int mv_init_host(struct ata_host *host, unsigned int board_idx) if (rc) goto done; - 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 { + 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 { + hpriv->main_irq_cause_addr = mmio + SOC_HC_MAIN_IRQ_CAUSE_OFS; + hpriv->main_irq_mask_addr = mmio + SOC_HC_MAIN_IRQ_MASK_OFS; } /* global interrupt mask: 0 == mask everything */ @@ -3086,7 +3093,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 (!IS_SOC(hpriv)) { + if (HAS_PCI(host)) { 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"); @@ -3106,7 +3113,7 @@ static int mv_init_host(struct ata_host *host, unsigned int board_idx) writelfl(0, hc_mmio + HC_IRQ_CAUSE_OFS); } - if (!IS_SOC(hpriv)) { + if (HAS_PCI(host)) { /* Clear any currently outstanding host interrupt conditions */ writelfl(0, mmio + hpriv->irq_cause_ofs); diff --git a/trunk/drivers/base/core.c b/trunk/drivers/base/core.c index 422cfcad486d..72eccae4904b 100644 --- a/trunk/drivers/base/core.c +++ b/trunk/drivers/base/core.c @@ -759,21 +759,6 @@ static void device_remove_class_symlinks(struct device *dev) sysfs_remove_link(&dev->kobj, "subsystem"); } -/** - * dev_set_name - set a device name - * @dev: device - */ -int dev_set_name(struct device *dev, const char *fmt, ...) -{ - va_list vargs; - - va_start(vargs, fmt); - vsnprintf(dev->bus_id, sizeof(dev->bus_id), fmt, vargs); - va_end(vargs); - return 0; -} -EXPORT_SYMBOL_GPL(dev_set_name); - /** * device_add - add device to device hierarchy. * @dev: device. 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/cpufreq/cpufreq.c b/trunk/drivers/cpufreq/cpufreq.c index 86f0a2430624..7fce038fa57e 100644 --- a/trunk/drivers/cpufreq/cpufreq.c +++ b/trunk/drivers/cpufreq/cpufreq.c @@ -928,13 +928,13 @@ static int cpufreq_add_dev(struct sys_device *sys_dev) policy->user_policy.policy = policy->policy; policy->user_policy.governor = policy->governor; + unlock_policy_rwsem_write(cpu); + if (ret) { dprintk("setting policy failed\n"); goto err_out_unregister; } - unlock_policy_rwsem_write(cpu); - kobject_uevent(&policy->kobj, KOBJ_ADD); module_put(cpufreq_driver->owner); dprintk("initialization complete\n"); diff --git a/trunk/drivers/hwmon/ibmaem.c b/trunk/drivers/hwmon/ibmaem.c index c9416e657487..5c006c9a4311 100644 --- a/trunk/drivers/hwmon/ibmaem.c +++ b/trunk/drivers/hwmon/ibmaem.c @@ -189,8 +189,8 @@ static struct aem_iana_id system_x_id = { struct aem_find_firmware_req { struct aem_iana_id id; u8 rsvd; - __be16 index; - __be16 module_type_id; + u16 index; + u16 module_type_id; } __packed; struct aem_find_firmware_resp { @@ -202,7 +202,7 @@ struct aem_find_firmware_resp { struct aem_find_instance_req { struct aem_iana_id id; u8 instance_number; - __be16 module_type_id; + u16 module_type_id; } __packed; struct aem_find_instance_resp { @@ -444,17 +444,17 @@ static int aem_read_sensor(struct aem_data *data, u8 elt, u8 reg, } case 2: { u16 *x = buf; - *x = be16_to_cpup((__be16 *)rs_resp->bytes); + *x = be16_to_cpup((u16 *)rs_resp->bytes); break; } case 4: { u32 *x = buf; - *x = be32_to_cpup((__be32 *)rs_resp->bytes); + *x = be32_to_cpup((u32 *)rs_resp->bytes); break; } case 8: { u64 *x = buf; - *x = be64_to_cpup((__be64 *)rs_resp->bytes); + *x = be64_to_cpup((u64 *)rs_resp->bytes); break; } } 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/misc/kgdbts.c b/trunk/drivers/misc/kgdbts.c index fa394104339c..2763ae086531 100644 --- a/trunk/drivers/misc/kgdbts.c +++ b/trunk/drivers/misc/kgdbts.c @@ -119,7 +119,6 @@ } while (0) #define MAX_CONFIG_LEN 40 -static const char hexchars[] = "0123456789abcdef"; static struct kgdb_io kgdbts_io_ops; static char get_buf[BUFMAX]; static int get_buf_cnt; @@ -619,8 +618,8 @@ static void fill_get_buf(char *buf) count++; } strcat(get_buf, "#"); - get_buf[count + 2] = hexchars[checksum >> 4]; - get_buf[count + 3] = hexchars[checksum & 0xf]; + get_buf[count + 2] = hex_asc_hi(checksum); + get_buf[count + 3] = hex_asc_lo(checksum); get_buf[count + 4] = '\0'; v2printk("get%i: %s\n", ts.idx, get_buf); } diff --git a/trunk/drivers/misc/thinkpad_acpi.c b/trunk/drivers/misc/thinkpad_acpi.c index a0ce0b2fa03e..3f28f6eabdbf 100644 --- a/trunk/drivers/misc/thinkpad_acpi.c +++ b/trunk/drivers/misc/thinkpad_acpi.c @@ -3821,7 +3821,7 @@ TPACPI_HANDLE(led, ec, "SLED", /* 570 */ #define TPACPI_LED_NUMLEDS 8 static struct tpacpi_led_classdev *tpacpi_leds; static enum led_status_t tpacpi_led_state_cache[TPACPI_LED_NUMLEDS]; -static const char * const tpacpi_led_names[TPACPI_LED_NUMLEDS] = { +static const char const *tpacpi_led_names[TPACPI_LED_NUMLEDS] = { /* there's a limit of 19 chars + NULL before 2.6.26 */ "tpacpi::power", "tpacpi:orange:batt", @@ -3860,10 +3860,10 @@ static int led_get_status(unsigned int led) static int led_set_status(unsigned int led, enum led_status_t ledstatus) { /* off, on, blink. Index is led_status_t */ - static const int led_sled_arg1[] = { 0, 1, 3 }; - static const int led_exp_hlbl[] = { 0, 0, 1 }; /* led# * */ - static const int led_exp_hlcl[] = { 0, 1, 1 }; /* led# * */ - static const int led_led_arg1[] = { 0, 0x80, 0xc0 }; + static const int const led_sled_arg1[] = { 0, 1, 3 }; + static const int const led_exp_hlbl[] = { 0, 0, 1 }; /* led# * */ + static const int const led_exp_hlcl[] = { 0, 1, 1 }; /* led# * */ + static const int const led_led_arg1[] = { 0, 0x80, 0xc0 }; int rc = 0; diff --git a/trunk/drivers/net/s2io.c b/trunk/drivers/net/s2io.c index b5c1e663417d..a20693e09ae8 100644 --- a/trunk/drivers/net/s2io.c +++ b/trunk/drivers/net/s2io.c @@ -2861,8 +2861,7 @@ static int s2io_poll_msix(struct napi_struct *napi, int budget) struct config_param *config; struct mac_info *mac_control; int pkts_processed = 0; - u8 __iomem *addr = NULL; - u8 val8 = 0; + u8 *addr = NULL, val8 = 0; struct s2io_nic *nic = dev->priv; struct XENA_dev_config __iomem *bar0 = nic->bar0; int budget_org = budget; @@ -2879,7 +2878,7 @@ static int s2io_poll_msix(struct napi_struct *napi, int budget) if (pkts_processed < budget_org) { netif_rx_complete(dev, napi); /*Re Enable MSI-Rx Vector*/ - addr = (u8 __iomem *)&bar0->xmsi_mask_reg; + addr = (u8 *)&bar0->xmsi_mask_reg; addr += 7 - ring->ring_no; val8 = (ring->ring_no == 0) ? 0x3f : 0xbf; writeb(val8, addr); @@ -4365,10 +4364,9 @@ static irqreturn_t s2io_msix_ring_handle(int irq, void *dev_id) return IRQ_HANDLED; if (sp->config.napi) { - u8 __iomem *addr = NULL; - u8 val8 = 0; + u8 *addr = NULL, val8 = 0; - addr = (u8 __iomem *)&bar0->xmsi_mask_reg; + addr = (u8 *)&bar0->xmsi_mask_reg; addr += (7 - ring->ring_no); val8 = (ring->ring_no == 0) ? 0x7f : 0xff; writeb(val8, addr); diff --git a/trunk/drivers/net/wireless/b43/b43.h b/trunk/drivers/net/wireless/b43/b43.h index dfa4bdd5597c..37783cdd301a 100644 --- a/trunk/drivers/net/wireless/b43/b43.h +++ b/trunk/drivers/net/wireless/b43/b43.h @@ -737,7 +737,6 @@ struct b43_wl { struct ieee80211_tx_control beacon_txctl; bool beacon0_uploaded; bool beacon1_uploaded; - bool beacon_templates_virgin; /* Never wrote the templates? */ struct work_struct beacon_update_trigger; /* The current QOS parameters for the 4 queues. diff --git a/trunk/drivers/net/wireless/b43/main.c b/trunk/drivers/net/wireless/b43/main.c index 6c3d9ea0a9f8..8fdba9415c04 100644 --- a/trunk/drivers/net/wireless/b43/main.c +++ b/trunk/drivers/net/wireless/b43/main.c @@ -1544,30 +1544,6 @@ static void b43_write_probe_resp_template(struct b43_wldev *dev, kfree(probe_resp_data); } -static void b43_upload_beacon0(struct b43_wldev *dev) -{ - struct b43_wl *wl = dev->wl; - - if (wl->beacon0_uploaded) - return; - b43_write_beacon_template(dev, 0x68, 0x18); - /* FIXME: Probe resp upload doesn't really belong here, - * but we don't use that feature anyway. */ - b43_write_probe_resp_template(dev, 0x268, 0x4A, - &__b43_ratetable[3]); - wl->beacon0_uploaded = 1; -} - -static void b43_upload_beacon1(struct b43_wldev *dev) -{ - struct b43_wl *wl = dev->wl; - - if (wl->beacon1_uploaded) - return; - b43_write_beacon_template(dev, 0x468, 0x1A); - wl->beacon1_uploaded = 1; -} - static void handle_irq_beacon(struct b43_wldev *dev) { struct b43_wl *wl = dev->wl; @@ -1592,27 +1568,24 @@ static void handle_irq_beacon(struct b43_wldev *dev) return; } - if (unlikely(wl->beacon_templates_virgin)) { - /* We never uploaded a beacon before. - * Upload both templates now, but only mark one valid. */ - wl->beacon_templates_virgin = 0; - b43_upload_beacon0(dev); - b43_upload_beacon1(dev); + if (!beacon0_valid) { + if (!wl->beacon0_uploaded) { + b43_write_beacon_template(dev, 0x68, 0x18); + b43_write_probe_resp_template(dev, 0x268, 0x4A, + &__b43_ratetable[3]); + wl->beacon0_uploaded = 1; + } cmd = b43_read32(dev, B43_MMIO_MACCMD); cmd |= B43_MACCMD_BEACON0_VALID; b43_write32(dev, B43_MMIO_MACCMD, cmd); - } else { - if (!beacon0_valid) { - b43_upload_beacon0(dev); - cmd = b43_read32(dev, B43_MMIO_MACCMD); - cmd |= B43_MACCMD_BEACON0_VALID; - b43_write32(dev, B43_MMIO_MACCMD, cmd); - } else if (!beacon1_valid) { - b43_upload_beacon1(dev); - cmd = b43_read32(dev, B43_MMIO_MACCMD); - cmd |= B43_MACCMD_BEACON1_VALID; - b43_write32(dev, B43_MMIO_MACCMD, cmd); + } else if (!beacon1_valid) { + if (!wl->beacon1_uploaded) { + b43_write_beacon_template(dev, 0x468, 0x1A); + wl->beacon1_uploaded = 1; } + cmd = b43_read32(dev, B43_MMIO_MACCMD); + cmd |= B43_MACCMD_BEACON1_VALID; + b43_write32(dev, B43_MMIO_MACCMD, cmd); } } @@ -4100,9 +4073,6 @@ static int b43_op_start(struct ieee80211_hw *hw) wl->filter_flags = 0; wl->radiotap_enabled = 0; b43_qos_clear(wl); - wl->beacon0_uploaded = 0; - wl->beacon1_uploaded = 0; - wl->beacon_templates_virgin = 1; /* First register RFkill. * LEDs that are registered later depend on it. */ @@ -4271,9 +4241,7 @@ static void b43_chip_reset(struct work_struct *work) goto out; } } -out: - if (err) - wl->current_dev = NULL; /* Failed to init the dev. */ + out: mutex_unlock(&wl->mutex); if (err) b43err(wl, "Controller restart FAILED\n"); @@ -4414,11 +4382,9 @@ static void b43_one_core_detach(struct ssb_device *dev) struct b43_wldev *wldev; struct b43_wl *wl; - /* Do not cancel ieee80211-workqueue based work here. - * See comment in b43_remove(). */ - wldev = ssb_get_drvdata(dev); wl = wldev->wl; + cancel_work_sync(&wldev->restart_work); b43_debugfs_remove_device(wldev); b43_wireless_core_detach(wldev); list_del(&wldev->list); @@ -4603,10 +4569,6 @@ static void b43_remove(struct ssb_device *dev) struct b43_wl *wl = ssb_get_devtypedata(dev); struct b43_wldev *wldev = ssb_get_drvdata(dev); - /* We must cancel any work here before unregistering from ieee80211, - * as the ieee80211 unreg will destroy the workqueue. */ - cancel_work_sync(&wldev->restart_work); - B43_WARN_ON(!wl); if (wl->current_dev == wldev) ieee80211_unregister_hw(wl->hw); diff --git a/trunk/drivers/net/wireless/iwlwifi/iwl-4965-rs.c b/trunk/drivers/net/wireless/iwlwifi/iwl-4965-rs.c index 3a7f0cb710ec..c9847b1a67f7 100644 --- a/trunk/drivers/net/wireless/iwlwifi/iwl-4965-rs.c +++ b/trunk/drivers/net/wireless/iwlwifi/iwl-4965-rs.c @@ -1162,6 +1162,7 @@ static s32 rs_get_best_rate(struct iwl_priv *priv, /* Higher rate not available, use the original */ } else { + new_rate = rate; break; } } @@ -2008,7 +2009,7 @@ static void rs_rate_scale_perform(struct iwl_priv *priv, * 2) Not just finishing up a search * 3) Allowing a new search */ - if (!update_lq && !done_search && !lq_sta->stay_in_tbl && window->counter) { + if (!update_lq && !done_search && !lq_sta->stay_in_tbl) { /* Save current throughput to compare with "search" throughput*/ lq_sta->last_tpt = current_tpt; diff --git a/trunk/drivers/net/wireless/rndis_wlan.c b/trunk/drivers/net/wireless/rndis_wlan.c index 18c9931e3267..d0b1fb15c709 100644 --- a/trunk/drivers/net/wireless/rndis_wlan.c +++ b/trunk/drivers/net/wireless/rndis_wlan.c @@ -116,7 +116,6 @@ MODULE_PARM_DESC(workaround_interval, #define OID_802_11_ENCRYPTION_STATUS ccpu2(0x0d01011b) #define OID_802_11_ADD_KEY ccpu2(0x0d01011d) #define OID_802_11_REMOVE_KEY ccpu2(0x0d01011e) -#define OID_802_11_ASSOCIATION_INFORMATION ccpu2(0x0d01011f) #define OID_802_11_PMKID ccpu2(0x0d010123) #define OID_802_11_NETWORK_TYPES_SUPPORTED ccpu2(0x0d010203) #define OID_802_11_NETWORK_TYPE_IN_USE ccpu2(0x0d010204) @@ -272,26 +271,6 @@ struct ndis_config_param { __le32 value_length; } __attribute__((packed)); -struct ndis_80211_assoc_info { - __le32 length; - __le16 req_ies; - struct req_ie { - __le16 capa; - __le16 listen_interval; - u8 cur_ap_address[6]; - } req_ie; - __le32 req_ie_length; - __le32 offset_req_ies; - __le16 resp_ies; - struct resp_ie { - __le16 capa; - __le16 status_code; - __le16 assoc_id; - } resp_ie; - __le32 resp_ie_length; - __le32 offset_resp_ies; -} __attribute__((packed)); - /* these have to match what is in wpa_supplicant */ enum wpa_alg { WPA_ALG_NONE, WPA_ALG_WEP, WPA_ALG_TKIP, WPA_ALG_CCMP }; enum wpa_cipher { CIPHER_NONE, CIPHER_WEP40, CIPHER_TKIP, CIPHER_CCMP, @@ -695,12 +674,6 @@ static int get_bssid(struct usbnet *usbdev, u8 bssid[ETH_ALEN]) return ret; } -static int get_association_info(struct usbnet *usbdev, - struct ndis_80211_assoc_info *info, int len) -{ - return rndis_query_oid(usbdev, OID_802_11_ASSOCIATION_INFORMATION, - info, &len); -} static int is_associated(struct usbnet *usbdev) { @@ -2209,40 +2182,11 @@ static void rndis_wext_worker(struct work_struct *work) struct usbnet *usbdev = priv->usbdev; union iwreq_data evt; unsigned char bssid[ETH_ALEN]; - struct ndis_80211_assoc_info *info; - int assoc_size = sizeof(*info) + IW_CUSTOM_MAX + 32; - int ret, offset; + int ret; if (test_and_clear_bit(WORK_CONNECTION_EVENT, &priv->work_pending)) { - info = kzalloc(assoc_size, GFP_KERNEL); - if (!info) - goto get_bssid; - - /* Get association info IEs from device and send them back to - * userspace. */ - ret = get_association_info(usbdev, info, assoc_size); - if (!ret) { - evt.data.length = le32_to_cpu(info->req_ie_length); - if (evt.data.length > 0) { - offset = le32_to_cpu(info->offset_req_ies); - wireless_send_event(usbdev->net, - IWEVASSOCREQIE, &evt, - (char *)info + offset); - } - - evt.data.length = le32_to_cpu(info->resp_ie_length); - if (evt.data.length > 0) { - offset = le32_to_cpu(info->offset_resp_ies); - wireless_send_event(usbdev->net, - IWEVASSOCRESPIE, &evt, - (char *)info + offset); - } - } - - kfree(info); - -get_bssid: ret = get_bssid(usbdev, bssid); + if (!ret) { evt.data.flags = 0; evt.data.length = 0; @@ -2470,11 +2414,6 @@ static int bcm4320_early_init(struct usbnet *dev) else if (priv->param_power_save > 2) priv->param_power_save = 2; - if (priv->param_power_output < 0) - priv->param_power_output = 0; - else if (priv->param_power_output > 3) - priv->param_power_output = 3; - if (priv->param_roamtrigger < -80) priv->param_roamtrigger = -80; else if (priv->param_roamtrigger > -60) diff --git a/trunk/drivers/net/wireless/rt2x00/rt2x00.h b/trunk/drivers/net/wireless/rt2x00/rt2x00.h index 611d98320593..57bdc153952f 100644 --- a/trunk/drivers/net/wireless/rt2x00/rt2x00.h +++ b/trunk/drivers/net/wireless/rt2x00/rt2x00.h @@ -328,11 +328,6 @@ static inline int rt2x00_get_link_ant_rssi(struct link *link) return DEFAULT_RSSI; } -static inline void rt2x00_reset_link_ant_rssi(struct link *link) -{ - link->ant.rssi_ant = 0; -} - static inline int rt2x00_get_link_ant_rssi_history(struct link *link, enum antenna ant) { diff --git a/trunk/drivers/net/wireless/rt2x00/rt2x00config.c b/trunk/drivers/net/wireless/rt2x00/rt2x00config.c index 48608e8cc8b4..a9930a03f450 100644 --- a/trunk/drivers/net/wireless/rt2x00/rt2x00config.c +++ b/trunk/drivers/net/wireless/rt2x00/rt2x00config.c @@ -129,7 +129,6 @@ void rt2x00lib_config_antenna(struct rt2x00_dev *rt2x00dev, */ rt2x00dev->ops->lib->config(rt2x00dev, &libconf, CONFIG_UPDATE_ANTENNA); rt2x00lib_reset_link_tuner(rt2x00dev); - rt2x00_reset_link_ant_rssi(&rt2x00dev->link); rt2x00dev->link.ant.active.rx = libconf.ant.rx; rt2x00dev->link.ant.active.tx = libconf.ant.tx; diff --git a/trunk/drivers/net/wireless/rt2x00/rt2x00dev.c b/trunk/drivers/net/wireless/rt2x00/rt2x00dev.c index 2673d568bcac..b22c02737185 100644 --- a/trunk/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/trunk/drivers/net/wireless/rt2x00/rt2x00dev.c @@ -483,9 +483,9 @@ void rt2x00lib_beacondone(struct rt2x00_dev *rt2x00dev) if (!test_bit(DEVICE_ENABLED_RADIO, &rt2x00dev->flags)) return; - ieee80211_iterate_active_interfaces_atomic(rt2x00dev->hw, - rt2x00lib_beacondone_iter, - rt2x00dev); + ieee80211_iterate_active_interfaces(rt2x00dev->hw, + rt2x00lib_beacondone_iter, + rt2x00dev); queue_work(rt2x00dev->hw->workqueue, &rt2x00dev->intf_work); } @@ -507,7 +507,7 @@ void rt2x00lib_txdone(struct queue_entry *entry, * Update TX statistics. */ rt2x00dev->link.qual.tx_success += success; - rt2x00dev->link.qual.tx_failed += fail; + rt2x00dev->link.qual.tx_failed += txdesc->retry + fail; /* * Initialize TX status diff --git a/trunk/drivers/net/wireless/rt2x00/rt2x00mac.c b/trunk/drivers/net/wireless/rt2x00/rt2x00mac.c index 87e280a21971..c206b5092070 100644 --- a/trunk/drivers/net/wireless/rt2x00/rt2x00mac.c +++ b/trunk/drivers/net/wireless/rt2x00/rt2x00mac.c @@ -93,7 +93,6 @@ int rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb, */ if (!test_bit(DEVICE_PRESENT, &rt2x00dev->flags)) { ieee80211_stop_queues(hw); - dev_kfree_skb_any(skb); return NETDEV_TX_OK; } diff --git a/trunk/drivers/net/wireless/rtl8180_grf5101.c b/trunk/drivers/net/wireless/rtl8180_grf5101.c index 947ee55f18b2..5d47935dbac3 100644 --- a/trunk/drivers/net/wireless/rtl8180_grf5101.c +++ b/trunk/drivers/net/wireless/rtl8180_grf5101.c @@ -88,7 +88,7 @@ static void grf5101_rf_set_channel(struct ieee80211_hw *dev, write_grf5101(dev, 0x0B, chan); write_grf5101(dev, 0x07, 0x1000); - grf5101_write_phy_antenna(dev, channel); + grf5101_write_phy_antenna(dev, chan); } static void grf5101_rf_stop(struct ieee80211_hw *dev) diff --git a/trunk/drivers/net/wireless/rtl8180_max2820.c b/trunk/drivers/net/wireless/rtl8180_max2820.c index 6c825fd7f3b6..a34dfd382b6d 100644 --- a/trunk/drivers/net/wireless/rtl8180_max2820.c +++ b/trunk/drivers/net/wireless/rtl8180_max2820.c @@ -78,8 +78,7 @@ static void max2820_rf_set_channel(struct ieee80211_hw *dev, struct ieee80211_conf *conf) { struct rtl8180_priv *priv = dev->priv; - int channel = conf ? - ieee80211_frequency_to_channel(conf->channel->center_freq) : 1; + int channel = ieee80211_frequency_to_channel(conf->channel->center_freq); unsigned int chan_idx = channel - 1; u32 txpw = priv->channels[chan_idx].hw_value & 0xFF; u32 chan = max2820_chan[chan_idx]; @@ -88,7 +87,7 @@ static void max2820_rf_set_channel(struct ieee80211_hw *dev, * sa2400, for MAXIM we do this directly from BB */ rtl8180_write_phy(dev, 3, txpw); - max2820_write_phy_antenna(dev, channel); + max2820_write_phy_antenna(dev, chan); write_max2820(dev, 3, chan); } diff --git a/trunk/drivers/net/wireless/rtl8180_sa2400.c b/trunk/drivers/net/wireless/rtl8180_sa2400.c index cea4e0ccb92d..0311b4ea124c 100644 --- a/trunk/drivers/net/wireless/rtl8180_sa2400.c +++ b/trunk/drivers/net/wireless/rtl8180_sa2400.c @@ -86,7 +86,7 @@ static void sa2400_rf_set_channel(struct ieee80211_hw *dev, write_sa2400(dev, 7, txpw); - sa2400_write_phy_antenna(dev, channel); + sa2400_write_phy_antenna(dev, chan); write_sa2400(dev, 0, chan); write_sa2400(dev, 1, 0xbb50); 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/pcmcia/electra_cf.c b/trunk/drivers/pcmcia/electra_cf.c index 52d0aa8c2e7a..0a6cea1316b4 100644 --- a/trunk/drivers/pcmcia/electra_cf.c +++ b/trunk/drivers/pcmcia/electra_cf.c @@ -352,7 +352,6 @@ static struct of_device_id electra_cf_match[] = { }, {}, }; -MODULE_DEVICE_TABLE(of, electra_cf_match); static struct of_platform_driver electra_cf_driver = { .name = (char *)driver_name, diff --git a/trunk/drivers/pnp/quirks.c b/trunk/drivers/pnp/quirks.c index 1ff3bb585ab2..e2b7de4cb05e 100644 --- a/trunk/drivers/pnp/quirks.c +++ b/trunk/drivers/pnp/quirks.c @@ -286,7 +286,7 @@ static void quirk_system_pci_resources(struct pnp_dev *dev) pci_name(pdev), i, (unsigned long long) pci_start, (unsigned long long) pci_end); - res->flags |= IORESOURCE_DISABLED; + res->flags = 0; } } } diff --git a/trunk/drivers/pnp/system.c b/trunk/drivers/pnp/system.c index 8f0a570509c5..9c2496dbeee4 100644 --- a/trunk/drivers/pnp/system.c +++ b/trunk/drivers/pnp/system.c @@ -81,7 +81,7 @@ static void reserve_resources_of_dev(struct pnp_dev *dev) } for (i = 0; (res = pnp_get_resource(dev, IORESOURCE_MEM, i)); i++) { - if (res->flags & IORESOURCE_DISABLED) + if (res->flags & IORESOURCE_UNSET) continue; reserve_range(dev, res->start, res->end, 0); diff --git a/trunk/drivers/s390/block/dasd.c b/trunk/drivers/s390/block/dasd.c index 1a4025683362..8ba3f135da22 100644 --- a/trunk/drivers/s390/block/dasd.c +++ b/trunk/drivers/s390/block/dasd.c @@ -63,7 +63,6 @@ static void dasd_return_cqr_cb(struct dasd_ccw_req *, void *); */ static wait_queue_head_t dasd_init_waitq; static wait_queue_head_t dasd_flush_wq; -static wait_queue_head_t generic_waitq; /* * Allocate memory for a new device structure. @@ -1152,15 +1151,11 @@ static void __dasd_device_process_final_queue(struct dasd_device *device, struct list_head *l, *n; struct dasd_ccw_req *cqr; struct dasd_block *block; - void (*callback)(struct dasd_ccw_req *, void *data); - void *callback_data; list_for_each_safe(l, n, final_queue) { cqr = list_entry(l, struct dasd_ccw_req, devlist); list_del_init(&cqr->devlist); block = cqr->block; - callback = cqr->callback; - callback_data = cqr->callback_data; if (block) spin_lock_bh(&block->queue_lock); switch (cqr->status) { @@ -1181,7 +1176,7 @@ static void __dasd_device_process_final_queue(struct dasd_device *device, BUG(); } if (cqr->callback != NULL) - (callback)(cqr, callback_data); + (cqr->callback)(cqr, cqr->callback_data); if (block) spin_unlock_bh(&block->queue_lock); } @@ -1411,15 +1406,17 @@ static inline int _wait_for_wakeup(struct dasd_ccw_req *cqr) */ int dasd_sleep_on(struct dasd_ccw_req *cqr) { + wait_queue_head_t wait_q; struct dasd_device *device; int rc; device = cqr->startdev; + init_waitqueue_head (&wait_q); cqr->callback = dasd_wakeup_cb; - cqr->callback_data = (void *) &generic_waitq; + cqr->callback_data = (void *) &wait_q; dasd_add_request_tail(cqr); - wait_event(generic_waitq, _wait_for_wakeup(cqr)); + wait_event(wait_q, _wait_for_wakeup(cqr)); /* Request status is either done or failed. */ rc = (cqr->status == DASD_CQR_DONE) ? 0 : -EIO; @@ -1432,18 +1429,20 @@ int dasd_sleep_on(struct dasd_ccw_req *cqr) */ int dasd_sleep_on_interruptible(struct dasd_ccw_req *cqr) { + wait_queue_head_t wait_q; struct dasd_device *device; int rc; device = cqr->startdev; + init_waitqueue_head (&wait_q); cqr->callback = dasd_wakeup_cb; - cqr->callback_data = (void *) &generic_waitq; + cqr->callback_data = (void *) &wait_q; dasd_add_request_tail(cqr); - rc = wait_event_interruptible(generic_waitq, _wait_for_wakeup(cqr)); + rc = wait_event_interruptible(wait_q, _wait_for_wakeup(cqr)); if (rc == -ERESTARTSYS) { dasd_cancel_req(cqr); /* wait (non-interruptible) for final status */ - wait_event(generic_waitq, _wait_for_wakeup(cqr)); + wait_event(wait_q, _wait_for_wakeup(cqr)); } rc = (cqr->status == DASD_CQR_DONE) ? 0 : -EIO; return rc; @@ -1467,6 +1466,7 @@ static inline int _dasd_term_running_cqr(struct dasd_device *device) int dasd_sleep_on_immediatly(struct dasd_ccw_req *cqr) { + wait_queue_head_t wait_q; struct dasd_device *device; int rc; @@ -1478,8 +1478,9 @@ int dasd_sleep_on_immediatly(struct dasd_ccw_req *cqr) return rc; } + init_waitqueue_head (&wait_q); cqr->callback = dasd_wakeup_cb; - cqr->callback_data = (void *) &generic_waitq; + cqr->callback_data = (void *) &wait_q; cqr->status = DASD_CQR_QUEUED; list_add(&cqr->devlist, &device->ccw_queue); @@ -1488,7 +1489,7 @@ int dasd_sleep_on_immediatly(struct dasd_ccw_req *cqr) spin_unlock_irq(get_ccwdev_lock(device->cdev)); - wait_event(generic_waitq, _wait_for_wakeup(cqr)); + wait_event(wait_q, _wait_for_wakeup(cqr)); /* Request status is either done or failed. */ rc = (cqr->status == DASD_CQR_DONE) ? 0 : -EIO; @@ -2429,7 +2430,6 @@ static int __init dasd_init(void) init_waitqueue_head(&dasd_init_waitq); init_waitqueue_head(&dasd_flush_wq); - init_waitqueue_head(&generic_waitq); /* register 'common' DASD debug area, used for all DBF_XXX calls */ dasd_debug_area = debug_register("dasd", 1, 1, 8 * sizeof(long)); diff --git a/trunk/drivers/s390/char/raw3270.c b/trunk/drivers/s390/char/raw3270.c index 848ef7e8523f..0d98f1ff2edd 100644 --- a/trunk/drivers/s390/char/raw3270.c +++ b/trunk/drivers/s390/char/raw3270.c @@ -549,6 +549,7 @@ raw3270_start_init(struct raw3270 *rp, struct raw3270_view *view, struct raw3270_request *rq) { unsigned long flags; + wait_queue_head_t wq; int rc; #ifdef CONFIG_TN3270_CONSOLE @@ -565,20 +566,20 @@ raw3270_start_init(struct raw3270 *rp, struct raw3270_view *view, return rq->rc; } #endif + init_waitqueue_head(&wq); rq->callback = raw3270_wake_init; - rq->callback_data = &raw3270_wait_queue; + rq->callback_data = &wq; spin_lock_irqsave(get_ccwdev_lock(view->dev->cdev), flags); rc = __raw3270_start(rp, view, rq); spin_unlock_irqrestore(get_ccwdev_lock(view->dev->cdev), flags); if (rc) return rc; /* Now wait for the completion. */ - rc = wait_event_interruptible(raw3270_wait_queue, - raw3270_request_final(rq)); + rc = wait_event_interruptible(wq, raw3270_request_final(rq)); if (rc == -ERESTARTSYS) { /* Interrupted by a signal. */ raw3270_halt_io(view->dev, rq); /* No wait for the halt to complete. */ - wait_event(raw3270_wait_queue, raw3270_request_final(rq)); + wait_event(wq, raw3270_request_final(rq)); return -ERESTARTSYS; } return rq->rc; diff --git a/trunk/drivers/s390/char/sclp_config.c b/trunk/drivers/s390/char/sclp_config.c index ad05a87bc480..9e784d5f7f57 100644 --- a/trunk/drivers/s390/char/sclp_config.c +++ b/trunk/drivers/s390/char/sclp_config.c @@ -40,7 +40,7 @@ static void sclp_cpu_capability_notify(struct work_struct *work) put_online_cpus(); } -static void __ref sclp_cpu_change_notify(struct work_struct *work) +static void sclp_cpu_change_notify(struct work_struct *work) { smp_rescan_cpus(); } diff --git a/trunk/drivers/s390/char/sclp_vt220.c b/trunk/drivers/s390/char/sclp_vt220.c index 62576af36f47..35707c04e613 100644 --- a/trunk/drivers/s390/char/sclp_vt220.c +++ b/trunk/drivers/s390/char/sclp_vt220.c @@ -71,6 +71,9 @@ static struct list_head sclp_vt220_outqueue; /* Number of requests in outqueue */ static int sclp_vt220_outqueue_count; +/* Wait queue used to delay write requests while we've run out of buffers */ +static wait_queue_head_t sclp_vt220_waitq; + /* Timer used for delaying write requests to merge subsequent messages into * a single buffer */ static struct timer_list sclp_vt220_timer; @@ -130,6 +133,7 @@ sclp_vt220_process_queue(struct sclp_vt220_request *request) } while (request && __sclp_vt220_emit(request)); if (request == NULL && sclp_vt220_flush_later) sclp_vt220_emit_current(); + wake_up(&sclp_vt220_waitq); /* Check if the tty needs a wake up call */ if (sclp_vt220_tty != NULL) { tty_wakeup(sclp_vt220_tty); @@ -379,7 +383,7 @@ sclp_vt220_timeout(unsigned long data) */ static int __sclp_vt220_write(const unsigned char *buf, int count, int do_schedule, - int convertlf, int may_fail) + int convertlf, int may_schedule) { unsigned long flags; void *page; @@ -391,14 +395,15 @@ __sclp_vt220_write(const unsigned char *buf, int count, int do_schedule, overall_written = 0; spin_lock_irqsave(&sclp_vt220_lock, flags); do { - /* Create an sclp output buffer if none exists yet */ + /* Create a sclp output buffer if none exists yet */ if (sclp_vt220_current_request == NULL) { while (list_empty(&sclp_vt220_empty)) { spin_unlock_irqrestore(&sclp_vt220_lock, flags); - if (may_fail) - goto out; - else + if (in_interrupt() || !may_schedule) sclp_sync_wait(); + else + wait_event(sclp_vt220_waitq, + !list_empty(&sclp_vt220_empty)); spin_lock_irqsave(&sclp_vt220_lock, flags); } page = (void *) sclp_vt220_empty.next; @@ -432,7 +437,6 @@ __sclp_vt220_write(const unsigned char *buf, int count, int do_schedule, add_timer(&sclp_vt220_timer); } spin_unlock_irqrestore(&sclp_vt220_lock, flags); -out: return overall_written; } @@ -516,11 +520,19 @@ sclp_vt220_close(struct tty_struct *tty, struct file *filp) * character to the tty device. If the kernel uses this routine, * it must call the flush_chars() routine (if defined) when it is * done stuffing characters into the driver. + * + * NOTE: include/linux/tty_driver.h specifies that a character should be + * ignored if there is no room in the queue. This driver implements a different + * semantic in that it will block when there is no more room left. + * + * FIXME: putchar can currently be called from BH and other non blocking + * handlers so this semantic isn't a good idea. */ static int sclp_vt220_put_char(struct tty_struct *tty, unsigned char ch) { - return __sclp_vt220_write(&ch, 1, 0, 0, 1); + __sclp_vt220_write(&ch, 1, 0, 0, 1); + return 1; } /* @@ -641,6 +653,7 @@ static int __init __sclp_vt220_init(void) spin_lock_init(&sclp_vt220_lock); INIT_LIST_HEAD(&sclp_vt220_empty); INIT_LIST_HEAD(&sclp_vt220_outqueue); + init_waitqueue_head(&sclp_vt220_waitq); init_timer(&sclp_vt220_timer); sclp_vt220_current_request = NULL; sclp_vt220_buffered_chars = 0; diff --git a/trunk/drivers/s390/char/tape.h b/trunk/drivers/s390/char/tape.h index d0d565a05dfe..dddf8d62c153 100644 --- a/trunk/drivers/s390/char/tape.h +++ b/trunk/drivers/s390/char/tape.h @@ -231,9 +231,6 @@ struct tape_device { /* Request queue. */ struct list_head req_queue; - /* Request wait queue. */ - wait_queue_head_t wait_queue; - /* Each tape device has (currently) two minor numbers. */ int first_minor; diff --git a/trunk/drivers/s390/char/tape_block.c b/trunk/drivers/s390/char/tape_block.c index 95da72bc17e8..ddc4a114e7f4 100644 --- a/trunk/drivers/s390/char/tape_block.c +++ b/trunk/drivers/s390/char/tape_block.c @@ -179,11 +179,11 @@ tapeblock_requeue(struct work_struct *work) { tapeblock_end_request(req, -EIO); continue; } - blkdev_dequeue_request(req); - nr_queued++; spin_unlock_irq(&device->blk_data.request_queue_lock); rc = tapeblock_start_request(device, req); spin_lock_irq(&device->blk_data.request_queue_lock); + blkdev_dequeue_request(req); + nr_queued++; } spin_unlock_irq(&device->blk_data.request_queue_lock); atomic_set(&device->blk_data.requeue_scheduled, 0); diff --git a/trunk/drivers/s390/char/tape_core.c b/trunk/drivers/s390/char/tape_core.c index c20e3c548343..76e44eb7c47f 100644 --- a/trunk/drivers/s390/char/tape_core.c +++ b/trunk/drivers/s390/char/tape_core.c @@ -449,7 +449,6 @@ tape_alloc_device(void) INIT_LIST_HEAD(&device->req_queue); INIT_LIST_HEAD(&device->node); init_waitqueue_head(&device->state_change_wq); - init_waitqueue_head(&device->wait_queue); device->tape_state = TS_INIT; device->medium_state = MS_UNKNOWN; *device->modeset_byte = 0; @@ -955,19 +954,21 @@ __tape_wake_up(struct tape_request *request, void *data) int tape_do_io(struct tape_device *device, struct tape_request *request) { + wait_queue_head_t wq; int rc; + init_waitqueue_head(&wq); spin_lock_irq(get_ccwdev_lock(device->cdev)); /* Setup callback */ request->callback = __tape_wake_up; - request->callback_data = &device->wait_queue; + request->callback_data = &wq; /* Add request to request queue and try to start it. */ rc = __tape_start_request(device, request); spin_unlock_irq(get_ccwdev_lock(device->cdev)); if (rc) return rc; /* Request added to the queue. Wait for its completion. */ - wait_event(device->wait_queue, (request->callback == NULL)); + wait_event(wq, (request->callback == NULL)); /* Get rc from request */ return request->rc; } @@ -988,19 +989,20 @@ int tape_do_io_interruptible(struct tape_device *device, struct tape_request *request) { + wait_queue_head_t wq; int rc; + init_waitqueue_head(&wq); spin_lock_irq(get_ccwdev_lock(device->cdev)); /* Setup callback */ request->callback = __tape_wake_up_interruptible; - request->callback_data = &device->wait_queue; + request->callback_data = &wq; rc = __tape_start_request(device, request); spin_unlock_irq(get_ccwdev_lock(device->cdev)); if (rc) return rc; /* Request added to the queue. Wait for its completion. */ - rc = wait_event_interruptible(device->wait_queue, - (request->callback == NULL)); + rc = wait_event_interruptible(wq, (request->callback == NULL)); if (rc != -ERESTARTSYS) /* Request finished normally. */ return request->rc; @@ -1013,7 +1015,7 @@ tape_do_io_interruptible(struct tape_device *device, /* Wait for the interrupt that acknowledges the halt. */ do { rc = wait_event_interruptible( - device->wait_queue, + wq, (request->callback == NULL) ); } while (rc == -ERESTARTSYS); 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/serial/8250.c b/trunk/drivers/serial/8250.c index 1bc00b721e9d..1400ea6a2491 100644 --- a/trunk/drivers/serial/8250.c +++ b/trunk/drivers/serial/8250.c @@ -43,6 +43,7 @@ #include #include +#include #include "8250.h" @@ -92,7 +93,6 @@ static unsigned int nr_uarts = CONFIG_SERIAL_8250_RUNTIME_UARTS; */ #define CONFIG_HUB6 1 -#include /* * SERIAL_PORT_DFNS tells us about built-in ports that have no * standard enumeration mechanism. Platforms that can find all @@ -1547,6 +1547,8 @@ static int serial_link_irq_chain(struct uart_8250_port *up) i->head = &up->list; spin_unlock_irq(&i->lock); + irq_flags |= SERIAL_EXTRA_IRQ_FLAGS; + ret = request_irq(up->port.irq, serial8250_interrupt, irq_flags, "serial", i); if (ret < 0) diff --git a/trunk/drivers/serial/8250.h b/trunk/drivers/serial/8250.h index 91bd28f2bb47..a10a40cc0d9e 100644 --- a/trunk/drivers/serial/8250.h +++ b/trunk/drivers/serial/8250.h @@ -78,3 +78,8 @@ struct serial8250_config { #else #define ALPHA_KLUDGE_MCR 0 #endif + +#ifndef SERIAL_EXTRA_IRQ_FLAGS +#define SERIAL_EXTRA_IRQ_FLAGS 0 +#endif + diff --git a/trunk/drivers/serial/serial_core.c b/trunk/drivers/serial/serial_core.c index 951a75ea6e3e..53b03c629aff 100644 --- a/trunk/drivers/serial/serial_core.c +++ b/trunk/drivers/serial/serial_core.c @@ -1165,15 +1165,6 @@ uart_ioctl(struct tty_struct *tty, struct file *filp, unsigned int cmd, return ret; } -static void uart_set_ldisc(struct tty_struct *tty, int ldisc) -{ - struct uart_state *state = tty->driver_data; - struct uart_port *port = state->port; - - if (port->ops->set_ldisc) - port->ops->set_ldisc(port); -} - static void uart_set_termios(struct tty_struct *tty, struct ktermios *old_termios) { @@ -2297,7 +2288,6 @@ static const struct tty_operations uart_ops = { .unthrottle = uart_unthrottle, .send_xchar = uart_send_xchar, .set_termios = uart_set_termios, - .set_ldisc = uart_set_ldisc, .stop = uart_stop, .start = uart_start, .hangup = uart_hangup, diff --git a/trunk/drivers/usb/c67x00/c67x00-ll-hpi.c b/trunk/drivers/usb/c67x00/c67x00-ll-hpi.c index a9636f43bca2..5100fbbf6cb0 100644 --- a/trunk/drivers/usb/c67x00/c67x00-ll-hpi.c +++ b/trunk/drivers/usb/c67x00/c67x00-ll-hpi.c @@ -120,7 +120,7 @@ static void hpi_write_word(struct c67x00_device *dev, u16 reg, u16 value) * Only data is little endian, addr has cpu endianess */ static void hpi_write_words_le16(struct c67x00_device *dev, u16 addr, - __le16 *data, u16 count) + u16 *data, u16 count) { unsigned long flags; int i; @@ -129,7 +129,7 @@ static void hpi_write_words_le16(struct c67x00_device *dev, u16 addr, hpi_write_reg(dev, HPI_ADDR, addr); for (i = 0; i < count; i++) - hpi_write_reg(dev, HPI_DATA, le16_to_cpu(*data++)); + hpi_write_reg(dev, HPI_DATA, cpu_to_le16(*data++)); spin_unlock_irqrestore(&dev->hpi.lock, flags); } @@ -138,7 +138,7 @@ static void hpi_write_words_le16(struct c67x00_device *dev, u16 addr, * Only data is little endian, addr has cpu endianess */ static void hpi_read_words_le16(struct c67x00_device *dev, u16 addr, - __le16 *data, u16 count) + u16 *data, u16 count) { unsigned long flags; int i; @@ -146,7 +146,7 @@ static void hpi_read_words_le16(struct c67x00_device *dev, u16 addr, spin_lock_irqsave(&dev->hpi.lock, flags); hpi_write_reg(dev, HPI_ADDR, addr); for (i = 0; i < count; i++) - *data++ = cpu_to_le16(hpi_read_reg(dev, HPI_DATA)); + *data++ = le16_to_cpu(hpi_read_reg(dev, HPI_DATA)); spin_unlock_irqrestore(&dev->hpi.lock, flags); } @@ -425,7 +425,7 @@ void c67x00_ll_write_mem_le16(struct c67x00_device *dev, u16 addr, len--; } - hpi_write_words_le16(dev, addr, (__le16 *)buf, len / 2); + hpi_write_words_le16(dev, addr, (u16 *)buf, len / 2); buf += len & ~0x01; addr += len & ~0x01; len &= 0x01; @@ -456,7 +456,7 @@ void c67x00_ll_read_mem_le16(struct c67x00_device *dev, u16 addr, len--; } - hpi_read_words_le16(dev, addr, (__le16 *)buf, len / 2); + hpi_read_words_le16(dev, addr, (u16 *)buf, len / 2); buf += len & ~0x01; addr += len & ~0x01; len &= 0x01; diff --git a/trunk/drivers/usb/class/cdc-wdm.c b/trunk/drivers/usb/class/cdc-wdm.c index 731db051070a..107666d4e2ec 100644 --- a/trunk/drivers/usb/class/cdc-wdm.c +++ b/trunk/drivers/usb/class/cdc-wdm.c @@ -611,8 +611,8 @@ static int wdm_probe(struct usb_interface *intf, const struct usb_device_id *id) goto err; } - desc->wMaxPacketSize = le16_to_cpu(ep->wMaxPacketSize); - desc->bMaxPacketSize0 = udev->descriptor.bMaxPacketSize0; + desc->wMaxPacketSize = ep->wMaxPacketSize; + desc->bMaxPacketSize0 = cpu_to_le16(udev->descriptor.bMaxPacketSize0); desc->orq = kmalloc(sizeof(struct usb_ctrlrequest), GFP_KERNEL); if (!desc->orq) diff --git a/trunk/drivers/usb/core/generic.c b/trunk/drivers/usb/core/generic.c index 7e912f21fd36..c1cb94e9f242 100644 --- a/trunk/drivers/usb/core/generic.c +++ b/trunk/drivers/usb/core/generic.c @@ -155,6 +155,9 @@ static int generic_probe(struct usb_device *udev) { int err, c; + /* put device-specific files into sysfs */ + usb_create_sysfs_dev_files(udev); + /* Choose and set the configuration. This registers the interfaces * with the driver core and lets interface drivers bind to them. */ @@ -186,6 +189,8 @@ static void generic_disconnect(struct usb_device *udev) * unconfigure the device */ if (udev->actconfig) usb_set_configuration(udev, -1); + + usb_remove_sysfs_dev_files(udev); } #ifdef CONFIG_PM diff --git a/trunk/drivers/usb/core/hcd.h b/trunk/drivers/usb/core/hcd.h index a0bf5df6cb6f..1e4b81e9eb50 100644 --- a/trunk/drivers/usb/core/hcd.h +++ b/trunk/drivers/usb/core/hcd.h @@ -213,8 +213,6 @@ struct hc_driver { /* force handover of high-speed port to full-speed companion */ void (*relinquish_port)(struct usb_hcd *, int); - /* has a port been handed over to a companion? */ - int (*port_handed_over)(struct usb_hcd *, int); }; extern int usb_hcd_link_urb_to_ep(struct usb_hcd *hcd, struct urb *urb); diff --git a/trunk/drivers/usb/core/hub.c b/trunk/drivers/usb/core/hub.c index 8eb4da332f56..eb57fcc701d7 100644 --- a/trunk/drivers/usb/core/hub.c +++ b/trunk/drivers/usb/core/hub.c @@ -1326,12 +1326,6 @@ void usb_disconnect(struct usb_device **pdev) usb_unlock_device(udev); - /* Remove the device-specific files from sysfs. This must be - * done with udev unlocked, because some of the attribute - * routines try to acquire the device lock. - */ - usb_remove_sysfs_dev_files(udev); - /* Unregister the device. The device driver is responsible * for removing the device files from usbfs and sysfs and for * de-configuring the device. @@ -1547,9 +1541,6 @@ int usb_new_device(struct usb_device *udev) goto fail; } - /* put device-specific files into sysfs */ - usb_create_sysfs_dev_files(udev); - /* Tell the world! */ announce_device(udev); return err; @@ -2753,11 +2744,7 @@ static void hub_port_connect_change(struct usb_hub *hub, int port1, if ((status == -ENOTCONN) || (status == -ENOTSUPP)) break; } - if (hub->hdev->parent || - !hcd->driver->port_handed_over || - !(hcd->driver->port_handed_over)(hcd, port1)) - dev_err(hub_dev, "unable to enumerate USB device on port %d\n", - port1); + dev_err(hub_dev, "unable to enumerate USB device on port %d\n", port1); done: hub_port_disable(hub, port1, 1); diff --git a/trunk/drivers/usb/core/quirks.c b/trunk/drivers/usb/core/quirks.c index 3da1ab4b389d..2e2019390290 100644 --- a/trunk/drivers/usb/core/quirks.c +++ b/trunk/drivers/usb/core/quirks.c @@ -47,10 +47,6 @@ static const struct usb_device_id usb_quirk_list[] = { /* Edirol SD-20 */ { USB_DEVICE(0x0582, 0x0027), .driver_info = USB_QUIRK_RESET_RESUME }, - /* Avision AV600U */ - { USB_DEVICE(0x0638, 0x0a13), .driver_info = - USB_QUIRK_STRING_FETCH_255 }, - /* M-Systems Flash Disk Pioneers */ { USB_DEVICE(0x08ec, 0x1000), .driver_info = USB_QUIRK_RESET_RESUME }, diff --git a/trunk/drivers/usb/core/sysfs.c b/trunk/drivers/usb/core/sysfs.c index 5e1f5d55bf04..c783cb111847 100644 --- a/trunk/drivers/usb/core/sysfs.c +++ b/trunk/drivers/usb/core/sysfs.c @@ -588,33 +588,35 @@ read_descriptors(struct kobject *kobj, struct bin_attribute *attr, container_of(kobj, struct device, kobj)); size_t nleft = count; size_t srclen, n; - int cfgno; - void *src; - /* The binary attribute begins with the device descriptor. - * Following that are the raw descriptor entries for all the - * configurations (config plus subsidiary descriptors). + usb_lock_device(udev); + + /* The binary attribute begins with the device descriptor */ + srclen = sizeof(struct usb_device_descriptor); + if (off < srclen) { + n = min_t(size_t, nleft, srclen - off); + memcpy(buf, off + (char *) &udev->descriptor, n); + nleft -= n; + buf += n; + off = 0; + } else { + off -= srclen; + } + + /* Then follows the raw descriptor entry for the current + * configuration (config plus subsidiary descriptors). */ - for (cfgno = -1; cfgno < udev->descriptor.bNumConfigurations && - nleft > 0; ++cfgno) { - if (cfgno < 0) { - src = &udev->descriptor; - srclen = sizeof(struct usb_device_descriptor); - } else { - src = udev->rawdescriptors[cfgno]; - srclen = __le16_to_cpu(udev->config[cfgno].desc. - wTotalLength); - } + if (udev->actconfig) { + int cfgno = udev->actconfig - udev->config; + + srclen = __le16_to_cpu(udev->actconfig->desc.wTotalLength); if (off < srclen) { - n = min(nleft, srclen - (size_t) off); - memcpy(buf, src + off, n); + n = min_t(size_t, nleft, srclen - off); + memcpy(buf, off + udev->rawdescriptors[cfgno], n); nleft -= n; - buf += n; - off = 0; - } else { - off -= srclen; } } + usb_unlock_device(udev); return count - nleft; } diff --git a/trunk/drivers/usb/gadget/fsl_usb2_udc.c b/trunk/drivers/usb/gadget/fsl_usb2_udc.c index 18687543d7fa..651b82701394 100644 --- a/trunk/drivers/usb/gadget/fsl_usb2_udc.c +++ b/trunk/drivers/usb/gadget/fsl_usb2_udc.c @@ -1627,9 +1627,7 @@ static int reset_queues(struct fsl_udc *udc) udc_reset_ep_queue(udc, pipe); /* report disconnect; the driver is already quiesced */ - spin_unlock(&udc->lock); udc->driver->disconnect(&udc->gadget); - spin_lock(&udc->lock); return 0; } diff --git a/trunk/drivers/usb/host/ehci-au1xxx.c b/trunk/drivers/usb/host/ehci-au1xxx.c index 08a4335401a9..8b5f991e949c 100644 --- a/trunk/drivers/usb/host/ehci-au1xxx.c +++ b/trunk/drivers/usb/host/ehci-au1xxx.c @@ -223,7 +223,6 @@ static const struct hc_driver ehci_au1xxx_hc_driver = { .bus_suspend = ehci_bus_suspend, .bus_resume = ehci_bus_resume, .relinquish_port = ehci_relinquish_port, - .port_handed_over = ehci_port_handed_over, }; /*-------------------------------------------------------------------------*/ diff --git a/trunk/drivers/usb/host/ehci-fsl.c b/trunk/drivers/usb/host/ehci-fsl.c index 7370d6187c64..6d9bed6c1f48 100644 --- a/trunk/drivers/usb/host/ehci-fsl.c +++ b/trunk/drivers/usb/host/ehci-fsl.c @@ -269,7 +269,7 @@ static int ehci_fsl_setup(struct usb_hcd *hcd) if (retval) return retval; - hcd->has_tt = 1; + ehci->is_tdi_rh_tt = 1; ehci->sbrn = 0x20; @@ -295,6 +295,10 @@ static const struct hc_driver ehci_fsl_hc_driver = { */ .reset = ehci_fsl_setup, .start = ehci_run, +#ifdef CONFIG_PM + .suspend = ehci_bus_suspend, + .resume = ehci_bus_resume, +#endif .stop = ehci_stop, .shutdown = ehci_shutdown, @@ -318,7 +322,6 @@ static const struct hc_driver ehci_fsl_hc_driver = { .bus_suspend = ehci_bus_suspend, .bus_resume = ehci_bus_resume, .relinquish_port = ehci_relinquish_port, - .port_handed_over = ehci_port_handed_over, }; static int ehci_fsl_drv_probe(struct platform_device *pdev) diff --git a/trunk/drivers/usb/host/ehci-hub.c b/trunk/drivers/usb/host/ehci-hub.c index 740835bb8575..382587c4457c 100644 --- a/trunk/drivers/usb/host/ehci-hub.c +++ b/trunk/drivers/usb/host/ehci-hub.c @@ -609,7 +609,7 @@ static int ehci_hub_control ( } break; case USB_PORT_FEAT_C_SUSPEND: - clear_bit(wIndex, &ehci->port_c_suspend); + /* we auto-clear this feature */ break; case USB_PORT_FEAT_POWER: if (HCS_PPC (ehci->hcs_params)) @@ -688,7 +688,7 @@ static int ehci_hub_control ( /* resume completed? */ else if (time_after_eq(jiffies, ehci->reset_done[wIndex])) { - set_bit(wIndex, &ehci->port_c_suspend); + status |= 1 << USB_PORT_FEAT_C_SUSPEND; ehci->reset_done[wIndex] = 0; /* stop resume signaling */ @@ -765,8 +765,6 @@ static int ehci_hub_control ( status |= 1 << USB_PORT_FEAT_RESET; if (temp & PORT_POWER) status |= 1 << USB_PORT_FEAT_POWER; - if (test_bit(wIndex, &ehci->port_c_suspend)) - status |= 1 << USB_PORT_FEAT_C_SUSPEND; #ifndef VERBOSE_DEBUG if (status & ~0xffff) /* only if wPortChange is interesting */ @@ -877,13 +875,3 @@ static void ehci_relinquish_port(struct usb_hcd *hcd, int portnum) set_owner(ehci, --portnum, PORT_OWNER); } -static int ehci_port_handed_over(struct usb_hcd *hcd, int portnum) -{ - struct ehci_hcd *ehci = hcd_to_ehci(hcd); - u32 __iomem *reg; - - if (ehci_is_TDI(ehci)) - return 0; - reg = &ehci->regs->port_status[portnum - 1]; - return ehci_readl(ehci, reg) & PORT_OWNER; -} diff --git a/trunk/drivers/usb/host/ehci-ixp4xx.c b/trunk/drivers/usb/host/ehci-ixp4xx.c index 9d042f220097..601c8795a854 100644 --- a/trunk/drivers/usb/host/ehci-ixp4xx.c +++ b/trunk/drivers/usb/host/ehci-ixp4xx.c @@ -26,7 +26,7 @@ static int ixp4xx_ehci_init(struct usb_hcd *hcd) + HC_LENGTH(ehci_readl(ehci, &ehci->caps->hc_capbase)); ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params); - hcd->has_tt = 1; + ehci->is_tdi_rh_tt = 1; ehci_reset(ehci); retval = ehci_init(hcd); @@ -58,8 +58,6 @@ static const struct hc_driver ixp4xx_ehci_hc_driver = { .bus_suspend = ehci_bus_suspend, .bus_resume = ehci_bus_resume, #endif - .relinquish_port = ehci_relinquish_port, - .port_handed_over = ehci_port_handed_over, }; static int ixp4xx_ehci_probe(struct platform_device *pdev) diff --git a/trunk/drivers/usb/host/ehci-orion.c b/trunk/drivers/usb/host/ehci-orion.c index ab625f0ba1d9..3adfda813a7b 100644 --- a/trunk/drivers/usb/host/ehci-orion.c +++ b/trunk/drivers/usb/host/ehci-orion.c @@ -139,6 +139,10 @@ static const struct hc_driver ehci_orion_hc_driver = { */ .reset = ehci_orion_setup, .start = ehci_run, +#ifdef CONFIG_PM + .suspend = ehci_bus_suspend, + .resume = ehci_bus_resume, +#endif .stop = ehci_stop, .shutdown = ehci_shutdown, @@ -161,8 +165,6 @@ static const struct hc_driver ehci_orion_hc_driver = { .hub_control = ehci_hub_control, .bus_suspend = ehci_bus_suspend, .bus_resume = ehci_bus_resume, - .relinquish_port = ehci_relinquish_port, - .port_handed_over = ehci_port_handed_over, }; static void __init @@ -248,7 +250,7 @@ static int __init ehci_orion_drv_probe(struct platform_device *pdev) ehci->regs = hcd->regs + 0x100 + HC_LENGTH(ehci_readl(ehci, &ehci->caps->hc_capbase)); ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params); - hcd->has_tt = 1; + ehci->is_tdi_rh_tt = 1; ehci->sbrn = 0x20; /* diff --git a/trunk/drivers/usb/host/ehci-pci.c b/trunk/drivers/usb/host/ehci-pci.c index c46a58f9181d..5bb7f6bb13f3 100644 --- a/trunk/drivers/usb/host/ehci-pci.c +++ b/trunk/drivers/usb/host/ehci-pci.c @@ -129,6 +129,7 @@ static int ehci_pci_setup(struct usb_hcd *hcd) switch (pdev->vendor) { case PCI_VENDOR_ID_TDI: if (pdev->device == PCI_DEVICE_ID_TDI_EHCI) { + ehci->is_tdi_rh_tt = 1; hcd->has_tt = 1; tdi_reset(ehci); } @@ -378,8 +379,7 @@ static const struct hc_driver ehci_pci_hc_driver = { .hub_control = ehci_hub_control, .bus_suspend = ehci_bus_suspend, .bus_resume = ehci_bus_resume, - .relinquish_port = ehci_relinquish_port, - .port_handed_over = ehci_port_handed_over, + .relinquish_port = ehci_relinquish_port, }; /*-------------------------------------------------------------------------*/ diff --git a/trunk/drivers/usb/host/ehci-ppc-of.c b/trunk/drivers/usb/host/ehci-ppc-of.c index b018deed2e8f..ee305b1f99ff 100644 --- a/trunk/drivers/usb/host/ehci-ppc-of.c +++ b/trunk/drivers/usb/host/ehci-ppc-of.c @@ -76,8 +76,6 @@ static const struct hc_driver ehci_ppc_of_hc_driver = { .bus_suspend = ehci_bus_suspend, .bus_resume = ehci_bus_resume, #endif - .relinquish_port = ehci_relinquish_port, - .port_handed_over = ehci_port_handed_over, }; diff --git a/trunk/drivers/usb/host/ehci-ppc-soc.c b/trunk/drivers/usb/host/ehci-ppc-soc.c index 529590eb4037..6c76036783a1 100644 --- a/trunk/drivers/usb/host/ehci-ppc-soc.c +++ b/trunk/drivers/usb/host/ehci-ppc-soc.c @@ -163,7 +163,6 @@ static const struct hc_driver ehci_ppc_soc_hc_driver = { .bus_suspend = ehci_bus_suspend, .bus_resume = ehci_bus_resume, .relinquish_port = ehci_relinquish_port, - .port_handed_over = ehci_port_handed_over, }; static int ehci_hcd_ppc_soc_drv_probe(struct platform_device *pdev) diff --git a/trunk/drivers/usb/host/ehci-ps3.c b/trunk/drivers/usb/host/ehci-ps3.c index 37e6abeb794c..69782221bcf3 100644 --- a/trunk/drivers/usb/host/ehci-ps3.c +++ b/trunk/drivers/usb/host/ehci-ps3.c @@ -73,7 +73,6 @@ static const struct hc_driver ps3_ehci_hc_driver = { .bus_resume = ehci_bus_resume, #endif .relinquish_port = ehci_relinquish_port, - .port_handed_over = ehci_port_handed_over, }; static int ps3_ehci_probe(struct ps3_system_bus_device *dev) diff --git a/trunk/drivers/usb/host/ehci-sched.c b/trunk/drivers/usb/host/ehci-sched.c index b7853c8bac0f..be575e46eac3 100644 --- a/trunk/drivers/usb/host/ehci-sched.c +++ b/trunk/drivers/usb/host/ehci-sched.c @@ -1349,27 +1349,18 @@ iso_stream_schedule ( /* when's the last uframe this urb could start? */ max = now + mod; - /* Typical case: reuse current schedule, stream is still active. - * Hopefully there are no gaps from the host falling behind - * (irq delays etc), but if there are we'll take the next - * slot in the schedule, implicitly assuming URB_ISO_ASAP. + /* typical case: reuse current schedule. stream is still active, + * and no gaps from host falling behind (irq delays etc) */ if (likely (!list_empty (&stream->td_list))) { start = stream->next_uframe; if (start < now) start += mod; - - /* Fell behind (by up to twice the slop amount)? */ - if (start >= max - 2 * 8 * SCHEDULE_SLOP) - start += stream->interval * DIV_ROUND_UP( - max - start, stream->interval) - mod; - - /* Tried to schedule too far into the future? */ - if (unlikely((start + sched->span) >= max)) { - status = -EFBIG; - goto fail; - } - goto ready; + if (likely ((start + sched->span) < max)) + goto ready; + /* else fell behind; someday, try to reschedule */ + status = -EL2NSYNC; + goto fail; } /* need to schedule; when's the next (u)frame we could start? @@ -1622,9 +1613,6 @@ itd_complete ( } else if (likely ((t & EHCI_ISOC_ACTIVE) == 0)) { desc->status = 0; desc->actual_length = EHCI_ITD_LENGTH (t); - } else { - /* URB was too late */ - desc->status = -EXDEV; } } @@ -2107,7 +2095,7 @@ static int sitd_submit (struct ehci_hcd *ehci, struct urb *urb, static void scan_periodic (struct ehci_hcd *ehci) { - unsigned now_uframe, frame, clock, clock_frame, mod; + unsigned frame, clock, now_uframe, mod; unsigned modified; mod = ehci->periodic_size << 3; @@ -2123,7 +2111,6 @@ scan_periodic (struct ehci_hcd *ehci) else clock = now_uframe + mod - 1; clock %= mod; - clock_frame = clock >> 3; for (;;) { union ehci_shadow q, *q_p; @@ -2170,26 +2157,22 @@ scan_periodic (struct ehci_hcd *ehci) case Q_TYPE_ITD: /* If this ITD is still active, leave it for * later processing ... check the next entry. - * No need to check for activity unless the - * frame is current. */ - if (frame == clock_frame && live) { - rmb(); - for (uf = 0; uf < 8; uf++) { - if (q.itd->hw_transaction[uf] & - ITD_ACTIVE(ehci)) - break; - } - if (uf < 8) { - incomplete = true; - q_p = &q.itd->itd_next; - hw_p = &q.itd->hw_next; - type = Q_NEXT_TYPE(ehci, + rmb (); + for (uf = 0; uf < 8 && live; uf++) { + if (0 == (q.itd->hw_transaction [uf] + & ITD_ACTIVE(ehci))) + continue; + incomplete = true; + q_p = &q.itd->itd_next; + hw_p = &q.itd->hw_next; + type = Q_NEXT_TYPE(ehci, q.itd->hw_next); - q = *q_p; - break; - } + q = *q_p; + break; } + if (uf < 8 && live) + break; /* Take finished ITDs out of the schedule * and process them: recycle, maybe report @@ -2206,12 +2189,9 @@ scan_periodic (struct ehci_hcd *ehci) case Q_TYPE_SITD: /* If this SITD is still active, leave it for * later processing ... check the next entry. - * No need to check for activity unless the - * frame is current. */ - if (frame == clock_frame && live && - (q.sitd->hw_results & - SITD_ACTIVE(ehci))) { + if ((q.sitd->hw_results & SITD_ACTIVE(ehci)) + && live) { incomplete = true; q_p = &q.sitd->sitd_next; hw_p = &q.sitd->hw_next; @@ -2280,7 +2260,6 @@ scan_periodic (struct ehci_hcd *ehci) /* rescan the rest of this frame, then ... */ clock = now; - clock_frame = clock >> 3; } else { now_uframe++; now_uframe %= mod; diff --git a/trunk/drivers/usb/host/ehci.h b/trunk/drivers/usb/host/ehci.h index 35a03095757e..bf92d209a1a9 100644 --- a/trunk/drivers/usb/host/ehci.h +++ b/trunk/drivers/usb/host/ehci.h @@ -97,8 +97,6 @@ struct ehci_hcd { /* one per controller */ dedicated to the companion controller */ unsigned long owned_ports; /* which ports are owned by the companion during a bus suspend */ - unsigned long port_c_suspend; /* which ports have - the change-suspend feature turned on */ /* per-HC memory pools (could be per-bus, but ...) */ struct dma_pool *qh_pool; /* qh per active urb */ @@ -114,6 +112,7 @@ struct ehci_hcd { /* one per controller */ u32 command; /* SILICON QUIRKS */ + unsigned is_tdi_rh_tt:1; /* TDI roothub with TT */ unsigned no_selective_suspend:1; unsigned has_fsl_port_bug:1; /* FreeScale */ unsigned big_endian_mmio:1; @@ -679,7 +678,7 @@ struct ehci_fstn { * needed (mostly in root hub code). */ -#define ehci_is_TDI(e) (ehci_to_hcd(e)->has_tt) +#define ehci_is_TDI(e) ((e)->is_tdi_rh_tt) /* Returns the speed of a device attached to a port on the root hub. */ static inline unsigned int diff --git a/trunk/drivers/usb/host/isp1760-if.c b/trunk/drivers/usb/host/isp1760-if.c index c9db3fe98726..440bf94f0d4c 100644 --- a/trunk/drivers/usb/host/isp1760-if.c +++ b/trunk/drivers/usb/host/isp1760-if.c @@ -104,8 +104,8 @@ static u32 nxp_pci_io_base; static u32 iolength; static u32 pci_mem_phy0; static u32 length; -static u8 __iomem *chip_addr; -static u8 __iomem *iobase; +static u8 *chip_addr; +static u8 *iobase; static int __devinit isp1761_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) diff --git a/trunk/drivers/usb/misc/Kconfig b/trunk/drivers/usb/misc/Kconfig index eb6c06979f3b..a53db1d4e07a 100644 --- a/trunk/drivers/usb/misc/Kconfig +++ b/trunk/drivers/usb/misc/Kconfig @@ -269,14 +269,3 @@ config USB_TEST See for more information, including sample test device firmware and "how to use it". -config USB_ISIGHTFW - tristate "iSight firmware loading support" - depends on USB - help - This driver loads firmware for USB Apple iSight cameras, allowing - them to be driven by the USB video class driver available at - http://linux-uvc.berlios.de - - The firmware for this driver must be extracted from the MacOS - driver beforehand. Tools for doing so are available at - http://bersace03.free.fr diff --git a/trunk/drivers/usb/misc/Makefile b/trunk/drivers/usb/misc/Makefile index aba091cb5ec0..b68e6b774f1a 100644 --- a/trunk/drivers/usb/misc/Makefile +++ b/trunk/drivers/usb/misc/Makefile @@ -14,7 +14,6 @@ obj-$(CONFIG_USB_EMI62) += emi62.o obj-$(CONFIG_USB_FTDI_ELAN) += ftdi-elan.o obj-$(CONFIG_USB_IDMOUSE) += idmouse.o obj-$(CONFIG_USB_IOWARRIOR) += iowarrior.o -obj-$(CONFIG_USB_ISIGHTFW) += isight_firmware.o obj-$(CONFIG_USB_LCD) += usblcd.o obj-$(CONFIG_USB_LD) += ldusb.o obj-$(CONFIG_USB_LED) += usbled.o diff --git a/trunk/drivers/usb/misc/isight_firmware.c b/trunk/drivers/usb/misc/isight_firmware.c deleted file mode 100644 index 390e04885536..000000000000 --- a/trunk/drivers/usb/misc/isight_firmware.c +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Driver for loading USB isight firmware - * - * Copyright (C) 2008 Matthew Garrett - * - * 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, version 2. - * - * The USB isight cameras in recent Apples are roughly compatible with the USB - * video class specification, and can be driven by uvcvideo. However, they - * need firmware to be loaded beforehand. After firmware loading, the device - * detaches from the USB bus and reattaches with a new device ID. It can then - * be claimed by the uvc driver. - * - * The firmware is non-free and must be extracted by the user. Tools to do this - * are available at http://bersace03.free.fr/ift/ - * - * The isight firmware loading was reverse engineered by Johannes Berg - * , and this driver is based on code by Ronald - * Bultje - */ - -#include -#include -#include -#include - -static struct usb_device_id id_table[] = { - {USB_DEVICE(0x05ac, 0x8300)}, - {}, -}; - -MODULE_DEVICE_TABLE(usb, id_table); - -static int isight_firmware_load(struct usb_interface *intf, - const struct usb_device_id *id) -{ - struct usb_device *dev = interface_to_usbdev(intf); - int llen, len, req, ret = 0; - const struct firmware *firmware; - unsigned char *buf; - unsigned char data[4]; - char *ptr; - - if (request_firmware(&firmware, "isight.fw", &dev->dev) != 0) { - printk(KERN_ERR "Unable to load isight firmware\n"); - return -ENODEV; - } - - ptr = firmware->data; - - if (usb_control_msg - (dev, usb_sndctrlpipe(dev, 0), 0xa0, 0x40, 0xe600, 0, "\1", 1, - 300) != 1) { - printk(KERN_ERR - "Failed to initialise isight firmware loader\n"); - ret = -ENODEV; - goto out; - } - - while (1) { - memcpy(data, ptr, 4); - len = (data[0] << 8 | data[1]); - req = (data[2] << 8 | data[3]); - ptr += 4; - - if (len == 0x8001) - break; /* success */ - else if (len == 0) - continue; - - for (; len > 0; req += 50) { - llen = len > 50 ? 50 : len; - len -= llen; - - buf = kmalloc(llen, GFP_KERNEL); - memcpy(buf, ptr, llen); - - ptr += llen; - - if (usb_control_msg - (dev, usb_sndctrlpipe(dev, 0), 0xa0, 0x40, req, 0, - buf, llen, 300) != llen) { - printk(KERN_ERR - "Failed to load isight firmware\n"); - kfree(buf); - ret = -ENODEV; - goto out; - } - - kfree(buf); - } - } - if (usb_control_msg - (dev, usb_sndctrlpipe(dev, 0), 0xa0, 0x40, 0xe600, 0, "\0", 1, - 300) != 1) { - printk(KERN_ERR "isight firmware loading completion failed\n"); - ret = -ENODEV; - } -out: - release_firmware(firmware); - return ret; -} - -static void isight_firmware_disconnect(struct usb_interface *intf) -{ -} - -static struct usb_driver isight_firmware_driver = { - .name = "isight_firmware", - .probe = isight_firmware_load, - .disconnect = isight_firmware_disconnect, - .id_table = id_table, -}; - -static int __init isight_firmware_init(void) -{ - return usb_register(&isight_firmware_driver); -} - -static void __exit isight_firmware_exit(void) -{ - usb_deregister(&isight_firmware_driver); -} - -module_init(isight_firmware_init); -module_exit(isight_firmware_exit); - -MODULE_LICENSE("GPL"); -MODULE_AUTHOR("Matthew Garrett "); diff --git a/trunk/drivers/usb/serial/ftdi_sio.c b/trunk/drivers/usb/serial/ftdi_sio.c index 5234e7a3bd2c..3cee6feac174 100644 --- a/trunk/drivers/usb/serial/ftdi_sio.c +++ b/trunk/drivers/usb/serial/ftdi_sio.c @@ -174,270 +174,8 @@ static struct usb_device_id id_table_combined [] = { { USB_DEVICE(FTDI_VID, FTDI_MTXORB_4_PID) }, { USB_DEVICE(FTDI_VID, FTDI_MTXORB_5_PID) }, { USB_DEVICE(FTDI_VID, FTDI_MTXORB_6_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0100_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0101_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0102_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0103_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0104_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0105_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0106_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0107_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0108_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0109_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_010A_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_010B_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_010C_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_010D_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_010E_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_010F_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0110_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0111_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0112_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0113_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0114_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0115_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0116_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0117_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0118_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0119_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_011A_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_011B_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_011C_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_011D_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_011E_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_011F_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0120_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0121_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0122_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0123_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0124_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0125_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0126_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0127_PID), + { USB_DEVICE(MTXORB_VK_VID, MTXORB_VK_PID), .driver_info = (kernel_ulong_t)&ftdi_mtxorb_hack_quirk }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0128_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0129_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_012A_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_012B_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_012C_PID), - .driver_info = (kernel_ulong_t)&ftdi_mtxorb_hack_quirk }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_012D_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_012E_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_012F_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0130_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0131_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0132_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0133_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0134_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0135_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0136_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0137_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0138_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0139_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_013A_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_013B_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_013C_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_013D_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_013E_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_013F_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0140_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0141_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0142_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0143_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0144_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0145_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0146_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0147_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0148_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0149_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_014A_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_014B_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_014C_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_014D_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_014E_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_014F_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0150_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0151_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0152_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0153_PID), - .driver_info = (kernel_ulong_t)&ftdi_mtxorb_hack_quirk }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0154_PID), - .driver_info = (kernel_ulong_t)&ftdi_mtxorb_hack_quirk }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0155_PID), - .driver_info = (kernel_ulong_t)&ftdi_mtxorb_hack_quirk }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0156_PID), - .driver_info = (kernel_ulong_t)&ftdi_mtxorb_hack_quirk }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0157_PID), - .driver_info = (kernel_ulong_t)&ftdi_mtxorb_hack_quirk }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0158_PID), - .driver_info = (kernel_ulong_t)&ftdi_mtxorb_hack_quirk }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0159_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_015A_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_015B_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_015C_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_015D_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_015E_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_015F_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0160_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0161_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0162_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0163_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0164_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0165_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0166_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0167_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0168_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0169_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_016A_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_016B_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_016C_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_016D_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_016E_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_016F_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0170_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0171_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0172_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0173_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0174_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0175_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0176_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0177_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0178_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0179_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_017A_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_017B_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_017C_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_017D_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_017E_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_017F_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0180_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0181_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0182_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0183_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0184_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0185_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0186_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0187_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0188_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0189_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_018A_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_018B_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_018C_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_018D_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_018E_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_018F_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0190_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0191_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0192_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0193_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0194_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0195_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0196_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0197_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0198_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_0199_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_019A_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_019B_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_019C_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_019D_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_019E_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_019F_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01A0_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01A1_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01A2_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01A3_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01A4_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01A5_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01A6_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01A7_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01A8_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01A9_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01AA_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01AB_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01AC_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01AD_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01AE_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01AF_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01B0_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01B1_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01B2_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01B3_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01B4_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01B5_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01B6_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01B7_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01B8_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01B9_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01BA_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01BB_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01BC_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01BD_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01BE_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01BF_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01C0_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01C1_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01C2_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01C3_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01C4_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01C5_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01C6_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01C7_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01C8_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01C9_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01CA_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01CB_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01CC_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01CD_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01CE_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01CF_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01D0_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01D1_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01D2_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01D3_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01D4_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01D5_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01D6_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01D7_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01D8_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01D9_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01DA_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01DB_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01DC_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01DD_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01DE_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01DF_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01E0_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01E1_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01E2_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01E3_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01E4_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01E5_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01E6_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01E7_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01E8_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01E9_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01EA_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01EB_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01EC_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01ED_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01EE_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01EF_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01F0_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01F1_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01F2_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01F3_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01F4_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01F5_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01F6_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01F7_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01F8_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01F9_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01FA_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01FB_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01FC_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01FD_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01FE_PID) }, - { USB_DEVICE(MTXORB_VID,MTXORB_FTDI_RANGE_01FF_PID) }, { USB_DEVICE(FTDI_VID, FTDI_PERLE_ULTRAPORT_PID) }, { USB_DEVICE(FTDI_VID, FTDI_PIEGROUP_PID) }, { USB_DEVICE(FTDI_VID, FTDI_TNC_X_PID) }, diff --git a/trunk/drivers/usb/serial/ftdi_sio.h b/trunk/drivers/usb/serial/ftdi_sio.h index 06e0ecabb3eb..a72f2c81d664 100644 --- a/trunk/drivers/usb/serial/ftdi_sio.h +++ b/trunk/drivers/usb/serial/ftdi_sio.h @@ -114,268 +114,11 @@ #define FTDI_OOCDLINK_PID 0xbaf8 /* Amontec JTAGkey */ /* - * The following are the values for the Matrix Orbital FTDI Range - * Anything in this range will use an FT232RL. - */ -#define MTXORB_VID 0x1B3D -#define MTXORB_FTDI_RANGE_0100_PID 0x0100 -#define MTXORB_FTDI_RANGE_0101_PID 0x0101 -#define MTXORB_FTDI_RANGE_0102_PID 0x0102 -#define MTXORB_FTDI_RANGE_0103_PID 0x0103 -#define MTXORB_FTDI_RANGE_0104_PID 0x0104 -#define MTXORB_FTDI_RANGE_0105_PID 0x0105 -#define MTXORB_FTDI_RANGE_0106_PID 0x0106 -#define MTXORB_FTDI_RANGE_0107_PID 0x0107 -#define MTXORB_FTDI_RANGE_0108_PID 0x0108 -#define MTXORB_FTDI_RANGE_0109_PID 0x0109 -#define MTXORB_FTDI_RANGE_010A_PID 0x010A -#define MTXORB_FTDI_RANGE_010B_PID 0x010B -#define MTXORB_FTDI_RANGE_010C_PID 0x010C -#define MTXORB_FTDI_RANGE_010D_PID 0x010D -#define MTXORB_FTDI_RANGE_010E_PID 0x010E -#define MTXORB_FTDI_RANGE_010F_PID 0x010F -#define MTXORB_FTDI_RANGE_0110_PID 0x0110 -#define MTXORB_FTDI_RANGE_0111_PID 0x0111 -#define MTXORB_FTDI_RANGE_0112_PID 0x0112 -#define MTXORB_FTDI_RANGE_0113_PID 0x0113 -#define MTXORB_FTDI_RANGE_0114_PID 0x0114 -#define MTXORB_FTDI_RANGE_0115_PID 0x0115 -#define MTXORB_FTDI_RANGE_0116_PID 0x0116 -#define MTXORB_FTDI_RANGE_0117_PID 0x0117 -#define MTXORB_FTDI_RANGE_0118_PID 0x0118 -#define MTXORB_FTDI_RANGE_0119_PID 0x0119 -#define MTXORB_FTDI_RANGE_011A_PID 0x011A -#define MTXORB_FTDI_RANGE_011B_PID 0x011B -#define MTXORB_FTDI_RANGE_011C_PID 0x011C -#define MTXORB_FTDI_RANGE_011D_PID 0x011D -#define MTXORB_FTDI_RANGE_011E_PID 0x011E -#define MTXORB_FTDI_RANGE_011F_PID 0x011F -#define MTXORB_FTDI_RANGE_0120_PID 0x0120 -#define MTXORB_FTDI_RANGE_0121_PID 0x0121 -#define MTXORB_FTDI_RANGE_0122_PID 0x0122 -#define MTXORB_FTDI_RANGE_0123_PID 0x0123 -#define MTXORB_FTDI_RANGE_0124_PID 0x0124 -#define MTXORB_FTDI_RANGE_0125_PID 0x0125 -#define MTXORB_FTDI_RANGE_0126_PID 0x0126 -#define MTXORB_FTDI_RANGE_0127_PID 0x0127 -#define MTXORB_FTDI_RANGE_0128_PID 0x0128 -#define MTXORB_FTDI_RANGE_0129_PID 0x0129 -#define MTXORB_FTDI_RANGE_012A_PID 0x012A -#define MTXORB_FTDI_RANGE_012B_PID 0x012B -#define MTXORB_FTDI_RANGE_012C_PID 0x012C -#define MTXORB_FTDI_RANGE_012D_PID 0x012D -#define MTXORB_FTDI_RANGE_012E_PID 0x012E -#define MTXORB_FTDI_RANGE_012F_PID 0x012F -#define MTXORB_FTDI_RANGE_0130_PID 0x0130 -#define MTXORB_FTDI_RANGE_0131_PID 0x0131 -#define MTXORB_FTDI_RANGE_0132_PID 0x0132 -#define MTXORB_FTDI_RANGE_0133_PID 0x0133 -#define MTXORB_FTDI_RANGE_0134_PID 0x0134 -#define MTXORB_FTDI_RANGE_0135_PID 0x0135 -#define MTXORB_FTDI_RANGE_0136_PID 0x0136 -#define MTXORB_FTDI_RANGE_0137_PID 0x0137 -#define MTXORB_FTDI_RANGE_0138_PID 0x0138 -#define MTXORB_FTDI_RANGE_0139_PID 0x0139 -#define MTXORB_FTDI_RANGE_013A_PID 0x013A -#define MTXORB_FTDI_RANGE_013B_PID 0x013B -#define MTXORB_FTDI_RANGE_013C_PID 0x013C -#define MTXORB_FTDI_RANGE_013D_PID 0x013D -#define MTXORB_FTDI_RANGE_013E_PID 0x013E -#define MTXORB_FTDI_RANGE_013F_PID 0x013F -#define MTXORB_FTDI_RANGE_0140_PID 0x0140 -#define MTXORB_FTDI_RANGE_0141_PID 0x0141 -#define MTXORB_FTDI_RANGE_0142_PID 0x0142 -#define MTXORB_FTDI_RANGE_0143_PID 0x0143 -#define MTXORB_FTDI_RANGE_0144_PID 0x0144 -#define MTXORB_FTDI_RANGE_0145_PID 0x0145 -#define MTXORB_FTDI_RANGE_0146_PID 0x0146 -#define MTXORB_FTDI_RANGE_0147_PID 0x0147 -#define MTXORB_FTDI_RANGE_0148_PID 0x0148 -#define MTXORB_FTDI_RANGE_0149_PID 0x0149 -#define MTXORB_FTDI_RANGE_014A_PID 0x014A -#define MTXORB_FTDI_RANGE_014B_PID 0x014B -#define MTXORB_FTDI_RANGE_014C_PID 0x014C -#define MTXORB_FTDI_RANGE_014D_PID 0x014D -#define MTXORB_FTDI_RANGE_014E_PID 0x014E -#define MTXORB_FTDI_RANGE_014F_PID 0x014F -#define MTXORB_FTDI_RANGE_0150_PID 0x0150 -#define MTXORB_FTDI_RANGE_0151_PID 0x0151 -#define MTXORB_FTDI_RANGE_0152_PID 0x0152 -#define MTXORB_FTDI_RANGE_0153_PID 0x0153 -#define MTXORB_FTDI_RANGE_0154_PID 0x0154 -#define MTXORB_FTDI_RANGE_0155_PID 0x0155 -#define MTXORB_FTDI_RANGE_0156_PID 0x0156 -#define MTXORB_FTDI_RANGE_0157_PID 0x0157 -#define MTXORB_FTDI_RANGE_0158_PID 0x0158 -#define MTXORB_FTDI_RANGE_0159_PID 0x0159 -#define MTXORB_FTDI_RANGE_015A_PID 0x015A -#define MTXORB_FTDI_RANGE_015B_PID 0x015B -#define MTXORB_FTDI_RANGE_015C_PID 0x015C -#define MTXORB_FTDI_RANGE_015D_PID 0x015D -#define MTXORB_FTDI_RANGE_015E_PID 0x015E -#define MTXORB_FTDI_RANGE_015F_PID 0x015F -#define MTXORB_FTDI_RANGE_0160_PID 0x0160 -#define MTXORB_FTDI_RANGE_0161_PID 0x0161 -#define MTXORB_FTDI_RANGE_0162_PID 0x0162 -#define MTXORB_FTDI_RANGE_0163_PID 0x0163 -#define MTXORB_FTDI_RANGE_0164_PID 0x0164 -#define MTXORB_FTDI_RANGE_0165_PID 0x0165 -#define MTXORB_FTDI_RANGE_0166_PID 0x0166 -#define MTXORB_FTDI_RANGE_0167_PID 0x0167 -#define MTXORB_FTDI_RANGE_0168_PID 0x0168 -#define MTXORB_FTDI_RANGE_0169_PID 0x0169 -#define MTXORB_FTDI_RANGE_016A_PID 0x016A -#define MTXORB_FTDI_RANGE_016B_PID 0x016B -#define MTXORB_FTDI_RANGE_016C_PID 0x016C -#define MTXORB_FTDI_RANGE_016D_PID 0x016D -#define MTXORB_FTDI_RANGE_016E_PID 0x016E -#define MTXORB_FTDI_RANGE_016F_PID 0x016F -#define MTXORB_FTDI_RANGE_0170_PID 0x0170 -#define MTXORB_FTDI_RANGE_0171_PID 0x0171 -#define MTXORB_FTDI_RANGE_0172_PID 0x0172 -#define MTXORB_FTDI_RANGE_0173_PID 0x0173 -#define MTXORB_FTDI_RANGE_0174_PID 0x0174 -#define MTXORB_FTDI_RANGE_0175_PID 0x0175 -#define MTXORB_FTDI_RANGE_0176_PID 0x0176 -#define MTXORB_FTDI_RANGE_0177_PID 0x0177 -#define MTXORB_FTDI_RANGE_0178_PID 0x0178 -#define MTXORB_FTDI_RANGE_0179_PID 0x0179 -#define MTXORB_FTDI_RANGE_017A_PID 0x017A -#define MTXORB_FTDI_RANGE_017B_PID 0x017B -#define MTXORB_FTDI_RANGE_017C_PID 0x017C -#define MTXORB_FTDI_RANGE_017D_PID 0x017D -#define MTXORB_FTDI_RANGE_017E_PID 0x017E -#define MTXORB_FTDI_RANGE_017F_PID 0x017F -#define MTXORB_FTDI_RANGE_0180_PID 0x0180 -#define MTXORB_FTDI_RANGE_0181_PID 0x0181 -#define MTXORB_FTDI_RANGE_0182_PID 0x0182 -#define MTXORB_FTDI_RANGE_0183_PID 0x0183 -#define MTXORB_FTDI_RANGE_0184_PID 0x0184 -#define MTXORB_FTDI_RANGE_0185_PID 0x0185 -#define MTXORB_FTDI_RANGE_0186_PID 0x0186 -#define MTXORB_FTDI_RANGE_0187_PID 0x0187 -#define MTXORB_FTDI_RANGE_0188_PID 0x0188 -#define MTXORB_FTDI_RANGE_0189_PID 0x0189 -#define MTXORB_FTDI_RANGE_018A_PID 0x018A -#define MTXORB_FTDI_RANGE_018B_PID 0x018B -#define MTXORB_FTDI_RANGE_018C_PID 0x018C -#define MTXORB_FTDI_RANGE_018D_PID 0x018D -#define MTXORB_FTDI_RANGE_018E_PID 0x018E -#define MTXORB_FTDI_RANGE_018F_PID 0x018F -#define MTXORB_FTDI_RANGE_0190_PID 0x0190 -#define MTXORB_FTDI_RANGE_0191_PID 0x0191 -#define MTXORB_FTDI_RANGE_0192_PID 0x0192 -#define MTXORB_FTDI_RANGE_0193_PID 0x0193 -#define MTXORB_FTDI_RANGE_0194_PID 0x0194 -#define MTXORB_FTDI_RANGE_0195_PID 0x0195 -#define MTXORB_FTDI_RANGE_0196_PID 0x0196 -#define MTXORB_FTDI_RANGE_0197_PID 0x0197 -#define MTXORB_FTDI_RANGE_0198_PID 0x0198 -#define MTXORB_FTDI_RANGE_0199_PID 0x0199 -#define MTXORB_FTDI_RANGE_019A_PID 0x019A -#define MTXORB_FTDI_RANGE_019B_PID 0x019B -#define MTXORB_FTDI_RANGE_019C_PID 0x019C -#define MTXORB_FTDI_RANGE_019D_PID 0x019D -#define MTXORB_FTDI_RANGE_019E_PID 0x019E -#define MTXORB_FTDI_RANGE_019F_PID 0x019F -#define MTXORB_FTDI_RANGE_01A0_PID 0x01A0 -#define MTXORB_FTDI_RANGE_01A1_PID 0x01A1 -#define MTXORB_FTDI_RANGE_01A2_PID 0x01A2 -#define MTXORB_FTDI_RANGE_01A3_PID 0x01A3 -#define MTXORB_FTDI_RANGE_01A4_PID 0x01A4 -#define MTXORB_FTDI_RANGE_01A5_PID 0x01A5 -#define MTXORB_FTDI_RANGE_01A6_PID 0x01A6 -#define MTXORB_FTDI_RANGE_01A7_PID 0x01A7 -#define MTXORB_FTDI_RANGE_01A8_PID 0x01A8 -#define MTXORB_FTDI_RANGE_01A9_PID 0x01A9 -#define MTXORB_FTDI_RANGE_01AA_PID 0x01AA -#define MTXORB_FTDI_RANGE_01AB_PID 0x01AB -#define MTXORB_FTDI_RANGE_01AC_PID 0x01AC -#define MTXORB_FTDI_RANGE_01AD_PID 0x01AD -#define MTXORB_FTDI_RANGE_01AE_PID 0x01AE -#define MTXORB_FTDI_RANGE_01AF_PID 0x01AF -#define MTXORB_FTDI_RANGE_01B0_PID 0x01B0 -#define MTXORB_FTDI_RANGE_01B1_PID 0x01B1 -#define MTXORB_FTDI_RANGE_01B2_PID 0x01B2 -#define MTXORB_FTDI_RANGE_01B3_PID 0x01B3 -#define MTXORB_FTDI_RANGE_01B4_PID 0x01B4 -#define MTXORB_FTDI_RANGE_01B5_PID 0x01B5 -#define MTXORB_FTDI_RANGE_01B6_PID 0x01B6 -#define MTXORB_FTDI_RANGE_01B7_PID 0x01B7 -#define MTXORB_FTDI_RANGE_01B8_PID 0x01B8 -#define MTXORB_FTDI_RANGE_01B9_PID 0x01B9 -#define MTXORB_FTDI_RANGE_01BA_PID 0x01BA -#define MTXORB_FTDI_RANGE_01BB_PID 0x01BB -#define MTXORB_FTDI_RANGE_01BC_PID 0x01BC -#define MTXORB_FTDI_RANGE_01BD_PID 0x01BD -#define MTXORB_FTDI_RANGE_01BE_PID 0x01BE -#define MTXORB_FTDI_RANGE_01BF_PID 0x01BF -#define MTXORB_FTDI_RANGE_01C0_PID 0x01C0 -#define MTXORB_FTDI_RANGE_01C1_PID 0x01C1 -#define MTXORB_FTDI_RANGE_01C2_PID 0x01C2 -#define MTXORB_FTDI_RANGE_01C3_PID 0x01C3 -#define MTXORB_FTDI_RANGE_01C4_PID 0x01C4 -#define MTXORB_FTDI_RANGE_01C5_PID 0x01C5 -#define MTXORB_FTDI_RANGE_01C6_PID 0x01C6 -#define MTXORB_FTDI_RANGE_01C7_PID 0x01C7 -#define MTXORB_FTDI_RANGE_01C8_PID 0x01C8 -#define MTXORB_FTDI_RANGE_01C9_PID 0x01C9 -#define MTXORB_FTDI_RANGE_01CA_PID 0x01CA -#define MTXORB_FTDI_RANGE_01CB_PID 0x01CB -#define MTXORB_FTDI_RANGE_01CC_PID 0x01CC -#define MTXORB_FTDI_RANGE_01CD_PID 0x01CD -#define MTXORB_FTDI_RANGE_01CE_PID 0x01CE -#define MTXORB_FTDI_RANGE_01CF_PID 0x01CF -#define MTXORB_FTDI_RANGE_01D0_PID 0x01D0 -#define MTXORB_FTDI_RANGE_01D1_PID 0x01D1 -#define MTXORB_FTDI_RANGE_01D2_PID 0x01D2 -#define MTXORB_FTDI_RANGE_01D3_PID 0x01D3 -#define MTXORB_FTDI_RANGE_01D4_PID 0x01D4 -#define MTXORB_FTDI_RANGE_01D5_PID 0x01D5 -#define MTXORB_FTDI_RANGE_01D6_PID 0x01D6 -#define MTXORB_FTDI_RANGE_01D7_PID 0x01D7 -#define MTXORB_FTDI_RANGE_01D8_PID 0x01D8 -#define MTXORB_FTDI_RANGE_01D9_PID 0x01D9 -#define MTXORB_FTDI_RANGE_01DA_PID 0x01DA -#define MTXORB_FTDI_RANGE_01DB_PID 0x01DB -#define MTXORB_FTDI_RANGE_01DC_PID 0x01DC -#define MTXORB_FTDI_RANGE_01DD_PID 0x01DD -#define MTXORB_FTDI_RANGE_01DE_PID 0x01DE -#define MTXORB_FTDI_RANGE_01DF_PID 0x01DF -#define MTXORB_FTDI_RANGE_01E0_PID 0x01E0 -#define MTXORB_FTDI_RANGE_01E1_PID 0x01E1 -#define MTXORB_FTDI_RANGE_01E2_PID 0x01E2 -#define MTXORB_FTDI_RANGE_01E3_PID 0x01E3 -#define MTXORB_FTDI_RANGE_01E4_PID 0x01E4 -#define MTXORB_FTDI_RANGE_01E5_PID 0x01E5 -#define MTXORB_FTDI_RANGE_01E6_PID 0x01E6 -#define MTXORB_FTDI_RANGE_01E7_PID 0x01E7 -#define MTXORB_FTDI_RANGE_01E8_PID 0x01E8 -#define MTXORB_FTDI_RANGE_01E9_PID 0x01E9 -#define MTXORB_FTDI_RANGE_01EA_PID 0x01EA -#define MTXORB_FTDI_RANGE_01EB_PID 0x01EB -#define MTXORB_FTDI_RANGE_01EC_PID 0x01EC -#define MTXORB_FTDI_RANGE_01ED_PID 0x01ED -#define MTXORB_FTDI_RANGE_01EE_PID 0x01EE -#define MTXORB_FTDI_RANGE_01EF_PID 0x01EF -#define MTXORB_FTDI_RANGE_01F0_PID 0x01F0 -#define MTXORB_FTDI_RANGE_01F1_PID 0x01F1 -#define MTXORB_FTDI_RANGE_01F2_PID 0x01F2 -#define MTXORB_FTDI_RANGE_01F3_PID 0x01F3 -#define MTXORB_FTDI_RANGE_01F4_PID 0x01F4 -#define MTXORB_FTDI_RANGE_01F5_PID 0x01F5 -#define MTXORB_FTDI_RANGE_01F6_PID 0x01F6 -#define MTXORB_FTDI_RANGE_01F7_PID 0x01F7 -#define MTXORB_FTDI_RANGE_01F8_PID 0x01F8 -#define MTXORB_FTDI_RANGE_01F9_PID 0x01F9 -#define MTXORB_FTDI_RANGE_01FA_PID 0x01FA -#define MTXORB_FTDI_RANGE_01FB_PID 0x01FB -#define MTXORB_FTDI_RANGE_01FC_PID 0x01FC -#define MTXORB_FTDI_RANGE_01FD_PID 0x01FD -#define MTXORB_FTDI_RANGE_01FE_PID 0x01FE -#define MTXORB_FTDI_RANGE_01FF_PID 0x01FF - - + * The following are the values for the Matrix Orbital VK204-25-USB + * display, which use the FT232RL. + */ +#define MTXORB_VK_VID 0x1b3d +#define MTXORB_VK_PID 0x0158 /* Interbiometrics USB I/O Board */ /* Developed for Interbiometrics by Rudolf Gugler */ diff --git a/trunk/drivers/usb/serial/option.c b/trunk/drivers/usb/serial/option.c index 43cfde83a93b..6cecd2c12b1d 100644 --- a/trunk/drivers/usb/serial/option.c +++ b/trunk/drivers/usb/serial/option.c @@ -236,25 +236,25 @@ static struct usb_device_id option_ids[] = { { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_NETWORK_EX) }, { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_KOI_MODEM) }, { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_KOI_NETWORK) }, - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E600, 0xff, 0xff, 0xff) }, + { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E600) }, { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220BIS, 0xff, 0xff, 0xff) }, - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1401, 0xff, 0xff, 0xff) }, - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1403, 0xff, 0xff, 0xff) }, - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1405, 0xff, 0xff, 0xff) }, - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1406, 0xff, 0xff, 0xff) }, - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1408, 0xff, 0xff, 0xff) }, - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1409, 0xff, 0xff, 0xff) }, - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1410, 0xff, 0xff, 0xff) }, - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1411, 0xff, 0xff, 0xff) }, - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1412, 0xff, 0xff, 0xff) }, - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1413, 0xff, 0xff, 0xff) }, - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1414, 0xff, 0xff, 0xff) }, - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1415, 0xff, 0xff, 0xff) }, - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1416, 0xff, 0xff, 0xff) }, - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1417, 0xff, 0xff, 0xff) }, - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1418, 0xff, 0xff, 0xff) }, - { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1419, 0xff, 0xff, 0xff) }, + { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1401) }, + { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1403) }, + { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1405) }, + { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1406) }, + { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1408) }, + { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1409) }, + { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1410) }, + { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1411) }, + { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1412) }, + { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1413) }, + { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1414) }, + { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1415) }, + { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1416) }, + { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1417) }, + { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1418) }, + { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E1419) }, { USB_DEVICE(AMOI_VENDOR_ID, AMOI_PRODUCT_9508) }, { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V640) }, /* Novatel Merlin V640/XV620 */ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V620) }, /* Novatel Merlin V620/S620 */ diff --git a/trunk/drivers/usb/serial/pl2303.c b/trunk/drivers/usb/serial/pl2303.c index 103195abd417..234c5eea95a2 100644 --- a/trunk/drivers/usb/serial/pl2303.c +++ b/trunk/drivers/usb/serial/pl2303.c @@ -56,7 +56,6 @@ static struct usb_device_id id_table [] = { { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_RSAQ3) }, { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_PHAROS) }, { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_ALDIGA) }, - { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_MMX) }, { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID) }, { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID_RSAQ5) }, { USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_ID) }, diff --git a/trunk/drivers/usb/serial/pl2303.h b/trunk/drivers/usb/serial/pl2303.h index cff160abb130..3bdefe020501 100644 --- a/trunk/drivers/usb/serial/pl2303.h +++ b/trunk/drivers/usb/serial/pl2303.h @@ -14,7 +14,6 @@ #define PL2303_PRODUCT_ID_PHAROS 0xaaa0 #define PL2303_PRODUCT_ID_RSAQ3 0xaaa2 #define PL2303_PRODUCT_ID_ALDIGA 0x0611 -#define PL2303_PRODUCT_ID_MMX 0x0612 #define ATEN_VENDOR_ID 0x0557 #define ATEN_VENDOR_ID2 0x0547 diff --git a/trunk/drivers/usb/storage/unusual_devs.h b/trunk/drivers/usb/storage/unusual_devs.h index 45fe3663fa7f..1b09578cbb10 100644 --- a/trunk/drivers/usb/storage/unusual_devs.h +++ b/trunk/drivers/usb/storage/unusual_devs.h @@ -405,7 +405,7 @@ UNUSUAL_DEV( 0x04a5, 0x3010, 0x0100, 0x0100, UNUSUAL_DEV( 0x04b4, 0x6830, 0x0000, 0x9999, "Cypress", "Cypress AT2LP", - US_SC_CYP_ATACB, US_PR_DEVICE, NULL, + US_SC_CYP_ATACB, US_PR_BULK, NULL, 0), #endif @@ -1522,7 +1522,7 @@ UNUSUAL_DEV( 0x0fce, 0xe031, 0x0000, 0x0000, "Sony Ericsson", "M600i", US_SC_DEVICE, US_PR_DEVICE, NULL, - US_FL_IGNORE_RESIDUE | US_FL_FIX_CAPACITY ), + US_FL_FIX_CAPACITY ), /* Reported by Kevin Cernekee * Tested on hardware version 1.10. @@ -1716,12 +1716,10 @@ UNUSUAL_DEV( 0x22b8, 0x3010, 0x0001, 0x0001, /* * Patch by Pete Zaitcev * Report by Mark Patton. Red Hat bz#208928. - * Added support for rev 0x0002 (Motorola ROKR W5) - * by Javier Smaldone */ -UNUSUAL_DEV( 0x22b8, 0x4810, 0x0001, 0x0002, +UNUSUAL_DEV( 0x22b8, 0x4810, 0x0001, 0x0001, "Motorola", - "RAZR V3i/ROKR W5", + "RAZR V3i", US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_FIX_CAPACITY), 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/fs/cifs/cifssmb.c b/trunk/fs/cifs/cifssmb.c index fb655b4593c6..9b8b4cfdf993 100644 --- a/trunk/fs/cifs/cifssmb.c +++ b/trunk/fs/cifs/cifssmb.c @@ -3927,9 +3927,9 @@ parse_DFS_referrals(TRANSACTION2_GET_DFS_REFER_RSP *pSMBr, } ref = (struct dfs_referral_level_3 *) &(pSMBr->referrals); - if (ref->VersionNumber != cpu_to_le16(3)) { + if (ref->VersionNumber != 3) { cERROR(1, ("Referrals of V%d version are not supported," - "should be V3", le16_to_cpu(ref->VersionNumber))); + "should be V3", ref->VersionNumber)); rc = -EINVAL; goto parse_DFS_referrals_exit; } @@ -3977,7 +3977,7 @@ parse_DFS_referrals(TRANSACTION2_GET_DFS_REFER_RSP *pSMBr, if (rc) goto parse_DFS_referrals_exit; - ref += le16_to_cpu(ref->Size); + ref += ref->Size; } parse_DFS_referrals_exit: diff --git a/trunk/fs/ocfs2/cluster/tcp.c b/trunk/fs/ocfs2/cluster/tcp.c index a27d61581bd6..1e44ad14881a 100644 --- a/trunk/fs/ocfs2/cluster/tcp.c +++ b/trunk/fs/ocfs2/cluster/tcp.c @@ -142,43 +142,53 @@ static void o2net_idle_timer(unsigned long data); static void o2net_sc_postpone_idle(struct o2net_sock_container *sc); static void o2net_sc_reset_idle_timer(struct o2net_sock_container *sc); -#ifdef CONFIG_DEBUG_FS -void o2net_init_nst(struct o2net_send_tracking *nst, u32 msgtype, - u32 msgkey, struct task_struct *task, u8 node) +static void o2net_init_nst(struct o2net_send_tracking *nst, u32 msgtype, + u32 msgkey, struct task_struct *task, u8 node) { +#ifdef CONFIG_DEBUG_FS INIT_LIST_HEAD(&nst->st_net_debug_item); nst->st_task = task; nst->st_msg_type = msgtype; nst->st_msg_key = msgkey; nst->st_node = node; +#endif } -void o2net_set_nst_sock_time(struct o2net_send_tracking *nst) +static void o2net_set_nst_sock_time(struct o2net_send_tracking *nst) { +#ifdef CONFIG_DEBUG_FS do_gettimeofday(&nst->st_sock_time); +#endif } -void o2net_set_nst_send_time(struct o2net_send_tracking *nst) +static void o2net_set_nst_send_time(struct o2net_send_tracking *nst) { +#ifdef CONFIG_DEBUG_FS do_gettimeofday(&nst->st_send_time); +#endif } -void o2net_set_nst_status_time(struct o2net_send_tracking *nst) +static void o2net_set_nst_status_time(struct o2net_send_tracking *nst) { +#ifdef CONFIG_DEBUG_FS do_gettimeofday(&nst->st_status_time); +#endif } -void o2net_set_nst_sock_container(struct o2net_send_tracking *nst, +static void o2net_set_nst_sock_container(struct o2net_send_tracking *nst, struct o2net_sock_container *sc) { +#ifdef CONFIG_DEBUG_FS nst->st_sc = sc; +#endif } -void o2net_set_nst_msg_id(struct o2net_send_tracking *nst, u32 msg_id) +static void o2net_set_nst_msg_id(struct o2net_send_tracking *nst, u32 msg_id) { +#ifdef CONFIG_DEBUG_FS nst->st_id = msg_id; +#endif } -#endif /* CONFIG_DEBUG_FS */ static inline int o2net_reconnect_delay(void) { diff --git a/trunk/fs/ocfs2/cluster/tcp.h b/trunk/fs/ocfs2/cluster/tcp.h index fd6179eb26d4..a705d5d19036 100644 --- a/trunk/fs/ocfs2/cluster/tcp.h +++ b/trunk/fs/ocfs2/cluster/tcp.h @@ -128,23 +128,23 @@ void o2net_debug_del_nst(struct o2net_send_tracking *nst); void o2net_debug_add_sc(struct o2net_sock_container *sc); void o2net_debug_del_sc(struct o2net_sock_container *sc); #else -static inline int o2net_debugfs_init(void) +static int o2net_debugfs_init(void) { return 0; } -static inline void o2net_debugfs_exit(void) +static void o2net_debugfs_exit(void) { } -static inline void o2net_debug_add_nst(struct o2net_send_tracking *nst) +static void o2net_debug_add_nst(struct o2net_send_tracking *nst) { } -static inline void o2net_debug_del_nst(struct o2net_send_tracking *nst) +static void o2net_debug_del_nst(struct o2net_send_tracking *nst) { } -static inline void o2net_debug_add_sc(struct o2net_sock_container *sc) +static void o2net_debug_add_sc(struct o2net_sock_container *sc) { } -static inline void o2net_debug_del_sc(struct o2net_sock_container *sc) +static void o2net_debug_del_sc(struct o2net_sock_container *sc) { } #endif /* CONFIG_DEBUG_FS */ diff --git a/trunk/fs/ocfs2/cluster/tcp_internal.h b/trunk/fs/ocfs2/cluster/tcp_internal.h index 18307ff81b77..8d58cfe410b1 100644 --- a/trunk/fs/ocfs2/cluster/tcp_internal.h +++ b/trunk/fs/ocfs2/cluster/tcp_internal.h @@ -224,42 +224,10 @@ struct o2net_send_tracking { struct timeval st_send_time; struct timeval st_status_time; }; - -void o2net_init_nst(struct o2net_send_tracking *nst, u32 msgtype, - u32 msgkey, struct task_struct *task, u8 node); -void o2net_set_nst_sock_time(struct o2net_send_tracking *nst); -void o2net_set_nst_send_time(struct o2net_send_tracking *nst); -void o2net_set_nst_status_time(struct o2net_send_tracking *nst); -void o2net_set_nst_sock_container(struct o2net_send_tracking *nst, - struct o2net_sock_container *sc); -void o2net_set_nst_msg_id(struct o2net_send_tracking *nst, u32 msg_id); - #else struct o2net_send_tracking { u32 dummy; }; - -static inline void o2net_init_nst(struct o2net_send_tracking *nst, u32 msgtype, - u32 msgkey, struct task_struct *task, u8 node) -{ -} -static inline void o2net_set_nst_sock_time(struct o2net_send_tracking *nst) -{ -} -static inline void o2net_set_nst_send_time(struct o2net_send_tracking *nst) -{ -} -static inline void o2net_set_nst_status_time(struct o2net_send_tracking *nst) -{ -} -static inline void o2net_set_nst_sock_container(struct o2net_send_tracking *nst, - struct o2net_sock_container *sc) -{ -} -static inline void o2net_set_nst_msg_id(struct o2net_send_tracking *nst, - u32 msg_id) -{ -} #endif /* CONFIG_DEBUG_FS */ #endif /* O2CLUSTER_TCP_INTERNAL_H */ diff --git a/trunk/fs/ocfs2/dlm/dlmdebug.h b/trunk/fs/ocfs2/dlm/dlmdebug.h index 8c686d22f9c7..d34a62a3a625 100644 --- a/trunk/fs/ocfs2/dlm/dlmdebug.h +++ b/trunk/fs/ocfs2/dlm/dlmdebug.h @@ -60,25 +60,25 @@ void dlm_destroy_debugfs_root(void); #else -static inline int dlm_debug_init(struct dlm_ctxt *dlm) +static int dlm_debug_init(struct dlm_ctxt *dlm) { return 0; } -static inline void dlm_debug_shutdown(struct dlm_ctxt *dlm) +static void dlm_debug_shutdown(struct dlm_ctxt *dlm) { } -static inline int dlm_create_debugfs_subroot(struct dlm_ctxt *dlm) +static int dlm_create_debugfs_subroot(struct dlm_ctxt *dlm) { return 0; } -static inline void dlm_destroy_debugfs_subroot(struct dlm_ctxt *dlm) +static void dlm_destroy_debugfs_subroot(struct dlm_ctxt *dlm) { } -static inline int dlm_create_debugfs_root(void) +static int dlm_create_debugfs_root(void) { return 0; } -static inline void dlm_destroy_debugfs_root(void) +static void dlm_destroy_debugfs_root(void) { } diff --git a/trunk/fs/ocfs2/stack_user.c b/trunk/fs/ocfs2/stack_user.c index 6b97d11f6bf8..b503772cd0ec 100644 --- a/trunk/fs/ocfs2/stack_user.c +++ b/trunk/fs/ocfs2/stack_user.c @@ -61,7 +61,7 @@ * negotiated by the client. The client negotiates based on the maximum * version advertised in /sys/fs/ocfs2/max_locking_protocol. The major * number from the "SETV" message must match - * ocfs2_user_plugin.sp_proto->lp_max_version.pv_major, and the minor number + * user_stack.sp_proto->lp_max_version.pv_major, and the minor number * must be less than or equal to ...->lp_max_version.pv_minor. * * Once this information has been set, mounts will be allowed. From this @@ -153,7 +153,7 @@ union ocfs2_control_message { struct ocfs2_control_message_down u_down; }; -static struct ocfs2_stack_plugin ocfs2_user_plugin; +static struct ocfs2_stack_plugin user_stack; static atomic_t ocfs2_control_opened; static int ocfs2_control_this_node = -1; @@ -399,7 +399,7 @@ static int ocfs2_control_do_setversion_msg(struct file *file, char *ptr = NULL; struct ocfs2_control_private *p = file->private_data; struct ocfs2_protocol_version *max = - &ocfs2_user_plugin.sp_proto->lp_max_version; + &user_stack.sp_proto->lp_max_version; if (ocfs2_control_get_handshake_state(file) != OCFS2_CONTROL_HANDSHAKE_PROTOCOL) @@ -680,7 +680,7 @@ static void fsdlm_lock_ast_wrapper(void *astarg) struct dlm_lksb *lksb = fsdlm_astarg_to_lksb(astarg); int status = lksb->sb_status; - BUG_ON(ocfs2_user_plugin.sp_proto == NULL); + BUG_ON(user_stack.sp_proto == NULL); /* * For now we're punting on the issue of other non-standard errors @@ -693,16 +693,16 @@ static void fsdlm_lock_ast_wrapper(void *astarg) */ if (status == -DLM_EUNLOCK || status == -DLM_ECANCEL) - ocfs2_user_plugin.sp_proto->lp_unlock_ast(astarg, 0); + user_stack.sp_proto->lp_unlock_ast(astarg, 0); else - ocfs2_user_plugin.sp_proto->lp_lock_ast(astarg); + user_stack.sp_proto->lp_lock_ast(astarg); } static void fsdlm_blocking_ast_wrapper(void *astarg, int level) { - BUG_ON(ocfs2_user_plugin.sp_proto == NULL); + BUG_ON(user_stack.sp_proto == NULL); - ocfs2_user_plugin.sp_proto->lp_blocking_ast(astarg, level); + user_stack.sp_proto->lp_blocking_ast(astarg, level); } static int user_dlm_lock(struct ocfs2_cluster_connection *conn, @@ -838,7 +838,7 @@ static int user_cluster_this_node(unsigned int *this_node) return 0; } -static struct ocfs2_stack_operations ocfs2_user_plugin_ops = { +static struct ocfs2_stack_operations user_stack_ops = { .connect = user_cluster_connect, .disconnect = user_cluster_disconnect, .this_node = user_cluster_this_node, @@ -849,20 +849,20 @@ static struct ocfs2_stack_operations ocfs2_user_plugin_ops = { .dump_lksb = user_dlm_dump_lksb, }; -static struct ocfs2_stack_plugin ocfs2_user_plugin = { +static struct ocfs2_stack_plugin user_stack = { .sp_name = "user", - .sp_ops = &ocfs2_user_plugin_ops, + .sp_ops = &user_stack_ops, .sp_owner = THIS_MODULE, }; -static int __init ocfs2_user_plugin_init(void) +static int __init user_stack_init(void) { int rc; rc = ocfs2_control_init(); if (!rc) { - rc = ocfs2_stack_glue_register(&ocfs2_user_plugin); + rc = ocfs2_stack_glue_register(&user_stack); if (rc) ocfs2_control_exit(); } @@ -870,14 +870,14 @@ static int __init ocfs2_user_plugin_init(void) return rc; } -static void __exit ocfs2_user_plugin_exit(void) +static void __exit user_stack_exit(void) { - ocfs2_stack_glue_unregister(&ocfs2_user_plugin); + ocfs2_stack_glue_unregister(&user_stack); ocfs2_control_exit(); } MODULE_AUTHOR("Oracle"); MODULE_DESCRIPTION("ocfs2 driver for userspace cluster stacks"); MODULE_LICENSE("GPL"); -module_init(ocfs2_user_plugin_init); -module_exit(ocfs2_user_plugin_exit); +module_init(user_stack_init); +module_exit(user_stack_exit); diff --git a/trunk/include/asm-blackfin/bfin-global.h b/trunk/include/asm-blackfin/bfin-global.h index 76033831eb35..a9248d883675 100644 --- a/trunk/include/asm-blackfin/bfin-global.h +++ b/trunk/include/asm-blackfin/bfin-global.h @@ -105,6 +105,13 @@ extern int sram_free(const void*); extern void *sram_alloc_with_lsl(size_t, unsigned long); extern int sram_free_with_lsl(const void*); +extern void led_on(int); +extern void led_off(int); +extern void led_toggle(int); +extern void led_disp_num(int); +extern void led_toggle_num(int); +extern void init_leds(void); + extern const char bfin_board_name[]; extern unsigned long wall_jiffies; diff --git a/trunk/include/asm-blackfin/mach-bf527/anomaly.h b/trunk/include/asm-blackfin/mach-bf527/anomaly.h index 4725268a5ada..735fa02fafb2 100644 --- a/trunk/include/asm-blackfin/mach-bf527/anomaly.h +++ b/trunk/include/asm-blackfin/mach-bf527/anomaly.h @@ -15,16 +15,12 @@ /* Multi-Issue Instruction with dsp32shiftimm in slot1 and P-reg Store in slot2 Not Supported */ #define ANOMALY_05000074 (1) -/* DMA_RUN Bit Is Not Valid after a Peripheral Receive Channel DMA Stops */ -#define ANOMALY_05000119 (1) /* Rx.H Cannot Be Used to Access 16-bit System MMR Registers */ #define ANOMALY_05000122 (1) /* Spurious Hardware Error from an Access in the Shadow of a Conditional Branch */ #define ANOMALY_05000245 (1) /* Sensitivity To Noise with Slow Input Edge Rates on External SPORT TX and RX Clocks */ #define ANOMALY_05000265 (1) -/* Errors when SSYNC, CSYNC, or Loads to LT, LB and LC Registers Are Interrupted */ -#define ANOMALY_05000312 (1) /* Incorrect Access of OTP_STATUS During otp_write() Function */ #define ANOMALY_05000328 (1) /* Disallowed Configuration Prevents Subsequent Allowed Configuration on Host DMA Port */ @@ -96,6 +92,7 @@ #define ANOMALY_05000266 (0) #define ANOMALY_05000273 (0) #define ANOMALY_05000311 (0) +#define ANOMALY_05000312 (0) #define ANOMALY_05000323 (0) #define ANOMALY_05000363 (0) diff --git a/trunk/include/asm-blackfin/mach-bf533/anomaly.h b/trunk/include/asm-blackfin/mach-bf533/anomaly.h index 8f7ea112fd3a..5a6dcc5fa36c 100644 --- a/trunk/include/asm-blackfin/mach-bf533/anomaly.h +++ b/trunk/include/asm-blackfin/mach-bf533/anomaly.h @@ -2,7 +2,7 @@ * File: include/asm-blackfin/mach-bf533/anomaly.h * Bugs: Enter bugs at http://blackfin.uclinux.org/ * - * Copyright (C) 2004-2008 Analog Devices Inc. + * Copyright (C) 2004-2007 Analog Devices Inc. * Licensed under the GPL-2 or later. */ @@ -176,21 +176,6 @@ #define ANOMALY_05000315 (1) /* Internal Voltage Regulator Values of 1.05V, 1.10V and 1.15V Not Allowed for LQFP Packages */ #define ANOMALY_05000319 (ANOMALY_BF531 || ANOMALY_BF532) -/* Serial Port (SPORT) Multichannel Transmit Failure when Channel 0 Is Disabled */ -#define ANOMALY_05000357 (1) -/* UART Break Signal Issues */ -#define ANOMALY_05000363 (__SILICON_REVISION__ < 5) -/* PPI Underflow Error Goes Undetected in ITU-R 656 Mode */ -#define ANOMALY_05000366 (1) -/* Possible RETS Register Corruption when Subroutine Is under 5 Cycles in Duration */ -#define ANOMALY_05000371 (1) -/* PPI Does Not Start Properly In Specific Mode */ -#define ANOMALY_05000400 (__SILICON_REVISION__ >= 5) -/* SSYNC Stalls Processor when Executed from Non-Cacheable Memory */ -#define ANOMALY_05000402 (__SILICON_REVISION__ >= 5) -/* Level-Sensitive External GPIO Wakeups May Cause Indefinite Stall */ -#define ANOMALY_05000403 (1) - /* These anomalies have been "phased" out of analog.com anomaly sheets and are * here to show running on older silicon just isn't feasible. @@ -264,6 +249,20 @@ #define ANOMALY_05000192 (__SILICON_REVISION__ < 3) /* Internal Voltage Regulator may not start up */ #define ANOMALY_05000206 (__SILICON_REVISION__ < 3) +/* Serial Port (SPORT) Multichannel Transmit Failure when Channel 0 Is Disabled */ +#define ANOMALY_05000357 (1) +/* UART Break Signal Issues */ +#define ANOMALY_05000363 (__SILICON_REVISION__ < 5) +/* PPI Underflow Error Goes Undetected in ITU-R 656 Mode */ +#define ANOMALY_05000366 (1) +/* Possible RETS Register Corruption when Subroutine Is under 5 Cycles in Duration */ +#define ANOMALY_05000371 (1) +/* PPI Does Not Start Properly In Specific Mode */ +#define ANOMALY_05000400 (__SILICON_REVISION__ == 5) +/* SSYNC Stalls Processor when Executed from Non-Cacheable Memory */ +#define ANOMALY_05000402 (__SILICON_REVISION__ == 5) +/* Level-Sensitive External GPIO Wakeups May Cause Indefinite Stall */ +#define ANOMALY_05000403 (1) /* Anomalies that don't exist on this proc */ #define ANOMALY_05000266 (0) diff --git a/trunk/include/asm-blackfin/mach-bf537/anomaly.h b/trunk/include/asm-blackfin/mach-bf537/anomaly.h index 8460ab9c324f..a6b08facb242 100644 --- a/trunk/include/asm-blackfin/mach-bf537/anomaly.h +++ b/trunk/include/asm-blackfin/mach-bf537/anomaly.h @@ -2,7 +2,7 @@ * File: include/asm-blackfin/mach-bf537/anomaly.h * Bugs: Enter bugs at http://blackfin.uclinux.org/ * - * Copyright (C) 2004-2008 Analog Devices Inc. + * Copyright (C) 2004-2007 Analog Devices Inc. * Licensed under the GPL-2 or later. */ @@ -132,8 +132,8 @@ #define ANOMALY_05000322 (1) /* Ethernet MAC MDIO Reads Do Not Meet IEEE Specification */ #define ANOMALY_05000341 (__SILICON_REVISION__ >= 3) -/* New Feature: UART Remains Enabled after UART Boot */ -#define ANOMALY_05000350 (__SILICON_REVISION__ >= 3) +/* New Feature: UART Remains Enabled after UART Boot (Not Available on Older Silicon) */ +#define ANOMALY_05000350 (__SILICON_REVISION__ < 3) /* Regulator Programming Blocked when Hibernate Wakeup Source Remains Active */ #define ANOMALY_05000355 (1) /* Serial Port (SPORT) Multichannel Transmit Failure when Channel 0 Is Disabled */ @@ -145,10 +145,12 @@ /* Possible RETS Register Corruption when Subroutine Is under 5 Cycles in Duration */ #define ANOMALY_05000371 (1) /* SSYNC Stalls Processor when Executed from Non-Cacheable Memory */ -#define ANOMALY_05000402 (__SILICON_REVISION__ >= 5) +#define ANOMALY_05000402 (__SILICON_REVISION__ >= 3) /* Level-Sensitive External GPIO Wakeups May Cause Indefinite Stall */ #define ANOMALY_05000403 (1) + + /* Anomalies that don't exist on this proc */ #define ANOMALY_05000125 (0) #define ANOMALY_05000158 (0) diff --git a/trunk/include/asm-blackfin/mach-bf548/anomaly.h b/trunk/include/asm-blackfin/mach-bf548/anomaly.h index 3ad59655881a..49d3cebc5293 100644 --- a/trunk/include/asm-blackfin/mach-bf548/anomaly.h +++ b/trunk/include/asm-blackfin/mach-bf548/anomaly.h @@ -75,8 +75,6 @@ #define ANOMALY_05000365 (1) /* Addressing Conflict between Boot ROM and Asynchronous Memory */ #define ANOMALY_05000369 (1) -/* Possible RETS Register Corruption when Subroutine Is under 5 Cycles in Duration */ -#define ANOMALY_05000371 (1) /* Mobile DDR Operation Not Functional */ #define ANOMALY_05000377 (1) /* Security/Authentication Speedpath Causes Authentication To Fail To Initiate */ diff --git a/trunk/include/asm-blackfin/mach-bf561/anomaly.h b/trunk/include/asm-blackfin/mach-bf561/anomaly.h index 5c5d7d7d695f..82157caa96a2 100644 --- a/trunk/include/asm-blackfin/mach-bf561/anomaly.h +++ b/trunk/include/asm-blackfin/mach-bf561/anomaly.h @@ -2,7 +2,7 @@ * File: include/asm-blackfin/mach-bf561/anomaly.h * Bugs: Enter bugs at http://blackfin.uclinux.org/ * - * Copyright (C) 2004-2008 Analog Devices Inc. + * Copyright (C) 2004-2007 Analog Devices Inc. * Licensed under the GPL-2 or later. */ diff --git a/trunk/include/asm-ia64/patch.h b/trunk/include/asm-ia64/patch.h index 295fe6ab4584..a71543084fb4 100644 --- a/trunk/include/asm-ia64/patch.h +++ b/trunk/include/asm-ia64/patch.h @@ -21,7 +21,6 @@ extern void ia64_patch_imm60 (u64 insn_addr, u64 val); /* patch "brl" w/ip-rel extern void ia64_patch_mckinley_e9 (unsigned long start, unsigned long end); extern void ia64_patch_vtop (unsigned long start, unsigned long end); extern void ia64_patch_phys_stack_reg(unsigned long val); -extern void ia64_patch_rse (unsigned long start, unsigned long end); extern void ia64_patch_gate (void); #endif /* _ASM_IA64_PATCH_H */ diff --git a/trunk/include/asm-ia64/ptrace.h b/trunk/include/asm-ia64/ptrace.h index 15f8dcfe6eee..4b2a8d40ebc5 100644 --- a/trunk/include/asm-ia64/ptrace.h +++ b/trunk/include/asm-ia64/ptrace.h @@ -76,7 +76,7 @@ # define KERNEL_STACK_SIZE_ORDER 0 #endif -#define IA64_RBS_OFFSET ((IA64_TASK_SIZE + IA64_THREAD_INFO_SIZE + 31) & ~31) +#define IA64_RBS_OFFSET ((IA64_TASK_SIZE + IA64_THREAD_INFO_SIZE + 15) & ~15) #define IA64_STK_OFFSET ((1 << KERNEL_STACK_SIZE_ORDER)*PAGE_SIZE) #define KERNEL_STACK_SIZE IA64_STK_OFFSET diff --git a/trunk/include/asm-ia64/sections.h b/trunk/include/asm-ia64/sections.h index 7286e4a9fe84..dc42a359894f 100644 --- a/trunk/include/asm-ia64/sections.h +++ b/trunk/include/asm-ia64/sections.h @@ -10,7 +10,6 @@ extern char __per_cpu_start[], __per_cpu_end[], __phys_per_cpu_start[]; extern char __start___vtop_patchlist[], __end___vtop_patchlist[]; -extern char __start___rse_patchlist[], __end___rse_patchlist[]; extern char __start___mckinley_e9_bundles[], __end___mckinley_e9_bundles[]; extern char __start___phys_stack_reg_patchlist[], __end___phys_stack_reg_patchlist[]; extern char __start_gate_section[]; diff --git a/trunk/include/asm-powerpc/io.h b/trunk/include/asm-powerpc/io.h index 89189488e286..e0062d73db1c 100644 --- a/trunk/include/asm-powerpc/io.h +++ b/trunk/include/asm-powerpc/io.h @@ -100,7 +100,7 @@ static inline type name(const volatile type __iomem *addr) \ { \ type ret; \ __asm__ __volatile__("sync;" insn ";twi 0,%0,0;isync" \ - : "=r" (ret) : "r" (addr), "m" (*addr) : "memory"); \ + : "=r" (ret) : "r" (addr), "m" (*addr)); \ return ret; \ } @@ -108,8 +108,8 @@ static inline type name(const volatile type __iomem *addr) \ static inline void name(volatile type __iomem *addr, type val) \ { \ __asm__ __volatile__("sync;" insn \ - : "=m" (*addr) : "r" (val), "r" (addr) : "memory"); \ - IO_SET_SYNC_FLAG(); \ + : "=m" (*addr) : "r" (val), "r" (addr)); \ + IO_SET_SYNC_FLAG(); \ } @@ -333,8 +333,7 @@ static inline unsigned int name(unsigned int port) \ " .long 3b,5b\n" \ ".previous" \ : "=&r" (x) \ - : "r" (port + _IO_BASE) \ - : "memory"); \ + : "r" (port + _IO_BASE)); \ return x; \ } @@ -351,8 +350,7 @@ static inline void name(unsigned int val, unsigned int port) \ " .long 0b,2b\n" \ " .long 1b,2b\n" \ ".previous" \ - : : "r" (val), "r" (port + _IO_BASE) \ - : "memory"); \ + : : "r" (val), "r" (port + _IO_BASE)); \ } __do_in_asm(_rec_inb, "lbzx") diff --git a/trunk/include/asm-s390/types.h b/trunk/include/asm-s390/types.h index 41c547656130..0e959e20e9a3 100644 --- a/trunk/include/asm-s390/types.h +++ b/trunk/include/asm-s390/types.h @@ -40,13 +40,7 @@ typedef __signed__ long saddr_t; #ifndef __ASSEMBLY__ -typedef u64 dma64_addr_t; -#ifdef __s390x__ -/* DMA addresses come in 32-bit and 64-bit flavours. */ -typedef u64 dma_addr_t; -#else typedef u32 dma_addr_t; -#endif #ifndef __s390x__ typedef union { diff --git a/trunk/include/linux/device.h b/trunk/include/linux/device.h index 6a2d04c011bc..14616e80213c 100644 --- a/trunk/include/linux/device.h +++ b/trunk/include/linux/device.h @@ -385,9 +385,6 @@ static inline const char *dev_name(struct device *dev) return dev->bus_id; } -extern int dev_set_name(struct device *dev, const char *name, ...) - __attribute__((format(printf, 2, 3))); - #ifdef CONFIG_NUMA static inline int dev_to_node(struct device *dev) { 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/sched.h b/trunk/include/linux/sched.h index ae0be3c62375..3e05e5474749 100644 --- a/trunk/include/linux/sched.h +++ b/trunk/include/linux/sched.h @@ -766,6 +766,7 @@ struct sched_domain { struct sched_domain *child; /* bottom domain must be null terminated */ struct sched_group *groups; /* the balancing groups of the domain */ cpumask_t span; /* span of all CPUs in this domain */ + int first_cpu; /* cache of the first cpu in this domain */ unsigned long min_interval; /* Minimum balance interval ms */ unsigned long max_interval; /* Maximum balance interval ms */ unsigned int busy_factor; /* less balancing by factor if busy */ diff --git a/trunk/include/linux/serial_core.h b/trunk/include/linux/serial_core.h index d8f31de632c5..d32123ae08ad 100644 --- a/trunk/include/linux/serial_core.h +++ b/trunk/include/linux/serial_core.h @@ -192,7 +192,6 @@ struct uart_ops { void (*shutdown)(struct uart_port *); void (*set_termios)(struct uart_port *, struct ktermios *new, struct ktermios *old); - void (*set_ldisc)(struct uart_port *); void (*pm)(struct uart_port *, unsigned int state, unsigned int oldstate); int (*set_wake)(struct uart_port *, unsigned int state); diff --git a/trunk/include/linux/spi/mmc_spi.h b/trunk/include/linux/spi/mmc_spi.h index d5ca78b93a3b..e9bbe3ebd721 100644 --- a/trunk/include/linux/spi/mmc_spi.h +++ b/trunk/include/linux/spi/mmc_spi.h @@ -1,8 +1,6 @@ #ifndef __LINUX_SPI_MMC_SPI_H #define __LINUX_SPI_MMC_SPI_H -#include - struct device; struct mmc_host; diff --git a/trunk/include/linux/topology.h b/trunk/include/linux/topology.h index 24f3d2282e11..4bb7074a2c3a 100644 --- a/trunk/include/linux/topology.h +++ b/trunk/include/linux/topology.h @@ -166,9 +166,7 @@ void arch_update_cpu_topology(void); .busy_idx = 3, \ .idle_idx = 3, \ .flags = SD_LOAD_BALANCE \ - | SD_BALANCE_NEWIDLE \ - | SD_WAKE_AFFINE \ - | SD_SERIALIZE, \ + | SD_SERIALIZE, \ .last_balance = jiffies, \ .balance_interval = 64, \ } 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/kernel/kgdb.c b/trunk/kernel/kgdb.c index 14787de568b3..79e3c90113c2 100644 --- a/trunk/kernel/kgdb.c +++ b/trunk/kernel/kgdb.c @@ -52,6 +52,7 @@ #include #include #include +#include static int kgdb_break_asap; @@ -227,8 +228,6 @@ void __weak kgdb_disable_hw_debug(struct pt_regs *regs) * GDB remote protocol parser: */ -static const char hexchars[] = "0123456789abcdef"; - static int hex(char ch) { if ((ch >= 'a') && (ch <= 'f')) @@ -316,8 +315,8 @@ static void put_packet(char *buffer) } kgdb_io_ops->write_char('#'); - kgdb_io_ops->write_char(hexchars[checksum >> 4]); - kgdb_io_ops->write_char(hexchars[checksum & 0xf]); + kgdb_io_ops->write_char(hex_asc_hi(checksum)); + kgdb_io_ops->write_char(hex_asc_lo(checksum)); if (kgdb_io_ops->flush) kgdb_io_ops->flush(); @@ -478,8 +477,8 @@ static void error_packet(char *pkt, int error) { error = -error; pkt[0] = 'E'; - pkt[1] = hexchars[(error / 10)]; - pkt[2] = hexchars[(error % 10)]; + pkt[1] = hex_asc[(error / 10)]; + pkt[2] = hex_asc[(error % 10)]; pkt[3] = '\0'; } @@ -510,10 +509,7 @@ static void int_to_threadref(unsigned char *id, int value) scan = (unsigned char *)id; while (i--) *scan++ = 0; - *scan++ = (value >> 24) & 0xff; - *scan++ = (value >> 16) & 0xff; - *scan++ = (value >> 8) & 0xff; - *scan++ = (value & 0xff); + put_unaligned_be32(value, scan); } static struct task_struct *getthread(struct pt_regs *regs, int tid) diff --git a/trunk/kernel/sched.c b/trunk/kernel/sched.c index bfb8ad8ed171..cfa222a91539 100644 --- a/trunk/kernel/sched.c +++ b/trunk/kernel/sched.c @@ -136,7 +136,7 @@ static inline void sg_inc_cpu_power(struct sched_group *sg, u32 val) static inline int rt_policy(int policy) { - if (unlikely(policy == SCHED_FIFO || policy == SCHED_RR)) + if (unlikely(policy == SCHED_FIFO) || unlikely(policy == SCHED_RR)) return 1; return 0; } @@ -398,6 +398,43 @@ struct cfs_rq { */ struct list_head leaf_cfs_rq_list; struct task_group *tg; /* group that "owns" this runqueue */ + +#ifdef CONFIG_SMP + unsigned long task_weight; + unsigned long shares; + /* + * We need space to build a sched_domain wide view of the full task + * group tree, in order to avoid depending on dynamic memory allocation + * during the load balancing we place this in the per cpu task group + * hierarchy. This limits the load balancing to one instance per cpu, + * but more should not be needed anyway. + */ + struct aggregate_struct { + /* + * load = weight(cpus) * f(tg) + * + * Where f(tg) is the recursive weight fraction assigned to + * this group. + */ + unsigned long load; + + /* + * part of the group weight distributed to this span. + */ + unsigned long shares; + + /* + * The sum of all runqueue weights within this span. + */ + unsigned long rq_weight; + + /* + * Weight contributed by tasks; this is the part we can + * influence by moving tasks around. + */ + unsigned long task_weight; + } aggregate; +#endif #endif }; @@ -1331,6 +1368,9 @@ static void __resched_task(struct task_struct *p, int tif_bit) */ #define SRR(x, y) (((x) + (1UL << ((y) - 1))) >> (y)) +/* + * delta *= weight / lw + */ static unsigned long calc_delta_mine(unsigned long delta_exec, unsigned long weight, struct load_weight *lw) @@ -1353,12 +1393,6 @@ calc_delta_mine(unsigned long delta_exec, unsigned long weight, return (unsigned long)min(tmp, (u64)(unsigned long)LONG_MAX); } -static inline unsigned long -calc_delta_fair(unsigned long delta_exec, struct load_weight *lw) -{ - return calc_delta_mine(delta_exec, NICE_0_LOAD, lw); -} - static inline void update_load_add(struct load_weight *lw, unsigned long inc) { lw->weight += inc; @@ -1471,6 +1505,326 @@ static unsigned long source_load(int cpu, int type); static unsigned long target_load(int cpu, int type); static unsigned long cpu_avg_load_per_task(int cpu); static int task_hot(struct task_struct *p, u64 now, struct sched_domain *sd); + +#ifdef CONFIG_FAIR_GROUP_SCHED + +/* + * Group load balancing. + * + * We calculate a few balance domain wide aggregate numbers; load and weight. + * Given the pictures below, and assuming each item has equal weight: + * + * root 1 - thread + * / | \ A - group + * A 1 B + * /|\ / \ + * C 2 D 3 4 + * | | + * 5 6 + * + * load: + * A and B get 1/3-rd of the total load. C and D get 1/3-rd of A's 1/3-rd, + * which equals 1/9-th of the total load. + * + * shares: + * The weight of this group on the selected cpus. + * + * rq_weight: + * Direct sum of all the cpu's their rq weight, e.g. A would get 3 while + * B would get 2. + * + * task_weight: + * Part of the rq_weight contributed by tasks; all groups except B would + * get 1, B gets 2. + */ + +static inline struct aggregate_struct * +aggregate(struct task_group *tg, struct sched_domain *sd) +{ + return &tg->cfs_rq[sd->first_cpu]->aggregate; +} + +typedef void (*aggregate_func)(struct task_group *, struct sched_domain *); + +/* + * Iterate the full tree, calling @down when first entering a node and @up when + * leaving it for the final time. + */ +static +void aggregate_walk_tree(aggregate_func down, aggregate_func up, + struct sched_domain *sd) +{ + struct task_group *parent, *child; + + rcu_read_lock(); + parent = &root_task_group; +down: + (*down)(parent, sd); + list_for_each_entry_rcu(child, &parent->children, siblings) { + parent = child; + goto down; + +up: + continue; + } + (*up)(parent, sd); + + child = parent; + parent = parent->parent; + if (parent) + goto up; + rcu_read_unlock(); +} + +/* + * Calculate the aggregate runqueue weight. + */ +static +void aggregate_group_weight(struct task_group *tg, struct sched_domain *sd) +{ + unsigned long rq_weight = 0; + unsigned long task_weight = 0; + int i; + + for_each_cpu_mask(i, sd->span) { + rq_weight += tg->cfs_rq[i]->load.weight; + task_weight += tg->cfs_rq[i]->task_weight; + } + + aggregate(tg, sd)->rq_weight = rq_weight; + aggregate(tg, sd)->task_weight = task_weight; +} + +/* + * Compute the weight of this group on the given cpus. + */ +static +void aggregate_group_shares(struct task_group *tg, struct sched_domain *sd) +{ + unsigned long shares = 0; + int i; + + for_each_cpu_mask(i, sd->span) + shares += tg->cfs_rq[i]->shares; + + if ((!shares && aggregate(tg, sd)->rq_weight) || shares > tg->shares) + shares = tg->shares; + + aggregate(tg, sd)->shares = shares; +} + +/* + * Compute the load fraction assigned to this group, relies on the aggregate + * weight and this group's parent's load, i.e. top-down. + */ +static +void aggregate_group_load(struct task_group *tg, struct sched_domain *sd) +{ + unsigned long load; + + if (!tg->parent) { + int i; + + load = 0; + for_each_cpu_mask(i, sd->span) + load += cpu_rq(i)->load.weight; + + } else { + load = aggregate(tg->parent, sd)->load; + + /* + * shares is our weight in the parent's rq so + * shares/parent->rq_weight gives our fraction of the load + */ + load *= aggregate(tg, sd)->shares; + load /= aggregate(tg->parent, sd)->rq_weight + 1; + } + + aggregate(tg, sd)->load = load; +} + +static void __set_se_shares(struct sched_entity *se, unsigned long shares); + +/* + * Calculate and set the cpu's group shares. + */ +static void +__update_group_shares_cpu(struct task_group *tg, struct sched_domain *sd, + int tcpu) +{ + int boost = 0; + unsigned long shares; + unsigned long rq_weight; + + if (!tg->se[tcpu]) + return; + + rq_weight = tg->cfs_rq[tcpu]->load.weight; + + /* + * If there are currently no tasks on the cpu pretend there is one of + * average load so that when a new task gets to run here it will not + * get delayed by group starvation. + */ + if (!rq_weight) { + boost = 1; + rq_weight = NICE_0_LOAD; + } + + /* + * \Sum shares * rq_weight + * shares = ----------------------- + * \Sum rq_weight + * + */ + shares = aggregate(tg, sd)->shares * rq_weight; + shares /= aggregate(tg, sd)->rq_weight + 1; + + /* + * record the actual number of shares, not the boosted amount. + */ + tg->cfs_rq[tcpu]->shares = boost ? 0 : shares; + + if (shares < MIN_SHARES) + shares = MIN_SHARES; + else if (shares > MAX_SHARES) + shares = MAX_SHARES; + + __set_se_shares(tg->se[tcpu], shares); +} + +/* + * Re-adjust the weights on the cpu the task came from and on the cpu the + * task went to. + */ +static void +__move_group_shares(struct task_group *tg, struct sched_domain *sd, + int scpu, int dcpu) +{ + unsigned long shares; + + shares = tg->cfs_rq[scpu]->shares + tg->cfs_rq[dcpu]->shares; + + __update_group_shares_cpu(tg, sd, scpu); + __update_group_shares_cpu(tg, sd, dcpu); + + /* + * ensure we never loose shares due to rounding errors in the + * above redistribution. + */ + shares -= tg->cfs_rq[scpu]->shares + tg->cfs_rq[dcpu]->shares; + if (shares) + tg->cfs_rq[dcpu]->shares += shares; +} + +/* + * Because changing a group's shares changes the weight of the super-group + * we need to walk up the tree and change all shares until we hit the root. + */ +static void +move_group_shares(struct task_group *tg, struct sched_domain *sd, + int scpu, int dcpu) +{ + while (tg) { + __move_group_shares(tg, sd, scpu, dcpu); + tg = tg->parent; + } +} + +static +void aggregate_group_set_shares(struct task_group *tg, struct sched_domain *sd) +{ + unsigned long shares = aggregate(tg, sd)->shares; + int i; + + for_each_cpu_mask(i, sd->span) { + struct rq *rq = cpu_rq(i); + unsigned long flags; + + spin_lock_irqsave(&rq->lock, flags); + __update_group_shares_cpu(tg, sd, i); + spin_unlock_irqrestore(&rq->lock, flags); + } + + aggregate_group_shares(tg, sd); + + /* + * ensure we never loose shares due to rounding errors in the + * above redistribution. + */ + shares -= aggregate(tg, sd)->shares; + if (shares) { + tg->cfs_rq[sd->first_cpu]->shares += shares; + aggregate(tg, sd)->shares += shares; + } +} + +/* + * Calculate the accumulative weight and recursive load of each task group + * while walking down the tree. + */ +static +void aggregate_get_down(struct task_group *tg, struct sched_domain *sd) +{ + aggregate_group_weight(tg, sd); + aggregate_group_shares(tg, sd); + aggregate_group_load(tg, sd); +} + +/* + * Rebalance the cpu shares while walking back up the tree. + */ +static +void aggregate_get_up(struct task_group *tg, struct sched_domain *sd) +{ + aggregate_group_set_shares(tg, sd); +} + +static DEFINE_PER_CPU(spinlock_t, aggregate_lock); + +static void __init init_aggregate(void) +{ + int i; + + for_each_possible_cpu(i) + spin_lock_init(&per_cpu(aggregate_lock, i)); +} + +static int get_aggregate(struct sched_domain *sd) +{ + if (!spin_trylock(&per_cpu(aggregate_lock, sd->first_cpu))) + return 0; + + aggregate_walk_tree(aggregate_get_down, aggregate_get_up, sd); + return 1; +} + +static void put_aggregate(struct sched_domain *sd) +{ + spin_unlock(&per_cpu(aggregate_lock, sd->first_cpu)); +} + +static void cfs_rq_set_shares(struct cfs_rq *cfs_rq, unsigned long shares) +{ + cfs_rq->shares = shares; +} + +#else + +static inline void init_aggregate(void) +{ +} + +static inline int get_aggregate(struct sched_domain *sd) +{ + return 0; +} + +static inline void put_aggregate(struct sched_domain *sd) +{ +} +#endif + #else /* CONFIG_SMP */ #ifdef CONFIG_FAIR_GROUP_SCHED @@ -1491,26 +1845,14 @@ static void cfs_rq_set_shares(struct cfs_rq *cfs_rq, unsigned long shares) #define sched_class_highest (&rt_sched_class) -static inline void inc_load(struct rq *rq, const struct task_struct *p) -{ - update_load_add(&rq->load, p->se.load.weight); -} - -static inline void dec_load(struct rq *rq, const struct task_struct *p) -{ - update_load_sub(&rq->load, p->se.load.weight); -} - -static void inc_nr_running(struct task_struct *p, struct rq *rq) +static void inc_nr_running(struct rq *rq) { rq->nr_running++; - inc_load(rq, p); } -static void dec_nr_running(struct task_struct *p, struct rq *rq) +static void dec_nr_running(struct rq *rq) { rq->nr_running--; - dec_load(rq, p); } static void set_load_weight(struct task_struct *p) @@ -1602,7 +1944,7 @@ static void activate_task(struct rq *rq, struct task_struct *p, int wakeup) rq->nr_uninterruptible--; enqueue_task(rq, p, wakeup); - inc_nr_running(p, rq); + inc_nr_running(rq); } /* @@ -1614,7 +1956,7 @@ static void deactivate_task(struct rq *rq, struct task_struct *p, int sleep) rq->nr_uninterruptible++; dequeue_task(rq, p, sleep); - dec_nr_running(p, rq); + dec_nr_running(rq); } /** @@ -2267,7 +2609,7 @@ void wake_up_new_task(struct task_struct *p, unsigned long clone_flags) * management (if any): */ p->sched_class->task_new(rq, p); - inc_nr_running(p, rq); + inc_nr_running(rq); } check_preempt_curr(rq, p); #ifdef CONFIG_SMP @@ -3258,9 +3600,12 @@ static int load_balance(int this_cpu, struct rq *this_rq, unsigned long imbalance; struct rq *busiest; unsigned long flags; + int unlock_aggregate; cpus_setall(*cpus); + unlock_aggregate = get_aggregate(sd); + /* * When power savings policy is enabled for the parent domain, idle * sibling can pick up load irrespective of busy siblings. In this case, @@ -3376,8 +3721,9 @@ static int load_balance(int this_cpu, struct rq *this_rq, if (!ld_moved && !sd_idle && sd->flags & SD_SHARE_CPUPOWER && !test_sd_parent(sd, SD_POWERSAVINGS_BALANCE)) - return -1; - return ld_moved; + ld_moved = -1; + + goto out; out_balanced: schedstat_inc(sd, lb_balanced[idle]); @@ -3392,8 +3738,13 @@ static int load_balance(int this_cpu, struct rq *this_rq, if (!sd_idle && sd->flags & SD_SHARE_CPUPOWER && !test_sd_parent(sd, SD_POWERSAVINGS_BALANCE)) - return -1; - return 0; + ld_moved = -1; + else + ld_moved = 0; +out: + if (unlock_aggregate) + put_aggregate(sd); + return ld_moved; } /* @@ -4079,7 +4430,7 @@ static inline void schedule_debug(struct task_struct *prev) * schedule() atomically, we ignore that path for now. * Otherwise, whine if we are scheduling when we should not be. */ - if (unlikely(in_atomic_preempt_off() && !prev->exit_state)) + if (unlikely(in_atomic_preempt_off()) && unlikely(!prev->exit_state)) __schedule_bug(prev); profile_hit(SCHED_PROFILING, __builtin_return_address(0)); @@ -4580,10 +4931,8 @@ void set_user_nice(struct task_struct *p, long nice) goto out_unlock; } on_rq = p->se.on_rq; - if (on_rq) { + if (on_rq) dequeue_task(rq, p, 0); - dec_load(rq, p); - } p->static_prio = NICE_TO_PRIO(nice); set_load_weight(p); @@ -4593,7 +4942,6 @@ void set_user_nice(struct task_struct *p, long nice) if (on_rq) { enqueue_task(rq, p, 0); - inc_load(rq, p); /* * If the task increased its priority or is running and * lowered its priority, then reschedule its CPU: @@ -6968,6 +7316,7 @@ static int __build_sched_domains(const cpumask_t *cpu_map, SD_INIT(sd, ALLNODES); set_domain_attribute(sd, attr); sd->span = *cpu_map; + sd->first_cpu = first_cpu(sd->span); cpu_to_allnodes_group(i, cpu_map, &sd->groups, tmpmask); p = sd; sd_allnodes = 1; @@ -6978,6 +7327,7 @@ static int __build_sched_domains(const cpumask_t *cpu_map, SD_INIT(sd, NODE); set_domain_attribute(sd, attr); sched_domain_node_span(cpu_to_node(i), &sd->span); + sd->first_cpu = first_cpu(sd->span); sd->parent = p; if (p) p->child = sd; @@ -6989,6 +7339,7 @@ static int __build_sched_domains(const cpumask_t *cpu_map, SD_INIT(sd, CPU); set_domain_attribute(sd, attr); sd->span = *nodemask; + sd->first_cpu = first_cpu(sd->span); sd->parent = p; if (p) p->child = sd; @@ -7000,6 +7351,7 @@ static int __build_sched_domains(const cpumask_t *cpu_map, SD_INIT(sd, MC); set_domain_attribute(sd, attr); sd->span = cpu_coregroup_map(i); + sd->first_cpu = first_cpu(sd->span); cpus_and(sd->span, sd->span, *cpu_map); sd->parent = p; p->child = sd; @@ -7012,6 +7364,7 @@ static int __build_sched_domains(const cpumask_t *cpu_map, SD_INIT(sd, SIBLING); set_domain_attribute(sd, attr); sd->span = per_cpu(cpu_sibling_map, i); + sd->first_cpu = first_cpu(sd->span); cpus_and(sd->span, sd->span, *cpu_map); sd->parent = p; p->child = sd; @@ -7215,8 +7568,8 @@ static int build_sched_domains(const cpumask_t *cpu_map) static cpumask_t *doms_cur; /* current sched domains */ static int ndoms_cur; /* number of sched domains in 'doms_cur' */ -static struct sched_domain_attr *dattr_cur; - /* attribues of custom domains in 'doms_cur' */ +static struct sched_domain_attr *dattr_cur; /* attribues of custom domains + in 'doms_cur' */ /* * Special case: If a kmalloc of a doms_cur partition (array of @@ -7681,6 +8034,7 @@ void __init sched_init(void) } #ifdef CONFIG_SMP + init_aggregate(); init_defrootdomain(); #endif @@ -8245,14 +8599,11 @@ void sched_move_task(struct task_struct *tsk) #endif #ifdef CONFIG_FAIR_GROUP_SCHED -static void set_se_shares(struct sched_entity *se, unsigned long shares) +static void __set_se_shares(struct sched_entity *se, unsigned long shares) { struct cfs_rq *cfs_rq = se->cfs_rq; - struct rq *rq = cfs_rq->rq; int on_rq; - spin_lock_irq(&rq->lock); - on_rq = se->on_rq; if (on_rq) dequeue_entity(cfs_rq, se, 0); @@ -8262,8 +8613,17 @@ static void set_se_shares(struct sched_entity *se, unsigned long shares) if (on_rq) enqueue_entity(cfs_rq, se, 0); +} - spin_unlock_irq(&rq->lock); +static void set_se_shares(struct sched_entity *se, unsigned long shares) +{ + struct cfs_rq *cfs_rq = se->cfs_rq; + struct rq *rq = cfs_rq->rq; + unsigned long flags; + + spin_lock_irqsave(&rq->lock, flags); + __set_se_shares(se, shares); + spin_unlock_irqrestore(&rq->lock, flags); } static DEFINE_MUTEX(shares_mutex); @@ -8302,8 +8662,13 @@ int sched_group_set_shares(struct task_group *tg, unsigned long shares) * w/o tripping rebalance_share or load_balance_fair. */ tg->shares = shares; - for_each_possible_cpu(i) + for_each_possible_cpu(i) { + /* + * force a rebalance + */ + cfs_rq_set_shares(tg->cfs_rq[i], 0); set_se_shares(tg->se[i], shares); + } /* * Enable load balance activity on this group, by inserting it back on diff --git a/trunk/kernel/sched_clock.c b/trunk/kernel/sched_clock.c index ce05271219ab..9c597e37f7de 100644 --- a/trunk/kernel/sched_clock.c +++ b/trunk/kernel/sched_clock.c @@ -59,26 +59,22 @@ static inline struct sched_clock_data *cpu_sdc(int cpu) return &per_cpu(sched_clock_data, cpu); } -static __read_mostly int sched_clock_running; - void sched_clock_init(void) { u64 ktime_now = ktime_to_ns(ktime_get()); - unsigned long now_jiffies = jiffies; + u64 now = 0; int cpu; for_each_possible_cpu(cpu) { struct sched_clock_data *scd = cpu_sdc(cpu); scd->lock = (raw_spinlock_t)__RAW_SPIN_LOCK_UNLOCKED; - scd->prev_jiffies = now_jiffies; - scd->prev_raw = 0; - scd->tick_raw = 0; + scd->prev_jiffies = jiffies; + scd->prev_raw = now; + scd->tick_raw = now; scd->tick_gtod = ktime_now; scd->clock = ktime_now; } - - sched_clock_running = 1; } /* @@ -140,9 +136,6 @@ u64 sched_clock_cpu(int cpu) struct sched_clock_data *scd = cpu_sdc(cpu); u64 now, clock; - if (unlikely(!sched_clock_running)) - return 0ull; - WARN_ON_ONCE(!irqs_disabled()); now = sched_clock(); @@ -181,9 +174,6 @@ void sched_clock_tick(void) struct sched_clock_data *scd = this_scd(); u64 now, now_gtod; - if (unlikely(!sched_clock_running)) - return; - WARN_ON_ONCE(!irqs_disabled()); now = sched_clock(); diff --git a/trunk/kernel/sched_debug.c b/trunk/kernel/sched_debug.c index 8bb713040ac9..5f06118fbc31 100644 --- a/trunk/kernel/sched_debug.c +++ b/trunk/kernel/sched_debug.c @@ -167,6 +167,11 @@ void print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq) #endif SEQ_printf(m, " .%-30s: %ld\n", "nr_spread_over", cfs_rq->nr_spread_over); +#ifdef CONFIG_FAIR_GROUP_SCHED +#ifdef CONFIG_SMP + SEQ_printf(m, " .%-30s: %lu\n", "shares", cfs_rq->shares); +#endif +#endif } static void print_cpu(struct seq_file *m, int cpu) diff --git a/trunk/kernel/sched_fair.c b/trunk/kernel/sched_fair.c index 08ae848b71d4..e24ecd39c4b8 100644 --- a/trunk/kernel/sched_fair.c +++ b/trunk/kernel/sched_fair.c @@ -333,6 +333,34 @@ int sched_nr_latency_handler(struct ctl_table *table, int write, } #endif +/* + * delta *= w / rw + */ +static inline unsigned long +calc_delta_weight(unsigned long delta, struct sched_entity *se) +{ + for_each_sched_entity(se) { + delta = calc_delta_mine(delta, + se->load.weight, &cfs_rq_of(se)->load); + } + + return delta; +} + +/* + * delta *= rw / w + */ +static inline unsigned long +calc_delta_fair(unsigned long delta, struct sched_entity *se) +{ + for_each_sched_entity(se) { + delta = calc_delta_mine(delta, + cfs_rq_of(se)->load.weight, &se->load); + } + + return delta; +} + /* * The idea is to set a period in which each task runs once. * @@ -362,47 +390,54 @@ static u64 __sched_period(unsigned long nr_running) */ static u64 sched_slice(struct cfs_rq *cfs_rq, struct sched_entity *se) { - u64 slice = __sched_period(cfs_rq->nr_running); - - for_each_sched_entity(se) { - cfs_rq = cfs_rq_of(se); - - slice *= se->load.weight; - do_div(slice, cfs_rq->load.weight); - } - - - return slice; + return calc_delta_weight(__sched_period(cfs_rq->nr_running), se); } /* * We calculate the vruntime slice of a to be inserted task * - * vs = s/w = p/rw + * vs = s*rw/w = p */ static u64 sched_vslice_add(struct cfs_rq *cfs_rq, struct sched_entity *se) { unsigned long nr_running = cfs_rq->nr_running; - unsigned long weight; - u64 vslice; if (!se->on_rq) nr_running++; - vslice = __sched_period(nr_running); + return __sched_period(nr_running); +} + +/* + * The goal of calc_delta_asym() is to be asymmetrically around NICE_0_LOAD, in + * that it favours >=0 over <0. + * + * -20 | + * | + * 0 --------+------- + * .' + * 19 .' + * + */ +static unsigned long +calc_delta_asym(unsigned long delta, struct sched_entity *se) +{ + struct load_weight lw = { + .weight = NICE_0_LOAD, + .inv_weight = 1UL << (WMULT_SHIFT-NICE_0_SHIFT) + }; for_each_sched_entity(se) { - cfs_rq = cfs_rq_of(se); + struct load_weight *se_lw = &se->load; - weight = cfs_rq->load.weight; - if (!se->on_rq) - weight += se->load.weight; + if (se->load.weight < NICE_0_LOAD) + se_lw = &lw; - vslice *= NICE_0_LOAD; - do_div(vslice, weight); + delta = calc_delta_mine(delta, + cfs_rq_of(se)->load.weight, se_lw); } - return vslice; + return delta; } /* @@ -419,11 +454,7 @@ __update_curr(struct cfs_rq *cfs_rq, struct sched_entity *curr, curr->sum_exec_runtime += delta_exec; schedstat_add(cfs_rq, exec_clock, delta_exec); - delta_exec_weighted = delta_exec; - if (unlikely(curr->load.weight != NICE_0_LOAD)) { - delta_exec_weighted = calc_delta_fair(delta_exec_weighted, - &curr->load); - } + delta_exec_weighted = calc_delta_fair(delta_exec, curr); curr->vruntime += delta_exec_weighted; } @@ -510,10 +541,27 @@ update_stats_curr_start(struct cfs_rq *cfs_rq, struct sched_entity *se) * Scheduling class queueing methods: */ +#if defined CONFIG_SMP && defined CONFIG_FAIR_GROUP_SCHED +static void +add_cfs_task_weight(struct cfs_rq *cfs_rq, unsigned long weight) +{ + cfs_rq->task_weight += weight; +} +#else +static inline void +add_cfs_task_weight(struct cfs_rq *cfs_rq, unsigned long weight) +{ +} +#endif + static void account_entity_enqueue(struct cfs_rq *cfs_rq, struct sched_entity *se) { update_load_add(&cfs_rq->load, se->load.weight); + if (!parent_entity(se)) + inc_cpu_load(rq_of(cfs_rq), se->load.weight); + if (entity_is_task(se)) + add_cfs_task_weight(cfs_rq, se->load.weight); cfs_rq->nr_running++; se->on_rq = 1; list_add(&se->group_node, &cfs_rq->tasks); @@ -523,6 +571,10 @@ static void account_entity_dequeue(struct cfs_rq *cfs_rq, struct sched_entity *se) { update_load_sub(&cfs_rq->load, se->load.weight); + if (!parent_entity(se)) + dec_cpu_load(rq_of(cfs_rq), se->load.weight); + if (entity_is_task(se)) + add_cfs_task_weight(cfs_rq, -se->load.weight); cfs_rq->nr_running--; se->on_rq = 0; list_del_init(&se->group_node); @@ -609,8 +661,17 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial) if (!initial) { /* sleeps upto a single latency don't count. */ - if (sched_feat(NEW_FAIR_SLEEPERS)) - vruntime -= sysctl_sched_latency; + if (sched_feat(NEW_FAIR_SLEEPERS)) { + unsigned long thresh = sysctl_sched_latency; + + /* + * convert the sleeper threshold into virtual time + */ + if (sched_feat(NORMALIZED_SLEEPER)) + thresh = calc_delta_fair(thresh, se); + + vruntime -= thresh; + } /* ensure we never gain time by being placed backwards. */ vruntime = max_vruntime(se->vruntime, vruntime); @@ -996,27 +1057,16 @@ wake_affine(struct rq *rq, struct sched_domain *this_sd, struct rq *this_rq, struct task_struct *curr = this_rq->curr; unsigned long tl = this_load; unsigned long tl_per_task; - int balanced; - if (!(this_sd->flags & SD_WAKE_AFFINE) || !sched_feat(AFFINE_WAKEUPS)) + if (!(this_sd->flags & SD_WAKE_AFFINE)) return 0; - /* - * If sync wakeup then subtract the (maximum possible) - * effect of the currently running task from the load - * of the current CPU: - */ - if (sync) - tl -= current->se.load.weight; - - balanced = 100*(tl + p->se.load.weight) <= imbalance*load; - /* * If the currently running task will sleep within * a reasonable amount of time then attract this newly * woken task: */ - if (sync && balanced && curr->sched_class == &fair_sched_class) { + if (sync && curr->sched_class == &fair_sched_class) { if (curr->se.avg_overlap < sysctl_sched_migration_cost && p->se.avg_overlap < sysctl_sched_migration_cost) return 1; @@ -1025,8 +1075,16 @@ wake_affine(struct rq *rq, struct sched_domain *this_sd, struct rq *this_rq, schedstat_inc(p, se.nr_wakeups_affine_attempts); tl_per_task = cpu_avg_load_per_task(this_cpu); + /* + * If sync wakeup then subtract the (maximum possible) + * effect of the currently running task from the load + * of the current CPU: + */ + if (sync) + tl -= current->se.load.weight; + if ((tl <= load && tl + target_load(prev_cpu, idx) <= tl_per_task) || - balanced) { + 100*(tl + p->se.load.weight) <= imbalance*load) { /* * This domain has SD_WAKE_AFFINE and * p is cache cold in this domain, and @@ -1111,11 +1169,10 @@ static unsigned long wakeup_gran(struct sched_entity *se) unsigned long gran = sysctl_sched_wakeup_granularity; /* - * More easily preempt - nice tasks, while not making - * it harder for + nice tasks. + * More easily preempt - nice tasks, while not making it harder for + * + nice tasks. */ - if (unlikely(se->load.weight > NICE_0_LOAD)) - gran = calc_delta_fair(gran, &se->load); + gran = calc_delta_asym(sysctl_sched_wakeup_granularity, se); return gran; } @@ -1309,75 +1366,90 @@ static struct task_struct *load_balance_next_fair(void *arg) return __load_balance_iterator(cfs_rq, cfs_rq->balance_iterator); } -#ifdef CONFIG_FAIR_GROUP_SCHED -static int cfs_rq_best_prio(struct cfs_rq *cfs_rq) +static unsigned long +__load_balance_fair(struct rq *this_rq, int this_cpu, struct rq *busiest, + unsigned long max_load_move, struct sched_domain *sd, + enum cpu_idle_type idle, int *all_pinned, int *this_best_prio, + struct cfs_rq *cfs_rq) { - struct sched_entity *curr; - struct task_struct *p; - - if (!cfs_rq->nr_running || !first_fair(cfs_rq)) - return MAX_PRIO; - - curr = cfs_rq->curr; - if (!curr) - curr = __pick_next_entity(cfs_rq); + struct rq_iterator cfs_rq_iterator; - p = task_of(curr); + cfs_rq_iterator.start = load_balance_start_fair; + cfs_rq_iterator.next = load_balance_next_fair; + cfs_rq_iterator.arg = cfs_rq; - return p->prio; + return balance_tasks(this_rq, this_cpu, busiest, + max_load_move, sd, idle, all_pinned, + this_best_prio, &cfs_rq_iterator); } -#endif +#ifdef CONFIG_FAIR_GROUP_SCHED static unsigned long load_balance_fair(struct rq *this_rq, int this_cpu, struct rq *busiest, unsigned long max_load_move, struct sched_domain *sd, enum cpu_idle_type idle, int *all_pinned, int *this_best_prio) { - struct cfs_rq *busy_cfs_rq; long rem_load_move = max_load_move; - struct rq_iterator cfs_rq_iterator; - - cfs_rq_iterator.start = load_balance_start_fair; - cfs_rq_iterator.next = load_balance_next_fair; + int busiest_cpu = cpu_of(busiest); + struct task_group *tg; - for_each_leaf_cfs_rq(busiest, busy_cfs_rq) { -#ifdef CONFIG_FAIR_GROUP_SCHED - struct cfs_rq *this_cfs_rq; + rcu_read_lock(); + list_for_each_entry(tg, &task_groups, list) { long imbalance; - unsigned long maxload; + unsigned long this_weight, busiest_weight; + long rem_load, max_load, moved_load; + + /* + * empty group + */ + if (!aggregate(tg, sd)->task_weight) + continue; + + rem_load = rem_load_move * aggregate(tg, sd)->rq_weight; + rem_load /= aggregate(tg, sd)->load + 1; + + this_weight = tg->cfs_rq[this_cpu]->task_weight; + busiest_weight = tg->cfs_rq[busiest_cpu]->task_weight; - this_cfs_rq = cpu_cfs_rq(busy_cfs_rq, this_cpu); + imbalance = (busiest_weight - this_weight) / 2; - imbalance = busy_cfs_rq->load.weight - this_cfs_rq->load.weight; - /* Don't pull if this_cfs_rq has more load than busy_cfs_rq */ - if (imbalance <= 0) + if (imbalance < 0) + imbalance = busiest_weight; + + max_load = max(rem_load, imbalance); + moved_load = __load_balance_fair(this_rq, this_cpu, busiest, + max_load, sd, idle, all_pinned, this_best_prio, + tg->cfs_rq[busiest_cpu]); + + if (!moved_load) continue; - /* Don't pull more than imbalance/2 */ - imbalance /= 2; - maxload = min(rem_load_move, imbalance); + move_group_shares(tg, sd, busiest_cpu, this_cpu); - *this_best_prio = cfs_rq_best_prio(this_cfs_rq); -#else -# define maxload rem_load_move -#endif - /* - * pass busy_cfs_rq argument into - * load_balance_[start|next]_fair iterators - */ - cfs_rq_iterator.arg = busy_cfs_rq; - rem_load_move -= balance_tasks(this_rq, this_cpu, busiest, - maxload, sd, idle, all_pinned, - this_best_prio, - &cfs_rq_iterator); + moved_load *= aggregate(tg, sd)->load; + moved_load /= aggregate(tg, sd)->rq_weight + 1; - if (rem_load_move <= 0) + rem_load_move -= moved_load; + if (rem_load_move < 0) break; } + rcu_read_unlock(); return max_load_move - rem_load_move; } +#else +static unsigned long +load_balance_fair(struct rq *this_rq, int this_cpu, struct rq *busiest, + unsigned long max_load_move, + struct sched_domain *sd, enum cpu_idle_type idle, + int *all_pinned, int *this_best_prio) +{ + return __load_balance_fair(this_rq, this_cpu, busiest, + max_load_move, sd, idle, all_pinned, + this_best_prio, &busiest->cfs); +} +#endif static int move_one_task_fair(struct rq *this_rq, int this_cpu, struct rq *busiest, diff --git a/trunk/kernel/sched_rt.c b/trunk/kernel/sched_rt.c index 3432d573205d..060e87b0cb1c 100644 --- a/trunk/kernel/sched_rt.c +++ b/trunk/kernel/sched_rt.c @@ -513,6 +513,8 @@ static void enqueue_task_rt(struct rq *rq, struct task_struct *p, int wakeup) */ for_each_sched_rt_entity(rt_se) enqueue_rt_entity(rt_se); + + inc_cpu_load(rq, p->se.load.weight); } static void dequeue_task_rt(struct rq *rq, struct task_struct *p, int sleep) @@ -532,6 +534,8 @@ static void dequeue_task_rt(struct rq *rq, struct task_struct *p, int sleep) if (rt_rq && rt_rq->rt_nr_running) enqueue_rt_entity(rt_se); } + + dec_cpu_load(rq, p->se.load.weight); } /* diff --git a/trunk/kernel/sched_stats.h b/trunk/kernel/sched_stats.h index a38878e0e49d..5bae2e0c3ff2 100644 --- a/trunk/kernel/sched_stats.h +++ b/trunk/kernel/sched_stats.h @@ -67,7 +67,6 @@ static int show_schedstat(struct seq_file *seq, void *v) preempt_enable(); #endif } - kfree(mask_str); return 0; } diff --git a/trunk/net/bluetooth/rfcomm/core.c b/trunk/net/bluetooth/rfcomm/core.c index 0c2c93735e93..eb62558e9b09 100644 --- a/trunk/net/bluetooth/rfcomm/core.c +++ b/trunk/net/bluetooth/rfcomm/core.c @@ -423,8 +423,8 @@ static int __rfcomm_dlc_close(struct rfcomm_dlc *d, int err) rfcomm_dlc_lock(d); d->state = BT_CLOSED; - d->state_change(d, err); rfcomm_dlc_unlock(d); + d->state_change(d, err); skb_queue_purge(&d->tx_queue); rfcomm_dlc_unlink(d); diff --git a/trunk/net/dccp/ccids/ccid3.c b/trunk/net/dccp/ccids/ccid3.c index f813077234b7..cd61dea2eea1 100644 --- a/trunk/net/dccp/ccids/ccid3.c +++ b/trunk/net/dccp/ccids/ccid3.c @@ -193,17 +193,22 @@ static inline void ccid3_hc_tx_update_s(struct ccid3_hc_tx_sock *hctx, int len) /* * Update Window Counter using the algorithm from [RFC 4342, 8.1]. - * As elsewhere, RTT > 0 is assumed by using dccp_sample_rtt(). + * The algorithm is not applicable if RTT < 4 microseconds. */ static inline void ccid3_hc_tx_update_win_count(struct ccid3_hc_tx_sock *hctx, ktime_t now) { - u32 delta = ktime_us_delta(now, hctx->ccid3hctx_t_last_win_count), - quarter_rtts = (4 * delta) / hctx->ccid3hctx_rtt; + u32 quarter_rtts; + + if (unlikely(hctx->ccid3hctx_rtt < 4)) /* avoid divide-by-zero */ + return; + + quarter_rtts = ktime_us_delta(now, hctx->ccid3hctx_t_last_win_count); + quarter_rtts /= hctx->ccid3hctx_rtt / 4; if (quarter_rtts > 0) { hctx->ccid3hctx_t_last_win_count = now; - hctx->ccid3hctx_last_win_count += min(quarter_rtts, 5U); + hctx->ccid3hctx_last_win_count += min_t(u32, quarter_rtts, 5); hctx->ccid3hctx_last_win_count &= 0xF; /* mod 16 */ } } diff --git a/trunk/net/dccp/ipv4.c b/trunk/net/dccp/ipv4.c index c22a3780c14e..b348dd70c685 100644 --- a/trunk/net/dccp/ipv4.c +++ b/trunk/net/dccp/ipv4.c @@ -739,8 +739,8 @@ int dccp_invalid_packet(struct sk_buff *skb) * If P.type is not Data, Ack, or DataAck and P.X == 0 (the packet * has short sequence numbers), drop packet and return */ - if ((dh->dccph_type < DCCP_PKT_DATA || - dh->dccph_type > DCCP_PKT_DATAACK) && dh->dccph_x == 0) { + if (dh->dccph_type >= DCCP_PKT_DATA && + dh->dccph_type <= DCCP_PKT_DATAACK && dh->dccph_x == 0) { DCCP_WARN("P.type (%s) not Data || [Data]Ack, while P.X == 0\n", dccp_packet_name(dh->dccph_type)); return 1; diff --git a/trunk/net/ipv6/ip6mr.c b/trunk/net/ipv6/ip6mr.c index 14796181e8b5..2de3c464fe75 100644 --- a/trunk/net/ipv6/ip6mr.c +++ b/trunk/net/ipv6/ip6mr.c @@ -197,7 +197,7 @@ static int ip6mr_vif_seq_show(struct seq_file *seq, void *v) const char *name = vif->dev ? vif->dev->name : "none"; seq_printf(seq, - "%2td %-10s %8ld %7ld %8ld %7ld %05X\n", + "%2Zd %-10s %8ld %7ld %8ld %7ld %05X\n", vif - vif6_table, name, vif->bytes_in, vif->pkt_in, vif->bytes_out, vif->pkt_out, diff --git a/trunk/net/llc/llc_sap.c b/trunk/net/llc/llc_sap.c index 008de1fc42ca..e2ddde755019 100644 --- a/trunk/net/llc/llc_sap.c +++ b/trunk/net/llc/llc_sap.c @@ -286,14 +286,12 @@ void llc_build_and_send_xid_pkt(struct llc_sap *sap, struct sk_buff *skb, * * Sends received pdus to the sap state machine. */ -static void llc_sap_rcv(struct llc_sap *sap, struct sk_buff *skb, - struct sock *sk) +static void llc_sap_rcv(struct llc_sap *sap, struct sk_buff *skb) { struct llc_sap_state_ev *ev = llc_sap_ev(skb); ev->type = LLC_SAP_EV_TYPE_PDU; ev->reason = 0; - skb->sk = sk; llc_sap_state_process(sap, skb); } @@ -362,7 +360,8 @@ static void llc_sap_mcast(struct llc_sap *sap, break; sock_hold(sk); - llc_sap_rcv(sap, skb1, sk); + skb_set_owner_r(skb1, sk); + llc_sap_rcv(sap, skb1); sock_put(sk); } read_unlock_bh(&sap->sk_list.lock); @@ -382,7 +381,8 @@ void llc_sap_handler(struct llc_sap *sap, struct sk_buff *skb) } else { struct sock *sk = llc_lookup_dgram(sap, &laddr); if (sk) { - llc_sap_rcv(sap, skb, sk); + skb_set_owner_r(skb, sk); + llc_sap_rcv(sap, skb); sock_put(sk); } else kfree_skb(skb); diff --git a/trunk/net/mac80211/cfg.c b/trunk/net/mac80211/cfg.c index a9fce4afdf21..699d97b8de5e 100644 --- a/trunk/net/mac80211/cfg.c +++ b/trunk/net/mac80211/cfg.c @@ -672,7 +672,7 @@ static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev, if (params->vlan) { sdata = IEEE80211_DEV_TO_SUB_IF(params->vlan); - if (sdata->vif.type != IEEE80211_IF_TYPE_VLAN && + if (sdata->vif.type != IEEE80211_IF_TYPE_VLAN || sdata->vif.type != IEEE80211_IF_TYPE_AP) return -EINVAL; } else @@ -760,7 +760,7 @@ static int ieee80211_change_station(struct wiphy *wiphy, if (params->vlan && params->vlan != sta->sdata->dev) { vlansdata = IEEE80211_DEV_TO_SUB_IF(params->vlan); - if (vlansdata->vif.type != IEEE80211_IF_TYPE_VLAN && + if (vlansdata->vif.type != IEEE80211_IF_TYPE_VLAN || vlansdata->vif.type != IEEE80211_IF_TYPE_AP) { rcu_read_unlock(); return -EINVAL; diff --git a/trunk/net/mac80211/main.c b/trunk/net/mac80211/main.c index 5c876450b14c..915afadb0602 100644 --- a/trunk/net/mac80211/main.c +++ b/trunk/net/mac80211/main.c @@ -1313,7 +1313,7 @@ static void ieee80211_handle_filtered_frame(struct ieee80211_local *local, /* * Clear the TX filter mask for this STA when sending the next * packet. If the STA went to power save mode, this will happen - * when it wakes up for the next time. + * happen when it wakes up for the next time. */ sta->flags |= WLAN_STA_CLEAR_PS_FILT; diff --git a/trunk/net/mac80211/mlme.c b/trunk/net/mac80211/mlme.c index 841278f1df8e..7cfd12e0d1e2 100644 --- a/trunk/net/mac80211/mlme.c +++ b/trunk/net/mac80211/mlme.c @@ -1325,7 +1325,7 @@ static void ieee80211_sta_process_addba_request(struct net_device *dev, /* prepare reordering buffer */ tid_agg_rx->reorder_buf = - kmalloc(buf_size * sizeof(struct sk_buff *), GFP_ATOMIC); + kmalloc(buf_size * sizeof(struct sk_buf *), GFP_ATOMIC); if (!tid_agg_rx->reorder_buf) { if (net_ratelimit()) printk(KERN_ERR "can not allocate reordering buffer " @@ -1334,7 +1334,7 @@ static void ieee80211_sta_process_addba_request(struct net_device *dev, goto end; } memset(tid_agg_rx->reorder_buf, 0, - buf_size * sizeof(struct sk_buff *)); + buf_size * sizeof(struct sk_buf *)); if (local->ops->ampdu_action) ret = local->ops->ampdu_action(hw, IEEE80211_AMPDU_RX_START, @@ -1614,7 +1614,7 @@ void sta_addba_resp_timer_expired(unsigned long data) * only one argument, and both sta_info and TID are needed, so init * flow in sta_info_create gives the TID as data, while the timer_to_id * array gives the sta through container_of */ - u16 tid = *(u8 *)data; + u16 tid = *(int *)data; struct sta_info *temp_sta = container_of((void *)data, struct sta_info, timer_to_tid[tid]); @@ -1662,7 +1662,7 @@ void sta_addba_resp_timer_expired(unsigned long data) void sta_rx_agg_session_timer_expired(unsigned long data) { /* not an elegant detour, but there is no choice as the timer passes - * only one argument, and various sta_info are needed here, so init + * only one argument, and verious sta_info are needed here, so init * flow in sta_info_create gives the TID as data, while the timer_to_id * array gives the sta through container_of */ u8 *ptid = (u8 *)data; @@ -2479,6 +2479,8 @@ static int ieee80211_sta_join_ibss(struct net_device *dev, ifsta->state = IEEE80211_IBSS_JOINED; mod_timer(&ifsta->timer, jiffies + IEEE80211_IBSS_MERGE_INTERVAL); + ieee80211_rx_bss_put(dev, bss); + return res; } @@ -3521,7 +3523,6 @@ static int ieee80211_sta_create_ibss(struct net_device *dev, struct ieee80211_supported_band *sband; u8 bssid[ETH_ALEN], *pos; int i; - int ret; DECLARE_MAC_BUF(mac); #if 0 @@ -3566,9 +3567,7 @@ static int ieee80211_sta_create_ibss(struct net_device *dev, *pos++ = (u8) (rate / 5); } - ret = ieee80211_sta_join_ibss(dev, ifsta, bss); - ieee80211_rx_bss_put(dev, bss); - return ret; + return ieee80211_sta_join_ibss(dev, ifsta, bss); } @@ -3616,13 +3615,10 @@ static int ieee80211_sta_find_ibss(struct net_device *dev, (bss = ieee80211_rx_bss_get(dev, bssid, local->hw.conf.channel->center_freq, ifsta->ssid, ifsta->ssid_len))) { - int ret; printk(KERN_DEBUG "%s: Selected IBSS BSSID %s" " based on configured SSID\n", dev->name, print_mac(mac, bssid)); - ret = ieee80211_sta_join_ibss(dev, ifsta, bss); - ieee80211_rx_bss_put(dev, bss); - return ret; + return ieee80211_sta_join_ibss(dev, ifsta, bss); } #ifdef CONFIG_MAC80211_IBSS_DEBUG printk(KERN_DEBUG " did not try to join ibss\n"); @@ -4099,17 +4095,18 @@ ieee80211_sta_scan_result(struct net_device *dev, memset(&iwe, 0, sizeof(iwe)); iwe.cmd = SIOCGIWFREQ; - iwe.u.freq.m = ieee80211_frequency_to_channel(bss->freq); - iwe.u.freq.e = 0; + iwe.u.freq.m = bss->freq; + iwe.u.freq.e = 6; current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, IW_EV_FREQ_LEN); memset(&iwe, 0, sizeof(iwe)); iwe.cmd = SIOCGIWFREQ; - iwe.u.freq.m = bss->freq; - iwe.u.freq.e = 6; + iwe.u.freq.m = ieee80211_frequency_to_channel(bss->freq); + iwe.u.freq.e = 0; current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, IW_EV_FREQ_LEN); + memset(&iwe, 0, sizeof(iwe)); iwe.cmd = IWEVQUAL; iwe.u.qual.qual = bss->signal; diff --git a/trunk/net/mac80211/rx.c b/trunk/net/mac80211/rx.c index 0941e5d6a522..1958bfb361c6 100644 --- a/trunk/net/mac80211/rx.c +++ b/trunk/net/mac80211/rx.c @@ -1091,7 +1091,7 @@ ieee80211_data_to_8023(struct ieee80211_rx_data *rx) u16 fc, hdrlen, ethertype; u8 *payload; u8 dst[ETH_ALEN]; - u8 src[ETH_ALEN] __aligned(2); + u8 src[ETH_ALEN]; struct sk_buff *skb = rx->skb; struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); DECLARE_MAC_BUF(mac); @@ -1234,7 +1234,7 @@ ieee80211_data_to_8023(struct ieee80211_rx_data *rx) */ static bool ieee80211_frame_allowed(struct ieee80211_rx_data *rx) { - static const u8 pae_group_addr[ETH_ALEN] __aligned(2) + static const u8 pae_group_addr[ETH_ALEN] = { 0x01, 0x80, 0xC2, 0x00, 0x00, 0x03 }; struct ethhdr *ehdr = (struct ethhdr *) rx->skb->data; diff --git a/trunk/net/mac80211/util.c b/trunk/net/mac80211/util.c index 4e97b266f907..131e9e6c8a32 100644 --- a/trunk/net/mac80211/util.c +++ b/trunk/net/mac80211/util.c @@ -34,11 +34,11 @@ void *mac80211_wiphy_privid = &mac80211_wiphy_privid; /* See IEEE 802.1H for LLC/SNAP encapsulation/decapsulation */ /* Ethernet-II snap header (RFC1042 for most EtherTypes) */ -const unsigned char rfc1042_header[] __aligned(2) = +const unsigned char rfc1042_header[] = { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00 }; /* Bridge-Tunnel header (for EtherTypes ETH_P_AARP and ETH_P_IPX) */ -const unsigned char bridge_tunnel_header[] __aligned(2) = +const unsigned char bridge_tunnel_header[] = { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8 }; diff --git a/trunk/net/mac80211/wext.c b/trunk/net/mac80211/wext.c index 8311bb24f9f3..457ebf9e85ae 100644 --- a/trunk/net/mac80211/wext.c +++ b/trunk/net/mac80211/wext.c @@ -489,14 +489,9 @@ static int ieee80211_ioctl_giwap(struct net_device *dev, sdata = IEEE80211_DEV_TO_SUB_IF(dev); if (sdata->vif.type == IEEE80211_IF_TYPE_STA || sdata->vif.type == IEEE80211_IF_TYPE_IBSS) { - if (sdata->u.sta.state == IEEE80211_ASSOCIATED) { - ap_addr->sa_family = ARPHRD_ETHER; - memcpy(&ap_addr->sa_data, sdata->u.sta.bssid, ETH_ALEN); - return 0; - } else { - memset(&ap_addr->sa_data, 0, ETH_ALEN); - return 0; - } + ap_addr->sa_family = ARPHRD_ETHER; + memcpy(&ap_addr->sa_data, sdata->u.sta.bssid, ETH_ALEN); + return 0; } else if (sdata->vif.type == IEEE80211_IF_TYPE_WDS) { ap_addr->sa_family = ARPHRD_ETHER; memcpy(&ap_addr->sa_data, sdata->u.wds.remote_addr, ETH_ALEN); diff --git a/trunk/net/netfilter/nf_conntrack_expect.c b/trunk/net/netfilter/nf_conntrack_expect.c index e8f0dead267f..e31beeb33b2b 100644 --- a/trunk/net/netfilter/nf_conntrack_expect.c +++ b/trunk/net/netfilter/nf_conntrack_expect.c @@ -587,10 +587,10 @@ int __init nf_conntrack_expect_init(void) return 0; err3: - kmem_cache_destroy(nf_ct_expect_cachep); -err2: nf_ct_free_hashtable(nf_ct_expect_hash, nf_ct_expect_vmalloc, nf_ct_expect_hsize); +err2: + kmem_cache_destroy(nf_ct_expect_cachep); err1: return err; } diff --git a/trunk/scripts/Makefile.modpost b/trunk/scripts/Makefile.modpost index 17092d6c7db3..a098a0454dc8 100644 --- a/trunk/scripts/Makefile.modpost +++ b/trunk/scripts/Makefile.modpost @@ -43,13 +43,7 @@ _modpost: __modpost include include/config/auto.conf include scripts/Kbuild.include -# When building external modules load the Kbuild file to retreive EXTRA_SYMBOLS info ifneq ($(KBUILD_EXTMOD),) - -# set src + obj - they may be used when building the .mod.c file -obj := $(KBUILD_EXTMOD) -src := $(obj) - # Include the module's Makefile to find KBUILD_EXTRA_SYMBOLS include $(if $(wildcard $(KBUILD_EXTMOD)/Kbuild), \ $(KBUILD_EXTMOD)/Kbuild, $(KBUILD_EXTMOD)/Makefile) diff --git a/trunk/scripts/decodecode b/trunk/scripts/decodecode old mode 100755 new mode 100644