<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/usb/gadget/function, branch linux-5.3.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.3.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.3.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2019-12-13T07:48:19Z</updated>
<entry>
<title>usb: gadget: u_serial: add missing port entry locking</title>
<updated>2019-12-13T07:48:19Z</updated>
<author>
<name>Michał Mirosław</name>
</author>
<published>2019-08-10T08:42:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=09330cc92055b2787c4461c9acade2302f89c14e'/>
<id>urn:sha1:09330cc92055b2787c4461c9acade2302f89c14e</id>
<content type='text'>
commit daf82bd24e308c5a83758047aff1bd81edda4f11 upstream.

gserial_alloc_line() misses locking (for a release barrier) while
resetting port entry on TTY allocation failure. Fix this.

Cc: stable@vger.kernel.org
Signed-off-by: Michał Mirosław &lt;mirq-linux@rere.qmqm.pl&gt;
Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Tested-by: Ladislav Michl &lt;ladis@linux-mips.org&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usb: gadget: mass_storage: Fix races between fsg_disable and fsg_set_alt</title>
<updated>2019-08-12T05:55:24Z</updated>
<author>
<name>Benjamin Herrenschmidt</name>
</author>
<published>2019-07-26T04:59:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4a56a478a525d6427be90753451c40e1327caa1a'/>
<id>urn:sha1:4a56a478a525d6427be90753451c40e1327caa1a</id>
<content type='text'>
If fsg_disable() and fsg_set_alt() are called too closely to each
other (for example due to a quick reset/reconnect), what can happen
is that fsg_set_alt sets common-&gt;new_fsg from an interrupt while
handle_exception is trying to process the config change caused by
fsg_disable():

	fsg_disable()
	...
	handle_exception()
		sets state back to FSG_STATE_NORMAL
		hasn't yet called do_set_interface()
		or is inside it.

 ---&gt; interrupt
	fsg_set_alt
		sets common-&gt;new_fsg
		queues a new FSG_STATE_CONFIG_CHANGE
 &lt;---

Now, the first handle_exception can "see" the updated
new_fsg, treats it as if it was a fsg_set_alt() response,
call usb_composite_setup_continue() etc...

But then, the thread sees the second FSG_STATE_CONFIG_CHANGE,
and goes back down the same path, wipes and reattaches a now
active fsg, and .. calls usb_composite_setup_continue() which
at this point is wrong.

Not only we get a backtrace, but I suspect the second set_interface
wrecks some state causing the host to get upset in my case.

This fixes it by replacing "new_fsg" by a "state argument" (same
principle) which is set in the same lock section as the state
update, and retrieved similarly.

That way, there is never any discrepancy between the dequeued
state and the observed value of it. We keep the ability to have
the latest reconfig operation take precedence, but we guarantee
that once "dequeued" the argument (new_fsg) will not be clobbered
by any new event.

Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'usb-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb</title>
<updated>2019-07-11T22:40:06Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2019-07-11T22:40:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=17a20acaf171124017f43bc70bb4d7ca88070659'/>
<id>urn:sha1:17a20acaf171124017f43bc70bb4d7ca88070659</id>
<content type='text'>
Pull USB / PHY updates from Greg KH:
 "Here is the big USB and PHY driver pull request for 5.3-rc1.

  Lots of stuff here, all of which has been in linux-next for a while
  with no reported issues. Nothing is earth-shattering, just constant
  forward progress for more devices supported and cleanups and small
  fixes:

   - USB gadget driver updates and fixes

   - new USB gadget driver for some hardware, followed by a quick revert
     of those patches as they were not ready to be merged...

   - PHY driver updates

   - Lots of new driver additions and cleanups with a few fixes mixed
     in"

