On Friday 16 March 2007 23:46, Paul TBBle Hampson wrote: > The (built-in) bcm43xx-mac80211 driver works, but when I try to load a > CardBus Atheros card I've got lying around with dadwifi-openhal, it > fails with some sort of hardware error. (ie. it _might_ be a dodgey > Cardbus port, although both cardbus cards used to work in this machine, > using prism54 hardmac and the dadwifi with atheros hal driver > respectively) > Can you rule out the port first? Load the fullmac driver first, bring it up & down, unload it, and then try p54. > (Albeit the hardmach driver never managed to WPA, and as of 2.6.20 still > doesn't, haven't tried the version in wireless-dev yet) > Hardmac version in wireless-dev is the same thing. wireless-dev is just for mac80211 and cfg80211 code. > So maybe the BUG isn't a problem with the p54 driver, but I'd appreciate > help with making it find the eeprom so it doesn't happen... I just found a leak in a probe error path. It might somehow cause the problem in the pci code. I've attached a patch to fix it. Thanks, -Michael Wu
p54pci: Fix error path when eeprom read fails From: Michael Wu <flamingice@xxxxxxxxxxxx> The p54 PCI driver leaks memory when eeprom read fails. This fixes it. Signed-off-by: Michael Wu <flamingice@xxxxxxxxxxxx> --- drivers/net/wireless/mac80211/p54/prism54pci.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/mac80211/p54/prism54pci.c b/drivers/net/wireless/mac80211/p54/prism54pci.c index 578ec39..798a5ee 100644 --- a/drivers/net/wireless/mac80211/p54/prism54pci.c +++ b/drivers/net/wireless/mac80211/p54/prism54pci.c @@ -567,11 +567,11 @@ static int __devinit p54p_probe(struct pci_dev *pdev, err = p54p_upload_firmware(dev); if (err) - goto err_iounmap; + goto err_free_desc; err = p54p_read_eeprom(dev); if (err) - goto err_iounmap; + goto err_free_desc; priv->common.open = p54p_open; priv->common.stop = p54p_stop; @@ -583,7 +583,7 @@ static int __devinit p54p_probe(struct pci_dev *pdev, if (err) { printk(KERN_ERR "%s (prism54pci): Cannot register netdevice\n", pci_name(pdev)); - goto err_free_desc; + goto err_free_common; } printk(KERN_INFO "%s: hwaddr " MAC_FMT ", isl38%02x\n", @@ -592,8 +592,10 @@ static int __devinit p54p_probe(struct pci_dev *pdev, return 0; - err_free_desc: + err_free_common: p54_free_common(dev); + + err_free_desc: pci_free_consistent(pdev, sizeof(*priv->ring_control), priv->ring_control, priv->ring_control_dma);
Attachment:
pgpJqp4egmisP.pgp
Description: PGP signature