commit 93ded9b8fd42abe2c3607097963d8de6ad9117eb Merge: 6d52dcb... f756cbd... Author: Linus Torvalds Date: Mon Jul 21 15:42:20 2008 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (100 commits) usb-storage: revert DMA-alignment change for Wireless USB USB: use reset_resume when normal resume fails usb_gadget: composite cdc gadget fault handling usb gadget: minor USBCV fix for composite framework USB: Fix bug with byte order in isp116x-hcd.c fio write/read USB: fix double kfree in ipaq in error case USB: fix build error in cdc-acm for CONFIG_PM=n USB: remove board-specific UP2OCR configuration from pxa27x-udc USB: EHCI: Reconciling USB register differences on MPC85xx vs MPC83xx USB: Fix pointer/int cast in USB devio code usb gadget: g_cdc dependso on NET USB: Au1xxx-usb: suspend/resume support. USB: Au1xxx-usb: clean up ohci/ehci bus glue sources. usbfs: don't store bad pointers in registration usbfs: fix race between open and unregister usbfs: simplify the lookup-by-minor routines usbfs: send disconnect signals when device is unregistered USB: Force unbinding of drivers lacking reset_resume or other methods USB: ohci-pnx4008: I2C cleanups and fixes USB: debug port converter does not accept more than 8 byte packets ... commit f756cbd458ab71c996a069cb3928fb1e2d7cd9cc Author: Alan Stern Date: Mon Jun 30 13:39:59 2008 -0400 usb-storage: revert DMA-alignment change for Wireless USB This patch (as1110) reverts an earlier patch meant to help with Wireless USB host controllers. These controllers can have bulk maxpacket values larger than 512, which puts unusual constraints on the sizes of scatter-gather list elements. However it turns out that the block layer does not provide the support we need to enforce these constraints; merely changing the DMA alignment mask doesn't help. Hence there's no reason to keep the original patch. The Wireless USB problem will have to be solved a different way. In addition, there is a reason to get rid of the earlier patch. By dereferencing a pointer stored in the ep_in array of struct usb_device, the current code risks an invalid memory access when it runs concurrently with device removal. The members of that array are cleared before the driver's disconnect method is called, so it should not try to use them. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 86c57edf60f5c98adb496880f56cd0e5a3423153 Author: Alan Stern Date: Mon Jun 30 11:14:43 2008 -0400 USB: use reset_resume when normal resume fails This patch (as1109b) makes USB-Persist more resilient to errors. With the current code, if a normal resume fails, it's an unrecoverable error. With the patch, if a normal resume fails (and if the device is enabled for USB-Persist) then a reset-resume is tried. This fixes the problem reported in Bugzilla #10977. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit ac90e36592ea5171c4e70f58b39a782d871a7d9f Author: David Brownell Date: Tue Jul 1 13:18:20 2008 -0700 usb_gadget: composite cdc gadget fault handling These two fixes ensure the new "CDC Composite Device" gadget fails cleanly when it's loaded on hardware that can't support this particular gadget driver. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit c24f42276b4c4467e82cdd5a941fb7f9400aeea0 Author: David Lopo Date: Tue Jul 1 13:14:17 2008 -0700 usb gadget: minor USBCV fix for composite framework Fill in a reserved/unused device qualifier field to ensure that the USBCV tests will always pass. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit 28874b7ec47e1e5cfe2b67420c4d07c6297a43a9 Author: Julien May Date: Fri Jun 27 15:01:18 2008 +0200 USB: Fix bug with byte order in isp116x-hcd.c fio write/read URB payload data are transfered in wrong byte order on a big endinan architecture (AVR32). Signed-off-by: Julien May Signed-off-by: Greg Kroah-Hartman commit df3e1ab7334279bc744344bcf05272dc8b985d3d Author: Oliver Neukum Date: Mon Jun 30 14:33:57 2008 +0200 USB: fix double kfree in ipaq in error case in the error case the ipaq driver leaves a dangling pointer to already freed memory that will be freed again. Signed-off-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman commit 357585892e56f7c7bec4a9c8dfaf90257c8756c6 Author: Oliver Neukum Date: Tue Jul 1 19:10:08 2008 +0200 USB: fix build error in cdc-acm for CONFIG_PM=n Here's the fix. cdc-wdm has the same problem. The fix is the same. Signed-off-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman commit 95f371f24c48b50e365f4c08d8f61eb8b15b3bba Author: Daniel Ribeiro Date: Tue Jul 1 23:09:27 2008 -0300 USB: remove board-specific UP2OCR configuration from pxa27x-udc Remove the board-specific UP2OCR configuration from the pxa27x-udc driver. Signed-off-by: Daniel Ribeiro Signed-off-by: Greg Kroah-Hartman commit 4f5342583c67fde6825d39b19c6b252db80beaf2 Author: Srikanth Srinivasan Date: Wed Jul 2 02:14:33 2008 -0500 USB: EHCI: Reconciling USB register differences on MPC85xx vs MPC83xx A couple of USB register initializations had to be changed on MPC85xx platforms. This is due to the internal SoC buses being different on MPC83xx SoCs vs MPC85xx SoCs. We currently handle this via an ifdef since 83xx and 85xx are mutually exclusive kernel builds. Signed-off-by: Srikanth Srinivasan Signed-off-by: Kumar Gala Signed-off-by: Greg Kroah-Hartman commit a80d5ff0d7d3a99e962a02c36acf97ba5a70b86e Author: David Howells Date: Wed Jul 2 12:28:55 2008 +0100 USB: Fix pointer/int cast in USB devio code Fix pointer/int cast in USB devio code, and thus avoid a compiler warning. A void* data argument passed to bus_find_device() and thence to match_devt() is used to carry a 32-bit datum. However, casting directly between a u32 and a pointer is not permitted - there must be an intermediate cast via (unsigned) long. This was introduced by the following patch: commit 94b1c9fa060ece2c8f080583beb6cc6008e41413 Author: Alan Stern Date: Tue Jun 24 14:47:12 2008 -0400 usbfs: simplify the lookup-by-minor routines This patch (as1105) simplifies the lookup-by-minor-number code in usbfs. Instead of passing the minor number to the callback, which must then reconstruct the entire dev_t value, the patch passes the dev_t value directly. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman Signed-off-by: David Howells Cc: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 4ddd9ec17af6a7c539f4a12758905340c00847d6 Author: Randy Dunlap Date: Thu Jul 3 14:44:59 2008 -0700 usb gadget: g_cdc dependso on NET g_cdc needs to depend on NET, otherwise net-related build errors happen: ERROR: "netif_carrier_on" [drivers/usb/gadget/g_cdc.ko] undefined! ERROR: "netif_carrier_off" [drivers/usb/gadget/g_cdc.ko] undefined! ERROR: "netif_rx" [drivers/usb/gadget/g_cdc.ko] undefined! ERROR: "alloc_etherdev_mq" [drivers/usb/gadget/g_cdc.ko] undefined! ERROR: "free_netdev" [drivers/usb/gadget/g_cdc.ko] undefined! ERROR: "register_netdev" [drivers/usb/gadget/g_cdc.ko] undefined! ERROR: "print_mac" [drivers/usb/gadget/g_cdc.ko] undefined! ERROR: "dev_kfree_skb_any" [drivers/usb/gadget/g_cdc.ko] undefined! ERROR: "__alloc_skb" [drivers/usb/gadget/g_cdc.ko] undefined! ERROR: "eth_type_trans" [drivers/usb/gadget/g_cdc.ko] undefined! ERROR: "unregister_netdev" [drivers/usb/gadget/g_cdc.ko] undefined! ERROR: "__netif_schedule" [drivers/usb/gadget/g_cdc.ko] undefined! ERROR: "skb_put" [drivers/usb/gadget/g_cdc.ko] undefined! Signed-off-by: Randy Dunlap Signed-off-by: Greg Kroah-Hartman commit 42bfc7b44f724fb5ce838fc2f552a3eb8cd768ec Author: Manuel Lauss Date: Mon Jun 23 09:09:37 2008 +0200 USB: Au1xxx-usb: suspend/resume support. Copy the OHCI/EHCI PM callbacks of the PCI implementation since they work equally well on Au1xxx hardware. Tested on Au1200. Signed-off-by: Manuel Lauss Cc: David Brownell Signed-off-by: Greg Kroah-Hartman commit 53c81a348fa1d21dd042d9c9a9f91795f83fed66 Author: Manuel Lauss Date: Mon Jun 23 09:08:29 2008 +0200 USB: Au1xxx-usb: clean up ohci/ehci bus glue sources. - Fold multiple probe/remove callbacks into one function; - minor style fixes, no functional changes. Tested on Au1200. Signed-off-by: Manuel Lauss Cc: David Brownell Signed-off-by: Greg Kroah-Hartman commit e04199b2167e88f0e2d0410fafaa2c35ff7ba8c1 Author: Alan Stern Date: Tue Jun 24 14:47:29 2008 -0400 usbfs: don't store bad pointers in registration This patch (as1107) fixes a small bug in the usbfs registration and unregistration code. It avoids leaving an error value stored in the device's usb_classdev field and it avoids trying to unregister a NULL pointer. (It also fixes a rather extreme overuse of whitespace.) Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit d64aac36394b3c26db53538bfedd8444a3a2206e Author: Alan Stern Date: Tue Jun 24 14:47:19 2008 -0400 usbfs: fix race between open and unregister This patch (as1106) fixes a race between opening and unregistering device files in usbfs. The current code drops its reference to the device and then reacquires it, ignoring the possibility that the device structure might have been removed in the meantime. It also doesn't check whether the device is already in the NOTATTACHED state when the file is opened. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 61ad04a89f0e3e6adaed0d9adfc0c9b431ccbb92 Author: Alan Stern Date: Tue Jun 24 14:47:12 2008 -0400 usbfs: simplify the lookup-by-minor routines This patch (as1105) simplifies the lookup-by-minor-number code in usbfs. Instead of passing the minor number to the callback, which must then reconstruct the entire dev_t value, the patch passes the dev_t value directly. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit cd9f03759d3eb588e185b04e1854c778b050833e Author: Alan Stern Date: Tue Jun 24 14:47:04 2008 -0400 usbfs: send disconnect signals when device is unregistered USB device files are accessible in two ways: as files in usbfs and as character device nodes. The two paths are supposed to behave identically, but they don't. When the underlying USB device is unplugged, disconnect signals are sent to processes with open usbfs files (if they requested these signals) but not to processes with open device node files. This patch (as1104) fixes the bug by moving the disconnect-signalling code into a common subroutine which is called from both paths. Putting this subroutine in devio.c removes the only out-of-file reference to struct dev_state, and so the structure's declaration can be moved from usb.h into devio.c. Finally, the new subroutine performs one extra action: It kills all the outstanding async URBs. (I'd kill the outstanding synchronous URBs too, if there was any way to do it.) In the past this hasn't mattered much, because devices were unregistered from usbfs only when they were disconnected. But now the unregistration can also occur whenever devices are unbound from the usb_generic driver. At any rate, killing URBs when a device is unregistered from usbfs seems like a good thing to do. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 78d9a487ee961c356e1a934d9a92eca38ffb3a70 Author: Alan Stern Date: Mon Jun 23 16:00:40 2008 -0400 USB: Force unbinding of drivers lacking reset_resume or other methods This patch (as1024) takes care of a FIXME issue: Drivers that don't have the necessary suspend, resume, reset_resume, pre_reset, or post_reset methods will be unbound and their interface reprobed when one of the unsupported events occurs. This is made slightly more difficult by the fact that bind operations won't work during a system sleep transition. So instead the code has to defer the operation until the transition ends. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 64b3d6d11948cc71ff12124dcb693392a32f1bf4 Author: Jean Delvare Date: Wed Jun 18 14:46:27 2008 +0200 USB: ohci-pnx4008: I2C cleanups and fixes Various cleanups and fixes to the i2c code in ohci-pnx4008: * Delete empty isp1301_command. The i2c driver command implementation is optional, so there's no point in providing an empty implementation. * Give a name to isp1301_driver. I'm surprised that i2c-core accepted to register this driver at all. I've chosen "isp1301_pnx" as the name, because it's not a generic ISP1301 driver (much like the isp1301_omap driver.) We might want to make the name even more specific (but "isp1301_ohci_pnx4008" doesn't fit.) * The ISP1301 is definitely not a hardware monitoring device. * Fix a memory leak on failure in isp1301_attach. If i2c_attach_client fails, the client is not registered so isp1301_detach is never called and the i2c_client memory is lost. * Use strlcpy instead of strcpy. Signed-off-by: Jean Delvare Cc: Vitaly Wool Cc: David Brownell Signed-off-by: Greg Kroah-Hartman commit 71be4f81e97fe1f42c48a6dfc411dc6d3c18687f Author: Aleksey Gorelov Date: Thu Jun 19 15:22:17 2008 -0700 USB: debug port converter does not accept more than 8 byte packets USB debug port only supports 8 byte rx/tx packets. Although spec implies that "if a packet larger than eight bytes is received from the remote computer, the device must break the larger packet into eight-byte packets before sending the data to the Debug Port", the real PLX NET20DC device does not handle it right - data is corrupted on debug port end if serial interface sends >8 byte urbs. Patch below fixes the issue by limiting tx urb to 8 byte. Signed off by: Aleks Gorelov Signed-off-by: Greg Kroah-Hartman commit 830f4021a8d5ce97c6bed267132e5e90fb166192 Author: Oliver Neukum Date: Wed Jun 25 14:17:16 2008 +0200 USB: fix disconnect bug in cdc-acm cdc-acm must give up secondary interfaces if the primary is disconnected and vice versa. This wasn't done correctly. Signed-off-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman commit 62ad296b6ca78bd123864c138814c0a597873693 Author: Oliver Neukum Date: Wed Jun 25 13:32:49 2008 +0200 USB: fix usb serial pm counter decrement for disconnected interfaces usb serial decrements the pm counter even if an interface has been disconnected. If it was a logical disconnect the interface may belong already to another driver. This patch introduces a check for disconnected interfaces. Signed-off-by: Oliver Neukum Cc: Stable Signed-off-by: Greg Kroah-Hartman commit 17d80d562fd78a035e994afde88f354973e76236 Author: Oliver Neukum Date: Tue Jun 24 15:56:10 2008 +0200 USB: autosuspend for cdc-wdm this patch implements - suspend/resume - aggressive autosuspend for the cdc-wdm driver - pre/post_reset Signed-off-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman commit 11ea859d64b69a747d6b060b9ed1520eab1161fe Author: Oliver Neukum Date: Fri Jun 20 11:25:57 2008 +0200 USB: additional power savings for cdc-acm devices that support remote wakeup this patch saves power for cdc-acm devices that support remote wakeup while the device is connected. - request needs_remote_wakeup when needed - delayed write while a device is autoresumed - the device is marked busy when appropriate Signed-off-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman commit 188d63602756bfd4aa1fb61d531dbd59bddac962 Author: Ben Collins Date: Thu Jun 26 20:08:16 2008 -0400 USB: keyspan: Remove duplicate device entries The 28xb, as documented in comments, has the same ID's as the 28x. Remove the duplicated ID's from the device tables, and expand the comment to document this. Signed-off-by: Ben Collins Signed-off-by: Greg Kroah-Hartman commit 3b36a8fd67774867536f138035823ea9fb1b9566 Author: Benny Halevy Date: Fri Jun 27 12:22:32 2008 +0300 usb: fix uninitialized variable warning in keyspan_pda This fixes the compiler warning. Signed-off-by: Greg Kroah-Hartman commit 397f519a0d771a6bddbcd71a31da6880e81c2e6b Author: Yoshihiro Shimoda Date: Fri Jun 27 19:09:58 2008 +0900 usb: r8a66597-hcd: fix iinterval for Full/Low speed device fix interrupt transfer interval for Full/Low speed device. Signed-off-by: Yoshihiro Shimoda Signed-off-by: Greg Kroah-Hartman commit 0bf32b807ff28bb71012f60660e97e79408252ce Author: Yoshihiro Shimoda Date: Fri Jun 27 19:09:55 2008 +0900 usb: r8a66597-hcd: fix interrupt trigger fix the problem that did not set IRQF_TRIGGER_ flag. Signed-off-by: Yoshihiro Shimoda Signed-off-by: Greg Kroah-Hartman commit 742120c63138651c898614001cb58cd607401eac Author: Ming Lei Date: Wed Jun 18 22:00:29 2008 +0800 USB: fix usb_reset_device and usb_reset_composite_device(take 3) This patch renames the existing usb_reset_device in hub.c to usb_reset_and_verify_device and renames the existing usb_reset_composite_device to usb_reset_device. Also the new usb_reset_and_verify_device does't need to be EXPORTED . The idea of the patch is that external interface driver should warn the other interfaces' driver of the same device before and after reseting the usb device. One interface driver shoud call _old_ usb_reset_composite_device instead of _old_ usb_reset_device since it can't assume the device contains only one interface. The _old_ usb_reset_composite_device is safe for single interface device also. we rename the two functions to make the change easily. This patch is under guideline from Alan Stern. Signed-off-by: Ming Lei commit dd9ca5d9be7eba99d685d733e23d5be7110e9556 Author: Andre Haupt Date: Wed Jun 18 15:56:00 2008 +0200 USB: usb-serial: fix a sparse warning about different signedness fix the following sparse warning: drivers/usb/serial/usb-serial.c:927:43: warning: incorrect type in argument 3 (different signedness) drivers/usb/serial/usb-serial.c:927:43: expected unsigned int *minor drivers/usb/serial/usb-serial.c:927:43: got int * CHECK drivers/usb/serial/generic.c Signed-off-by: Andre Haupt Signed-off-by: Greg Kroah-Hartman commit 3faefc88c1a32b0b4a00b9089fab5d917996b16c Author: Nate Case Date: Tue Jun 17 11:11:38 2008 -0500 USB: isp1760: Support board-specific hardware configurations This adds support for hardware configurations that don't match the chip default register settings (e.g., 16-bit data bus, DACK and DREQ pulled up instead of down, analog overcurrent mode). These settings are passed in via the OF device tree. The PCI interface still assumes the same default values. Signed-off-by: Nate Case Acked-by: Olof Johansson Signed-off-by: Greg Kroah-Hartman commit 6d243e5c76b632a94d54cac2fe7fe8c0b41cd482 Author: Ming Lei Date: Tue Jun 17 23:24:08 2008 +0800 USB: fix comment of usb_set_configuration It is the usb interface driver probe() methods that can't call usb_set_configuration, not usb device driver. Signed-off-by: Ming Lei Signed-off-by: Greg Kroah-Hartman commit 7c3e28bc56bd2e4310dc0af99f2b95eeda9a2ff7 Author: Alan Stern Date: Mon Jun 16 12:11:39 2008 -0400 USB: use standard SG iterator in the scatter-gather library This patch (as1103) changes the iteration in the USB scatter-gather to use a standard SG iterator. Otherwise the iteration will fail if it encounters a chained SG list. Signed-off-by: Alan Stern Acked-by: Jens Axboe Signed-off-by: Greg Kroah-Hartman commit 625f694936cbbdee98e6cc65f72724a7660e7946 Author: Ming Lei Date: Sun Jun 15 09:42:02 2008 +0800 USB: remove interface parameter of usb_reset_composite_device From the current implementation of usb_reset_composite_device function, the iface parameter is no longer useful. This function doesn't do something special for the iface usb_interface,compared with other interfaces in the usb_device. So remove the parameter and fix the related caller. Signed-off-by: Ming Lei Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 33578bd706e40eb877bd87bfc47e5da30034afde Author: Christophe Jaillet Date: Mon Jun 9 16:39:53 2008 -0700 USB: AccessRunner: avoid unnecessary memset Remove an explicit memset(.., 0, ...) to a variable allocated with kzalloc (i.e. 'card_info' array of the structure 'instance'). Signed-off-by: Christophe Jaillet Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman commit d249afddffda695a20afe5270cbbfa242969d6e1 Author: Andrew Morton Date: Mon Jun 9 16:39:52 2008 -0700 USB: drivers/usb/host/isp1760-hcd.c: processor flags have type `unsigned long' Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman commit 87d65e54b6d5ff6ee905c4ade1e28f486ccfce8a Author: Oliver Neukum Date: Thu Jun 19 14:20:18 2008 +0200 USB: cdc-wdm cleanup - fixes an error with filling out control requests - increases grepability and error logging - fixes the short read code path Signed-off-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman commit 640c1bce86d1e11ee6a1263fdf6170d3210b1684 Author: Greg Kroah-Hartman Date: Thu Jun 19 11:21:16 2008 -0700 USB: delete airprime driver This driver is only for one device id, and the option driver should be used instead for it. Signed-off-by: Greg Kroah-Hartman commit 518386c7d4cc3eb8e6b815e0b11ed2cec6245907 Author: Akinobu Mita Date: Mon Jun 9 16:39:57 2008 -0700 USB: usbmon: use simple_read_from_buffer() Signed-off-by: Akinobu Mita Acked-by: Pete Zaitcev Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman commit bef4665a2e5145737fa925a5a1a7a8afd1b91acc Author: Ming Lei Date: Sun Jun 8 16:44:40 2008 +0800 USB: uhci: mark root_hub_hub_des[] as const mark this array as const because it is read-only Signed-off-by: Ming Lei Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit fe9b9034aa6f69dd7bf3bdca4288763ac2cd534a Author: Ming Lei Date: Sun Jun 8 16:13:03 2008 +0800 USB: host: mark const variable tables as "const" Mark the tables as const so that they end up in .rodata section and don't cacheline share with things that get written to. Signed-off-by: Ming Lei Cc: Yoshihiro Shimoda Signed-off-by: Greg Kroah-Hartman commit f579c2b46f74038e8f5a762c7f10c2385b33e3dc Author: Alan Stern Date: Mon Jun 2 16:26:48 2008 -0400 USB Gadget: documentation update This patch (as1102) clarifies two points in the USB Gadget kerneldoc: Request completion callbacks are always made with interrupts disabled; Device controllers may not support STALLing the status stage of a control transfer after the data stage is over. Signed-off-by: Alan Stern Acked-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit e0d795e4f36c2d8949c1355b497fc5425dbb9437 Author: Felipe Balbi Date: Tue Jun 3 14:47:52 2008 +0300 usb: irda: cleanup on ir-usb module General cleanup on ir-usb module. Introduced a common header that could be used also on usb gadget framework. Lot's of cleanups and now using macros from the header file. Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman commit b963801164618e25fbdc0cd452ce49c3628b46c8 Author: David Brownell Date: Tue Jun 3 22:21:55 2008 -0700 USB: ehci-hcd unlink speedups This patch fixes some performance bugs observed with some workloads when unlinking EHCI queue header (QH) descriptors from the async ring (control/bulk schedule). The mechanism intended to defer unlinking an empty QH (so there is no penalty in common cases where it's quickly reused) was not working as intended. Sometimes the unlink was scheduled: - too quickly ... which can be a *strong* negative effect, since that QH becomes unavailable for immediate re-use; - too slowly ... wasting DMA cycles, usually a minor issue except for increased bus contention and power usage; Plus there was an extreme case of "too slowly": a logical error in the IAA watchdog-timer conversion meant that sometimes the unlink never got scheduled. The fix replaces a simple counter with a timestamp derived from the controller's 8 KHz microframe counter, and adjusts the timer usage for some issues associated with HZ being less than 8K. (Based on a patch originally by Alan Stern, and good troubleshooting from Leonid.) Signed-off-by: David Brownell Cc: Alan Stern Cc: Leonid Signed-off-by: Greg Kroah-Hartman commit 38f3ad5e7463d4dd490a8081a5f3f9f2dec7ecd6 Author: Felipe Balbi Date: Thu Jun 12 10:49:47 2008 +0300 usb: hub: add check for unsupported bus topology We can't allow hubs on the 7th tier as they would allow devices on the 8th tier. Signed-off-by: Felipe Balbi Cc: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 6deb270b5c60680ca9117bd545302ea6a58bad42 Author: Pete Zaitcev Date: Sun Jun 1 21:23:07 2008 -0700 USB: ohci_hcd hang: submit vs. rmmod race If we do rmmod ohci_hcd while an application is doing something, the following may happen: - a control URB completes (in finish_urb) and the ohci's endpoint is set into ED_UNLINK in ed_deschedule - same URB is (re)submitted because of the open/close loop or other such application behaviour - rmmod sets the state to HC_STATE_QUESCING - finish_unlinks happens at next SOF; normally it would set ed into ED_IDLE and immediately call ed_schedule (since URB had extra TDs queued), which sets it into ED_OPER. But the check in ed_schedule makes it fail with -EAGAIN (which is ignored) - from now on we have a dead URB stuck; it cannot even be unlinked because the ed status is not ED_OPER, and thus start_ed_unlink is not invoked. This patch removes the check. In 2.6.25, all callers check for __ACTIVE bit before invoking ed_schedule, which is more appropriate. Alan Stern and David Brownell approved of this (cautiously). Signed-off-by: Pete Zaitcev Signed-off-by: Greg Kroah-Hartman commit 6381fad77e5d44f8e0e2afffe686cb4e6fc36e71 Author: Eric Miao Date: Mon Jun 2 10:05:30 2008 +0800 USB: make SA1111 OHCI driver SA11x0 specific As RMK pointed out, considering the fact that the _only_ platform with a PXA and SA1111 is the Lubbock, and that SA1111 DMA doesn't work there, (i.e. the SA1111 OHCI doesn't work there) the SA1111 OHCI driver should really be made SA11x0 specific. Signed-off-by: Eric Miao Acked-by: Russell King Acked-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit 421b4bf5f292cc97c07a7f838595ccf128cc2c92 Author: Pete Zaitcev Date: Sun Jun 1 14:38:43 2008 -0700 USB: missing usb_put_hcd to ohci-at91 Looks like usb_put_hcd was missing. Also, make an always-zero function return void. Signed-off-by: Pete Zaitcev Acked-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit abe28c00b906b79dc9aff81087a81a5608f64170 Author: Harvey Harrison Date: Fri May 30 10:39:04 2008 -0700 USB: speedtch.c fix sparse shadowed variable warning i is used only as a for-loop index no need to declare another. drivers/usb/atm/speedtch.c:832:7: warning: symbol 'i' shadows an earlier one drivers/usb/atm/speedtch.c:766:6: originally declared here Signed-off-by: Harvey Harrison Signed-off-by: Greg Kroah-Hartman commit b2bdd1f5041db6f2d172417b5ceea20abc7a6eb6 Author: Harvey Harrison Date: Fri May 30 10:29:55 2008 -0700 USB: cp2101.c fix sparse signedness mismatch warnings The get/set 2101_config helpers take an unsigned int rather than an int. It is safe to change these in each case and may even produce better code as it will be an unsigned divide rather than a signed divide in places. All other manipulation was setting/masking bits which will not be affected by the sign change. Fixes the following sparse warnings: drivers/usb/serial/cp2101.c:378:44: warning: incorrect type in argument 3 (different signedness) drivers/usb/serial/cp2101.c:378:44: expected unsigned int *data drivers/usb/serial/cp2101.c:378:44: got int * drivers/usb/serial/cp2101.c:388:40: warning: incorrect type in argument 3 (different signedness) drivers/usb/serial/cp2101.c:388:40: expected unsigned int *data drivers/usb/serial/cp2101.c:388:40: got int * drivers/usb/serial/cp2101.c:413:42: warning: incorrect type in argument 3 (different signedness) drivers/usb/serial/cp2101.c:413:42: expected unsigned int *data drivers/usb/serial/cp2101.c:413:42: got int * drivers/usb/serial/cp2101.c:421:42: warning: incorrect type in argument 3 (different signedness) drivers/usb/serial/cp2101.c:421:42: expected unsigned int *data drivers/usb/serial/cp2101.c:421:42: got int * drivers/usb/serial/cp2101.c:444:42: warning: incorrect type in argument 3 (different signedness) drivers/usb/serial/cp2101.c:444:42: expected unsigned int *data drivers/usb/serial/cp2101.c:444:42: got int * drivers/usb/serial/cp2101.c:451:42: warning: incorrect type in argument 3 (different signedness) drivers/usb/serial/cp2101.c:451:42: expected unsigned int *data drivers/usb/serial/cp2101.c:451:42: got int * drivers/usb/serial/cp2101.c:458:42: warning: incorrect type in argument 3 (different signedness) drivers/usb/serial/cp2101.c:458:42: expected unsigned int *data drivers/usb/serial/cp2101.c:458:42: got int * drivers/usb/serial/cp2101.c:471:42: warning: incorrect type in argument 3 (different signedness) drivers/usb/serial/cp2101.c:471:42: expected unsigned int *data drivers/usb/serial/cp2101.c:471:42: got int * drivers/usb/serial/cp2101.c:481:42: warning: incorrect type in argument 3 (different signedness) drivers/usb/serial/cp2101.c:481:42: expected unsigned int *data drivers/usb/serial/cp2101.c:481:42: got int * drivers/usb/serial/cp2101.c:561:41: warning: incorrect type in argument 3 (different signedness) drivers/usb/serial/cp2101.c:561:41: expected unsigned int *data drivers/usb/serial/cp2101.c:561:41: got int * drivers/usb/serial/cp2101.c:591:45: warning: incorrect type in argument 3 (different signedness) drivers/usb/serial/cp2101.c:591:45: expected unsigned int *data drivers/usb/serial/cp2101.c:591:45: got int * drivers/usb/serial/cp2101.c:597:41: warning: incorrect type in argument 3 (different signedness) drivers/usb/serial/cp2101.c:597:41: expected unsigned int *data drivers/usb/serial/cp2101.c:597:41: got int * drivers/usb/serial/cp2101.c:608:45: warning: incorrect type in argument 3 (different signedness) drivers/usb/serial/cp2101.c:608:45: expected unsigned int *data drivers/usb/serial/cp2101.c:608:45: got int * drivers/usb/serial/cp2101.c:614:41: warning: incorrect type in argument 3 (different signedness) drivers/usb/serial/cp2101.c:614:41: expected unsigned int *data drivers/usb/serial/cp2101.c:614:41: got int * drivers/usb/serial/cp2101.c:623:45: warning: incorrect type in argument 3 (different signedness) drivers/usb/serial/cp2101.c:623:45: expected unsigned int *data drivers/usb/serial/cp2101.c:623:45: got int * drivers/usb/serial/cp2101.c:680:50: warning: incorrect type in argument 3 (different signedness) drivers/usb/serial/cp2101.c:680:50: expected unsigned int *data drivers/usb/serial/cp2101.c:680:50: got int * drivers/usb/serial/cp2101.c:690:43: warning: incorrect type in argument 3 (different signedness) drivers/usb/serial/cp2101.c:690:43: expected unsigned int *data drivers/usb/serial/cp2101.c:690:43: got int * drivers/usb/serial/cp2101.c:715:41: warning: incorrect type in argument 3 (different signedness) drivers/usb/serial/cp2101.c:715:41: expected unsigned int *data drivers/usb/serial/cp2101.c:715:41: got int * Signed-off-by: Harvey Harrison Signed-off-by: Greg Kroah-Hartman commit 5a33956a300dcb48a3b125cae437ad6f5c718282 Author: Harvey Harrison Date: Fri May 30 10:18:53 2008 -0700 USB: digi_accelport.c trivial sparse lock annotation Signed-off-by: Harvey Harrison Signed-off-by: Greg Kroah-Hartman commit 554cc171e3b08a0cecd5cf7c0c38f66c43f76b39 Author: Stephen Rothwell Date: Fri May 23 16:37:58 2008 +1000 USB: ohci-ppc-of: use linux/of_platform.h instead of asm Signed-off-by: Stephen Rothwell Signed-off-by: Greg Kroah-Hartman commit 49f1525546532139e0260ae19ab8012a2bfbd1f3 Author: Alan Cox Date: Thu May 22 22:48:48 2008 +0100 USB: sisusb: Push down the BKL This is another case where the lock_kernel appears to be unneccessary and could be removed with a bit more investigative work Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman commit 54592157c7120ea4d6d0014cbbfc327d4b867fe3 Author: Alan Cox Date: Thu May 22 22:47:31 2008 +0100 USB: rio100: Push down the BKL The BKL is actually probably not needed as the mutex seems sufficient. If so then a further patch to drop it would be a good followup. Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman commit f1b5a7fe1718393f67fa6222a1cc27f97e12c4b3 Author: Alan Cox Date: Thu May 22 22:46:25 2008 +0100 USB: auerwald: Push down the BKL into the driver Also fix the unknown ioctl return code Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman commit 824f16fda56a88267aba9b2580d7566cf56a0860 Author: Alan Cox Date: Thu May 22 22:06:02 2008 +0100 USB: iowarrior: Push down BKL I'm pretty sure the mutex is sufficient for all locking but will come back to that later if the USB folks don't beat me to it. For now get rid of the old BKL ioctl method and wrap the ioctl handler Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman commit 5cb4aeca8e8c29605703be5576825eb3257d8a92 Author: Alan Cox Date: Thu May 22 22:07:51 2008 +0100 USB: usblcd: Push down BKL into driver I'm pretty sure this can be eliminated however I couldn't prove (or find) what stopped the device vanishing mid IOCTL_GET_HARD_VERSION. Perhaps a USB wizard could double check that and see if the lock_kernel can go entirely. Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman commit 1160d0765660e14b44dffd931b28a3875d5d9e46 Author: Alan Cox Date: Thu May 22 22:04:48 2008 +0100 USB: ftdi_usb: Eliminate ioctl and BKL ioctl use ftdi has one ioctl, which is buggy and for debugging. Kill it off Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman commit 44c389a00ff7229ab2f2aab22ce03ae0c9037df7 Author: Alan Cox Date: Thu May 22 22:03:27 2008 +0100 USB: gadget: Push BKL down into drivers This keeps the gadget ioctl method wrapped but pushes the BKL down into the gadget code so we can use unlocked_ioctl(). Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman commit 0391c828ce75cc71ae301946699a6f2d515fd99d Author: David Brownell Date: Thu Jun 19 18:20:11 2008 -0700 usb ethernet gadget: use composite gadget framework Building on the previous patches which took code from this driver and pakaged it in more-reusable network "function" components, this patch gets rid of the original code and uses those components instead. As seen with the other gadget driver conversions, the resulting code is much easier to understand and (presumably) work with. In this case that's especially true, since the Ethernet gadget had grown to handle three (!) different Ethernet-over-USB protocols. This modularization should make it much easier to add a fourth option for the newish CDC "Ethernet Emulation Model" (or EEM). Lightly tested, primarily at full speed. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit 19e2068015d4a66f62a0a19be2130d2948ba8024 Author: David Brownell Date: Thu Jun 19 18:20:26 2008 -0700 usb gadget: new "CDC Composite" gadget driver This is a simple example of a composite gadget, combining two Communications Class Device (CDC) functions: ECM and ACM. This provides a clear example of how the composite gadget framework is intended to work. It's surprising that MS-Windows (or at least, XP and previous) won't "just work" with something this simple... One /proc/bus/usb/devices listing looks like: T: Bus=03 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 46 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=02(comm.) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=0525 ProdID=a4aa Rev= 3.01 S: Manufacturer=Linux 2.6.26-rc6-pnut with net2280 S: Product=CDC Composite Gadget C:* #Ifs= 4 Cfg#= 1 Atr=c0 MxPwr= 2mA I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=06 Prot=00 Driver=cdc_ether E: Ad=83(I) Atr=03(Int.) MxPS= 16 Ivl=32ms I: If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether I:* If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=02 Prot=01 Driver=cdc_acm E: Ad=86(I) Atr=03(Int.) MxPS= 8 Ivl=32ms I:* If#= 3 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_acm E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms Not all USB peripheral controller hardware can support this driver. All the highspeed-capable peripheral controllers with drivers now in the mainline kernel seem to support this, as does omap_udc. But many full speed controllers don't have enough endpoints, or (as with the PXA controllers) don't support altsettings. Lightly tested. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit 45fe3b8e5342cd1ce307099459c74011d8e01986 Author: David Brownell Date: Thu Jun 19 18:20:04 2008 -0700 usb ethernet gadget: split RNDIS function This is a RNDIS function driver, extracted from the all-in-one Ethernet gadget driver. Lightly tested ... there seems to be a pre-existing problem when talking to Windows XP SP2, not quite sure what's up with that yet. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit da741b8c56d612b5dd26ffa31341911a5fea23ee Author: David Brownell Date: Thu Jun 19 18:19:46 2008 -0700 usb ethernet gadget: split CDC Ethernet function This is a "CDC Ethernet" (ECM) function driver, extracted from the all-in-one Ethernet gadget driver. This is a good example of how to implement interface altsettings. In fact it's currently the only such example in the gadget stack, pending addition of OBEX support. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit 8a40819e97368f2b6e67fea103348f9fc2f68ceb Author: David Brownell Date: Thu Jun 19 18:19:32 2008 -0700 usb ethernet gadget: split CDC Subset function This is a simple "CDC Subset" (and MCCI "SAFE") function driver, extracted from the all-in-one Ethernet gadget driver. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit 2b3d942c4878084a37991a65e66512c02b8fa2ad Author: David Brownell Date: Thu Jun 19 18:19:28 2008 -0700 usb ethernet gadget: split out network core Abstract the peripheral side Ethernet-over-USB link layer code from the all-in-one Ethernet gadget driver into a component that can be called by various functions, so the various flavors can be split apart and selectively reused. A notable difference from the approach taken with the serial link layer code (beyond talking to NET not TTY) is that because of the initialization requirements, this only supports one network link. (And one set of Ethernet link addresses.) That is, each configuration may have only one instance of a network function. This doesn't change behavior; the current code has that same restriction. If you want multiple logical links, that can easily be done using network layer tools. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit 15b2d2b529d11449910ac86f6093124bce8f6103 Author: David Brownell Date: Thu Jun 19 18:19:16 2008 -0700 usb gadget: RNDIS cleanups Some cleanup to the RNDIS code: - Minor bugfix: rndis_unit() is supposed to put the link into the RNDIS_UNINITIALIZED state, which does not mean "unused". There's a separate method to stop using the link. (Bug doesn't affect anything right now because of how the code is used.) - Reduce coupling between RNDIS code and its user(s), in preparation for updates in that code: * Decouple RNDIS_RESPONSE_AVAILABLE notifications from net_device by passing just a void* handle. (Also, remove the unused return value of the notification callback.) * When it needs a copy of net_device stats, just ask for it - Remove unused/untested code backing various never-used OIDs: * RNDIS_PM, RNDIS_WAKEUP ... "should" get implemented, but the relevant docs were unclear, ambguous, and incomplete. Someone with access to the Hidden Gospels (maybe in the EU?) might be able to figure out what this should do. * RNDIS_OPTIONAL_STATS ... as the name suggests, optional. Never implemented in part because not all the semantics were clear. * OID_GEN_RNDIS_CONFIG_PARAMETER, which has been #if 0 forever. - A few small whitespace fixes Plus switch the VERBOSE symbol over to the newer VERBOSE_DEBUG style. There should be no functional changes because of this patch; it's a net source code shrink (because of the dead/unused code removal) and a small object code shrink (a couple hundred bytes on ARMv5). Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit 7bb5ea54be47584869b9a748696e06788c55e28f Author: David Brownell Date: Thu Jun 19 18:19:03 2008 -0700 usb gadget serial: use composite gadget framework This switches the serial gadget over to using the new "function" versions of the serial port interfacing code. The remaining code in the main source file is quite small... Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit 61d8baea5d02f0f00fb789ce5551cbd8f8b77087 Author: David Brownell Date: Thu Jun 19 18:18:50 2008 -0700 usb gadget serial: split out generic serial function Split out the generic serial support into a "function driver". This closely mimics the ACM support, but with a MUCH simpler control model. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit 4d5a73dc39c1e1d8ba5feec5c6234ae920c59161 Author: David Brownell Date: Thu Jun 19 18:18:40 2008 -0700 usb gadget serial: split out CDC ACM function Split out CDC ACM parts of "gadget serial" to a "function driver". Some key structural differences from the previous ACM support, shared with with the generic serial function (next patch): - As a function driver, it can be combined with other functions. One gadget configuration could offer both serial and network links, as an example. - One serial port can be exposed in multiple configurations; the /dev/ttyGS0 node could be exposed regardless of which config the host selected. - One configuration can expose multiple serial ports, such as ttyGS0, ttyGS1, ttyGS2, and ttyGS3. This code should be a lot easier to understand than the previous all-in-one-big-file version of the driver. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit 097db1d034b0927056f3d9e844dc80b3ba881765 Author: David Brownell Date: Thu Jun 19 18:18:27 2008 -0700 usb gadget zero: use composite gadget framework Update Gadget Zero to use the more modular versions of the loopback and source/sink configuration drivers which build on the new gadget framework code. The core code is a LOT simpler, and it should be much easier now to understand how the parts fit together. The conversion is an overall source shrink in terms of this gadget, since it uses more midlayer support. However, it's an overall increase in object size because there's less sharing between the two configurations (improves code clarity) and because the midlayer is a bit more functional than this driver actually needs. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit e5760fdac8c8aeca060d1afc8a233ea3d7a46720 Author: David Brownell Date: Thu Jun 19 17:55:35 2008 -0700 usb gadget zero: split out loopback config This splits the gadget zero "loopback" configuration into a standalone "configuration driver", building on the composite gadget framework code. It doesn't yet pull the original code out of gadget zero or update how that driver is built. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit a400cadc0774c31f67c419a835d80ba611128c2a Author: David Brownell Date: Thu Jun 19 17:55:23 2008 -0700 usb gadget zero: split out source/sink config This splits the gadget zero "source/sink" configuration into a standalone "configuration driver", building on the composite gadget framework code. It doesn't yet pull the original code out of gadget zero or update how that driver is built. Neither this, nor its sibling "loopback" configuration, is a function driver that can be combined with other functions. (The host "usbtest" driver wouldn't know how to deal with that!) However the code becomes simpler because of this conversion, so it's a net win. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit 40982be52d8f64c3e10adce17e66ab755a4fa26b Author: David Brownell Date: Thu Jun 19 17:52:58 2008 -0700 usb gadget: composite gadget core Add interfaces for composite gadget drivers, and basic implementation support behind it: - struct usb_function ... groups one or more interfaces into a function managed as one unit within a configuration, to which it's added by usb_add_function(). - struct usb_configuration ... groups one or more such functions into a configuration managed as one unit by a driver, to which it's added by usb_add_config(). These operate at either high or full/low speeds and at a given bMaxPower. - struct usb_composite_driver ... groups one or more such configurations into a gadget driver, which may be registered or unregistered. - struct usb_composite_dev ... a usb_composite_driver manages this; it wraps the usb_gadget exposed by the controller driver. This also includes some basic kerneldoc. How to use it (the short version): provide a usb_composite_driver with a bind() that calls usb_add_config() for each of the needed configurations. The configurations in turn have bind() calls, which will usb_add_function() for each function required. Each function's bind() allocates resources needed to perform its tasks, like endpoints; sometimes configurations will allocate resources too. Separate patches will convert most gadget drivers to this infrastructure. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit a4c39c41bf3592684e36fa0dbbd4ab1a31f969b9 Author: David Brownell Date: Thu Jun 19 17:52:25 2008 -0700 usb gadget: descriptor copying support Define three new descriptor manipulation utilities, for use when setting up functions that may have multiple instances: usb_copy_descriptors() to copy a vector of descriptors usb_free_descriptors() to free the copy usb_find_endpoint() to find a copied version These will be used as follows. Functions will continue to have static tables of descriptors they update, now used as __initdata templates. When a function creates a new instance, it patches those tables with relevant interface and string IDs, plus endpoint assignments. Then it copies those morphed descriptors, associates the copies with the new function instance, and records the endpoint descriptors to use when activating the endpoints. When initialization is done, only the copies remain in memory. The copies are freed on driver removal. This ensures that each instance has descriptors which hold the right instance-specific data. Two instances in the same configuration will obviously never share the same interface IDs or use the same endpoints. Instances in different configurations won't do so either, which means this is slightly less memory-efficient in some cases. This also includes a bugfix to the epautoconf code that shows up with this usage model. It must replace the previous endpoint number when updating the template descriptors, not just mask in a few more bits. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit a7707adf9ee8de3c5b67e3793b98888f551ad00d Author: David Brownell Date: Thu Jun 19 17:52:07 2008 -0700 usb gadget: use new serial core Teach "gadget serial" to use the new abstracted (and bugfixed) TTY glue, and remove all the orignal tangled-up code. Update the documentation accordingly. This is a net object code shrink and cleanup; it should make it a lot easier to see how the TTY glue should accomodate updates to the TTY layer, be bugfixed, etc. Notable behavior changes include: it can now support getty even when there's no USB connection; it fits properly into the mdev/udev world; and RX handling is better (throttling works, and low latency). Configurations with scripts setting up the /dev/ttygserial device node (with "experimental" major number) may want to change that to be a symlink pointing to the /dev/ttyGS0 file, as a migration aid; else, just switch entirely over to mdev/udev. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit c1dca562be8ada614ef193aa246c6f8705bcd6b9 Author: David Brownell Date: Thu Jun 19 17:51:44 2008 -0700 usb gadget: split out serial core This abstracts the "gadget serial" driver TTY glue into a separate component, cleaning it up and disentangling it from connection state. It also changed some behaviors for the better: - Stops using "experimental" major #127, and switches over to having the TTY layer allocate the dev_t numbers. - Provides /sys/class/tty/ttyGS* nodes, thus mdev/udev support. (Note "mdev" hotplug bug in Busybox v1.7.2: /dev/ttyGS0 will be a *block* device without CONFIG_SYSFS_DEPRECATED_V2.) - The tty nodes no longer reject opens when there's no host. Now they can support normal getty configs in /etc/inttab... - Now implements RX throttling. When the line discipline says it doesn't want any more data, only packets in flight will be delivered (currently, max 1K/8K at full/high speeds) until it unthrottles the data. - Supports low_latency. This is a good policy for all USB serial adapters, since it eliminates scheduler overhead on RX paths. This also includes much cleanup including better comments, fixing memory leaks and other bugs (including some locking fixes), messaging cleanup, and an interface audit and tightening. This added up to a significant object code shrinkage, on the order of 20% (!) depending on CPU and compiler. A separate patch actually kicks in this new code, using the functions declared in this new header, and removes the previous glue. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit bb24280ffce6a8bc6b03d29a43ec16ac14e9ec85 Author: David Brownell Date: Tue May 27 19:24:20 2008 -0700 USB: at91_udc: updated fifo sizes It turns out newer versions of the AT91 UDC hardware have increased sizes of some of the FIFOs. Reporting that is a Good Thing. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit e184d5fcaac9676bd83a956a774a04a72bf2b28b Author: Alexey Dobriyan Date: Wed May 14 16:25:13 2008 -0700 USB: rndis: switch to seq_files Signed-off-by: Alexey Dobriyan Cc: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman commit baad4119a3b5215a040bc221478da57c76389e34 Author: Adrian Bunk Date: Tue May 20 01:00:24 2008 +0300 USB: remove Documentation/usb/uhci.txt The driver was removed before kernel 2.6.0 Signed-off-by: Adrian Bunk Signed-off-by: Greg Kroah-Hartman commit ea05af61a874ffbc158d9cf06df8a9396f299f38 Author: Adrian Bunk Date: Tue May 20 01:00:46 2008 +0300 USB: remove CVS keywords This patch removes CVS keywords that weren't updated for a long time from comments. Signed-off-by: Adrian Bunk Signed-off-by: Greg Kroah-Hartman commit 543f7810fba2a62e412efa9473ad08167b691f09 Author: Alan Stern Date: Thu May 8 11:55:59 2008 -0400 usb-storage: implement "soft" unbinding This patch (as1092) implements "soft" unbinding for usb-storage. When the disconnect routine is called, all commands and reset delays are allowed to complete normally until after scsi_remove_host() returns. This means that the commands needed for an orderly shutdown will be sent through to the device. Unlike before, the driver will now execute every command that it accepts. Hence there's no need for special code to catch unexecuted commands and fail them. The new sequence of events when disconnect runs goes as follows: If the device is truly unplugged, set the DISCONNECTING flag so we won't try to access it any more. If the SCSI-scanning thread hasn't started up yet, prevent it from doing anything by setting the new DONT_SCAN flag. Then wake it up and wait for it to terminate. Remove the SCSI host. This unbinds the upper-level drivers, doing an orderly shutdown. Commands sent to quiesce the device will be transmitted normally, unless the device is unplugged. Set the DISCONNECTING flag so that we won't accept any new commands that might get submitted (there aren't supposed to be any) and we won't try to access the device for resets. Tell the control thread to exit by waking it up with no pending command, and wait for it to terminate. Go on to do all the other normal stuff: releasing resources, freeing memory, and so on. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 9da82bd4649334817ef0e752a69eb99051645dad Author: Alan Stern Date: Thu May 8 11:54:37 2008 -0400 USB: implement "soft" unbinding This patch (as1091) changes the way usbcore handles interface unbinding. If the interface's driver supports "soft" unbinding (a new flag in the driver structure) then in-flight URBs are not cancelled and endpoints are not disabled. Instead the driver is allowed to continue communicating with the device (although of course it should stop before its disconnect routine returns). The purpose of this change is to allow drivers to do a clean shutdown when they get unbound from a device that is still plugged in. Killing all the URBs and disabling the endpoints before calling the driver's disconnect method doesn't give the driver any control over what happens, and it can leave devices in indeterminate states. For example, when usb-storage unbinds it doesn't want to stop while in the middle of transmitting a SCSI command. The soft_unbind flag is added because in the past, a number of drivers have experienced problems related to ongoing I/O after their disconnect routine returned. Hence "soft" unbinding is made available only to drivers that claim to support it. The patch also replaces "interface_to_usbdev(intf)" with "udev" in a couple of places, a minor simplification. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 473bca94ba432b3c194e6fa315d81d8ac7670a4f Author: Adrian Bunk Date: Mon May 5 21:25:33 2008 +0300 USB: isp1760-hcd.c: make 2 functions static This patch makes the following needlessly global functions static: - enqueue_an_ATL_packet() - enqueue_an_INT_packet() Signed-off-by: Adrian Bunk Acked-by: Sebastian Siewior Signed-off-by: Greg Kroah-Hartman commit 7119e3c37fbf7c27adb5929f344c826ecb8c7859 Author: Alan Stern Date: Thu May 1 15:36:13 2008 -0400 usb-storage: change remaining semaphore to completion This patch (as1090) converts the one remaining semaphore in usb-storage into a completion. Signed-off-by: Alan Stern Cc: Matthew Dharm Signed-off-by: Greg Kroah-Hartman commit 7e4d6c387994294ac8198b624ee71e75de60dfd2 Author: Alan Stern Date: Thu May 1 15:35:18 2008 -0400 usb-storage: separate dynamic flags from fixed flags This patch (as1089) separates out the dynamic atomic bitflags and the static bitfields in usb-storage. Until now the two sorts of flags have been sharing the same word; this has always been awkward. To help prevent possible confusion, the two new fields each have a different name from the original. us->fflags contains the fixed bitfields (mostly taken from the USB ID table in unusual_devs.h), and us->dflags contains the dynamic atomic bitflags (used with set_bit, test_bit, and so on). Signed-off-by: Alan Stern Cc: Matthew Dharm Signed-off-by: Greg Kroah-Hartman commit 2742fd8899328345d97a3443fb787b051b79ebae Author: Alan Cox Date: Tue Apr 29 14:45:15 2008 +0100 USB: io_ti: FIrst cut at a big clean up Sort out the insane naming like "OperationalFirmwareVersion" which seems designed to cause formatting problems and RSI Merge various common code together Clean up the pointlessly complex and spread about MCR handling This is really just the low hanging fruit. Needs lots of testing before it goes upstream so testers and reports appreciated Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman commit 4330354f7660828d97834598633054b413f6264d Author: Alan Stern Date: Mon Apr 28 11:07:31 2008 -0400 USB: combine hub_quiesce and hub_stop This patch (as1083) combines hub_quiesce() and hub_stop() into a single routine. There's no point keeping them separate since they are usually called together. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit f2835219ed5e29ec959a0e635af4339d6174b2a7 Author: Alan Stern Date: Mon Apr 28 11:07:17 2008 -0400 USB: combine hub_activate and hub_restart This patch (as1071) combines hub_activate() and hub_restart() into a single routine. There's no point keeping them separate, since they are always called together. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 948fea37dcebfef8f0f2faf00930e7ec7e756e07 Author: Alan Stern Date: Mon Apr 28 11:07:07 2008 -0400 USB: optimize port debouncing during hub activation This patch (as1082) makes a small optimization to the way the hub driver carries out port debouncing immediately after a hub is activated (i.e., initialized, reset, or resumed). If any port-change statuses are observed, the code will delay for a minimal debounce period -- thereby making a good start at debouncing all the ports at once. If this wasn't sufficient then khubd will debounce any port that still requires attention. But in most cases it should suffice; it's rare for a device to need more than a minimal debounce delay. (In the cases of hub initialization or reset even that is most likely not needed, since any devices plugged in at such times have probably been attached for a while.) Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 8808f00c7adfc8dc0b797c34ec03490b237fce4e Author: Alan Stern Date: Mon Apr 28 11:06:55 2008 -0400 USB: try to salvage lost power sessions This patch (as1073) adds to khubd a way to recover from power-session interruption caused by transient connect-change or enable-change events. After the debouncing period, khubd attempts to do a USB-Persist-style reset or reset-resume. If it works, the connection will remain unscathed. The upshot is that we will be more immune to noise caused by EMI. The grace period is on the order of 100 ms, so this won't permit recovery from the "accidentally knocked the USB cable out of its socket" type of event, but it's a start. As an added bonus, if a device was suspended when the system goes to sleep then we no longer need to check for power-session interruptions when the system wakes up. Khubd will naturally see the status change while processing the device's parent hub and will do the right thing. The remote_wakeup() routine is changed; now it expects the caller to acquire the device lock rather than acquiring the lock itself. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 6ee0b270c733027b2b716b1c80b9aced41e08d20 Author: Alan Stern Date: Mon Apr 28 11:06:42 2008 -0400 USB: simplify hub_restart() logic This patch (as1081) straightens out the logic of the hub_restart() routine. Each port of the hub is scanned and the driver makes sure that ports which are supposed to be disabled really _are_ disabled. Any ports with a significant change in status are flagged in hub->change_bits, so that khubd can focus on them without the need to scan all the ports a second time -- which means the hub->activating flag is no longer needed. Also, it is now recognized explicitly that the only reason for resuming a port which was not suspended is to carry out a reset-resume operation, which happens only in a non-CONFIG_USB_SUSPEND setting. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 9e5eace734a7b4e96a4ba4cf1f85622446e95e17 Author: Greg Kroah-Hartman Date: Tue Jun 10 14:59:43 2008 -0400 USB: revert "don't use reset-resume if drivers don't support it" This reverts Linus's previous patch that is in mainline to make it easier for the USB hub.c patches that follow this to apply cleanly. The functionality will be added back in a followon patch in this series. Signed-off-by: Greg Kroah-Hartman commit 24618b0cd42f936cda461bdf6144670a5c925178 Author: Alan Stern Date: Mon Apr 28 11:06:28 2008 -0400 USB: debounce before unregistering This patch (as1080) makes a significant change to the way khubd handles port connect-change and enable-change events. Both types of event are now debounced, and the debouncing is carried out _before_ an existing usb_device is unregistered, instead of afterward. This means that drivers will have to deal with longer runs of errors when a device is unplugged, but they are supposed to be prepared for that in any case. The advantage is that when an enable-change occurs (caused for example by electromagnetic interference), the debouncing period will provide time for the cause of the problem to die away. A simple port reset (added in a forthcoming patch) will then allow us to recover from the fault. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit b01b03f3ad82b4293f6ca4da9b2692b6a377c609 Author: Alan Stern Date: Mon Apr 28 11:06:11 2008 -0400 USB: add new routine for checking port-resume type This patch (as1070) creates a new subroutine to check whether a device can be resumed. This code is needed even when CONFIG_USB_SUSPEND isn't set, because devices do suspend themselves when the root hub (and hence the entire bus) is suspended, and power sessions can get lost during a system sleep even without individual port suspends. The patch also fixes a loose end in USB-Persist reset-resume handling. When a low- or full-speed device is attached to an EHCI's companion controller, the port handoff during resume will cause the companion port's connect-status-change feature to be set. If that flag isn't cleared, the port-reset code will think it indicates that the device has been unplugged and the reset-resume will fail. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit bd2c784595e3dd551c2b3aa4167657bcc802f598 Author: Harvey Harrison Date: Thu May 1 20:52:57 2008 -0700 USB: use get_unaligned_* helpers for kl5kusb105 driver Signed-off-by: Harvey Harrison Signed-off-by: Greg Kroah-Hartman commit 0031a06e2f07ab0d1bc98c31dbb6801f95f4bf01 Author: Kay Sievers Date: Fri May 2 06:02:41 2008 +0200 USB: usb dev_set_name() instead of dev->bus_id The bus_id field is going away, use the dev_set_name() function to set it properly. Signed-off-by: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 7071a3ce0ca058ad2a9e3e8c33f30fb0bce62005 Author: Kay Sievers Date: Fri May 2 06:02:41 2008 +0200 USB: usb dev_name() instead of dev->bus_id The bus_id field is going away, use the dev_name() function instead. Signed-off-by: Kay Sievers Signed-off-by: Greg Kroah-Hartman commit 36aa81172edba8a3a8ecedbd1f56d41774ce2e08 Author: Greg Kroah-Hartman Date: Tue Jul 1 10:45:51 2008 -0400 USB: revert "don't lose disconnections during suspend" This reverts Alan's previous patch so that the recent Hub changes will apply cleanly. The above mentioned patch was needed for 2.6.26 to work properly. Cc: Alan Stern Cc: Lukas Hejtmanek Signed-off-by: Greg Kroah-Hartman commit 1b26da1510c02a2dac33c0ea48904256dcec4617 Author: Greg Kroah-Hartman Date: Wed Jul 2 12:46:22 2008 -0700 USB: handle pci_name() being const This changes usb_create_hcd() to be able to handle the fact that pci_name() has changed to a constant string. Signed-off-by: Greg Kroah-Hartman commit c5e46007e9737b77a79ec79ed95262c0ce996d6a Author: Andrew Lunn Date: Thu Apr 24 19:36:39 2008 +0200 USB: storage: UNUSUAL_DEVS() for PanDigital Picture frame. Signed-off-by: Andrew Lunn Signed-off-by: Matthew Dharm Signed-off-by: Greg Kroah-Hartman commit 6d52dcbe56ca8464bcad56d98a64bcd781596663 Merge: eb4225b... 48adcf1... Author: Linus Torvalds Date: Mon Jul 21 15:10:37 2008 -0700 Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq: [CPUFREQ] cpufreq: remove CVS keywords [CPUFREQ] change cpu freq arrays to per_cpu variables commit eb4225b2da2b9f3c1ee43efe58ed1415cc1d4c47 Merge: 807677f... 4cddb88... Author: Linus Torvalds Date: Mon Jul 21 14:55:23 2008 -0700 Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6 * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6: (25 commits) mmtimer: Push BKL down into the ioctl handler [IA64] Remove experimental status of kdump [IA64] Update ia64 mmr list for SGI uv [IA64] Avoid overflowing ia64_cpu_to_sapicid in acpi_map_lsapic() [IA64] adding parameter check to module_free() [IA64] improper printk format in acpi-cpufreq [IA64] pv_ops: move some functions in ivt.S to avoid lack of space. [IA64] pvops: documentation on ia64/pv_ops [IA64] pvops: add to hooks, pv_time_ops, for steal time accounting. [IA64] pvops: add hooks, pv_irq_ops, to paravirtualized irq related operations. [IA64] pvops: add hooks, pv_iosapic_ops, to paravirtualize iosapic. [IA64] pvops: define initialization hooks, pv_init_ops, for paravirtualized environment. [IA64] pvops: paravirtualize NR_IRQS [IA64] pvops: paravirtualize entry.S [IA64] pvops: paravirtualize ivt.S [IA64] pvops: paravirtualize minstate.h. [IA64] pvops: define paravirtualized instructions for native. [IA64] pvops: preparation for paravirtulization of hand written assembly code. [IA64] pvops: introduce pv_cpu_ops to paravirtualize privileged instructions. [IA64] pvops: add an early setup hook for pv_ops. ... commit 807677f812639bdeeddf86abc66117e124eaedb2 Author: Linus Torvalds Date: Mon Jul 21 13:06:20 2008 -0700 Don't list my old OSDL mailing address in CREDITS file .. it may or may be forwarded, but it's not like I want people to send stuff without knowing or checking first anyway, so delete the address entirely. Signed-off-by: Linus Torvalds commit f2d0f1dea41fd6c7a347e71b505a155096643517 Author: Linus Torvalds Date: Mon Jul 21 13:04:08 2008 -0700 x86: Fix help message for STRICT_DEVMEM config option The message talked about "left on" when it meant to say disabled. Signed-off-by: Linus Torvalds commit 3488007afc139929cfd16ab98670f87749d4f6fd Merge: 47c317a... cfc1b9a... Author: Linus Torvalds Date: Mon Jul 21 13:02:00 2008 -0700 Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86: convert Dprintk to pr_debug commit 47c317a7aaa2fbac03811a569829fa954e641520 Merge: e89970a... 0ebd652... Author: Linus Torvalds Date: Mon Jul 21 12:40:15 2008 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6: slub: dump more data on slab corruption SLUB: simplify re on_each_cpu() commit cfc1b9a6a683c835a20d5b565ade55baf639f72f Author: Thomas Gleixner Date: Mon Jul 21 21:35:38 2008 +0200 x86: convert Dprintk to pr_debug There are a couple of places where (P)Dprintk is used which is an old compile time enabled printk wrapper. Convert it to the generic pr_debug(). Signed-off-by: Thomas Gleixner commit e89970aa93b06d0605a488e74af3b0a2a80e03b5 Merge: 443bd1c... 5547cd0... Author: Linus Torvalds Date: Mon Jul 21 11:29:52 2008 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: netfilter: nf_conntrack_sctp: fix sparse warnings netfilter: nf_nat_sip: c= is optional for session netfilter: xt_TCPMSS: collapse tcpmss_reverse_mtu{4,6} into one function netfilter: nfnetlink_log: send complete hardware header netfilter: xt_time: fix time's time_mt()'s use of do_div() netfilter: accounting rework: ct_extend + 64bit counters (v4) netlink: add NLA_PUT_BE64 macro netfilter: nf_nat_core: eliminate useless find_appropriate_src for IP_NAT_RANGE_PROTO_RANDOM hdlcdrv: Fix CRC calculation. Revert "pkt_sched: Make default qdisc nonshared-multiqueue safe." net: In __netif_schedule() use WARN_ON instead of BUG_ON net: Improve simple_tx_hash(). pkt_sched: Remove unused variable skb in dev_deactivate_queue function. sunhme: Remove stop/wake TX queue calls in set-multicast-list handler. ucc_geth: do not touch net queue in adjust_link phylib callback gianfar: do not touch net queue in adjust_link phylib callback atl1: Do not wake queue before queue has been started. commit 443bd1c4ddab9d2144f4c9b85e0abccf2d93423f Author: Randy Dunlap Date: Mon Jul 21 09:27:18 2008 -0700 pci kernel-doc fatal error Fix kernel-doc comments so that they don't produce errors. Also cut some extraneous copy-paste text. Error(linhead//drivers/pci/pci.c:1133): duplicate section name 'Description' Error(linhead//drivers/pci/pci.c:1189): duplicate section name 'Description' Signed-off-by: Randy Dunlap Signed-off-by: Linus Torvalds commit 72a73693aac5ae82850cedc69fa5d264ca977c13 Merge: b7e6f62... 2e2dcc7... Author: Linus Torvalds Date: Mon Jul 21 10:34:25 2008 -0700 Merge branch 'x86/for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'x86/for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (160 commits) x86: remove extra calling to get ext cpuid level x86: use setup_clear_cpu_cap() when disabling the lapic KVM: fix exception entry / build bug, on 64-bit x86: add unknown_nmi_panic kernel parameter x86, VisWS: turn into generic arch, eliminate leftover files x86: add ->pre_time_init to x86_quirks x86: extend and use x86_quirks to clean up NUMAQ code x86: introduce x86_quirks x86: improve debug printout: add target bootmem range in early_res_to_bootmem() Subject: devmem, x86: fix rename of CONFIG_NONPROMISC_DEVMEM x86: remove arch_get_ram_range x86: Add a debugfs interface to dump PAT memtype x86: Add a arch directory for x86 under debugfs x86: i386: reduce boot fixmap space i386/xen: add proper unwind annotations to xen_sysenter_target x86: reduce force_mwait visibility x86: reduce forbid_dac's visibility x86: fix two modpost warnings x86: check function status in EDD boot code x86_64: ia32_signal.c: remove signal number conversion ... commit b7e6f62fe259187f2578d00960ef1b0e6ff6afd5 Merge: 8a39262... d41e26b... Author: Linus Torvalds Date: Mon Jul 21 10:30:10 2008 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm * git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm: dm crypt: add merge dm table: remove merge_bvec sector restriction dm: linear add merge dm: introduce merge_bvec_fn dm snapshot: use per device mempools dm snapshot: fix race during exception creation dm snapshot: track snapshot reads dm mpath: fix test for reinstate_path dm mpath: return parameter error dm io: remove struct padding dm log: make dm_dirty_log init and exit static dm mpath: free path selector on invalid args commit 8a392625b665c676a77c62f8608d10ff430bcb83 Merge: 519f014... 4b80991... Author: Linus Torvalds Date: Mon Jul 21 10:29:12 2008 -0700 Merge branch 'for-linus' of git://neil.brown.name/md * 'for-linus' of git://neil.brown.name/md: (52 commits) md: Protect access to mddev->disks list using RCU md: only count actual openers as access which prevent a 'stop' md: linear: Make array_size sector-based and rename it to array_sectors. md: Make mddev->array_size sector-based. md: Make super_type->rdev_size_change() take sector-based sizes. md: Fix check for overlapping devices. md: Tidy up rdev_size_store a bit: md: Remove some unused macros. md: Turn rdev->sb_offset into a sector-based quantity. md: Make calc_dev_sboffset() return a sector count. md: Replace calc_dev_size() by calc_num_sectors(). md: Make update_size() take the number of sectors. md: Better control of when do_md_stop is allowed to stop the array. md: get_disk_info(): Don't convert between signed and unsigned and back. md: Simplify restart_array(). md: alloc_disk_sb(): Return proper error value. md: Simplify sb_equal(). md: Simplify uuid_equal(). md: sb_equal(): Fix misleading printk. md: Fix a typo in the comment to cmd_match(). ... commit 519f0141f1c42e2b8b59c7dea005cbf6095358e8 Merge: f8b71a3... 908cf4b... Author: Linus Torvalds Date: Mon Jul 21 10:27:31 2008 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (48 commits) Input: add switch for dock events Input: add microphone insert switch definition Input: i8042 - add Arima-Rioworks HDAMB board to noloop list Input: sgi_btns - add support for SGI Indy volume buttons Input: add option to disable HP SDC driver Input: serio - trivial documentation fix Input: add new serio driver for Xilinx XPS PS2 IP Input: add driver for Tabletkiosk Sahara TouchIT-213 touchscreen Input: new driver for SGI O2 volume buttons Input: yealink - reliably kill urbs Input: q40kbd - make q40kbd_lock static Input: gtco - eliminate early return Input: i8042 - add Dritek quirk for Acer Aspire 5720 Input: usbtouchscreen - ignore eGalax screens supporting HID protocol Input: i8042 - add Medion NAM 2070 to noloop blacklist Input: i8042 - add Gericom Bellagio to nomux blacklist Input: i8042 - add Acer Aspire 1360 to nomux blacklist Input: hp_sdc_mlc.c - make a struct static Input: hil_mlc.c - make code static Input: wistron - generate normal key event if bluetooth or wifi not present ... commit 5547cd0ae8b46db9a084505239294eed9b8c8e2d Author: Patrick McHardy Date: Mon Jul 21 10:03:49 2008 -0700 netfilter: nf_conntrack_sctp: fix sparse warnings Introduced by a258860e (netfilter: ctnetlink: add full support for SCTP to ctnetlink): net/netfilter/nf_conntrack_proto_sctp.c:483:2: warning: cast from restricted type net/netfilter/nf_conntrack_proto_sctp.c:483:2: warning: incorrect type in argument 1 (different base types) net/netfilter/nf_conntrack_proto_sctp.c:483:2: expected unsigned int [unsigned] [usertype] x net/netfilter/nf_conntrack_proto_sctp.c:483:2: got restricted unsigned int const net/netfilter/nf_conntrack_proto_sctp.c:483:2: warning: cast from restricted type net/netfilter/nf_conntrack_proto_sctp.c:483:2: warning: cast from restricted type net/netfilter/nf_conntrack_proto_sctp.c:483:2: warning: cast from restricted type net/netfilter/nf_conntrack_proto_sctp.c:483:2: warning: cast from restricted type net/netfilter/nf_conntrack_proto_sctp.c:487:2: warning: cast from restricted type net/netfilter/nf_conntrack_proto_sctp.c:487:2: warning: incorrect type in argument 1 (different base types) net/netfilter/nf_conntrack_proto_sctp.c:487:2: expected unsigned int [unsigned] [usertype] x net/netfilter/nf_conntrack_proto_sctp.c:487:2: got restricted unsigned int const net/netfilter/nf_conntrack_proto_sctp.c:487:2: warning: cast from restricted type net/netfilter/nf_conntrack_proto_sctp.c:487:2: warning: cast from restricted type net/netfilter/nf_conntrack_proto_sctp.c:487:2: warning: cast from restricted type net/netfilter/nf_conntrack_proto_sctp.c:487:2: warning: cast from restricted type net/netfilter/nf_conntrack_proto_sctp.c:532:42: warning: incorrect type in assignment (different base types) net/netfilter/nf_conntrack_proto_sctp.c:532:42: expected restricted unsigned int net/netfilter/nf_conntrack_proto_sctp.c:532:42: got unsigned int net/netfilter/nf_conntrack_proto_sctp.c:534:39: warning: incorrect type in assignment (different base types) net/netfilter/nf_conntrack_proto_sctp.c:534:39: expected restricted unsigned int net/netfilter/nf_conntrack_proto_sctp.c:534:39: got unsigned int Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit c71529e42ce39c167dc53430cb8f3d5634af77df Author: Herbert Xu Date: Mon Jul 21 10:03:23 2008 -0700 netfilter: nf_nat_sip: c= is optional for session According to RFC2327, the connection information is optional in the session description since it can be specified in the media description instead. My provider does exactly that and does not provide any connection information in the session description. As a result the new kernel drops all invite responses. This patch makes it optional as documented. Signed-off-by: Herbert Xu Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit db1a75bdcc1766dc7e1fae9201ae287dcbcb6c66 Author: Jan Engelhardt Date: Mon Jul 21 10:02:59 2008 -0700 netfilter: xt_TCPMSS: collapse tcpmss_reverse_mtu{4,6} into one function Signed-off-by: Jan Engelhardt Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 72961ecf84d67d6359a1b30f9b2a8427f13e1e71 Author: Eric Leblond Date: Mon Jul 21 10:02:35 2008 -0700 netfilter: nfnetlink_log: send complete hardware header This patch adds some fields to NFLOG to be able to send the complete hardware header with all necessary informations. It sends to userspace: * the type of hardware link * the lenght of hardware header * the hardware header Signed-off-by: Eric Leblond Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 280763c053fee297d95b474f2c145990670371e6 Author: David Howells Date: Mon Jul 21 10:02:12 2008 -0700 netfilter: xt_time: fix time's time_mt()'s use of do_div() Fix netfilter xt_time's time_mt()'s use of do_div() on an s64 by using div_s64() instead. This was introduced by patch ee4411a1b1e0b679c99686629b5eab5a072ce49f ("[NETFILTER]: x_tables: add xt_time match"). Signed-off-by: David Howells Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 584015727a3b88b46602b20077b46cd04f8b4ab3 Author: Krzysztof Piotr Oledzki Date: Mon Jul 21 10:01:34 2008 -0700 netfilter: accounting rework: ct_extend + 64bit counters (v4) Initially netfilter has had 64bit counters for conntrack-based accounting, but it was changed in 2.6.14 to save memory. Unfortunately in-kernel 64bit counters are still required, for example for "connbytes" extension. However, 64bit counters waste a lot of memory and it was not possible to enable/disable it runtime. This patch: - reimplements accounting with respect to the extension infrastructure, - makes one global version of seq_print_acct() instead of two seq_print_counters(), - makes it possible to enable it at boot time (for CONFIG_SYSCTL/CONFIG_SYSFS=n), - makes it possible to enable/disable it at runtime by sysctl or sysfs, - extends counters from 32bit to 64bit, - renames ip_conntrack_counter -> nf_conn_counter, - enables accounting code unconditionally (no longer depends on CONFIG_NF_CT_ACCT), - set initial accounting enable state based on CONFIG_NF_CT_ACCT - removes buggy IPCT_COUNTER_FILLING event handling. If accounting is enabled newly created connections get additional acct extend. Old connections are not changed as it is not possible to add a ct_extend area to confirmed conntrack. Accounting is performed for all connections with acct extend regardless of a current state of "net.netfilter.nf_conntrack_acct". Signed-off-by: Krzysztof Piotr Oledzki Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 07a7c1070ed382ad4562e3a0d453fd2001d92f7b Author: Krzysztof Piotr Oledzki Date: Mon Jul 21 10:01:14 2008 -0700 netlink: add NLA_PUT_BE64 macro Add NLA_PUT_BE64 macro required for 64bit counters in netfilter Signed-off-by: Krzysztof Piotr Oledzki Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 0dbff689c2f299e8f63911247925f2728d087688 Author: Changli Gao Date: Mon Jul 21 10:00:51 2008 -0700 netfilter: nf_nat_core: eliminate useless find_appropriate_src for IP_NAT_RANGE_PROTO_RANDOM Signed-off-by: Changli Gao Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit ae6134bdf3197206fba95563d755d2fa50d90ddd Author: Micah Dowty Date: Mon Jul 21 09:59:09 2008 -0700 hdlcdrv: Fix CRC calculation. This is a trivial patch against the hdlcdrv module that fixes its CRC calculation. The finished CRC was overwriting the first two bytes of each packet rather than being appended to the end. I've tested this with 2.6.8 and 2.6.10-rc1, but hdlcdrv hasn't changed much recently so it should work with many other kernel versions. Signed-off-by: Micah Dowty Acked-by: Thomas Sailer Signed-off-by: David S. Miller commit d3678b463df73f5060d7420915080e19baeb379b Author: David S. Miller Date: Mon Jul 21 09:56:13 2008 -0700 Revert "pkt_sched: Make default qdisc nonshared-multiqueue safe." This reverts commit a0c80b80e0fb48129e4e9d6a9ede914f9ff1850d. After discussions with Jamal and Herbert on netdev, we should provide at least minimal prioritization at the qdisc level even in multiqueue situations. Signed-off-by: David S. Miller commit 867d79fb9a4d5929ad8335c896fcfe11c3b2ef14 Author: Linus Torvalds Date: Mon Jul 21 09:54:18 2008 -0700 net: In __netif_schedule() use WARN_ON instead of BUG_ON Signed-off-by: David S. Miller commit b6b2fed1f4802b8fcc9d7548a8f785225d38f9a3 Author: David S. Miller Date: Mon Jul 21 09:48:06 2008 -0700 net: Improve simple_tx_hash(). Based upon feedback from Eric Dumazet and Andi Kleen. Cure several deficiencies in simple_tx_hash() by using jhash + reciprocol multiply. 1) Eliminates expensive modulus operation. 2) Makes hash less attackable by using random seed. 3) Eliminates endianness hash distribution issues. Signed-off-by: David S. Miller commit f8b71a3a92d69cb1c9c2162f9235d3dd550e4aa0 Merge: 42a77a1... e4f2506... Author: Linus Torvalds Date: Mon Jul 21 09:40:26 2008 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6: (44 commits) sparc: Remove Sparc's asm-offsets for sclow.S sparc64: Update defconfig. sparc64: Add Niagara2 RNG driver. sparc64: Add missing hypervisor service group numbers. sparc64: Remove 4MB and 512K base page size options. sparc64: Convert to generic helpers for IPI function calls. sparc: Use new '%pS' infrastructure to print symbols. sparc32: fix init.c allnoconfig build error sparc64: Config category "Processor type and features" absent sparc: arch/sparc/kernel/apc.c to unlocked_ioctl sparc: join the remaining header files sparc: merge header files with trivial differences sparc: when header files are equal use asm-sparc version sparc: copy sparc64 specific files to asm-sparc sparc: Merge asm-sparc{,64}/asi.h sparc: export openprom.h to userspace sparc: Merge asm-sparc{,64}/types.h sparc: Merge asm-sparc{,64}/termios.h sparc: Merge asm-sparc{,64}/termbits.h sparc: Merge asm-sparc{,64}/setup.h ... commit 42a77a1b8fe4fd78cf8d8fccbaac918bbe888192 Author: Wang Chen Date: Mon Jul 21 17:48:59 2008 +0800 Fix istallion build failure Commits b02f5ad6a3ff5a1ee2a7b8ec6eee338de553b060 ("istallion: use tty_port") and a352def21a642133758b868c71bee12ab34ad5c5 ("tty: Ldisc revamp") broke the istallion driver. Fix the compile error and silence a warning. Signed-off-by: Wang Chen Signed-off-by: Linus Torvalds commit c3ee84163e5bc0dc2e1ccf1d3fc412debca73bab Author: Daniel Lezcano Date: Mon Jul 21 09:18:07 2008 -0700 pkt_sched: Remove unused variable skb in dev_deactivate_queue function. Removed unused variable 'skb' in the dev_deactivate_queue function Signed-off-by: Daniel Lezcano Signed-off-by: David S. Miller commit fd24c4af6e82231391fa09875ae6378fa1399f0f Author: David S. Miller Date: Mon Jul 21 08:34:49 2008 -0700 sunhme: Remove stop/wake TX queue calls in set-multicast-list handler. Based upon a bug report by Alexander Beregalov and commentary from Ben Hutchings. These are totally unnecessary, in particular because this driver's ->hard_start_xmit() handler takes the same driver spinlock that the set-multicast-list handler uses. Signed-off-by: David S. Miller commit ebbdbd7c02f4f8dea84e2956aa942bd18e1ddf93 Author: Anton Vorontsov Date: Mon Jul 21 08:30:36 2008 -0700 ucc_geth: do not touch net queue in adjust_link phylib callback If the net queue has not been started, we'll get this nice oops and non-working ethernet: ------------[ cut here ]------------ Kernel BUG at c01f4648 [verbose debug info unavailable] Oops: Exception in kernel mode, sig: 5 [#1] MPC836x RDK Modules linked in: NIP: c01f4648 LR: c01c0a10 CTR: c01c08e4 REGS: cf839e40 TRAP: 0700 Not tainted (2.6.26-05254-gc7b9969) MSR: 00021032 CR: 22042044 XER: 00000000 TASK = cf828c30[4] 'events/0' THREAD: cf838000 GPR00: c01c0a10 cf839ef0 cf828c30 c035ceb0 cf8469a0 00000064 00000000 00000000 GPR08: c035ceb0 00000001 00000001 cf99c280 22044044 7ca81020 0fffc000 00000000 GPR16: 0fff2544 0fff63c0 00000000 0fff78e0 0ffa5580 00000004 00000000 00000000 GPR24: 02082000 cf9d0000 d1068000 00009032 cf846800 cf846b80 00000001 00000014 NIP [c01f4648] __netif_schedule+0x28/0x8c LR [c01c0a10] adjust_link+0x12c/0x1e4 Call Trace: [cf839ef0] [c0380f50] 0xc0380f50 (unreliable) [cf839f10] [c01c0a10] adjust_link+0x12c/0x1e4 [cf839f40] [c01c2628] phy_state_machine+0x2e0/0x448 [cf839f60] [c00425e8] run_workqueue+0xc8/0x168 [cf839f90] [c0042c6c] worker_thread+0x70/0xd0 [cf839fd0] [c0046954] kthread+0x48/0x84 [cf839ff0] [c0012488] kernel_thread+0x44/0x60 Instruction dump: 7c0803a6 4e800020 3d20c036 9421ffe0 7c0802a6 7c681b78 3929ceb0 7c694a78 7d290034 90010024 bfa10014 5529d97e <0f090000> 39600002 38030024 7d200028 ---[ end trace a57d367843bd2904 ]--- Since the driver is using phylib (which is doing netif_carrier_on/off()), we should simply remove netif_tx_schedule_all() from adjust_link(). Signed-off-by: Anton Vorontsov Signed-off-by: David S. Miller commit afc079465e991ffb7fe197d1ad80eb8140e2c341 Author: Anton Vorontsov Date: Mon Jul 21 08:29:54 2008 -0700 gianfar: do not touch net queue in adjust_link phylib callback If the net queue has not been started, we'll get this nice oops and non-working ethernet: PHY: 0:01 - Link is Up - 1000/Full ------------[ cut here ]------------ kernel BUG at net/core/dev.c:1328! Oops: Exception in kernel mode, sig: 5 [#1] MPC837x RDB Modules linked in: NIP: c02544a0 LR: c01a17d0 CTR: c01a16ac REGS: cf837e40 TRAP: 0700 Not tainted (2.6.26-05253-g14b395e) MSR: 00021032 CR: 22042044 XER: 00000000 TASK = cf819400[5] 'events/0' THREAD: cf836000 GPR00: c01a17d0 cf837ef0 cf819400 c03d8d08 cf8469a0 00000064 00000000 00000000 GPR08: c03d8d08 00000001 00000001 cf899ba0 22044044 00000000 0fffd000 00000000 GPR16: 0fff3028 0fff6cf0 00000000 0fff8390 0ff494a0 00000004 00000000 00000000 GPR24: c0361a00 00001058 cf9f6600 00009032 cf846800 cf846b80 00000001 00000014 NIP [c02544a0] __netif_schedule+0x28/0x8c LR [c01a17d0] adjust_link+0x124/0x1cc Call Trace: [cf837ef0] [c03fb3a0] 0xc03fb3a0 (unreliable) [cf837f10] [c01a17d0] adjust_link+0x124/0x1cc [cf837f40] [c01a8e28] phy_state_machine+0x2e0/0x448 [cf837f60] [c0040254] run_workqueue+0xc8/0x168 [cf837f90] [c00408d8] worker_thread+0x70/0xd0 [cf837fd0] [c0044630] kthread+0x48/0x84 [cf837ff0] [c0012610] kernel_thread+0x44/0x60 Instruction dump: 7c0803a6 4e800020 3d20c03e 9421ffe0 7c0802a6 7c681b78 39298d08 7c694a78 7d290034 90010024 bfa10014 5529d97e <0f090000> 39600002 38030024 7d200028 ---[ end trace 13dfd73ee42d0c30 ]--- Since the driver is using phylib (which is doing netif_carrier_on/off()), we should simply remove netif_tx_schedule_all() from adjust_link(). Signed-off-by: Anton Vorontsov Signed-off-by: David S. Miller commit 39d48157ac1a0ff3ec81212e5451bfd1bf5f50db Author: David S. Miller Date: Mon Jul 21 08:28:37 2008 -0700 atl1: Do not wake queue before queue has been started. Based upon a bug report by Alexey Dobriyan, the patch is also tested by him and confirmed to fix the problem. Packet flow during link state events should not be done by waking and stopping the TX queue anyways, that is handled transparently by netif_carrier_{on,off}(). So, remove the netif_{wake,stop}_queue() calls in the link check code, and add the necessary netif_start_queue() call to atl1_up(). Signed-off-by: David S. Miller commit 2e2dcc7631e331cf2e8396ce452e7f01e35f1182 Merge: acee709... 1c29dd9... Author: Ingo Molnar Date: Mon Jul 21 16:45:56 2008 +0200 Merge branch 'x86/paravirt-spinlocks' into x86/for-linus commit acee709cab689ec7703770e8b8cb5cc3a4abcb31 Merge: 33a37eb... 5ff4789... 35b6805... c4dc59a... 7edf889... 9781f39... 48fe4a7... be54f9d... 77e4424... caadbdc... 5e5a29b... e3a61b0... fec0962... fab3b58... f2ba939... 48ae744... 3cabf37... 7019cc2... 2ddf9b7... e66d90f... Author: Ingo Molnar Date: Mon Jul 21 16:37:17 2008 +0200 Merge branches 'x86/urgent', 'x86/amd-iommu', 'x86/apic', 'x86/cleanups', 'x86/core', 'x86/cpu', 'x86/fixmap', 'x86/gart', 'x86/kprobes', 'x86/memtest', 'x86/modules', 'x86/nmi', 'x86/pat', 'x86/reboot', 'x86/setup', 'x86/step', 'x86/unify-pci', 'x86/uv', 'x86/xen' and 'xen-64bit' into x86/for-linus commit e66d90fb4abd0a27ee96f57a32fb561221c4d6ae Merge: 55ca089... 14b395e... Author: Ingo Molnar Date: Mon Jul 21 15:06:09 2008 +0200 Merge branch 'linus' into xen-64bit commit 1c29dd9a9e2f83ffb02e50bb3619c3b9db8fd526 Merge: 3217256... 14b395e... Author: Ingo Molnar Date: Mon Jul 21 15:05:58 2008 +0200 Merge branch 'linus' into x86/paravirt-spinlocks commit 7edf8891ad7aef5f4e97991fed6fb0e605e96ea0 Author: Yinghai Lu Date: Mon Jul 21 01:39:03 2008 -0700 x86: remove extra calling to get ext cpuid level Signed-off-by: Yinghai Lu Signed-off-by: Ingo Molnar commit 9175fc06aee79c349790672178d3fd7507d75c86 Author: Yinghai Lu Date: Mon Jul 21 01:38:14 2008 -0700 x86: use setup_clear_cpu_cap() when disabling the lapic ... so don't need to call clear_cpu_cap again in early_identify_cpu, and could use cleared_cpu_caps like other places. Signed-off-by: Yinghai Lu Signed-off-by: Ingo Molnar commit d41e26b901111f4e540aa2c27ec7a1681c782be9 Author: Milan Broz Date: Mon Jul 21 12:00:40 2008 +0100 dm crypt: add merge This patch implements biovec merge function for crypt target. If the underlying device has merge function defined, call it. If not, keep precomputed value. Signed-off-by: Milan Broz Signed-off-by: Alasdair G Kergon commit 9980c638a666ecd88acaf0a7ab91043d4a3f44d1 Author: Milan Broz Date: Mon Jul 21 12:00:39 2008 +0100 dm table: remove merge_bvec sector restriction Remove max_sector restriction - merge function replaced it. Signed-off-by: Milan Broz Signed-off-by: Alasdair G Kergon commit 7bc3447b692185c5ea78bee93d0ef1dee2fd7ce7 Author: Milan Broz Date: Mon Jul 21 12:00:38 2008 +0100 dm: linear add merge This patch implements biovec merge function for linear target. If the underlying device has merge function defined, call it. If not, keep precomputed value. Signed-off-by: Milan Broz Signed-off-by: Alasdair G Kergon commit f6fccb1213ba3d661baeb2a5eee0a9701dc03e1b Author: Milan Broz Date: Mon Jul 21 12:00:37 2008 +0100 dm: introduce merge_bvec_fn Introduce a bvec merge function for device mapper devices for dynamic size restrictions. This code ensures the requested biovec lies within a single target and then calls a target-specific function to check against any constraints imposed by underlying devices. Signed-off-by: Milan Broz Signed-off-by: Alasdair G Kergon commit 92e868122edf08b9fc06b112e7e0c80ab94c1f93 Author: Mikulas Patocka Date: Mon Jul 21 12:00:35 2008 +0100 dm snapshot: use per device mempools Change snapshot per-module mempool to per-device mempool. Per-module mempools could cause a deadlock if multiple snapshot devices are stacked above each other. Signed-off-by: Mikulas Patocka Signed-off-by: Alasdair G Kergon commit a8d41b59f3f5a7ac19452ef442a7fc1b5fa17366 Author: Mikulas Patocka Date: Mon Jul 21 12:00:34 2008 +0100 dm snapshot: fix race during exception creation Fix a race condition that returns incorrect data when a write causes an exception to be allocated whilst a read is still in flight. The race condition happens as follows: * A read to non-reallocated sector in the snapshot is submitted so that the read is routed to the original device. * A write to the original device is submitted. The write causes an exception that reallocates the block. The write proceeds. * The original read is dequeued and reads the wrong data. This race can be triggered with CFQ scheduler and one thread writing and multiple threads reading simultaneously. (This patch relies upon the earlier dm-kcopyd-per-device.patch to avoid a deadlock.) Signed-off-by: Mikulas Patocka Signed-off-by: Alasdair G Kergon commit cd45daffd1f7b53aac0835b23e97f814ec3f10dc Author: Mikulas Patocka Date: Mon Jul 21 12:00:32 2008 +0100 dm snapshot: track snapshot reads Whenever a snapshot read gets mapped through to the origin, track it in a per-snapshot hash table indexed by chunk number, using memory allocated from a new per-snapshot mempool. We need to track these reads to avoid race conditions which will be fixed by patches that follow. Signed-off-by: Mikulas Patocka Signed-off-by: Alasdair G Kergon commit def052d21c4e77975bb75cf212f018ec913f8e2f Author: Alasdair G Kergon Date: Mon Jul 21 12:00:31 2008 +0100 dm mpath: fix test for reinstate_path Fix test for reinstate_path method before attempting to use it. Signed-off-by: Alasdair G Kergon Cc: Julia Lawall commit 148acff615b403168cdf39e55bfcfaa6e4a7d233 Author: Mikulas Patocka Date: Mon Jul 21 12:00:30 2008 +0100 dm mpath: return parameter error Return a specific error message if there are an invalid number of multipath arguments. This invalid command returns an "Unknown error" because the ti->error field is not set dmsetup create --table '0 2 multipath 0 0 1 1 round-robin 0 1 1 /dev/sdh' mpath0 Signed-off-by: Mikulas Patocka Signed-off-by: Alasdair G Kergon commit 6ae2fa6718c398290be29ef740873640d25058b6 Author: Richard Kennedy Date: Mon Jul 21 12:00:28 2008 +0100 dm io: remove struct padding Rearrange struct dm_io. Shrinks size from 40 -> 32 allowing more objects/slab. Signed-off-by: Richard Kennedy Signed-off-by: Alasdair G Kergon commit c8da2f8dd86d70559ec4e50251f6a755b42bd5b4 Author: Adrian Bunk Date: Mon Jul 21 12:00:27 2008 +0100 dm log: make dm_dirty_log init and exit static dm_dirty_log_{init,exit}() can now become static. Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Alasdair G Kergon commit 371b2e348b7731a548b0a7432ca2ba32e90dd16f Author: Mikulas Patocka Date: Mon Jul 21 12:00:24 2008 +0100 dm mpath: free path selector on invalid args Free path selector if the arguments are invalid. This command (note that it is invalid) causes reference leak on module "dm_round_robin" and prevents the module from being removed. dmsetup create --table '0 2 multipath 0 0 1 1 round-robin /dev/sdh' mpath0 Signed-off-by: Mikulas Patocka Signed-off-by: Alasdair G Kergon commit 33a37eb411d193851c334060780ab834ba534292 Author: Ingo Molnar Date: Mon Jul 21 10:57:15 2008 +0200 KVM: fix exception entry / build bug, on 64-bit -tip testing found this build bug: arch/x86/kvm/built-in.o:(.text.fixup+0x1): relocation truncated to fit: R_X86_64_32 against `.text' arch/x86/kvm/built-in.o:(.text.fixup+0xb): relocation truncated to fit: R_X86_64_32 against `.text' arch/x86/kvm/built-in.o:(.text.fixup+0x15): relocation truncated to fit: R_X86_64_32 against `.text' arch/x86/kvm/built-in.o:(.text.fixup+0x1f): relocation truncated to fit: R_X86_64_32 against `.text' arch/x86/kvm/built-in.o:(.text.fixup+0x29): relocation truncated to fit: R_X86_64_32 against `.text' Introduced by commit 4ecac3fd. The problem is that 'push' will default to 32-bit, which is not wide enough as a fixup address. (and which would crash on any real fixup event even if it was wide enough) Introduce KVM_EX_PUSH to get the proper address push width on 64-bit too. Signed-off-by: Ingo Molnar commit e27772b48df91a954a74b1411b57d83b945a58c7 Merge: d092633... 14b395e... Author: Ingo Molnar Date: Mon Jul 21 11:02:45 2008 +0200 Merge branch 'linus' into x86/urgent commit 4b80991c6cb9efa607bc4fd6f3ecdf5511c31bb0 Author: NeilBrown Date: Mon Jul 21 17:05:25 2008 +1000 md: Protect access to mddev->disks list using RCU All modifications and most access to the mddev->disks list are made under the reconfig_mutex lock. However there are three places where the list is walked without any locking. If a reconfig happens at this time, havoc (and oops) can ensue. So use RCU to protect these accesses: - wrap them in rcu_read_{,un}lock() - use list_for_each_entry_rcu - add to the list with list_add_rcu - delete from the list with list_del_rcu - delay the 'free' with call_rcu rather than schedule_work Note that export_rdev did a list_del_init on this list. In almost all cases the entry was not in the list anymore so it was a no-op and so safe. It is no longer safe as after list_del_rcu we may not touch the list_head. An audit shows that export_rdev is called: - after unbind_rdev_from_array, in which case the delete has already been done, - after bind_rdev_to_array fails, in which case the delete isn't needed. - before the device has been put on a list at all (e.g. in add_new_disk where reading the superblock fails). - and in autorun devices after a failure when the device is on a different list. So remove the list_del_init call from export_rdev, and add it back immediately before the called to export_rdev for that last case. Note also that ->same_set is sometimes used for lists other than mddev->list (e.g. candidates). In these cases rcu is not needed. Signed-off-by: NeilBrown commit f2ea68cf42aafdd93393b6b8b20fc3c2b5f4390c Author: NeilBrown Date: Mon Jul 21 17:05:25 2008 +1000 md: only count actual openers as access which prevent a 'stop' Open isn't the only thing that increments ->active. e.g. reading /proc/mdstat will increment it briefly. So to avoid false positives in testing for concurrent access, introduce a new counter that counts just the number of times the md device it open. Signed-off-by: NeilBrown commit d6e2215052810678bc9782fd980b52706fc71f50 Author: Andre Noll Date: Mon Jul 21 17:05:25 2008 +1000 md: linear: Make array_size sector-based and rename it to array_sectors. Signed-off-by: Andre Noll Signed-off-by: NeilBrown commit f233ea5c9e0d8b95e4283bf6a3436b88f6fd3586 Author: Andre Noll Date: Mon Jul 21 17:05:22 2008 +1000 md: Make mddev->array_size sector-based. This patch renames the array_size field of struct mddev_s to array_sectors and converts all instances to use units of 512 byte sectors instead of 1k blocks. Signed-off-by: Andre Noll Signed-off-by: NeilBrown commit 908cf4b925e419bc74f3297b2f0e51d6f8a81da2 Merge: 92c4989... 14b395e... Author: Dmitry Torokhov Date: Mon Jul 21 00:55:14 2008 -0400 Merge master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 into next commit 15f4a5fdf3aa07b53f6a7969664741db5882e485 Author: Andre Noll Date: Mon Jul 21 14:42:12 2008 +1000 md: Make super_type->rdev_size_change() take sector-based sizes. Also, change the type of the size parameter from unsigned long long to sector_t and rename it to num_sectors. Signed-off-by: Andre Noll Signed-off-by: NeilBrown commit d07bd3bcc456228b56a790897162a634691fed9b Author: Andre Noll Date: Mon Jul 21 14:42:07 2008 +1000 md: Fix check for overlapping devices. The checks in overlaps() expect all parameters either in block-based or sector-based quantities. However, its single caller passes two rdev->data_offset arguments as well as two rdev->size arguments, the former being sector counts while the latter are measured in 1K blocks. This could cause rdev_size_store() to accept an invalid size from user space. Fix it by passing only sector-based quantities to overlaps(). Signed-off-by: Andre Noll Signed-off-by: NeilBrown commit d7027458d68b2f1752a28016dcf2ffd0a7e8f567 Author: Neil Brown Date: Sat Jul 12 10:37:50 2008 +1000 md: Tidy up rdev_size_store a bit: - used strict_strtoull in place of simple_strtoull - use my_mddev in place of rdev->mddev (they have the same value) and more significantly, - don't adjust mddev->size to fit, rather reject changes which make rdev->size smaller than mddev->size Adjusting mddev->size is a hangover from bind_rdev_to_array which does a similar thing. But it really is a better design to insist that mddev->size is set as required, then the rdev->sizes are set to allow for that. The previous way invites confusion. Signed-off-by: NeilBrown commit 14b395e35d1afdd8019d11b92e28041fad591b71 Merge: 734b397... 5108b27... Author: Linus Torvalds Date: Sun Jul 20 21:21:46 2008 -0700 Merge branch 'for-2.6.27' of git://linux-nfs.org/~bfields/linux * 'for-2.6.27' of git://linux-nfs.org/~bfields/linux: (51 commits) nfsd: nfs4xdr.c do-while is not a compound statement nfsd: Use C99 initializers in fs/nfsd/nfs4xdr.c lockd: Pass "struct sockaddr *" to new failover-by-IP function lockd: get host reference in nlmsvc_create_block() instead of callers lockd: minor svclock.c style fixes lockd: eliminate duplicate nlmsvc_lookup_host call from nlmsvc_lock lockd: eliminate duplicate nlmsvc_lookup_host call from nlmsvc_testlock lockd: nlm_release_host() checks for NULL, caller needn't file lock: reorder struct file_lock to save space on 64 bit builds nfsd: take file and mnt write in nfs4_upgrade_open nfsd: document open share bit tracking nfsd: tabulate nfs4 xdr encoding functions nfsd: dprint operation names svcrdma: Change WR context get/put to use the kmem cache svcrdma: Create a kmem cache for the WR contexts svcrdma: Add flush_scheduled_work to module exit function svcrdma: Limit ORD based on client's advertised IRD svcrdma: Remove unused wait q from svcrdma_xprt structure svcrdma: Remove unneeded spin locks from __svc_rdma_free svcrdma: Add dma map count and WARN_ON ... commit 734b397cd14f3340394a8dd3266bec97d01f034b Merge: 702beb8... e6b5163... Author: Linus Torvalds Date: Sun Jul 20 21:19:17 2008 -0700 Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 * 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: gpu: re-order GPU subdirectory vs char for AGP vs DRM startup. commit 702beb87d6b4e08cca394b210679e5d7c2ac9383 Author: David Miller Date: Sun Jul 20 18:17:02 2008 -0700 ipv6: Fix warning in addrconf code. Reported by Linus. Signed-off-by: David S. Miller Signed-off-by: Linus Torvalds commit d1671a9c15f55a1475d41269494518e348880c33 Merge: ae0645a... 3a682fb... Author: Linus Torvalds Date: Sun Jul 20 21:17:20 2008 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: pkt_sched: Fix build with NET_SCHED disabled. commit ae0645a451b02ad35c520b01177b70ebd59c91ab Merge: f894d18... 99cdb0c... Author: Linus Torvalds Date: Sun Jul 20 21:16:27 2008 -0700 Merge branch 'for-linus' of git://git.o-hand.com/linux-mfd * 'for-linus' of git://git.o-hand.com/linux-mfd: mfd: let asic3 use mem resource instead of bus_shift mfd: remove DS1WM register definitions from asic3.h mfd: add ASIC3_CONFIG_GPIO templates mfd: fix the asic3 irq demux code mfd: asic3 should depend on gpiolib mfd: fix asic3 config array initialisation mfd: move asic3 probe functions into __init section mfd: Use uppercase only for asic3 macros and defines mfd: use dev_* macros for asic3 debugging mfd: New asic3 gpio configuration code mfd: asic3 children platform data removal mfd: asic3 gpiolib support commit f894d18380e7e7ff05f6622ccb75d2881922c6e9 Merge: d13ff05... d20b274... Author: Linus Torvalds Date: Sun Jul 20 21:14:42 2008 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb * git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb: (277 commits) V4L/DVB (8415): gspca: Infinite loop in i2c_w() of etoms. V4L/DVB (8414): videodev/cx18: fix get_index bug and error-handling lock-ups V4L/DVB (8411): videobuf-dma-contig.c: fix 64-bit build for pre-2.6.24 kernels V4L/DVB (8410): sh_mobile_ceu_camera: fix 64-bit compiler warnings V4L/DVB (8397): video: convert select VIDEO_ZORAN_ZR36060 into depends on V4L/DVB (8396): video: Fix Kbuild dependency for VIDEO_IR_I2C V4L/DVB (8395): saa7134: Fix Kbuild dependency of ir-kbd-i2c V4L/DVB (8394): ir-common: CodingStyle fix: move EXPORT_SYMBOL_GPL to their proper places V4L/DVB (8393): media/video: Fix depencencies for VIDEOBUF V4L/DVB (8392): media/Kconfig: Convert V4L1_COMPAT select into "depends on" V4L/DVB (8390): videodev: add comment and remove magic number. V4L/DVB (8389): videodev: simplify get_index() V4L/DVB (8387): Some cosmetic changes V4L/DVB (8381): ov7670: fix compile warnings V4L/DVB (8380): saa7115: use saa7115_auto instead of saa711x as the autodetect driver name. V4L/DVB (8379): saa7127: Make device detection optional V4L/DVB (8378): cx18: move cx18_av_vbi_setup to av-core.c and rename to cx18_av_std_setup V4L/DVB (8377): ivtv/cx18: ensure the default control values are correct V4L/DVB (8376): cx25840: move cx25840_vbi_setup to core.c and rename to cx25840_std_setup V4L/DVB (8374): gspca: No conflict of 0c45:6011 with the sn9c102 driver. ... commit d13ff0559fea73f237a01669887d2c10e11d7662 Merge: f076ab8... cb7f39d... Author: Linus Torvalds Date: Sun Jul 20 21:14:00 2008 -0700 Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus * 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (21 commits) [MIPS] Remove unused maltasmp.h. [MIPS] Remove unused saa9730_uart.h. [MIPS] Rename MIPS sys_pipe syscall entry point to something MIPS-specific. [MIPS] 32-bit compat: Delete unused sys_truncate64 and sys_ftruncate64. [MIPS] TXx9: Fix some sparse warnings [MIPS] TXx9: Add 64-bit support [MIPS] TXx9: Cleanups for 64-bit support [MIPS] Cobalt: Fix I/O port resource range [MIPS] don't leak setup_early_printk() in userspace header [MIPS] Remove include/asm-mips/mips-boards/sead{,int}.h [MIPS] Remove asm-mips/mips-boards/atlas{,int}.h [MIPS] mips/sgi-ip22/ip28-berr.c: fix the build [MIPS] TXx9: Miscellaneous build fixes [MIPS] Routerboard 532: Support for base system [MIPS] IP32: Use common SGI button driver [MIPS] IP22: Use common SGI button driver [MIPS] IP22, IP28: Fix merge bug [MIPS] Tinker with constraints in to fix build error. [MIPS] Add missing prototypes to asm/page.h [MIPS] Fix missing prototypes in asm/fpu.h ... commit f076ab8d048f152b968bb1c6313fed88abb037fe Merge: db6d8c7... 597a5f5... Author: Linus Torvalds Date: Sun Jul 20 21:13:26 2008 -0700 Merge branch 'kvm-updates-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm * 'kvm-updates-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm: (70 commits) KVM: Adjust smp_call_function_mask() callers to new requirements KVM: MMU: Fix potential race setting upper shadow ptes on nonpae hosts KVM: x86 emulator: emulate clflush KVM: MMU: improve invalid shadow root page handling KVM: MMU: nuke shadowed pgtable pages and ptes on memslot destruction KVM: Prefix some x86 low level function with kvm_, to avoid namespace issues KVM: check injected pic irq within valid pic irqs KVM: x86 emulator: Fix HLT instruction KVM: Apply the kernel sigmask to vcpus blocked due to being uninitialized KVM: VMX: Add ept_sync_context in flush_tlb KVM: mmu_shrink: kvm_mmu_zap_page requires slots_lock to be held x86: KVM guest: make kvm_smp_prepare_boot_cpu() static KVM: SVM: fix suspend/resume support KVM: s390: rename private structures KVM: s390: Set guest storage limit and offset to sane values KVM: Fix memory leak on guest exit KVM: s390: dont allocate dirty bitmap KVM: move slots_lock acquision down to vapic_exit KVM: VMX: Fake emulate Intel perfctr MSRs KVM: VMX: Fix a wrong usage of vmcs_config ... commit 3a682fbd732d3d27bec722a923952b0938e8a404 Author: David S. Miller Date: Sun Jul 20 18:13:01 2008 -0700 pkt_sched: Fix build with NET_SCHED disabled. The stab bits can't be referenced uniless the full packet scheduler layer is enabled. Reported by Stephen Rothwell. Signed-off-by: David S. Miller commit db6d8c7a4027b48d797b369a53f8470aaeed7063 Merge: 3a53337... fb65a7c... Author: Linus Torvalds Date: Sun Jul 20 17:43:29 2008 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (1232 commits) iucv: Fix bad merging. net_sched: Add size table for qdiscs net_sched: Add accessor function for packet length for qdiscs net_sched: Add qdisc_enqueue wrapper highmem: Export totalhigh_pages. ipv6 mcast: Omit redundant address family checks in ip6_mc_source(). net: Use standard structures for generic socket address structures. ipv6 netns: Make several "global" sysctl variables namespace aware. netns: Use net_eq() to compare net-namespaces for optimization. ipv6: remove unused macros from net/ipv6.h ipv6: remove unused parameter from ip6_ra_control tcp: fix kernel panic with listening_get_next tcp: Remove redundant checks when setting eff_sacks tcp: options clean up tcp: Fix MD5 signatures for non-linear skbs sctp: Update sctp global memory limit allocations. sctp: remove unnecessary byteshifting, calculate directly in big-endian sctp: Allow only 1 listening socket with SO_REUSEADDR sctp: Do not leak memory on multiple listen() calls sctp: Support ipv6only AF_INET6 sockets. ... commit 3a533374283aea50eab3976d8a6d30532175f009 Merge: fb6624e... d17ffb4... Author: Linus Torvalds Date: Sun Jul 20 17:37:46 2008 -0700 Merge branch 'for-linus' of git://www.jni.nu/cris * 'for-linus' of git://www.jni.nu/cris: [CRISv10] Clean up compressed/misc.c [CRISv10] Correct whitespace damage. [CRIS] Correct definition of subdirs for install_headers. [CRIS] Correct image makefiles to allow using a separate OBJ-directory. [CRIS] Build fixes for compressed and rescue images for v10 and v32: It looks at least odd to apply spin_unlock to a mutex. cris: compile fixes for 2.6.26-rc5 commit fb6624ebd912e3d6907ca649