Skip to content

Commit 9fc3777

Browse files
committed
Merge tag 'usb-3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB patches from Greg Kroah-Hartman: "Here's the big USB patch set for the 3.6-rc1 merge window. Lots of little changes in here, primarily for gadget controllers and drivers. There's some scsi changes that I think also went in through the scsi tree, but they merge just fine. All of these patches have been in the linux-next tree for a while now. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>" Fix up trivial conflicts in include/scsi/scsi_device.h (same libata conflict that Jeff had already encountered) * tag 'usb-3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (207 commits) usb: Add USB_QUIRK_RESET_RESUME for all Logitech UVC webcams usb: Add quirk detection based on interface information usb: s3c-hsotg: Add header file protection macros in s3c-hsotg.h USB: ehci-s5p: Add vbus setup function to the s5p ehci glue layer USB: add USB_VENDOR_AND_INTERFACE_INFO() macro USB: notify phy when root hub port connect change USB: remove 8 bytes of padding from usb_host_interface on 64 bit builds USB: option: add ZTE MF821D USB: sierra: QMI mode MC7710 moved to qcserial USB: qcserial: adding Sierra Wireless devices USB: qcserial: support generic Qualcomm serial ports USB: qcserial: make probe more flexible USB: qcserial: centralize probe exit path USB: qcserial: consolidate usb_set_interface calls USB: ehci-s5p: Add support for device tree USB: ohci-exynos: Add support for device tree USB: ehci-omap: fix compile failure(v1) usb: host: tegra: pass correct pointer in ehci_setup() USB: ehci-fsl: Update ifdef check to work on 64-bit ppc USB: serial: keyspan: Removed unrequired parentheses. ...
2 parents 5e23ae4 + e387ef5 commit 9fc3777

159 files changed

Lines changed: 8026 additions & 4109 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Documentation/ABI/testing/sysfs-bus-usb‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,3 +208,15 @@ Description:
208208
such as ACPI. This file will read either "removable" or
209209
"fixed" if the information is available, and "unknown"
210210
otherwise.
211+
212+
What: /sys/bus/usb/devices/.../ltm_capable
213+
Date: July 2012
214+
Contact: Sarah Sharp <sarah.a.sharp@linux.intel.com>
215+
Description:
216+
USB 3.0 devices may optionally support Latency Tolerance
217+
Messaging (LTM). They indicate their support by setting a bit
218+
in the bmAttributes field of their SuperSpeed BOS descriptors.
219+
If that bit is set for the device, ltm_capable will read "yes".
220+
If the device doesn't support LTM, the file will read "no".
221+
The file will be present for all speeds of USB devices, and will
222+
always read "no" for USB 1.1 and USB 2.0 devices.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
* Freescale i.MX ci13xxx usb controllers
2+
3+
Required properties:
4+
- compatible: Should be "fsl,imx27-usb"
5+
- reg: Should contain registers location and length
6+
- interrupts: Should contain controller interrupt
7+
8+
Optional properties:
9+
- fsl,usbphy: phandler of usb phy that connects to the only one port
10+
- vbus-supply: regulator for vbus
11+
12+
Examples:
13+
usb@02184000 { /* USB OTG */
14+
compatible = "fsl,imx6q-usb", "fsl,imx27-usb";
15+
reg = <0x02184000 0x200>;
16+
interrupts = <0 43 0x04>;
17+
fsl,usbphy = <&usbphy1>;
18+
};
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
* Freescale MXS USB Phy Device
2+
3+
Required properties:
4+
- compatible: Should be "fsl,imx23-usbphy"
5+
- reg: Should contain registers location and length
6+
- interrupts: Should contain phy interrupt
7+
8+
Example:
9+
usbphy1: usbphy@020c9000 {
10+
compatible = "fsl,imx6q-usbphy", "fsl,imx23-usbphy";
11+
reg = <0x020c9000 0x1000>;
12+
interrupts = <0 44 0x04>;
13+
};

‎Documentation/usb/mass-storage.txt‎

