linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iwl3945: Fix oops at module load
@ 2010-11-08 21:54 Andi Kleen
  2010-11-08 22:01 ` Berg, Johannes
  2010-11-08 22:08 ` Guy, Wey-Yi
  0 siblings, 2 replies; 5+ messages in thread
From: Andi Kleen @ 2010-11-08 21:54 UTC (permalink / raw)
  To: linux-wireless; +Cc: linux-kernel, Andi Kleen, Johannes.berg

From: Andi Kleen <ak@linux.intel.com>

On my laptop the iwl3945 driver oopsed at boot with 2.6.37-rc1
in __dev_printk.

The problem is that for some reason it prints the sw scan
warning, but does that before the pci device is initialized
in the driver private structure. This leads to an oops
in the warning print code.

Move the warning after the device has been initialized.

Cc: Johannes.berg@intel.com
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
 drivers/net/wireless/iwlwifi/iwl3945-base.c |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 8f8c4b7..3910ec2 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -3995,6 +3995,11 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
 	priv->contexts[IWL_RXON_CTX_BSS].station_devtype = RXON_DEV_TYPE_ESS;
 	priv->contexts[IWL_RXON_CTX_BSS].unused_devtype = RXON_DEV_TYPE_ESS;
 
+	IWL_DEBUG_INFO(priv, "*** LOAD DRIVER ***\n");
+	priv->cfg = cfg;
+	priv->pci_dev = pdev;
+	priv->inta_mask = CSR_INI_SET_MASK;
+
 	/*
 	 * Disabling hardware scan means that mac80211 will perform scans
 	 * "the hard way", rather than using device's scan.
@@ -4004,12 +4009,6 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
 		iwl3945_hw_ops.hw_scan = NULL;
 	}
 
-
-	IWL_DEBUG_INFO(priv, "*** LOAD DRIVER ***\n");
-	priv->cfg = cfg;
-	priv->pci_dev = pdev;
-	priv->inta_mask = CSR_INI_SET_MASK;
-
 	if (iwl_alloc_traffic_mem(priv))
 		IWL_ERR(priv, "Not enough memory to generate traffic log\n");
 
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* RE: [PATCH] iwl3945: Fix oops at module load
  2010-11-08 21:54 [PATCH] iwl3945: Fix oops at module load Andi Kleen
@ 2010-11-08 22:01 ` Berg, Johannes
  2010-11-08 22:08 ` Guy, Wey-Yi
  1 sibling, 0 replies; 5+ messages in thread
From: Berg, Johannes @ 2010-11-08 22:01 UTC (permalink / raw)
  To: Andi Kleen, linux-wireless@vger.kernel.org
  Cc: linux-kernel@vger.kernel.org, Andi Kleen, Guy, Wey-Yi W

> From: Andi Kleen <ak@linux.intel.com>
> 
> On my laptop the iwl3945 driver oopsed at boot with 2.6.37-rc1
> in __dev_printk.
> 
> The problem is that for some reason it prints the sw scan
> warning, but does that before the pci device is initialized
> in the driver private structure. This leads to an oops
> in the warning print code.
> 
> Move the warning after the device has been initialized.

Yup, something like this is needed, sorry about this!
I believe we have a fix for this in the pipeline somewhere.

johannes
--------------------------------------------------------------------------------------
Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen, Deutschland 
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Douglas Lusk, Peter Gleissner, Hannes Schwaderer
Registergericht: Muenchen HRB 47456 
Ust.-IdNr./VAT Registration No.: DE129385895
Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] iwl3945: Fix oops at module load
  2010-11-08 21:54 [PATCH] iwl3945: Fix oops at module load Andi Kleen
  2010-11-08 22:01 ` Berg, Johannes
@ 2010-11-08 22:08 ` Guy, Wey-Yi
  2010-11-09  1:46   ` Andi Kleen
  1 sibling, 1 reply; 5+ messages in thread
From: Guy, Wey-Yi @ 2010-11-08 22:08 UTC (permalink / raw)
  To: Andi Kleen
  Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
	Andi Kleen, Berg, Johannes

Hi Andi,

On Mon, 2010-11-08 at 13:54 -0800, Andi Kleen wrote:
> From: Andi Kleen <ak@linux.intel.com>
> 
> On my laptop the iwl3945 driver oopsed at boot with 2.6.37-rc1
> in __dev_printk.
> 
> The problem is that for some reason it prints the sw scan
> warning, but does that before the pci device is initialized
> in the driver private structure. This leads to an oops
> in the warning print code.
> 
> Move the warning after the device has been initialized.
> 
> Cc: Johannes.berg@intel.com
> Signed-off-by: Andi Kleen <ak@linux.intel.com>
> ---
>  drivers/net/wireless/iwlwifi/iwl3945-base.c |   11 +++++------
>  1 files changed, 5 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
> index 8f8c4b7..3910ec2 100644
> --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
> +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
> @@ -3995,6 +3995,11 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
>  	priv->contexts[IWL_RXON_CTX_BSS].station_devtype = RXON_DEV_TYPE_ESS;
>  	priv->contexts[IWL_RXON_CTX_BSS].unused_devtype = RXON_DEV_TYPE_ESS;
>  
> +	IWL_DEBUG_INFO(priv, "*** LOAD DRIVER ***\n");
> +	priv->cfg = cfg;
> +	priv->pci_dev = pdev;
> +	priv->inta_mask = CSR_INI_SET_MASK;
> +
>  	/*
>  	 * Disabling hardware scan means that mac80211 will perform scans
>  	 * "the hard way", rather than using device's scan.
> @@ -4004,12 +4009,6 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
>  		iwl3945_hw_ops.hw_scan = NULL;
>  	}
>  
> -
> -	IWL_DEBUG_INFO(priv, "*** LOAD DRIVER ***\n");
> -	priv->cfg = cfg;
> -	priv->pci_dev = pdev;
> -	priv->inta_mask = CSR_INI_SET_MASK;
> -
>  	if (iwl_alloc_traffic_mem(priv))
>  		IWL_ERR(priv, "Not enough memory to generate traffic log\n");
>  

I believe the fix already in
http://git.kernel.org/?p=linux/kernel/git/iwlwifi/iwlwifi-2.6.git;a=summary
commit#6e0922e0781884ff4eb3638f10a91b63b6120207

Thanks
Wey


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] iwl3945: Fix oops at module load
  2010-11-08 22:08 ` Guy, Wey-Yi
@ 2010-11-09  1:46   ` Andi Kleen
  2010-11-09  3:04     ` Guy, Wey-Yi
  0 siblings, 1 reply; 5+ messages in thread
From: Andi Kleen @ 2010-11-09  1:46 UTC (permalink / raw)
  To: Guy, Wey-Yi
  Cc: Andi Kleen, linux-wireless@vger.kernel.org,
	linux-kernel@vger.kernel.org, Andi Kleen, Berg, Johannes

> I believe the fix already in
> http://git.kernel.org/?p=linux/kernel/git/iwlwifi/iwlwifi-2.6.git;a=summary
> commit#6e0922e0781884ff4eb3638f10a91b63b6120207

Thanks. Can that please be sent to Linus ASAP? It doesn't really
help my laptop if it's in some obscure git tree.

-Andi

-- 
ak@linux.intel.com -- Speaking for myself only.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] iwl3945: Fix oops at module load
  2010-11-09  1:46   ` Andi Kleen
@ 2010-11-09  3:04     ` Guy, Wey-Yi
  0 siblings, 0 replies; 5+ messages in thread
From: Guy, Wey-Yi @ 2010-11-09  3:04 UTC (permalink / raw)
  To: Andi Kleen
  Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
	Andi Kleen, Berg, Johannes

On Mon, 2010-11-08 at 17:46 -0800, Andi Kleen wrote:
> > I believe the fix already in
> > http://git.kernel.org/?p=linux/kernel/git/iwlwifi/iwlwifi-2.6.git;a=summary
> > commit#6e0922e0781884ff4eb3638f10a91b63b6120207
> 
> Thanks. Can that please be sent to Linus ASAP? It doesn't really
> help my laptop if it's in some obscure git tree.
> 
Done, thanks to let me know

Wey
> 



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-11-09  3:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-08 21:54 [PATCH] iwl3945: Fix oops at module load Andi Kleen
2010-11-08 22:01 ` Berg, Johannes
2010-11-08 22:08 ` Guy, Wey-Yi
2010-11-09  1:46   ` Andi Kleen
2010-11-09  3:04     ` Guy, Wey-Yi

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).