<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/usb/cdns3/cdnsp-ring.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>2023-11-21T14:29:14Z</updated>
<entry>
<title>usb: cdnsp: Fix deadlock issue during using NCM gadget</title>
<updated>2023-11-21T14:29:14Z</updated>
<author>
<name>Pawel Laszczak</name>
<email>pawell@cadence.com</email>
</author>
<published>2023-11-08T09:31:25Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=58f2fcb3a845fcbbad2f3196bb37d744e0506250'/>
<id>urn:sha1:58f2fcb3a845fcbbad2f3196bb37d744e0506250</id>
<content type='text'>
The interrupt service routine registered for the gadget is a primary
handler which mask the interrupt source and a threaded handler which
handles the source of the interrupt. Since the threaded handler is
voluntary threaded, the IRQ-core does not disable bottom halves before
invoke the handler like it does for the forced-threaded handler.

Due to changes in networking it became visible that a network gadget's
completions handler may schedule a softirq which remains unprocessed.
The gadget's completion handler is usually invoked either in hard-IRQ or
soft-IRQ context. In this context it is enough to just raise the softirq
because the softirq itself will be handled once that context is left.
In the case of the voluntary threaded handler, there is nothing that
will process pending softirqs. Which means it remain queued until
another random interrupt (on this CPU) fires and handles it on its exit
path or another thread locks and unlocks a lock with the bh suffix.
Worst case is that the CPU goes idle and the NOHZ complains about
unhandled softirqs.

Disable bottom halves before acquiring the lock (and disabling
interrupts) and enable them after dropping the lock. This ensures that
any pending softirqs will handled right away.

cc: stable@vger.kernel.org
Fixes: 3d82904559f4 ("usb: cdnsp: cdns3 Add main part of Cadence USBSSP DRD Driver")
Signed-off-by: Pawel Laszczak &lt;pawell@cadence.com&gt;
Acked-by: Peter Chen &lt;peter.chen@kernel.org&gt;
Link: https://lore.kernel.org/r/20231108093125.224963-1-pawell@cadence.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb:cdnsp: remove TRB_FLUSH_ENDPOINT command</title>
<updated>2023-10-27T10:56:37Z</updated>
<author>
<name>Pawel Laszczak</name>
<email>pawell@cadence.com</email>
</author>
<published>2023-10-26T07:37:37Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=2998874736bca1031ca84b0a3235a2cd09dfa426'/>
<id>urn:sha1:2998874736bca1031ca84b0a3235a2cd09dfa426</id>
<content type='text'>
Patch removes TRB_FLUSH_ENDPOINT command from driver.
This command is not supported by controller and
USBSSP returns TRB Error completion code for it.

Signed-off-by: Pawel Laszczak &lt;pawell@cadence.com&gt;
Acked-by: Peter Chen &lt;peter.chen@kernel.org&gt;
Link: https://lore.kernel.org/r/20231026073737.165450-1-pawell@cadence.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: cdnsp: : add scatter gather support for ISOC endpoint</title>
<updated>2023-01-17T16:30:17Z</updated>
<author>
<name>Pawel Laszczak</name>
<email>pawell@cadence.com</email>
</author>
<published>2022-12-22T09:09:34Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=82b0417e4bfc5af8c1710996913374f09f4a2a03'/>
<id>urn:sha1:82b0417e4bfc5af8c1710996913374f09f4a2a03</id>
<content type='text'>
Patch implements scatter gather support for isochronous endpoint.
This fix is forced by 'commit e81e7f9a0eb9
("usb: gadget: uvc: add scatter gather support")'.
After this fix CDNSP driver stop working with UVC class.

