Skip to content

Commit e80dac1

Browse files
committed
Merge tag 'usb-4.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB fixes from Greg KH: "Here are a bunch (65) of USB fixes for 4.7-rc4. Sorry about the quantity, I've been slow in getting these out. The majority are the "normal" gadget, musb, and xhci fixes, that we all are used to. There are also a few other tiny fixes resolving a number of reported issues that showed up in 4.7-rc1. All of these have been in linux-next" * tag 'usb-4.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (65 commits) usbip: rate limit get_frame_number message usb: musb: sunxi: Remove bogus "Frees glue" comment usb: musb: sunxi: Fix NULL ptr deref when gadget is registered before musb usb: echi-hcd: Add ehci_setup check before echi_shutdown usb: host: ehci-msm: Conditionally call ehci suspend/resume MAINTAINERS: Add file patterns for usb device tree bindings usb: host: ehci-tegra: Avoid getting the same reset twice usb: host: ehci-tegra: Grab the correct UTMI pads reset USB: mos7720: delete parport USB: OHCI: Don't mark EDs as ED_OPER if scheduling fails phy: ti-pipe3: Program the DPLL even if it was already locked usb: musb: Stop bulk endpoint while queue is rotated usb: musb: Ensure rx reinit occurs for shared_fifo endpoints usb: musb: host: correct cppi dma channel for isoch transfer usb: musb: only restore devctl when session was set in backup usb: phy: Check initial state for twl6030 usb: musb: Use normal module_init for 2430 glue usb: musb: Remove pm_runtime_set_irq_safe usb: musb: Remove extra PM runtime calls from 2430 glue layer usb: musb: Return error value from musb_mailbox ...
2 parents a50094a + 083d5ad commit e80dac1

Some content is hidden

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

42 files changed

+573
-447
lines changed

Documentation/ABI/testing/configfs-usb-gadget-uvc

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
What: /config/usb-gadget/gadget/functions/uvc.name
22
Date: Dec 2014
3-
KernelVersion: 3.20
3+
KernelVersion: 4.0
44
Description: UVC function directory
55

66
streaming_maxburst - 0..15 (ss only)
@@ -9,37 +9,37 @@ Description: UVC function directory
99

1010
What: /config/usb-gadget/gadget/functions/uvc.name/control
1111
Date: Dec 2014
12-
KernelVersion: 3.20
12+
KernelVersion: 4.0
1313
Description: Control descriptors
1414

1515
What: /config/usb-gadget/gadget/functions/uvc.name/control/class
1616
Date: Dec 2014
17-
KernelVersion: 3.20
17+
KernelVersion: 4.0
1818
Description: Class descriptors
1919

2020
What: /config/usb-gadget/gadget/functions/uvc.name/control/class/ss
2121
Date: Dec 2014
22-
KernelVersion: 3.20
22+
KernelVersion: 4.0
2323
Description: Super speed control class descriptors
2424

2525
What: /config/usb-gadget/gadget/functions/uvc.name/control/class/fs
2626
Date: Dec 2014
27-
KernelVersion: 3.20
27+
KernelVersion: 4.0
2828
Description: Full speed control class descriptors
2929

3030
What: /config/usb-gadget/gadget/functions/uvc.name/control/terminal
3131
Date: Dec 2014
32-
KernelVersion: 3.20
32+
KernelVersion: 4.0
3333
Description: Terminal descriptors
3434

3535
What: /config/usb-gadget/gadget/functions/uvc.name/control/terminal/output
3636
Date: Dec 2014
37-
KernelVersion: 3.20
37+
KernelVersion: 4.0
3838
Description: Output terminal descriptors
3939

4040
What: /config/usb-gadget/gadget/functions/uvc.name/control/terminal/output/default
4141
Date: Dec 2014
42-
KernelVersion: 3.20
42+
KernelVersion: 4.0
4343
Description: Default output terminal descriptors
4444

4545
All attributes read only:
@@ -53,12 +53,12 @@ Description: Default output terminal descriptors
5353