* tag 'usb-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (145 commits)
  Revert "usb: gadget: storage: Remove warning message"
  Revert "dt-bindings: add binding for USBSS-DRD controller."
  Revert "usb:gadget Separated decoding functions from dwc3 driver."
  Revert "usb:gadget Patch simplify usb_decode_set_clear_feature function."
  Revert "usb:gadget Simplify usb_decode_get_set_descriptor function."
  Revert "usb:cdns3 Add Cadence USB3 DRD Driver"
  Revert "usb:cdns3 Fix for stuck packets in on-chip OUT buffer."
  usb :fsl: Change string format for errata property
  usb: host: Stops USB controller init if PLL fails to lock
  usb: linux/fsl_device: Add platform member has_fsl_erratum_a006918
  usb: phy: Workaround for USB erratum-A005728
  usb: fsl: Set USB_EN bit to select ULPI phy
  usb: Handle USB3 remote wakeup for LPM enabled devices correctly
  drivers/usb/typec/tps6598x.c: fix 4CC cmd write
  drivers/usb/typec/tps6598x.c: fix portinfo width
  usb: storage: scsiglue: Do not skip VPD if try_vpd_pages is set
  usb: renesas_usbhs: add a workaround for a race condition of workqueue
  usb: gadget: udc: renesas_usb3: remove redundant assignment to ret
  usb: dwc2: use a longer AHB idle timeout in dwc2_core_reset()
  USB: gadget: function: fix issue Unneeded variable: "value"
  ...
</content>
</entry>
<entry>
<title>Revert "usb: gadget: storage: Remove warning message"</title>
<updated>2019-07-04T11:05:59Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
</author>
<published>2019-07-04T11:05:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=214cc39d175c89cafa5acfe4df22502e8d86c506'/>
<id>urn:sha1:214cc39d175c89cafa5acfe4df22502e8d86c506</id>
<content type='text'>
This reverts commit e70b3f5da00119e057b7faa557753fee7f786f17.

EJ writes:
	Thinh found this patch might cause a failure in USB CV TD 9.13
	Set Configuration Test. We are trying to fix it.  Could you
	please defer the merging of this patch until we fix it?

So am now dropping it.

Reported-by: EJ Hsu &lt;ejh@nvidia.com&gt;
Cc: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Cc: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'usb-for-v5.3-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next</title>
<updated>2019-07-03T11:48:54Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
</author>
<published>2019-07-03T11:48:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=51785bddebf7a509dfa3fe7e80a63d39d2764bb9'/>
<id>urn:sha1:51785bddebf7a509dfa3fe7e80a63d39d2764bb9</id>
<content type='text'>
Felipe writes:

USB: more changes for v5.3 merge window

Turns out a few more important changes came about. We have the new
Cadence DRD Driver being added here and that's the biggest, most
important part.

Together with that we have suport for new imx7ulp phy. Support for
TigerLake Devices on dwc3. Also a couple important fixes which weren't
completed in time for the -rc cycle.

Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;

* tag 'usb-for-v5.3-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb:
  usb: renesas_usbhs: add a workaround for a race condition of workqueue
  usb: gadget: udc: renesas_usb3: remove redundant assignment to ret
  usb: dwc2: use a longer AHB idle timeout in dwc2_core_reset()
  USB: gadget: function: fix issue Unneeded variable: "value"
  usb: phy: phy-mxs-usb: add imx7ulp support
  doc: dt-binding: mxs-usb-phy: add compatible for 7ulp
  usb:cdns3 Fix for stuck packets in on-chip OUT buffer.
  usb:cdns3 Add Cadence USB3 DRD Driver
  usb:gadget Simplify usb_decode_get_set_descriptor function.
  usb:gadget Patch simplify usb_decode_set_clear_feature function.
  usb:gadget Separated decoding functions from dwc3 driver.
  dt-bindings: add binding for USBSS-DRD controller.
  usb: dwc3: pci: add support for TigerLake Devices
</content>
</entry>
<entry>
<title>USB: gadget: function: fix issue Unneeded variable: "value"</title>
<updated>2019-07-03T07:58:44Z</updated>
<author>
<name>Hariprasad Kelam</name>
</author>
<published>2019-07-01T18:32:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d2d06c18d78ed4aa969ceac33bcfdcc524668424'/>
<id>urn:sha1:d2d06c18d78ed4aa969ceac33bcfdcc524668424</id>
<content type='text'>
fix below issue reported by coccicheck
drivers/usb/gadget/function/f_eem.c:169:7-12: Unneeded variable:
"value". Return "- EOPNOTSUPP" on line 179

We can not change return type of eem_setup as its registered with callback
function

Signed-off-by: Hariprasad Kelam &lt;hariprasad.kelam@gmail.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'usb-for-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next</title>
<updated>2019-07-01T10:01:33Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
</author>
<published>2019-07-01T10:01:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f254e65ad694a9189163f5a60707a06225f5db25'/>
<id>urn:sha1:f254e65ad694a9189163f5a60707a06225f5db25</id>
<content type='text'>
Felipe writes:

