<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/usb/isp1760, branch v5.15.7</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v5.15.7</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v5.15.7'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2021-08-27T14:11:39+00:00</updated>
<entry>
<title>usb: isp1760: otg control register access</title>
<updated>2021-08-27T14:11:39+00:00</updated>
<author>
<name>Rui Miguel Silva</name>
<email>rui.silva@linaro.org</email>
</author>
<published>2021-08-27T13:11:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9c1587d99f9305aa4f10b47fcf1981012aa5381f'/>
<id>urn:sha1:9c1587d99f9305aa4f10b47fcf1981012aa5381f</id>
<content type='text'>
The set/clear of the otg control values is done writing to
two different 16bit registers, however we setup the regmap
width for isp1760/61 to 32bit value bits.

So, just access the clear register address (0x376)as the high
part of the otg control register set (0x374), and write the
values in one go to make sure they get clear/set.

Reported-by: Dietmar Eggemann &lt;dietmar.eggemann@arm.com&gt;
Tested-by: Dietmar Eggemann &lt;dietmar.eggemann@arm.com&gt;
Signed-off-by: Rui Miguel Silva &lt;rui.silva@linaro.org&gt;
Link: https://lore.kernel.org/r/20210827131154.4151862-6-rui.silva@linaro.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: isp1760: use the right irq status bit</title>
<updated>2021-08-27T14:11:39+00:00</updated>
<author>
<name>Rui Miguel Silva</name>
<email>rui.silva@linaro.org</email>
</author>
<published>2021-08-27T13:11:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=955d0fb590f18ec5c3a4085c7d0e39b6abde0dd6'/>
<id>urn:sha1:955d0fb590f18ec5c3a4085c7d0e39b6abde0dd6</id>
<content type='text'>
Instead of using the fields enum values to check interrupts
trigged, use the correct bit values.

Reported-by: Dietmar Eggemann &lt;dietmar.eggemann@arm.com&gt;
Tested-by: Dietmar Eggemann &lt;dietmar.eggemann@arm.com&gt;
Signed-off-by: Rui Miguel Silva &lt;rui.silva@linaro.org&gt;
Link: https://lore.kernel.org/r/20210827131154.4151862-5-rui.silva@linaro.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: isp1760: write to status and address register</title>
<updated>2021-08-27T14:11:39+00:00</updated>
<author>
<name>Rui Miguel Silva</name>
<email>rui.silva@linaro.org</email>
</author>
<published>2021-08-27T13:11:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=36815a4a0763bb405ebd776c45553005c1ef7a15'/>
<id>urn:sha1:36815a4a0763bb405ebd776c45553005c1ef7a15</id>
<content type='text'>
We were already writing directly the port status register to
trigger changes in isp1763. The same is needed in other IP
from the family, including also to setup the read address
before reading from device.

Reported-by: Dietmar Eggemann &lt;dietmar.eggemann@arm.com&gt;
Tested-by: Dietmar Eggemann &lt;dietmar.eggemann@arm.com&gt;
Signed-off-by: Rui Miguel Silva &lt;rui.silva@linaro.org&gt;
Link: https://lore.kernel.org/r/20210827131154.4151862-4-rui.silva@linaro.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: isp1760: fix qtd fill length</title>
<updated>2021-08-27T14:11:38+00:00</updated>
<author>
<name>Rui Miguel Silva</name>
<email>rui.silva@linaro.org</email>
</author>
<published>2021-08-27T13:11:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cbfa3effdf5c2d411c9ce9820f3d33d77bc4697d'/>
<id>urn:sha1:cbfa3effdf5c2d411c9ce9820f3d33d77bc4697d</id>
<content type='text'>
When trying to send bulks bigger than the biggest block size
we need to split them over several qtd. Fix this limiting the
maximum qtd size to largest block size.

Reported-by: Dietmar Eggemann &lt;dietmar.eggemann@arm.com&gt;
Tested-by: Dietmar Eggemann &lt;dietmar.eggemann@arm.com&gt;
Signed-off-by: Rui Miguel Silva &lt;rui.silva@linaro.org&gt;
Link: https://lore.kernel.org/r/20210827131154.4151862-3-rui.silva@linaro.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: isp1760: fix memory pool initialization</title>
<updated>2021-08-27T14:11:38+00:00</updated>
<author>
<name>Rui Miguel Silva</name>
<email>rui.silva@linaro.org</email>
</author>
<published>2021-08-27T13:11:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f757f9291f920e1da4c6cfd4064c6bf59639983e'/>
<id>urn:sha1:f757f9291f920e1da4c6cfd4064c6bf59639983e</id>
<content type='text'>
The loops to setup the memory pool were skipping some
blocks, that was not visible on the ISP1763 because it has
fewer blocks than the ISP1761. But won testing on that IP
from the family that would be an issue.

Reported-by: Dietmar Eggemann &lt;dietmar.eggemann@arm.com&gt;
Tested-by: Dietmar Eggemann &lt;dietmar.eggemann@arm.com&gt;
Signed-off-by: Rui Miguel Silva &lt;rui.silva@linaro.org&gt;
Link: https://lore.kernel.org/r/20210827131154.4151862-2-rui.silva@linaro.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: isp1760: clean never read udc_enabled warning</title>
<updated>2021-08-26T11:30:39+00:00</updated>
<author>
<name>Rui Miguel Silva</name>
<email>rui.silva@linaro.org</email>
</author>
<published>2021-08-19T18:09:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=de940244e8987a76d73fb2b0057ecd494cbfeefd'/>
<id>urn:sha1:de940244e8987a76d73fb2b0057ecd494cbfeefd</id>
<content type='text'>
When CONFIG_USB_ISP1761_UDC is not enabled the udc_enabled variable is
never used since it is short circuited before in the logic operations.