5454
What: /config/usb-gadget/gadget/functions/uvc.name/control/terminal/camera
5555
Date: Dec 2014
56-
KernelVersion: 3.20
56+
KernelVersion: 4.0
5757
Description: Camera terminal descriptors
5858

5959
What: /config/usb-gadget/gadget/functions/uvc.name/control/terminal/camera/default
6060
Date: Dec 2014
61-
KernelVersion: 3.20
61+
KernelVersion: 4.0
6262
Description: Default camera terminal descriptors
6363

6464
All attributes read only:
@@ -75,12 +75,12 @@ Description: Default camera terminal descriptors
7575

7676
What: /config/usb-gadget/gadget/functions/uvc.name/control/processing
7777
Date: Dec 2014
78-
KernelVersion: 3.20
78+
KernelVersion: 4.0
7979
Description: Processing unit descriptors
8080

8181
What: /config/usb-gadget/gadget/functions/uvc.name/control/processing/default
8282
Date: Dec 2014
83-
KernelVersion: 3.20
83+
KernelVersion: 4.0
8484
Description: Default processing unit descriptors
8585

8686
All attributes read only:
@@ -94,49 +94,49 @@ Description: Default processing unit descriptors
9494

9595
What: /config/usb-gadget/gadget/functions/uvc.name/control/header
9696
Date: Dec 2014
97-
KernelVersion: 3.20
97+
KernelVersion: 4.0
9898
Description: Control header descriptors
9999

100100
What: /config/usb-gadget/gadget/functions/uvc.name/control/header/name
101101
Date: Dec 2014
102-
KernelVersion: 3.20
102+
KernelVersion: 4.0
103103
Description: Specific control header descriptors
104104

105105
dwClockFrequency
106106
bcdUVC
107107
What: /config/usb-gadget/gadget/functions/uvc.name/streaming
108108
Date: Dec 2014
109-
KernelVersion: 3.20
109+
KernelVersion: 4.0
110110
Description: Streaming descriptors
111111

112112
What: /config/usb-gadget/gadget/functions/uvc.name/streaming/class
113113
Date: Dec 2014
114-
KernelVersion: 3.20
114+
KernelVersion: 4.0
115115
Description: Streaming class descriptors
116116

117117
What: /config/usb-gadget/gadget/functions/uvc.name/streaming/class/ss
118118
Date: Dec 2014
119-
KernelVersion: 3.20
119+
KernelVersion: 4.0
120120
Description: Super speed streaming class descriptors
121121

122122
What: /config/usb-gadget/gadget/functions/uvc.name/streaming/class/hs
123123
Date: Dec 2014
124-
KernelVersion: 3.20
124+
KernelVersion: 4.0
125125
Description: High speed streaming class descriptors
126126

127127
What: /config/usb-gadget/gadget/functions/uvc.name/streaming/class/fs
128128
Date: Dec 2014
129-
KernelVersion: 3.20
129+
KernelVersion: 4.0
130130
Description: Full speed streaming class descriptors
131131

132132
What: /config/usb-gadget/gadget/functions/uvc.name/streaming/color_matching
133133
Date: Dec 2014
134-
KernelVersion: 3.20
134+
KernelVersion: 4.0
135135
Description: Color matching descriptors
136136

137137
What: /config/usb-gadget/gadget/functions/uvc.name/streaming/color_matching/default
138138
Date: Dec 2014
139-
KernelVersion: 3.20
139+
KernelVersion: 4.0
140140
Description: Default color matching descriptors
141141

142142
All attributes read only:
@@ -150,12 +150,12 @@ Description: Default color matching descriptors
150150

151151
What: /config/usb-gadget/gadget/functions/uvc.name/streaming/mjpeg
152152
Date: Dec 2014
153-
KernelVersion: 3.20
153+
KernelVersion: 4.0
154154
Description: MJPEG format descriptors
155155