Lines changed: 226 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,226 @@
1+
* Overview
2+
3+
Mass Storage Gadget (or MSG) acts as a USB Mass Storage device,
4+
appearing to the host as a disk or a CD-ROM drive. It supports
5+
multiple logical units (LUNs). Backing storage for each LUN is
6+
provided by a regular file or a block device, access can be limited
7+
to read-only, and gadget can indicate that it is removable and/or
8+
CD-ROM (the latter implies read-only access).
9+
10+
Its requirements are modest; only a bulk-in and a bulk-out endpoint
11+
are needed. The memory requirement amounts to two 16K buffers.
12+
Support is included for full-speed, high-speed and SuperSpeed
13+
operation.
14+
15+
Note that the driver is slightly non-portable in that it assumes
16+
a single memory/DMA buffer will be useable for bulk-in and bulk-out
17+
endpoints. With most device controllers this is not an issue, but
18+
there may be some with hardware restrictions that prevent a buffer
19+
from being used by more than one endpoint.
20+
21+
This document describes how to use the gadget from user space, its
22+
relation to mass storage function (or MSF) and different gadgets
23+
using it, and how it differs from File Storage Gadget (or FSG). It
24+
will talk only briefly about how to use MSF within composite
25+
gadgets.
26+
27+
* Module parameters
28+
29+
The mass storage gadget accepts the following mass storage specific
30+
module parameters:
31+
32+
- file=filename[,filename...]
33+
34+
This parameter lists paths to files or block devices used for
35+
backing storage for each logical unit. There may be at most
36+
FSG_MAX_LUNS (8) LUNs set. If more files are specified, they will
37+
be silently ignored. See also “luns” parameter.
38+
39+
*BEWARE* that if a file is used as a backing storage, it may not
40+
be modified by any other process. This is because the host
41+
assumes the data does not change without its knowledge. It may be
42+
read, but (if the logical unit is writable) due to buffering on
43+
the host side, the contents are not well defined.
44+
45+
The size of the logical unit will be rounded down to a full
46+
logical block. The logical block size is 2048 bytes for LUNs
47+
simulating CD-ROM, block size of the device if the backing file is
48+
a block device, or 512 bytes otherwise.
49+
50+
- removable=b[,b...]
51+
52+
This parameter specifies whether each logical unit should be
53+
removable. “b” here is either “y”, “Y” or “1” for true or “n”,
54+
“N” or “0” for false.
55+
56+
If this option is set for a logical unit, gadget will accept an
57+
“eject” SCSI request (Start/Stop Unit). When it is sent, the
58+
backing file will be closed to simulate ejection and the logical
59+
unit will not be mountable by the host until a new backing file is
60+
specified by userspace on the device (see “sysfs entries”
61+
section).
62+
63+
If a logical unit is not removable (the default), a backing file
64+
must be specified for it with the “file” parameter as the module
65+
is loaded. The same applies if the module is built in, no
66+
exceptions.
67+
68+
The default value of the flag is false, *HOWEVER* it used to be
69+
true. This has been changed to better match File Storage Gadget
70+
and because it seems like a saner default after all. Thus to
71+
maintain compatibility with older kernels, it's best to specify
72+
the default values. Also, if one relied on old default, explicit
73+
“n” needs to be specified now.
74+
75+
Note that “removable” means the logical unit's media can be
76+
ejected or removed (as is true for a CD-ROM drive or a card
77+
reader). It does *not* mean that the entire gadget can be
78+
unplugged from the host; the proper term for that is
79+
“hot-unpluggable”.
80+
81+
- cdrom=b[,b...]
82+
83+
This parameter specifies whether each logical unit should simulate
84+
CD-ROM. The default is false.
85+
86+
- ro=b[,b...]
87+
88+
This parameter specifies whether each logical unit should be
89+
reported as read only. This will prevent host from modifying the
90+
backing files.
91+
92+
Note that if this flag for given logical unit is false but the
93+
backing file could not be opened in read/write mode, the gadget
94+
will fall back to read only mode anyway.
95+
96+
The default value for non-CD-ROM logical units is false; for
97+
logical units simulating CD-ROM it is forced to true.
98+
99+
- nofua=b[,b...]
100+
101+
This parameter specifies whether FUA flag should be ignored in SCSI
102+
Write10 and Write12 commands sent to given logical units.
103+
104+
MS Windows mounts removable storage in “Removal optimised mode” by
105+
default. All the writes to the media are synchronous, which is
106+
achieved by setting the FUA (Force Unit Access) bit in SCSI
107+
Write(10,12) commands. This forces each write to wait until the
108+
data has actually been written out and prevents I/O requests
109+
aggregation in block layer dramatically decreasing performance.
110+
111+
Note that this may mean that if the device is powered from USB and
112+
the user unplugs the device without unmounting it first (which at
113+
least some Windows users do), the data may be lost.
114+
115+
The default value is false.
116+
117+
- luns=N
118+
119+
This parameter specifies number of logical units the gadget will
120+
have. It is limited by FSG_MAX_LUNS (8) and higher value will be
121+
capped.
122+
123+
If this parameter is provided, and the number of files specified
124+
in “file” argument is greater then the value of “luns”, all excess
125+
files will be ignored.
126+
127+
If this parameter is not present, the number of logical units will
128+
be deduced from the number of files specified in the “file”
129+
parameter. If the file parameter is missing as well, one is
130+
assumed.
131+
132+
- stall=b
133+
134+
Specifies whether the gadget is allowed to halt bulk endpoints.
135+
The default is determined according to the type of USB device
136+
controller, but usually true.
137+
138+
In addition to the above, the gadget also accepts the following
139+
parameters defined by the composite framework (they are common to
140+
all composite gadgets so just a quick listing):
141+
142+
- idVendor -- USB Vendor ID (16 bit integer)
143+
- idProduct -- USB Product ID (16 bit integer)
144+
- bcdDevice -- USB Device version (BCD) (16 bit integer)
145+
- iManufacturer -- USB Manufacturer string (string)
146+
- iProduct -- USB Product string (string)
147+
- iSerialNumber -- SerialNumber string (sting)
148+
149+
* sysfs entries
150+
151+
For each logical unit, the gadget creates a directory in the sysfs
152+
hierarchy. Inside of it the following three files are created:
153+
154+
- file
155+
156+
When read it returns the path to the backing file for the given
157+
logical unit. If there is no backing file (possible only if the
158+
logical unit is removable), the content is empty.
159+
160+
When written into, it changes the backing file for given logical
161+
unit. This change can be performed even if given logical unit is
162+
not specified as removable (but that may look strange to the
163+
host). It may fail, however, if host disallowed medium removal
164+
with the Prevent-Allow Medium Removal SCSI command.
165+
166+
- ro
167+
168+
Reflects the state of ro flag for the given logical unit. It can
169+
be read any time, and written to when there is no backing file
170+
open for given logical unit.
171+
172+
- nofua
173+
174+
Reflects the state of nofua flag for given logical unit. It can
175+
be read and written.
176+
177+
Other then those, as usual, the values of module parameters can be
178+
read from /sys/module/g_mass_storage/parameters/* files.
179+
180+
* Other gadgets using mass storage function
181+
182+
The Mass Storage Gadget uses the Mass Storage Function to handle
183+
mass storage protocol. As a composite function, MSF may be used by
184+
other gadgets as well (eg. g_multi and acm_ms).
185+
186+
All of the information in previous sections are valid for other
187+
gadgets using MSF, except that support for mass storage related
188+
module parameters may be missing, or the parameters may have
189+
a prefix. To figure out whether any of this is true one needs to
190+
consult the gadget's documentation or its source code.
191+
192+
For examples of how to include mass storage function in gadgets, one
193+
may take a look at mass_storage.c, acm_ms.c and multi.c (sorted by
194+
complexity).
195+
196+
* Relation to file storage gadget
197+
198+
The Mass Storage Function and thus the Mass Storage Gadget has been
199+
based on the File Storage Gadget. The difference between the two is
200+
that MSG is a composite gadget (ie. uses the composite framework)
201+
while file storage gadget is a traditional gadget. From userspace
202+
point of view this distinction does not really matter, but from
203+
kernel hacker's point of view, this means that (i) MSG does not
204+
duplicate code needed for handling basic USB protocol commands and
205+
(ii) MSF can be used in any other composite gadget.
206+
207+
Because of that, File Storage Gadget has been deprecated and
208+
scheduled to be removed in Linux 3.8. All users need to transition
209+
to the Mass Storage Gadget by that time. The two gadgets behave
210+
mostly the same from the outside except:
211+
212+
1. In FSG the “removable” and “cdrom” module parameters set the flag
213+
for all logical units whereas in MSG they accept a list of y/n
214+
values for each logical unit. If one uses only a single logical
215+
unit this does not matter, but if there are more, the y/n value
216+
needs to be repeated for each logical unit.
217+
218+
2. FSG's “serial”, “vendor”, “product” and “release” module
219+
parameters are handled in MSG by the composite layer's parameters
220+
named respectively: “iSerialnumber”, “idVendor”, “idProduct” and
221+
“bcdDevice”.
222+
223+
3. MSG does not support FSG's test mode, thus “transport”,
224+
“protocol” and “buflen” FSG's module parameters are not
225+
supported. MSG always uses SCSI protocol with bulk only
226+
transport mode and 16 KiB buffers.

‎arch/arm/mach-omap2/clock3xxx_data.c‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3376,15 +3376,15 @@ static struct omap_clk omap3xxx_clks[] = {
33763376
CLK(NULL, "usbhost_48m_fck", &usbhost_48m_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
33773377
CLK(NULL, "usbhost_ick", &usbhost_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
33783378
CLK("usbhs_omap", "usbhost_ick", &usbhost_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
3379-
CLK("usbhs_omap", "utmi_p1_gfclk", &dummy_ck, CK_3XXX),
3380-
CLK("usbhs_omap", "utmi_p2_gfclk", &dummy_ck, CK_3XXX),
3381-
CLK("usbhs_omap", "xclk60mhsp1_ck", &dummy_ck, CK_3XXX),
3382-
CLK("usbhs_omap", "xclk60mhsp2_ck", &dummy_ck, CK_3XXX),
3383-
CLK("usbhs_omap", "usb_host_hs_utmi_p1_clk", &dummy_ck, CK_3XXX),
3384-
CLK("usbhs_omap", "usb_host_hs_utmi_p2_clk", &dummy_ck, CK_3XXX),
3379+
CLK(NULL, "utmi_p1_gfclk", &dummy_ck, CK_3XXX),
3380+
CLK(NULL, "utmi_p2_gfclk", &dummy_ck, CK_3XXX),
3381+
CLK(NULL, "xclk60mhsp1_ck", &dummy_ck, CK_3XXX),
3382+
CLK(NULL, "xclk60mhsp2_ck", &dummy_ck, CK_3XXX),
3383+
CLK(NULL, "usb_host_hs_utmi_p1_clk", &dummy_ck, CK_3XXX),
3384+
CLK(NULL, "usb_host_hs_utmi_p2_clk", &dummy_ck, CK_3XXX),
33853385
CLK("usbhs_omap", "usb_tll_hs_usb_ch0_clk", &dummy_ck, CK_3XXX),
33863386
CLK("usbhs_omap", "usb_tll_hs_usb_ch1_clk", &dummy_ck, CK_3XXX),
3387-
CLK("usbhs_omap", "init_60m_fclk", &dummy_ck, CK_3XXX),
3387+
CLK(NULL, "init_60m_fclk", &dummy_ck, CK_3XXX),
33883388
CLK(NULL, "usim_fck", &usim_fck, CK_3430ES2PLUS | CK_36XX),
33893389
CLK(NULL, "gpt1_fck", &gpt1_fck, CK_3XXX),
33903390
CLK(NULL, "wkup_32k_fck", &wkup_32k_fck, CK_3XXX),

‎drivers/power/ab8500_charger.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2517,7 +2517,7 @@ static int __devexit ab8500_charger_remove(struct platform_device *pdev)
25172517
dev_err(di->dev, "%s mask and set failed\n", __func__);
25182518

25192519
usb_unregister_notifier(di->usb_phy, &di->nb);
2520-
usb_put_transceiver(di->usb_phy);
2520+
usb_put_phy(di->usb_phy);
25212521

25222522
/* Delete the work queue */
25232523
destroy_workqueue(di->charger_wq);
@@ -2688,8 +2688,8 @@ static int __devinit ab8500_charger_probe(struct platform_device *pdev)
26882688
goto free_ac;
26892689
}
26902690