This would trigger the following warning by clang analyzer:

drivers/usb/isp1760/isp1760-core.c:490:2: warning: Value stored to 'udc_enabled' is never read [clang-analyzer-deadcode.DeadStores]
        udc_enabled = ((devflags &amp; ISP1760_FLAG_ISP1763) ||
        ^
drivers/usb/isp1760/isp1760-core.c:490:2: note: Value stored to 'udc_enabled' is never read

Just swap the other of the operands in the logic operations.

Signed-off-by: Rui Miguel Silva &lt;rui.silva@linaro.org&gt;
Link: https://lore.kernel.org/r/20210819180929.1327349-6-rui.silva@linaro.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: isp1760: do not shift in uninitialized slot</title>
<updated>2021-08-26T11:30:39+00:00</updated>
<author>
<name>Rui Miguel Silva</name>
<email>rui.silva@linaro.org</email>
</author>
<published>2021-08-19T18:09:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7d1d3882fd9da1ee42fe3ad3a5ffd41fb8204380'/>
<id>urn:sha1:7d1d3882fd9da1ee42fe3ad3a5ffd41fb8204380</id>
<content type='text'>
Even though it is not expected, and would trigger a WARN_ON, killing a
transfer in a uninitialized slot this sequence is warned by clang
analyzer, twice:

drivers/usb/isp1760/isp1760-hcd.c:1976:18: warning: The result of the left shift is undefined because the right operand is negative [clang-analyzer-core.UndefinedBinaryOperatorResult]
                skip_map |= (1 &lt;&lt; qh-&gt;slot);
drivers/usb/isp1760/isp1760-hcd.c:1983:18: warning: The result of the left shift is undefined because the right operand is negative [clang-analyzer-core.UndefinedBinaryOperatorResult]
                skip_map |= (1 &lt;&lt; qh-&gt;slot);

Only set skip map if slot is active.

Signed-off-by: Rui Miguel Silva &lt;rui.silva@linaro.org&gt;
Link: https://lore.kernel.org/r/20210819180929.1327349-5-rui.silva@linaro.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: isp1760: do not reset retval</title>
<updated>2021-08-26T11:30:39+00:00</updated>
<author>
<name>Rui Miguel Silva</name>
<email>rui.silva@linaro.org</email>
</author>
<published>2021-08-19T18:09:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5e4cd1b6556302fe6a457e525c256cbef3563543'/>
<id>urn:sha1:5e4cd1b6556302fe6a457e525c256cbef3563543</id>
<content type='text'>
We do not really need to reset retval before get used bellow.
This will avoid the clang-analyzer warning:

drivers/usb/isp1760/isp1760-hcd.c:1919:2: warning: Value stored to 'retval' is never read [clang-analyzer-deadcode.DeadStores]
        retval = 0;

Signed-off-by: Rui Miguel Silva &lt;rui.silva@linaro.org&gt;
Link: https://lore.kernel.org/r/20210819180929.1327349-4-rui.silva@linaro.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: isp1760: check maxpacketsize before using it</title>
<updated>2021-08-26T11:30:39+00:00</updated>
<author>
<name>Rui Miguel Silva</name>
<email>rui.silva@linaro.org</email>
</author>
<published>2021-08-19T18:09:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8e58b7710d6634ed46ae26fedb8459f84f08fd51'/>
<id>urn:sha1:8e58b7710d6634ed46ae26fedb8459f84f08fd51</id>
<content type='text'>
When checking if we need one more packet on a bulk pipe we may, even
though not probable at all, get there with a zero maxpacketsize.
In that case for sure no packet, no even a one more, will be
allocated.

This will clean the clang-analyzer warning:
drivers/usb/isp1760/isp1760-hcd.c:1856:38: warning: Division by zero [clang-analyzer-core.DivideZero]
                                &amp;&amp; !(urb-&gt;transfer_buffer_length %

Signed-off-by: Rui Miguel Silva &lt;rui.silva@linaro.org&gt;
Link: https://lore.kernel.org/r/20210819180929.1327349-3-rui.silva@linaro.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: isp1760: ignore return value for bus change pattern</title>
<updated>2021-08-26T11:30:38+00:00</updated>
<author>
<name>Rui Miguel Silva</name>
<email>rui.silva@linaro.org</email>
</author>
<published>2021-08-19T18:09:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8472896f39cfab2d8fec9ca746070aaf02609169'/>
<id>urn:sha1:8472896f39cfab2d8fec9ca746070aaf02609169</id>
<content type='text'>
We do not care about the return value of that read between the
scratch register write and read, we really just want to make sure that
the pattern in the bus get changed to make sure we are testing
correctly the scratch pattern.

Clang-analyzer complains about the never read scratch variable:
&gt;&gt; drivers/usb/isp1760/isp1760-hcd.c:735:2: warning: Value stored to 'scratch' is never read [clang-analyzer-deadcode.DeadStores]
    scratch = isp1760_hcd_read(hcd, HC_CHIP_ID_HIGH);

Just ignore the return value of that CHIP_ID_HIGH read, add more
information to the comment above why we are doing this. And as at it,
just do a small format change in the error message bellow.

Signed-off-by: Rui Miguel Silva &lt;rui.silva@linaro.org&gt;
Link: https://lore.kernel.org/r/20210819180929.1327349-2-rui.silva@linaro.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
