DWL-520 trouble

Jouni Malinen jkmaline
Sat Jul 10 14:17:22 PDT 2004


On Fri, Jul 09, 2004 at 01:38:34PM -0700, Ka-Hing Cheung wrote:
> On Wed, 7 Jul 2004 00:03:33 -0700, Ka-Hing Cheung <kahing at gmail.com> wrote:
> > Using hostap-driver 0.2.0 or 0.2.3 and hostap-utils 0.2.1 in both
> > cases, modprobe hostap_pci would render the machine unusable
> > (non-pingable, nothing works). All it outputs is this (typed by hand):
> > 
> > hostap_pci: 0.2.0 - 2004-02-15 (Jouni Malinen <email>)
> > hostap_pci: Registered netdevice wifi0
> 
> Nevermind, I figured it out. It turns out that I need to unload the
> modules before rebooting, otherwise loading the modules next time
> would result bring down the machine. Not fun.

Could you please try to find the exact location where this happens? I
would appreciate it if you could try the attached patch and then load
the module after reboot (without unloading it before reboot) in text
console and see how long the initialization goest? You can apply this
patch with

patch -p0 < hostap_pci_debug.patch

in hostap root directory.

This patch prints out debug messages between the initialization steps.
Similar printk's could be used to find more exact location once getting
more data from a hang with these changes.

In addition, I would like to know whether defining
PRISM2_PCI_USE_LONG_DELAYS in driver/modules/hostap_pci.c would change
the behavior. You can do this be uncommenting this line in the file:

/* #define PRISM2_PCI_USE_LONG_DELAYS */

i.e., change it to
#define PRISM2_PCI_USE_LONG_DELAYS
and recompile

-- 
Jouni Malinen                                            PGP id EFC895FA
-------------- next part --------------
Index: driver/modules/hostap_pci.c
===================================================================
RCS file: /home/jm/cvsroot/hostap/driver/modules/hostap_pci.c,v
retrieving revision 1.46
diff -u -p -r1.46 hostap_pci.c
--- driver/modules/hostap_pci.c	9 Feb 2004 19:54:07 -0000	1.46
+++ driver/modules/hostap_pci.c	10 Jul 2004 21:11:22 -0000
@@ -242,6 +242,7 @@ static int prism2_pci_probe(struct pci_d
 	int irq_registered = 0;
 	struct hostap_interface *iface;
 
+	printk("prism2_pci_probe:1\n");
 	if (pci_enable_device(pdev))
 		return -EIO;
 
@@ -262,9 +263,12 @@ static int prism2_pci_probe(struct pci_d
 	pci_set_master(pdev);
 #endif /* PRISM2_BUS_MASTER */
 
+	printk("prism2_pci_probe:2\n");
 	dev = prism2_init_local_data(&prism2_pci_funcs, cards_found);
+	printk("prism2_pci_probe:3\n");
 	if (dev == NULL)
 		goto fail;
+	printk("prism2_pci_probe:4\n");
 	iface = dev->priv;
 	local = iface->local;
 	cards_found++;
@@ -273,7 +277,9 @@ static int prism2_pci_probe(struct pci_d
         dev->mem_start = mem;
         dev->mem_end = mem + pci_resource_len(pdev, 0);
 
+	printk("prism2_pci_probe:5\n");
 	prism2_pci_cor_sreset(local);
+	printk("prism2_pci_probe:6\n");
 
 	pci_set_drvdata(pdev, dev);
 
@@ -283,12 +289,14 @@ static int prism2_pci_probe(struct pci_d
 		goto fail;
 	} else
 		irq_registered = 1;
+	printk("prism2_pci_probe:7\n");
 
 	if (!local->pri_only && prism2_hw_config(dev, 1)) {
 		printk(KERN_DEBUG "%s: hardware initialization failed\n",
 		       dev_info);
 		goto fail;
 	}
+	printk("prism2_pci_probe:8\n");
 
 	printk(KERN_INFO "%s: Intersil Prism2.5 PCI: "
 	       "mem=0x%lx, irq=%d\n", dev->name, phymem, dev->irq);
@@ -296,6 +304,7 @@ static int prism2_pci_probe(struct pci_d
 	return hostap_hw_ready(dev);
 
  fail:
+	printk("prism2_pci_probe:9\n");
 	if (irq_registered && dev)
 		free_irq(dev->irq, dev);
 



More information about the Hostap mailing list