summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* USB: root hubs don't lie about their number of TTsAlan Stern2008-04-243-2/+14
| | | | | | | | | | | | | Currently EHCI root hubs enumerate with a bDeviceProtocol code indicating that they possess a Transaction Translator. However the vast majority of controllers do not; they rely on a companion controller to handle full- and low-speed communications. This patch (as1064) changes the root-hub device descriptor to match the actual situation. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: convert away from urb->status in xpad driverOliver Neukum2008-04-241-8/+12
| | | | | | | | | | USB is moving to transfering status as a parameter. To ease the transition urb->status is to be touched only once in a function. The xpad driver has been overlooked. Dmitry wants this to go through the USB tree. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: OHCI: fix bug in controller resumeAlan Stern2008-04-241-1/+3
| | | | | | | | | | | | | | | This patch (as1063) fixes a bug in the way ohci-hcd resumes its controllers. It leaves the Master Interrupt Enable bit turned off. If the root hub is resumed immediately this won't matter. But if the root hub is suspended (say because no devices are plugged in), it won't ever wake up by itself. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> CC: David Brownell <david-b@pacbell.net> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: gadget: dummy_hcd.c: fix nested switch statementsIngo van Lil2008-04-241-8/+6
| | | | | | | | | | | | | | | | | Fix a messed up combination of two nested switch statements in drivers/usb/gadget/dummy_hcd.c. According to the USB spec (section 5.8.3) the maximum packet size for bulk endpoints can be 512 for high-speed devices and 8, 16, 32 or 64 for full-speed devices. Low-speed devices must not have bulk endpoints. Signed-off-by: Ingo van Lil <inguin@gmx.de> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: mem leak fixes for AMD 5536 UDC high/full speed USB device controller ↵Jesper Juhl2008-04-241-0/+10
| | | | | | | | | | | | | | | | | driver In drivers/usb/gadget/amd5536udc.c::udc_pci_probe(), sizeof(struct udc) storage is allocated for 'dev'. There are many exit points from the function where 'dev' is not free'd but has also not yet been used for anything. The following patch free's 'dev' at the return points where it has not yet been used. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Cc: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: usb-storage: use adaptive DMA maskAlan Stern2008-04-241-6/+8
| | | | | | | | | | | | This patch (as1060) makes usb-storage set the DMA alignment mask for SCSI slaves to match the maxpacket size of the bulk-IN endpoint, rather than always setting it to 511. For full-speed devices that mask is too restrictive, and wireless USB devices can have maxpacket sizes larger than 512. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: g_printer bugfixesCraig W. Nadler2008-04-241-32/+54
| | | | | | | | | | | | | | | | G_PRINTER: Bug fix for blocking reads and a fix for a memory leak. This fixes bugs in blocking IO calls. When the poll() entry point is called receive transfers will be setup if they have not already been. Another bug fix is that the poll() entry point now checks the current receive buffer for data when reporting if any data had been received. A memory leak was fixed that could have occurred when a USB reset happened. Signed-off-by: Craig W. Nadler <craig@nadler.us> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: test for NULL return from platform_get_resource() in ↵Jesper Juhl2008-04-241-1/+2
| | | | | | | | | | | | | | ohci_hcd_sm501_drv_remove() platform_get_resource() may return null, so although it seems it will never do so here unless there's a bug elsewhere, it does no harm to be defensive and test. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Acked-by: Magnus Damm <magnus.damm@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: fix comments of 2 functions in hcd.cMing Lei2008-04-241-2/+0
| | | | | | | | | Remove useless @type note for rh_string() and @r note for usb_hcd_irq() since this two parameters were removed. Signed-off-by: Ming Lei <tom.leiming@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb: u132-hcd driver: semaphore to mutexDaniel Walker2008-04-241-110/+110
| | | | | | Signed-off-by: Daniel Walker <dwalker@mvista.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb: u132-hcd driver style clean upDaniel Walker2008-04-241-2569/+2563
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I was converting a semaphore in this file to a mutex when I noticed that this file has some fairly rampant style problems. Practically every line has spaces instead of tabs .. Once I cleared that up, checkpatch.pl showed a number of other problem.. I think this file might be a good one to review for new style checks that could be added.. Below are the only two remaining which I didn't remove. #5083: FILE: drivers/usb/host/u132-hcd.c:2907: + error: WARNING: labels should not be indented #5087: FILE: drivers/usb/host/u132-hcd.c:2911: + stall: These labels are actually inside a switch statement, and they are right under "default:". "default:" appears to be exempt and these other label should be too, or default shouldn't be exempt. I also deleted a few lines due to single statements inside { } , if (is_error()) { return; } becomes, if (is_error()) return; with one line deleted. Signed-off-by: Daniel Walker <dwalker@mvista.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: add usb-serial spcp8x5 driverGreg Kroah-Hartman2008-04-243-1/+1087
| | | | | | | | | | Original version of the driver done by Linxb, changes by Harald, and lots of cleanups by me in order to get it into a mergable state. Cc: Linxb <xubin.lin@worldplus.com.cn> Cc: Harald Klein <hari@vt100.at> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb/usb-serial-sierra-add-new-dev-groupKevin Lloyd2008-04-241-0/+40
| | | | | | | | | | This patch is for the sierra driver and adds support for a new group of devices that have a new USB configuration. This targets kernel 2.6.25-rc7 Signed-off-by: Kevin Lloyd <klloyd@sierrawireless.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: Serial: Sierra: C597 fixKevin Lloyd2008-04-241-1/+1
| | | | | | | | | | | This patch is for the sierra driver and fixes a Compass 597 bug that allows users to access the SD-Card. This targets kernel 2.6.25-rc7 Signed-off-by: Kevin Lloyd <klloyd@sierrawireless.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: Serial: Sierra: Clean upKevin Lloyd2008-04-241-9/+8
| | | | | | | | | | This patch cleans up some of the sierra driver code. Please package this with the other patches in this group as I would like the driver version to reflect their changes as well. Signed-off-by: Kevin Lloyd <klloyd@sierrawireless.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: increase cdc-acm write throughputDavid Engraf2008-04-242-43/+45
| | | | | | | | | | | | | the following patch uses 16 write urbs and a writsize of wMaxPacketSize * 20. With this patch I get the maximum througput from my linux system with 20MB/sec read and 15 MB/sec write (full speed 1 MB/sec both) I also deleted the flag URB_NO_FSBR for the writeurbs, because this makes my full speed devices significant slower. Signed-off-by: David Engraf <david.engraf@netcom.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: cdc-acm tell tty layer not to split things up.David Engraf2008-04-241-0/+1
| | | | | | | | | | It ensures that the tty level do not split the send buffer into 2KB blocks. Signed-off-by: David Engraf <david.engraf@netcom.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usbmon: restore mmapPete Zaitcev2008-04-242-8/+4
| | | | | | | | | | | Paolo asked to enable the mmap. I kept it off because I'm do not entirely understand how it workse these days after ->nopage etc. But it seems like working somewhat at least. Signed-Off-By: Pete Zaitcev <zaitcev@gmail.com> Cc: Paolo Abeni <paolo.abeni@email.it> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: Fix "cut and paste" booboo in usbmon Makefile.Robert P. J. Day2008-04-241-1/+1
| | | | | | Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: Remove EXPERIMENTAL designation from USB_EHCI_ROOT_HUB_TT.Robert P. J. Day2008-04-241-2/+2
| | | | | | | | | According to David Brownell, this feature doesn't require an experimental designation any longer. Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: Remove EXPERIMENTAL from dynamic USB minor allocation.Robert P. J. Day2008-04-241-2/+2
| | | | | | | | Since this USB feature seems non-experimental, remove that dependency. Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: Remove EXPERIMENTAL designation from USB MDC800 support.Robert P. J. Day2008-04-241-2/+2
| | | | | | | | | | Since support for the USB Mustek MDC800 Digital Camera has apparently been around since the beginning of the git repository, it's safe to assume it's no longer experimental. Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: Remove EXPERIMENTAL designation from USB serial/ Kconfig entriesRobert P. J. Day2008-04-241-25/+25
| | | | | | | | | | Since nothing under the USB serial/ directory seems to be obviously experimental, remove the EXPERIMENTAL dependency from all of those Kconfig entries. Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: Remove EXPERIMENTAL designation from USB misc/ Kconfig entriesRobert P. J. Day2008-04-241-10/+10
| | | | | | | | | Since nothing under the USB misc/ seems to be obviously experimental, remove the EXPERIMENTAL dependency from those Kconfig entries. Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: Remove EXPERIMENTAL tags from some USB gadget Kconfig entries.Robert P. J. Day2008-04-241-8/+10
| | | | | | | | | | | | | Based on a recent discussion on the Linux USB mailing list, remove the designation of EXPERIMENTAL from some USB gadget entries, and tag some of them as DEVELOPMENT. just for fun, i added a bit of help for gadgetfs, explaining the race condition. Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Acked-by: David Brownell <dbrownell@users.sourceforge.net>
* USB: Remove EXPERIMENTAL designation from USB storage Kconfig entries.Robert P. J. Day2008-04-241-14/+14
| | | | | | | | | Since there seems to be little reason to mark the current USB storage features as "EXPERIMENTAL," remove that dependency. Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: mass storage: emulation of sat scsi_pass_thru with ATACBmatthieu castet2008-04-248-2/+258
| | | | | | | | | | | | | | | | | | | | | | | I have got a cypress usb-ide bridge and I would like to tune or monitor my disk with tools like hdparm, hddtemp or smartctl. My controller support a way to send raw ATA command to the disk with something call atacb (see http://download.cypress.com.edgesuite.net/design_resources/datasheets/contents/cy7c68300c_8.pdf). Atacb support can be added for each application, but there is some disadvantages : - all application need to be patched - A race is possible if there other accesses, because the emulation can be split in 2 atacb scsi transactions. One for sending the command, one for reading the register (if ck_cond is set). I have implemented the emulation in usb-storage with a special proto_handler, and an unsual entry. Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr> Signed-off-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* drivers/usb/core/devio.c: suppress warning with 64k PAGE_SIZEAndrew Morton2008-04-241-1/+3
| | | | | | | | | | | | drivers/usb/core/devio.c: In function 'proc_control': drivers/usb/core/devio.c:657: warning: comparison is always false due to limited range of data type Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Pete Zaitcev <zaitcev@redhat.com> Cc: Oliver Neukum <oliver@neukum.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: cypress_m8: Speed handlingAlan Cox2008-04-241-140/+29
| | | | | | | | | The recent changes to this driver cleaned it up a lot, follow that up by sorting the speed side of things out as well Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: ehci: paranoia, reject large control transfersDavid Brownell2008-04-241-2/+8
| | | | | | | | | | | Some EHCI fault paths with large control transfers aren't coded. Avoid problems by rejecting transfers that may need two qTDs (16+ KB). This is mostly paranoia; even 4 KB transfers are rare, and most HCDs use lower limits (so it's unlikely anyone would ever try such a thing). Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: remove dev->power.power_stateAlan Stern2008-04-2418-60/+11
| | | | | | | | | | | | | | | | power.power_state is scheduled for removal. This patch (as1053) removes all uses of that field from drivers/usb. Almost all of them were write-only, the most significant exceptions being sl811-hcd.c and u132-hcd.c. Part of this patch was written by Pavel Machek. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Cc: David Brownell <david-b@pacbell.net> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: ipaq: fix devices having more than one endpointMatthias Geissert2008-04-241-3/+3
| | | | | | | | | | | | | The ipaq module supports devices with one endpoint only. Some devices, e.g. Yakumo Delta 300, have more than one endpoint. This patch fixes support for devices having up to 2 endpoints which used to work on older kernel versions. Signed-off-by: Matthias Geissert <matthias.geissert@web.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: ehci: remove obsolete workaround for bogus IRQsDavid Brownell2008-04-241-3/+3
| | | | | | | | | | | | | It was pointed out that we found and fixed the cause of the "bogus" fatal IRQ reports some time ago ... this patch removes the code which was working around that bug ("status" got clobbered), and a comment which needlessly confused folk reading this code. This also includes a minor cleanup to the code which fixed that bug. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: partial USB embedded host supportRobin Getz2008-04-241-5/+8
| | | | | | | | | | | | | | | | | This provides better support for USB "Embedded Host" functionality, which is a subset of the USB OTG options: * External hub support can be disabled; * USB peripherals not whitelisted in "otg_whitelist.h" will be rejected during enumeration. These options can allow some savings in software and support. Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: io_ti.c: remove unneeded null tty checkRay Lee2008-04-241-2/+1
| | | | | | | | | | | | | | The Coverity checker (and Adrian Bunk) spotted an inconsistent NULL check of port->tty (it's blindly dereferenced later without the check). Alan Cox confirmed the check can go. Signed-off-by: Ray Lee <ray-lk@madrabbit.org> Cc: Adrian Bunk <bunk@kernel.org> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: use DIV_ROUND_UPJulia Lawall2008-04-244-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The kernel.h macro DIV_ROUND_UP performs the computation (((n) + (d) - 1) / (d)) but is perhaps more readable. An extract of the semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @haskernel@ @@ #include <linux/kernel.h> @depends on haskernel@ expression n,d; @@ ( - (n + d - 1) / d + DIV_ROUND_UP(n,d) | - (n + (d - 1)) / d + DIV_ROUND_UP(n,d) ) @depends on haskernel@ expression n,d; @@ - DIV_ROUND_UP((n),d) + DIV_ROUND_UP(n,d) @depends on haskernel@ expression n,d; @@ - DIV_ROUND_UP(n,(d)) + DIV_ROUND_UP(n,d) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: io_ti: lock mcr and msr shadows properlyAlan Cox2008-04-241-0/+7
| | | | | | Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: ti_usb_3410_5052: Extend locking to msr and shadow mcrAlan Cox2008-04-241-0/+9
| | | | | | Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: kobil_sct: Get rid of unneeded priv->line_stateAlan Cox2008-04-241-10/+5
| | | | | | Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: iuu_phoenix: lock priv->tiostatus properlyAlan Cox2008-04-241-5/+13
| | | | | | Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: serial: Note mos7480 and option don't lock modem statusAlan Cox2008-04-242-0/+2
| | | | | | Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: ftdi_sio: Note missing lockingAlan Cox2008-04-241-2/+2
| | | | | | | | | The ftdi_sio driver has no internal locking on the dtr/rts state. Flag that up for someone to fix. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: usb-serial: Prepare for BKL push downAlan Cox2008-04-241-2/+9
| | | | | | | | | Take the lock in usb-serial instead. As it relies on the BKL internally we can't push it any deeper yet. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: minor ehci xITD simplificationsKarsten Wiese2008-04-241-18/+12
| | | | | | | | | | Remove two (or one) conditional tests in per-urb isochronous transfer setup code paths. Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: auerswald: Convert ccp->mutex in a mutexmatthias@kaehlcke.net2008-04-241-26/+26
| | | | | | | | | The semaphore ccp->mutex is used as mutex, convert it to the mutex API Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net> Cc: Wolfgang Mües <wolfgang@iksw-muees.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: auerswald: Convert ccp->readmutex in a mutexmatthias@kaehlcke.net2008-04-241-9/+9
| | | | | | | | | The semaphore ccp->readmutex is used as mutex, convert it to the mutex API Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net> Cc: Wolfgang Mües <wolfgang@iksw-muees.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: auerswald: Convert stats_sem in a mutexmatthias@kaehlcke.net2008-04-241-21/+24
| | | | | | | | | The semaphore cp->mutex is used as mutex, convert it to the mutex API Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net> Cc: Wolfgang Mües <wolfgang@iksw-muees.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: cypress_m8: Limit baud rate to <=4800 for USB low speed devicesMike Isely2008-04-241-45/+59
| | | | | | | | | | | | | | | The cypress app note for the M8 states that for the USB low speed version of the part, throughput is effectively limited to 800 bytes/sec. So if we were to try a faster baud rate in such cases then we risk overrun errors on receive. Best to just identify this case and limit the rate to 4800 baud or less (by ignoring any request to set a faster rate). The old baud rate setting code was somewhat fragile; this change also hopefully makes it easier in the future to better checking / limiting. Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: cypress_m8: Get rid of pointless NULL checkMike Isely2008-04-241-7/+5
| | | | | | | | | | | | Remove a NULL check in cypress_m8; the check is useless in this context because it is referenced earlier in the same code path thus the kernel would be oops'ed before reaching this point anyway. (And it's really pointless here anyway; if this pointer somehow is NULL the driver is going to have serious problems in many other places.) Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: cypress_m8: Don't issue GET_CONFIG for certain devicesMike Isely2008-04-241-2/+19
| | | | | | | | | | | | | Earthmate LT-20 devices (both "old" and "new" versions) can't tolerate a GET_CONFIG command. The original Earthmate has no trouble with this. Presumably other non-Earthmate devices are still OK as well. This change disables the use of GET_CONFIG for cases where it is known not to work. Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
OpenPOWER on IntegriCloud