rt2800 errors

Live forum: http://rt2x00.serialmonkey.com/viewtopic.php?t=5327

mgessner

04-05-2009 17:59:35

Hi,

When I plug my rt2870-based USB module in to my 2.6.30-rc3 rt2x00.git kernel, I get these

usb 1-2 new full speed USB device using at91_ohci and address 2
usb 1-2 configuration #1 chosen from 1 choice
phy0 -> rt2x00_set_chip Info - Chipset detected - rt 1600, rf 0002, rev 28720202.
phy0 -> rt2800usb_init_eeprom Error - Invalid RT chipset detected.
phy0 -> rt2x00lib_probe_dev Error - Failed to allocate device.

The chip in question is labeled RT2870F/N9C5590D0/0845ST.

Any ideas?

I checked the forum but there wasn't a lot of rt2800 usb discussion found.

Thanks,

-mg

IvD

04-05-2009 22:47:42

Apparently the RT chipset check is a bit too strict, I'll add the rt2872 chip to the list of known devices.

IvD

05-05-2009 07:30:47

please retest with latest version.

mgessner

05-05-2009 13:58:02

Thank you!

I will test it as soon as I can.

I will post my results here.

Thanks,

-mg

mgessner

05-05-2009 17:17:39

Even after I got your changes, it still didn't work, so I made the following change

git diff drivers/net/wireless/rt2x00/rt2800usb.c
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
index 8dd1489..df82f2b 100644
--- a/drivers/net/wireless/rt2x00/rt2800usb.c
+++ b/drivers/net/wireless/rt2x00/rt2800usb.c
@@ -2348,10 +2348,10 @@ static int rt2800usb_init_eeprom(struct rt2x00_dev *rt2x00dev)
* The check for rt2860 is not a typo, some rt2870 hardware
* identifies itself as rt2860 in the CSR register.
*/
- if (!rt2x00_check_rev(&rt2x00dev->chip, 0xfff00000, 0x286) &&
- !rt2x00_check_rev(&rt2x00dev->chip, 0xfff00000, 0x287) &&
- !rt2x00_check_rev(&rt2x00dev->chip, 0xfff00000, 0x288) &&
- !rt2x00_check_rev(&rt2x00dev->chip, 0xffff0000, 0x3070)) {
+ if (!rt2x00_check_rev(&rt2x00dev->chip, 0xfff00000, 0x28600000) &&
+ !rt2x00_check_rev(&rt2x00dev->chip, 0xfff00000, 0x28700000) &&
+ !rt2x00_check_rev(&rt2x00dev->chip, 0xfff00000, 0x28800000) &&
+ !rt2x00_check_rev(&rt2x00dev->chip, 0xffff0000, 0x30700000)) {
ERROR(rt2x00dev, "Invalid RT chipset detected.\n");
return -ENODEV;
}

Then it worked.

Would you like me to commit this change?

Thanks,

-mg

IvD

05-05-2009 17:44:08

Thanks, I'll fix this manually by updating the previous patch (I had already send it upstream, so I have to recall that patch as well).

(Please note that committing is fine, but that is on your local tree, pushing it to the server isn't possible because you need my account for that. ;) )

mgessner

05-05-2009 18:25:00

Thanks - that's good to know.

My day is complete, because I'm now a contributor )

Question -- when the firmware is loaded, is it somehow bypassing the hotplug/mdev/udev process?

My script isn't being hit when I configure the interface. It looks like the firmware is somehow being loaded directly?

Thanks,

-mg

IvD

06-05-2009 06:15:35

Well the firmware loading is going through udev, so you probably need to recheck your udev configuration.

mgessner

06-05-2009 11:51:38

I'm using mdev under busybox, which AFAICT, works like udev everywhere else for the most part.

What's odd is that I have a bunch of "echo ... > /dev/console" and I see the firmware report that it is being loaded, but the script doesn't go off to do the loading.

However, when I remove the USB key, I *DO* see the logging output.

Weird. If I figure it out, I'll let you know, because I'm sure there are other embedded linux users who will want to know this.