usb: changes for v5.3 merge window

The biggest part here is a set of patches removing unnecesary variables
from several drivers.

Meson-g12a's dwc3 glue implemented IRQ-based OTG/DRD role swap.

Qcom's dwc3 glue added support for ACPI, mainly for the AArch64-based
SoCs.

DWC3 also got support for Intel Elkhart Lake platforms.

* tag 'usb-for-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb: (30 commits)
  usb: dwc3: remove unused @lock member of dwc3_ep struct
  usb: dwc3: pci: Add Support for Intel Elkhart Lake Devices
  usb: Replace snprintf with scnprintf in gether_get_ifname
  usb: gadget: ether: Fix race between gether_disconnect and rx_submit
  usb: gadget: storage: Remove warning message
  usb: dwc3: gadget: Add support for disabling U1 and U2 entries
  usb: gadget: send usb_gadget as an argument in get_config_params
  doc: dt: bindings: usb: dwc3: Update entries for disabling U1 and U2
  usb: dwc3: qcom: Use of_clk_get_parent_count()
  usb: dwc3: Fix core validation in probe, move after clocks are enabled
  usb: dwc3: qcom: Improve error handling
  usb: dwc3: qcom: Start USB in 'host mode' on the SDM845
  usb: dwc3: qcom: Add support for booting with ACPI
  soc: qcom: geni: Add support for ACPI
  Revert "usb: dwc2: host: Setting qtd to NULL after freeing it"
  usb: gadget: net2272: remove redundant assignments to pointer 's'
  usb: gadget: Zero ffs_io_data
  USB: omap_udc: Remove unneeded variable
  fotg210-udc: Remove unneeded variable
  usb: gadget: at91_udc: Remove unneeded variable
  ...
</content>
</entry>
<entry>
<title>docs: usb: rename files to .rst and add them to drivers-api</title>
<updated>2019-06-20T12:28:36Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
</author>
<published>2019-06-18T21:05:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ecefae6db042283bf88ef3777f2381b18df8ed46'/>
<id>urn:sha1:ecefae6db042283bf88ef3777f2381b18df8ed46</id>
<content type='text'>
While there are a mix of things here, most of the stuff
were written from Kernel developer's PoV. So, add them to
the driver-api book.

A follow up for this patch would be to move documents from
there that are specific to sysadmins, adding them to the
admin-guide.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+samsung@kernel.org&gt;
Acked-by: Johan Hovold &lt;johan@kernel.org&gt;
Acked-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: Replace snprintf with scnprintf in gether_get_ifname</title>
<updated>2019-06-20T05:53:11Z</updated>
<author>
<name>Daniel M German</name>
</author>
<published>2019-06-20T04:50:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=37e444c8296c14cb5768a1197b24cfc07ee8e0cd'/>
<id>urn:sha1:37e444c8296c14cb5768a1197b24cfc07ee8e0cd</id>
<content type='text'>
snprintf returns the actual length of the buffer created; however,
this is not the case if snprintf truncates its parameter.
See https://lwn.net/Articles/69419/ for a detailed explanation.
The current code correctly handles this case at the expense
of extra code in the return statement.

scnprintf does returns the actual length of the buffer created
making the ?: operator unnecessary in the return
statement.

This change does not alter the functionality of the code.

Signed-off-by: Daniel M German &lt;dmg@turingmachine.org&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: gadget: ether: Fix race between gether_disconnect and rx_submit</title>
<updated>2019-06-18T08:58:30Z</updated>
<author>
<name>Kiruthika Varadarajan</name>
</author>
<published>2019-06-18T08:39:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d29fcf7078bc8be2b6366cbd4418265b53c94fac'/>
<id>urn:sha1:d29fcf7078bc8be2b6366cbd4418265b53c94fac</id>
<content type='text'>
On spin lock release in rx_submit, gether_disconnect get a chance to
run, it makes port_usb NULL, rx_submit access NULL port USB, hence null
pointer crash.

Fixed by releasing the lock in rx_submit after port_usb is used.

Fixes: 2b3d942c4878 ("usb ethernet gadget: split out network core")
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Kiruthika Varadarajan &lt;Kiruthika.Varadarajan@harman.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
</feed>
