aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/wusbcore
AgeCommit message (Collapse)Author
2009-10-14USB: wusb: don't use the stack to read security descriptorStefano Panella
An urb's transfer buffer must be kmalloc'd memory and not point to the stack or a DMA API warning results. Signed-off-by: David Vrabel <david.vrabel@csr.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-21trivial: fix typos "man[ae]g?ment" -> "management"Uwe Kleine-Koenig
Signed-off-by: Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-04-17WUSB: correct format of wusb_chid sysfs fileDavid Vrabel
Make the wusb_chid sysfs file match the ABI documentation. Print all zeros if the WUSB host is stopped (instead of an empty file) and end the file with a newline. Signed-off-by: David Vrabel <david.vrabel@csr.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-17WUSB: fix oops when completing URBs for disconnected devicesDavid Vrabel
Fix an oops in wusbhc_giveback_urb() if the wusb device had disconnected while an urb was in progress. Also release the ref count obtained here. Signed-off-by: David Vrabel <david.vrabel@csr.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-17WUSB: disconnect all devices when stopping a WUSB HCDDavid Vrabel
Make sure all WUSB devices are disconnected when stopping a WUSB HCD so that we don't leak the devices' wusb_dev structures. Signed-off-by: David Vrabel <david.vrabel@csr.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (28 commits) trivial: Update my email address trivial: NULL noise: drivers/mtd/tests/mtd_*test.c trivial: NULL noise: drivers/media/dvb/frontends/drx397xD_fw.h trivial: Fix misspelling of "Celsius". trivial: remove unused variable 'path' in alloc_file() trivial: fix a pdlfush -> pdflush typo in comment trivial: jbd header comment typo fix for JBD_PARANOID_IOFAIL trivial: wusb: Storage class should be before const qualifier trivial: drivers/char/bsr.c: Storage class should be before const qualifier trivial: h8300: Storage class should be before const qualifier trivial: fix where cgroup documentation is not correctly referred to trivial: Give the right path in Documentation example trivial: MTD: remove EOL from MODULE_DESCRIPTION trivial: Fix typo in bio_split()'s documentation trivial: PWM: fix of #endif comment trivial: fix typos/grammar errors in Kconfig texts trivial: Fix misspelling of firmware trivial: cgroups: documentation typo and spelling corrections trivial: Update contact info for Jochen Hein trivial: fix typo "resgister" -> "register" ...
2009-04-02workqueue: add to_delayed_work() helper functionJean Delvare
It is a fairly common operation to have a pointer to a work and to need a pointer to the delayed work it is contained in. In particular, all delayed works which want to rearm themselves will have to do that. So it would seem fair to offer a helper function for this operation. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Ingo Molnar <mingo@elte.hu> Cc: "David S. Miller" <davem@davemloft.net> Cc: Herbert Xu <herbert@gondor.apana.org.au> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Greg KH <greg@kroah.com> Cc: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-03-30trivial: Fix dubious bitwise 'and' usage spotted by sparse.Alexey Zaytsev
It doesn't change the semantics, but clearly the logical 'and' was meant to be used here. Signed-off-by: Alexey Zaytsev <alexey.zaytsev@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-03-24USB: use kzfree()Johannes Weiner
Use kzfree() instead of memset() + kfree(). Signed-off-by: Johannes Weiner <hannes@cmpxchg.org> Reviewed-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24USB: allow libusb to talk to unauthenticated WUSB devicesDavid Vrabel
To permit a userspace application to associate with WUSB devices using numeric association, control transfers to unauthenticated WUSB devices must be allowed. This requires that wusbcore correctly sets the device state to UNAUTHENTICATED, DEFAULT and ADDRESS and that control transfers can be performed to UNAUTHENTICATED devices. Signed-off-by: David Vrabel <david.vrabel@csr.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-17USB: wusbcore/wa-xfer, fix lock imbalanceJiri Slaby
Fix locking on one wa_urb_enqueue_b's fail path. There was omitted unlock. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-22Merge branch 'master' of ↵David Vrabel
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-upstream
2009-01-07USB: wusb: annotate association types withe proper endiannessHarvey Harrison
Also a trivial annotation in rh.c for: drivers/usb/wusbcore/rh.c:366:9: warning: incorrect type in assignment (different base types) drivers/usb/wusbcore/rh.c:366:9: expected unsigned short [unsigned] [short] [usertype] <noident> drivers/usb/wusbcore/rh.c:366:9: got restricted __le16 [usertype] <noident> drivers/usb/wusbcore/rh.c:367:9: warning: incorrect type in assignment (different base types) drivers/usb/wusbcore/rh.c:367:9: expected unsigned short [unsigned] [short] [usertype] <noident> drivers/usb/wusbcore/rh.c:367:9: got restricted __le16 [usertype] <noident> Association types annotation fixes piles of warnings similar to: drivers/usb/wusbcore/cbaf.c:238:30: warning: incorrect type in initializer (different base types) drivers/usb/wusbcore/cbaf.c:238:30: expected restricted __le16 [usertype] id drivers/usb/wusbcore/cbaf.c:238:30: got int drivers/usb/wusbcore/cbaf.c:238:30: warning: incorrect type in initializer (different base types) drivers/usb/wusbcore/cbaf.c:238:30: expected restricted __le16 [usertype] len drivers/usb/wusbcore/cbaf.c:238:30: got int Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Cc: David Vrabel <david.vrabel@csr.com> Cc: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06wusb: return -ENOTCONN when resetting a port with no connected deviceDavid Vrabel
If reading the device descriptor fails during hub_port_init() fails, then the port is disabled, disconnecting the device. The port is then reset at the start of the next init attempt but there is no device to reset. Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-12-22uwb: use print_hex_dump()David Vrabel
Use print_hex_dump() instead of the home-grown dump_bytes(). Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-12-22uwb: use dev_dbg() for debug messagesDavid Vrabel
Instead of the home-grown d_fnstart(), d_fnend() and d_printf() macros, use dev_dbg() or remove the message entirely. Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-12-12wusb: fix oops when terminating a non-existant reservationDavid Vrabel
If a reservation was not established, do not try terminating it. Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-12-12uwb: improved MAS allocator and reservation conflict handlingStefano Panella
Greatly enhance the MAS allocator: - Handle row and column reservations. - Permit all the available MAS to be allocated. - Follows the WiMedia rules on MAS selection. Take appropriate action when reservation conflicts are detected. - Correctly identify which reservation wins the conflict. - Protect alien BP reservations. - If an owned reservation loses, resize/move it. - Follow the backoff procedure before requesting additional MAS. When reservations are terminated, move the remaining reservations (if necessary) so they keep following the MAS allocation rules. Signed-off-by: Stefano Panella <stefano.panella@csr.com> Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-11-25wusb: whci-hcd shouldn't do ASL/PZL updates while channel is inactiveDavid Vrabel
ASL/PZL updates while the WUSB channel is inactive (i.e., the PZL and ASL are stopped) may not complete. This causes hangs when removing the whci-hcd module if a device is still connected (removing the device does an endpoint_disable which results in an ASL update to remove the qset). If the WUSB channel is inactive the update can simply be skipped as the WHC doesn't care about the state of the ASL/PZL. Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-11-19uwb: add basic radio managerDavid Vrabel
The UWB radio manager coordinates the use of the radio between the PALs that may be using it. PALs request use of the radio with uwb_radio_start() and the radio manager will start beaconing if its not already doing so. When the last PAL has called uwb_radio_stop() beaconing will be stopped. In the future, the radio manager will have a more sophisticated channel selection algorithm, probably following the Channel Selection Policy from the WiMedia Alliance when it is finalized. For now, channel 9 (BG1, TFC1) is selected. The user may override the channel selected by the radio manager and may force the radio to stop beaconing. The WUSB Host Controller PAL makes use of this and there are two new debug PAL commands that can be used for testing. Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-10-31wusb: remove unused #include <version.h>Huang Weiyi
The file(s) below do not use LINUX_VERSION_CODE nor KERNEL_VERSION. drivers/usb/host/hwa-hc.c drivers/usb/host/whci/hcd.c drivers/usb/host/whci/int.c drivers/usb/host/whci/wusb.c drivers/usb/wusbcore/cbaf.c This patch removes the said #include <version.h>. Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com> Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-10-28wusb: reset WUSB devices with SetAddress(0)David Vrabel
Using a Reset Device IE to reset a WUSB device is too heavyweight as it causes the devcie to disconnect (which the USB stack does not expect and cannot handle). Instead, do a SetAddress(0); SetAddress(AuthAddr) for authenticated devices. Unauthenticated devices will not be reset and the stack will have to rely on the device timing out after TrustTimeout and disconnecting. Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-10-28wusb: do a proper channel stopDavid Vrabel
When stopping the WUSB channel the host should send Channel Stop IEs giving the WUSB Channel Time of the last MMC. Both WHCI and HWA hosts provide a channel stop command for this. Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-10-28wusb: disable verification of the key generation algorithmsDavid Vrabel
Verifing the key generation algorithms could take too long on a freshly booted system (due to lack of entropy) so disable the test unless a module parameter (debug_crypto_verify) is specified. Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-10-28uwb: reference count reservationsDavid Vrabel
Reference counting the struct uwb_rsv's is safer and easier to get right than the transferring ownership of the structures from the PAL to reservation manager. This fixes an oops in the debug PAL after a reservation timed out. Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-10-16uwb: don't use printk_ratelimit() so oftenDavid Vrabel
Avoid using printk_ratelimit() in many places because: - many were error messages reporting broken hardware (it's useful to get all of these). - the message itself wasn't useful so the message has been removed. Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-10-15uwb: use kcalloc where appropriateDavid Vrabel
Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-09-17uwb: depend on EXPERIMENTALDavid Vrabel
The UWB stack has some sysfs APIs that will change thus it's best marked as EXPERIMENTAL until these APIs are finalized. Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-09-17wusb: wusb-cbaf (CBA driver) sysfs ABI simplificationFelipe Zimmerle
Simplify the sysfs ABI of the wusb-cbaf (Cable Based Association) driver: use one value per file and cause the write of the CHID to fetch the CDID (instead of requiring a separate read). Update the example wusb-cbaf script to work with this revised ABI. Signed-off-by: Felipe Zimmerle <felipe.zimmerle@indt.org.br> Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-09-17uwb: add symlinks in sysfs between radio controllers and PALsDavid Vrabel
Add a facility for PALs to have symlinks to their radio controller (and vice-versa) and make WUSB host controllers use this. Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-09-17wusb: fix bmRequestType for Abort RPipe requestAnderson Lizardo
WUSB 1.0 (Table 8-4) mentions that Abort RPipe requests must have bmRequestType equal to 0x25, although current implementation sets bmRequestType to 0xa5. This patch fixes this typo. Signed-off-by: Anderson Lizardo <anderson.lizardo@indt.org.br> Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-09-17wusb: fix error path for wusb_set_dev_addr()Anderson Lizardo
Error path for wusb_set_dev_addr() was handled incorrectly. Fix it by considering error only when return value is negative. Signed-off-by: Anderson Lizardo <anderson.lizardo@indt.org.br> Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-09-17wusb: add the Wire Adapter (WA) coreInaky Perez-Gonzalez
Common code for supporting Host Wire Adapters and Device Wire Adapters. Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-09-17wusb: add the USB wusb-cbaf driverInaky Perez-Gonzalez
Add a driver for cable based associated of (Wireless) USB devices. Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-09-17wusb: add the Wireless USB core (build-system)Greg Kroah-Hartman
Add the WUSB build system (Kconfig and Kbuild) files. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-09-17wusb: add the Wireless USB core (security)Inaky Perez-Gonzalez
Add the WUSB security (authentication) code. Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-09-17wusb: add the Wireless USB core (protocol)Inaky Perez-Gonzalez
Add the WUSB protocol (MMC management and device connection) code. Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-09-17wusb: add the Wireless USB coreInaky Perez-Gonzalez
Add support for Ceritified Wireless USB 1.0 to the USB stack. This has been split into several patches for easier review. core (this patch): - host controller infrastructure - cluster reservation - UWB PAL registration - fake root hub protocol: - MMC management (start/stop, managing IEs) - device connection security: - device authentication and authorization build-system: - Kconfig and Kbuild files Signed-off-by: David Vrabel <david.vrabel@csr.com>