Linux-Wireless Archive on lore.kernel.org
 help / color / Atom feed
* rt2x00 regression
@ 2019-09-26 16:32 Anton Olsson
  2019-09-27  8:03 ` Stanislaw Gruszka
  0 siblings, 1 reply; 4+ messages in thread
From: Anton Olsson @ 2019-09-26 16:32 UTC (permalink / raw)
  To: linux-wireless; +Cc: Stanislaw Gruszka, Helmut Schaa

Hello I have a USB based ID 148f:3070 Ralink Technology, Corp. RT2870/RT3070 Wireless Adapter, that stops working with recent kernels. It works on kernel 5.1.15 and does not work with 5.2.7 or 5.3.1 (I have not tested other versions). I use it in AP mode.

I found this similar bug report https://marc.info/?l=linux-wireless&m=156630037103575&w=2 but that did not have related error messages so I assume this is different?

Logs of working kernel 5.1.15-arch1-1-ARCH.
[   78.680555] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 3070, rev 0201 detected
[   78.690992] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 0005 detected
[   78.799625] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
sep 26 17:13:03 kernel: usbcore: registered new interface driver rt2800usb
sep 26 17:13:03 systemd[1]: Found device RT2870/RT3070 Wireless Adapter.
[  113.812454] ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
[  113.905279] ieee80211 phy0: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.36
[  114.028703] ieee80211 phy0: rt2x00usb_vendor_request: Error - Vendor Request 0x06 failed for offset 0x0404 with error -71

The last error there does not seem to affect the operation of the device.

Logs of not working with kernel 5.3.1, 5.2.7 has similar output.
sep 26 17:06:12 kernel: ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 3070, rev 0201 detected
sep 26 17:06:12 kernel: ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 0005 detected
sep 26 17:06:12 kernel: ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
sep 26 17:06:12 kernel: usbcore: registered new interface driver rt2800usb
sep 26 17:06:12 systemd[1]: Found device RT2870/RT3070 Wireless Adapter.
sep 26 17:06:21 ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
sep 26 17:06:21 ieee80211 phy0: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.36
sep 26 17:06:21 ieee80211 phy0: rt2x00usb_vendor_request: Error - Vendor Request 0x06 failed for offset 0x0404 with>
sep 26 17:06:22 ieee80211 phy0: rt2800_wait_csr_ready: Error - Unstable hardware
sep 26 17:06:22 ieee80211 phy0: rt2800usb_set_device_state: Error - Device failed to enter state 4 (-5)

Unable to bring up the network interface here.

Tell me if you want me to run any commands or test any patches.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: rt2x00 regression
  2019-09-26 16:32 rt2x00 regression Anton Olsson
@ 2019-09-27  8:03 ` Stanislaw Gruszka
       [not found]   ` <CA+GwT0B5SyRZnGLqwqOeuJK4CWMVc=dKaWre9VN8KQC6kBzKGw@mail.gmail.com>
  0 siblings, 1 reply; 4+ messages in thread
From: Stanislaw Gruszka @ 2019-09-27  8:03 UTC (permalink / raw)
  To: Anton Olsson; +Cc: linux-wireless, Helmut Schaa

On Thu, Sep 26, 2019 at 06:32:23PM +0200, Anton Olsson wrote:
> Hello I have a USB based ID 148f:3070 Ralink Technology, Corp. RT2870/RT3070 Wireless Adapter, that stops working with recent kernels. It works on kernel 5.1.15 and does not work with 5.2.7 or 5.3.1 (I have not tested other versions). I use it in AP mode.
> 
> I found this similar bug report https://marc.info/?l=linux-wireless&m=156630037103575&w=2 but that did not have related error messages so I assume this is different?
> 
> Logs of working kernel 5.1.15-arch1-1-ARCH.
> [   78.680555] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 3070, rev 0201 detected
> [   78.690992] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 0005 detected
> [   78.799625] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
> sep 26 17:13:03 kernel: usbcore: registered new interface driver rt2800usb
> sep 26 17:13:03 systemd[1]: Found device RT2870/RT3070 Wireless Adapter.
> [  113.812454] ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
> [  113.905279] ieee80211 phy0: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.36
> [  114.028703] ieee80211 phy0: rt2x00usb_vendor_request: Error - Vendor Request 0x06 failed for offset 0x0404 with error -71
> 
> The last error there does not seem to affect the operation of the device.
> 
> Logs of not working with kernel 5.3.1, 5.2.7 has similar output.
> sep 26 17:06:12 kernel: ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 3070, rev 0201 detected
> sep 26 17:06:12 kernel: ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 0005 detected
> sep 26 17:06:12 kernel: ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
> sep 26 17:06:12 kernel: usbcore: registered new interface driver rt2800usb
> sep 26 17:06:12 systemd[1]: Found device RT2870/RT3070 Wireless Adapter.
> sep 26 17:06:21 ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
> sep 26 17:06:21 ieee80211 phy0: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.36
> sep 26 17:06:21 ieee80211 phy0: rt2x00usb_vendor_request: Error - Vendor Request 0x06 failed for offset 0x0404 with>
> sep 26 17:06:22 ieee80211 phy0: rt2800_wait_csr_ready: Error - Unstable hardware
> sep 26 17:06:22 ieee80211 phy0: rt2800usb_set_device_state: Error - Device failed to enter state 4 (-5)
> 
> Unable to bring up the network interface here.

This most likely is the problem introduced by commit:

commit e383c70474db32b9d4a3de6dfbd08784d19e6751
Author: Stanislaw Gruszka <sgruszka@redhat.com>
Date:   Tue Mar 12 10:51:42 2019 +0100

    rt2x00: check number of EPROTO errors

Plase check below patch that increase number of EPROTO checks 
before marking device removed. If it does not help, plese
check if reverting above commits helps.

diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00usb.c b/drivers/net/wireless/ralink/rt2x00/rt2x00usb.c
index bc2dfef0de22..215c3f092306 100644
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00usb.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00usb.c
@@ -30,7 +30,7 @@ static bool rt2x00usb_check_usb_error(struct rt2x00_dev *rt2x00dev, int status)
 	else
 		rt2x00dev->num_proto_errs = 0;
 
-	if (rt2x00dev->num_proto_errs > 3)
+	if (rt2x00dev->num_proto_errs > 8)
 		return true;
 
 	return false;

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: rt2x00 regression
       [not found]   ` <CA+GwT0B5SyRZnGLqwqOeuJK4CWMVc=dKaWre9VN8KQC6kBzKGw@mail.gmail.com>
