linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] staging: vt6655: Fix Warning on boot handle_irq_event_percpu.
@ 2014-07-23 20:35 Malcolm Priestley
  2014-07-23 20:35 ` [PATCH 2/2] staging: vt6655: Fix disassociated messages every 10 seconds Malcolm Priestley
  2014-07-23 23:12 ` [PATCH 1/2] staging: vt6655: Fix Warning on boot handle_irq_event_percpu Greg KH
  0 siblings, 2 replies; 4+ messages in thread
From: Malcolm Priestley @ 2014-07-23 20:35 UTC (permalink / raw)
  To: gregkh; +Cc: linux-wireless, Malcolm Priestley, stable

WARNING: CPU: 0 PID: 929 at /home/apw/COD/linux/kernel/irq/handle.c:147 handle_irq_event_percpu+0x1d1/0x1e0()
irq 17 handler device_intr+0x0/0xa80 [vt6655_stage] enabled interrupts

Using spin_lock_irqsave appears to fix this.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Cc: <stable@vger.kernel.org>

---
 drivers/staging/vt6655/device_main.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c
index 5eeb19e..a0863ca 100644
--- a/drivers/staging/vt6655/device_main.c
+++ b/drivers/staging/vt6655/device_main.c
@@ -2322,6 +2322,7 @@ static  irqreturn_t  device_intr(int irq,  void *dev_instance) {
 	int             handled = 0;
 	unsigned char byData = 0;
 	int             ii = 0;
+	unsigned long flags;
 
 	MACvReadISR(pDevice->PortOffset, &pDevice->dwIsr);
 
@@ -2335,7 +2336,8 @@ static  irqreturn_t  device_intr(int irq,  void *dev_instance) {
 
 	handled = 1;
 	MACvIntDisable(pDevice->PortOffset);
-	spin_lock_irq(&pDevice->lock);
+
+	spin_lock_irqsave(&pDevice->lock, flags);
 
 	//Make sure current page is 0
 	VNSvInPortB(pDevice->PortOffset + MAC_REG_PAGE1SEL, &byOrgPageSel);
@@ -2564,7 +2566,8 @@ static  irqreturn_t  device_intr(int irq,  void *dev_instance) {
 	if (byOrgPageSel == 1)
 		MACvSelectPage1(pDevice->PortOffset);
 
-	spin_unlock_irq(&pDevice->lock);
+	spin_unlock_irqrestore(&pDevice->lock, flags);
+
 	MACvIntEnable(pDevice->PortOffset, IMR_MASK_VALUE);
 
 	return IRQ_RETVAL(handled);
-- 
1.9.1


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

* [PATCH 2/2] staging: vt6655: Fix disassociated messages every 10 seconds
  2014-07-23 20:35 [PATCH 1/2] staging: vt6655: Fix Warning on boot handle_irq_event_percpu Malcolm Priestley
@ 2014-07-23 20:35 ` Malcolm Priestley
  2014-07-23 23:12 ` [PATCH 1/2] staging: vt6655: Fix Warning on boot handle_irq_event_percpu Greg KH
  1 sibling, 0 replies; 4+ messages in thread
From: Malcolm Priestley @ 2014-07-23 20:35 UTC (permalink / raw)
  To: gregkh; +Cc: linux-wireless, Malcolm Priestley, stable

byReAssocCount is incremented every second resulting in
disassociated message being send every 10 seconds whether
connection or not.

byReAssocCount should only advance while eCommandState
is in WLAN_ASSOCIATE_WAIT

Change existing scope to if condition.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Cc: <stable@vger.kernel.org>
---
 drivers/staging/vt6655/bssdb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/vt6655/bssdb.c b/drivers/staging/vt6655/bssdb.c
index eb3474d..1bd7a5a 100644
--- a/drivers/staging/vt6655/bssdb.c
+++ b/drivers/staging/vt6655/bssdb.c
@@ -981,7 +981,7 @@ start:
 		pDevice->byERPFlag &= ~(WLAN_SET_ERP_USE_PROTECTION(1));
 	}
 
-	{
+	if (pDevice->eCommandState == WLAN_ASSOCIATE_WAIT) {
 		pDevice->byReAssocCount++;
 		/* 10 sec timeout */
 		if ((pDevice->byReAssocCount > 10) && (!pDevice->bLinkPass)) {
-- 
1.9.1


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

* Re: [PATCH 1/2] staging: vt6655: Fix Warning on boot handle_irq_event_percpu.
  2014-07-23 20:35 [PATCH 1/2] staging: vt6655: Fix Warning on boot handle_irq_event_percpu Malcolm Priestley
  2014-07-23 20:35 ` [PATCH 2/2] staging: vt6655: Fix disassociated messages every 10 seconds Malcolm Priestley
@ 2014-07-23 23:12 ` Greg KH
  2014-07-24 14:55   ` Malcolm Priestley
  1 sibling, 1 reply; 4+ messages in thread
From: Greg KH @ 2014-07-23 23:12 UTC (permalink / raw)
  To: Malcolm Priestley; +Cc: linux-wireless, stable

On Wed, Jul 23, 2014 at 09:35:11PM +0100, Malcolm Priestley wrote:
> WARNING: CPU: 0 PID: 929 at /home/apw/COD/linux/kernel/irq/handle.c:147 handle_irq_event_percpu+0x1d1/0x1e0()
> irq 17 handler device_intr+0x0/0xa80 [vt6655_stage] enabled interrupts
> 
> Using spin_lock_irqsave appears to fix this.
> 
> Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
> Cc: <stable@vger.kernel.org>

So should both of these go into the 3.16-final kernel release?

thanks,

greg k-h

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

* Re: [PATCH 1/2] staging: vt6655: Fix Warning on boot handle_irq_event_percpu.
  2014-07-23 23:12 ` [PATCH 1/2] staging: vt6655: Fix Warning on boot handle_irq_event_percpu Greg KH
@ 2014-07-24 14:55   ` Malcolm Priestley
  0 siblings, 0 replies; 4+ messages in thread
From: Malcolm Priestley @ 2014-07-24 14:55 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-wireless, stable



On 24/07/14 00:12, Greg KH wrote:
> On Wed, Jul 23, 2014 at 09:35:11PM +0100, Malcolm Priestley wrote:
>> WARNING: CPU: 0 PID: 929 at /home/apw/COD/linux/kernel/irq/handle.c:147 handle_irq_event_percpu+0x1d1/0x1e0()
>> irq 17 handler device_intr+0x0/0xa80 [vt6655_stage] enabled interrupts
>>
>> Using spin_lock_irqsave appears to fix this.
>>
>> Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
>> Cc: <stable@vger.kernel.org>
>
> So should both of these go into the 3.16-final kernel release?

Yes, the driver is very unstable without these patches

Regards

Malcolm

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

end of thread, other threads:[~2014-07-24 14:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-23 20:35 [PATCH 1/2] staging: vt6655: Fix Warning on boot handle_irq_event_percpu Malcolm Priestley
2014-07-23 20:35 ` [PATCH 2/2] staging: vt6655: Fix disassociated messages every 10 seconds Malcolm Priestley
2014-07-23 23:12 ` [PATCH 1/2] staging: vt6655: Fix Warning on boot handle_irq_event_percpu Greg KH
2014-07-24 14:55   ` Malcolm Priestley

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