Signed-off-by: Pawel Laszczak &lt;pawell@cadence.com&gt;
Reviewed-by: Peter Chen &lt;peter.chen@kernel.org&gt;
Link: https://lore.kernel.org/r/20221222090934.145140-1-pawell@cadence.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: cdnsp: fix lack of ZLP for ep0</title>
<updated>2022-11-29T07:56:09Z</updated>
<author>
<name>Pawel Laszczak</name>
<email>pawell@cadence.com</email>
</author>
<published>2022-11-22T08:51:38Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=ae423ef5d095e09970f52c08020fdbf7f9d87c22'/>
<id>urn:sha1:ae423ef5d095e09970f52c08020fdbf7f9d87c22</id>
<content type='text'>
Patch implements the handling of ZLP for control transfer.
To send the ZLP driver must prepare the extra TRB in TD with
length set to zero and TRB type to TRB_NORMAL.
The first TRB must have set TRB_CHAIN flag, TD_SIZE = 1
and TRB type to TRB_DATA.

Fixes: 3d82904559f4 ("usb: cdnsp: cdns3 Add main part of Cadence USBSSP DRD Driver")
cc: &lt;stable@vger.kernel.org&gt;
Reviewed-by: Peter Chen &lt;peter.chen@kernel.org&gt;
Signed-off-by: Pawel Laszczak &lt;pawell@cadence.com&gt;
Link: https://lore.kernel.org/r/20221122085138.332434-1-pawell@cadence.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: cdnsp: fix issue with ZLP - added TD_SIZE = 1</title>
<updated>2022-11-22T15:52:05Z</updated>
<author>
<name>Pawel Laszczak</name>
<email>pawell@cadence.com</email>
</author>
<published>2022-11-15T09:22:18Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7a21b27aafa3edead79ed97e6f22236be6b9f447'/>
<id>urn:sha1:7a21b27aafa3edead79ed97e6f22236be6b9f447</id>
<content type='text'>
Patch modifies the TD_SIZE in TRB before ZLP TRB.
The TD_SIZE in TRB before ZLP TRB must be set to 1 to force
processing ZLP TRB by controller.

cc: &lt;stable@vger.kernel.org&gt;
Fixes: 3d82904559f4 ("usb: cdnsp: cdns3 Add main part of Cadence USBSSP DRD Driver")
Signed-off-by: Pawel Laszczak &lt;pawell@cadence.com&gt;
Reviewed-by: Peter Chen &lt;peter.chen@kernel.org&gt;
Link: https://lore.kernel.org/r/20221115092218.421267-1-pawell@cadence.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: cdnsp: Fix issue with Clear Feature Halt Endpoint</title>
<updated>2022-11-22T15:51:26Z</updated>
<author>
<name>Pawel Laszczak</name>
<email>pawell@cadence.com</email>
</author>
<published>2022-11-10T06:30:05Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b25264f22b498dff3fa5c70c9bea840e83fff0d1'/>
<id>urn:sha1:b25264f22b498dff3fa5c70c9bea840e83fff0d1</id>
<content type='text'>
During handling Clear Halt Endpoint Feature request, driver invokes
Reset Endpoint command. Because this command has some issue with
transition endpoint from Running to Idle state the driver must
stop the endpoint by using Stop Endpoint command.

cc: &lt;stable@vger.kernel.org&gt;
Fixes: 3d82904559f4 ("usb: cdnsp: cdns3 Add main part of Cadence USBSSP DRD Driver")
Reviewed-by: Peter Chen &lt;peter.chen@kernel.org&gt;
Signed-off-by: Pawel Laszczak &lt;pawell@cadence.com&gt;
Link: https://lore.kernel.org/r/20221110063005.370656-1-pawell@cadence.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: cdnsp: Fixed setting last_trb incorrectly</title>
<updated>2022-06-10T09:15:23Z</updated>
<author>
<name>Jing Leng</name>
<email>jleng@ambarella.com</email>
</author>
<published>2022-06-09T02:11:34Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=5c7578c39c3fffe85b7d15ca1cf8cf7ac38ec0c1'/>
<id>urn:sha1:5c7578c39c3fffe85b7d15ca1cf8cf7ac38ec0c1</id>
<content type='text'>
When ZLP occurs in bulk transmission, currently cdnsp will set last_trb
for the last two TRBs, it will trigger an error "ERROR Transfer event TRB
DMA ptr not part of current TD ...".

