summaryrefslogtreecommitdiffstats
path: root/drivers/usb
Commit message (Collapse)AuthorAgeFilesLines
* USB: Serial: Add PID(0xF7C0) to FTDI SIO driver for a zeitcontrol-deviceArtur Zimmer2011-08-112-1/+6
| | | | | | | Here is a patch for a new PID (zeitcontrol-device mifare-reader FT232BL(like FT232BM but lead free)). Signed-off-by: Artur Zimmer <artur128@3dzimmer.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: Serial: Add device ID for Sierra Wireless MC8305Florian Echtler2011-08-111-0/+1
| | | | | | | A new device ID pair is added for Sierra Wireless MC8305. Signed-off-by: Florian Echtler <floe@butterbrot.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: Serial: Added device ID for Qualcomm Modem in Sagemcom's HiLo3GVijay Chavan2011-08-081-0/+1
| | | | | | | | A new device ID pair is added for Qualcomm Modem present in Sagemcom's HiLo3G module. Signed-off-by: Vijay Chavan <VijayChavan007@gmail.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb/host/pci-quirks.c: correct annotation of `ehci_dmi_nohandoff_table'Arnaud Lacombe2011-08-081-1/+1
| | | | | | | | | | | | | | ehci_bios_handoff() is marked __devinit, `ehci_dmi_nohandoff_table' should be marked __devinitconst, not __initconst. This fixes the following section mismatch: WARNING: vmlinux.o(.devinit.text+0x4f08): Section mismatch in reference from the function ehci_bios_handoff() to the variable .init.rodata:ehci_dmi_nohandoff_table The function __devinit ehci_bios_handoff() references a variable __initconst ehci_dmi_nohandoff_table. If ehci_dmi_nohandoff_table is only used by ehci_bios_handoff then annotate ehci_dmi_nohandoff_table with a matching annotation. Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Arnaud Lacombe <lacombar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: option driver: add PID for Vodafone-Huawei K4511Andrew Bird2011-08-081-0/+3
| | | | | | | | | | | | This patch adds the product ID of Huawei's Vodafone K4511 mobile broadband modem to option.c. This is necessary so that the driver gets loaded on demand without the intervention of usb_modeswitch. This has the benefit of it becoming available faster and also ensures that the option driver is not bound to a network interface that should be claimed by cdc_ether. Signed-off-by: Andrew Bird <ajb@spheresystems.co.uk> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: option driver: add PID for Vodafone-Huawei K4510Andrew Bird2011-08-081-0/+3
| | | | | | | | | | | | This patch adds the product ID of Huawei's Vodafone K4510 mobile broadband modem to option.c. This is necessary so that the driver gets loaded on demand without the intervention of usb_modeswitch. This has the benefit of it becoming available faster and also ensures that the option driver is not bound to a network interface that should be claimed by cdc_ether. Signed-off-by: Andrew Bird <ajb@spheresystems.co.uk> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: option driver: add PID for Vodafone-Huawei K3771Andrew Bird2011-08-081-0/+3
| | | | | | | | | | | | This patch adds the product ID of Huawei's Vodafone K3771 mobile broadband modem to option.c. This is necessary so that the driver gets loaded on demand without the intervention of usb_modeswitch. This has the benefit of it becoming available faster and also ensures that the option driver is not bound to a network interface that should be claimed by cdc_ether. Signed-off-by: Andrew Bird <ajb@spheresystems.co.uk> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: option driver: add PID for Vodafone-Huawei K3770Andrew Bird2011-08-081-0/+3
| | | | | | | | | | | | This patch adds the product ID of Huawei's Vodafone K3770 mobile broadband modem to option.c. This is necessary so that the driver gets loaded on demand without the intervention of usb_modeswitch. This has the benefit of it becoming available faster and also ensures that the option driver is not bound to a network interface that should be claimed by cdc_ether. Signed-off-by: Andrew Bird <ajb@spheresystems.co.uk> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb: serial: ftdi_sio.c: For the FT232H FTDI_SIO_SET_BAUDRATE_REQUEST, index ↵Uwe Bonnes2011-08-081-1/+4
| | | | | | | | | | | | | | | | | | | | | | needs to be shifted too the recent addition of the FT232H showed that baudrate was set wrong. See gmane.linux.usb.general: "[ftdi_sio] FT232H support". With the old code, the MSB of the 4 encoded fractional divider bits and more important the clock predivider bits got lost. Adding the FT232H to the code patch were these bits are shifted solves the problem. I verified baud rates with a scope now. I suspect, that the BM device probably needs these bits shifted too. But there is no predivider bit, so this is not obvious, and a missing MSB of the encoded fractional divider only shifts the resulting baudrate minimal. The AM has only 3 bits of encoded fractional divider, so it is not impacted. I have no BM device to test, so I only added a comment and left the code for the BM untouched. Signed-off-by: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb/isp1760: Added missing call to usb_hcd_check_unlink_urb() during unlinkArvid Brodin2011-08-081-0/+3
| | | | | Signed-off-by: Arvid Brodin <arvid.brodin@enea.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: EHCI: Fix test mode sequenceBoris Todorov2011-08-081-0/+12
| | | | | | | | | | The sequence to put port in test mode is not complete. According EHCI specification all enabled ports must be put in suspend. Signed-off-by: Boris Todorov <boris.st.todorov@gmail.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: ftdi_sio: fix minor typo in get_ftdi_divisorIonut Nicu2011-08-081-1/+1
| | | | | | | | | | Even if it's unlikely for this to cause an error, there is a typo in the code that uses the bitwise-AND operator instead of the logical one. Signed-off-by: Ionut Nicu <ionut.nicu@cloudbit.ro> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: at91_udc: include linux/prefetch.h explicitlyJean-Christophe PLAGNIOL-VILLARD2011-08-081-0/+1
| | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: Patrice Vilchez <patrice.vilchez@atmel.com> Cc: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: usb-storage: unusual_devs entry for ARM V2M motherboard.Nick Bowler2011-08-081-0/+10
| | | | | | | | | | | | | | | | | Connecting the V2M to a Linux host results in a constant stream of errors spammed to the console, all of the form sd 1:0:0:0: ioctl_internal_command return code = 8070000 : Sense Key : 0x4 [current] : ASC=0x0 ASCQ=0x0 The errors appear to be otherwise harmless. Add an unusual_devs entry which eliminates all of the error messages. Signed-off-by: Nick Bowler <nbowler@elliptictech.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb/ehci-mxc: add missing inclusion of mach/hardware.hShawn Guo2011-08-081-0/+1
| | | | | | | | | | | | | | | | | | | As cpu_is_mx stuff is being used in the driver, header mach/hardware.h should be explicitly included. The missing of the header is causing today's linux-next build error as bleow. CC drivers/usb/host/ehci-hcd.o In file included from linux-next/drivers/usb/host/ehci-hcd.c:1190:0: linux-next/drivers/usb/host/ehci-mxc.c: In function 'ehci_mxc_drv_probe': linux-next/drivers/usb/host/ehci-mxc.c:175:2: error: implicit declaration of function 'cpu_is_mx35' linux-next/drivers/usb/host/ehci-mxc.c:175:2: error: implicit declaration of function 'cpu_is_mx25' linux-next/drivers/usb/host/ehci-mxc.c:185:2: error: implicit declaration of function 'cpu_is_mx51' Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: assign instead of equal in usbtmc.cMaxim Nikulin2011-08-081-1/+1
| | | | | | | | Assign operator instead of equality test in the usbtmc_ioctl_abort_bulk_in() function. Signed-off-by: Maxim A. Nikulin <M.A.Nikulin@gmail.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb: renesas_usbhs: fixup usbhsg_for_each_uep 1st posKuninori Morimoto2011-08-081-1/+1
| | | | | | | | | | 1st pos of __usbhsg_for_each_uep() was wrong. Expected uep were ep1, ep2, ep3... but each uep were ep0, ep2, ep3 ... This patch modify it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb: renesas_usbhs: fix DMA build by including dma-mapping.hKuninori Morimoto2011-08-081-0/+1
| | | | | | | | | | | | | | | | | | | Include dma-mapping.h to fix build of the renesas_usbhs driver CC drivers/usb/renesas_usbhs/mod_gadget.o drivers/usb/renesas_usbhs/mod_gadget.c: In function 'usbhsg_dma_map': drivers/usb/renesas_usbhs/mod_gadget.c:190: error: implicit declaration of function 'dma_map_single' drivers/usb/renesas_usbhs/mod_gadget.c:192: error: implicit declaration of function 'dma_sync_single_for_device' drivers/usb/renesas_usbhs/mod_gadget.c:196: error: implicit declaration of function 'dma_mapping_error' drivers/usb/renesas_usbhs/mod_gadget.c: In function 'usbhsg_dma_unmap': drivers/usb/renesas_usbhs/mod_gadget.c:217: error: implicit declaration of function 'dma_unmap_single' drivers/usb/renesas_usbhs/mod_gadget.c:219: error: implicit declaration of function 'dma_sync_single_for_cpu' make[5]: *** [drivers/usb/renesas_usbhs/mod_gadget.o] Error 1 make[4]: *** [drivers/usb/renesas_usbhs] Error 2 Reported-by: Magnus Damm <damm@opensource.se> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb: gadget: net2272 - Correct includesGeert Uytterhoeven2011-08-081-1/+1
| | | | | | | | | | | | | | | | | | <linux/irq.h> states: * Please do not include this file in generic code. There is currently * no requirement for any architecture to implement anything held * within this file. prefetch() and prefetchw() need <linux/prefetch.h> on m68k: drivers/usb/gadget/net2272.c: In function ‘net2272_write_fifo’: drivers/usb/gadget/net2272.c:468: error: implicit declaration of function ‘prefetch’ drivers/usb/gadget/net2272.c: In function ‘net2272_read_fifo’: drivers/usb/gadget/net2272.c:574: error: implicit declaration of function ‘prefetchw’ Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Merge branch 'for-greg' of ↵Greg Kroah-Hartman2011-08-029-108/+35Star
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/balbi/usb into usb-linus * 'for-greg' of master.kernel.org:/pub/scm/linux/kernel/git/balbi/usb: usb: musb: fix oops on musb_gadget_pullup usb: host: ehci-omap: fix .remove and failure handling path of .probe(v1) usb: gadget: hid: don't STALL when processing a HID Descriptor request usb: musb: fix Kconfig usb: musb: tusb6010_omap: fix build failure: error: 'musb' undeclared usb: gadget: composite: fix bMaxPacketSize for SuperSpeed usb: gadget: fusb300: remove #if 0 block usb: gadget: s3c2410_udc: fix unterminated platform_device_id table
| * usb: musb: fix oops on musb_gadget_pullupJohn Stultz2011-08-011-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | an 'unhandled fault' is causes when a gadget driver calls usb_gadget_connect() while the USB cable isn't plugged into the OTG port. the fault is caused by an access to MUSB's memory space while its clock is turned off due to pm_runtime kicking in. in order to fix the fault, we enclose musb_gadget_pullup() with pm_runtime_get_sync() ... pm_runtime_put() calls to be sure we will always reach that path with clock turned on. [ balbi@ti.com : simplified commit log; removed few things which didn't belong there ] Cc: stable@kernel.org Reported-by: Zach Pfeffer <zach.pfeffer@linaro.org> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: host: ehci-omap: fix .remove and failure handling path of .probe(v1)Ming Lei2011-08-011-0/+16
| | | | | | | | | | | | | | | | | | | | | | Obviously, disabling & put regulator and iounmap(hcd->regs) are missed in .remove and failure handling path of .probe, so add them. Signed-off-by: Ming Lei <tom.leiming@gmail.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Tested-by: Keshava Munegowda <Keshava_mgowda@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: gadget: hid: don't STALL when processing a HID Descriptor requestSebastian Bauer2011-08-011-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | This is a patch to fix an issue with the HID gadget which, at the moment, returns STALL on a HID descriptor request. Essentially, the patch changes the hid gadget such that a request for the HID descriptor is handled by copying the descriptor into the response buffer, rather than falling through the default case, in which the request is answered by a STALL. Signed-off-by: Sebastian Bauer <mail@sebastianbauer.info> Acked-by: Peter Korsgaard <peter.korsgaard@barco.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: musb: fix KconfigRabin Vincent2011-08-012-4/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After 622859634 (usb: musb: drop a gigantic amount of ifdeferry): - USB_GADGET_MUSB_HDRC is no longer selectable because it depends on the removed USB_MUSB_PERIPHERAL and USB_MUSB_OTG options - The Kconfig comment still says "Enable Host or Gadget support to see Inventra options", even though you now need to enable both of them to see Inventra options. Fix the dependency and drop the anyway unnecessary comment. Signed-off-by: Rabin Vincent <rabin@rab.in> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: musb: tusb6010_omap: fix build failure: error: 'musb' undeclaredSergei Trofimovich2011-08-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | CC drivers/usb/musb/tusb6010_omap.o drivers/usb/musb/tusb6010_omap.c: In function 'tusb_omap_use_shared_dmareq': drivers/usb/musb/tusb6010_omap.c:92: error: 'musb' undeclared (first use in this function) drivers/usb/musb/tusb6010_omap.c:92: error: (Each undeclared identifier is reported only once drivers/usb/musb/tusb6010_omap.c:92: error: for each function it appears in.) Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: gadget: composite: fix bMaxPacketSize for SuperSpeedSebastian Andrzej Siewior2011-08-011-2/+4
| | | | | | | | | | | | | | | | | | | | For bMaxPacketSize0 we usually take what is specified in ep0->maxpacket. This is fine in most cases, however on SuperSpeed bMaxPacketSize0 specifies the exponent instead of the actual size in bytes. The only valid value on SS is 9 which denotes 512 bytes. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: gadget: fusb300: remove #if 0 blockSebastian Andrzej Siewior2011-08-011-101/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | The code in this block is unused and the Author is fine with removing: | These functions were used to debug unstable hw fifo while developing | fusb300. It's much more stable now. | So these functions can be removed. Cc: "Wendy Yuan-Hsin Chen" <yhchen@faraday-tech.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: gadget: s3c2410_udc: fix unterminated platform_device_id tableAxel Lin2011-08-011-0/+1
| | | | | | | | | | | | | | | | platform_device_id structures need a NULL terminating entry, add it. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* | Merge branch 'for-usb-linus' of ↵Greg Kroah-Hartman2011-08-023-11/+21
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | git+ssh://master.kernel.org/pub/scm/linux/kernel/git/sarah/xhci into usb-linus * 'for-usb-linus' of git+ssh://master.kernel.org/pub/scm/linux/kernel/git/sarah/xhci: usb/config: use proper endian access for wMaxPacketSize USB: xhci: fix OS want to own HC xhci: Don't submit commands or URBs to halted hosts.
| * | usb/config: use proper endian access for wMaxPacketSizeSebastian Andrzej Siewior2011-08-011-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wMaxPacketSize is __le16 and should be accessed as such. Also fix the wBytesPerInterval assignment while here. v2: also fix the wBytesPerInterval assigment, noticed by Matt Evans This patch should be backported to the 3.0 kernel. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Acked-by: Matt Evans <matt@ozlabs.org> Cc: stable@kernel.org
| * | USB: xhci: fix OS want to own HCJiSheng Zhang2011-08-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Software should set XHCI_HC_OS_OWNED bit to request ownership of xHC. This patch should be backported to kernels as far back as 2.6.31. Signed-off-by: JiSheng Zhang <jszhang3@gmail.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Cc: stable@kernel.org
| * | xhci: Don't submit commands or URBs to halted hosts.Sarah Sharp2011-08-011-5/+14
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit fccf4e86200b8f5edd9a65da26f150e32ba79808 "USB: Free bandwidth when usb_disable_device is called" caused a bit of an issue when the xHCI host controller driver is unloaded. It changed the USB core to remove all endpoints when a USB device is disabled. When the driver is unloaded, it will remove the SuperSpeed split root hub, which will disable all devices under that roothub and then halt the host controller. When the second High Speed split roothub is removed, the USB core will attempt to disable the endpoints, which will submit a Configure Endpoint command to a halted host controller. The command will eventually time out, but it makes the xHCI driver unload take *minutes* if there are a couple of USB 1.1/2.0 devices attached. We must halt the host controller when the SuperSpeed roothub is removed, because we can't allow any interrupts from things like port status changes. Make several different functions not submit commands or URBs to the host controller when the host is halted, by adding a check in xhci_check_args(). xhci_check_args() is used by these functions: xhci.c-int xhci_urb_enqueue() xhci.c-int xhci_drop_endpoint() xhci.c-int xhci_add_endpoint() xhci.c-int xhci_check_bandwidth() xhci.c-void xhci_reset_bandwidth() xhci.c-static int xhci_check_streams_endpoint() xhci.c-int xhci_discover_or_reset_device() It's also used by xhci_free_dev(). However, we have to take special care in that case, because we want the device memory to be freed if the host controller is halted. This patch should be backported to the 2.6.39 and 3.0 kernel. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Cc: stable@kernel.org
* | Merge branch 'v4l_for_linus' of ↵Linus Torvalds2011-07-301-19/+3Star
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6 * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (430 commits) [media] ir-mce_kbd-decoder: include module.h for its facilities [media] ov5642: include module.h for its facilities [media] em28xx: Fix DVB-C maxsize for em2884 [media] tda18271c2dd: Fix saw filter configuration for DVB-C @6MHz [media] v4l: mt9v032: Fix Bayer pattern [media] V4L: mt9m111: rewrite set_pixfmt [media] V4L: mt9m111: fix missing return value check mt9m111_reg_clear [media] V4L: initial driver for ov5642 CMOS sensor [media] V4L: sh_mobile_ceu_camera: fix Oops when USERPTR mapping fails [media] V4L: soc-camera: remove soc-camera bus and devices on it [media] V4L: soc-camera: un-export the soc-camera bus [media] V4L: sh_mobile_csi2: switch away from using the soc-camera bus notifier [media] V4L: add media bus configuration subdev operations [media] V4L: soc-camera: group struct field initialisations together [media] V4L: soc-camera: remove now unused soc-camera specific PM hooks [media] V4L: pxa-camera: switch to using standard PM hooks [media] NetUP Dual DVB-T/C CI RF: force card hardware revision by module param [media] Don't OOPS if videobuf_dvb_get_frontend return NULL [media] NetUP Dual DVB-T/C CI RF: load firmware according card revision [media] omap3isp: Support configurable HS/VS polarities ... Fix up conflicts: - arch/arm/mach-omap2/board-rx51-peripherals.c: cleanup regulator supply definitions in mach-omap2 vs OMAP3: RX-51: define vdds_csib regulator supply - drivers/staging/tm6000/tm6000-alsa.c (trivial)
| * [media] v4l2-event/ctrls/fh: allocate events per fh and per type instead of ↵Hans Verkuil2011-07-271-11/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | just per-fh The driver had to decide how many events to allocate when the v4l2_fh struct was created. It was possible to add more events afterwards, but there was no way to ensure that you wouldn't miss important events if the event queue would fill up for that filehandle. In addition, once there were no more free events, any new events were simply dropped on the floor. For the control event in particular this made life very difficult since control status/value changes could just be missed if the number of allocated events and the speed at which the application read events was too low to keep up with the number of generated events. The application would have no idea what the latest state was for a control since it could have missed the latest control change. So this patch makes some major changes in how events are allocated. Instead of allocating events per-filehandle they are now allocated when subscribing an event. So for that particular event type N events (determined by the driver) are allocated. Those events are reserved for that particular event type. This ensures that you will not miss events for a particular type altogether. In addition, if there are N events in use and a new event is raised, then the oldest event is dropped and the new one is added. So the latest event is always available. This can be further improved by adding the ability to merge the state of two events together, ensuring that no data is lost at all. This will be added in the next patch. This also makes it possible to allow the user to determine the number of events that will be allocated. This is not implemented at the moment, but would be trivial. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] v4l2-events/fh: merge v4l2_events into v4l2_fhHans Verkuil2011-07-271-8/+2Star
| | | | | | | | | | | | | | | | | | | | | | | | | | Drivers that supported events used to be rare, but now that controls can also raise events this will become much more common since almost all drivers have controls. This means that keeping struct v4l2_events as a separate struct make no more sense. Merging it into struct v4l2_fh simplifies things substantially as it is now an integral part of the filehandle struct. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* | atomic: use <linux/atomic.h>Arun Sharma2011-07-277-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows us to move duplicated code in <asm/atomic.h> (atomic_inc_not_zero() for now) to <linux/atomic.h> Signed-off-by: Arun Sharma <asharma@fb.com> Reviewed-by: Eric Dumazet <eric.dumazet@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: David Miller <davem@davemloft.net> Cc: Eric Dumazet <eric.dumazet@gmail.com> Acked-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | USB / Renesas: Fix build issue related to struct scatterlistRafael J. Wysocki2011-07-261-0/+1
| | | | | | | | | | | | | | | | Fix build issue caused by undefined struct scatterlist in drivers/usb/renesas_usbhs/fifo.c. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | Merge branch 'staging-next' of ↵Linus Torvalds2011-07-262-11/+1632
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6 * 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (741 commits) staging:iio:meter:ade7753 should be 16 bit read not 8 bit for mode register. staging:iio:kfifo_buf fix double initialization of the ring device structure. staging:iio:accel:lis3l02dq: fix incorrect pointer passed to spi_set_drvdata. staging:iio:imu fix missing register table index for some channels spectra: enable device before poking it staging: rts_pstor: Fix a miswriting staging/lirc_bt829: Return -ENODEV when no hardware is found. staging/lirc_parallel: remove pointless prototypes. staging/lirc_parallel: fix panic on rmmod staging:iio:adc:ad7476: Incorrect pointer into spi_set_drvdata. Staging: zram: Fix kunmapping order Revert "gma500: Fix dependencies" gma500: Add medfield header gma500: wire up the mrst i2c bus from chip_info gma500: Fix DPU build gma500: Clean up the DPU config and make it runtime gma500: resync with Medfield progress gma500: Use the mrst helpers and power control for mode commit gma500@ Fix backlight range error gma500: More Moorestown muddle meddling means MM maybe might modeset ... Fix up fairly trivial conflicts all over, mostly due to header file cleanup conflicts, but some deleted files and some just context changes: - Documentation/feature-removal-schedule.txt - drivers/staging/bcm/headers.h - drivers/staging/brcm80211/brcmfmac/dhd_linux.c - drivers/staging/brcm80211/brcmfmac/dhd_sdio.c - drivers/staging/brcm80211/brcmfmac/wl_cfg80211.h - drivers/staging/brcm80211/brcmfmac/wl_iw.c - drivers/staging/et131x/et131x_netdev.c - drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c - drivers/staging/rtl8192e/r8192E.h - drivers/staging/usbip/userspace/src/utils.h
| * | Staging: Merge ENE UB6250 MS card codes from keucr to ↵Cho, Yu-Chen2011-07-082-11/+1632
| | | | | | | | | | | | | | | | | | | | | | | | | | | drivers/usb/storage/ene_ub6250.c Merge ENE UB6250 MS card codes from keucr to drivers/usb/storage/ene_ub6250.c. Signed-off-by: Cho, Yu-Chen <acho@novell.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | | Merge branch 'usb-next' of ↵Linus Torvalds2011-07-26124-3124/+8928
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6 * 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (115 commits) EHCI: fix direction handling for interrupt data toggles USB: serial: add IDs for WinChipHead USB->RS232 adapter USB: OHCI: fix another regression for NVIDIA controllers usb: gadget: m66592-udc: add pullup function usb: gadget: m66592-udc: add function for external controller usb: gadget: r8a66597-udc: add pullup function usb: renesas_usbhs: support multi driver usb: renesas_usbhs: inaccessible pipe is not an error usb: renesas_usbhs: care buff alignment when dma handler USB: PL2303: correctly handle baudrates above 115200 usb: r8a66597-hcd: fixup USB_PORT_STAT_C_SUSPEND shift usb: renesas_usbhs: compile/config are rescued usb: renesas_usbhs: fixup comment-out usb: update email address in ohci-sh and r8a66597-hcd usb: r8a66597-hcd: add function for external controller EHCI: only power off port if over-current is active USB: mon: Allow to use usbmon without debugfs USB: EHCI: go back to using the system clock for QH unlinks ehci: add pci quirk for Ordissimo and RM Slate 100 too ehci: refactor pci quirk to use standard dmi_check_system method ... Fix up trivial conflicts in Documentation/feature-removal-schedule.txt
| * | | EHCI: fix direction handling for interrupt data togglesAlan Stern2011-07-192-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch (as1480) fixes a rather obscure bug in ehci-hcd. The qh_update() routine needs to know the number and direction of the endpoint corresponding to its QH argument. The number can be taken directly from the QH data structure, but the direction isn't stored there. The direction is taken instead from the first qTD linked to the QH. However, it turns out that for interrupt transfers, qh_update() gets called before the qTDs are linked to the QH. As a result, qh_update() computes a bogus direction value, which messes up the endpoint toggle handling. Under the right combination of circumstances this causes usb_reset_endpoint() not to work correctly, which causes packets to be dropped and communications to fail. Now, it's silly for the QH structure not to have direct access to all the descriptor information for the corresponding endpoint. Ultimately it may get a pointer to the usb_host_endpoint structure; for now, adding a copy of the direction flag solves the immediate problem. This allows the Spyder2 color-calibration system (a low-speed USB device that sends all its interrupt data packets with the toggle set to 0 and hance requires constant use of usb_reset_endpoint) to work when connected through a high-speed hub. Thanks to Graeme Gill for supplying the hardware that allowed me to track down this bug. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Reported-by: Graeme Gill <graeme@argyllcms.com> CC: <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | | USB: serial: add IDs for WinChipHead USB->RS232 adapterWolfgang Denk2011-07-192-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add ID 4348:5523 for WinChipHead USB->RS 232 adapter with Prolifec PL2303 chipset Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | | USB: OHCI: fix another regression for NVIDIA controllersAlan Stern2011-07-161-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The NVIDIA series of OHCI controllers continues to be troublesome. A few people using the MCP67 chipset have reported that even with the most recent kernels, the OHCI controller fails to handle new connections and spams the system log with "unable to enumerate USB port" messages. This is different from the other problems previously reported for NVIDIA OHCI controllers, although it is probably related. It turns out that the MCP67 controller does not like to be kept in the RESET state very long. After only a few seconds, it decides not to work any more. This patch (as1479) changes the PCI initialization quirk code so that NVIDIA controllers are switched into the SUSPEND state after 50 ms of RESET. With no interrupts enabled and all the downstream devices reset, and thus unable to send wakeup requests, this should be perfectly safe (even for non-NVIDIA hardware). The removal code in ohci-hcd hasn't been changed; it will still leave the controller in the RESET state. As a result, if someone unloads ohci-hcd and then reloads it, the controller won't work again until the system is rebooted. If anybody complains about this, the removal code can be updated similarly. This fixes Bugzilla #22052. Tested-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: stable <stable@kernel.org> Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | | Merge branch 'for-next' of ↵Greg Kroah-Hartman2011-07-0919-142/+575
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/balbi/usb into usb-next * 'for-next' of master.kernel.org:/pub/scm/linux/kernel/git/balbi/usb: usb: gadget: m66592-udc: add pullup function usb: gadget: m66592-udc: add function for external controller usb: gadget: r8a66597-udc: add pullup function usb: gadget: zero: add superspeed support usb: gadget: add SS descriptors to Ethernet gadget usb: gadget: r8a66597-udc: add support for TEST_MODE usb: gadget: m66592-udc: add support for TEST_MODE usb: gadget: r8a66597-udc: Make BUSWAIT configurable through platform data usb: gadget: r8a66597-udc: fix cannot connect after rmmod gadget driver usb: update email address in r8a66597-udc and m66592-udc usb: musb: restore INDEX register in resume path usb: gadget: fix up depencies usb: gadget: fusb300_udc: fix compile warnings usb: gadget: ci13xx_udc.c: fix compile warning usb: gadget: net2272: fix compile warnings usb: gadget: langwell_udc: fix compile warnings usb: gadget: fusb300_udc: drop dead code
| | * | | usb: gadget: m66592-udc: add pullup functionYoshihiro Shimoda2011-07-091-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| | * | | usb: gadget: m66592-udc: add function for external controllerYoshihiro Shimoda2011-07-092-19/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | M66592 has the pin of WR0 and WR1. So, if one write-pin of CPU connects to the pins, we have to change the setting of FIFOSEL register in the controller. If we don't change the setting, the controller cannot send the data of odd length. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| | * | | usb: gadget: r8a66597-udc: add pullup functionYoshihiro Shimoda2011-07-091-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| | * | | usb: gadget: zero: add superspeed supportAmit Blay2011-07-083-3/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds SuperSpeed descriptors to the g_zero gadget. The SuperSpeed descriptors were added both for f_soursesink and f_loopback function drivers. Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org> Signed-off-by: Amit Blay <ablay@codeaurora.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
| | * | | usb: gadget: add SS descriptors to Ethernet gadgetPaul Zimmerman2011-07-086-11/+324
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add SuperSpeed descriptors to the Network USB function drivers. This has been lightly tested using a Linux host. I was able to ssh from device to host and host to device, no obvious problems seen. Signed-off-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| | * | | usb: gadget: r8a66597-udc: add support for TEST_MODEYoshihiro Shimoda2011-07-081-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The USB high speed device must support the TEST_MODE, but the driver didn't support it. When we sent the SET_FEATURE for TEST_MODE to the driver, the request was successful, but the module didn't enter the TEST_MODE. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>