2010-04-17 12:26:28

by Walter Goldens

[permalink] [raw]
Subject: [rt2x00] rt3070 fails to initialize with rt2800usb

I've been monitoring the community's work for the rt3070 chips and especially your recent success towards improving the driver.

I would like to share something with the rt2x00 development team which may or may not be known.

The rt3070 card I own fails to initialize with the latest (working) compat-wireless release. When I plug the USB card, rt2800usb doesn't automatically load and when I manually modprobe the driver it does not recognize it as well.

Looking in to the rt2800usb.c file I found the 'problem'. The VIDs aren't properly set. Mine shows 148f:3070. Although a line is included in the "#ifdef CONFIG_RT2800USB_RT30XX", the module won't initialize the card.

I fixed the problem by adding my device here:

/* Ralink */
{ USB_DEVICE(0x148f, 0x2770), USB_DEVICE_DATA(&rt2800usb_ops) },
{ USB_DEVICE(0x148f, 0x2870), USB_DEVICE_DATA(&rt2800usb_ops) },
/* Samsung */

which now looks like:

/* Ralink */
{ USB_DEVICE(0x148f, 0x2770), USB_DEVICE_DATA(&rt2800usb_ops) },
{ USB_DEVICE(0x148f, 0x2870), USB_DEVICE_DATA(&rt2800usb_ops) },
{ USB_DEVICE(0x148f, 0x3070), USB_DEVICE_DATA(&rt2800usb_ops) },
/* Samsung */

This pertains to the rt3071 as well.

Regards.





2010-04-17 12:45:18

by Ivo Van Doorn

[permalink] [raw]
Subject: Re: [rt2x00] rt3070 fails to initialize with rt2800usb

On Saturday 17 April 2010, Walter wrote:
> I've been monitoring the community's work for the rt3070 chips and especially your recent success towards improving the driver.
>
> I would like to share something with the rt2x00 development team which may or may not be known.
>
> The rt3070 card I own fails to initialize with the latest (working) compat-wireless release. When I plug the USB card, rt2800usb doesn't automatically load and when I manually modprobe the driver it does not recognize it as well.
>
> Looking in to the rt2800usb.c file I found the 'problem'. The VIDs aren't properly set. Mine shows 148f:3070. Although a line is included in the "#ifdef CONFIG_RT2800USB_RT30XX", the module won't initialize the card.
>
> I fixed the problem by adding my device here:
>
> /* Ralink */
> { USB_DEVICE(0x148f, 0x2770), USB_DEVICE_DATA(&rt2800usb_ops) },
> { USB_DEVICE(0x148f, 0x2870), USB_DEVICE_DATA(&rt2800usb_ops) },
> /* Samsung */
>
> which now looks like:
>
> /* Ralink */
> { USB_DEVICE(0x148f, 0x2770), USB_DEVICE_DATA(&rt2800usb_ops) },
> { USB_DEVICE(0x148f, 0x2870), USB_DEVICE_DATA(&rt2800usb_ops) },
> { USB_DEVICE(0x148f, 0x3070), USB_DEVICE_DATA(&rt2800usb_ops) },
> /* Samsung */
>
> This pertains to the rt3071 as well.

That USB ID is already known, did you compile the driver with support
for CONFIG_RT2800USB_RT30XX enabled?

Ivo

2010-04-21 21:10:24

by Gertjan van Wingerde

[permalink] [raw]
Subject: Re: [rt2x00] rt3070 fails to initialize with rt2800usb

