<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/usb/typec, branch v4.19</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.19</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.19'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2018-09-20T11:35:01Z</updated>
<entry>
<title>usb: typec: mux: Take care of driver module reference counting</title>
<updated>2018-09-20T11:35:01Z</updated>
<author>
<name>Heikki Krogerus</name>
<email>heikki.krogerus@linux.intel.com</email>
</author>
<published>2018-09-19T07:58:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3e3b81965cbfa01fda6d77750feedc3c46fc28d0'/>
<id>urn:sha1:3e3b81965cbfa01fda6d77750feedc3c46fc28d0</id>
<content type='text'>
Functions typec_mux_get() and typec_switch_get() already
make sure that the mux device reference count is
incremented, but the same must be done to the driver module
as well to prevent the drivers from being unloaded in the
middle of operation.

This fixes a potential "BUG: unable to handle kernel paging
request at ..." from happening.

Fixes: 93dd2112c7b2 ("usb: typec: mux: Get the mux identifier from function parameter")
Acked-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Tested-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Heikki Krogerus &lt;heikki.krogerus@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb/typec: fix kernel-doc notation warning for typec_match_altmode</title>
<updated>2018-09-05T12:36:53Z</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@infradead.org</email>
</author>
<published>2018-09-03T19:58:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=40de5fe4f45c5b804ea085d7e3f1a72fc6705929'/>
<id>urn:sha1:40de5fe4f45c5b804ea085d7e3f1a72fc6705929</id>
<content type='text'>
Fix kernel-doc warning for missing function parameter 'mode' description:

../drivers/usb/typec/bus.c:268: warning: Function parameter or member 'mode' not described in 'typec_match_altmode'

Also fix typos for same function documentation.

Fixes: 8a37d87d72f0 ("usb: typec: Bus type for alternate modes")

Signed-off-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Acked-by: Heikki Krogerus &lt;heikki.krogerus@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: typec: fix kernel-doc parameter warning</title>
<updated>2018-09-05T11:27:07Z</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@infradead.org</email>
</author>
<published>2018-09-03T02:30:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=49aa5afda2ed9cf6a8819707014385ede895ff87'/>
<id>urn:sha1:49aa5afda2ed9cf6a8819707014385ede895ff87</id>
<content type='text'>
Fix kernel-doc warning (13 times):

../drivers/usb/typec/class.c:1497: warning: Excess function parameter 'drvdata' description in 'typec_port_register_altmode'

Signed-off-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Acked-by: Heikki Krogerus &lt;heikki.krogerus@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge 4.18-rc7 into usb-next</title>
<updated>2018-07-30T08:04:58Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2018-07-30T08:04:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8a7b5d0f75f757fa88b0d17c19523161b27b8e80'/>
<id>urn:sha1:8a7b5d0f75f757fa88b0d17c19523161b27b8e80</id>
<content type='text'>
We want the USB fixes in here as well to handle merge issues.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: typec: tcpm: Fix sink PDO starting index for PPS APDO selection</title>
<updated>2018-07-20T14:40:04Z</updated>
<author>
<name>Adam Thomson</name>
<email>Adam.Thomson.Opensource@diasemi.com</email>
</author>
<published>2018-07-17T14:36:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c413767e6698ae24ac1904827314470cacff1497'/>
<id>urn:sha1:c413767e6698ae24ac1904827314470cacff1497</id>
<content type='text'>
There is a bug in the sink PDO search code when trying to select
a PPS APDO. The current code actually sets the starting index for
searching to whatever value 'i' is, rather than choosing index 1
to avoid the first PDO (always 5V fixed). As a result, for sources
which support PPS but whose PPS APDO index does not match with the
supporting sink PPS APDO index for the platform, no valid PPS APDO
will be found so this feature will not be permitted.

Sadly in testing, both Source and Sink capabilities matched up and
this was missed. Code is now updated to correctly set the start
index to 1, and testing with additional PPS capable sources show
this to work as expected.