Fixes: e913aada0683 ("usb: cdnsp: Fixed issue with ZLP")
Cc: stable &lt;stable@kernel.org&gt;
Acked-by: Pawel Laszczak &lt;pawell@cadence.com&gt;
Signed-off-by: Jing Leng &lt;jleng@ambarella.com&gt;
Link: https://lore.kernel.org/r/20220609021134.1606-1-3090101217@zju.edu.cn
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: cdnsp: Fix incorrect status for control request</title>
<updated>2021-12-13T14:23:42Z</updated>
<author>
<name>Pawel Laszczak</name>
<email>pawell@cadence.com</email>
</author>
<published>2021-12-07T09:18:38Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=99ea221f2e2f2743314e348b25c1e2574b467528'/>
<id>urn:sha1:99ea221f2e2f2743314e348b25c1e2574b467528</id>
<content type='text'>
Patch fixes incorrect status for control request.
Without this fix all usb_request objects were returned to upper drivers
with usb_reqest-&gt;status field set to -EINPROGRESS.

Fixes: 3d82904559f4 ("usb: cdnsp: cdns3 Add main part of Cadence USBSSP DRD Driver")
cc: &lt;stable@vger.kernel.org&gt;
Reported-by: Ken (Jian) He &lt;jianhe@ambarella.com&gt;
Reviewed-by: Peter Chen &lt;peter.chen@kernel.org&gt;
Signed-off-by: Pawel Laszczak &lt;pawell@cadence.com&gt;
Link: https://lore.kernel.org/r/20211207091838.39572-1-pawell@gli-login.cadence.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: cdnsp: Fix incorrect calling of cdnsp_died function</title>
<updated>2021-12-13T14:23:19Z</updated>
<author>
<name>Pawel Laszczak</name>
<email>pawell@cadence.com</email>
</author>
<published>2021-12-10T11:29:45Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=16f00d969afe60e233c1a91af7ac840df60d3536'/>
<id>urn:sha1:16f00d969afe60e233c1a91af7ac840df60d3536</id>
<content type='text'>
Patch restrict calling of cdnsp_died function during removing modules
or software disconnect.
This function was called because after transition controller to HALT
state the driver starts handling the deferred interrupt.
In this case such interrupt can be simple ignored.

Fixes: 3d82904559f4 ("usb: cdnsp: cdns3 Add main part of Cadence USBSSP DRD Driver")
cc: &lt;stable@vger.kernel.org&gt;
Reviewed-by: Peter Chen &lt;peter.chen@kernel.org&gt;
Signed-off-by: Pawel Laszczak &lt;pawell@cadence.com&gt;
Link: https://lore.kernel.org/r/20211210112945.660-1-pawell@gli-login.cadence.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: cdnsp: Fixed issue with ZLP</title>
<updated>2021-07-29T06:13:02Z</updated>
<author>
<name>Pawel Laszczak</name>
<email>pawell@cadence.com</email>
</author>
<published>2021-06-23T07:27:28Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e913aada06830338633fb8524733b0ad3d38a7c1'/>
<id>urn:sha1:e913aada06830338633fb8524733b0ad3d38a7c1</id>
<content type='text'>
The condition "if (need_zero_pkt &amp;&amp; zero_len_trb)" was always false
and it caused that TRB for ZLP was not prepared.

Fix causes that after preparing last TRB in TD, the driver prepares
additional TD with ZLP when a ZLP is required.

Cc: &lt;stable@vger.kernel.org&gt;
Fixes: 3d82904559f4 ("usb: cdnsp: cdns3 Add main part of Cadence USBSSP DRD Driver")
Signed-off-by: Pawel Laszczak &lt;pawell@cadence.com&gt;
Link: https://lore.kernel.org/r/20210623072728.41275-1-pawell@gli-login.cadence.com
Signed-off-by: Peter Chen &lt;peter.chen@kernel.org&gt;
</content>
</entry>
</feed>
