[rt2x00-users] [RFC/RFT] rt2x00: use rt2800_config_channel_rt3x for rt2872

Helmut Schaa helmut.schaa at googlemail.com
Sat Apr 10 13:57:39 UTC 2010


Am Samstag 10 April 2010 schrieb Antonio Quartulli:
> # ip link set up dev wlan0
> RTNETLINK answers: Device or resource busy
> 
> and this is the output on /var/log/messages:
> 
> Apr 10 13:26:45 eagle3 kernel: [12255.104075] phy1 ->
> rt2800pci_load_firmware: Error - PBF system register not ready.
> Apr 10 13:26:45 eagle3 kernel: [12255.104635] phy1 ->
> rt2x00pci_regbusy_read: Error - Indirect register access failed:
> offset=0x00007010, value=0xbdca191a

I justed checked the ralink drivers fw download and in difference to rt2x00
it uses much more retries when accessing the register in question. Would you
like to try the following patch which increases the number of retries to read
the BF_SYS_CTRL register?

Helmut

diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c
index a2b37d3..3bb45b3 100644
--- a/drivers/net/wireless/rt2x00/rt2800pci.c
+++ b/drivers/net/wireless/rt2x00/rt2800pci.c
@@ -276,14 +276,14 @@ static int rt2800pci_load_firmware(struct rt2x00_dev *rt2x00dev,
 	/*
 	 * Wait for device to stabilize.
 	 */
-	for (i = 0; i < REGISTER_BUSY_COUNT; i++) {
+	for (i = 0; i < 1000; i++) {
 		rt2800_register_read(rt2x00dev, PBF_SYS_CTRL, &reg);
 		if (rt2x00_get_field32(reg, PBF_SYS_CTRL_READY))
 			break;
 		msleep(1);
 	}
 
-	if (i == REGISTER_BUSY_COUNT) {
+	if (i == 1000) {
 		ERROR(rt2x00dev, "PBF system register not ready.\n");
 		return -EBUSY;
 	}



More information about the users mailing list