Signed-off-by: Adam Thomson &lt;Adam.Thomson.Opensource@diasemi.com&gt;
Fixes: 2eadc33f40d4 ("typec: tcpm: Add core support for sink side PPS")
Reviewed-by: Heikki Krogerus &lt;heikki.krogerus@linux.intel.com&gt;
Reviewed-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge 4.18-rc5 into usb-next</title>
<updated>2018-07-16T07:09:24Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2018-07-16T07:09:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=500f0716b5f7fd6b0ff3d045588c7588ce2eee1d'/>
<id>urn:sha1:500f0716b5f7fd6b0ff3d045588c7588ce2eee1d</id>
<content type='text'>
We need the USB fixes in here as well.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: typec: avoid format-overflow warning</title>
<updated>2018-07-06T14:36:19Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2018-07-06T13:28:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8160eac1213fb6d466dee156638647a71da7d7fb'/>
<id>urn:sha1:8160eac1213fb6d466dee156638647a71da7d7fb</id>
<content type='text'>
gcc-8 points out that the fix-byte buffer might be too small if
desc-&gt;mode is a three-digit number:

drivers/usb/typec/class.c: In function 'typec_register_altmode':
drivers/usb/typec/class.c:502:32: error: '%d' directive writing between 1 and 3 bytes into a region of size 2 [-Werror=format-overflow=]
  sprintf(alt-&gt;group_name, "mode%d", desc-&gt;mode);
                                ^~
drivers/usb/typec/class.c:502:27: note: directive argument in the range [0, 255]
  sprintf(alt-&gt;group_name, "mode%d", desc-&gt;mode);
                           ^~~~~~~~
drivers/usb/typec/class.c:502:2: note: 'sprintf' output between 6 and 8 bytes into a destination of size 6
  sprintf(alt-&gt;group_name, "mode%d", desc-&gt;mode);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I assume this cannot happen in practice, but we can simply make the
string long enough to avoid the warning. This uses the two padding
bytes that already exist after the string.

Fixes: 4ab8c18d4d67 ("usb: typec: Register a device for every mode")
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: typec: unlock dp-&gt;lock on error exit path, and also zero ret if successful</title>
<updated>2018-07-06T14:36:19Z</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2018-07-05T13:36:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=98a1a0c7a321a46e805df289c7d385a9b1b4c661'/>
<id>urn:sha1:98a1a0c7a321a46e805df289c7d385a9b1b4c661</id>
<content type='text'>
One of the error handling paths forgets to unlock dp-&gt;lock on the error
exit path leading to a potential lock-up.  Also the return path for a
successful call to the function configuration_store can return an
uninitialized error return code if dp-&gt;alt-&gt;active is false, so ensure
ret is zeroed on the successful exit path to avoid garbage being returned.

Detected by CoverityScan, CID#1471597 ("Unitialized scalar variable")

Fixes: 0e3bb7d6894d ("usb: typec: Add driver for DisplayPort alternate mode")
Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Acked-by: Heikki Krogerus &lt;heikki.krogerus@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: typec: fix dereference before null check on adev</title>
<updated>2018-07-06T14:36:19Z</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2018-07-04T12:34:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9920184d78edeccd165832d54d6203fae4c860f5'/>
<id>urn:sha1:9920184d78edeccd165832d54d6203fae4c860f5</id>
<content type='text'>
Pointer adev is being dereferenced before it is being sanity
checked with a null pointer check, hence it is possible for
a null pointer dereference to occur.  Fix this by dereferencing
adev only once it is null checked.

Detected by CoverityScan, CID#1471598 ("Dereference before null check")

Fixes: 8a37d87d72f0 ("usb: typec: Bus type for alternate modes")
Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Acked-by: Heikki Krogerus &lt;heikki.krogerus@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: typec: fsusb302: Drop empty set_current_limit implementation</title>
<updated>2018-07-02T16:08:19Z</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2018-07-01T12:27:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=399111aaa7b9b4a2f7f20d38943ab55b6a67653e'/>
<id>urn:sha1:399111aaa7b9b4a2f7f20d38943ab55b6a67653e</id>
<content type='text'>
The set_current_limit tcpm_dev callback is optional and the tcpm core
will already log the passed in values, so there is no need to have an
empty implementation of this.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Reviewed-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
