linux-sg2042/include/linux/usb
Ming Lei 4b49f58fff usbnet: handle link change
The link change is detected via the interrupt pipe, and bulk
pipes are responsible for transfering packets, so it is reasonable
to stop bulk transfer after link is reported as off.

Two adavantages may be obtained with stopping bulk transfer
after link becomes off:

- USB bus bandwidth is saved(USB bus is shared bus except for
USB3.0), for example, lots of 'IN' token packets and 'NYET'
handshake packets is transfered on 2.0 bus.

- probabaly power might be saved for usb host controller since
cancelling bulk transfer may disable the asynchronous schedule of
host controller.

With this patch, when link becomes off, about ~10% performance
boost can be found on bulk transfer of anther usb device which
is attached to same bus with the usbnet device, see below
test on next-20130410:

- read from usb mass storage(Sandisk Extreme USB 3.0) on pandaboard
with below command after unplugging ethernet cable:

	dd if=/dev/sda iflag=direct of=/dev/null bs=1M count=800

- without the patch
1, 838860800 bytes (839 MB) copied, 36.2216 s, 23.2 MB/s
2, 838860800 bytes (839 MB) copied, 35.8368 s, 23.4 MB/s
3, 838860800 bytes (839 MB) copied, 35.823 s, 23.4 MB/s
4, 838860800 bytes (839 MB) copied, 35.937 s, 23.3 MB/s
5, 838860800 bytes (839 MB) copied, 35.7365 s, 23.5 MB/s
average: 23.6MB/s

- with the patch
1, 838860800 bytes (839 MB) copied, 32.3817 s, 25.9 MB/s
2, 838860800 bytes (839 MB) copied, 31.7389 s, 26.4 MB/s
3, 838860800 bytes (839 MB) copied, 32.438 s, 25.9 MB/s
4, 838860800 bytes (839 MB) copied, 32.5492 s, 25.8 MB/s
5, 838860800 bytes (839 MB) copied, 31.6178 s, 26.5 MB/s
average: 26.1MB/s

Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-11 15:57:32 -04:00
..
association.h
atmel_usba_udc.h
audio-v2.h
audio.h UAPI: (Scripted) Disintegrate include/linux/usb 2012-10-09 09:49:07 +01:00
c67x00.h
cdc-wdm.h
cdc_ncm.h net: cdc_ncm, cdc_mbim: allow user to prefer NCM for backwards compatibility 2013-03-17 11:59:03 -04:00
ch9.h UAPI: (Scripted) Disintegrate include/linux/usb 2012-10-09 09:49:07 +01:00
chipidea.h
composite.h usb: gadget: composite: fix kernel-doc warnings 2013-03-05 13:15:00 +02:00
dwc3-omap.h usb: dwc3: omap: Add an API to write to dwc mailbox 2013-01-25 09:17:09 +02:00
ehci_def.h USB: EHCI: Tegra: Fix wrong register definition 2012-09-18 17:40:56 +01:00
ehci_pdriver.h USB: EHCI: remove ehci_port_power() routine 2012-10-31 12:48:07 -07:00
ezusb.h USB: ezusb: unexport some functions that aren't being used 2012-10-24 14:19:16 -07:00
functionfs.h UAPI: (Scripted) Disintegrate include/linux/usb 2012-10-09 09:49:07 +01:00
g_hid.h
gadget.h usb: gadget: completely remove ->start/->stop 2013-01-24 21:11:32 +02:00
gpio_vbus.h
hcd.h usb: add find_raw_port_number callback to struct hc_driver() 2013-03-25 10:39:17 -07:00
input.h
intel_mid_otg.h
iowarrior.h
irda.h
isp116x.h
isp1301.h
isp1362.h
isp1760.h
m66592.h
msm_hsusb.h
msm_hsusb_hw.h
musb-omap.h
musb.h ARM: OMAP2: MUSB: Specify omap4 has mailbox 2013-02-06 11:40:13 -08:00
net2280.h
nop-usb-xceiv.h usb: xceiv: nop: let it work as USB2 and USB3 phy 2012-08-03 09:36:19 +03:00
ohci_pdriver.h USB: ohci: allow platform driver to specify the number of ports 2012-10-22 11:23:59 -07:00
omap_control_usb.h usb: omap_control_usb: fix compile warning 2013-02-06 11:40:14 -08:00
omap_usb.h usb: phy: add a new driver for usb3 phy 2013-01-25 13:02:50 +02:00
otg.h usb: phy: fix build break 2012-09-06 16:01:11 +03:00
phy.h usb: otg: add device tree support to otg library 2013-01-25 10:20:14 +02:00
phy_companion.h usb: phy: add a new driver for omap usb2 phy 2012-09-06 20:14:53 +03:00
quirks.h usb: convert USB_QUIRK_RESET_MORPHS to USB_QUIRK_RESET 2012-08-20 14:38:08 -07:00
r8a66597.h
renesas_usbhs.h
rndis_host.h
samsung_usb_phy.h ARM: EXYNOS: Update & move usb-phy types to generic include layer 2013-01-23 13:39:07 +02:00
serial.h USB: serial: add modem-status-change wait queue 2013-03-21 15:59:02 -07:00
sl811.h
storage.h
tegra_usb_phy.h usb: host: tegra: make use of PHY pointer of HCD 2013-01-28 11:42:11 -07:00
tilegx.h
uas.h
ulpi.h usb: ulpi: Define a *otg_ulpi_create no-op 2013-03-20 17:30:40 +02:00
usbnet.h usbnet: handle link change 2013-04-11 15:57:32 -04:00
wusb-wa.h
wusb.h