commit 68c6b859846bd078b37c6ca5f3882032f129e72d Merge: a4a47bc bb8d413 Author: Linus Torvalds Date: Fri Feb 26 10:35:27 2010 -0800 Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 * 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: (48 commits) x86/PCI: Prevent mmconfig memory corruption ACPI: Use GPE reference counting to support shared GPEs x86/PCI: use host bridge _CRS info by default on 2008 and newer machines PCI: augment bus resource table with a list PCI: add pci_bus_for_each_resource(), remove direct bus->resource[] refs PCI: read bridge windows before filling in subtractive decode resources PCI: split up pci_read_bridge_bases() PCIe PME: use pci_pcie_cap() PCI PM: Run-time callbacks for PCI bus type PCIe PME: use pci_is_pcie() PCI / ACPI / PM: Platform support for PCI PME wake-up ACPI / ACPICA: Multiple system notify handlers per device ACPI / PM: Add more run-time wake-up fields ACPI: Use GPE reference counting to support shared GPEs PCI PM: Make it possible to force using INTx for PCIe PME signaling PCI PM: PCIe PME root port service driver PCI PM: Add function for checking PME status of devices PCI: mark is_pcie obsolete PCI: set PCI_PREF_RANGE_TYPE_64 in pci_bridge_check_ranges PCI: pciehp: second try to get big range for pcie devices ... commit a4a47bc03fe520e95e0c4212bf97c86545fb14f9 Author: Linus Torvalds Date: Fri Feb 26 10:03:22 2010 -0800 Lower USB storage settling delay to something more reasonable The five-second delay can be rather annoying, and makes the system appear much less responsive when you connect a USB drive. It's also not entirely clear that it is needed - the settling delay has at least historically been an issue on some Apple iPods, for example, and some devices have been reported to need even more than the old 5s delay. But before we penalize them all, let's see how bad it really is. Some of the reasons for long delays seem to be actual historical kernel bugs that should probably never have been papered over with a delay in the first place (there's a Ubuntu bug report for 2.6.20 about a NULL pointer dereference unless 'delay_use' is 8 or more, for example). It also looks like some distros have already shipped with delay_use=0, so the five second default may well be totally historical. In other words: "Let's see if anybody screams". Signed-off-by: Linus Torvalds commit 6ebdc661b608671e9ca572af8bb42d58108cc008 Merge: d7930c9 df0edeb Author: Linus Torvalds Date: Thu Feb 25 15:38:37 2010 -0800 Merge branch 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6 * 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6: (41 commits) of: remove undefined request_OF_resource & release_OF_resource of/sparc: Remove sparc-local declaration of allnodes and devtree_lock of: move definition of of_chosen into common code. of: remove unused extern reference to devtree_lock of: put default string compare and #a/s-cell values into common header of/flattree: Don't assume HAVE_LMB of: protect linux/of.h with CONFIG_OF proc_devtree: fix THIS_MODULE without module.h of: Remove old and misplaced function declarations of/flattree: Make the kernel accept ePAPR style phandle information of/flattree: endian-convert members of boot_param_header of: assume big-endian properties, adding conversions where necessary of: use __be32 for cell value accessors of/flattree: use OF_ROOT_NODE_{SIZE,ADDR}_CELLS DEFAULT for fdt parsing of/flattree: use callback to setup initrd from /chosen proc_devtree: include linux/of.h of: make set_node_proc_entry private to proc_devtree.c of: include linux/proc_fs.h of/flattree: merge early_init_dt_scan_memory() common code of: add 'of_' prefix to machine_is_compatible() ... commit d7930c9ef9cc67044f5ddaac54d06ca22645a012 Merge: b6d9702 4f4517c Author: Linus Torvalds Date: Thu Feb 25 15:38:03 2010 -0800 Merge branch 'next-spi' of git://git.secretlab.ca/git/linux-2.6 * 'next-spi' of git://git.secretlab.ca/git/linux-2.6: (31 commits) spi: Correct SPI clock frequency setting in spi_mpc8xxx spi/spi_s3c64xx.c: Fix continuation line formats spi/dw_spi: Fix dw_spi_mmio to depend on HAVE_CLK spi/dw_spi: Allow dw_spi.c to be a module spi/dw_spi: mmio code style fixups Memory-mapped dw_spi driver spi/dw_spi: fix missing export of dw_spi_remove_host spi/dw_spi: conditional transfer mode changes spi/dw_spi: remove conditional from 'poll_transfer'. spi/dw_spi: fixed a spelling typo in a warning message. spi/dw_spi: add return value to empty mrst_spi_debugfs_init() spi/dw_spi: enable platform specific chipselect. spi/dw_spi: add a FIFO depth detection spi/dw_spi: fix __init/__devinit section mismatch spi: xilinx_spi: Fix up I/O routine wrapping bogosity. spi/spi_imx: add device information by switching pr_debug() to dev_dbg() spi: update MSIOF includes spi/dw_spi: refine the IRQ mode working flow spi/dw_spi: add a missed dw_spi_remove_host() in exit sequence spi/dw_spi: bug fix in wait_till_not_busy() ... commit b6d97026561a6ed6eed58428633a6bb4e1b78c57 Merge: 1954ee5 3cebbb8 Author: Linus Torvalds Date: Thu Feb 25 14:44:33 2010 -0800 Merge branch 'for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-kconfig * 'for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-kconfig: kconfig: Simplify LSMOD= handling kconfig: Add LSMOD=file to override the lsmod for localmodconfig kconfig: Look in both /bin and /sbin for lsmod in streamline_config.pl kconfig: Check for if conditions in Kconfig for localmodconfig kconfig: Create include/generated for localmodconfig commit 1954ee55605a75c91924b63c2584f4d53f11afc7 Merge: a85821f 7b76bfc Author: Linus Torvalds Date: Thu Feb 25 14:43:57 2010 -0800 Merge branch 'for-linus-1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-kconfig * 'for-linus-1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-kconfig: kconfig: simplification of scripts/extract-ikconfig commit a85821fce2c100a6680511f9693b76f9717fbdee Merge: 10df38c 14ef2b0 Author: Linus Torvalds Date: Thu Feb 25 14:42:39 2010 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (41 commits) HID: usbhid: initialize interface pointers early enough HID: extend mask for BUTTON usage page HID: hid-ntrig: Single touch mode tap HID: hid-ntrig: multitouch cleanup and fix HID: n-trig: remove unnecessary tool switching HID: hid-ntrig add multi input quirk and clean up HID: usbhid: introduce timeout for stuck ctrl/out URBs HID: magicmouse: coding style and probe failure fixes HID: remove MODULE_VERSION from new drivers HID: fix up Kconfig entry for MagicMouse HID: add a device driver for the Apple Magic Mouse. HID: Export hid_register_report HID: Support for MosArt multitouch panel HID: add pressure support for the Stantum multitouch panel HID: fixed bug in single-touch emulation on the stantum panel HID: fix typo in error message HID: add mapping for "AL Network Chat" usage HID: use multi input quirk for TouchPack touchscreen HID: make full-fledged hid-bus drivers properly selectable HID: make Wacom modesetting failures non-fatal ... commit 14ef2b0c026558d37662e5e095d59c64597d5769 Merge: 57ab12e 71b38bd Author: Jiri Kosina Date: Thu Feb 25 17:39:16 2010 +0100 Merge branches 'upstream', 'raw_report_modifications' and 'apple_magic_mouse' into for-linus Conflicts: drivers/hid/Kconfig commit bb8d41330ce27edb91adb6922d3f8e1a8923f727 Author: Thomas Gleixner Date: Thu Feb 25 16:42:11 2010 +0100 x86/PCI: Prevent mmconfig memory corruption commit ff097ddd4 (x86/PCI: MMCONFIG: manage pci_mmcfg_region as a list, not a table) introduced a nasty memory corruption when pci_mmcfg_list is empty. pci_mmcfg_check_end_bus_number() dereferences pci_mmcfg_list.prev even when the list is empty. The following write hits some variable near to pci_mmcfg_list. Further down a similar problem exists, where cfg->list.next is dereferenced unconditionally and a comparison with some variable near to pci_mmcfg_list happens. Add a check for the last element into the for_each_entry() loop and remove all the other crappy logic which is just a leftover of the old array based code which was replaced by the list conversion. Reported-by: Ingo Molnar Signed-off-by: Thomas Gleixner Cc: Bjorn Helgaas Cc: Yinghai Lu Cc: stable@kernel.org Signed-off-by: Jesse Barnes commit 10df38cafc87ef38870154d1b9b1ea2435e69287 Merge: dbd0042 c610028 Author: Linus Torvalds Date: Thu Feb 25 07:22:59 2010 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus * git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus: (44 commits) Add MAINTAINERS entry for virtio_console virtio: console: Fill ports' entire in_vq with buffers virtio: console: Error out if we can't allocate buffers for control queue virtio: console: Add ability to remove module virtio: console: Ensure no memleaks in case of unused buffers virtio: console: show error message if hvc_alloc fails for console ports virtio: console: Add debugfs files for each port to expose debug info virtio: console: Add ability to hot-unplug ports virtio: console: Handle port hot-plug virtio: console: Remove cached data on port close virtio: console: Register with sysfs and create a 'name' attribute for ports virtio: console: Ensure only one process can have a port open at a time virtio: console: Add file operations to ports for open/read/write/poll virtio: console: Associate each port with a char device virtio: console: Prepare for writing to userspace buffers virtio: console: Add a new MULTIPORT feature, support for generic ports virtio: console: Introduce a send_buf function for a common path for sending data to host virtio: console: Introduce function to hand off data from host to readers virtio: console: Separate out find_vqs operation into a different function virtio: console: Separate out console init into a new function ... commit dbd004291ed31db280a3f2d7a1113a04e5e85af4 Merge: 7491612 c36f74e Author: Linus Torvalds Date: Thu Feb 25 07:09:54 2010 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6: netlabel: fix export of SELinux categories > 127 commit c36f74e67fa12202dbcb4ad92c5ac844f9d36b98 Author: Joshua Roys Date: Wed Feb 24 18:52:44 2010 -0500 netlabel: fix export of SELinux categories > 127 This fixes corrupted CIPSO packets when SELinux categories greater than 127 are used. The bug occured on the second (and later) loops through the while; the inner for loop through the ebitmap->maps array used the same index as the NetLabel catmap->bitmap array, even though the NetLabel bitmap is twice as long as the SELinux bitmap. Signed-off-by: Joshua Roys Acked-by: Paul Moore Signed-off-by: James Morris commit 7491612c7d2cf560bb96dc02bb53d555b41adbb8 Merge: baac35c 453d313 Author: Linus Torvalds Date: Wed Feb 24 21:12:11 2010 -0800 Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev: ahci: disable FPDMA auto-activate optimization on NVIDIA AHCI commit 453d3131ec7aab82eaaa8401a50522a337092aa8 Author: Robert Hancock Date: Tue Jan 26 22:33:23 2010 -0600 ahci: disable FPDMA auto-activate optimization on NVIDIA AHCI Mike Cui reported that his system with an NVIDIA MCP79 (aka MCP7A) chipset stopped working with 2.6.32. The problem appears to be that 2.6.32 now enables the FPDMA auto-activate optimization in the ahci driver. The drive works fine with this enabled on an Intel AHCI so this appears to be a chipset bug. Since MCP79 is a fairly recent NVIDIA chipset and we don't have any info on whether any other NVIDIA chipsets have this issue, disable FPDMA AA optimization on all NVIDIA AHCI controllers for now. Should address http://bugzilla.kernel.org/show_bug.cgi?id=14922 Signed-off-by: Robert Hancock While-we-investigate-issue-this-patch-looks-good-to-me-by: Prajakta Gudadhe Signed-off-by: Jeff Garzik Cc: stable@kernel.org commit cbbc0de700e61d0cdc854d435dbc2ef148de0e00 Author: Rafael J. Wysocki Date: Wed Feb 24 00:52:08 2010 +0100 ACPI: Use GPE reference counting to support shared GPEs To fix a bug and address the reviewers' comments regarding the ACPI GPE refcounting patch, do the following additional changes: o Remove the second argument of acpi_ev_enable_gpe(), 'write_to_hardware', because it is not necessary any more. o Add the "bad parameter" test against 'type' in acpi_enable_gpe() and acpi_disable_gpe(). o Make acpi_enable_gpe() only check 'status' for runtime GPEs if acpi_ev_enable_gpe() was actually called. o Make acpi_disable_gpe() return 'status' returned by acpi_ev_disable_gpe() and fix a bug where ACPI_GPE_TYPE_WAKE and ACPI_GPE_TYPE_RUNTIME were exchanged by mistake. o Add comments explaining why acpi_set_gpe() is used by the ACPI EC driver. Signed-off-by: Rafael J. Wysocki Signed-off-by: Jesse Barnes commit baac35c4155a8aa826c70acee6553368ca5243a2 Author: Xiaotian Feng Date: Wed Feb 24 18:39:02 2010 +0800 security: fix error return path in ima_inode_alloc If radix_tree_preload is failed in ima_inode_alloc, we don't need radix_tree_preload_end because kernel is alread preempt enabled Signed-off-by: Xiaotian Feng Signed-off-by: Mimi Zohar Signed-off-by: James Morris commit c610028611479e6b9d8b2f1a6628e9417ef4114f Author: Amit Shah Date: Fri Feb 12 10:32:19 2010 +0530 Add MAINTAINERS entry for virtio_console I'm taking ownership of the virtio_console module; but I'll continue feeding patches via Rusty. Signed-off-by: Amit Shah Signed-off-by: Rusty Russell commit d6933561924d8022f5d986ce7c511a2646eeadce Author: Amit Shah Date: Fri Feb 12 10:32:18 2010 +0530 virtio: console: Fill ports' entire in_vq with buffers Instead of allocating just one buffer for a port's in_vq, fill the entire in_vq with buffers so the host need not stall while an application consumes the data and makes the buffer available again for the host. Signed-off-by: Amit Shah Signed-off-by: Rusty Russell commit 22a29eacd2a17f22c8260a8106a4e36bae7fb6ea Author: Amit Shah Date: Fri Feb 12 10:32:17 2010 +0530 virtio: console: Error out if we can't allocate buffers for control queue With MULTIPORT support, the control queue is an integral part of the functioning of the device. If we can't get any buffers allocated, the host won't be able to relay important information and the device may not function as intended. Ensure 'probe' doesn't succeed until the control queue has at least one buffer allocated for its ivq. Signed-off-by: Amit Shah Signed-off-by: Rusty Russell commit 7177876fea8306a6f49400d11f5913bf9b3b5e5f Author: Amit Shah Date: Fri Feb 12 10:32:16 2010 +0530 virtio: console: Add ability to remove module Add the ability to remove the virtio_console module. This aids debugging. Signed-off-by: Amit Shah Signed-off-by: Rusty Russell commit a9cdd4855738906043b8131cfe8055d6cde88ffe Author: Amit Shah Date: Fri Feb 12 10:32:15 2010 +0530 virtio: console: Ensure no memleaks in case of unused buffers If unused data exists in in_vq, ensure we flush that first and then detach unused buffers, which will ensure all buffers from the in_vq are removed. Also ensure we free the buffers after detaching them. Signed-off-by: Amit Shah Signed-off-by: Rusty Russell commit 298add723aecd7af461319fe815d935ef2c40d78 Author: Amit Shah Date: Mon Jan 18 16:35:23 2010 +0530 virtio: console: show error message if hvc_alloc fails for console ports Signed-off-by: Amit Shah Signed-off-by: Rusty Russell commit d99393effd76571cf2c4a07cbb6e86d41855a8fa Author: Amit Shah Date: Mon Dec 21 22:36:21 2009 +0530 virtio: console: Add debugfs files for each port to expose debug info This is helpful in examining ports' state. Signed-off-by: Amit Shah Signed-off-by: Rusty Russell commit 1f7aa42d166cd104b0700d61efe2064178a3f6da Author: Amit Shah Date: Mon Dec 21 22:27:31 2009 +0530 virtio: console: Add ability to hot-unplug ports Remove port data; deregister from the hvc core if it's a console port. Signed-off-by: Amit Shah Signed-off-by: Rusty Russell commit 7f5d810dac70214d00b2440787535b6c7a73b6b7 Author: Amit Shah Date: Mon Dec 21 22:22:08 2009 +0530 virtio: console: Handle port hot-plug If the 'nr_ports' variable in the config space is updated to a higher value, that means new ports have been hotplugged. Introduce a new workqueue to handle such updates and create new ports. Signed-off-by: Amit Shah Signed-off-by: Rusty Russell commit 88f251ac58b2460ed16ff619a020ad3ef365e607 Author: Amit Shah Date: Mon Dec 21 22:15:30 2009 +0530 virtio: console: Remove cached data on port close Remove any data that we might have in a port's inbuf when closing a port or when any data is received when a port is closed. Signed-off-by: Amit Shah Signed-off-by: Rusty Russell commit 431edb8a8bca71008fefceadf53b9315ef7196ec Author: Amit Shah Date: Mon Dec 21 21:57:40 2009 +0530 virtio: console: Register with sysfs and create a 'name' attribute for ports The host can set a name for ports so that they're easily discoverable instead of going by the /dev/vportNpn naming. This attribute will be placed in /sys/class/virtio-ports/vportNpn/name. udev scripts can then create symlinks to the port using the name. Signed-off-by: Amit Shah Signed-off-by: Rusty Russell commit 3c7969ccb569968a79fab3729075751bc8fc2f78 Author: Amit Shah Date: Thu Nov 26 11:25:38 2009 +0530 virtio: console: Ensure only one process can have a port open at a time Add a guest_connected field that ensures only one process can have a port open at a time. This also ensures we don't have a race when we later add support for dropping buffers when closing the char dev and buffer caching is turned off for the particular port. Signed-off-by: Amit Shah Signed-off-by: Rusty Russell commit 2030fa496d74b49220308eaccf656e2338019cfd Author: Amit Shah Date: Mon Dec 21 21:49:30 2009 +0530 virtio: console: Add file operations to ports for open/read/write/poll Allow guest userspace applications to open, read from, write to, poll the ports via the char dev interface. When a port gets opened, a notification is sent to the host via a control message indicating a connection has been established. Similarly, on closing of the port, a notification is sent indicating disconnection. Signed-off-by: Amit Shah Signed-off-by: Rusty Russell commit fb08bd274df61967f40d49c4625fe6ed75a69ab5 Author: Amit Shah Date: Mon Dec 21 21:36:04 2009 +0530 virtio: console: Associate each port with a char device The char device will be used as an interface by applications on the guest to communicate with apps on the host. The devices created are placed in /dev/vportNpn where N is the virtio-console device number and n is the port number for that device. One dynamic major device number is allocated for each device and minor numbers are allocated for the ports contained within that device. The file operation for the char devs will be added in the following commits. Signed-off-by: Amit Shah Signed-off-by: Rusty Russell commit b766ceed5bbf04ae153389f5a15f53b9b6106a35 Author: Amit Shah Date: Mon Dec 21 21:26:45 2009 +0530 virtio: console: Prepare for writing to userspace buffers When ports get advertised as char devices, the buffers will come from userspace. Equip the fill_readbuf function with the ability to write to userspace buffers. Signed-off-by: Amit Shah Signed-off-by: Rusty Russell commit 17634ba25544d60af1968982929150efad755032 Author: Amit Shah Date: Mon Dec 21 21:03:25 2009 +0530 virtio: console: Add a new MULTIPORT feature, support for generic ports This commit adds a new feature, MULTIPORT. If the host supports this feature as well, the config space has the number of ports defined for that device. New ports are spawned according to this information. The config space also has the maximum number of ports that can be spawned for a particular device. This is useful in initializing the appropriate number of virtqueues in advance, as ports might be hot-plugged in later. Using this feature, generic ports can be created which are not tied to hvc consoles. We also open up a private channel between the host and the guest via which some "control" messages are exchanged for the ports, like whether the port being spawned is a console port, resizing the console window, etc. Next commits will add support for hotplugging and presenting char devices in /dev/ for bi-directional guest-host communication. Signed-off-by: Amit Shah Signed-off-by: Rusty Russell commit f997f00bf8c3ddf748d757105afa1a7dd5297208 Author: Amit Shah Date: Mon Dec 21 17:28:51 2009 +0530 virtio: console: Introduce a send_buf function for a common path for sending data to host Adding support for generic ports that will write to userspace will need some code changes. Consolidate the write routine into send_buf() and put_chars() now just calls into the new function. Signed-off-by: Amit Shah Signed-off-by: Rusty Russell commit 203baab8ba3195dd929473ba95b91c2b838833e6 Author: Amit Shah Date: Mon Jan 18 19:15:12 2010 +0530 virtio: console: Introduce function to hand off data from host to readers In preparation for serving data to userspace (generic ports) as well as in-kernel users (hvc consoles), separate out the functionality common to both in a 'fill_readbuf()' function. Signed-off-by: Amit Shah Signed-off-by: Rusty Russell commit 2658a79acf014deb0eaff2063f8f7a2b59f41285 Author: Amit Shah Date: Mon Jan 18 19:15:11 2010 +0530 virtio: console: Separate out find_vqs operation into a different function With support for multiple ports, each port will have its own input and output vqs. Prepare the probe function for this change. Signed-off-by: Amit Shah Signed-off-by: Rusty Russell commit cfa6d3792550c9eac51887181358954e6515da6b Author: Amit Shah Date: Mon Jan 18 19:15:10 2010 +0530 virtio: console: Separate out console init into a new function Console ports could be hot-added. Also, with the new multiport support, a port is identified as a console port only if the host sends a control message. Move the console port init into a separate function so it can be invoked from other places. Signed-off-by: Amit Shah Signed-off-by: Rusty Russell commit 4f23c573c0dbebfd193cfb90b003d67929c58b31 Author: Amit Shah Date: Mon Jan 18 19:15:09 2010 +0530 virtio: console: Separate out console-specific data into a separate struct Move out console-specific stuff into a separate struct from 'struct port' as we need to maintain two lists: one for all the ports (which includes consoles) and one only for consoles since the hvc callbacks only give us the vtermno. This makes console handling cleaner. Signed-off-by: Amit Shah Signed-off-by: Rusty Russell commit cb06e3676b22013e9b759627e41656ddb07dee6d Author: Amit Shah Date: Mon Jan 18 19:15:08 2010 +0530 virtio: console: ensure console size is updated on hvc open When multiple console support is added, ensure each port's size gets updated when a new one is opened via hvc. Signed-off-by: Amit Shah Signed-off-by: Rusty Russell commit 1c85bf35449196e74deb487961d2f90c98f7b7ff Author: Amit Shah Date: Mon Jan 18 19:15:07 2010 +0530 virtio: console: struct ports for multiple ports per device. Rather than assume a single port, add a 'struct ports_device' which stores data related to all the ports for that device. Currently, there's only one port and is hooked up with hvc, but that will change. Signed-off-by: Amit Shah Signed-off-by: Rusty Russell commit d8a02bd58ab6da4495a2d1af74d980c217e9abcf Author: Rusty Russell Date: Mon Jan 18 19:15:06 2010 +0530 virtio: console: remove global var Now we can use an allocation function to remove our global console variable. Signed-off-by: Rusty Russell Signed-off-by: Amit Shah Signed-off-by: Rusty Russell commit 38edf58d73c28b082ec808aecdeb0ef2b92af049 Author: Amit Shah Date: Mon Jan 18 19:15:05 2010 +0530 virtio: console: don't assume a single console port. Keep a list of all ports being used as a console, and provide a lock and a lookup function. The hvc callbacks only give us a vterm number, so we need to map this. Signed-off-by: Amit Shah Signed-off-by: Rusty Russell commit 73954488b1cc74cf46d6b94b8d3175f45496bd32 Author: Rusty Russell Date: Mon Jan 18 19:15:04 2010 +0530 virtio: console: use vdev->priv to avoid accessing global var. Part of removing our "one console" assumptions, use vdev->priv to point to the port (currently == the global console). Signed-off-by: Rusty Russell Signed-off-by: Amit Shah Signed-off-by: Rusty Russell commit a3cde44908429e52b2ec052ad5a70ef60e1f2d56 Author: Amit Shah Date: Mon Jan 18 19:15:03 2010 +0530 virtio: console: introduce a get_inbuf helper to fetch bufs from in_vq This makes taking locks around the get_buf vq operation easier, as well as complements the add_inbuf() operation. Signed-off-by: Amit Shah Signed-off-by: Rusty Russell commit e27b519807e04d950802cb89f7b22933d8d2f837 Author: Amit Shah Date: Mon Jan 18 19:15:02 2010 +0530 virtio: console: ensure add_inbuf can work for multiple ports as well add_inbuf() assumed one port and one inbuf per port. Remove that assumption. Also move the function so that put_chars and get_chars are together. Signed-off-by: Amit Shah Signed-off-by: Rusty Russell commit fdb9a054554e1e435e927c9a47a999f026abd408 Author: Amit Shah Date: Mon Jan 18 19:15:01 2010 +0530 virtio: console: encapsulate buffer information in a struct Collect port buffer, used_len, offset fields into a single structure. Signed-off-by: Amit Shah Signed-off-by: Rusty Russell commit 21206ede8826fd9d2eb72e05b429f3ccb1bdaff5 Author: Rusty Russell Date: Mon Jan 18 19:15:00 2010 +0530 virtio: console: port encapsulation We are heading towards a multiple-"port" system, so as part of weaning off globals we encapsulate the information into 'struct port'. Signed-off-by: Rusty Russell Signed-off-by: Amit Shah Signed-off-by: Rusty Russell commit f550804ab92e37a08d2622522a0f11252a2158ea Author: Amit Shah Date: Mon Jan 18 19:14:59 2010 +0530 virtio: console: We support only one device at a time We support only one virtio_console device at a time. If multiple are found, error out if one is already initialized. Signed-off-by: Amit Shah Signed-off-by: Rusty Russell commit 1dff399616a79b8ef5d61ad68f2ef1e1f590b465 Author: Rusty Russell Date: Sat Nov 28 12:20:26 2009 +0530 hvc_console: make the ops pointer const. This is nicer for modern R/O protection. And noone needs it non-const, so constify the callers as well. Signed-off-by: Rusty Russell Signed-off-by: Amit Shah To: Christian Borntraeger Cc: linuxppc-dev@ozlabs.org commit 971f3390003619ea4ac0b20ee93dfd3209025790 Author: Rusty Russell Date: Mon Jan 18 19:14:56 2010 +0530 virtio: console: statically initialize virtio_cons That way, we can make it const as is good kernel style. We use a separate indirection for the early console, rather than mugging ops.put_chars. We rename it hv_ops, too. Signed-off-by: Rusty Russell Signed-off-by: Amit Shah Signed-off-by: Rusty Russell commit a23ea92474e558b071d3e43d961ec767c31faebd Author: Rusty Russell Date: Mon Jan 18 19:14:55 2010 +0530 virtio: console: comment cleanup Remove old lguest-style comments. [Amit: - wingify comments acc. to kernel style - indent comments ] Signed-off-by: Rusty Russell Signed-off-by: Amit Shah Signed-off-by: Rusty Russell commit 3b8706240ee6084ccb46e53cd3a554356b7eeec8 Author: Amit Shah Date: Fri Feb 12 10:32:14 2010 +0530 virtio: Initialize vq->data entries to NULL vq operations depend on vq->data[i] being NULL to figure out if the vq entry is in use (since the previous patch). We have to initialize them to NULL to ensure we don't work with junk data and trigger false BUG_ONs. Signed-off-by: Amit Shah Signed-off-by: Rusty Russell Cc: Shirley Ma commit c021eac4148c16bf53baa0dd14e8ebee6f39dab5 Author: Shirley Ma Date: Mon Jan 18 19:15:23 2010 +0530 virtio: Add ability to detach unused buffers from vrings There's currently no way for a virtio driver to ask for unused buffers, so it has to keep a list itself to reclaim them at shutdown. This is redundant, since virtio_ring stores that information. So add a new hook to do this. Signed-off-by: Shirley Ma Signed-off-by: Amit Shah Signed-off-by: Rusty Russell commit 69740c8ba878f58bc3c71f74618fc2cd1da990da Author: Christoph Hellwig Date: Wed Feb 24 14:22:25 2010 -0600 virtio_blk: add block topology support Allow reading various alignment values from the config page. This allows the guest to much better align I/O requests depending on the storage topology. Note that the formats for the config values appear a bit messed up, but we follow the formats used by ATA and SCSI so they are expected in the storage world. Signed-off-by: Christoph Hellwig Signed-off-by: Rusty Russell commit d57ed95da483418e8b0433da693c9168dd0a2df6 Author: Michael S. Tsirkin Date: Thu Jan 28 00:42:23 2010 +0200 virtio: use smp_XX barriers on SMP virtio is communicating with a virtual "device" that actually runs on another host processor. Thus SMP barriers can be used to control memory access ordering. Where possible, we should use SMP barriers which are more lightweight than mandatory barriers, because mandatory barriers also control MMIO effects on accesses through relaxed memory I/O windows (which virtio does not use) (compare specifically smp_rmb and rmb on x86_64). We can't just use smp_mb and friends though, because we must force memory ordering even if guest is UP since host could be running on another CPU, but SMP barriers are defined to barrier() in that configuration. So, for UP fall back to mandatory barriers instead. Signed-off-by: Michael S. Tsirkin Signed-off-by: Rusty Russell commit 97a545ab6ce922a0f868d192718a48a0091ebc5e Author: Rusty Russell Date: Wed Feb 24 14:22:22 2010 -0600 virtio: remove bogus barriers from DEBUG version of virtio_ring.c With DEBUG defined, we add an ->in_use flag to detect if the caller invokes two virtio methods in parallel. The barriers attempt to ensure timely update of the ->in_use flag. But they're voodoo: if we need these barriers it implies that the calling code doesn't have sufficient synchronization to ensure the code paths aren't invoked at the same time anyway, and we want to detect it. Also, adding barriers changes timing, so turning on debug has more chance of hiding real problems. Thanks to MST for drawing my attention to this code... CC: Michael S. Tsirkin Signed-off-by: Rusty Russell commit 28ff4ef71795fe6f6c0cc06a04911c9ca09c2c11 Author: Rusty Russell Date: Wed Feb 24 14:22:18 2010 -0600 lguest: remove unneeded zlib.h include in example launcher Two years ago 5bbf89fc2608 removed the horrible bzImage unpacking code. Now it's time to remove the unneeded zlib.h include, too. Signed-off-by: Rusty Russell commit 169c246a30808588436794e96a97c61a01af9bed Author: Rusty Russell Date: Wed Feb 24 14:22:14 2010 -0600 virtio: fix balloon without VIRTIO_BALLOON_F_STATS_VQ When running under qemu-kvm-0.11.0: BUG: unable to handle kernel paging request at 56e58955 ... Process vballoon (pid: 1297, ti=c7976000 task=c70a6ca0 task.ti=c7 ... Call Trace: [] ? balloon+0x1b3/0x440 [virtio_balloon] [] ? schedule+0x327/0x9d0 [] ? balloon+0x0/0x440 [virtio_balloon] [] ? kthread+0x74/0x80 [] ? kthread+0x0/0x80 [] ? kernel_thread_helper+0x6/0x30 need_stats_update should be zero-initialized. Signed-off-by: Rusty Russell Acked-by: Adam Litke commit 1f34c71afe5115e77a49c4e67720a66e27053e54 Author: Adam Litke Date: Thu Dec 10 16:35:15 2009 -0600 virtio: Fix scheduling while atomic in virtio_balloon stats This is a fix for my earlier patch: "virtio: Add memory statistics reporting to the balloon driver (V4)". I discovered that all_vm_events() can sleep and therefore stats collection cannot be done in interrupt context. One solution is to handle the interrupt by noting that stats need to be collected and waking the existing vballoon kthread which will complete the work via stats_handle_request(). Rusty, is this a saner way of doing business? There is one issue that I would like a broader opinion on. In stats_request, I update vb->need_stats_update and then wake up the kthread. The kthread uses vb->need_stats_update as a condition variable. Do I need a memory barrier between the update and wake_up to ensure that my kthread sees the correct value? My testing suggests that it is not needed but I would like some confirmation from the experts. Signed-off-by: Adam Litke To: Rusty Russell Cc: Anthony Liguori Cc: linux-kernel@vger.kernel.org Signed-off-by: Rusty Russell commit 9564e138b1f6eb137f7149772438d3f3fb3277dd Author: Adam Litke Date: Mon Nov 30 10:14:15 2009 -0600 virtio: Add memory statistics reporting to the balloon driver (V4) Changes since V3: - Do not do endian conversions as they will be done in the host - Report stats that reference a quantity of memory in bytes - Minor coding style updates Changes since V2: - Increase stat field size to 64 bits - Report all sizes in kb (not pages) - Drop anon_pages stat and fix endianness conversion Changes since V1: - Use a virtqueue instead of the device config space When using ballooning to manage overcommitted memory on a host, a system for guests to communicate their memory usage to the host can provide information that will minimize the impact of ballooning on the guests. The current method employs a daemon running in each guest that communicates memory statistics to a host daemon at a specified time interval. The host daemon aggregates this information and inflates and/or deflates balloons according to the level of host memory pressure. This approach is effective but overly complex since a daemon must be installed inside each guest and coordinated to communicate with the host. A simpler approach is to collect memory statistics in the virtio balloon driver and communicate them directly to the hypervisor. This patch enables the guest-side support by adding stats collection and reporting to the virtio balloon driver. Signed-off-by: Adam Litke Cc: Anthony Liguori Cc: virtualization@lists.linux-foundation.org Signed-off-by: Rusty Russell (minor fixes) commit 1f08b833ddbdb1c8e81c4b1053c2ebb7b89cb437 Author: Jamie Lokier Date: Fri Jan 8 22:01:43 2010 +0000 Add __devexit_p around reference to virtio_pci_remove This is needed to compile with CONFIG_VIRTIO_PCI=y, because virtio_pci_remove is marked __devexit. Signed-off-by: Jamie Lokier Signed-off-by: Rusty Russell commit 7bc5e3f2be32ae6fb0c74cd0f707f986b3a01a26 Author: Bjorn Helgaas Date: Tue Feb 23 10:24:41 2010 -0700 x86/PCI: use host bridge _CRS info by default on 2008 and newer machines The main benefit of using ACPI host bridge window information is that we can do better resource allocation in systems with multiple host bridges, e.g., http://bugzilla.kernel.org/show_bug.cgi?id=14183 Sometimes we need _CRS information even if we only have one host bridge, e.g., https://bugs.launchpad.net/ubuntu/+source/linux/+bug/341681 Most of these systems are relatively new, so this patch turns on "pci=use_crs" only on machines with a BIOS date of 2008 or newer. Signed-off-by: Bjorn Helgaas Signed-off-by: Jesse Barnes commit 2fe2abf896c1e7a0ee65faaf3ef0ce654848abbd Author: Bjorn Helgaas Date: Tue Feb 23 10:24:36 2010 -0700 PCI: augment bus resource table with a list Previously we used a table of size PCI_BUS_NUM_RESOURCES (16) for resources forwarded to a bus by its upstream bridge. We've increased this size several times when the table overflowed. But there's no good limit on the number of resources because host bridges and subtractive decode bridges can forward any number of ranges to their secondary buses. This patch reduces the table to only PCI_BRIDGE_RESOURCE_NUM (4) entries, which corresponds to the number of windows a PCI-to-PCI (3) or CardBus (4) bridge can positively decode. Any additional resources, e.g., PCI host bridge windows or subtractively-decoded regions, are kept in a list. I'd prefer a single list rather than this split table/list approach, but that requires simultaneous changes to every architecture. This approach only requires immediate changes where we set up (a) host bridges with more than four windows and (b) subtractive-decode P2P bridges, and we can incrementally change other architectures to use the list. Signed-off-by: Bjorn Helgaas Signed-off-by: Jesse Barnes commit 89a74ecccd1f78e51faf6287e5c0e93a92ac096e Author: Bjorn Helgaas Date: Tue Feb 23 10:24:31 2010 -0700 PCI: add pci_bus_for_each_resource(), remove direct bus->resource[] refs No functional change; this converts loops that iterate from 0 to PCI_BUS_NUM_RESOURCES through pci_bus resource[] table to use the pci_bus_for_each_resource() iterator instead. This doesn't change the way resources are stored; it merely removes dependencies on the fact that they're in a table. Signed-off-by: Bjorn Helgaas Signed-off-by: Jesse Barnes commit 2adf75160b10bf3f09ed7d3d04e937f923fc557e Author: Bjorn Helgaas Date: Tue Feb 23 10:24:26 2010 -0700 PCI: read bridge windows before filling in subtractive decode resources No functional change; this fills in the bus subtractive decode resources after reading the bridge window information rather than before. Also, print out the subtractive decode resources as we already do for the positive decode windows. Signed-off-by: Bjorn Helgaas Signed-off-by: Jesse Barnes commit fa27b2d108fa49685129867a8c5b968344d6e197 Author: Bjorn Helgaas Date: Tue Feb 23 10:24:21 2010 -0700 PCI: split up pci_read_bridge_bases() No functional change; this breaks up pci_read_bridge_bases() into separate pieces for the I/O, memory, and prefetchable memory windows, similar to how Yinghai recently split up pci_setup_bridge() in 68e84ff3bdc. Signed-off-by: Bjorn Helgaas Signed-off-by: Jesse Barnes commit b16694f70c40ea8d539cdc93a422039771e85870 Author: Kenji Kaneshige Date: Mon Feb 22 14:13:39 2010 +0900 PCIe PME: use pci_pcie_cap() Use pci_pcie_cap() instead of pci_find_capability() to get PCIe capability offset. This reduces redundant search in PCI configuration space. Signed-off-by: Kenji Kaneshige Signed-off-by: Jesse Barnes commit 6cbf82148ff286ec22a55be6836c3a5bffc489c1 Author: Rafael J. Wysocki Date: Wed Feb 17 23:44:58 2010 +0100 PCI PM: Run-time callbacks for PCI bus type Introduce run-time PM callbacks for the PCI bus type. Make the new callbacks work in analogy with the existing system sleep PM callbacks, so that the drivers already converted to struct dev_pm_ops can use their suspend and resume routines for run-time PM without modifications. Signed-off-by: Rafael J. Wysocki Signed-off-by: Jesse Barnes commit 552be54cc4232dc5acc49ccb372129d6f1b6923f Author: Kenji Kaneshige Date: Mon Feb 22 14:12:24 2010 +0900 PCIe PME: use pci_is_pcie() Use pci_is_pcie() instead of looking at obsolete is_pcie field in struct pci_dev. Signed-off-by: Kenji Kaneshige Signed-off-by: Jesse Barnes commit b67ea76172d4b1922c4b3c46c8ea8e9fec1ff38c Author: Rafael J. Wysocki Date: Wed Feb 17 23:44:09 2010 +0100 PCI / ACPI / PM: Platform support for PCI PME wake-up Although the majority of PCI devices can generate PMEs that in principle may be used to wake up devices suspended at run time, platform support is generally necessary to convert PMEs into wake-up events that can be delivered to the kernel. If ACPI is used for this purpose, PME signals generated by a PCI device will trigger the ACPI GPE associated with the device to generate an ACPI wake-up event that we can set up a handler for, provided that everything is configured correctly. Unfortunately, the subset of PCI devices that have GPEs associated with them is quite limited. The devices without dedicated GPEs have to rely on the GPEs associated with other devices (in the majority of cases their upstream bridges and, possibly, the root bridge) to generate ACPI wake-up events in response to PME signals from them. Add ACPI platform support for PCI PME wake-up: o Add a framework making is possible to use ACPI system notify handlers for run-time PM. o Add new PCI platform callback ->run_wake() to struct pci_platform_pm_ops allowing us to enable/disable the platform to generate wake-up events for given device. Implemet this callback for the ACPI platform. o Define ACPI wake-up handlers for PCI devices and PCI root buses and make the PCI-ACPI binding code register wake-up notifiers for all PCI devices present in the ACPI tables. o Add function pci_dev_run_wake() which can be used by PCI drivers to check if given device is capable of generating wake-up events at run time. Developed in cooperation with Matthew Garrett . Signed-off-by: Rafael J. Wysocki Signed-off-by: Jesse Barnes commit 3f0be67188c60ebf1b5d00354b44b4b24f5af313 Author: Rafael J. Wysocki Date: Wed Feb 17 23:42:59 2010 +0100 ACPI / ACPICA: Multiple system notify handlers per device Currently it only is possible to install one system notify handler per namespace node, but this is not enough for PCI run-time power management, because we need to install power management notifiers for devices that already have hotplug notifiers installed. While in principle this could be handled at the PCI level, that would be suboptimal due to the way in which the ACPI-based PCI hotplug code is designed. For this reason, modify ACPICA so that it is possible to install more than one system notify handler per namespace node. Namely, make acpi_install_notify_handler(), acpi_remove_notify_handler() and acpi_ev_notify_dispatch() use a list of system notify handler objects associated with a namespace node. Make acpi_remove_notify_handler() call acpi_os_wait_events_complete() upfront to avoid a situation in which concurrent instance of acpi_remove_notify_handler() removes the handler from under us while we're waiting for the event queues to flush. Signed-off-by: Rafael J. Wysocki Signed-off-by: Jesse Barnes commit f517709d65beed95f52f021b43e3035b52ef791a Author: Rafael J. Wysocki Date: Wed Feb 17 23:41:49 2010 +0100 ACPI / PM: Add more run-time wake-up fields Use the run_wake flag to mark all devices for which run-time wake-up events may be generated by the platform. Introduce a new wake-up flag, always_enabled, for marking devices that should be permanently enabled to generate run-time events. Also, introduce a reference counter for run-wake devices and a function that will initialize all of the run-time wake-up fields for given device. Signed-off-by: Rafael J. Wysocki Acked-by: Len Brown Signed-off-by: Jesse Barnes commit 9630bdd9b15d2f489c646d8bc04b60e53eb5ec78 Author: Rafael J. Wysocki Date: Wed Feb 17 23:41:07 2010 +0100 ACPI: Use GPE reference counting to support shared GPEs ACPI GPEs may map to multiple devices. The current GPE interface only provides a mechanism for enabling and disabling GPEs, making it difficult to change the state of GPEs at runtime without extensive cooperation between devices. Add an API to allow devices to indicate whether or not they want their device's GPE to be enabled for both runtime and wakeup events. Remove the old GPE type handling entirely, which gets rid of various quirks, like the implicit disabling with GPE type setting. This requires a small amount of rework in order to ensure that non-wake GPEs are enabled by default to preserve existing behaviour. Based on patches from Matthew Garrett . Signed-off-by: Matthew Garrett Signed-off-by: Rafael J. Wysocki Signed-off-by: Jesse Barnes commit c39fae1416d59fd565606793f090cebe3720d50d Author: Rafael J. Wysocki Date: Wed Feb 17 23:40:07 2010 +0100 PCI PM: Make it possible to force using INTx for PCIe PME signaling Apparently, some machines may have problems with PCI run-time power management if MSIs are used for the native PCIe PME signaling. In particular, on the MSI Wind U-100 PCIe PME interrupts are not generated by a PCIe root port after a resume from suspend to RAM, if the system wake-up was triggered by a PME from the device attached to this port. [It doesn't help to free the interrupt on suspend and request it back on resume, even if that is done along with disabling the MSI and re-enabling it, respectively.] However, if INTx interrupts are used for this purpose on the same machine, everything works just fine. For this reason, add a kernel command line switch allowing one to request that MSIs be not used for the native PCIe PME signaling, introduce a DMI table allowing us to blacklist machines that need this switch to be set by default and put the MSI Wind U-100 into this table. Signed-off-by: Rafael J. Wysocki Signed-off-by: Jesse Barnes commit c7f486567c1d0acd2e4166c47069835b9f75e77b Author: Rafael J. Wysocki Date: Wed Feb 17 23:39:08 2010 +0100 PCI PM: PCIe PME root port service driver PCIe native PME detection mechanism is based on interrupts generated by root ports or event collectors every time a PCIe device sends a PME message upstream. Once a PME message has been sent by an endpoint device and received by its root port (or event collector in the case of root complex integrated endpoints), the Requester ID from the message header is registered in the root port's Root Status register. At the same time, the PME Status bit of the Root Status register is set to indicate that there's a PME to handle. If PCIe PME interrupt is enabled for the root port, it generates an interrupt once the PME Status has been set. After receiving the interrupt, the kernel can identify the PCIe device that generated the PME using the Requester ID from the root port's Root Status register. [For details, see PCI Express Base Specification, Rev. 2.0.] Implement a driver for the PCIe PME root port service working in accordance with the above description. Based on a patch from Shaohua Li . Signed-off-by: Rafael J. Wysocki Signed-off-by: Jesse Barnes commit 58ff463396ad00828e922d50998787e97fd32512 Author: Rafael J. Wysocki Date: Wed Feb 17 23:36:58 2010 +0100 PCI PM: Add function for checking PME status of devices Add function pci_check_pme_status() that will check the PME status bit of given device and clear it along with the PME enable bit. It will be necessary for PCI run-time power management. Based on a patch from Shaohua Li Signed-off-by: Rafael J. Wysocki Signed-off-by: Jesse Barnes commit 6d3be84aab461815978d970aa45f5bc9e52dd772 Author: Kenji Kaneshige Date: Tue Feb 9 12:21:27 2010 +0900 PCI: mark is_pcie obsolete The "is_pcie" field in struct pci_dev is no longer needed because struct pci_dev has PCIe capability offset in "pcie_cap" field and (pcie_cap != 0) means the device is PCIe capable. This patch marks "is_pcie" fields obsolete. Current users of "is_pcie" field are: - drivers/ssb/scan.c - drivers/net/wireless/ath/ath9k/pci.c - drivers/net/wireless/ath/ath5k/attach.c - drivers/net/wireless/ath/ath5k/reset.c - drivers/acpi/hest.c - drivers/pci/pcie/pme/pcie_pme.c Will post patches for each to use pci_is_pcie() as a follow-up. Signed-off-by: Kenji Kaneshige Signed-off-by: Jesse Barnes commit 9958610552c0bd7558b41cb8addbd865587f142a Author: Yinghai Lu Date: Fri Jan 22 01:02:28 2010 -0800 PCI: set PCI_PREF_RANGE_TYPE_64 in pci_bridge_check_ranges Make pci_bridge_check_ranges() store the PCI_PREF_RANGE_TYPE_64 in addition to IORESOURCE_MEM_64. Just like pci_read_bridge_bases(). Signed-off-by: Yinghai Lu Signed-off-by: Jesse Barnes commit 32180e402f9ff1f3389c99edf3f393425e706080 Author: Yinghai Lu Date: Fri Jan 22 01:02:27 2010 -0800 PCI: pciehp: second try to get big range for pcie devices Handle the case where the slot bridge that doesn't get a pre-allocated resource big enough to handle its child resources.. For example pcie devices need 256M, but the bridge only gets 2M preallocated. Signed-off-by: Yinghai Lu Signed-off-by: Jesse Barnes commit 9789ac979b6b6ae6cc09f7b29c88e95ecb14ec39 Author: Yinghai Lu Date: Fri Jan 22 01:02:26 2010 -0800 PCI: pciehp: cleanup flow in pciehp_configure_device Move bus_size_bridges and assign resources out of pciehp_add_bridge() and do them all together, one time, including slot bridge, to avoid to calling assign resources several times when there are several bridges under the slot bridge. Using pci_assign_unassigned_bridge_resources. Signed-off-by: Yinghai Lu Reviewed-by: Alex Chiang Signed-off-by: Jesse Barnes commit 6841ec681a88b66651e4563040b9c7a7ad25d7b5 Author: Yinghai Lu Date: Fri Jan 22 01:02:25 2010 -0800 PCI: introduce pci_assign_unassigned_bridge_resources For use by pciehp. pci_setup_bridge() will not check enabled for the slot bridge, otherwise update res is not updated to bridge BAR. That is, bridge is already enabled for port service. Signed-off-by: Yinghai Lu Reviewed-by: Alex Chiang Signed-off-by: Jesse Barnes commit 977d17bb1749517b353874ccdc9b85abc7a58c2a Author: Yinghai Lu Date: Fri Jan 22 01:02:24 2010 -0800 PCI: update bridge resources to get more big ranges in PCI assign unssigned BIOS separates IO ranges between several IOHs, and on some slots, BIOS assigns resources to a bridge, but stops assigning resources to the device under that bridge, because the device needs a big resource. So: 1. allocate resources and record the failed device resources 2. clear the BIOS assigned resources of the parent bridge of failing device 3. go back and call pci assign unassigned 4. if it still fails, go up the tree, clear more bridges. and try again Signed-off-by: Yinghai Lu Signed-off-by: Jesse Barnes commit d65245c3297ac63abc51a976d92f45f2195d2854 Author: Yinghai Lu Date: Fri Jan 22 01:02:23 2010 -0800 PCI: don't shrink bridge resources When clearing leaf bridge resources, trying to get a big enough one, we could shrink the bridge if there is no resource under it. Confirm against the old resource side to make sure we're increasing the allocation. Signed-off-by: Yinghai Lu Signed-off-by: Jesse Barnes commit cd81e1ea1a4cda94aa5f3e942301cf0da497c262 Author: Yinghai Lu Date: Fri Jan 22 01:02:22 2010 -0800 PCI: reject mmio ranges starting at 0 on pci_bridge read We already track unassigned resources in struct resource, and this prevents us from overwriting resource flags and info in the unassigned case. Signed-off-by: Yinghai Lu Signed-off-by: Jesse Barnes commit 568ddef8735d4a51a521ba6af026ee0c32281566 Author: Yinghai Lu Date: Fri Jan 22 01:02:21 2010 -0800 PCI: add failed_list to pci_bus_assign_resources This allows us to track failed allocations for later re-trying with reallocation. Signed-off-by: Yinghai Lu Reviewed-by: Alex Chiang Signed-off-by: Jesse Barnes commit 5009b46025acb2d3955d2c93574604fba667ef39 Author: Yinghai Lu Date: Fri Jan 22 01:02:20 2010 -0800 PCI: add pci_bridge_release_resources and pci_bus_release_bridge_resources We use this in later patches to free resrouce ranges for reassignment in an effort to support a wider variety of PCI topologies. Signed-off-by: Yinghai Lu Reviewed-by: Alex Chiang Signed-off-by: Jesse Barnes commit ba02b242bbf8e4e1bc63d62e8ccec33b4e5ea132 Author: Andrew Morton Date: Tue Feb 2 14:45:54 2010 -0800 PCI hotplug: check ioremap() return value in ibmphp_ebda.c check ioremap() return value. Cc: Signed-off-by: Andrew Morton Signed-off-by: Jesse Barnes commit 939fdc67350e15aeeea70457d5b4bc1116bb4fd5 Author: Randy Dunlap Date: Thu Feb 4 12:12:23 2010 -0800 PCI hotplug: fix ibmphp build error Add header file to fix build error: drivers/pci/hotplug/ibmphp_hpc.c:135: error: implicit declaration of function 'init_MUTEX' drivers/pci/hotplug/ibmphp_hpc.c:136: error: implicit declaration of function 'init_MUTEX_LOCKED' drivers/pci/hotplug/ibmphp_hpc.c:797: error: implicit declaration of function 'down' drivers/pci/hotplug/ibmphp_hpc.c:807: error: implicit declaration of function 'up' Signed-off-by: Randy Dunlap Signed-off-by: Jesse Barnes commit 4fb88c1a28a8dc302bdc09858e7cdafc97bef794 Author: Matthew Wilcox Date: Sun Jan 17 14:01:41 2010 -0700 PCI: Make pci_scan_slot more robust Yinghai pointed out that the new pci_scan_slot() crashes when called on an ARI-capable slot that is empty. Fix this by exiting early from pci_scan_slot if there is no device in the slot. Also make next_ari_func() robust against devices not existing in case the ARI capability is corrupt. ARI also requires that the devices be listed in order, so if we find a function listed that is out of order, stop scanning to prevent loops. Signed-off-by: Matthew Wilcox Signed-off-by: Jesse Barnes commit 0bf01c3c86d4b9ea279d6215420484db887f5db5 Author: Jiri Slaby Date: Wed Jan 20 14:15:54 2010 +0100 PCI: hotplug/cpcihp, fix pci device refcounting Stanse found an ommitted pci_dev_put on one error path in cpcihp_generic_init. The path is taken on !dev, but also when dev->hdr_type != PCI_HEADER_TYPE_BRIDGE. However it omits to pci_dev_put on the latter. As it is fine to pass NULL to pci_dev_put, put it in there uncoditionally. Signed-off-by: Jiri Slaby Cc: Scott Murray Signed-off-by: Jesse Barnes commit 41a68a748bbc61f5bcea999e33ba72926dfbe6f7 Author: Tilman Schmidt Date: Mon Jan 18 17:24:10 2010 +0100 PCI: push deprecated pci_find_device() function to last user The ISDN4Linux HiSax driver family contains the last remaining users of the deprecated pci_find_device() function. This patch creates a private copy of that function in HiSax, and removes the now unused global function together with its controlling configuration option, CONFIG_PCI_LEGACY. Signed-off-by: Tilman Schmidt Signed-off-by: Jesse Barnes commit 7c9342b8dd1a32386fc32bffb9eedebbfe264763 Author: Yinghai Lu Date: Tue Dec 22 15:02:24 2009 -0800 PCI: don't dump resource when bus resource flags indicates unused Don't print out resources without flags to avoid cluttering up the debug output. Signed-off-by: Yinghai Lu Signed-off-by: Jesse Barnes commit 5eeec0ec931a01e85b3701ce121b7d8a1800ec60 Author: Yinghai Lu Date: Tue Dec 22 15:02:22 2009 -0800 resource: add release_child_resources Useful for freeing a portion of the resource tree, e.g. when trying to reallocate resources more efficiently. Signed-off-by: Yinghai Lu Acked-by: Linus Torvalds Signed-off-by: Jesse Barnes commit 7cc5997d1dada3bdeed95a59c2f4f6c66cbb0767 Author: Yinghai Lu Date: Tue Dec 22 15:02:21 2009 -0800 PCI: separate pci_setup_bridge to small functions This is a good cleanup in itself, and makes it easier to modify specific resource types in later code. Signed-off-by: Yinghai Lu Acked-by: Linus Torvalds Signed-off-by: Jesse Barnes commit b0fc889c4311835ae7d02f433154bc20cad9ee11 Author: Chandru Date: Mon Jan 11 11:49:21 2010 +0530 PCI hotplug: ibmphp: read the length of ebda and map entire ebda region ibmphp driver currently maps only 1KB of ebda memory area into kernel address space during driver initialization. This causes kernel oops when the driver is modprobe'd and it accesses memory beyond 1KB within ebda segment. The first byte of ebda segment actually stores the length of the ebda region in Kilobytes. Hence make use of the length parameter and map the entire ebda region. Signed-off-by: Chandru Siddalingappa Signed-off-by: Jesse Barnes commit 6fcaf17ac7a512227112ac81c0e1a5862bab57a6 Author: Jiri Slaby Date: Wed Jan 6 17:47:56 2010 +0100 PCI hotplug: fix memory leaks Stanse found a cut&pasted memory leak in pciehp_queue_pushbutton_work and shpchp_queue_pushbutton_work. info is not freed/assigned on all paths. Fix that. Reviewed-by: Kenji Kaneshige Signed-off-by: Jiri Slaby Signed-off-by: Jesse Barnes commit 3b7a17fcdae532d29dffab9d564a28be08960988 Author: Dominik Brodowski Date: Fri Jan 1 17:40:50 2010 +0100 resource/PCI: mark struct resource as const Now that we return the new resource start position, there is no need to update "struct resource" inside the align function. Therefore, mark the struct resource as const. Cc: Bjorn Helgaas Cc: Yinghai Lu Signed-off-by: Dominik Brodowski Signed-off-by: Jesse Barnes commit b26b2d494b659f988b4d75eb394dfa0ddac415c9 Author: Dominik Brodowski Date: Fri Jan 1 17:40:49 2010 +0100 resource/PCI: align functions now return start of resource As suggested by Linus, align functions should return the start of a resource, not void. An update of "res->start" is no longer necessary. Cc: Bjorn Helgaas Cc: Yinghai Lu Signed-off-by: Dominik Brodowski Signed-off-by: Jesse Barnes commit 93da6202264ce1256b04db8008a43882ae62d060 Author: Seth Heasley Date: Tue Jan 12 16:56:37 2010 -0800 x86/PCI: irq and pci_ids patch for Intel Cougar Point DeviceIDs This patch adds the Intel Cougar Point (PCH) LPC and SMBus Controller DeviceIDs. Signed-off-by: Seth Heasley Signed-off-by: Jesse Barnes commit 93177a748ba0d4f3d3e51c8e6c785773bf6a70df Author: Rafael J. Wysocki Date: Sat Jan 2 22:57:24 2010 +0100 PCI: Clean up build for CONFIG_PCI_QUIRKS unset Currently, drivers/pci/quirks.c is built unconditionally, but if CONFIG_PCI_QUIRKS is unset, the only things actually built in this file are definitions of global variables and empty functions (due to the #ifdef CONFIG_PCI_QUIRKS embracing all of the code inside the file). This is not particularly nice and if someone overlooks the #ifdef CONFIG_PCI_QUIRKS, build errors are introduced. To clean that up, move the definitions of the global variables in quirks.c that are always built to pci.c, move the definitions of the empty functions (compiled when CONFIG_PCI_QUIRKS is unset) to headers (additionally make these functions static inline) and modify drivers/pci/Makefile so that quirks.c is only built if CONFIG_PCI_QUIRKS is set. Signed-off-by: Rafael J. Wysocki Signed-off-by: Jesse Barnes commit 3804259475314a50e4d7a8a974a22fddb6ac7dd7 Author: Jesse Barnes Date: Mon Jan 4 15:44:10 2010 -0800 PCI hotplug: remove obsolete usage of get_bus_speed from rpaphp hotplug ops No longer needed and causes build breakage. Reported-by: Stephen Rothwell Signed-off-by: Jesse Barnes commit 9dfd97fe12f79ec8b68feb63912a4ef2f31f571a Author: Matthew Wilcox Date: Sun Dec 13 08:11:35 2009 -0500 PCI: Add support for reporting PCIe 3.0 speeds Add the 8.0 GT/s speed. Signed-off-by: Matthew Wilcox Signed-off-by: Jesse Barnes commit 45b4cdd57ef0e57555b2ab61b584784819b39365 Author: Matthew Wilcox Date: Sun Dec 13 08:11:34 2009 -0500 PCI: Add support for AGP in cur/max bus speed Take advantage of some gaps in the table to fit in support for AGP speeds. Signed-off-by: Matthew Wilcox Signed-off-by: Jesse Barnes commit 9be60ca0497a2563662fde4c9007841c3b79a742 Author: Matthew Wilcox Date: Sun Dec 13 08:11:33 2009 -0500 PCI: Add support for detection of PCIe and PCI-X bus speeds Both PCIe and PCI-X bridges report their secondary bus speed in their respective capabilities. Signed-off-by: Matthew Wilcox Signed-off-by: Jesse Barnes commit 3749c51ac6c1560aa1cb1520066bed84c6f8152a Author: Matthew Wilcox Date: Sun Dec 13 08:11:32 2009 -0500 PCI: Make current and maximum bus speeds part of the PCI core Move the max_bus_speed and cur_bus_speed into the pci_bus. Expose the values through the PCI slot driver instead of the hotplug slot driver. Update all the hotplug drivers to use the pci_bus instead of their own data structures. Signed-off-by: Matthew Wilcox Signed-off-by: Jesse Barnes commit 536c8cb49eccd4f753b4782e7e975ef87359cb44 Author: Matthew Wilcox Date: Sun Dec 13 08:11:31 2009 -0500 PCI: Unify pcie_link_speed and pci_bus_speed These enums must not overlap anyway, since we only have a single pci_bus_speed_strings array. Use a single enum, and move it to pci.h. Add 'SPEED' to the pcie names to make it clear what they are. Signed-off-by: Matthew Wilcox Signed-off-by: Jesse Barnes commit f07852d6442c46c50b59c7e2acc8a1b291f9ab6d Author: Matthew Wilcox Date: Sun Dec 13 08:10:02 2009 -0500 PCI: Rewrite pci_scan_slot The Alternate Routing-ID Interpretation capability allows a single device to have up to 256 functions. They can be populated sparsely, so the current technique of scanning every eighth function is not guaranteed to find them all. By introducing a 'next_fn' function pointer, we can use the linked list of functions in the ARI capability to scan all the functions which exist. We can then speed up the pci_scan_slot by skipping the scan of subsequent devfns for PCIe devices which are the direct children of Root Ports or Downstream Ports. These devices are only permitted to implement device 0, unless they are ARI devices, in which case they'll be scanned by the ARI code above. Signed-off-by: Matthew Wilcox Signed-off-by: Jesse Barnes commit 57ab12e418ec4fe24c11788bb1bbdabb29d05679 Author: Jiri Kosina Date: Wed Feb 17 14:25:01 2010 +0100 HID: usbhid: initialize interface pointers early enough Move the initialization of USB interface pointers from _start() over to _probe() callback, which is where it belongs. This fixes case where interface is NULL when parsing of report descriptor fails. LKML-Reference: <20100213135720.603e5f64@neptune.home> Reported-by: Alan Stern Tested-by: Bruno Prémont Signed-off-by: Jiri Kosina commit 7f978b9bf535cbbd1ae8d9fbdd7c4f60ab38f260 Author: Jiri Kosina Date: Wed Feb 17 09:36:35 2010 +0100 HID: extend mask for BUTTON usage page Now that joystick button usages can expand over 15 buttons, we have to properly mask out the code from hid usage to cover the whole 0xffff available space. Reported-by: Stefan Bader Signed-off-by: Jiri Kosina commit 4f4517c45f325ba511458465430a52864a5d0d30 Author: Ernst Schwab Date: Tue Feb 16 21:02:57 2010 -0700 spi: Correct SPI clock frequency setting in spi_mpc8xxx Correct SPI clock frequency division factor rounding, preventing clock rates higher than the maximum specified clock frequency being used. When specifying spi-max-frequency = <10000000> in the device tree, the resulting frequency was 11.1 MHz, with spibrg being 133333332. According to the freescale data sheet [1], the spi clock rate is spiclk = spibrg / (4 * (pm+1)) The existing code calculated pm = mpc8xxx_spi->spibrg / (hz * 4); pm--; resulting in pm = (int) (3.3333) - 1 = 2, resulting in spiclk = 133333332/(4*(2+1)) = 11111111 With the fix, pm = (mpc8xxx_spi->spibrg - 1) / (hz * 4) + 1; pm--; resulting in pm = (int) (4.3333) - 1 = 3, resulting in spiclk = 133333332/(4*(3+1)) = 8333333 Without the fix, for every desired SPI frequency that is not exactly derivable from spibrg, pm will be too small due to rounding down, resulting in a too high SPI clock, so we need a pm which is one higher. For values that are exactly derivable, spibrg will be dividable by (hz*4) without remainder, and (int) ((spibrg-1)/(hz*4)) will be one lower than (int) (spibrg)/(hz*4), which is compensated by adding 1. For these values, the fixed version calculates the same pm as the unfixed version. For all values that are not exactly derivable, spibrg will be not dividable by (hz*4) without remainder, and (int) ((spibrg-1)/(hz*4)) will be the same as (int) (spibrg)/(hz*4), and the calculated pm will be one higher than calculated by the unfixed version. References: [1] http://www.freescale.com/files/32bit/doc/ref_manual/MPC8315ERM.pdf, page 22-10 -> 1398 Signed-off-by: Ernst Schwab Signed-off-by: Grant Likely commit ff5cf34c809cd5950579e46e7c10c29bc647aaf1 Author: Rafi Rubin Date: Tue Feb 16 10:22:11 2010 -0500 HID: hid-ntrig: Single touch mode tap Add DOUBLETAP to events emitted when in single touch only mode. Users with a single touch firmware report not seeing the DOUBLETAP events; this is a side effect of dropping old mapping for confidence. The confidence mapping may be fine for singletouch mode but causes problems in multitouch mode. Signed-off-by: Rafi Rubin Signed-off-by: Jiri Kosina commit dbf2b17de505d390b5ecf5b5944fc0c88f6d66fe Author: Rafi Rubin Date: Fri Feb 12 21:13:05 2010 -0500 HID: hid-ntrig: multitouch cleanup and fix This cleans up the identification of multitouch groups and enables the end of group sync. Taps are now explicitly handled to adjust for the changes in the event stream in multitouch mode. Added triple and quad tap for the benefit of tools that recognize different tap types but do not have full multi touch support. This cleans up the behavior particularly for the latest firmware, which didn't work particularly well with the older version of the driver. In this form, when multitouch is active, both mt and st events will come out of the "N-Trig MultiTouch" device. And when its not st events will come out of "N-Trig Touchscreen". Signed-off-by: Rafi Rubin Signed-off-by: Jiri Kosina commit b0549cf1a35a92edf053d94066e60fb0ed02bb71 Author: Rafi Rubin Date: Thu Feb 11 22:14:06 2010 -0500 HID: n-trig: remove unnecessary tool switching With the pen and touch split apart, we no longer need to inject additional tool switching events. Signed-off-by: Rafi Rubin Signed-off-by: Jiri Kosina commit 943ed464f3722de0569cf41ba6ec094768ac046d Author: Rafi Rubin Date: Thu Feb 11 22:14:05 2010 -0500 HID: hid-ntrig add multi input quirk and clean up Added a quirk to enable distinct input devices. The digitizer utilizes three inputs to represent pen, multitouch and a normal touch screen. With the Pen partitioned, it behaves well and does not need special handling. Also, I set names to the input devices to clarify the functions of the various inputs. Signed-off-by: Rafi Rubin Signed-off-by: Jiri Kosina commit df0edeb59eb559be0bee53452fda2f5cc0ae133f Author: Grant Likely Date: Sun Feb 14 14:14:00 2010 -0700 of: remove undefined request_OF_resource & release_OF_resource Neither request_OF_resource or release_OF_resource are defined anywhere. Remove the declarations. Signed-off-by: Grant Likely Acked-by: Benjamin Herrenschmidt Acked-by: Michal Simek commit 0d351c3e932c2e155ef5e4c3f5b87223abd4eea6 Author: Grant Likely Date: Sun Feb 14 14:13:57 2010 -0700 of/sparc: Remove sparc-local declaration of allnodes and devtree_lock Both allnodes and devtree_lock are defined in common code. The extern declaration should be in the common header too so that the compiler can type check. allnodes is already in of.h, but devtree_lock should be declared there too. This patch removes the SPARC declarations and uses decls in of.h instead. Signed-off-by: Grant Likely Acked-by: Benjamin Herrenschmidt Acked-by: Michal Simek Acked-by: David S. Miller commit fc0bdae49d810e4cb32d7b547bc6d4dfb08f9e2e Author: Grant Likely Date: Sun Feb 14 07:13:55 2010 -0700 of: move definition of of_chosen into common code. Rather than defining of_chosen in each arch, it can be defined for all in driver/of/base.c Signed-off-by: Grant Likely Acked-by: Benjamin Herrenschmidt Acked-by: Michal Simek commit 22d5579e66101162fd1119f2e7f4f999ca8b48c7 Author: Grant Likely Date: Sun Feb 14 07:13:52 2010 -0700 of: remove unused extern reference to devtree_lock Neither the powerpc nor the microblaze code use devtree_lock anymore. Remove the extern reference. Signed-off-by: Grant Likely Acked-by: Benjamin Herrenschmidt Acked-by: Michal Simek commit 7c7b60cb87547b1664a4385c187f029bf514a737 Author: Grant Likely Date: Sun Feb 14 07:13:50 2010 -0700 of: put default string compare and #a/s-cell values into common header Most architectures don't need to change these. Put them into common code to eliminate some duplication Signed-off-by: Grant Likely Acked-by: Benjamin Herrenschmidt Acked-by: Michal Simek commit 4ef7b373df330bc0ff037dc4792d373c9346375f Author: Jeremy Kerr Date: Sun Feb 14 07:13:47 2010 -0700 of/flattree: Don't assume HAVE_LMB We don't always have lmb available, so make arches provide an early_init_dt_alloc_memory_arch() to handle the allocation of memory in the fdt code. When we don't have lmb.h included, we need asm/page.h for __va. Signed-off-by: Jeremy Kerr Signed-off-by: Grant Likely Acked-by: Benjamin Herrenschmidt Acked-by: Michal Simek commit 9dfbf207802c7e8cda9d081a8d750b50633c82d2 Author: Jeremy Kerr Date: Sun Feb 14 07:13:43 2010 -0700 of: protect linux/of.h with CONFIG_OF For platforms that have CONFIG_OF optional, we need to make the contents of linux/of.h conditional on CONFIG_OF. Signed-off-by: Jeremy Kerr Signed-off-by: Grant Likely Acked-by: Benjamin Herrenschmidt Acked-by: Michal Simek commit 7c540d9e3da38c3d1c15fb8059e4577a84ac0066 Author: Jeremy Kerr Date: Sun Feb 14 07:13:41 2010 -0700 proc_devtree: fix THIS_MODULE without module.h Commit e22f628395432b967f2f505858c64450f7835365 introduced a build breakage for ARM devtree work: the THIS_MODULE macro was added, but we don't have module.h This change adds the necessary #include to get THIS_MODULE defined. While we could just replace it with NULL (PROC_FS is a bool, not a tristate), using THIS_MODULE will prevent unexpected breakage if we ever do compile this as a module. Signed-off-by: Jeremy Kerr Signed-off-by: Grant Likely Acked-by: Benjamin Herrenschmidt Acked-by: Michal Simek commit 21b082ecdd7e6b8a5eba2cc013cae41b24de7f51 Author: Grant Likely Date: Sun Feb 14 07:13:38 2010 -0700 of: Remove old and misplaced function declarations The following functions don't exist: finish_device_tree() print_properties() prom_n_intr_cells() prom_get_irq_senses() The following functions are in drivers/of/base.c, so the declaration belongs in of.h instead of of_fdt.h of_machine_is_compatible() prom_add_property() prom_remove_property() prom_update_property() Signed-off-by: Grant Likely Acked-by: Benjamin Herrenschmidt Acked-by: Michal Simek commit 858155fbcc0cd713f6382c527bb1c3abc0ed6d00 Author: Oliver Neukum Date: Fri Feb 12 13:02:28 2010 +0100 HID: usbhid: introduce timeout for stuck ctrl/out URBs Some devices do not react to a control request (seen on APC UPS's) resulting in a slow stream of messages, "generic-usb ... control queue full". Therefore request needs a timeout. Cc: stable@kernel.org Signed-off-by: Oliver Neukum Signed-off-by: David Fries Signed-off-by: Jiri Kosina commit 71b38bd4c1cc4f2b653064357e4efab77dfd711d Author: Michael Poole Date: Thu Feb 11 00:32:57 2010 -0500 HID: magicmouse: coding style and probe failure fixes Use proper values to initialize bool configuration variables, tabs rather than spaces, no braces for one-line else clause, __set_bit() when the operation doesn't have to be atomic, input_set_abs_params() rather than writing the fields directly, and call hid_hw_stop() when appropriate to handle failures in the probe. Signed-off-by: Michael Poole Signed-off-by: Jiri Kosina commit c8a8602b76b6703df1243e31be01cf0e4451e4a6 Author: Jiri Kosina Date: Wed Feb 10 15:29:02 2010 +0100 HID: remove MODULE_VERSION from new drivers MODULE_VERSION doesn't make too much sense for drivers merged into main tree, as git is much better tracking revisions than any developer might ever be. Signed-off-by: Jiri Kosina commit 9f5231472340ebcaf2dec75428b67d5d0d872857 Author: Jiri Kosina Date: Wed Feb 10 14:59:03 2010 +0100 HID: fix up Kconfig entry for MagicMouse Make Apple MagicMouse Kconfig entry consistent with other dirvers. Also expand the tristate text a little bit more, so that it doesn't clash with already existing HID_APPLE. Signed-off-by: Jiri Kosina commit 128537cea464d919febeaea2000e256749f317eb Author: Michael Poole Date: Sat Feb 6 12:24:36 2010 -0500 HID: add a device driver for the Apple Magic Mouse. The Magic Mouse requires that a driver send an unlock Report(Feature) command, similar to the Wacom wireless tablet and Sixaxis controller quirks. This turns on an Input Report that isn't published in the input Report descriptor that contains touch data (and usually overrides the normal motion and click Report). Because the mouse has only one switch and no scroll wheel, the driver (under control of parameters) emulates a middle button and scroll wheel. User space could also ignore and/or re-synthesize those events based on the reported events. Some user-space tools to talk to the mouse directly (that is, when it is not associated with the host's HIDP stack) are at http://github.com/entrope/linux-magicmouse Signed-off-by: Michael Poole Signed-off-by: Jiri Kosina commit 90a006abf8015c8cab893555244d8fc673b24839 Author: Michael Poole Date: Sun Jan 24 22:32:29 2010 -0500 HID: Export hid_register_report The Apple Magic Mouse (and probably other devices) publish reports that are not called out in their HID report descriptors -- they only send them when enabled through other writes to the device. This allows a driver to handle these unlisted reports. Signed-off-by: Michael Poole Signed-off-by: Jiri Kosina commit 77f720b71d88a3cbf574c113566a31c93099f97d Author: Stephane Chatty Date: Sat Feb 6 15:17:13 2010 +0100 HID: Support for MosArt multitouch panel Added support for MosArt dual-touch panels, present in the Asus T91MT notebook. Signed-off-by: Stephane Chatty Signed-off-by: Jiri Kosina commit 580363db92572cccbe6226bf83321e50a9ea50ea Author: Stephane Chatty Date: Sat Feb 6 15:20:03 2010 +0100 HID: add pressure support for the Stantum multitouch panel Added pressure handling for Stantum multitouch panels Signed-off-by: Stephane Chatty Signed-off-by: Jiri Kosina commit b32758c7216f337044ceb6dcaa754b8eda95a59f Author: Stephane Chatty Date: Wed Feb 10 12:09:17 2010 +0100 HID: fixed bug in single-touch emulation on the stantum panel Fixed stupid copy-paste bug in touchscreen emulation for the Stantum multitouch panel: a flag was reset just before being tested. Signed-off-by: Stephane Chatty Signed-off-by: Jiri Kosina commit 04b954a673dd02f585a2769c4945a43880faa989 Author: David Gibson Date: Mon Feb 1 21:34:15 2010 -0700 of/flattree: Make the kernel accept ePAPR style phandle information Currently when processing flattened device trees, the kernel expects the phandle in a property called "linux,phandle". The ePAPR spec - not being Linux specific - instead requires phandles to be encoded in a property named simply "phandle". This patch makes the kernel accept either form when unflattening the device tree. Signed-off-by: David Gibson Signed-off-by: Grant Likely commit 087f79c48c090a2c0cd9ee45231d63290d2036d2 Author: Jeremy Kerr Date: Sat Jan 30 04:14:19 2010 -0700 of/flattree: endian-convert members of boot_param_header The boot_param_header has big-endian fields, so change the types to __be32, and perform endian conversion when we access them. Signed-off-by: Jeremy Kerr Signed-off-by: Grant Likely commit 337148812f97368a8ec4a69f1691e4c5ce3af494 Author: Jeremy Kerr Date: Sat Jan 30 01:45:26 2010 -0700 of: assume big-endian properties, adding conversions where necessary Properties in the device tree are specified as big-endian. At present, the only platforms to support device trees are also big-endian, so we've been acessing the properties as raw values. We'd like to add device tree support to little-endian platforms too, so add endian conversion to the sites where we access property values in the common of code. Compiled on powerpc (ppc44x_defconfig & ppc64_defconfig) and arm (fdt support only for now). Signed-off-by: Jeremy Kerr Signed-off-by: Grant Likely commit 2e89e685a8fd0e8334de967739d11e2e28c1a4dd Author: Jeremy Kerr Date: Sat Jan 30 01:41:49 2010 -0700 of: use __be32 for cell value accessors Currently, we're using u32 for cell values, and hence assuming host-endian device trees. As we'd like to support little-endian platforms, use a __be32 for cell values, and convert in the cell accessors. Signed-off-by: Jeremy Kerr Signed-off-by: Grant Likely commit 36b9d3070d653af5807cef74ff129721d9047107 Author: Jeremy Kerr Date: Mon Feb 1 21:34:14 2010 -0700 of/flattree: use OF_ROOT_NODE_{SIZE,ADDR}_CELLS DEFAULT for fdt parsing At present we're using hard-coded values for defaults when parsing the FDT. This change uses the #defines instead. Signed-off-by: Jeremy Kerr Signed-off-by: Grant Likely commit 1406bc2f57787797d1f6a3675c019a7093769275 Author: Jeremy Kerr Date: Sat Jan 30 01:31:21 2010 -0700 of/flattree: use callback to setup initrd from /chosen At present, the fdt code sets the kernel-wide initrd_start and initrd_end variables when parsing /chosen. On ARM, we only set these once the bootmem has been reserved. This change adds an arch hook to setup the initrd from the device tree: void early_init_dt_setup_initrd_arch(unsigned long start, unsigned long end); The arch-specific code can then setup the initrd however it likes. Compiled on powerpc, with CONFIG_BLK_DEV_INITRD=y and =n. Signed-off-by: Jeremy Kerr Signed-off-by: Grant Likely commit 50ab2fe147e22c8786552cda1791a61ae81b84d2 Author: Jeremy Kerr Date: Mon Feb 1 21:34:14 2010 -0700 proc_devtree: include linux/of.h Currenly, proc_devtree.c depends on asm/prom.h to include linux/of.h, to provide some device-tree definitions (eg, struct property). Instead, include linux/of.h directly. We still need asm/prom.h for HAVE_ARCH_DEVTREE_FIXUPS. Signed-off-by: Jeremy Kerr Signed-off-by: Grant Likely commit 8cfb3343f70bcf9403218df120ecf345f06dd585 Author: Jeremy Kerr Date: Mon Feb 1 21:34:14 2010 -0700 of: make set_node_proc_entry private to proc_devtree.c We only need set_node_proc_entry in proc_devtree.c, so move it there. This fixes the !HAVE_ARCH_DEVTREE_FIXUPS build, as we can't make make the definition in linux/of.h conditional on this #define (definitions in asm/prom.h can't be exposed to linux/of.h, due to the enforced #include ordering). Signed-off-by: Jeremy Kerr Signed-off-by: Grant Likely commit a9f2f63a671d5e91ed89ade408d87f1692a373de Author: Jeremy Kerr Date: Mon Feb 1 21:34:14 2010 -0700 of: include linux/proc_fs.h We use a few procfs-specific functions (eg, proc_device_tree_*) which aren't covered by the current includes. This causes the following build error on arm: drivers/of/base.c: In function 'prom_add_property': drivers/of/base.c:861: error: implicit declaration of function 'proc_device_tree_add_prop' drivers/of/base.c: In function 'prom_remove_property': drivers/of/base.c:902: error: implicit declaration of function 'proc_device_tree_remove_prop' drivers/of/base.c: In function 'prom_update_property': drivers/of/base.c:946: error: implicit declaration of function 'proc_device_tree_update_prop' Add proc_fs.h for these prototypes. Signed-off-by: Jeremy Kerr Signed-off-by: Grant Likely commit 51975db0b7333cf389b64b5040c2a910341d241a Author: Grant Likely Date: Mon Feb 1 21:34:14 2010 -0700 of/flattree: merge early_init_dt_scan_memory() common code Merge common code between PowerPC and Microblaze architectures. Signed-off-by: Grant Likely Acked-by: Michal Simek commit 71a157e8edca55198e808f8561dd49017a54ee34 Author: Grant Likely Date: Mon Feb 1 21:34:14 2010 -0700 of: add 'of_' prefix to machine_is_compatible() machine is compatible is an OF-specific call. It should have the of_ prefix to protect the global namespace. Signed-off-by: Grant Likely Acked-by: Michal Simek commit 89751a7cb70a20f0d604dd7c4be29dd7b0011718 Author: Jeremy Kerr Date: Mon Feb 1 21:34:11 2010 -0700 of: merge of_find_node_by_phandle Merge common function between powerpc, sparc and microblaze. Code is identical for powerpc and microblaze, but adds a lock (and release) of the devtree_lock on sparc. Signed-off-by: Jeremy Kerr Signed-off-by: Grant Likely commit fcdeb7fedf89f4bbc2e11959794968080cd8426e Author: Grant Likely Date: Fri Jan 29 05:04:33 2010 -0700 of: merge of_attach_node() & of_detach_node() Merge common code between PowerPC and Microblaze Signed-off-by: Grant Likely Tested-by: Wolfram Sang Acked-by: Benjamin Herrenschmidt commit 580537140568caddbc8a727d4c2f238d38707f68 Author: Grant Likely Date: Thu Jan 28 22:18:56 2010 -0700 microblaze: remove early_init_dt_scan_cpus() and phyp_dump_*() Microblaze only has one CPU, it isn't SMP at all. early_init_dt_scan_cpus() is effectively just a no-op, so remove it. Microblaze doesn't support hypervisor assisted dump either, so the phyp stuff can also go. Signed-off-by: Grant Likely Acked-by: Michal Simek commit eabe5c90580a065aed8ce6a5ba53eb443d317fae Author: Bastien Nocera Date: Tue Feb 9 11:43:19 2010 +0100 HID: fix typo in error message Signed-off-by: Jiri Kosina commit 0690535d6bcec5eb28573824df5c8a49ec85b696 Author: Leo P White Date: Mon Feb 8 13:02:05 2010 +0000 HID: add mapping for "AL Network Chat" usage Adding a mapping for the 'AL Network Chat' usage from the 'Consumer' usage page (USB HID Usage Tables v1.11). This usage is used by some keyboards for a multimedia key. Signed-off-by: Leo P White Signed-off-by: Jiri Kosina commit c2c3489c5b0fdb8fbf0f5e9424905c2994ab5660 Author: Thadeu Lima de Souza Cascardo Date: Thu Feb 4 13:36:24 2010 -0200 HID: use multi input quirk for TouchPack touchscreen This device generates ABS_Z and ABS_RX events, while it should be generating ABS_X and ABS_Y instead. Using the MULTI_INPUT quirk solves this issue. Signed-off-by: Thadeu Lima de Souza Cascardo Signed-off-by: Daniel Oliveira Nascimento [jkosina@suse.cz: fixed blacklist ordering while resolving conflict] [jkosina@suse.cz: fixed typo to make it compile] Signed-off-by: Jiri Kosina commit 3cebbb81c7e75321e25cc586d07a25a3d98278fc Author: Michal Marek Date: Wed Feb 3 17:20:14 2010 +0100 kconfig: Simplify LSMOD= handling Signed-off-by: Michal Marek LKML-Reference: <20100203162014.GA10956@sepie.suse.cz> Signed-off-by: Steven Rostedt commit 2dbf209d7a7ab94266b936bd2da6a4026c279992 Author: Jiri Kosina Date: Wed Feb 3 16:11:12 2010 +0100 HID: make full-fledged hid-bus drivers properly selectable For historical reasons, we don't have most of the in-tree drivers residing on hid-bus properly selectable in kernel configuration unless CONFIG_EMBEDDED is set. This has been introduced on Linus' request from 14 Oct === As to the Kconfig options - do they really add so much space that you need to ask for the quirks? You didn't use to. Can you make the questions depend on EMBEDDED, or at least on the HID_COMPAT thing or whatever? === This still makes perfect sense for small and tiny drivers, which just fix report descriptors, fix up HID->input mappings that slightly violates HUT standard, send one extra packet to the device that is needed before it becomes functional, etc. Since then, we have been gathering more and more HID-bus drivers, which are full-fledged drivers. For these, the size argument becomes more valid. Plus the devices are much more special than "just violates HID specification in this one or two tiny unimportant points". Therefore I am marking such drivers as properly selectable no matter the setting of CONFIG_EMBEDDED, while keeping all the small and tiny ones compiled by default. Signed-off-by: Jiri Kosina commit 342f31e84eec9002b75f6fcdec6bd932ac77a390 Author: Jiri Kosina Date: Wed Feb 3 15:52:31 2010 +0100 HID: make Wacom modesetting failures non-fatal With Wacom tablet mode-setting moved from userspace into kernel, we don't have to consider failures of device queries through the _raw callback as hard failure, as the driver can safely continue anyway. This is consistent with the current USB driver in wacom_sys.c Reported-by: Ping Cheng Signed-off-by: Jiri Kosina commit f9ce7c283c16538955d5d094101889792bcde109 Author: Bastien Nocera Date: Wed Jan 20 12:01:53 2010 +0000 HID: Enable Sixaxis controller over Bluetooth Now that hid_output_raw_report works, port the PS3 Sixaxis Bluetooth quirk from user-space, into kernel-space. Signed-off-by: Bastien Nocera Acked-by: Marcel Holtmann Signed-off-by: Jiri Kosina commit 46a709b900bfcf43244cd19cf3245c77484ec733 Author: Bastien Nocera Date: Wed Jan 20 12:00:53 2010 +0000 HID: Implement Wacom quirk in the kernel The hid-wacom driver required user-space to poke at the tablet to make it send data about the cursor location. This patch makes it do the same thing but in the kernel. Signed-off-by: Bastien Nocera Acked-by: Marcel Holtmann Signed-off-by: Jiri Kosina commit d4bfa033ed84e0ae446eff445d107ffd5ee78df3 Author: Jiri Kosina Date: Fri Jan 29 15:03:36 2010 +0100 HID: make raw reports possible for both feature and output reports In commit 2da31939a42 ("Bluetooth: Implement raw output support for HIDP layer"), support for Bluetooth hid_output_raw_report was added, but it pushes the data to the intr socket instead of the ctrl one. This has been fixed by 6bf8268f9a91f1 ("Bluetooth: Use the control channel for raw HID reports") Still, it is necessary to distinguish whether the report in question should be either FEATURE or OUTPUT. For this, we have to extend the generic HID API, so that hid_output_raw_report() callback provides means to specify this value so that it can be passed down to lower level hardware drivers (currently Bluetooth and USB). Based on original patch by Bastien Nocera Acked-by: Marcel Holtmann Signed-off-by: Jiri Kosina commit f54405db66fbec11679241daefd16fd8291a5762 Author: Alex Neblett Date: Tue Feb 2 21:16:03 2010 -0800 HID: add support for Pixart Imaging Optical Touch Screen Added support for the Pixart Imaging Inc. Optical Touch Screen found in the MSI AE2220 and other new all in one computers to the Quanta Optical Touch dual-touch panel driver found in the latest git clone git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git. Signed-off-by: Alex Neblett Signed-off-by: Jiri Kosina commit 615f0833aa4c4aa944ceb78895bbffa8bd1884df Author: Steven Rostedt Date: Tue Feb 2 21:51:27 2010 -0500 kconfig: Add LSMOD=file to override the lsmod for localmodconfig Doing the following: make LSMOD=file localmodconfig Will make the streamline-config code use the given file instead of lsmod. If the file is an executable, it will execute it, otherwise it will read it as text. make LSMOD=/my/local/path/lsmod localmodconfig The above will execute the lsmod in /my/local/path instead of the lsmods that may be located elsewhere. make LSMOD=embedded_board_lsmod localmodconfig The above will read the "embedded_board_lsmod" as a text file. This is useful if you are doing a cross compile and need to run the config against modules that exist on an embedded device. Note, if the LSMOD= file does is not a path, it will add the path to the object directory. That is, the above example will look for "embedded_board_lsmod" in the directory that the binary will be built in (the O=dir directory). Signed-off-by: Steven Rostedt On branch config/linus commit e1a0bdd8022317e98650e70850de73eccfcde5ad Merge: 8127f4e 1a45dcf Author: Jiri Kosina Date: Tue Feb 2 23:10:39 2010 +0100 Merge branch 'master' into upstream Conflicts: drivers/hid/hid-ids.h commit 8127f4e883666c9960cfa89cffd36313748f8bab Author: Thadeu Lima de Souza Cascardo Date: Tue Feb 2 18:09:06 2010 -0200 HID: use multi input quirk for eTurboTouch touchscreen This device generates ABS_Z and ABS_RX events, while it should be generating ABS_X and ABS_Y instead. Using the MULTI_INPUT quirk solves this issue. Signed-off-by: Thadeu Lima de Souza Cascardo Signed-off-by: Daniel Oliveira Nascimento Signed-off-by: Jiri Kosina commit 1c3a02c215a5b955b342f29dc1719e1a5771eaf1 Author: Alexander Shishkin Date: Tue Feb 2 18:43:32 2010 +0200 HID: add NOGET quirk for Prodige Cordless Combo I happen to own a keyboard identified as 05af:3062 which is labeled as "FlatX Coldless Combo" by "Prodige", which exhibits input problems without NOGET quirk. For some reason, lsusb reports this device as "Jing-Mold Enterprise Co., Ltd", which is not mentioned anywhere on the package. A quick search on the intenet shows that there a other people who have this in their lsusb output, but apparently they don't have the problem I am seeing (or they are not such furious typists as myself). Signed-off-by: Alexander Shishkin Signed-off-by: Jiri Kosina commit 7d39e849912f0c3c8c6fc94be7bf7d120b1ee0ba Author: Jiri Kosina Date: Tue Feb 2 20:46:34 2010 +0100 HID: update copyright Signed-off-by: Jiri Kosina commit 88f66ea98d7ae6a8b6a34e38b1b4fa51abc1c9ca Author: Steven Rostedt Date: Wed Jan 6 18:49:44 2010 -0500 kconfig: Look in both /bin and /sbin for lsmod in streamline_config.pl Distributions now have lsmod in /bin instead of /sbin. But to handle both cases, we look for it in /sbin /bin /usr/bin and /usr/sbin. If lsmod is not found in any of those paths, it defaults to use just lsmod and hopes that it lies in the path of the user. Tested-by: Xavier Chantry Signed-off-by: Steven Rostedt commit 8a349d4b13c41c00564cd79f6fabdec347084758 Author: Joe Perches Date: Tue Feb 2 07:22:13 2010 +0000 spi/spi_s3c64xx.c: Fix continuation line formats String constants that are continued on subsequent lines with \ are not good. Signed-off-by: Joe Perches Signed-off-by: Grant Likely commit fb7899b1f0b748ef966071f5dc23c59ebd57d08f Merge: 212b3c8 abe94c7 Author: Grant Likely Date: Tue Feb 2 01:05:22 2010 -0700 Merge commit 'v2.6.33-rc6' into secretlab/next-spi commit 0ada0a73120c28cc432bcdbac061781465c2f48f Merge: 6016a36 92dcffb Author: Grant Likely Date: Thu Jan 28 14:38:25 2010 -0700 Merge commit 'v2.6.33-rc5' into secretlab/test-devicetree commit 6016a363f6b56b46b24655bcfc0499b715851cf3 Author: Grant Likely Date: Thu Jan 28 14:06:53 2010 -0700 of: unify phandle name in struct device_node In struct device_node, the phandle is named 'linux_phandle' for PowerPC and MicroBlaze, and 'node' for SPARC. There is no good reason for the difference, it is just an artifact of the code diverging over a couple of years. This patch renames both to simply .phandle. Note: the .node also existed in PowerPC/MicroBlaze, but the only user seems to be arch/powerpc/platforms/powermac/pfunc_core.c. It doesn't look like the assignment between .linux_phandle and .node is significantly different enough to warrant the separate code paths unless ibm,phandle properties actually appear in Apple device trees. I think it is safe to eliminate the old .node property and use phandle everywhere. Signed-off-by: Grant Likely Acked-by: David S. Miller Tested-by: Wolfram Sang Acked-by: Benjamin Herrenschmidt commit 923f7e30b480438f1e86e01e5cde814248b59a39 Author: Grant Likely Date: Thu Jan 28 13:52:53 2010 -0700 of: Merge of_node_get() and of_node_put() Merge common code between PowerPC and MicroBlaze Signed-off-by: Grant Likely Tested-by: Wolfram Sang Acked-by: Benjamin Herrenschmidt commit 1f43cfb9474d1c4f22598b6e3213ec035be6dd56 Author: Grant Likely Date: Thu Jan 28 13:47:25 2010 -0700 of: merge machine_is_compatible() Merge common code between PowerPC and Microblaze Signed-off-by: Grant Likely Tested-by: Wolfram Sang Acked-by: Benjamin Herrenschmidt commit cd9ec30da58bcd8ab154eba9eb54d16c67e7ef3b Author: Johnathon Harris Date: Thu Jan 21 14:36:52 2010 +0000 HID: add support for Ortek WKB-2000 This patch adds a new USB HID driver for the Ortek WKB-2000, working around an incorrect LogicalMaximum value in the USB resource descriptor. Tracked by http://bugzilla.kernel.org/show_bug.cgi?id=14787 Bug originally reported by Ubuntu users: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/405390 Signed-off-by: Johnathon Harris Tested-by: Daniel J Blueman Signed-off-by: Jiri Kosina commit 212b3c8b8ab94d983c2e0ee1821f17dd5b4e0859 Author: Jean-Hugues Deschenes Date: Fri Jan 22 10:08:31 2010 -0700 spi/dw_spi: Fix dw_spi_mmio to depend on HAVE_CLK dw_spi_mmio is dependent on the clock framework. This marks it as such in Kconfig. Signed-off-by: Jean-Hugues Deschenes Signed-off-by: Grant Likely commit 8ca8d15ade201b7723fa386eadcce2044463ff56 Author: Jean-Hugues Deschenes Date: Thu Jan 21 09:55:54 2010 -0700 spi/dw_spi: Allow dw_spi.c to be a module Signed-off-by: Jean-Hugues Deschenes Signed-off-by: Grant Likely commit 0a4c1d7d446d3ed6179f907541d180e49b56d4f4 Author: Jean-Hugues Deschenes Date: Thu Jan 21 09:55:42 2010 -0700 spi/dw_spi: mmio code style fixups Minor code style cleanups following comments by Wolfram Sang Signed-off-by: Jean-Hugues Deschenes Signed-off-by: Grant Likely commit f7b6fd6d1d3833529f1626c761ba7e338586d35e Author: Jean-Hugues Deschenes Date: Thu Jan 21 07:46:42 2010 -0700 Memory-mapped dw_spi driver Adds a memory-mapped I/O dw_spi platform device. Signed-off-by: Jean-Hugues Deschenes Signed-off-by: Grant Likely commit 8bcb4a88c5834c6a0fc7140edea32186664fe360 Author: Feng Tang Date: Thu Jan 21 07:25:38 2010 -0700 spi/dw_spi: fix missing export of dw_spi_remove_host So that interface drivers could be built as modules Signed-off-by: Feng Tang Signed-off-by: Grant Likely commit 052dc7c45d8f685fb3720a08331ba3e91e87937e Author: George Shore Date: Thu Jan 21 11:40:52 2010 +0000 spi/dw_spi: conditional transfer mode changes This allows the switching between transfer modes between 'transmit only', 'receive only' and 'transmit and receive' modes. Due to the design of the SPI block, changing transfer modes requires that the block be disabled; in doing so the chipselect line is inherently deasserted and (usually) the attached device discards its state. Consequentially, switching modes requires that a platform-specific chipselect function has been defined so that the chipselect is not dropped during the change. Signed-off-by: George Shore Signed-off-by: Grant Likely commit f4aec798ae5a837a1f062e295f9a5f1b00962589 Author: George Shore Date: Thu Jan 21 11:40:51 2010 +0000 spi/dw_spi: remove conditional from 'poll_transfer'. The 'poll_transfer' function employs a conditional to test whether the transmit buffer is valid; in doing so, on a receive operation no data is clocked out, thus no data is clocked in and ultimately errors appear. This removes the conditional as the transmit function will be set to a null writer when the transmit buffer is invalid, allowing the driver to clock 0x00 out to the device to receive data from the device. Signed-off-by: George Shore Signed-off-by: Grant Likely commit 426c0093d8da4d7b6b0e62cda917b1bae26db4c2 Author: George Shore Date: Thu Jan 21 11:40:50 2010 +0000 spi/dw_spi: fixed a spelling typo in a warning message. Signed-off-by: George Shore Signed-off-by: Grant Likely commit 20a588fcc862df79d8fcafbc41950e3ae93dea09 Author: George Shore Date: Thu Jan 21 11:40:49 2010 +0000 spi/dw_spi: add return value to empty mrst_spi_debugfs_init() As per the function signature. Signed-off-by: George Shore Signed-off-by: Grant Likely commit 83fe518a839e317480e50a138ef4acd73510d7ce Author: George Shore Date: Thu Jan 21 11:40:48 2010 +0000 spi/dw_spi: enable platform specific chipselect. The driver core allows for a platform-specific chipselect assert/deassert function, however the chipselect function in the core doesn't take advantage of this fact. This enables the use of a custom function, should it be defined. Signed-off-by: George Shore Signed-off-by: Grant Likely commit c587b6fa05106606053fc5e8e344f07cd34ace23 Author: Feng Tang Date: Thu Jan 21 10:41:10 2010 +0800 spi/dw_spi: add a FIFO depth detection FIFO depth is configurable for each implementation of DW core, so add a depth detection for those interface drivers who don't set the fifo_len explicitly Signed-off-by: Feng Tang Acked-by: Jean-Hugues Deschenes Signed-off-by: Grant Likely commit 99147b5c4167612a987860b661b9f8b79e66b81f Author: Grant Likely Date: Wed Jan 20 14:03:39 2010 -0700 spi/dw_spi: fix __init/__devinit section mismatch Section mismatch in reference from the function dw_spi_add_host() to the function init_queue() Signed-off-by: Grant Likely commit 9778214990af88ec6720bd771d7fc0fa1b140b02 Author: Paul Mundt Date: Wed Jan 20 13:49:45 2010 -0700 spi: xilinx_spi: Fix up I/O routine wrapping bogosity. xilinx_spi presently makes some fairly questionable assumptions about I/O routines, and attempts to assign ioread32/iowrite32 and friends directly to its own internal function pointers. On many platforms these I/O routines are macros or wrappers and not actual functions on their own, resulting in things like: ERROR: "ioread32be" [drivers/spi/xilinx_spi.ko] undefined! ERROR: "iowrite32be" [drivers/spi/xilinx_spi.ko] undefined! ERROR: "iowrite32" [drivers/spi/xilinx_spi.ko] undefined! ERROR: "ioread32" [drivers/spi/xilinx_spi.ko] undefined! If xilinx_spi wants to do this sort of casting, it needs to provide its own wrappers for these, or change how it does accesses completely. I've opted for the first approach, and the attached silly patch does that. If someone with the hardware available wants to give the second option a try that's ok too. In any event, the current code is broken for at least: arm, avr32, blackfin, microblaze, mn10300, and sh. Signed-off-by: Paul Mundt Acked-by: Richard Röjfors Signed-off-by: Grant Likely commit f4d4ecfe788b4141d8c90cfc3ac2831f620f5c1b Author: Alberto Panizzo Date: Wed Jan 20 13:49:45 2010 -0700 spi/spi_imx: add device information by switching pr_debug() to dev_dbg() Useful when debugging multiple spi channels. Signed-off-by: Alberto Panizzo Acked-by: Uwe Kleine-König Signed-off-by: Grant Likely commit ac48eee064f743a198cb38e5a6a62c3f1082ebc1 Author: Magnus Damm Date: Wed Jan 20 13:49:45 2010 -0700 spi: update MSIOF includes Update the MSIOF driver to remove the architecture speficic spi header file and add err.h. This makes the driver compile on non-SH architectures. Signed-off-by: Magnus Damm Signed-off-by: Grant Likely commit 552e450929a7298cc8834fd2824a60b2e914f70e Author: Feng Tang Date: Wed Jan 20 13:49:45 2010 -0700 spi/dw_spi: refine the IRQ mode working flow Now dw_spi core fully supports 3 transfer modes: pure polling, DMA and IRQ mode. IRQ mode will use the FIFO half empty as the IRQ trigger, so each interface driver need set the fifo_len, so that core driver can handle it properly Signed-off-by: Feng Tang Signed-off-by: Grant Likely commit 51f921c1eb1124fb99ab0728c19e8e14c82c81be Author: Feng Tang Date: Wed Jan 20 13:49:45 2010 -0700 spi/dw_spi: add a missed dw_spi_remove_host() in exit sequence Signed-off-by: Feng Tang Signed-off-by: Grant Likely commit b490e3704ccee12deb295f96029d68e0daf02feb Author: Feng Tang Date: Wed Jan 20 13:49:45 2010 -0700 spi/dw_spi: bug fix in wait_till_not_busy() Make the driver wait at least for 1 jiffie before issuing the warning, no matter what HZ is set to Signed-off-by: Feng Tang Signed-off-by: Grant Likely commit fa0fcde66ac3360678360104b24492015e7b852b Author: Jassi Brar Date: Wed Jan 20 13:49:45 2010 -0700 spi/s3c64xx: Add new parameter to cs callback Since most of the chip-selects are simply going to be like gpio_set_value, it would do good to have the same callback type so that it could simply be made to point at gpio_set_value. Signed-off-by: Jassi Brar Signed-off-by: Grant Likely commit e6b873c9666015484a01373a4eebc6cfa82e670d Author: Jassi Brar Date: Wed Jan 20 13:49:45 2010 -0700 spi/s3c64xx: Include moved header Header for platform specific stuff has been rename to include the SoC type. Include the new header instead. Signed-off-by: Jassi Brar Signed-off-by: Grant Likely commit ef6c680dc5a182a79b09567168d6713f46c85784 Author: Jassi Brar Date: Wed Jan 20 13:49:44 2010 -0700 spi/s3c64xx: Check before mem-region release Add precautionary check before releasing memory region. Signed-off-by: Jassi Brar Signed-off-by: Grant Likely commit b0d5d6e55340348b0de75eb691b93d7e60dba879 Author: Jassi Brar Date: Wed Jan 20 13:49:44 2010 -0700 spi/s3c64xx: Move src_clk to local driver data The pointer to SPI rate source clock had better be the member of driver local data structure rather than platform specific. Also, remove definitions of variable 'sci' that are rendered useless as a consequence. Signed-off-by: Jassi Brar Signed-off-by: Grant Likely commit ee64a37732c23ab2bcef5fe7785fd237a7e38951 Author: Jassi Brar Date: Wed Jan 20 13:49:44 2010 -0700 spi/s3c64xx: Differentiate ip and rate clock The instance of SPI clock for controller and that used for generating signals ought to be independently handled. Signed-off-by: Jassi Brar Signed-off-by: Grant Likely commit ad7de729c60380a48844f885f37451158169c50d Author: Jassi Brar Date: Wed Jan 20 13:49:44 2010 -0700 spi/s3c64xx: Rename s3c64xx_spi_cntrlr_info Rename 'struct s3c64xx_spi_cntrlr_info' to lesser wordy 'struct s3c64xx_spi_info' Signed-off-by: Jassi Brar Signed-off-by: Grant Likely commit e9a172f074ba85de144e63b0786c7c5c5ba93c3a Author: Uwe Kleine-König Date: Wed Jan 20 13:49:44 2010 -0700 spi/mpc8xxx: don't check platform_get_irq's return value against zero platform_get_irq returns -ENXIO on failure, so !irq was probably always true. Make irq a signed variable and compare irq <= 0. Note that a return value of zero is still handled as error even though this could mean irq0. This is a followup to 305b3228f9ff4d59f49e6d34a7034d44ee8ce2f0 that changed the return value of platform_get_irq from 0 to -ENXIO on error. Signed-off-by: Uwe Kleine-König Acked-by: Anton Vorontsov Signed-off-by: Grant Likely commit 34b8c66173666025020e3a6f8d4a5c238b19cde5 Author: Steven King Date: Wed Jan 20 13:49:44 2010 -0700 spi: Add Freescale/Motorola Coldfire QSPI driver Add support for the QSPI controller found some on Freescale/Motorola Coldfire MCUs. Full duplex, active high cs, spi modes 0-3 and word sizes 8-16 bits are supported. The hardware drives the MISO, MOSI and SCLK lines, but the chip selects are managed via GPIO and must be configured by the board code. The QSPI controller has an 80 byte buffer which allows us to transfer up to 16 words at a time. For transfers longer than 16 words, we split the buffer in half so we can update in one half while the controller is operating on the other half. Interrupt latencies then ultimately limits our sustained thru-put to something less than half the maximum speed supported by the part. Signed-off-by: Steven King Signed-off-by: Grant Likely commit 631e61b7ca12ef14c834f99f8948e410c539f585 Author: Márton Németh Date: Wed Jan 20 13:49:44 2010 -0700 spi: make Open Firmware device id constant The match_table field of the struct of_device_id is constant in so it is worth to make the initialization data constant. The semantic match that finds this kind of pattern is as follows: (http://coccinelle.lip6.fr/) // @r@ disable decl_init,const_decl_init; identifier I1, I2, x; @@ struct I1 { ... const struct I2 *x; ... }; @s@ identifier r.I1, y; identifier r.x, E; @@ struct I1 y = { .x = E, }; @c@ identifier r.I2; identifier s.E; @@ const struct I2 E[] = ... ; @depends on !c@ identifier r.I2; identifier s.E; @@ + const struct I2 E[] = ...; // Signed-off-by: Márton Németh Cc: Julia Lawall Cc: cocci@diku.dk Signed-off-by: Grant Likely commit 68ea2d82c3671d2eccb600e6871fcbec1cac7fca Author: Robert P. J. Day Date: Wed Jan 20 13:49:44 2010 -0700 spi: Fix reversed args to time_before() in Freescale stmp driver. Signed-off-by: Robert P. J. Day Signed-off-by: Grant Likely commit 358934a60d2180dcd1ed20691dbb66d4fb977ab2 Author: Sandeep Paulraj Date: Wed Dec 16 22:02:18 2009 +0000 spi: Add SPI master driver for DaVinci/DA8xx This patch adds support for a SPI master driver for the DaVinci series of SOCs Signed-off-by: Sandeep Paulraj Signed-off-by: Mark A. Greer Signed-off-by: Philby John Signed-off-by: Sudhakar Rajashekhara Signed-off-by: Kevin Hilman Signed-off-by: Grant Likely commit 8b0e58a70a7a41443c779de074288035b014cb94 Author: Stephane Chatty Date: Wed Jan 13 21:52:34 2010 +0100 HID: let hid-input accept digitizers Extended IS_INPUT_APPLICATION to accept digitzers that are actual input devices (touchscreens, light pens, touch pads, white boards) Signed-off-by: Stephane Chatty Signed-off-by: Jiri Kosina commit 62e62da856dba2edb897b672cbd05a69edd4485c Author: H Hartley Sweeten Date: Thu Jan 14 19:10:07 2010 -0700 HID: hid-debug.c: make local symbols static hid-debug.c: make local symbols static The symbols hid_resolv_event and hid_dump_input_mapping are only used locally in this file. Make them static to prevent the following sparse warnings: warning: symbol 'hid_resolv_event' was not declared. Should it be static? warning: symbol 'hid_dump_input_mapping' was not declared. Should it be static? Signed-off-by: H Hartley Sweeten Signed-off-by: Jiri Kosina commit 4bb9508bbbb06f10bc3e249dd34375b4a4d6bfc0 Author: Jiri Kosina Date: Wed Dec 23 14:13:46 2009 +0100 HID: remove TENX iBuddy from blacklist There were multiple reports which indicate that vendor messed up horribly and the same VID/PID combination is used for completely different devices, some of them requiring the blacklist entry and other not. Remove the blacklist entry for this combination of VID/PID completely, and let the user decide and unbind the driver via sysfs eventually, if needed. Proper fix would be fixing the vendor. References: http://lkml.org/lkml/2009/2/10/434 http://bugzilla.kernel.org/show_bug.cgi?id=13411 Signed-off-by: Jiri Kosina commit 49e4739a0cf681cbfe08c72232c1dcc130b66dde Author: Stephane Chatty Date: Wed Jan 13 00:29:16 2010 +0100 HID: add support for Acer T230H multitouch Add support for the Quanta Optical Touch dual-touch panel, present in the Acer T230H monitor, HP L2105tm, and Packard-Bell Video 200t. Signed-off-by: Stephane Chatty Tested-by: Jerome Vidal Tested-by: Cedric Berthier Acked-by: Dmitry Torokhov Signed-off-by: Jiri Kosina commit 74f292ca8c7a2b9370f80d97a49e48174f4c7635 Author: Gary Stein Date: Wed Jan 13 00:25:58 2010 +0100 HID: add driver for the Logitech Flight System G940 Implements a new USB-HID for Force Feedback based on the normal Logitech Force Feedback code and FF-Memless. Currently only supports the FF_CONSTANT effect although the joystick appears to support additional non-standard ones. Signed-off-by: Gary Stein Signed-off-by: Jiri Kosina commit d67dec5b2cc208215de21dc7806945bf6a6e85d0 Author: Márton Németh Date: Sun Jan 10 17:59:22 2010 +0100 HID: make USB device id constant The id_table field of the struct usb_device_id is constant in so it is worth to make the initialization data also constant. The semantic match that finds this kind of pattern is as follows: (http://coccinelle.lip6.fr/) // @r@ disable decl_init,const_decl_init; identifier I1, I2, x; @@ struct I1 { ... const struct I2 *x; ... }; @s@ identifier r.I1, y; identifier r.x, E; @@ struct I1 y = { .x = E, }; @c@ identifier r.I2; identifier s.E; @@ const struct I2 E[] = ... ; @depends on !c@ identifier r.I2; identifier s.E; @@ + const struct I2 E[] = ...; // Signed-off-by: Márton Németh Cc: Julia Lawall Cc: cocci@diku.dk Signed-off-by: Jiri Kosina commit 13d7e9385644d376a0816ad663ba3dfc45359f2f Author: Steven Rostedt Date: Wed Jan 6 17:56:12 2010 -0500 kconfig: Check for if conditions in Kconfig for localmodconfig The streamline_config.pl misses the if conditions for checking dependencies. For Kconfigs with the following construct: if MEDIA_SUPPORT config VIDEO_DEV [...] If VIDEO_DEV was enabled, the script will miss the fact that MEDIA_SUPPORT is also needed. This patch changes streamline_config.pl to include if conditions into the dependencies of configs. Reported-by: Anton Blanchard Tested-by: Anton Blanchard Signed-off-by: Steven Rostedt commit 17263baf958b7ab1d8c60445f412a1080362c88c Author: Steven Rostedt Date: Wed Jan 6 16:43:08 2010 -0500 kconfig: Create include/generated for localmodconfig If someone downloads a brand new kernel and runs localmodconfig or localyesconfig, the ending result will report: *** Error during update of the kernel configuration. This is because localmodconfig and localyesconfig must create the include/generated directory to place the autoconf.h file. Signed-off-by: Steven Rostedt commit 54a6593d65e638ad7e1e8cc986159d76054dab4b Author: Stefan Glasenhardt Date: Tue Jan 5 23:30:30 2010 +0100 HID: allow disabling hard-coded ISO-layout for Apple keyboards This patch adds a new option named "iso_layout" to the driver "hid-apple.ko", to allow disabling of the hard-coded ISO-layout. Disabling the hard-coded layout solves the problem that the kernel-module only works perfectly for the english/american version of the Apple aluminum keyboard. Other versions have swapped keys, e.g. the "<"-key is swapped with "^"-key on the german keyboard. There is a very long bug-entry on Launchpad to this problem: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/214786 Signed-off-by: Stefan Glasenhardt Signed-off-by: Jiri Kosina commit 722612cd51cf1b574c89dff57cc5dbedf1f645bb Author: Jiri Kosina Date: Tue Jan 5 11:45:52 2010 +0100 HID: fix parsing of local delimiter with size 0 Acording to HID standard 1.11, value 0 allows for size being 0. Local delimiter tag has has 0 one of the possible values. Therefore we need to handle this case properly, to be fully compliant with the specification. Reported-by: Marcin Tolysz Signed-off-by: Jiri Kosina commit cf2f765f1896064e34c6f0f2ef896ff058dd5c06 Author: Jiri Kosina Date: Mon Jan 4 12:20:56 2010 +0100 HID: handle joysticks with large number of buttons Current HID code doesn't properly handle HID joysticks which have larger number of buttons than what fits into current range reserved for BTN_JOYSTICK. One such joystick reported to not work properly is Saitek X52 Pro Flight System. We can't extend the range to fit more buttons in, because of backwards compatibility reasons. Therefore this patch introduces a new BTN_TRIGGER_HAPPY range, and uses these to map the buttons which are over BTN_JOYSTICK limit. Acked-by: Dmitry Torokhov [for the input.h part] Signed-off-by: Jiri Kosina commit 92688c0c3c1c9e2daf705d307e8fda1b5a180d26 Author: Jiri Kosina Date: Mon Jan 4 12:04:59 2010 +0100 HID: make Stantum driver standalone config option Analogically to commit "HID: make 3M PCT touchscreen driver standalone config option", remove the dependency of Stantum driver on CONFIG_EMBEDDED, as it is a standalone driver rather than device quirk. Signed-off-by: Jiri Kosina commit d3fb5454a8474d5d22c8f8fe4d043b05732d91d5 Author: Stephane Chatty Date: Mon Jan 4 12:04:08 2010 +0100 HID: add support for Stantum multitouch panel Added support for the Stantum multitouch panel. Signed-off-by: Stephane Chatty Signed-off-by: Jiri Kosina commit 4b186f72033611c2b526c7341534e71ee4afd222 Author: Jiri Kosina Date: Wed Dec 23 13:12:32 2009 +0100 HID: make 3M PCT touchscreen driver standalone config option The point behind 'default !EMBEDDED' for certain HID drivers that simple and straightforward quirks for HID devices (which are implemented as drivers on HID bus) wouldn't have to be enabled separately, if the device is otherwise more-or-less HID standard compliant. But this driver is rather standalone driver, so we'd want to have it normally selectable. Signed-off-by: Jiri Kosina commit b6353f4f36f03a12edaf3fa5365b475a28106035 Author: Stephane Chatty Date: Tue Dec 22 23:04:17 2009 +0100 HID: Support for 3M multitouch panel Add support for 3M multitouch panels. Signed-off-by: Stephane Chatty [jkosina@suse.cz: fix build failure because of inconsistent 3M/MMM defines] Signed-off-by: Jiri Kosina commit 86e032213424958b45564d0cc96b3316641a49d3 Author: Grant Likely Date: Thu Dec 10 23:42:21 2009 -0700 of/flattree: merge early_init_dt_scan_chosen() Merge common code between PowerPC and Microblaze. This patch splits the arch-specific stuff out into a new function, early_init_dt_scan_chosen_arch(). Signed-off-by: Grant Likely Tested-by: Wolfram Sang Acked-by: Benjamin Herrenschmidt commit 0f0b56c3f2df4a083fc9e934266e5bab1710e286 Author: Grant Likely Date: Thu Dec 10 23:42:17 2009 -0700 of/flattree: eliminate cell_t typedef A cell is firmly established as a u32. No need to do an ugly typedef to redefine it to cell_t. Eliminate the unnecessary typedef so that it doesn't have to be added to the of_fdt header file Signed-off-by: Grant Likely Tested-by: Wolfram Sang Acked-by: Benjamin Herrenschmidt commit 83f7a06eb479e2aeb83536e77a2cb14cc2285e32 Author: Grant Likely Date: Tue Nov 24 03:37:56 2009 -0700 of/flattree: merge dt_mem_next_cell Merge common code between PowerPC and Microblaze Signed-off-by: Grant Likely Acked-by: Benjamin Herrenschmidt Tested-by: Wolfram Sang commit f00abd94918c9780f9d2d961fc0e419c11457922 Author: Grant Likely Date: Tue Nov 24 03:27:10 2009 -0700 of/flattree: Merge earlyinit_dt_scan_root() Merge common code between PowerPC and Microblaze Signed-off-by: Grant Likely Acked-by: Benjamin Herrenschmidt Tested-by: Wolfram Sang commit f7b3a8355ba6cad251297844a0bdd08898ea36e0 Author: Grant Likely Date: Tue Nov 24 03:26:58 2009 -0700 of/flattree: Merge early_init_dt_check_for_initrd() Merge common code between PowerPC and Microblaze Signed-off-by: Grant Likely Tested-by: Wolfram Sang Acked-by: Benjamin Herrenschmidt commit 2be09cb993826b52c9fc1d44747c20dd43a50038 Author: Grant Likely Date: Mon Nov 23 20:16:46 2009 -0700 of: remove special case definition of of_read_ulong() Special case of of_read_ulong() was defined for PPC32 to toss away all but the last 32 bits when a large number value was read, and the 'normal' version for ppc64 just #defined of_read_ulong to of_read_number which causes compiler warnings on MicroBlaze and other 32 bit architectures because it returns a u64 instead of a ulong. This patch fixes the problem by defining a common implementation of of_read_ulong() that works everywhere. Signed-off-by: Grant Likely Reviewed-by: Wolfram Sang Tested-by: Michal Simek commit 02af11b03fce3ddb264d7873d7a2e295e697938c Author: Grant Likely Date: Mon Nov 23 20:16:45 2009 -0700 of: merge prom_{add,remove,modify}_property Merge common code between PowerPC and MicroBlaze Signed-off-by: Grant Likely Reviewed-by: Wolfram Sang Tested-by: Michal Simek commit 41f880091c15b039ffcc8b3d831656b81517a6d3 Author: Grant Likely Date: Mon Nov 23 20:07:01 2009 -0700 of/flattree: Merge unflatten_device_tree Merge common code between PowerPC and MicroBlaze Signed-off-by: Grant Likely Reviewed-by: Wolfram Sang Tested-by: Michal Simek commit bbd33931a08362f78266a4016211a35947b91041 Author: Grant Likely Date: Mon Nov 23 20:07:00 2009 -0700 of/flattree: Merge unflatten_dt_node Merge common code between PowerPC and MicroBlaze Signed-off-by: Grant Likely Reviewed-by: Wolfram Sang Tested-by: Michal Simek commit 00e38efd90f27518ec96b37b1c7773e3ac529966 Author: Grant Likely Date: Mon Nov 23 20:07:00 2009 -0700 of/flattree: Merge of_flat_dt_is_compatible Merge common code between PowerPC and Microblaze Signed-off-by: Grant Likely Reviewed-by: Wolfram Sang Tested-by: Michal Simek commit ca900cfa2944448bdb76e1246f282e59bc65f472 Author: Grant Likely Date: Mon Nov 23 20:06:59 2009 -0700 of/flattree: merge of_get_flat_dt_prop Merge common code between PowerPC and Microblaze Signed-off-by: Grant Likely Reviewed-by: Wolfram Sang Tested-by: Michal Simek commit 31a6a87dfc34fbf02aef9a160adf558ec56d3ccd Author: Grant Likely Date: Mon Nov 23 19:49:38 2009 -0700 of/flattree: remove __init annotations from the header file __init annotation belongs in the .c file, not the header. Signed-off-by: Grant Likely Reviewed-by: Wolfram Sang Tested-by: Michal Simek commit 819d2819303654c6829d572e698e2d0021c08599 Author: Grant Likely Date: Mon Nov 23 19:44:23 2009 -0700 of/flattree: merge of_get_flat_dt_root Merge common code between PowerPC and MicroBlaze Signed-off-by: Grant Likely Reviewed-by: Wolfram Sang Tested-by: Michal Simek commit c8cb7a59842c0b512b44f6f818cdb0b5a3ddc89e Author: Grant Likely Date: Mon Nov 23 18:54:23 2009 -0700 of/flattree: merge of_scan_flat_dt Merge common code between PowerPC and Microblaze Signed-off-by: Grant Likely Reviewed-by: Wolfram Sang Tested-by: Michal Simek commit e169cfbef46d62e042614ffafa8880eed1d894bb Author: Grant Likely Date: Mon Nov 23 14:53:09 2009 -0700 of/flattree: merge find_flat_dt_string and initial_boot_params Merge common code between Microblaze and PowerPC. Signed-off-by: Grant Likely Reviewed-by: Wolfram Sang Tested-by: Michal Simek commit 2cfcadde83b308240690ff1c18f117d8bc7a08b0 Merge: e91edcf 648f4e3 Author: Grant Likely Date: Mon Nov 23 14:49:36 2009 -0700 Merge commit 'v2.6.32-rc8' commit 7b76bfc86757ca5e7b0a62f50003752da77c115b Author: Dick Streefland Date: Tue Oct 6 22:35:40 2009 +0200 kconfig: simplification of scripts/extract-ikconfig I've rewritten the extract-ikconfig script to extract the kernel configuration from a kernel compiled with CONFIG_IKCONFIG. The main motivation for the rewrite was to remove the dependency on the external C program binoffset.c, which is compiled on the initial run. The binoffset executable is invoked with a relative path, which means that the old script can only be run from the top of the kernel tree, and only when you have write permission in the scripts directory. The new script uses tr/grep/tail/zcat only, and can be invoked from anywhere. The binoffset.c program has been removed. This script requires GNU grep 2.5 (released 2002-03-13) or higher, because the -o option was introduced in that version. Signed-off-by: Dick Streefland LKML-Reference: <20091006203540.GA14634@streefland.net> Tested-by: Steven Rostedt Cc: Sam Ravnborg Signed-off-by: Steven Rostedt