From: David Gibson <hermes@gibson.dropbear.id.au>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: Pavel Roskin <proski@gnu.org>,
Orinoco Development List <orinoco-devel@lists.sourceforge.net>,
netdev@oss.sgi.com, linux-kernel@vger.kernel.org
Subject: Re: [Orinoco-devel] Re: [6/14] Orinoco driver updates - cleanup PCI initialization
Date: Fri, 25 Feb 2005 15:58:54 +1100 [thread overview]
Message-ID: <20050225045854.GE10725@localhost.localdomain> (raw)
In-Reply-To: <421D5979.5080600@pobox.com>
On Wed, Feb 23, 2005 at 11:35:05PM -0500, Jeff Garzik wrote:
> FYI, pci_set_drvdata() needs to be one of the last functions called
> during PCI ->probe().
Ok, here's a patch to correct that (applies on top of the other stack,
obviously):
As Jeff Garzik has pointed out, pci_set_drvdata() belongs right at the
end of PCI initialization. Correct this in the various PCI based
orinoco drivers.
Signed-off-by: David Gibson <hermes@gibson.dropbear.id.au>
Index: working-2.6/drivers/net/wireless/orinoco_plx.c
===================================================================
--- working-2.6.orig/drivers/net/wireless/orinoco_plx.c 2005-02-25 15:47:53.011419192 +1100
+++ working-2.6/drivers/net/wireless/orinoco_plx.c 2005-02-25 15:45:13.000000000 +1100
@@ -257,7 +257,6 @@
SET_NETDEV_DEV(dev, &pdev->dev);
hermes_struct_init(&priv->hw, mem, HERMES_16BIT_REGSPACING);
- pci_set_drvdata(pdev, dev);
printk(KERN_DEBUG PFX "Detected Orinoco/Prism2 PLX device "
"at %s irq:%d, io addr:0x%lx\n", pci_name(pdev), pdev->irq,
@@ -315,6 +314,8 @@
goto fail;
}
+ pci_set_drvdata(pdev, dev);
+
return 0;
fail:
Index: working-2.6/drivers/net/wireless/orinoco_pci.c
===================================================================
--- working-2.6.orig/drivers/net/wireless/orinoco_pci.c 2005-02-25 15:47:53.282378000 +1100
+++ working-2.6/drivers/net/wireless/orinoco_pci.c 2005-02-25 15:44:50.000000000 +1100
@@ -230,7 +230,6 @@
SET_NETDEV_DEV(dev, &pdev->dev);
hermes_struct_init(&priv->hw, pci_ioaddr, HERMES_32BIT_REGSPACING);
- pci_set_drvdata(pdev, dev);
printk(KERN_DEBUG PFX "Detected device %s, mem:0x%lx-0x%lx, irq %d\n",
pci_name(pdev), dev->mem_start, dev->mem_end, pdev->irq);
@@ -257,6 +256,8 @@
goto fail;
}
+ pci_set_drvdata(pdev, dev);
+
return 0;
fail:
Index: working-2.6/drivers/net/wireless/orinoco_tmd.c
===================================================================
--- working-2.6.orig/drivers/net/wireless/orinoco_tmd.c 2005-02-25 15:47:53.011419192 +1100
+++ working-2.6/drivers/net/wireless/orinoco_tmd.c 2005-02-25 15:45:33.000000000 +1100
@@ -166,7 +166,6 @@
SET_NETDEV_DEV(dev, &pdev->dev);
hermes_struct_init(&priv->hw, mem, HERMES_16BIT_REGSPACING);
- pci_set_drvdata(pdev, dev);
printk(KERN_DEBUG PFX "Detected Orinoco/Prism2 TMD device "
"at %s irq:%d, io addr:0x%lx\n", pci_name(pdev), pdev->irq,
@@ -193,6 +192,8 @@
goto fail;
}
+ pci_set_drvdata(pdev, dev);
+
return 0;
fail:
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist. NOT _the_ _other_ _way_
| _around_!
http://www.ozlabs.org/people/dgibson
prev parent reply other threads:[~2005-02-25 4:58 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-24 3:53 [0/14] Orinoco driver updates David Gibson
2005-02-24 3:54 ` [1/14] Orinoco driver updates - use netif_carrier_*() David Gibson
[not found] ` <20050224035445.GB32001-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2005-02-24 3:55 ` [2/14] Orinoco driver updates - update printk()s David Gibson
[not found] ` <20050224035524.GC32001-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2005-02-24 3:56 ` [3/14] Orinoco driver updates - use mdelay()/ssleep() more David Gibson
[not found] ` <20050224035650.GD32001-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2005-02-24 3:57 ` [4/14] Orinoco driver updates - add free_orinocodev() David Gibson
[not found] ` <20050224035718.GE32001-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2005-02-24 3:58 ` [5/14] Orinoco driver updates - cleanup low-level code David Gibson
[not found] ` <20050224035804.GF32001-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2005-02-24 3:59 ` [6/14] Orinoco driver updates - cleanup PCI initialization David Gibson
[not found] ` <20050224035957.GH32001-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2005-02-24 4:00 ` [7/14] Orinoco driver updates - use modern module_parm() David Gibson
[not found] ` <20050224040024.GI32001-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2005-02-24 4:00 ` [8/14] Orinoco driver updates - PCMCIA initialization cleanups David Gibson
[not found] ` <20050224040052.GJ32001-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2005-02-24 4:01 ` [9/14] Orinoco driver updates - update is_ethersnap() David Gibson
[not found] ` <20050224040153.GK32001-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2005-02-24 4:02 ` [10/14] Orinoco driver updates - prohibit IBSS with no ESSID David Gibson
[not found] ` <20050224040228.GL32001-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2005-02-24 4:02 ` [11/14] Orinoco driver updates - delay Tx wake David Gibson
[not found] ` <20050224040258.GM32001-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2005-02-24 4:03 ` [12/14] Orinoco driver updates - WEP updates David Gibson
[not found] ` <20050224040319.GN32001-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2005-02-24 4:04 ` [13/14] Orinoco driver updates - update firmware detection David Gibson
[not found] ` <20050224040409.GO32001-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2005-02-24 4:05 ` [14/14] Orinoco driver updates - update version and changelog David Gibson
2005-02-24 4:44 ` Jeff Garzik
2005-02-24 6:55 ` [8/14] Orinoco driver updates - PCMCIA initialization cleanups Dominik Brodowski
2005-02-24 7:29 ` Jeff Garzik
2005-02-25 5:03 ` [Orinoco-devel] " David Gibson
2005-02-25 7:02 ` Dominik Brodowski
2005-02-24 4:35 ` [7/14] Orinoco driver updates - use modern module_parm() Jeff Garzik
2005-02-24 4:35 ` [6/14] Orinoco driver updates - cleanup PCI initialization Jeff Garzik
2005-02-25 4:58 ` David Gibson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050225045854.GE10725@localhost.localdomain \
--to=hermes@gibson.dropbear.id.au \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@oss.sgi.com \
--cc=orinoco-devel@lists.sourceforge.net \
--cc=proski@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).