netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] bcm43xx: Fix for oops on resume
@ 2007-02-06 17:39 Larry Finger
       [not found] ` <45c8bd59.oamnvaNRMZvKoPBa%Larry.Finger-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Larry Finger @ 2007-02-06 17:39 UTC (permalink / raw)
  To: John Linville
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA,
	Bcm43xx-dev-0fE9KPoRgkgATYTw5x5z8w, Michael Buesch

There is a kernel oops on bcm43xx when resuming due to an overly tight timeout loop.

Signed-off-by: Larry Finger<Larry.Finger-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
---

Index: linux-2.6/drivers/net/wireless/bcm43xx/bcm43xx.h
===================================================================
--- linux-2.6.orig/drivers/net/wireless/bcm43xx/bcm43xx.h
+++ linux-2.6/drivers/net/wireless/bcm43xx/bcm43xx.h
@@ -21,7 +21,7 @@
 #define PFX				KBUILD_MODNAME ": "
 
 #define BCM43xx_SWITCH_CORE_MAX_RETRIES	50
-#define BCM43xx_IRQWAIT_MAX_RETRIES	50
+#define BCM43xx_IRQWAIT_MAX_RETRIES	100
 
 #define BCM43xx_IO_SIZE			8192

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

* Re: [PATCH] bcm43xx: Fix for oops on resume
       [not found] ` <45c8bd59.oamnvaNRMZvKoPBa%Larry.Finger-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
@ 2007-02-07 12:15   ` Johannes Berg
  2007-02-07 13:23     ` Larry Finger
  0 siblings, 1 reply; 7+ messages in thread
From: Johannes Berg @ 2007-02-07 12:15 UTC (permalink / raw)
  To: Larry Finger
  Cc: John Linville, Michael Buesch, netdev-u79uwXL29TY76Z2rM5mHXA,
	Bcm43xx-dev-0fE9KPoRgkgATYTw5x5z8w,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 498 bytes --]

On Tue, 2007-02-06 at 11:39 -0600, Larry Finger wrote:
> There is a kernel oops on bcm43xx when resuming due to an overly tight timeout loop.

Come to think of it... Is there any chance of fixing the actual oops
that happens in this case? I can imagine broken hardware or firmware
that causes this as well and we don't really want to oops in that case
either... That's why we have the timeout in the first place, to not hang
there forever.

Nothing against this patch though.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]

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

* Re: [PATCH] bcm43xx: Fix for oops on resume
  2007-02-07 12:15   ` Johannes Berg
@ 2007-02-07 13:23     ` Larry Finger
       [not found]       ` <45C9D2E1.7040906-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Larry Finger @ 2007-02-07 13:23 UTC (permalink / raw)
  To: Johannes Berg
  Cc: John Linville, Michael Buesch, netdev, Bcm43xx-dev,
	linux-wireless

Johannes Berg wrote:
> On Tue, 2007-02-06 at 11:39 -0600, Larry Finger wrote:
>> There is a kernel oops on bcm43xx when resuming due to an overly tight timeout loop.
> 
> Come to think of it... Is there any chance of fixing the actual oops
> that happens in this case? I can imagine broken hardware or firmware
> that causes this as well and we don't really want to oops in that case
> either... That's why we have the timeout in the first place, to not hang
> there forever.
> 
> Nothing against this patch though.

As you suggested earlier, a slow clock setting in the bcm43xx device may be the cause of this
difficulty. If my laptop would suspend/resume correctly, then I could test various fixes based on
that hypothesis. Since it does not, I think the band-aid approach is warranted. A proper fix is
still on my agenda; however, getting full data rates still has priority.

Larry

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

* Re: [PATCH] bcm43xx: Fix for oops on resume
       [not found]       ` <45C9D2E1.7040906-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
@ 2007-02-07 13:32         ` Johannes Berg
       [not found]           ` <1170855150.6798.38.camel-YfaajirXv214zXjbi5bjpg@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Johannes Berg @ 2007-02-07 13:32 UTC (permalink / raw)
  To: Larry Finger
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA, John Linville,
	Michael Buesch, Bcm43xx-dev-0fE9KPoRgkgATYTw5x5z8w


[-- Attachment #1.1: Type: text/plain, Size: 644 bytes --]

On Wed, 2007-02-07 at 07:23 -0600, Larry Finger wrote:

> As you suggested earlier, a slow clock setting in the bcm43xx device may be the cause of this
> difficulty. If my laptop would suspend/resume correctly, then I could test various fixes based on
> that hypothesis. 

Mine does suspend, but I don't see the problem...

> Since it does not, I think the band-aid approach is warranted. 

Oh yes, I agree, having some hardware mess up will almost always crash
the computer anyway.

> A proper fix is
> still on my agenda; however, getting full data rates still has priority.

Sure. Thanks for all you're doing :)

johannes

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]

