This change adds support to keep track of total time spent by a SKB in
UL and DL directions. Timestamps are recorded per SKB for the complete
life cycle at following stages:-
1) Creation: At the time of SKB allocation.
2) Submission: While SKB being submitted to HSIC HW by bridge driver/
HSUSB Core by rmnet gadget driver.
3) Completion: In completion handler of the driver(bridge driver/
gadget rmnet driver).
4) Sent: While sending SKB to bridge driver/rmnet gadget driver.
5) Queued: While SKB being queued to HSIC HW by bridge driver/
HSUSB Core by rmnet gadget driver.
6) Done: In completion handler while freeing the SKB.
debugfs node /sys/kernel/debug/data_hsic_bridge/timestamp represents the
listing of timestamp for last 34 SKBs submitted in UL direction.
debugfs node /sys/kernel/debug/ghsic_data_xport/timestamp represents the
listing of timestamp for last 34 SKBs submitted in DL direction.
Recording of the time stamp is controlled by the module parameter in
rmnet bridge driver and rmnet gadget driver.
To enable the recording of timestamp in rmnet bridge driver
echo 1 > /sys/module/mdm_bridge/parameters/record_timestamp
To enable the recording of timestamp in rmnet gadget driver
echo 1 > /sys/module/g_android/parameters/record_timestamp
Change-Id: I10e7c171eec6a01afbd48328ba006f776370ac92
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Rmnet bridge driver sets IOC bit for every URB having IP
packet data in TX direction. This causes the driver to spend
more time in servicing interrupts which degrades the over all
performance of the driver. Hence reduce the number of interrupts
in TX data path by setting URB_NO_INTERRUPT flag for certain number
of urbs submitted.
Change-Id: I784ffca6d97acffd6eed49f68f0b8c30a9b2f0e4
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
When a write callback returns -EPROTO, treat it as if the device is
disconnected and disallow further calls to write. This will allow the
caller to gracefully handle the error until a disconnect event finally
comes and is able to notify the caller via a platform_device removal.
Change-Id: Ic780281cb5486cb5177cd642d244d2451fde1d07
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
mdm bridge control driver increments the PM usage counter before
submitting the tx URB, but counter was never decremented after that,
which prevents the device from entering suspend.
Change-Id: I3bf9cf0de876a53c21cc0edd8fdeeb0fe20a4905
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
mdm_data bridge driver maintains a list of idle rx URBs. Instead of
immediately freeing the URB upon failure in submit_rx_urb(), which
would decrease the number of available requests, put it back in the idle
rx list to allow for later attempts.
Change-Id: I14c42d25e224a40ebd733c94fe3579156d9e5ab8
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
mdm_bridge driver currently supports PID 0x9048 for DUN and tethered
rmnet interfaces. Add support to handle multiple PIDs (i.e. 0x9001
and 0x9034).
Change-Id: Id6135d1df282f82c4646af4a0435211c62e87ac7
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Add support for relaying the MDM 9k diag traffic over HSIC
to the USB DIAG MDM channel and vice versa. Also modify usb
diag_bridge to use signed parameters for buffer sizes. This
is especially needed for the final parameter of the read
and write callbacks, wherein a negative errno value may be
passed to convey an error.
Change-Id: Ifa516356a5d72597d82929a56d714f8dfb2964de
Signed-off-by: Dixon Peterson <dixonp@codeaurora.org>
mdm9x15 default composition changed from 0x9001 to 0x9048 to include
new serial interfaces and additional rmnet interfaces. Hence update the
PID for mdm_bridge, diag_bridge, embedded rmnet drivers to support new
composition.
Change-Id: I5c3778ef6b8fddd07d1a0789213e4b289ccc7567
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
rx_done queue length was checked only when rx throttle condition was true.
rx throttle condition is asynchronous because of which sometimes queue
length value becomes much larger than stop_submit_urb_limit when rx
throttled condition is false. Hence check the queue length irrespective of
the rx throttle condition before submitting the rx urb. Also increase the
stop_submit_urb_limit to same as the flow control enable threshold value
in downlink direction.
Change-Id: I3dd915b04bfe7640a98e40809831a7b45c39dfd7
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Bridge driver probe was returning 0 (success) for unsupported
interfaces. This caused probe for other interface drivers
not getting called. Hence return -ENODEV for unsupported interfaces.
Change-Id: I88fef382d378e4c71488983f134b680e7003be77
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
This gives platform drivers a chance to do proper cleanup, especially
if they call ctrl_bridge_close which needs to access several of the
structure's members.
Change-Id: I56f36ff105ec131e560ea8a436a89316f6f88974
Signed-off-by: Jack Pham <jackp@codeaurora.org>
When a read or write callback returns -EPROTO, treat it as if the
device is disconnected and disallow further calls to read and write
by returning -ESHUTDOWN. This will allow the caller to gracefully
handle the error until a disconnect event finally comes and is able
to notify the caller via a platform_device removal.
Change-Id: I65cab1ea94e529743cba695e3c510c501a0e388e
Signed-off-by: Jack Pham <jackp@codeaurora.org>
diag_bridge_read and diag_bridge_write can potentially be called within
interrupt context so change allocation flags to GFP_ATOMIC to accommodate
those cases.
Change-Id: I065efea3264038670745ad6c51fc5def72ac3b76
Signed-off-by: Jack Pham <jackp@codeaurora.org>
The id_table array passed to usb_register was missing a terminating entry.
This caused this driver's probe function to be called whenever any device
was hotplugged.
Change-Id: I290f0e1d609ffc08b740d736dcbe7fcea339fb88
Signed-off-by: Jack Pham <jackp@codeaurora.org>
This host driver will be used to communicate with modem devices
with dial up network and RMNET interfaces. This driver works as
a bridge to pass control and data packets between the modem and
peripheral usb gadget driver. Driver currently supports
modem devices (vendor ID 0x05c6) with PIDs 0x9001
Change-Id: Id85b552b39d061528a1c3c90a354d73580c9b631
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Signed-off-by: Jack Pham <jackp@codeaurora.org>
This will hopefully disambiguate naming clashes between this bridge
driver and existing DIAG drivers.
* Rename diag_usb.c to diag_bridge.c
* Rename diag_{open,close,read,write} to diag_bridge_*
* Rename Kconfig symbol
* Fix module build
Change-Id: Ia5b4884a7d85e2fa8f8c3865044a074a51e84adc
Signed-off-by: Jack Pham <jackp@codeaurora.org>
qcserial driver provides generic interface for gobi serial
drivers(diag, dun, nmea, etc). For Fusion 3/2.5, most of the
serial drivers are bridged directly to peripheral usb drivers
and default pid being used is 9001. Remove 9001 from qcserial
pid list till a new pid is supported for fusion 3/2.5 platform.
Change-Id: Iff8769677b093199b9ed21bd736d1d0c9a8364de
Signed-off-by: Vamsi Krishna <vskrishn@codeaurora.org>
This host driver will be used to connect directly to the modem
interface of Qualcomm devices. This will provide a bridge to
the gadget serial driver to enable dial-up networking. Though it
resembles the existing qcserial driver, this is intended only for
inter-driver usage and does not expose any interface to userland.
Change-Id: I8534a2eb0c6b747ff593f7e2efdb56da9ea6dddc
Signed-off-by: Jack Pham <jackp@codeaurora.org>
USB diag host driver will be used to connect diag interface
exposed by Qualcomm devices. This driver currently supports
usb qualcomm devices with product id: 9001 and vendor id:
0x5c6. Also add simple unit test driver to test diag host
driver.
Signed-off-by: Vamsi Krishna <vskrishn@codeaurora.org>
Signed-off-by: Jack Pham <jackp@codeaurora.org>
* 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (205 commits)
USB: EHCI: Remove SPARC_LEON {read,write}_be definitions from ehci.h
USB: UHCI: Support big endian GRUSBHC HC
sparc: add {read,write}*_be routines
USB: UHCI: Add support for big endian descriptors
USB: UHCI: Use ACCESS_ONCE rather than using a full compiler barrier
USB: UHCI: Add support for big endian mmio
usb-storage: Correct adjust_quirks to include latest flags
usb/isp1760: Fix possible unlink problems
usb/isp1760: Move function isp1760_endpoint_disable() within file.
USB: remove remaining usages of hcd->state from usbcore and fix regression
usb: musb: ux500: add configuration and build options for ux500 dma
usb: musb: ux500: add dma glue layer for ux500
usb: musb: ux500: add dma name for ux500
usb: musb: ux500: add ux500 specific code for gadget side
usb: musb: fix compile error
usb-storage: fix up the unusual_realtek device list
USB: gadget: f_audio: Fix invalid dereference of initdata
EHCI: don't rescan interrupt QHs needlessly
OHCI: fix regression caused by nVidia shutdown workaround
USB: OTG: msm: Free VCCCX regulator even if we can't set the voltage
...
On amd64 unsigned is not as wide as pointer and this causes a compiler
warning. Switching to unsigned long corrects the problem.
Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Added several new devices to ldusb and excluded them from the HID driver.
Signed-off-by: Michael Hund <mhund@ld-didactic.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch (as1452b) adds a new test case to the usbtest driver. Test
24 exercises the unlink-from-queue pathways in the host. It queues a
user-specified number of bulk-OUT URBs of user-specified size, unlinks
the fourth- and second-from-last URBs in the queue, and then waits to
see if all the URBs complete in the expected way (except of course
that the unlinked URBs might complete normally, if they weren't
unlinked soon enough).
This new test has confirmed the existence of a bug in the ehci-hcd
driver, to be fixed by a separate patch.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
My testprog do a lot of bitbang - after hours i got following warning and my machine lockups:
WARNING: at /build/buildd/linux-2.6.38/lib/kref.c:34
After debugging uss720 driver i discovered that the completion callback was called before
usb_submit_urb returns. The callback frees the request structure that is krefed on return by
usb_submit_urb.
Signed-off-by: Peter Holik <peter@holik.at>
Acked-by: Thomas Sailer <t.sailer@alumni.ethz.ch>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is needed to resolve some merge conflicts that were found
in the USB host controller patches, and reported by Stephen Rothwell.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Add a set of new tests similar to the existing ones but using
transfer buffers at an "odd" address [ie offset of +1 from
the buffer obtained by kmalloc() or usb_alloc_coherent()]
The new tests are:
#17 : bulk out (like #1) using kmalloc and DMA mapping by USB core.
#18 : bulk in (like #2) using kmalloc and DMA mapping by USB core.
#19 : bulk out (like #1) using usb_alloc_coherent()
#20 : bulk in (like #2) using usb_alloc_coherent()
#21 : control write (like #14)
#22 : isochonous out (like #15)
#23 : isochonous in (like #16)
Signed-off-by: Martin Fuzzey <mfuzzey@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Commit ecc1624a2f (USB: misc: uss720.c: add
another vendor/product ID) duplicated entry in the driver's USB device ID
table. Remove the duplicate.
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
If case of an unknown usb_device_id->driver_info (which could only
occur if the info got corrupted somewhere outside the usbled driver),
a debug message depended on an uninitialized value. This was harmless,
but ugly, and gets fixed with this patch.
Signed-off-by: Melchior FRANZ <mfranz@aon.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is to resolve the conflict in the file,
drivers/usb/gadget/composite.c that was due to a revert in Linus's tree
needed for the 2.6.37 release.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Conflicts:
MAINTAINERS
arch/arm/mach-omap2/pm24xx.c
drivers/scsi/bfa/bfa_fcpim.c
Needed to update to apply fixes for which the old branch was too
outdated.
So far the USBLED driver only supports Delcom's "USB Visual Signal
Indicator" (http://www.delcomproducts.com/products_USBLMP.asp). The
driver generates virtual files "red", "green", and "blue" under the
device's /sys/ directory, where color values can be read from and
written to.
This patch adds support for Dream Cheeky's "DL100B Webmail Notifier"
(http://www.dreamcheeky.com/webmail-notifier -- available from several
shops, such as http://www.conrad.at/ce/de/product/777048/USB-WEBMAIL).
This device isn't as pretty as Delcom's, but it's *far* cheaper, and
its 3 LEDs can be set in 32 brightness steps each. The grey envelope
contour can easily be removed, leaving a rather neutral white box (with
a few small holes), which is useful for generic signalling purposes.
Of course, the small circuit board can easily be put into a prettier
case.
The DL100B device pretends to be a HID, but the HID descriptor shows
that it's not overly useful as such (see below). The patch therefore
removes the "HID-ness" (hid-core.c, hid-ids.h), and adds the necessary
commands to usbled.c. The protocol info comes from the developer's
manual that Dream Cheeky kindly provided (815DeveloperManual.pdf).
HID descriptor:
0: 05 01 Usage Page 'Generic Desktop Controls'
2: 09 10 Usage 'Reserved'
4: a1 01 Collection 'Application (mouse, keyboard)'
6: 05 00 Usage Page 'Undefined'
8: 19 10 Usage Minimum = 16
10: 29 11 Usage Maximum = 17
12: 15 00 Logical Minimum = 0
14: 25 0f Logical Maximum = 15
16: 75 08 Report Size = 8
18: 95 08 Report Count = 8
20: 91 02 Output data *var abs lin pref-state null-pos non-vol bit-field
22: 19 10 Usage Minimum = 16
24: 29 11 Usage Maximum = 17
26: 15 00 Logical Minimum = 0
28: 25 0f Logical Maximum = 15
30: 75 08 Report Size = 8
32: 95 08 Report Count = 8
34: 81 00 Input data array abs lin pref-state null-pos non-vol bit-field
36: c0 End Collection
Signed-off-by: Melchior FRANZ <mfranz@aon.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Fabio Battaglia report that he has another cable that works with this
driver, so this patch adds its vendor/product ID.
Signed-off-by: Thomas Sailer <t.sailer@alumni.ethz.ch>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Default llseek operation behavior was changed by the patch named
"vfs: make no_llseek the default" after the yurex driver had been merged,
so the llseek to yurex is now ignored.
This patch add llseek fop with default_llseek to yurex driver
to catch up to the change.
Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>