156156
What: /config/usb-gadget/gadget/functions/uvc.name/streaming/mjpeg/name
157157
Date: Dec 2014
158-
KernelVersion: 3.20
158+
KernelVersion: 4.0
159159
Description: Specific MJPEG format descriptors
160160

161161
All attributes read only,
@@ -174,7 +174,7 @@ Description: Specific MJPEG format descriptors
174174

175175
What: /config/usb-gadget/gadget/functions/uvc.name/streaming/mjpeg/name/name
176176
Date: Dec 2014
177-
KernelVersion: 3.20
177+
KernelVersion: 4.0
178178
Description: Specific MJPEG frame descriptors
179179

180180
dwFrameInterval - indicates how frame interval can be
@@ -196,12 +196,12 @@ Description: Specific MJPEG frame descriptors
196196

197197
What: /config/usb-gadget/gadget/functions/uvc.name/streaming/uncompressed
198198
Date: Dec 2014
199-
KernelVersion: 3.20
199+
KernelVersion: 4.0
200200
Description: Uncompressed format descriptors
201201

202202
What: /config/usb-gadget/gadget/functions/uvc.name/streaming/uncompressed/name
203203
Date: Dec 2014
204-
KernelVersion: 3.20
204+
KernelVersion: 4.0
205205
Description: Specific uncompressed format descriptors
206206

207207
bmaControls - this format's data for bmaControls in
@@ -221,7 +221,7 @@ Description: Specific uncompressed format descriptors
221221

222222
What: /config/usb-gadget/gadget/functions/uvc.name/streaming/uncompressed/name/name
223223
Date: Dec 2014
224-
KernelVersion: 3.20
224+
KernelVersion: 4.0
225225
Description: Specific uncompressed frame descriptors
226226

227227
dwFrameInterval - indicates how frame interval can be
@@ -243,12 +243,12 @@ Description: Specific uncompressed frame descriptors
243243

244244
What: /config/usb-gadget/gadget/functions/uvc.name/streaming/header
245245
Date: Dec 2014
246-
KernelVersion: 3.20
246+
KernelVersion: 4.0
247247
Description: Streaming header descriptors
248248

249249
What: /config/usb-gadget/gadget/functions/uvc.name/streaming/header/name
250250
Date: Dec 2014
251-
KernelVersion: 3.20
251+
KernelVersion: 4.0
252252
Description: Specific streaming header descriptors
253253

254254
All attributes read only:

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11975,6 +11975,7 @@ L: [email protected]
1197511975
W: http://www.linux-usb.org
1197611976
T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
1197711977
S: Supported
11978+
F: Documentation/devicetree/bindings/usb/
1197811979
F: Documentation/usb/
1197911980
F: drivers/usb/
1198011981
F: include/linux/usb.h

drivers/phy/phy-exynos-mipi-video.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,12 @@ static inline int __is_running(const struct exynos_mipi_phy_desc *data,
233233
struct exynos_mipi_video_phy *state)
234234
{
235235
u32 val;
236+
int ret;
237+
238+
ret = regmap_read(state->regmaps[data->resetn_map], data->resetn_reg, &val);
239+
if (ret)
240+
return 0;
236241

237-
regmap_read(state->regmaps[data->resetn_map], data->resetn_reg, &val);
238242
return val & data->resetn_val;
239243
}
240244

drivers/phy/phy-ti-pipe3.c

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -293,11 +293,18 @@ static int ti_pipe3_init(struct phy *x)
293293
ret = ti_pipe3_dpll_wait_lock(phy);
294294
}
295295

296-
/* Program the DPLL only if not locked */
296+
/* SATA has issues if re-programmed when locked */
297297
val = ti_pipe3_readl(phy->pll_ctrl_base, PLL_STATUS);
298-
if (!(val & PLL_LOCK))
299-
if (ti_pipe3_dpll_program(phy))
300-
return -EINVAL;
298+
if ((val & PLL_LOCK) && of_device_is_compatible(phy->dev->of_node,
299+
"ti,phy-pipe3-sata"))
300+
return ret;
301+
302+
/* Program the DPLL */
303+
ret = ti_pipe3_dpll_program(phy);
304+
if (ret) {
305+
ti_pipe3_disable_clocks(phy);
306+
return -EINVAL;
307+
}
301308

