rt73usb: "Invalid RT chipset detected" after latest changes

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

a-slack

07-05-2009 05:04:16

kernel 2.6.29 + compat-wireless-2009-05-07

Device isn't initialized after plug the USB
[code3s37f445]# lsusb
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 0df6:90ac Sitecom Europe B.V. WL-172
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub



# iwconfig
lo no wireless extensions.

eth0 no wireless extensions.

eth1 no wireless extensions.



# lsmod
Module Size Used by
rt73usb 26168 0
rt2x00usb 9780 1 rt73usb
rt2x00lib 37204 2 rt73usb,rt2x00usb
led_class 3352 1 rt2x00lib
input_polldev 3068 1 rt2x00lib
mac80211 220280 2 rt2x00usb,rt2x00lib
cfg80211 75372 2 rt2x00lib,mac80211
...



# dmesg
...
usb 1-1: new high speed USB device using ehci_hcd and address 2
usb 1-1: configuration #1 chosen from 1 choice
cfg80211: Using static regulatory domain info
cfg80211: Regulatory domain: US
(start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
(2402000 KHz - 2472000 KHz @ 40000 KHz), (600 mBi, 2700 mBm)
(5170000 KHz - 5190000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
(5190000 KHz - 5210000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
(5210000 KHz - 5230000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
(5230000 KHz - 5330000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
(5735000 KHz - 5835000 KHz @ 40000 KHz), (600 mBi, 3000 mBm)
cfg80211: Calling CRDA for country: US
phy0 -> rt73usb_init_eeprom: Error - Invalid RT chipset detected.
phy0 -> rt2x00lib_probe_dev: Error - Failed to allocate device.
usbcore: registered new interface driver rt73usb[/code3s37f445]
with compat-wireless-2009-05-06 and previous it works well.

IvD

07-05-2009 16:06:37

Please enable rt2x00 debug output and post all rt2x00 related debug messages.

a-slack

08-05-2009 07:34:43

kernel 2.6.29 + compat-wireless-2009-05-07
[code29c4a1ew]# dmesg
...
usb 1-7: new high speed USB device using ehci_hcd and address 4
usb 1-7: configuration #1 chosen from 1 choice
cfg80211: Using static regulatory domain info
cfg80211: Regulatory domain: US
(start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
(2402000 KHz - 2472000 KHz @ 40000 KHz), (600 mBi, 2700 mBm)
(5170000 KHz - 5190000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
(5190000 KHz - 5210000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
(5210000 KHz - 5230000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
(5230000 KHz - 5330000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
(5735000 KHz - 5835000 KHz @ 40000 KHz), (600 mBi, 3000 mBm)
cfg80211: Calling CRDA for country: US
phy0 -> rt73usb_init_eeprom: Error - Invalid RT chipset detected.
phy0 -> rt2x00lib_probe_dev: Error - Failed to allocate device.
usbcore: registered new interface driver rt73usb[/code29c4a1ew]
kernel 2.6.29 + compat-wireless-2009-05-07 (with CONFIG_RT2X00_DEBUG=y and CONFIG_RT2X00_LIB_DEBUGFS=y)
[code29c4a1ew]# dmesg
...
usb 1-7: new high speed USB device using ehci_hcd and address 5
usb 1-7: configuration #1 chosen from 1 choice
cfg80211: Using static regulatory domain info
cfg80211: Regulatory domain: US
(start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
(2402000 KHz - 2472000 KHz @ 40000 KHz), (600 mBi, 2700 mBm)
(5170000 KHz - 5190000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
(5190000 KHz - 5210000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
(5210000 KHz - 5230000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
(5230000 KHz - 5330000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
(5735000 KHz - 5835000 KHz @ 40000 KHz), (600 mBi, 3000 mBm)
cfg80211: Calling CRDA for country: US
phy0 -> rt73usb_validate_eeprom: EEPROM recovery - NIC: 0xffef
phy0 -> rt73usb_validate_eeprom: EEPROM recovery - Led: 0xe000
phy0 -> rt73usb_validate_eeprom: EEPROM recovery - RSSI OFFSET A: 0x0000
phy0 -> rt2x00_set_chip: Info - Chipset detected - rt: 1300, rf: 0002, rev: 0002573a.
phy0 -> rt73usb_init_eeprom: Error - Invalid RT chipset detected.
phy0 -> rt2x00lib_probe_dev: Error - Failed to allocate device.
usbcore: registered new interface driver rt73usb[/code29c4a1ew]
kernel 2.6.29 + compat-wireless-2009-05-06 and previous (with CONFIG_RT2X00_DEBUG=y and CONFIG_RT2X00_LIB_DEBUGFS=y)
[code29c4a1ew]# dmesg
...
usb 1-7: new high speed USB device using ehci_hcd and address 6
usb 1-7: configuration #1 chosen from 1 choice
cfg80211: Using static regulatory domain info
cfg80211: Regulatory domain: US
(start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
(2402000 KHz - 2472000 KHz @ 40000 KHz), (600 mBi, 2700 mBm)
(5170000 KHz - 5190000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
(5190000 KHz - 5210000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
(5210000 KHz - 5230000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
(5230000 KHz - 5330000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
(5735000 KHz - 5835000 KHz @ 40000 KHz), (600 mBi, 3000 mBm)
cfg80211: Calling CRDA for country: US
phy0 -> rt73usb_validate_eeprom: EEPROM recovery - NIC: 0xffef
phy0 -> rt73usb_validate_eeprom: EEPROM recovery - Led: 0xe000
phy0 -> rt73usb_validate_eeprom: EEPROM recovery - RSSI OFFSET A: 0x0000
phy0 -> rt2x00_set_chip: Info - Chipset detected - rt: 1300, rf: 0002, rev: 0002573a.
phy0: Selected rate control algorithm 'minstrel'
Registered led device: rt73usb-phy0::radio
Registered led device: rt73usb-phy0::assoc
Registered led device: rt73usb-phy0::quality
usbcore: registered new interface driver rt73usb




# iwconfig
lo no wireless extensions.

eth0 no wireless extensions.

eth1 no wireless extensions.

wmaster0 no wireless extensions.

wlan0 IEEE 802.11bg ESSID:""
Mode:Managed Frequency:2.412 GHz Access Point: Not-Associated
Tx-Power=0 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:on
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0[/code29c4a1ew]

the differences between compat-wireless-2009-05-06 and compat-wireless-2009-05-07 (related to rt2x00) are
[code29c4a1ew]# diff -Npur compat-wireless-2009-05-06/drivers/net/wireless/rt2x00/ compat-wireless-2009-05-07/drivers/net/wireless/rt2x00/
diff -Npur compat-wireless-2009-05-06/drivers/net/wireless/rt2x00/rt2500usb.c compat-wireless-2009-05-07/drivers/net/wireless/rt2x00/rt2500usb.c
--- compat-wireless-2009-05-06/drivers/net/wireless/rt2x00/rt2500usb.c 2009-05-06 06:14:38.000000000 +0200
+++ compat-wireless-2009-05-07/drivers/net/wireless/rt2x00/rt2500usb.c 2009-05-07 06:16:13.000000000 +0200
@@ -1559,7 +1559,7 @@ static int rt2500usb_init_eeprom(struct
rt2500usb_register_read(rt2x00dev, MAC_CSR0, &reg);
rt2x00_set_chip(rt2x00dev, RT2570, value, reg);

- if (!rt2x00_check_rev(&rt2x00dev->chip, 0)) {
+ if (!rt2x00_check_rev(&rt2x00dev->chip, 0x000ffff0, 0)) {
ERROR(rt2x00dev, "Invalid RT chipset detected.\n");
return -ENODEV;
}
diff -Npur compat-wireless-2009-05-06/drivers/net/wireless/rt2x00/rt2800usb.c compat-wireless-2009-05-07/drivers/net/wireless/rt2x00/rt2800usb.c
--- compat-wireless-2009-05-06/drivers/net/wireless/rt2x00/rt2800usb.c 2009-05-06 06:14:38.000000000 +0200
+++ compat-wireless-2009-05-07/drivers/net/wireless/rt2x00/rt2800usb.c 2009-05-07 06:16:13.000000000 +0200
@@ -2348,9 +2348,10 @@ static int rt2800usb_init_eeprom(struct
* The check for rt2860 is not a typo, some rt2870 hardware
* identifies itself as rt2860 in the CSR register.
*/
- if ((rt2x00_get_field32(reg, MAC_CSR0_ASIC_VER) != 0x2860) &&
- (rt2x00_get_field32(reg, MAC_CSR0_ASIC_VER) != 0x2870) &&
- (rt2x00_get_field32(reg, MAC_CSR0_ASIC_VER) != 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;
}
diff -Npur compat-wireless-2009-05-06/drivers/net/wireless/rt2x00/rt2x00.h compat-wireless-2009-05-07/drivers/net/wireless/rt2x00/rt2x00.h
--- compat-wireless-2009-05-06/drivers/net/wireless/rt2x00/rt2x00.h 2009-05-06 06:14:38.000000000 +0200
+++ compat-wireless-2009-05-07/drivers/net/wireless/rt2x00/rt2x00.h 2009-05-07 06:16:13.000000000 +0200
@@ -915,11 +915,10 @@ static inline u32 rt2x00_rev(const struc
return chipset->rev;
}

-static inline u16 rt2x00_check_rev(const struct rt2x00_chip *chipset,
- const u32 rev)
+static inline bool rt2x00_check_rev(const struct rt2x00_chip *chipset,
+ const u32 mask, const u32 rev)
{
- return (((chipset->rev & 0xffff0) == rev) &&
- !!(chipset->rev & 0x0000f));
+ return ((chipset->rev & mask) == rev);
}

/**
diff -Npur compat-wireless-2009-05-06/drivers/net/wireless/rt2x00/rt73usb.c compat-wireless-2009-05-07/drivers/net/wireless/rt2x00/rt73usb.c
--- compat-wireless-2009-05-06/drivers/net/wireless/rt2x00/rt73usb.c 2009-05-06 06:14:38.000000000 +0200
+++ compat-wireless-2009-05-07/drivers/net/wireless/rt2x00/rt73usb.c 2009-05-07 06:16:13.000000000 +0200
@@ -1846,7 +1846,8 @@ static int rt73usb_init_eeprom(struct rt
rt2x00usb_register_read(rt2x00dev, MAC_CSR0, &reg);
rt2x00_set_chip(rt2x00dev, RT2571, value, reg);

- if (!rt2x00_check_rev(&rt2x00dev->chip, 0x25730)) {
+ if (!rt2x00_check_rev(&rt2x00dev->chip, 0x000ffff0, 0x25730) ||
+ !rt2x00_check_rev(&rt2x00dev->chip, 0x0000000f, 0)) {
ERROR(rt2x00dev, "Invalid RT chipset detected.\n");
return -ENODEV;
}[/code29c4a1ew]

IvD

08-05-2009 16:31:08

Thanks, fixed in rt2x00.git and send upstream.