r64 - in unstable/rt2x00/debian: . patches

benh at alioth.debian.org benh at alioth.debian.org
Mon Oct 29 23:57:22 UTC 2007


Author: benh
Date: 2007-10-29 23:57:22 +0000 (Mon, 29 Oct 2007)
New Revision: 64

Added:
   unstable/rt2x00/debian/patches/005_fix_probe_148f_2573.diff
Modified:
   unstable/rt2x00/debian/changelog
   unstable/rt2x00/debian/patches/series
Log:
Fixed probing for USB devices with ambiguous id.


Modified: unstable/rt2x00/debian/changelog
===================================================================
--- unstable/rt2x00/debian/changelog	2007-10-22 00:58:56 UTC (rev 63)
+++ unstable/rt2x00/debian/changelog	2007-10-29 23:57:22 UTC (rev 64)
@@ -1,3 +1,9 @@
+rt2x00 (2.0.9-2) unstable; urgency=low
+
+  * Fixed probing for USB devices with ambiguous id
+
+ -- Ben Hutchings <ben at decadent.org.uk>  Mon, 29 Oct 2007 23:56:47 +0000
+
 rt2x00 (2.0.9-1) unstable; urgency=low
 
   * New version from git

Added: unstable/rt2x00/debian/patches/005_fix_probe_148f_2573.diff
===================================================================
--- unstable/rt2x00/debian/patches/005_fix_probe_148f_2573.diff	                        (rev 0)
+++ unstable/rt2x00/debian/patches/005_fix_probe_148f_2573.diff	2007-10-29 23:57:22 UTC (rev 64)
@@ -0,0 +1,73 @@
+--- rt2x00.orig/drivers/net/wireless/rt2x00/rt2500usb.c
++++ rt2x00/drivers/net/wireless/rt2x00/rt2500usb.c
+@@ -1278,6 +1278,7 @@
+ static int rt2500usb_init_eeprom(struct rt2x00_dev *rt2x00dev)
+ {
+ 	u16 reg;
++	__le32 reg32;
+ 	u16 value;
+ 	u16 eeprom;
+ 
+@@ -1291,12 +1292,14 @@
+ 	 */
+ 	value = rt2x00_get_field16(eeprom, EEPROM_ANTENNA_RF_TYPE);
+ 	rt2500usb_register_read(rt2x00dev, MAC_CSR0, &reg);
+-	rt2x00_set_chip(rt2x00dev, RT2570, value, reg);
+-
+-	if (rt2x00_rev(&rt2x00dev->chip, 0xffff0)) {
++	rt2x00usb_vendor_request_buff(rt2x00dev, USB_MULTI_READ,
++				      USB_VENDOR_REQUEST_IN, MAC_RT73_CSR0,
++				      &reg32, sizeof(reg32), REGISTER_TIMEOUT);
++	if ((reg & 0xfff0) || (le32_to_cpu(reg32) & 0xffff0) == 0x25730) {
+ 		ERROR(rt2x00dev, "Invalid RT chipset detected.\n");
+ 		return -ENODEV;
+ 	}
++	rt2x00_set_chip(rt2x00dev, RT2570, value, reg);
+ 
+ 	if (!rt2x00_rf(&rt2x00dev->chip, RF2522) &&
+ 	    !rt2x00_rf(&rt2x00dev->chip, RF2523) &&
+--- rt2x00.orig/drivers/net/wireless/rt2x00/rt2500usb.h
++++ rt2x00/drivers/net/wireless/rt2x00/rt2500usb.h
+@@ -73,6 +73,11 @@
+ #define MAC_CSR0			0x0400
+ 
+ /*
++ * MAC_RT73_CSR0: ASIC revision number in RT73, for use when probing.
++ */
++#define MAC_RT73_CSR0			0x3000
++
++/*
+  * MAC_CSR1: System control.
+  * SOFT_RESET: Software reset, 1: reset, 0: normal.
+  * BBP_RESET: Hardware reset, 1: reset, 0, release.
+--- rt2x00.orig/drivers/net/wireless/rt2x00/rt2x00.h
++++ rt2x00/drivers/net/wireless/rt2x00/rt2x00.h
+@@ -811,11 +811,6 @@
+ 	return chipset->rev;
+ }
+ 
+-static inline u16 rt2x00_rev(const struct rt2x00_chip *chipset, const u32 mask)
+-{
+-	return chipset->rev & mask;
+-}
+-
+ /*
+  * Duration calculations
+  * The rate variable passed is: 100kbs.
+--- rt2x00.orig/drivers/net/wireless/rt2x00/rt73usb.c
++++ rt2x00/drivers/net/wireless/rt2x00/rt73usb.c
+@@ -1530,12 +1530,11 @@
+ 	 */
+ 	value = rt2x00_get_field16(eeprom, EEPROM_ANTENNA_RF_TYPE);
+ 	rt73usb_register_read(rt2x00dev, MAC_CSR0, &reg);
+-	rt2x00_set_chip(rt2x00dev, RT2571, value, reg);
+-
+-	if (!rt2x00_rev(&rt2x00dev->chip, 0x25730)) {
++	if ((reg & 0xffff0) != 0x25730) {
+ 		ERROR(rt2x00dev, "Invalid RT chipset detected.\n");
+ 		return -ENODEV;
+ 	}
++	rt2x00_set_chip(rt2x00dev, RT2571, value, reg);
+ 
+ 	if (!rt2x00_rf(&rt2x00dev->chip, RF5226) &&
+ 	    !rt2x00_rf(&rt2x00dev->chip, RF2528) &&

Modified: unstable/rt2x00/debian/patches/series
===================================================================
--- unstable/rt2x00/debian/patches/series	2007-10-22 00:58:56 UTC (rev 63)
+++ unstable/rt2x00/debian/patches/series	2007-10-29 23:57:22 UTC (rev 64)
@@ -1,3 +1,4 @@
 002_out_of_tree.diff
 004_fix_filter_flags.diff
 003_workaround_mac80211_changes.diff
+005_fix_probe_148f_2573.diff




More information about the Pkg-ralink-commits mailing list