[-- Attachment #2: Type: text/plain, Size: 179 bytes --]

_______________________________________________
Bcm43xx-dev mailing list
Bcm43xx-dev-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org
https://lists.berlios.de/mailman/listinfo/bcm43xx-dev

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

* Re: [PATCH] bcm43xx: Fix for oops on resume
       [not found]           ` <1170855150.6798.38.camel-YfaajirXv214zXjbi5bjpg@public.gmane.org>
@ 2007-02-07 13:50             ` Larry Finger
       [not found]               ` <45C9D930.5010307-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
  2007-02-07 13:56               ` Johannes Berg
  0 siblings, 2 replies; 7+ messages in thread
From: Larry Finger @ 2007-02-07 13:50 UTC (permalink / raw)
  To: Johannes Berg
  Cc: Michael Buesch, netdev-u79uwXL29TY76Z2rM5mHXA,
	Bcm43xx-dev-0fE9KPoRgkgATYTw5x5z8w,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA

Johannes Berg wrote:
> On Wed, 2007-02-07 at 07:23 -0600, Larry Finger wrote:
> 
>> As you suggested earlier, a slow clock setting in the bcm43xx device may be the cause of this
>> difficulty. If my laptop would suspend/resume correctly, then I could test various fixes based on
>> that hypothesis. 
> 
> Mine does suspend, but I don't see the problem...

Could you please apply this patch and tell me what gets printed after you resume, and whether you
did a suspend to RAM or disk?

I welcome the results of this test from anyone whose system will suspend/resume. Please also note if
any further action is needed to get wireless communication re-established.

Thanks,

Larry


==========

Index: linux-2.6/drivers/net/wireless/bcm43xx/bcm43xx_main.c
===================================================================
--- linux-2.6.orig/drivers/net/wireless/bcm43xx/bcm43xx_main.c
+++ linux-2.6/drivers/net/wireless/bcm43xx/bcm43xx_main.c
@@ -2401,6 +2401,7 @@ static int bcm43xx_chip_init(struct bcm4
 		}
 		udelay(10);
 	}
+	dprintk(KERN_INFO PFX "It took %d tries to set IRQ_READY\n", i);
 	bcm43xx_read32(bcm, BCM43xx_MMIO_GEN_IRQ_REASON); /* dummy read */

 	value16 = bcm43xx_shm_read16(bcm, BCM43xx_SHM_SHARED,

-
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] bcm43xx: Fix for oops on resume
       [not found]               ` <45C9D930.5010307-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
@ 2007-02-07 13:54                 ` Johannes Berg
  0 siblings, 0 replies; 7+ messages in thread
From: Johannes Berg @ 2007-02-07 13:54 UTC (permalink / raw)
  To: Larry Finger
  Cc: Michael Buesch, netdev-u79uwXL29TY76Z2rM5mHXA,
	Bcm43xx-dev-0fE9KPoRgkgATYTw5x5z8w,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 579 bytes --]

On Wed, 2007-02-07 at 07:50 -0600, Larry Finger wrote:

> Could you please apply this patch and tell me what gets printed after you resume, and whether you
> did a suspend to RAM or disk?

Not a bad idea. I can test suspend to ram as well as to disk, just got
both working again.

The kernel I'm running right now was built on my powermac so I can't do
it right away (otherwise I could've just recompiled the bcm43xx module)
but I'll do it later today or tomorrow.

Usually, to get my connection back after a suspend, I just have to set
the ssid again.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]

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

* Re: [PATCH] bcm43xx: Fix for oops on resume
  2007-02-07 13:50             ` Larry Finger
       [not found]               ` <45C9D930.5010307-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
@ 2007-02-07 13:56               ` Johannes Berg
  1 sibling, 0 replies; 7+ messages in thread
From: Johannes Berg @ 2007-02-07 13:56 UTC (permalink / raw)
  To: Larry Finger; +Cc: Michael Buesch, netdev, Bcm43xx-dev, linux-wireless

[-- Attachment #1: Type: text/plain, Size: 317 bytes --]

On Wed, 2007-02-07 at 07:50 -0600, Larry Finger wrote:

> Could you please apply this patch and tell me what gets printed after you resume, and whether you
> did a suspend to RAM or disk?

Oh and if anyone else does this please also let us know what it prints
on a regular freshly booted modprobe.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]

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

end of thread, other threads:[~2007-02-07 13:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-06 17:39 [PATCH] bcm43xx: Fix for oops on resume Larry Finger
     [not found] ` <45c8bd59.oamnvaNRMZvKoPBa%Larry.Finger-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
2007-02-07 12:15   ` Johannes Berg
2007-02-07 13:23     ` Larry Finger
     [not found]       ` <45C9D2E1.7040906-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
2007-02-07 13:32         ` Johannes Berg
     [not found]           ` <1170855150.6798.38.camel-YfaajirXv214zXjbi5bjpg@public.gmane.org>
2007-02-07 13:50             ` Larry Finger
     [not found]               ` <45C9D930.5010307-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
2007-02-07 13:54                 ` Johannes Berg
2007-02-07 13:56               ` Johannes Berg

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