<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in rtwn_usb_tx.h</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2025</copyright>
    <generator>Java</generator><item>
        <title>d99eb8230eb717ab0b2eba948614d0f2f2b5dd2b - rtwn: change the USB TX transfers to only do one pending transfer per endpoint</title>
        <link>http://opengrok.net:8080/history/src/sys/dev/rtwn/usb/rtwn_usb_tx.h#d99eb8230eb717ab0b2eba948614d0f2f2b5dd2b</link>
        <description>rtwn: change the USB TX transfers to only do one pending transfer per endpointI found I was getting constant device timeouts when doing anythingmore complicated than a single SSH on laptop with RTL8811AU.After digging into it, i found a variety of fun situations, includingtraffic stalls that would recover w/ a shorter (1 second) USB transfertimeout.  However, the big one is a straight up hang of any TX endpointuntil the NIC was reset.  The RX side kept going just fine; only theTX endpoints would hang.Reproducing it was easy - just start up a couple of traffic streamson different WME AC&apos;s - eg a best effort + bulk transfer, likebrowsing the web and doing an ssh clone - throw in a ping -i 0.1to your gateway, and it would very quickly hit device timeouts everycouple of seconds.I put everything into a single TX EP and the hangs went away.Well, mostly.So after some MORE digging, I found that this driver isn&apos;t checkingif the transfers are going into the correct EPs for the packetWME access category / 802.11 TID; and would frequently be ableto schedule multiple transfers into the same endpoint.Then there&apos;s a second problem - there&apos;s an array of endpointsused for setting up the USB device, with .endpoint = UE_ADDR_ANY,however they&apos;re also being setup with the same endpoint configuredin multiple transfer configs.  Eg, a NIC with 3 or 4 bulk TX endpointswill configure the BK and BE endpoints with the same physical endpointID.  This also leads to timed out transfers.My /guess/ was that the firmware isn&apos;t happy with one or both of theabove, and so I solved both.* drop the USB transfer timeout to 1 second, not 5 seconds -  that way we&apos;ll either get a 1 second traffic pause and USB transfer  failure, or a 5 second device timeout.  Having both the TX timeout  and the USB transfer timeout made recovery from a USB transfer  timeout (without a NIC reset) almost impossible.* enforce one transfer per endpoint;* separate pending/active buffer tracking per endpoint;* each endpoint now has its own TX callback to make sure the queue /  end point ID is known;* and only frames from a given endpoint pending queue is going  into the active queue and into that endpoint.* Finally, create a local wme2qid array and populate it with the  endpoint mapping that ensures unique physical endpoint use.Locally tested:* rtl8812AU, 11n STA mode* rtl8192EU, 11n STA mode (with diffs to fix the channel config / power  timeouts.)Differential Revision: https://reviews.freebsd.org/D47522

            List of files:
            /src/sys/dev/rtwn/usb/rtwn_usb_tx.h</description>
        <pubDate>Tue, 12 Nov 2024 04:48:12 +0000</pubDate>
        <dc:creator>Adrian Chadd &lt;adrian@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>95ee2897e98f5d444f26ed2334cc7c439f9c16c6 - sys: Remove $FreeBSD$: two-line .h pattern</title>
        <link>http://opengrok.net:8080/history/src/sys/dev/rtwn/usb/rtwn_usb_tx.h#95ee2897e98f5d444f26ed2334cc7c439f9c16c6</link>
        <description>sys: Remove $FreeBSD$: two-line .h patternRemove /^\s*\*\n \*\s+\$FreeBSD\$$\n/

            List of files:
            /src/sys/dev/rtwn/usb/rtwn_usb_tx.h</description>
        <pubDate>Wed, 16 Aug 2023 17:54:11 +0000</pubDate>
        <dc:creator>Warner Losh &lt;imp@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>d99eb8230eb717ab0b2eba948614d0f2f2b5dd2b - rtwn: change the USB TX transfers to only do one pending transfer per endpoint</title>
        <link>http://opengrok.net:8080/history/src/sys/dev/rtwn/usb/rtwn_usb_tx.h#d99eb8230eb717ab0b2eba948614d0f2f2b5dd2b</link>
        <description>rtwn: change the USB TX transfers to only do one pending transfer per endpointI found I was getting constant device timeouts when doing anythingmore complicated than a single SSH on laptop with RTL8811AU.After digging into it, i found a variety of fun situations, includingtraffic stalls that would recover w/ a shorter (1 second) USB transfertimeout.  However, the big one is a straight up hang of any TX endpointuntil the NIC was reset.  The RX side kept going just fine; only theTX endpoints would hang.Reproducing it was easy - just start up a couple of traffic streamson different WME AC&apos;s - eg a best effort + bulk transfer, likebrowsing the web and doing an ssh clone - throw in a ping -i 0.1to your gateway, and it would very quickly hit device timeouts everycouple of seconds.I put everything into a single TX EP and the hangs went away.Well, mostly.So after some MORE digging, I found that this driver isn&apos;t checkingif the transfers are going into the correct EPs for the packetWME access category / 802.11 TID; and would frequently be ableto schedule multiple transfers into the same endpoint.Then there&apos;s a second problem - there&apos;s an array of endpointsused for setting up the USB device, with .endpoint = UE_ADDR_ANY,however they&apos;re also being setup with the same endpoint configuredin multiple transfer configs.  Eg, a NIC with 3 or 4 bulk TX endpointswill configure the BK and BE endpoints with the same physical endpointID.  This also leads to timed out transfers.My /guess/ was that the firmware isn&apos;t happy with one or both of theabove, and so I solved both.* drop the USB transfer timeout to 1 second, not 5 seconds -  that way we&apos;ll either get a 1 second traffic pause and USB transfer  failure, or a 5 second device timeout.  Having both the TX timeout  and the USB transfer timeout made recovery from a USB transfer  timeout (without a NIC reset) almost impossible.* enforce one transfer per endpoint;* separate pending/active buffer tracking per endpoint;* each endpoint now has its own TX callback to make sure the queue /  end point ID is known;* and only frames from a given endpoint pending queue is going  into the active queue and into that endpoint.* Finally, create a local wme2qid array and populate it with the  endpoint mapping that ensures unique physical endpoint use.Locally tested:* rtl8812AU, 11n STA mode* rtl8192EU, 11n STA mode (with diffs to fix the channel config / power  timeouts.)Differential Revision: https://reviews.freebsd.org/D47522

            List of files:
            /src/sys/dev/rtwn/usb/rtwn_usb_tx.h</description>
        <pubDate>Tue, 12 Nov 2024 04:48:12 +0000</pubDate>
        <dc:creator>Adrian Chadd &lt;adrian@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>95ee2897e98f5d444f26ed2334cc7c439f9c16c6 - sys: Remove $FreeBSD$: two-line .h pattern</title>
        <link>http://opengrok.net:8080/history/src/sys/dev/rtwn/usb/rtwn_usb_tx.h#95ee2897e98f5d444f26ed2334cc7c439f9c16c6</link>
        <description>sys: Remove $FreeBSD$: two-line .h patternRemove /^\s*\*\n \*\s+\$FreeBSD\$$\n/

            List of files:
            /src/sys/dev/rtwn/usb/rtwn_usb_tx.h</description>
        <pubDate>Wed, 16 Aug 2023 17:54:11 +0000</pubDate>
        <dc:creator>Warner Losh &lt;imp@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>5763f79695f9b1ffacce55a8594cb7be08c3f31c - Merge ^/head r307383 through r307735.</title>
        <link>http://opengrok.net:8080/history/src/sys/dev/rtwn/usb/rtwn_usb_tx.h#5763f79695f9b1ffacce55a8594cb7be08c3f31c</link>
        <description>Merge ^/head r307383 through r307735.

            List of files:
            /src/sys/dev/rtwn/usb/rtwn_usb_tx.h</description>
        <pubDate>Fri, 21 Oct 2016 16:29:40 +0000</pubDate>
        <dc:creator>Dimitry Andric &lt;dim@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>7453645f2a9411a3f9d982b768bcc323f41cf906 - rtwn(4), urtwn(4): merge common code, add support for 11ac devices.</title>
        <link>http://opengrok.net:8080/history/src/sys/dev/rtwn/usb/rtwn_usb_tx.h#7453645f2a9411a3f9d982b768bcc323f41cf906</link>
        <description>rtwn(4), urtwn(4): merge common code, add support for 11ac devices.All devices:- add support for rate adaptation via ieee80211_amrr(9);- use short preamble for transmitted frames when needed;- multi-bss support: * for RTL8821AU: 2 VAPs at the same time; * other: 1 any VAP + 1 sta VAP.RTL8188CE:- fix IQ calibration bug (reason of significant speed degradation);- add h/w crypto acceleration support.USB:- A-MPDU Tx support;- short GI support;Other:- add support for RTL8812AU / RTL8821AU chipsets(a/b/g/n only; no ac yet);- split merged code into subparts: * bus glue (usb/*, pci/*, rtl*/usb/*, rtl*/pci/*) * common (if_rtwn*) * chip-specific (rtl*/*)- various other bugfixes.Due to code reorganization, module names / requirements were changed too:urtwn urtwnfw -&gt; rtwn rtwn_usb rtwnfwrtwn  rtwnfw  -&gt; rtwn rtwn_pci rtwnfwTested with RTL8188CE, RTL8188CUS, RTL8188EU and RTL8821AU.Tested by:	kevlo, garga,		Peter Garshtja &lt;peter.garshtja@ambient-md.com&gt;,		Kevin McAleavey &lt;kevin.mcaleavey@knosproject.com&gt;,		Ilias-Dimitrios Vrachnis &lt;id@vrachnis.com&gt;,		&lt;otacilio.neto@bsd.com.br&gt;Relnotes:	yes

            List of files:
            /src/sys/dev/rtwn/usb/rtwn_usb_tx.h</description>
        <pubDate>Mon, 17 Oct 2016 20:38:24 +0000</pubDate>
        <dc:creator>Andriy Voskoboinyk &lt;avos@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>5763f79695f9b1ffacce55a8594cb7be08c3f31c - Merge ^/head r307383 through r307735.</title>
        <link>http://opengrok.net:8080/history/src/sys/dev/rtwn/usb/rtwn_usb_tx.h#5763f79695f9b1ffacce55a8594cb7be08c3f31c</link>
        <description>Merge ^/head r307383 through r307735.

            List of files:
            /src/sys/dev/rtwn/usb/rtwn_usb_tx.h</description>
        <pubDate>Fri, 21 Oct 2016 16:29:40 +0000</pubDate>
        <dc:creator>Dimitry Andric &lt;dim@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>7453645f2a9411a3f9d982b768bcc323f41cf906 - rtwn(4), urtwn(4): merge common code, add support for 11ac devices.</title>
        <link>http://opengrok.net:8080/history/src/sys/dev/rtwn/usb/rtwn_usb_tx.h#7453645f2a9411a3f9d982b768bcc323f41cf906</link>
        <description>rtwn(4), urtwn(4): merge common code, add support for 11ac devices.All devices:- add support for rate adaptation via ieee80211_amrr(9);- use short preamble for transmitted frames when needed;- multi-bss support: * for RTL8821AU: 2 VAPs at the same time; * other: 1 any VAP + 1 sta VAP.RTL8188CE:- fix IQ calibration bug (reason of significant speed degradation);- add h/w crypto acceleration support.USB:- A-MPDU Tx support;- short GI support;Other:- add support for RTL8812AU / RTL8821AU chipsets(a/b/g/n only; no ac yet);- split merged code into subparts: * bus glue (usb/*, pci/*, rtl*/usb/*, rtl*/pci/*) * common (if_rtwn*) * chip-specific (rtl*/*)- various other bugfixes.Due to code reorganization, module names / requirements were changed too:urtwn urtwnfw -&gt; rtwn rtwn_usb rtwnfwrtwn  rtwnfw  -&gt; rtwn rtwn_pci rtwnfwTested with RTL8188CE, RTL8188CUS, RTL8188EU and RTL8821AU.Tested by:	kevlo, garga,		Peter Garshtja &lt;peter.garshtja@ambient-md.com&gt;,		Kevin McAleavey &lt;kevin.mcaleavey@knosproject.com&gt;,		Ilias-Dimitrios Vrachnis &lt;id@vrachnis.com&gt;,		&lt;otacilio.neto@bsd.com.br&gt;Relnotes:	yes

            List of files:
            /src/sys/dev/rtwn/usb/rtwn_usb_tx.h</description>
        <pubDate>Mon, 17 Oct 2016 20:38:24 +0000</pubDate>
        <dc:creator>Andriy Voskoboinyk &lt;avos@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>d99eb8230eb717ab0b2eba948614d0f2f2b5dd2b - rtwn: change the USB TX transfers to only do one pending transfer per endpoint</title>
        <link>http://opengrok.net:8080/history/src/sys/dev/rtwn/usb/rtwn_usb_tx.h#d99eb8230eb717ab0b2eba948614d0f2f2b5dd2b</link>
        <description>rtwn: change the USB TX transfers to only do one pending transfer per endpointI found I was getting constant device timeouts when doing anythingmore complicated than a single SSH on laptop with RTL8811AU.After digging into it, i found a variety of fun situations, includingtraffic stalls that would recover w/ a shorter (1 second) USB transfertimeout.  However, the big one is a straight up hang of any TX endpointuntil the NIC was reset.  The RX side kept going just fine; only theTX endpoints would hang.Reproducing it was easy - just start up a couple of traffic streamson different WME AC&apos;s - eg a best effort + bulk transfer, likebrowsing the web and doing an ssh clone - throw in a ping -i 0.1to your gateway, and it would very quickly hit device timeouts everycouple of seconds.I put everything into a single TX EP and the hangs went away.Well, mostly.So after some MORE digging, I found that this driver isn&apos;t checkingif the transfers are going into the correct EPs for the packetWME access category / 802.11 TID; and would frequently be ableto schedule multiple transfers into the same endpoint.Then there&apos;s a second problem - there&apos;s an array of endpointsused for setting up the USB device, with .endpoint = UE_ADDR_ANY,however they&apos;re also being setup with the same endpoint configuredin multiple transfer configs.  Eg, a NIC with 3 or 4 bulk TX endpointswill configure the BK and BE endpoints with the same physical endpointID.  This also leads to timed out transfers.My /guess/ was that the firmware isn&apos;t happy with one or both of theabove, and so I solved both.* drop the USB transfer timeout to 1 second, not 5 seconds -  that way we&apos;ll either get a 1 second traffic pause and USB transfer  failure, or a 5 second device timeout.  Having both the TX timeout  and the USB transfer timeout made recovery from a USB transfer  timeout (without a NIC reset) almost impossible.* enforce one transfer per endpoint;* separate pending/active buffer tracking per endpoint;* each endpoint now has its own TX callback to make sure the queue /  end point ID is known;* and only frames from a given endpoint pending queue is going  into the active queue and into that endpoint.* Finally, create a local wme2qid array and populate it with the  endpoint mapping that ensures unique physical endpoint use.Locally tested:* rtl8812AU, 11n STA mode* rtl8192EU, 11n STA mode (with diffs to fix the channel config / power  timeouts.)Differential Revision: https://reviews.freebsd.org/D47522

            List of files:
            /src/sys/dev/rtwn/usb/rtwn_usb_tx.h</description>
        <pubDate>Tue, 12 Nov 2024 04:48:12 +0000</pubDate>
        <dc:creator>Adrian Chadd &lt;adrian@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>95ee2897e98f5d444f26ed2334cc7c439f9c16c6 - sys: Remove $FreeBSD$: two-line .h pattern</title>
        <link>http://opengrok.net:8080/history/src/sys/dev/rtwn/usb/rtwn_usb_tx.h#95ee2897e98f5d444f26ed2334cc7c439f9c16c6</link>
        <description>sys: Remove $FreeBSD$: two-line .h patternRemove /^\s*\*\n \*\s+\$FreeBSD\$$\n/

            List of files:
            /src/sys/dev/rtwn/usb/rtwn_usb_tx.h</description>
        <pubDate>Wed, 16 Aug 2023 17:54:11 +0000</pubDate>
        <dc:creator>Warner Losh &lt;imp@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>5763f79695f9b1ffacce55a8594cb7be08c3f31c - Merge ^/head r307383 through r307735.</title>
        <link>http://opengrok.net:8080/history/src/sys/dev/rtwn/usb/rtwn_usb_tx.h#5763f79695f9b1ffacce55a8594cb7be08c3f31c</link>
        <description>Merge ^/head r307383 through r307735.

            List of files:
            /src/sys/dev/rtwn/usb/rtwn_usb_tx.h</description>
        <pubDate>Fri, 21 Oct 2016 16:29:40 +0000</pubDate>
        <dc:creator>Dimitry Andric &lt;dim@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>7453645f2a9411a3f9d982b768bcc323f41cf906 - rtwn(4), urtwn(4): merge common code, add support for 11ac devices.</title>
        <link>http://opengrok.net:8080/history/src/sys/dev/rtwn/usb/rtwn_usb_tx.h#7453645f2a9411a3f9d982b768bcc323f41cf906</link>
        <description>rtwn(4), urtwn(4): merge common code, add support for 11ac devices.All devices:- add support for rate adaptation via ieee80211_amrr(9);- use short preamble for transmitted frames when needed;- multi-bss support: * for RTL8821AU: 2 VAPs at the same time; * other: 1 any VAP + 1 sta VAP.RTL8188CE:- fix IQ calibration bug (reason of significant speed degradation);- add h/w crypto acceleration support.USB:- A-MPDU Tx support;- short GI support;Other:- add support for RTL8812AU / RTL8821AU chipsets(a/b/g/n only; no ac yet);- split merged code into subparts: * bus glue (usb/*, pci/*, rtl*/usb/*, rtl*/pci/*) * common (if_rtwn*) * chip-specific (rtl*/*)- various other bugfixes.Due to code reorganization, module names / requirements were changed too:urtwn urtwnfw -&gt; rtwn rtwn_usb rtwnfwrtwn  rtwnfw  -&gt; rtwn rtwn_pci rtwnfwTested with RTL8188CE, RTL8188CUS, RTL8188EU and RTL8821AU.Tested by:	kevlo, garga,		Peter Garshtja &lt;peter.garshtja@ambient-md.com&gt;,		Kevin McAleavey &lt;kevin.mcaleavey@knosproject.com&gt;,		Ilias-Dimitrios Vrachnis &lt;id@vrachnis.com&gt;,		&lt;otacilio.neto@bsd.com.br&gt;Relnotes:	yes

            List of files:
            /src/sys/dev/rtwn/usb/rtwn_usb_tx.h</description>
        <pubDate>Mon, 17 Oct 2016 20:38:24 +0000</pubDate>
        <dc:creator>Andriy Voskoboinyk &lt;avos@FreeBSD.org&gt;</dc:creator>
    </item>
</channel>
</rss>
