<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/usb/chipidea/otg_fsm.c, branch linux-6.9.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.9.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.9.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2022-11-09T11:34:18Z</updated>
<entry>
<title>usb: chipidea: fix deadlock in ci_otg_del_timer</title>
<updated>2022-11-09T11:34:18Z</updated>
<author>
<name>Duoming Zhou</name>
<email>duoming@zju.edu.cn</email>
</author>
<published>2022-09-18T03:33:12Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7a58b8d6021426b796eebfae80983374d9a80a75'/>
<id>urn:sha1:7a58b8d6021426b796eebfae80983374d9a80a75</id>
<content type='text'>
There is a deadlock in ci_otg_del_timer(), the process is
shown below:

    (thread 1)                  |        (thread 2)
ci_otg_del_timer()              | ci_otg_hrtimer_func()
  ...                           |
  spin_lock_irqsave() //(1)     |  ...
  ...                           |
  hrtimer_cancel()              |  spin_lock_irqsave() //(2)
  (block forever)

We hold ci-&gt;lock in position (1) and use hrtimer_cancel() to
wait ci_otg_hrtimer_func() to stop, but ci_otg_hrtimer_func()
also need ci-&gt;lock in position (2). As a result, the
hrtimer_cancel() in ci_otg_del_timer() will be blocked forever.

This patch extracts hrtimer_cancel() from the protection of
spin_lock_irqsave() in order that the ci_otg_hrtimer_func()
could obtain the ci-&gt;lock.