On 04/21/10 10:17, Walter Goldens wrote:
>
>>>> Thats odd, in compar-wireless, it already
>> contains the
>>>> lines:
>>>>
>>>> #ifdef CONFIG_RT2800USB_RT30XX
>>>> <..snip..>
>>>> /* Ralink */
>>>> { USB_DEVICE(0x148f, 0x2070),
>>>> USB_DEVICE_DATA(&rt2800usb_ops) },
>>>> { USB_DEVICE(0x148f, 0x3070),
>>>> USB_DEVICE_DATA(&rt2800usb_ops) },
>>>> { USB_DEVICE(0x148f, 0x3071),
>>>> USB_DEVICE_DATA(&rt2800usb_ops) },
>>>> { USB_DEVICE(0x148f, 0x3072),
>>>> USB_DEVICE_DATA(&rt2800usb_ops) },
>>>> <..snip..>
>>>> #endif
>>>>
>>>> So adding the USB ID does not need to be added.
>>>>
>>>> Ivo
>>>
>>> It is odd. I followed exactly the same logic you have,
>> but I'm adamant the module doesn't recognize the VID of card
>> as it is. Lets get factual:
>>>
>>> compat-wireless from March 28th. default install (make
>> && make install) here is the output when the
>> rt2800usb is loaded:
>>>
>>> [21902.553231] Generic kernel compatibility enabled
>> based on linux-next next-20100113
>>> [21902.596351] cfg80211: Calling CRDA to update world
>> regulatory domain
>>> [21902.695076] usbcore: registered new interface
>> driver rt2800usb
>>> [21902.714019] cfg80211: World regulatory domain
>> updated:
>>> [21902.714026] (start_freq - end_freq @
>> bandwidth), (max_antenna_gain, max_eirp)
>>> [21902.714032] (2402000 KHz - 2472000 KHz @
>> 40000 KHz), (300 mBi, 2000 mBm)
>>> [21902.714036] (2457000 KHz - 2482000 KHz @
>> 20000 KHz), (300 mBi, 2000 mBm)
>>> [21902.714041] (2474000 KHz - 2494000 KHz @
>> 20000 KHz), (300 mBi, 2000 mBm)
>>> [21902.714045] (5170000 KHz - 5250000 KHz @
>> 40000 KHz), (300 mBi, 2000 mBm)
>>> [21902.714050] (5735000 KHz - 5835000 KHz @
>> 40000 KHz), (300 mBi, 2000 mBm)
>>>
>>> modinfo rt2800usb |grep 3070 -- returns nothing
>>>
>>> as soon as I add the 148f:rt3070 to:
>>>
>>> /* Ralink */
>>> { USB_DEVICE(0x148f, 0x2770),
>> USB_DEVICE_DATA(&rt2800usb_ops) },
>>> { USB_DEVICE(0x148f, 0x2870),
>> USB_DEVICE_DATA(&rt2800usb_ops) },
>>> { USB_DEVICE(0x148f, 0x3070),
>> USB_DEVICE_DATA(&rt2800usb_ops) }, <--- manually
>> added
>>> /* Samsung */
>>>
>>> rt2800usb recognizes the chip and initializes all
>> operations:
>>>
>>> [22310.272382] usb 5-2.4: new high speed USB device
>> using ehci_hcd and address 10
>>> [22310.381269] usb 5-2.4: configuration #1 chosen from
>> 1 choice
>>> [22310.416482] phy1: Selected rate control algorithm
>> 'minstrel'
>>> [22310.417403] Registered led device:
>> rt2800usb-phy1::radio
>>> [22310.417456] Registered led device:
>> rt2800usb-phy1::assoc
>>> [22310.417505] Registered led device:
>> rt2800usb-phy1::quality
>>> [22310.479159] udev: renamed network interface wlan0
>> to wlan2
>>> [22310.483779] rt2800usb 5-2.4:1.0: firmware:
>> requesting rt2870.bin
>>>
>>> Now, modinfo rt2800usb |grep 3070 -- shows its OK:
>>>
>>> alias:
>> usb:v148Fp3070d*dc*dsc*dp*ic*isc*ip*
>>>
>>>
>>> This is a longstanding bug from at least few months or
>> so, I thought you were experimenting/adjusting the code
>> and I figured it would be temporary, but it has been so long
>> that I thought I had to report this now.
>>>
>>> Walter.
>>
>> Just checked the wireless-compat package, but are you sure
>> that the config file contains:
>> CONFIG_RT2800USB_RT30XX=y
>> and not the default:
>> # CONFIG_RT2800USB_RT30XX=y
>>
>> Note the prefixed '#' which should be removed to enable the
>> configuration option.
>>
>> Ivo
>
> I think I spoke too early. Must have been a snarl up at my end, because even removing the "#" comment sign before "CONFIG_RT2800USB_RT30XX=y" in config.mk doesn't solve the detection problem.
>
> I just concluded a test with today's compat-wireless /April 20/, enabled "CONFIG_RT2800USB_RT30XX=y" in config.mk, but rt2800usb doesn't detect the VIDs and subsequently fails to initialize the device. Adding, however the card's VIDs in the upper portion of code appears to solve the case. I welcome you to test yourself.
>
> The good news is, once we get past the detection debacle the device seems to finally show some life.
>

I just checked with the compat-wireless of April 18, and with me removing the '#' sign in config.mk does the trick.
I can't explain why it doesn't work for you, but I cannot see anything wrong with compat-wireless or with rt2x00 inside compat-wireless.

--
Gertjan.


2010-04-19 16:26:06

by Ivo Van Doorn

[permalink] [raw]
Subject: Re: [rt2x00] rt3070 fails to initialize with rt2800usb