@ 2019-12-03  7:57     ` Stanislaw Gruszka
  2019-12-03 18:50       ` Anton Olsson
  0 siblings, 1 reply; 4+ messages in thread
From: Stanislaw Gruszka @ 2019-12-03  7:57 UTC (permalink / raw)
  To: Exuvo; +Cc: linux-wireless, Helmut Schaa

On Mon, Dec 02, 2019 at 05:40:20PM +0100, Exuvo wrote:
> Sorry for the late reply
> 
> The patch for increasing the amount did not work, i'll get around to
> testing with the commit reverted.

So, revert of that commit makes the problem gone ?

> As an aside what function can i call at that point in the code to print the
> value in num_proto_errs? I assume some kernel special printf?
It's printk. You can add line like this to print values:

printk("status %d num_proto_errs %u\n", status, rt2x00dev->num_proto_errs);

Stanislaw


> On Fri, 27 Sep 2019, 10:03 Stanislaw Gruszka, <sgruszka@redhat.com> wrote:
> 
> > On Thu, Sep 26, 2019 at 06:32:23PM +0200, Anton Olsson wrote:
> > > Hello I have a USB based ID 148f:3070 Ralink Technology, Corp.
> > RT2870/RT3070 Wireless Adapter, that stops working with recent kernels. It
> > works on kernel 5.1.15 and does not work with 5.2.7 or 5.3.1 (I have not
> > tested other versions). I use it in AP mode.
> > >
> > > I found this similar bug report
> > https://marc.info/?l=linux-wireless&m=156630037103575&w=2 but that did
> > not have related error messages so I assume this is different?
> > >
> > > Logs of working kernel 5.1.15-arch1-1-ARCH.
> > > [   78.680555] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 3070,
> > rev 0201 detected
> > > [   78.690992] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 0005
> > detected
> > > [   78.799625] ieee80211 phy0: Selected rate control algorithm
> > 'minstrel_ht'
> > > sep 26 17:13:03 kernel: usbcore: registered new interface driver
> > rt2800usb
> > > sep 26 17:13:03 systemd[1]: Found device RT2870/RT3070 Wireless Adapter.
> > > [  113.812454] ieee80211 phy0: rt2x00lib_request_firmware: Info -
> > Loading firmware file 'rt2870.bin'
> > > [  113.905279] ieee80211 phy0: rt2x00lib_request_firmware: Info -
> > Firmware detected - version: 0.36
> > > [  114.028703] ieee80211 phy0: rt2x00usb_vendor_request: Error - Vendor
> > Request 0x06 failed for offset 0x0404 with error -71
> > >
> > > The last error there does not seem to affect the operation of the device.
> > >
> > > Logs of not working with kernel 5.3.1, 5.2.7 has similar output.
> > > sep 26 17:06:12 kernel: ieee80211 phy0: rt2x00_set_rt: Info - RT chipset
> > 3070, rev 0201 detected
> > > sep 26 17:06:12 kernel: ieee80211 phy0: rt2x00_set_rf: Info - RF chipset
> > 0005 detected
> > > sep 26 17:06:12 kernel: ieee80211 phy0: Selected rate control algorithm
> > 'minstrel_ht'
> > > sep 26 17:06:12 kernel: usbcore: registered new interface driver
> > rt2800usb
> > > sep 26 17:06:12 systemd[1]: Found device RT2870/RT3070 Wireless Adapter.
> > > sep 26 17:06:21 ieee80211 phy0: rt2x00lib_request_firmware: Info -
> > Loading firmware file 'rt2870.bin'
> > > sep 26 17:06:21 ieee80211 phy0: rt2x00lib_request_firmware: Info -
> > Firmware detected - version: 0.36
> > > sep 26 17:06:21 ieee80211 phy0: rt2x00usb_vendor_request: Error - Vendor
> > Request 0x06 failed for offset 0x0404 with>
> > > sep 26 17:06:22 ieee80211 phy0: rt2800_wait_csr_ready: Error - Unstable
> > hardware
> > > sep 26 17:06:22 ieee80211 phy0: rt2800usb_set_device_state: Error -
> > Device failed to enter state 4 (-5)
> > >
> > > Unable to bring up the network interface here.
> >
> > This most likely is the problem introduced by commit:
> >
> > commit e383c70474db32b9d4a3de6dfbd08784d19e6751
> > Author: Stanislaw Gruszka <sgruszka@redhat.com>
> > Date:   Tue Mar 12 10:51:42 2019 +0100
> >
> >     rt2x00: check number of EPROTO errors
> >
> > Plase check below patch that increase number of EPROTO checks
> > before marking device removed. If it does not help, plese
> > check if reverting above commits helps.
> >
> > diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00usb.c
> > b/drivers/net/wireless/ralink/rt2x00/rt2x00usb.c
> > index bc2dfef0de22..215c3f092306 100644
> > --- a/drivers/net/wireless/ralink/rt2x00/rt2x00usb.c
> > +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00usb.c
> > @@ -30,7 +30,7 @@ static bool rt2x00usb_check_usb_error(struct rt2x00_dev
> > *rt2x00dev, int status)
> >         else
> >                 rt2x00dev->num_proto_errs = 0;
> >
> > -       if (rt2x00dev->num_proto_errs > 3)
> > +       if (rt2x00dev->num_proto_errs > 8)
> >                 return true;
> >
> >         return false;
> >


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: rt2x00 regression
  2019-12-03  7:57     ` Stanislaw Gruszka
@ 2019-12-03 18:50       ` Anton Olsson
  0 siblings, 0 replies; 4+ messages in thread