What`s more, there will be no race happen. Because the
"next_timer" is always under the protection of
spin_lock_irqsave() and we only check whether "next_timer"
equals to NUM_OTG_FSM_TIMERS in the following code.

Fixes: 3a316ec4c91c ("usb: chipidea: use hrtimer for otg fsm timers")
Cc: stable &lt;stable@kernel.org&gt;
Signed-off-by: Duoming Zhou &lt;duoming@zju.edu.cn&gt;
Link: https://lore.kernel.org/r/20220918033312.94348-1-duoming@zju.edu.cn
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: chipidea: Add support for VBUS control with PHY</title>
<updated>2022-08-31T07:07:52Z</updated>
<author>
<name>Piyush Mehta</name>
<email>piyush.mehta@xilinx.com</email>
</author>
<published>2022-08-22T05:40:51Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=66d1c8021e1d9c97101d58fa09c33c002d96747a'/>
<id>urn:sha1:66d1c8021e1d9c97101d58fa09c33c002d96747a</id>
<content type='text'>
Some platforms make use of VBUS control over PHY which means controller
driver has to access PHY registers to turn on/off VBUS line.This patch
adds support for such platforms in chipidea.

Flag 'CI_HDRC_PHY_VBUS_CONTROL' added to support VBus control feature.

Acked-by: Peter Chen &lt;peter.chen@kernel.org&gt;
Signed-off-by: Piyush Mehta &lt;piyush.mehta@xilinx.com&gt;
Signed-off-by: Piyush Mehta &lt;piyush.mehta@amd.com&gt;
Link: https://lore.kernel.org/r/20220822054051.2941282-1-piyush.mehta@amd.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb/chipidea: fix repeated words in comments</title>
<updated>2022-07-27T12:38:01Z</updated>
<author>
<name>Jilin Yuan</name>
<email>yuanjilin@cdjrlc.com</email>
</author>
<published>2022-07-16T13:16:30Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=fe3cc0cebe6091675c8bacd94e232a3203b939b8'/>
<id>urn:sha1:fe3cc0cebe6091675c8bacd94e232a3203b939b8</id>
<content type='text'>
 Delete the redundant word 'power'.

Acked-by: Peter Chen &lt;peter.chen@kernel.org&gt;
Signed-off-by: Jilin Yuan &lt;yuanjilin@cdjrlc.com&gt;
Link: https://lore.kernel.org/r/20220716131630.33151-1-yuanjilin@cdjrlc.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: move many drivers to use DEVICE_ATTR_WO</title>
<updated>2018-01-24T07:49:52Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2018-01-23T10:24:07Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=ca35910a1ba21e45368640ac4d884536649966d9'/>
<id>urn:sha1:ca35910a1ba21e45368640ac4d884536649966d9</id>
<content type='text'>
Instead of "open coding" a DEVICE_ATTR() define, use the
DEVICE_ATTR_WO() macro instead, which does everything properly instead.

This does require a few static functions to be renamed to work properly,
but thanks to a script from Joe Perches, this was easily done.

Reported-by: Joe Perches &lt;joe@perches.com&gt;
Cc: Peter Chen &lt;Peter.Chen@nxp.com&gt;
Cc: Valentina Manea &lt;valentina.manea.m@gmail.com&gt;
Acked-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
Acked-by: Johan Hovold &lt;johan@kernel.org&gt;
Acked-by: Shuah Khan &lt;shuahkh@osg.samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: move many drivers to use DEVICE_ATTR_RW</title>
<updated>2018-01-24T07:49:51Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2018-01-23T10:24:05Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=ed5bd7a47fd77166860e39f857ae8e3fe25c836c'/>
<id>urn:sha1:ed5bd7a47fd77166860e39f857ae8e3fe25c836c</id>
<content type='text'>
Instead of "open coding" a DEVICE_ATTR() define, use the
DEVICE_ATTR_RW() macro instead, which does everything properly instead.

This does require a few static functions to be renamed to work properly,
but thanks to a script from Joe Perches, this was easily done.

Reported-by: Joe Perches &lt;joe@perches.com&gt;
Cc: Matthieu CASTET &lt;castet.matthieu@free.fr&gt;
Cc: Stanislaw Gruszka &lt;stf_xl@wp.pl&gt;
Cc: Peter Chen &lt;Peter.Chen@nxp.com&gt;
Cc: Mathias Nyman &lt;mathias.nyman@intel.com&gt;
Acked-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Acked-by: Bin Liu &lt;b-liu@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: chipidea: Remove redundant license text</title>
<updated>2017-11-07T14:45:01Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2017-11-06T14:37:18Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=51b751f112dcbb24b46051fe64c2ddbe8aa367ea'/>
<id>urn:sha1:51b751f112dcbb24b46051fe64c2ddbe8aa367ea</id>
<content type='text'>
Now that the SPDX tag is in all USB files, that identifies the license
in a specific and legally-defined manner.  So the extra GPL text wording
can be removed as it is no longer needed at all.

This is done on a quest to remove the 700+ different ways that files in
the kernel describe the GPL license text.  And there's unneeded stuff
like the address (sometimes incorrect) for the FSF which is never
needed.

No copyright headers or other non-license-description text was removed.

Cc: Thierry Reding &lt;thierry.reding@gmail.com&gt;
Cc: Jonathan Hunter &lt;jonathanh@nvidia.com&gt;
Acked-by: Peter Chen &lt;peter.chen@nxp.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: add SPDX identifiers to all remaining files in drivers/usb/</title>
<updated>2017-11-04T10:48:02Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2017-11-03T10:28:30Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=5fd54ace4721fc5ce2bb5aef6318fcf17f421460'/>
<id>urn:sha1:5fd54ace4721fc5ce2bb5aef6318fcf17f421460</id>
<content type='text'>
It's good to have SPDX identifiers in all files to make it easier to
audit the kernel tree for correct licenses.

Update the drivers/usb/ and include/linux/usb* files with the correct
SPDX license identifier based on the license text in the file itself.
The SPDX identifier is a legally binding shorthand, which can be used
instead of the full boiler plate text.

This work is based on a script and data from Thomas Gleixner, Philippe
Ombredanne, and Kate Stewart.

Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Kate Stewart &lt;kstewart@linuxfoundation.org&gt;
Cc: Philippe Ombredanne &lt;pombredanne@nexb.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Acked-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
Acked-by: Johan Hovold &lt;johan@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: chipidea: otg_fsm: constify attribute_group structures.</title>
<updated>2017-08-10T18:31:27Z</updated>
<author>
<name>Arvind Yadav</name>
<email>arvind.yadav.cs@gmail.com</email>
</author>
<published>2017-08-04T12:06:39Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=9a957e89a1e3924b0d8b55b5e9ef636fe577d493'/>
<id>urn:sha1:9a957e89a1e3924b0d8b55b5e9ef636fe577d493</id>
<content type='text'>
attribute_group are not supposed to change at runtime. All functions
working with attribute_group provided by &lt;linux/sysfs.h&gt; work with
const attribute_group. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav &lt;arvind.yadav.cs@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: Make use of ktime_* comparison functions</title>
<updated>2017-06-03T09:08:04Z</updated>
<author>
<name>Mariusz Skamra</name>
<email>mariuszx.skamra@intel.com</email>
</author>
<published>2017-05-26T10:15:59Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=fa72e6afa795dbb35d0cc6332606e83e4415e45e'/>
<id>urn:sha1:fa72e6afa795dbb35d0cc6332606e83e4415e45e</id>
<content type='text'>
Start using ktime_* compare functions to make the code backportable.
Now that may be a bit tricky due to recent change of ktime_t.

Signed-off-by: Mariusz Skamra &lt;mariuszx.skamra@intel.com&gt;
Acked-by: Kuppuswamy Sathyanarayanan &lt;sathyanarayanan.kuppuswamy@intel.com&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ktime: Get rid of the union</title>
<updated>2016-12-25T16:21:22Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2016-12-25T10:38:40Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=2456e855354415bfaeb7badaa14e11b3e02c8466'/>
<id>urn:sha1:2456e855354415bfaeb7badaa14e11b3e02c8466</id>
<content type='text'>
ktime is a union because the initial implementation stored the time in
scalar nanoseconds on 64 bit machine and in a endianess optimized timespec
variant for 32bit machines. The Y2038 cleanup removed the timespec variant
and switched everything to scalar nanoseconds. The union remained, but
become completely pointless.

Get rid of the union and just keep ktime_t as simple typedef of type s64.

The conversion was done with coccinelle and some manual mopping up.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
</content>
</entry>
</feed>
