- 18 Nov, 2011 2 commits
-
-
Alan Stern authored
The utf8s_to_utf16s conversion routine needs to be improved. Unlike its utf16s_to_utf8s sibling, it doesn't accept arguments specifying the maximum length of the output buffer or the endianness of its 16-bit output. This patch (as1501) adds the two missing arguments, and adjusts the only two places in the kernel where the function is called. A follow-on patch will add a third caller that does utilize the new capabilities. The two conversion routines are still annoyingly inconsistent in the way they handle invalid byte combinations. But that's a subject for a different patch. Signed-off-by:
Alan Stern <stern@rowland.harvard.edu> CC: Clemens Ladisch <clemens@ladisch.de> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Alan Stern authored
This patch (as1500) removes all uses of the objectionable hcd->state variable from the ohci-hcd family of drivers. It is replaced by a private ohci->rh_state field, just as in uhci-hcd and ehci-hcd. Signed-off-by:
Alan Stern <stern@rowland.harvard.edu> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
- 15 Nov, 2011 38 commits
-
-
Johan Hovold authored
Use usb_translate_errors() to map USB-specific errors to errors appropriate for user space (ENOMEM, ENODEV and EIO) in write. Currently almost all serial drivers simply forward error codes from the stack (e.g. from usb_submit_urb()), but these codes often have different meanings in user-space. Doing the mapping in usb-serial core simplifies driver code and allows for more consistent error reporting. Signed-off-by:
Johan Hovold <jhovold@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Johan Hovold authored
Minor whitespace clean ups. Signed-off-by:
Johan Hovold <jhovold@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Johan Hovold authored
Forward errors from usb_submit_urb in open. Signed-off-by:
Johan Hovold <jhovold@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Johan Hovold authored
Remove code that was apparently copied from pl2303, disabled and then never used. Signed-off-by:
Johan Hovold <jhovold@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Johan Hovold authored
Forward errors from usb_submit_urb in open. Signed-off-by:
Johan Hovold <jhovold@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Johan Hovold authored
Make sure we forward all error codes (e.g. ENOMEM) to USB serial core. Signed-off-by:
Johan Hovold <jhovold@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Johan Hovold authored
All error messages from stack in open are being forwarded except for one call to usb_submit_urb. Change this for consistency. Signed-off-by:
Johan Hovold <jhovold@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Johan Hovold authored
Use usb_translate_errors() to map USB-specific errors to errors appropriate for user space (ENOMEM, ENODEV and EIO) in open. Currently almost all serial drivers simply forward error codes from the stack (e.g. from usb_submit_urb()), but these codes often have different meanings in user-space. Doing the mapping in usb-serial core simplifies driver code and allows for more consistent error reporting. Signed-off-by:
Johan Hovold <jhovold@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Johan Hovold authored
Move usb_translate_errors from usb core to linux/usb.h as it is meant to be accessed from drivers. Signed-off-by:
Johan Hovold <jhovold@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Johan Hovold authored
Add support for multiple read urbs to generic read implementation. Use a static array of two read urbs for now which is enough to get a 50% throughput increase in one test setup. Signed-off-by:
Johan Hovold <jhovold@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Johan Hovold authored
Use generic open rather than calling usb_serial_submit_read_urb directly. Signed-off-by:
Johan Hovold <jhovold@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Johan Hovold authored
Reorder urb submission and simply kill interrupt urb should read-urb submission fail (rather than calling close). Signed-off-by:
Johan Hovold <jhovold@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Johan Hovold authored
Return errors from usb_submit_urb rather than EPROTO on errors in open. Signed-off-by:
Johan Hovold <jhovold@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Johan Hovold authored
Use process_read_urb rather than read_bulk_callback for break processing. Signed-off-by:
Johan Hovold <jhovold@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Johan Hovold authored
Use tabs for indentation. Signed-off-by:
Johan Hovold <jhovold@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Johan Hovold authored
Reuse first write urb and bulk-out buffer of the generic write implementation for drivers that rely on port->write_urb rather than allocating them separately. Signed-off-by:
Johan Hovold <jhovold@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Johan Hovold authored
Remove unnecessary re-fills of bulk urbs whose fields have not changed since port probe. Compile-only tested. Cc: Matthias Bruestle and Harald Welte <support@reiner-sct.com> Signed-off-by:
Johan Hovold <jhovold@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Johan Hovold authored
Remove unnecessary reinitialisations of completion and context fields of urbs. Compile-only tested. Signed-off-by:
Johan Hovold <jhovold@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Johan Hovold authored
Remove unnecessary reinitialisations of urb->dev before each submission, which were based on the (no longer valid) assumption that serial->dev will be set to NULL on close. Compile-only tested. Cc: Matthias Bruestle and Harald Welte <support@reiner-sct.com> Cc: Lonnie Mendez <dignome@gmail.com> Cc: Peter Berger <pberger@brimson.com> Cc: Al Borchers <alborchers@steinerpoint.com> Cc: Support Department <support@connecttech.com> Signed-off-by:
Johan Hovold <jhovold@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Johan Hovold authored
Remove variable port0 from open as it is not used. Signed-off-by:
Johan Hovold <jhovold@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Johan Hovold authored
Remove incorrect and unnecessary check for port->read_urb which is not set to NULL, contrary to what seems to be assumed, when urb is killed. Compile only-tested. Signed-off-by:
Johan Hovold <jhovold@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Johan Hovold authored
Remove no longer used write_urb_busy field from struct usb_serial_port. Signed-off-by:
Johan Hovold <jhovold@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Johan Hovold authored
Use port write_urbs_free mask rather than write_urb_busy field in struct serial_port. Compile-only tested. Signed-off-by:
Johan Hovold <jhovold@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Johan Hovold authored
Use port write_urbs_free mask rather than write_urb_busy field in struct serial_port. Compile-only tested. Cc: Matthias Bruestle and Harald Welte <support@reiner-sct.com> Signed-off-by:
Johan Hovold <jhovold@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Johan Hovold authored
Use port write_urbs_free mask rather than write_urb_busy field in struct serial_port. Compile-only tested. Signed-off-by:
Johan Hovold <jhovold@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Johan Hovold authored
Fix regression introduced by commit 507ca9bc ([PATCH] USB: add ability for usb-serial drivers to determine if their write urb is currently being used.) which inverted the logic in write_room so that it returns zero when the write urb is actually free. Signed-off-by:
Johan Hovold <jhovold@gmail.com> Cc: stable <stable@vger.kernel.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Johan Hovold authored
Remove remaining changelogs from file headers (can still be retrieved through git). Remove even older changelog entries stored in Changelog.history. Remove outdated todo entries from belkin_sa. Signed-off-by:
Johan Hovold <jhovold@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Thomas Meyer authored
Use resource_size function on resource object instead of explicit computation. The semantic patch that makes this change is available in scripts/coccinelle/api/resource_size.cocci. Signed-off-by:
Thomas Meyer <thomas@m3y3r.de> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Thomas Meyer authored
Use kmemdup rather than duplicating its implementation The semantic patch that makes this change is available in scripts/coccinelle/api/memdup.cocci. Signed-off-by:
Thomas Meyer <thomas@m3y3r.de> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Felipe Balbi authored
Fix the following sparse warning: | drivers/usb/storage/shuttle_usbat.c:173:22: warning: | symbol 'usbat_usb_ids' was not declared. Should | it be static? Signed-off-by:
Felipe Balbi <balbi@ti.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Felipe Balbi authored
Fix the following sparse warning: | drivers/usb/storage/sddr55.c:51:22: warning: symbol | 'sddr55_usb_ids' was not declared. Should it | be static? Signed-off-by:
Felipe Balbi <balbi@ti.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Felipe Balbi authored
Fix the following sparse warning: | drivers/usb/storage/sddr09.c:74:22: warning: symbol | 'sddr09_usb_ids' was not declared. Should it | be static? Signed-off-by:
Felipe Balbi <balbi@ti.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Felipe Balbi authored
Fix the following sparse warnings: | drivers/usb/storage/realtek_cr.c:821:6: warning: symbol | 'rts51x_invoke_transport' was not declared. Should | it be static? | | drivers/usb/storage/realtek_cr.c:980:5: warning: symbol | 'realtek_cr_suspend' was not declared. Should it | be static? | | drivers/usb/storage/realtek_cr.c:518:23: warning: cast | truncates bits from constant value (fe47 becomes 47) Signed-off-by:
Felipe Balbi <balbi@ti.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Felipe Balbi authored
Fix the following sparse warning: | drivers/usb/storage/onetouch.c:72:22: warning: symbol | 'onetouch_usb_ids' was not declared. Should it | be static? Signed-off-by:
Felipe Balbi <balbi@ti.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Felipe Balbi authored
Fix the following sparse warning: | drivers/usb/storage/karma.c:62:22: warning: symbol | 'karma_usb_ids' was not declared. Should it | be static? Signed-off-by:
Felipe Balbi <balbi@ti.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Felipe Balbi authored
Fix the following sparse warning: | drivers/usb/storage/jumpshot.c:74:22: warning: symbol | 'jumpshot_usb_ids' was not declared. Should it | be static? Signed-off-by:
Felipe Balbi <balbi@ti.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Felipe Balbi authored
Fix the following sparse warning: | drivers/usb/storage/freecom.c:122:22: warning: symbol | 'freecom_usb_ids' was not declared. Should it | be static? Signed-off-by:
Felipe Balbi <balbi@ti.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Felipe Balbi authored
Fix the following sparse warning: | drivers/usb/storage/freecom.c:122:22: warning: symbol | 'freecom_usb_ids' was not declared. Should it | be static? Signed-off-by:
Felipe Balbi <balbi@ti.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-