r103 - in unstable/rt73/debian: . patches
benh at alioth.debian.org
benh at alioth.debian.org
Sun Nov 25 22:31:19 UTC 2007
Author: benh
Date: 2007-11-25 22:31:19 +0000 (Sun, 25 Nov 2007)
New Revision: 103
Added:
unstable/rt73/debian/patches/
unstable/rt73/debian/patches/001_fix_probe_148f_2573.diff
unstable/rt73/debian/patches/002_fix_probe_crash.diff
unstable/rt73/debian/patches/series
Log:
Added patches to:
- fix crash in case of device probe failure
- reject devices which require the rt2570 driver
Added: unstable/rt73/debian/patches/001_fix_probe_148f_2573.diff
===================================================================
--- unstable/rt73/debian/patches/001_fix_probe_148f_2573.diff (rev 0)
+++ unstable/rt73/debian/patches/001_fix_probe_148f_2573.diff 2007-11-25 22:31:19 UTC (rev 103)
@@ -0,0 +1,31 @@
+--- rt73.orig/Module/rtmp_main.c
++++ rt73/Module/rtmp_main.c
+@@ -2114,6 +2114,7 @@
+ {
+ struct usb_device *dev = interface_to_usbdev(intf);
+ PRTMP_ADAPTER pAd;
++ ULONG version = 0;
+ int i;
+ struct net_device *netdev;
+ int res = -ENOMEM;
+@@ -2151,10 +2152,19 @@
+ }
+
+ netdev->priv = pAd;
++ pAd->pUsb_Dev = dev;
++
++ RTUSBReadMACRegister(pAd, MAC_CSR0, &version);
++ if ((version & 0xf) == 0 || (le32_to_cpu(version) & 0xffff0) != 0x25730)
++ {
++ printk("ASIC version not matching\n");
++ res = -ENODEV;
++ goto out;
++ }
++
+ pAd->net_dev = netdev;
+ netif_stop_queue(netdev);
+ pAd->config = &dev->config->desc;
+- pAd->pUsb_Dev = dev;
+ SET_MODULE_OWNER(netdev);
+ ether_setup(netdev);
+
Added: unstable/rt73/debian/patches/002_fix_probe_crash.diff
===================================================================
--- unstable/rt73/debian/patches/002_fix_probe_crash.diff (rev 0)
+++ unstable/rt73/debian/patches/002_fix_probe_crash.diff 2007-11-25 22:31:19 UTC (rev 103)
@@ -0,0 +1,43 @@
+--- rt73.orig/Module/rtmp_main.c
++++ rt73/Module/rtmp_main.c
+@@ -2159,7 +2159,7 @@
+ {
+ printk("ASIC version not matching\n");
+ res = -ENODEV;
+- goto out;
++ goto out_noregnetdev;
+ }
+
+ pAd->net_dev = netdev;
+@@ -2258,7 +2258,7 @@
+ res = register_netdev(netdev);
+ if (res) {
+ printk("register_netdev failed err=%d\n",res);
+- goto out;
++ goto out_noregnetdev;
+ }
+
+ usb_set_intfdata(intf, pAd);
+@@ -2268,16 +2268,19 @@
+ res = LoadFirmware(pAd, firmName);
+ if (res) {
+ DBGPRINT(RT_DEBUG_ERROR, "Failed to request Firmware.\n");
+- goto out;
++ goto out_nofirmware;
+ }
+ return 0;
+
+-out:
++out_nofirmware:
++ rt73usb_close_debugfs(pAd);
++ unregister_netdev(netdev);
++out_noregnetdev:
+ free_netdev(netdev);
+ out_nonetdev:
+ kfree(pAd);
+ out_noalloc:
+- module_put(THIS_MODULE);
++ usb_put_dev(dev);
+ return res;
+ }
+
Added: unstable/rt73/debian/patches/series
===================================================================
--- unstable/rt73/debian/patches/series (rev 0)
+++ unstable/rt73/debian/patches/series 2007-11-25 22:31:19 UTC (rev 103)
@@ -0,0 +1,2 @@
+001_fix_probe_148f_2573.diff
+002_fix_probe_crash.diff
More information about the Pkg-ralink-commits
mailing list