This is a note to let you know that I've just added the patch titled
staging: vt6656: 64bit fixes: vCommandTimerWait change calculation of timer.
to the 3.0-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
staging-vt6656-64bit-fixes-vcommandtimerwait-change-calculation-of-timer.patch
and it can be found in the queue-3.0 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 70e227790d4ee4590023d8041a3485f8053593fc Mon Sep 17 00:00:00 2001
From: Malcolm Priestley <[email protected]>
Date: Sun, 11 Nov 2012 16:07:57 +0000
Subject: staging: vt6656: 64bit fixes: vCommandTimerWait change calculation of
timer.
From: Malcolm Priestley <[email protected]>
commit 70e227790d4ee4590023d8041a3485f8053593fc upstream.
The timer appears to run too fast/race on 64 bit systems.
Using msecs_to_jiffies seems to cause a deadlock on 64 bit.
A calculation of (MSecond * HZ) / 1000 appears to run satisfactory.
Change BSSIDInfoCount to u32.
After this patch the driver can be successfully connect on little endian 64/32
bit systems.
Signed-off-by: Malcolm Priestley <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/staging/vt6656/wcmd.c | 20 +++++++++++---------
drivers/staging/vt6656/wpa2.h | 4 ++--
2 files changed, 13 insertions(+), 11 deletions(-)
--- a/drivers/staging/vt6656/wcmd.c
+++ b/drivers/staging/vt6656/wcmd.c
@@ -316,17 +316,19 @@ s_MgrMakeProbeRequest(
return pTxPacket;
}
-void vCommandTimerWait(void *hDeviceContext, unsigned int MSecond)
+void vCommandTimerWait(void *hDeviceContext, unsigned long MSecond)
{
- PSDevice pDevice = (PSDevice)hDeviceContext;
+ PSDevice pDevice = (PSDevice)hDeviceContext;
- init_timer(&pDevice->sTimerCommand);
- pDevice->sTimerCommand.data = (unsigned long)pDevice;
- pDevice->sTimerCommand.function = (TimerFunction)vRunCommand;
- // RUN_AT :1 msec ~= (HZ/1024)
- pDevice->sTimerCommand.expires = (unsigned int)RUN_AT((MSecond * HZ) >>
10);
- add_timer(&pDevice->sTimerCommand);
- return;
+ init_timer(&pDevice->sTimerCommand);
+
+ pDevice->sTimerCommand.data = (unsigned long)pDevice;
+ pDevice->sTimerCommand.function = (TimerFunction)vRunCommand;
+ pDevice->sTimerCommand.expires = RUN_AT((MSecond * HZ) / 1000);
+
+ add_timer(&pDevice->sTimerCommand);
+
+ return;
}
void vRunCommand(void *hDeviceContext)
--- a/drivers/staging/vt6656/wpa2.h
+++ b/drivers/staging/vt6656/wpa2.h
@@ -45,8 +45,8 @@ typedef struct tagsPMKIDInfo {
} PMKIDInfo, *PPMKIDInfo;
typedef struct tagSPMKIDCache {
- unsigned long BSSIDInfoCount;
- PMKIDInfo BSSIDInfo[MAX_PMKID_CACHE];
+ u32 BSSIDInfoCount;
+ PMKIDInfo BSSIDInfo[MAX_PMKID_CACHE];
} SPMKIDCache, *PSPMKIDCache;
Patches currently in stable-queue which might be from [email protected] are
queue-3.0/staging-vt6656-64bit-fixes-vcommandtimerwait-change-calculation-of-timer.patch
queue-3.0/staging-vt6656-out-of-bound-array-reference-in-rfbsetpower.patch
queue-3.0/staging-vt6656-64-bit-fixes-correct-all-type-sizes.patch
queue-3.0/staging-vt6656-64bit-fixes-key.c-h-change-unsigned-long-to-u32.patch
queue-3.0/staging-vt6656-64-bit-fixes-fix-long-warning-messages.patch
queue-3.0/staging-vt6656-64-bit-fixes-use-u32-for-qword-definition.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html