On Monday 19 April 2010, Walter wrote:
> > Thats odd, in compar-wireless, it already contains the
> > lines:
> >
> > #ifdef CONFIG_RT2800USB_RT30XX
> > ??? <..snip..>
> > ??? /* Ralink */
> > ??? { USB_DEVICE(0x148f, 0x2070),
> > USB_DEVICE_DATA(&rt2800usb_ops) },
> > ??? { USB_DEVICE(0x148f, 0x3070),
> > USB_DEVICE_DATA(&rt2800usb_ops) },
> > ??? { USB_DEVICE(0x148f, 0x3071),
> > USB_DEVICE_DATA(&rt2800usb_ops) },
> > ??? { USB_DEVICE(0x148f, 0x3072),
> > USB_DEVICE_DATA(&rt2800usb_ops) },
> > ??? <..snip..>
> > #endif
> >
> > So adding the USB ID does not need to be added.
> >
> > Ivo
>
> It is odd. I followed exactly the same logic you have, but I'm adamant the module doesn't recognize the VID of card as it is. Lets get factual:
>
> compat-wireless from March 28th. default install (make && make install) here is the output when the rt2800usb is loaded:
>
> [21902.553231] Generic kernel compatibility enabled based on linux-next next-20100113
> [21902.596351] cfg80211: Calling CRDA to update world regulatory domain
> [21902.695076] usbcore: registered new interface driver rt2800usb
> [21902.714019] cfg80211: World regulatory domain updated:
> [21902.714026]? ???(start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
> [21902.714032]? ???(2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
> [21902.714036]? ???(2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
> [21902.714041]? ???(2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
> [21902.714045]? ???(5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
> [21902.714050]? ???(5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
>
> modinfo rt2800usb |grep 3070 -- returns nothing
>
> as soon as I add the 148f:rt3070 to:
>
> ??? /* Ralink */
> ??? { USB_DEVICE(0x148f, 0x2770), USB_DEVICE_DATA(&rt2800usb_ops) },
> ??? { USB_DEVICE(0x148f, 0x2870), USB_DEVICE_DATA(&rt2800usb_ops) },
> ??? { USB_DEVICE(0x148f, 0x3070), USB_DEVICE_DATA(&rt2800usb_ops) }, <--- manually added
> ? ? ???/* Samsung */
>
> rt2800usb recognizes the chip and initializes all operations:
>
> [22310.272382] usb 5-2.4: new high speed USB device using ehci_hcd and address 10
> [22310.381269] usb 5-2.4: configuration #1 chosen from 1 choice
> [22310.416482] phy1: Selected rate control algorithm 'minstrel'
> [22310.417403] Registered led device: rt2800usb-phy1::radio
> [22310.417456] Registered led device: rt2800usb-phy1::assoc
> [22310.417505] Registered led device: rt2800usb-phy1::quality
> [22310.479159] udev: renamed network interface wlan0 to wlan2
> [22310.483779] rt2800usb 5-2.4:1.0: firmware: requesting rt2870.bin
>
> Now, modinfo rt2800usb |grep 3070 -- shows its OK:
>
> alias:? ? ? ? ? usb:v148Fp3070d*dc*dsc*dp*ic*isc*ip*
>
>
> This is a longstanding bug from at least few months or so,? I thought you were experimenting/adjusting the code and I figured it would be temporary, but it has been so long that I thought I had to report this now.
>
> Walter.

Just checked the wireless-compat package, but are you sure that the config file contains:
CONFIG_RT2800USB_RT30XX=y
and not the default:
# CONFIG_RT2800USB_RT30XX=y

Note the prefixed '#' which should be removed to enable the configuration option.

Ivo


2010-04-22 20:51:13

by Gertjan van Wingerde

[permalink] [raw]
Subject: Re: [rt2x00] rt3070 fails to initialize with rt2800usb

On 04/22/10 11:05, Walter Goldens wrote:
>>> I think I spoke too early. Must have been a snarl up
>> at my end, because even removing the "#" comment sign before
>> "CONFIG_RT2800USB_RT30XX=y" in config.mk doesn't solve the
>> detection problem.
>>>
>>> I just concluded a test with today's compat-wireless
>> /April 20/, enabled "CONFIG_RT2800USB_RT30XX=y" in
>> config.mk, but rt2800usb doesn't detect the VIDs and
>> subsequently fails to initialize the device. Adding, however
>> the card's VIDs in the upper portion of code appears to
>> solve the case. I welcome you to test yourself.
>>>
>>> The good news is, once we get past the detection
>> debacle the device seems to finally show some life.
>>>
>>
>> I just checked with the compat-wireless of April 18, and
>> with me removing the '#' sign in config.mk does the trick.
>> I can't explain why it doesn't work for you, but I cannot
>> see anything wrong with compat-wireless or with rt2x00
>> inside compat-wireless.
>>
>> --
>> Gertjan.
>
> The problem remains. I have two cards: rt3070 and rt3071, their respective VIDs are 148f:3070 and 148f:3071. They are both undetected. Just tried "compat-wireless-2010-04-21.tar.bz2" with enabled "CONFIG_RT2800PCI_RT30XX=y" in config.mk - no go.
>
> The rt2800usb does not pick the VIDs, here is the log from modinfo rt2800usb:
>

<snip long modinfo output>

>
> no "3070" or "3071" at all.
>
> The closest to my VIDs are these here:
> alias: usb:v148Fp2870d*dc*dsc*dp*ic*isc*ip*
> alias: usb:v148Fp2770d*dc*dsc*dp*ic*isc*ip*
>
> So basically the driver only works if I manually add them to code above. Config.mk doesn't seem to change anything.
>
> The problem as I recall first occurred in late January or some time in February when someone decided to remove large portion of the VIDs from the code because of driver collisions and I suppose the purpose of it was to reshuffle VID tables and insert some sort of order. Since then, compat-wireless does not automatically provide drivers for the rt307x via rt2800usb. To this point, only manual modification and inserting of the VIDs above solves the problem.
>
> I'm a 100% certain of this. Even if your cards have different VIDs /not 148f:3070/, just install compat-wireless with enabled rt307X support and see if "modinfo rt2800usb |grep 3070" returns something. Then you'll be able to verify my reports.
>

As I mentioned, I am not experiencing this. See attached the modinfo output for the modules that I built with a clean compat-wireless package.

The only way I can explain this is that on your system, for some reason, changes to config.mk are not picked up by the build system.

Can you try removing the include/linux/compat_autoconf.h file (from the root of the compat-wireless tree), and then run a make clean, followed by a make.

---
Gertjan.


Attachments:
modinfo.output (10.62 kB)

2010-04-17 13:09:51

by Walter Goldens

[permalink] [raw]
Subject: Re: [rt2x00] rt3070 fails to initialize with rt2800usb

> From: Ivo van Doorn <[email protected]>
> Subject: Re: [rt2x00] rt3070 fails to initialize with rt2800usb
> To: "Walter" <[email protected]>
> Cc: [email protected], [email protected]
> Date: Saturday, April 17, 2010, 8:45 AM
> On Saturday 17 April 2010, Walter
> wrote:
> > I've been monitoring the community's work for the
> rt3070 chips and especially your recent success towards
> improving the driver.
> >
> > I would like to share something with the rt2x00
> development team which may or may not be known.
> >
> > The rt3070 card I own fails to initialize with the
> latest (working) compat-wireless release. When I plug the
> USB card, rt2800usb doesn't automatically load and when I
> manually modprobe the driver it does not recognize it as
> well.
> >
> > Looking in to the rt2800usb.c file I found the
> 'problem'. The VIDs aren't properly set. Mine shows
> 148f:3070. Although a line is included in the "#ifdef
> CONFIG_RT2800USB_RT30XX", the module won't initialize the
> card.
> >
> > I fixed the problem by adding my device here:
> >
> > ??? /* Ralink */
> > ??? { USB_DEVICE(0x148f, 0x2770),
> USB_DEVICE_DATA(&rt2800usb_ops) },
> > ??? { USB_DEVICE(0x148f, 0x2870),
> USB_DEVICE_DATA(&rt2800usb_ops) },
> > ??? /* Samsung */
> >
> > which now looks like:
> >
> > ??? /* Ralink */
> > ??? { USB_DEVICE(0x148f, 0x2770),
> USB_DEVICE_DATA(&rt2800usb_ops) },
> > ??? { USB_DEVICE(0x148f, 0x2870),
> USB_DEVICE_DATA(&rt2800usb_ops) },
> >? ? ? ???{
> USB_DEVICE(0x148f, 0x3070),
> USB_DEVICE_DATA(&rt2800usb_ops) },
> > ??? /* Samsung */
> >
> > This pertains to the rt3071 as well.
>
> That USB ID is already known, did you compile the driver
> with support
> for CONFIG_RT2800USB_RT30XX enabled?
>
> Ivo

Yes, compat-wireless ships with ''CONFIG_RT2800USB_RT30XX=y'' in config.mk, but the card's VIDs aren't shown in modinfo rt2800usb when compiled, thus the module doesn't recognize the card at all. The only workaround I rustled up is the above mentioned one.




2010-04-22 09:05:03

by Walter Goldens

[permalink] [raw]
Subject: Re: [rt2x00] rt3070 fails to initialize with rt2800usb

> > I think I spoke too early. Must have been a snarl up
> at my end, because even removing the "#" comment sign before
> "CONFIG_RT2800USB_RT30XX=y" in config.mk doesn't solve the
> detection problem.
> >
> > I just concluded a test with today's compat-wireless
> /April 20/, enabled "CONFIG_RT2800USB_RT30XX=y" in
> config.mk, but rt2800usb doesn't detect the VIDs and
> subsequently fails to initialize the device. Adding, however
> the card's VIDs in the upper portion of code appears to
> solve the case. I welcome you to test yourself.
> >
> > The good news is, once we get past the detection
> debacle the device seems to finally show some life.
> >
>
> I just checked with the compat-wireless of April 18, and
> with me removing the '#' sign in config.mk does the trick.
> I can't explain why it doesn't work for you, but I cannot
> see anything wrong with compat-wireless or with rt2x00
> inside compat-wireless.
>
> --
> Gertjan.

The problem remains. I have two cards: rt3070 and rt3071, their respective VIDs are 148f:3070 and 148f:3071. They are both undetected. Just tried "compat-wireless-2010-04-21.tar.bz2" with enabled "CONFIG_RT2800PCI_RT30XX=y" in config.mk - no go.

The rt2800usb does not pick the VIDs, here is the log from modinfo rt2800usb:

filename: /lib/modules/2.6.31-20-generic/updates/drivers/net/wireless/rt2x00/rt2800usb.ko
license: GPL
firmware: rt2870.bin
description: Ralink RT2800 USB Wireless LAN driver.
version: 2.3.0
author: http://rt2x00.serialmonkey.com
srcversion: 89BFEC74F4AE6DC8C4BA0E8
alias: usb:v0586p3416d*dc*dsc*dp*ic*isc*ip*
alias: usb:v5A57p0282d*dc*dsc*dp*ic*isc*ip*
alias: usb:v5A57p0280d*dc*dsc*dp*ic*isc*ip*
alias: usb:v0CDEp0025d*dc*dsc*dp*ic*isc*ip*
alias: usb:v0CDEp0022d*dc*dsc*dp*ic*isc*ip*
alias: usb:v157Ep300Ed*dc*dsc*dp*ic*isc*ip*
alias: usb:v177Fp0302d*dc*dsc*dp*ic*isc*ip*
alias: usb:v15A9p0006d*dc*dsc*dp*ic*isc*ip*
alias: usb:v083ApB522d*dc*dsc*dp*ic*isc*ip*
alias: usb:v083ApA618d*dc*dsc*dp*ic*isc*ip*
alias: usb:v083Ap8522d*dc*dsc*dp*ic*isc*ip*
alias: usb:v083Ap7522d*dc*dsc*dp*ic*isc*ip*
alias: usb:v083Ap7512d*dc*dsc*dp*ic*isc*ip*
alias: usb:v083Ap6618d*dc*dsc*dp*ic*isc*ip*
alias: usb:v0DF6p003Fd*dc*dsc*dp*ic*isc*ip*
alias: usb:v0DF6p003Dd*dc*dsc*dp*ic*isc*ip*
alias: usb:v0DF6p003Bd*dc*dsc*dp*ic*isc*ip*
alias: usb:v0DF6p0039d*dc*dsc*dp*ic*isc*ip*
alias: usb:v0DF6p002Dd*dc*dsc*dp*ic*isc*ip*
alias: usb:v0DF6p002Cd*dc*dsc*dp*ic*isc*ip*
alias: usb:v0DF6p002Bd*dc*dsc*dp*ic*isc*ip*
alias: usb:v0DF6p0017d*dc*dsc*dp*ic*isc*ip*
alias: usb:v129Bp1828d*dc*dsc*dp*ic*isc*ip*
alias: usb:v04E8p2018d*dc*dsc*dp*ic*isc*ip*
alias: usb:v148Fp2870d*dc*dsc*dp*ic*isc*ip*
alias: usb:v148Fp2770d*dc*dsc*dp*ic*isc*ip*
alias: usb:v2019pED06d*dc*dsc*dp*ic*isc*ip*
alias: usb:v0471p200Fd*dc*dsc*dp*ic*isc*ip*
alias: usb:v0DB0p6899d*dc*dsc*dp*ic*isc*ip*
alias: usb:v100Dp9031d*dc*dsc*dp*ic*isc*ip*
alias: usb:v0789p0164d*dc*dsc*dp*ic*isc*ip*
alias: usb:v0789p0163d*dc*dsc*dp*ic*isc*ip*
alias: usb:v0789p0162d*dc*dsc*dp*ic*isc*ip*
alias: usb:v1737p0071d*dc*dsc*dp*ic*isc*ip*
alias: usb:v1737p0070d*dc*dsc*dp*ic*isc*ip*
alias: usb:v0E66p0003d*dc*dsc*dp*ic*isc*ip*
alias: usb:v0E66p0001d*dc*dsc*dp*ic*isc*ip*
alias: usb:v1044p800Bd*dc*dsc*dp*ic*isc*ip*
alias: usb:v1740p9702d*dc*dsc*dp*ic*isc*ip*
alias: usb:v1740p9701d*dc*dsc*dp*ic*isc*ip*
alias: usb:v7392p7718d*dc*dsc*dp*ic*isc*ip*
alias: usb:v7392p7717d*dc*dsc*dp*ic*isc*ip*
alias: usb:v07D1p3C11d*dc*dsc*dp*ic*isc*ip*
alias: usb:v07D1p3C09d*dc*dsc*dp*ic*isc*ip*
alias: usb:v07AAp003Fd*dc*dsc*dp*ic*isc*ip*
alias: usb:v07AAp003Cd*dc*dsc*dp*ic*isc*ip*
alias: usb:v07AAp002Fd*dc*dsc*dp*ic*isc*ip*
alias: usb:v14B2p3C28d*dc*dsc*dp*ic*isc*ip*
alias: usb:v14B2p3C27d*dc*dsc*dp*ic*isc*ip*
alias: usb:v14B2p3C25d*dc*dsc*dp*ic*isc*ip*
alias: usb:v14B2p3C23d*dc*dsc*dp*ic*isc*ip*
alias: usb:v14B2p3C09d*dc*dsc*dp*ic*isc*ip*
alias: usb:v14B2p3C07d*dc*dsc*dp*ic*isc*ip*
alias: usb:v14B2p3C06d*dc*dsc*dp*ic*isc*ip*
alias: usb:v0411p00E8d*dc*dsc*dp*ic*isc*ip*
alias: usb:v050Dp815Cd*dc*dsc*dp*ic*isc*ip*
alias: usb:v050Dp805Cd*dc*dsc*dp*ic*isc*ip*
alias: usb:v050Dp8053d*dc*dsc*dp*ic*isc*ip*
alias: usb:v13D3p3247d*dc*dsc*dp*ic*isc*ip*
alias: usb:v0B05p1742d*dc*dsc*dp*ic*isc*ip*
alias: usb:v0B05p1732d*dc*dsc*dp*ic*isc*ip*
alias: usb:v0B05p1731d*dc*dsc*dp*ic*isc*ip*
alias: usb:v1690p0740d*dc*dsc*dp*ic*isc*ip*
alias: usb:v15C5p0008d*dc*dsc*dp*ic*isc*ip*
alias: usb:v1482p3C09d*dc*dsc*dp*ic*isc*ip*
alias: usb:v07B8p2770d*dc*dsc*dp*ic*isc*ip*
alias: usb:v07B8p2870d*dc*dsc*dp*ic*isc*ip*

no "3070" or "3071" at all.

The closest to my VIDs are these here:
alias: usb:v148Fp2870d*dc*dsc*dp*ic*isc*ip*
alias: usb:v148Fp2770d*dc*dsc*dp*ic*isc*ip*

So basically the driver only works if I manually add them to code above. Config.mk doesn't seem to change anything.

The problem as I recall first occurred in late January or some time in February when someone decided to remove large portion of the VIDs from the code because of driver collisions and I suppose the purpose of it was to reshuffle VID tables and insert some sort of order. Since then, compat-wireless does not automatically provide drivers for the rt307x via rt2800usb. To this point, only manual modification and inserting of the VIDs above solves the problem.

I'm a 100% certain of this. Even if your cards have different VIDs /not 148f:3070/, just install compat-wireless with enabled rt307X support and see if "modinfo rt2800usb |grep 3070" returns something. Then you'll be able to verify my reports.

Walter.




2010-04-23 08:46:45

by Walter Goldens

[permalink] [raw]
Subject: Re: [rt2x00] rt3070 fails to initialize with rt2800usb

> > The problem as I recall first occurred in late January
> or some time in February when? someone decided to
> remove large portion of the VIDs from the code because of
> driver collisions and I suppose the purpose of it was to
> reshuffle VID tables and insert some sort of order. Since
> then, compat-wireless does not automatically provide drivers
> for the rt307x via rt2800usb. To this point, only manual
> modification and inserting of the VIDs above solves the
> problem.
> >
> > I'm a 100% certain of this. Even if your cards have
> different VIDs /not 148f:3070/, just install compat-wireless
> with enabled rt307X support and see if "modinfo rt2800usb
> |grep 3070" returns something. Then you'll be able to verify
> my reports.
> >
>
> As I mentioned, I am not experiencing this. See attached
> the modinfo output for the modules that I built with a clean
> compat-wireless package.
>
> The only way I can explain this is that on your system, for
> some reason, changes to config.mk are not picked up by the
> build system.
>
> Can you try removing the include/linux/compat_autoconf.h
> file (from the root of the compat-wireless tree), and then
> run a make clean, followed by a make.
>
> ---
> Gertjan.

Unfortunately, removing this file changes nothing. The rt2800usb still doesn't pick up the 148f:3070 VID as modinfo would show. That is with enabled rt307x support in config.mk and removed compat_autoconf.h in the compat directory. I'm on a Ubuntu 9.10 / 2.6.31-20 kernel. The problem appears to be deeper that I thought.

I don't mind manually modifying VID table to enable support for my devices, but this would mean a large number of users won't be able to take advantage of the new code via compat-wireless. I'm puzzled how results differ, you appear to be testing it on Fedora system with .2.6.32 and Ubuntu 2.6.31 fails. I'm running out of explanations.

Walter.




2010-04-21 08:17:08

by Walter Goldens

[permalink] [raw]
Subject: Re: [rt2x00] rt3070 fails to initialize with rt2800usb


> > > Thats odd, in compar-wireless, it already
> contains the
> > > lines:
> > >
> > > #ifdef CONFIG_RT2800USB_RT30XX
> > > ??? <..snip..>
> > > ??? /* Ralink */
> > > ??? { USB_DEVICE(0x148f, 0x2070),
> > > USB_DEVICE_DATA(&rt2800usb_ops) },
> > > ??? { USB_DEVICE(0x148f, 0x3070),
> > > USB_DEVICE_DATA(&rt2800usb_ops) },
> > > ??? { USB_DEVICE(0x148f, 0x3071),
> > > USB_DEVICE_DATA(&rt2800usb_ops) },
> > > ??? { USB_DEVICE(0x148f, 0x3072),
> > > USB_DEVICE_DATA(&rt2800usb_ops) },
> > > ??? <..snip..>
> > > #endif
> > >
> > > So adding the USB ID does not need to be added.
> > >
> > > Ivo
> >
> > It is odd. I followed exactly the same logic you have,
> but I'm adamant the module doesn't recognize the VID of card
> as it is. Lets get factual:
> >
> > compat-wireless from March 28th. default install (make
> && make install) here is the output when the
> rt2800usb is loaded:
> >
> > [21902.553231] Generic kernel compatibility enabled
> based on linux-next next-20100113
> > [21902.596351] cfg80211: Calling CRDA to update world
> regulatory domain
> > [21902.695076] usbcore: registered new interface
> driver rt2800usb
> > [21902.714019] cfg80211: World regulatory domain
> updated:
> > [21902.714026]? ???(start_freq - end_freq @
> bandwidth), (max_antenna_gain, max_eirp)
> > [21902.714032]? ???(2402000 KHz - 2472000 KHz @
> 40000 KHz), (300 mBi, 2000 mBm)
> > [21902.714036]? ???(2457000 KHz - 2482000 KHz @
> 20000 KHz), (300 mBi, 2000 mBm)
> > [21902.714041]? ???(2474000 KHz - 2494000 KHz @
> 20000 KHz), (300 mBi, 2000 mBm)
> > [21902.714045]? ???(5170000 KHz - 5250000 KHz @
> 40000 KHz), (300 mBi, 2000 mBm)
> > [21902.714050]? ???(5735000 KHz - 5835000 KHz @
> 40000 KHz), (300 mBi, 2000 mBm)
> >
> > modinfo rt2800usb |grep 3070 -- returns nothing
> >
> > as soon as I add the 148f:rt3070 to:
> >
> > ??? /* Ralink */
> > ??? { USB_DEVICE(0x148f, 0x2770),
> USB_DEVICE_DATA(&rt2800usb_ops) },
> > ??? { USB_DEVICE(0x148f, 0x2870),
> USB_DEVICE_DATA(&rt2800usb_ops) },
> > ??? { USB_DEVICE(0x148f, 0x3070),
> USB_DEVICE_DATA(&rt2800usb_ops) }, <--- manually
> added
> > ? ? ???/* Samsung */
> >
> > rt2800usb recognizes the chip and initializes all
> operations:
> >
> > [22310.272382] usb 5-2.4: new high speed USB device
> using ehci_hcd and address 10
> > [22310.381269] usb 5-2.4: configuration #1 chosen from
> 1 choice
> > [22310.416482] phy1: Selected rate control algorithm
> 'minstrel'
> > [22310.417403] Registered led device:
> rt2800usb-phy1::radio
> > [22310.417456] Registered led device:
> rt2800usb-phy1::assoc
> > [22310.417505] Registered led device:
> rt2800usb-phy1::quality
> > [22310.479159] udev: renamed network interface wlan0
> to wlan2
> > [22310.483779] rt2800usb 5-2.4:1.0: firmware:
> requesting rt2870.bin
> >
> > Now, modinfo rt2800usb |grep 3070 -- shows its OK:
> >
> > alias:? ? ? ? ?
> usb:v148Fp3070d*dc*dsc*dp*ic*isc*ip*
> >
> >
> > This is a longstanding bug from at least few months or
> so,? I thought you were experimenting/adjusting the code
> and I figured it would be temporary, but it has been so long
> that I thought I had to report this now.
> >
> > Walter.
>
> Just checked the wireless-compat package, but are you sure
> that the config file contains:
> ??? CONFIG_RT2800USB_RT30XX=y
> and not the default:
> ??? # CONFIG_RT2800USB_RT30XX=y
>
> Note the prefixed '#' which should be removed to enable the
> configuration option.
>
> Ivo

I think I spoke too early. Must have been a snarl up at my end, because even removing the "#" comment sign before "CONFIG_RT2800USB_RT30XX=y" in config.mk doesn't solve the detection problem.

I just concluded a test with today's compat-wireless /April 20/, enabled "CONFIG_RT2800USB_RT30XX=y" in config.mk, but rt2800usb doesn't detect the VIDs and subsequently fails to initialize the device. Adding, however the card's VIDs in the upper portion of code appears to solve the case. I welcome you to test yourself.

The good news is, once we get past the detection debacle the device seems to finally show some life.

Walter.




2010-04-19 16:13:56

by Walter Goldens

[permalink] [raw]
Subject: Re: [rt2x00] rt3070 fails to initialize with rt2800usb

> Thats odd, in compar-wireless, it already contains the
> lines:
>
> #ifdef CONFIG_RT2800USB_RT30XX
> ??? <..snip..>
> ??? /* Ralink */
> ??? { USB_DEVICE(0x148f, 0x2070),
> USB_DEVICE_DATA(&rt2800usb_ops) },
> ??? { USB_DEVICE(0x148f, 0x3070),
> USB_DEVICE_DATA(&rt2800usb_ops) },
> ??? { USB_DEVICE(0x148f, 0x3071),
> USB_DEVICE_DATA(&rt2800usb_ops) },
> ??? { USB_DEVICE(0x148f, 0x3072),
> USB_DEVICE_DATA(&rt2800usb_ops) },
> ??? <..snip..>
> #endif
>
> So adding the USB ID does not need to be added.
>
> Ivo

It is odd. I followed exactly the same logic you have, but I'm adamant the module doesn't recognize the VID of card as it is. Lets get factual:

compat-wireless from March 28th. default install (make && make install) here is the output when the rt2800usb is loaded:

[21902.553231] Generic kernel compatibility enabled based on linux-next next-20100113
[21902.596351] cfg80211: Calling CRDA to update world regulatory domain
[21902.695076] usbcore: registered new interface driver rt2800usb
[21902.714019] cfg80211: World regulatory domain updated:
[21902.714026]? ???(start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[21902.714032]? ???(2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[21902.714036]? ???(2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[21902.714041]? ???(2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[21902.714045]? ???(5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[21902.714050]? ???(5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)

modinfo rt2800usb |grep 3070 -- returns nothing

as soon as I add the 148f:rt3070 to:

??? /* Ralink */
??? { USB_DEVICE(0x148f, 0x2770), USB_DEVICE_DATA(&rt2800usb_ops) },
??? { USB_DEVICE(0x148f, 0x2870), USB_DEVICE_DATA(&rt2800usb_ops) },
??? { USB_DEVICE(0x148f, 0x3070), USB_DEVICE_DATA(&rt2800usb_ops) }, <--- manually added
? ? ???/* Samsung */

rt2800usb recognizes the chip and initializes all operations:

[22310.272382] usb 5-2.4: new high speed USB device using ehci_hcd and address 10
[22310.381269] usb 5-2.4: configuration #1 chosen from 1 choice
[22310.416482] phy1: Selected rate control algorithm 'minstrel'
[22310.417403] Registered led device: rt2800usb-phy1::radio
[22310.417456] Registered led device: rt2800usb-phy1::assoc
[22310.417505] Registered led device: rt2800usb-phy1::quality
[22310.479159] udev: renamed network interface wlan0 to wlan2
[22310.483779] rt2800usb 5-2.4:1.0: firmware: requesting rt2870.bin

Now, modinfo rt2800usb |grep 3070 -- shows its OK:

alias:? ? ? ? ? usb:v148Fp3070d*dc*dsc*dp*ic*isc*ip*


This is a longstanding bug from at least few months or so,? I thought you were experimenting/adjusting the code and I figured it would be temporary, but it has been so long that I thought I had to report this now.

Walter.





2010-04-17 13:16:45

by Ivo Van Doorn

[permalink] [raw]
Subject: Re: [rt2x00] rt3070 fails to initialize with rt2800usb

On Saturday 17 April 2010, Walter wrote:
> > From: Ivo van Doorn <[email protected]>
> > Subject: Re: [rt2x00] rt3070 fails to initialize with rt2800usb
> > To: "Walter" <[email protected]>
> > Cc: [email protected], [email protected]
> > Date: Saturday, April 17, 2010, 8:45 AM
> > On Saturday 17 April 2010, Walter
> > wrote:
> > > I've been monitoring the community's work for the
> > rt3070 chips and especially your recent success towards
> > improving the driver.
> > >
> > > I would like to share something with the rt2x00
> > development team which may or may not be known.
> > >
> > > The rt3070 card I own fails to initialize with the
> > latest (working) compat-wireless release. When I plug the
> > USB card, rt2800usb doesn't automatically load and when I
> > manually modprobe the driver it does not recognize it as
> > well.
> > >
> > > Looking in to the rt2800usb.c file I found the
> > 'problem'. The VIDs aren't properly set. Mine shows
> > 148f:3070. Although a line is included in the "#ifdef
> > CONFIG_RT2800USB_RT30XX", the module won't initialize the
> > card.
> > >
> > > I fixed the problem by adding my device here:
> > >
> > > ??? /* Ralink */
> > > ??? { USB_DEVICE(0x148f, 0x2770),
> > USB_DEVICE_DATA(&rt2800usb_ops) },
> > > ??? { USB_DEVICE(0x148f, 0x2870),
> > USB_DEVICE_DATA(&rt2800usb_ops) },
> > > ??? /* Samsung */
> > >
> > > which now looks like:
> > >
> > > ??? /* Ralink */
> > > ??? { USB_DEVICE(0x148f, 0x2770),
> > USB_DEVICE_DATA(&rt2800usb_ops) },
> > > ??? { USB_DEVICE(0x148f, 0x2870),
> > USB_DEVICE_DATA(&rt2800usb_ops) },
> > >? ? ? ???{
> > USB_DEVICE(0x148f, 0x3070),
> > USB_DEVICE_DATA(&rt2800usb_ops) },
> > > ??? /* Samsung */
> > >
> > > This pertains to the rt3071 as well.
> >
> > That USB ID is already known, did you compile the driver
> > with support
> > for CONFIG_RT2800USB_RT30XX enabled?
> >
> > Ivo
>
> Yes, compat-wireless ships with ''CONFIG_RT2800USB_RT30XX=y'' in config.mk, but the card's VIDs aren't shown in modinfo rt2800usb when compiled, thus the module doesn't recognize the card at all. The only workaround I rustled up is the above mentioned one.

Thats odd, in compar-wireless, it already contains the lines:

#ifdef CONFIG_RT2800USB_RT30XX
<..snip..>
/* Ralink */
{ USB_DEVICE(0x148f, 0x2070), USB_DEVICE_DATA(&rt2800usb_ops) },
{ USB_DEVICE(0x148f, 0x3070), USB_DEVICE_DATA(&rt2800usb_ops) },
{ USB_DEVICE(0x148f, 0x3071), USB_DEVICE_DATA(&rt2800usb_ops) },
{ USB_DEVICE(0x148f, 0x3072), USB_DEVICE_DATA(&rt2800usb_ops) },
<..snip..>
#endif

So adding the USB ID does not need to be added.

Ivo