From: Anton Olsson @ 2019-12-03 18:50 UTC (permalink / raw)
  To: Stanislaw Gruszka; +Cc: linux-wireless, Helmut Schaa

| So, revert of that commit makes the problem gone ?

No I have not yet tested that. Have had too much stuff going on and this is kinda low priority for me right now as it currently works on the old kernel.

On 2019-12-03 08:57, Stanislaw Gruszka wrote:
> On Mon, Dec 02, 2019 at 05:40:20PM +0100, Exuvo wrote:
>> Sorry for the late reply
>>
>> The patch for increasing the amount did not work, i'll get around to
>> testing with the commit reverted.
> So, revert of that commit makes the problem gone ?
>
>> As an aside what function can i call at that point in the code to print the
>> value in num_proto_errs? I assume some kernel special printf?
> It's printk. You can add line like this to print values:
>
> printk("status %d num_proto_errs %u\n", status, rt2x00dev->num_proto_errs);
>
> Stanislaw
>
>
>> On Fri, 27 Sep 2019, 10:03 Stanislaw Gruszka, <sgruszka@redhat.com> wrote:
>>
>>> On Thu, Sep 26, 2019 at 06:32:23PM +0200, Anton Olsson wrote:
>>>> Hello I have a USB based ID 148f:3070 Ralink Technology, Corp.
>>> RT2870/RT3070 Wireless Adapter, that stops working with recent kernels. It
>>> works on kernel 5.1.15 and does not work with 5.2.7 or 5.3.1 (I have not
>>> tested other versions). I use it in AP mode.
>>>> I found this similar bug report
>>> https://marc.info/?l=linux-wireless&m=156630037103575&w=2 but that did
>>> not have related error messages so I assume this is different?
>>>> Logs of working kernel 5.1.15-arch1-1-ARCH.
>>>> [   78.680555] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 3070,
>>> rev 0201 detected
>>>> [   78.690992] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 0005
>>> detected
>>>> [   78.799625] ieee80211 phy0: Selected rate control algorithm
>>> 'minstrel_ht'
>>>> sep 26 17:13:03 kernel: usbcore: registered new interface driver
>>> rt2800usb
>>>> sep 26 17:13:03 systemd[1]: Found device RT2870/RT3070 Wireless Adapter.
>>>> [  113.812454] ieee80211 phy0: rt2x00lib_request_firmware: Info -
>>> Loading firmware file 'rt2870.bin'
>>>> [  113.905279] ieee80211 phy0: rt2x00lib_request_firmware: Info -
>>> Firmware detected - version: 0.36
>>>> [  114.028703] ieee80211 phy0: rt2x00usb_vendor_request: Error - Vendor
>>> Request 0x06 failed for offset 0x0404 with error -71
>>>> The last error there does not seem to affect the operation of the device.
>>>>
>>>> Logs of not working with kernel 5.3.1, 5.2.7 has similar output.
>>>> sep 26 17:06:12 kernel: ieee80211 phy0: rt2x00_set_rt: Info - RT chipset
>>> 3070, rev 0201 detected
>>>> sep 26 17:06:12 kernel: ieee80211 phy0: rt2x00_set_rf: Info - RF chipset
>>> 0005 detected
>>>> sep 26 17:06:12 kernel: ieee80211 phy0: Selected rate control algorithm
>>> 'minstrel_ht'
>>>> sep 26 17:06:12 kernel: usbcore: registered new interface driver
>>> rt2800usb
>>>> sep 26 17:06:12 systemd[1]: Found device RT2870/RT3070 Wireless Adapter.
>>>> sep 26 17:06:21 ieee80211 phy0: rt2x00lib_request_firmware: Info -
>>> Loading firmware file 'rt2870.bin'
>>>> sep 26 17:06:21 ieee80211 phy0: rt2x00lib_request_firmware: Info -
>>> Firmware detected - version: 0.36
>>>> sep 26 17:06:21 ieee80211 phy0: rt2x00usb_vendor_request: Error - Vendor
>>> Request 0x06 failed for offset 0x0404 with>
>>>> sep 26 17:06:22 ieee80211 phy0: rt2800_wait_csr_ready: Error - Unstable
>>> hardware
>>>> sep 26 17:06:22 ieee80211 phy0: rt2800usb_set_device_state: Error -
>>> Device failed to enter state 4 (-5)
>>>> Unable to bring up the network interface here.
>>> This most likely is the problem introduced by commit:
>>>
>>> commit e383c70474db32b9d4a3de6dfbd08784d19e6751
>>> Author: Stanislaw Gruszka <sgruszka@redhat.com>
>>> Date:   Tue Mar 12 10:51:42 2019 +0100
>>>
>>>     rt2x00: check number of EPROTO errors
>>>
>>> Plase check below patch that increase number of EPROTO checks
>>> before marking device removed. If it does not help, plese
>>> check if reverting above commits helps.
>>>
>>> diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00usb.c
>>> b/drivers/net/wireless/ralink/rt2x00/rt2x00usb.c
>>> index bc2dfef0de22..215c3f092306 100644
>>> --- a/drivers/net/wireless/ralink/rt2x00/rt2x00usb.c
>>> +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00usb.c
>>> @@ -30,7 +30,7 @@ static bool rt2x00usb_check_usb_error(struct rt2x00_dev
>>> *rt2x00dev, int status)
>>>         else
>>>                 rt2x00dev->num_proto_errs = 0;
>>>
>>> -       if (rt2x00dev->num_proto_errs > 3)
>>> +       if (rt2x00dev->num_proto_errs > 8)
>>>                 return true;
>>>
>>>         return false;
>>>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-26 16:32 rt2x00 regression Anton Olsson
2019-09-27  8:03 ` Stanislaw Gruszka
     [not found]   ` <CA+GwT0B5SyRZnGLqwqOeuJK4CWMVc=dKaWre9VN8KQC6kBzKGw@mail.gmail.com>
2019-12-03  7:57     ` Stanislaw Gruszka
2019-12-03 18:50       ` Anton Olsson

Linux-Wireless Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-wireless/0 linux-wireless/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-wireless linux-wireless/ https://lore.kernel.org/linux-wireless \
		linux-wireless@vger.kernel.org
	public-inbox-index linux-wireless

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-wireless


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git