302309
return ret;
303310
}

drivers/phy/phy-twl4030-usb.c

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,8 @@ static int twl4030_phy_power_on(struct phy *phy)
463463
twl4030_usb_set_mode(twl, twl->usb_mode);
464464
if (twl->usb_mode == T2_USB_MODE_ULPI)
465465
twl4030_i2c_access(twl, 0);
466-
schedule_delayed_work(&twl->id_workaround_work, 0);
466+
twl->linkstat = MUSB_UNKNOWN;
467+
schedule_delayed_work(&twl->id_workaround_work, HZ);
467468

468469
return 0;
469470
}
@@ -537,6 +538,7 @@ static irqreturn_t twl4030_usb_irq(int irq, void *_twl)
537538
struct twl4030_usb *twl = _twl;
538539
enum musb_vbus_id_status status;
539540
bool status_changed = false;
541+
int err;
540542

541543
status = twl4030_usb_linkstat(twl);
542544

@@ -567,7 +569,9 @@ static irqreturn_t twl4030_usb_irq(int irq, void *_twl)
567569
pm_runtime_mark_last_busy(twl->dev);
568570
pm_runtime_put_autosuspend(twl->dev);
569571
}
570-
musb_mailbox(status);
572+
err = musb_mailbox(status);
573+
if (err)
574+
twl->linkstat = MUSB_UNKNOWN;
571575
}
572576

573577
/* don't schedule during sleep - irq works right then */
@@ -595,7 +599,8 @@ static int twl4030_phy_init(struct phy *phy)
595599
struct twl4030_usb *twl = phy_get_drvdata(phy);
596600

597601
pm_runtime_get_sync(twl->dev);
598-
schedule_delayed_work(&twl->id_workaround_work, 0);
602+
twl->linkstat = MUSB_UNKNOWN;
603+
schedule_delayed_work(&twl->id_workaround_work, HZ);
599604
pm_runtime_mark_last_busy(twl->dev);
600605
pm_runtime_put_autosuspend(twl->dev);
601606

@@ -763,7 +768,8 @@ static int twl4030_usb_remove(struct platform_device *pdev)
763768
if (cable_present(twl->linkstat))
764769
pm_runtime_put_noidle(twl->dev);
765770
pm_runtime_mark_last_busy(twl->dev);
766-
pm_runtime_put_sync_suspend(twl->dev);
771+
pm_runtime_dont_use_autosuspend(&pdev->dev);
772+
pm_runtime_put_sync(twl->dev);
767773
pm_runtime_disable(twl->dev);
768774

769775
/* autogate 60MHz ULPI clock,

drivers/usb/core/quirks.c

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ static const struct usb_device_id usb_quirk_list[] = {
4444
/* Creative SB Audigy 2 NX */
4545
{ USB_DEVICE(0x041e, 0x3020), .driver_info = USB_QUIRK_RESET_RESUME },
4646

47+
/* USB3503 */
48+
{ USB_DEVICE(0x0424, 0x3503), .driver_info = USB_QUIRK_RESET_RESUME },
49+
4750
/* Microsoft Wireless Laser Mouse 6000 Receiver */
4851
{ USB_DEVICE(0x045e, 0x00e1), .driver_info = USB_QUIRK_RESET_RESUME },
4952