2691-
di->usb_phy = usb_get_transceiver();
2692-
if (!di->usb_phy) {
2691+
di->usb_phy = usb_get_phy(USB_PHY_TYPE_USB2);
2692+
if (IS_ERR_OR_NULL(di->usb_phy)) {
26932693
dev_err(di->dev, "failed to get usb transceiver\n");
26942694
ret = -EINVAL;
26952695
goto free_usb;
@@ -2747,7 +2747,7 @@ static int __devinit ab8500_charger_probe(struct platform_device *pdev)
27472747
free_irq(irq, di);
27482748
}
27492749
put_usb_phy:
2750-
usb_put_transceiver(di->usb_phy);
2750+
usb_put_phy(di->usb_phy);
27512751
free_usb:
27522752
power_supply_unregister(&di->usb_chg.psy);
27532753
free_ac:

‎drivers/power/isp1704_charger.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -415,8 +415,8 @@ static int __devinit isp1704_charger_probe(struct platform_device *pdev)
415415
if (!isp)
416416
return -ENOMEM;
417417

418-
isp->phy = usb_get_transceiver();
419-
if (!isp->phy)
418+
isp->phy = usb_get_phy(USB_PHY_TYPE_USB2);
419+
if (IS_ERR_OR_NULL(isp->phy))
420420
goto fail0;
421421

422422
isp->dev = &pdev->dev;
@@ -475,7 +475,7 @@ static int __devinit isp1704_charger_probe(struct platform_device *pdev)
475475
power_supply_unregister(&isp->psy);
476476
fail1:
477477
isp1704_charger_set_power(isp, 0);
478-
usb_put_transceiver(isp->phy);
478+
usb_put_phy(isp->phy);
479479
fail0:
480480
kfree(isp);
481481

@@ -490,7 +490,7 @@ static int __devexit isp1704_charger_remove(struct platform_device *pdev)
490490

491491
usb_unregister_notifier(isp->phy, &isp->nb);
492492
power_supply_unregister(&isp->psy);
493-
usb_put_transceiver(isp->phy);
493+
usb_put_phy(isp->phy);
494494
isp1704_charger_set_power(isp, 0);
495495
kfree(isp);
496496

0 commit comments

Comments
 (0)