@@ -173,6 +176,10 @@ static const struct usb_device_id usb_quirk_list[] = {
173176
/* MAYA44USB sound device */
174177
{ USB_DEVICE(0x0a92, 0x0091), .driver_info = USB_QUIRK_RESET_RESUME },
175178

179+
/* ASUS Base Station(T100) */
180+
{ USB_DEVICE(0x0b05, 0x17e0), .driver_info =
181+
USB_QUIRK_IGNORE_REMOTE_WAKEUP },
182+
176183
/* Action Semiconductor flash disk */
177184
{ USB_DEVICE(0x10d6, 0x2200), .driver_info =
178185
USB_QUIRK_STRING_FETCH_255 },
@@ -188,26 +195,22 @@ static const struct usb_device_id usb_quirk_list[] = {
188195
{ USB_DEVICE(0x1908, 0x1315), .driver_info =
189196
USB_QUIRK_HONOR_BNUMINTERFACES },
190197

191-
/* INTEL VALUE SSD */
192-
{ USB_DEVICE(0x8086, 0xf1a5), .driver_info = USB_QUIRK_RESET_RESUME },
193-
194-
/* USB3503 */
195-
{ USB_DEVICE(0x0424, 0x3503), .driver_info = USB_QUIRK_RESET_RESUME },
196-
197-
/* ASUS Base Station(T100) */
198-
{ USB_DEVICE(0x0b05, 0x17e0), .driver_info =
199-
USB_QUIRK_IGNORE_REMOTE_WAKEUP },
200-
201198
/* Protocol and OTG Electrical Test Device */
202199
{ USB_DEVICE(0x1a0a, 0x0200), .driver_info =
203200
USB_QUIRK_LINEAR_UFRAME_INTR_BINTERVAL },
204201

202+
/* Acer C120 LED Projector */
203+
{ USB_DEVICE(0x1de1, 0xc102), .driver_info = USB_QUIRK_NO_LPM },
204+
205205
/* Blackmagic Design Intensity Shuttle */
206206
{ USB_DEVICE(0x1edb, 0xbd3b), .driver_info = USB_QUIRK_NO_LPM },
207207

208208
/* Blackmagic Design UltraStudio SDI */
209209
{ USB_DEVICE(0x1edb, 0xbd4f), .driver_info = USB_QUIRK_NO_LPM },
210210

211+
/* INTEL VALUE SSD */
212+
{ USB_DEVICE(0x8086, 0xf1a5), .driver_info = USB_QUIRK_RESET_RESUME },
213+
211214
{ } /* terminating entry must be last */
212215
};
213216

drivers/usb/dwc2/core.h

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,17 @@
6464
DWC2_TRACE_SCHEDULER_VB(pr_fmt("%s: SCH: " fmt), \
6565
dev_name(hsotg->dev), ##__VA_ARGS__)
6666

67+
#ifdef CONFIG_MIPS
68+
/*
69+
* There are some MIPS machines that can run in either big-endian
70+
* or little-endian mode and that use the dwc2 register without
71+
* a byteswap in both ways.
72+
* Unlike other architectures, MIPS apparently does not require a
73+
* barrier before the __raw_writel() to synchronize with DMA but does
74+
* require the barrier after the __raw_writel() to serialize a set of
75+
* writes. This set of operations was added specifically for MIPS and
76+
* should only be used there.
77+
*/
6778
static inline u32 dwc2_readl(const void __iomem *addr)
6879
{
6980
u32 value = __raw_readl(addr);
@@ -90,6 +101,22 @@ static inline void dwc2_writel(u32 value, void __iomem *addr)
90101
pr_info("INFO:: wrote %08x to %p\n", value, addr);
91102
#endif
92103
}
104+
#else
105+
/* Normal architectures just use readl/write */
106+
static inline u32 dwc2_readl(const void __iomem *addr)
107+
{
108+
return readl(addr);
109+
}
110+
111+
static inline void dwc2_writel(u32 value, void __iomem *addr)
112+
{
113+
writel(value, addr);
114+
115+
#ifdef DWC2_LOG_WRITES
116+
pr_info("info:: wrote %08x to %p\n", value, addr);
117+
#endif
118+
}
119+
#endif
93120

94121
/* Maximum number of Endpoints/HostChannels */
95122
#define MAX_EPS_CHANNELS 16

0 commit comments

Comments
 (0)