From patchwork Thu May 30 20:34:47 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Mostafa X-Patchwork-Id: 247719 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 173BE2C00A7 for ; Fri, 31 May 2013 06:35:59 +1000 (EST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1Ui9Zf-0003Ns-L2; Thu, 30 May 2013 20:35:51 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1Ui9Yg-0002qp-BX for kernel-team@lists.ubuntu.com; Thu, 30 May 2013 20:34:50 +0000 Received: from c-67-160-231-42.hsd1.ca.comcast.net ([67.160.231.42] helo=fourier) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1Ui9Yg-0002hS-5Q; Thu, 30 May 2013 20:34:50 +0000 Received: from kamal by fourier with local (Exim 4.80) (envelope-from ) id 1Ui9Ye-00032A-0O; Thu, 30 May 2013 13:34:48 -0700 From: Kamal Mostafa To: Malcolm Priestley Subject: [ 3.8.y.z extended stable ] Patch "staging: vt6656: [bug] Fix missing spin lock in iwctl_siwpower." has been added to staging queue Date: Thu, 30 May 2013 13:34:47 -0700 Message-Id: <1369946087-11627-1-git-send-email-kamal@canonical.com> X-Mailer: git-send-email 1.8.1.2 X-Extended-Stable: 3.8 Cc: Greg Kroah-Hartman , Kamal Mostafa , kernel-team@lists.ubuntu.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: kernel-team-bounces@lists.ubuntu.com This is a note to let you know that I have just added a patch titled staging: vt6656: [bug] Fix missing spin lock in iwctl_siwpower. to the linux-3.8.y-queue branch of the 3.8.y.z extended stable tree which can be found at: http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.8.y-queue This patch is scheduled to be released in version 3.8.13.2. If you, or anyone else, feels it should not be added to this tree, please reply to this email. For more information about the 3.8.y.z tree, see https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable Thanks. -Kamal ------ From b2001085dcfefa4d0403425e1deaa10d77de1201 Mon Sep 17 00:00:00 2001 From: Malcolm Priestley Date: Wed, 15 May 2013 01:44:25 +0100 Subject: staging: vt6656: [bug] Fix missing spin lock in iwctl_siwpower. commit 91ec61f8f01cf32868e2ed2fa96a299e77964055 upstream. Fixes occasional dead lock on power up / down. spin_lock_irq is used because of unlocking with spin_unlock_irq elsewhere in the driver. Only relevant to kernels 3.8 and later when command was transferred to the iw_handler. Signed-off-by: Malcolm Priestley Signed-off-by: Greg Kroah-Hartman Signed-off-by: Kamal Mostafa --- drivers/staging/vt6656/iwctl.c | 6 ++++++ 1 file changed, 6 insertions(+) -- 1.8.1.2 diff --git a/drivers/staging/vt6656/iwctl.c b/drivers/staging/vt6656/iwctl.c index 52fce69..9f2f1be 100644 --- a/drivers/staging/vt6656/iwctl.c +++ b/drivers/staging/vt6656/iwctl.c @@ -1348,9 +1348,12 @@ int iwctl_siwpower(struct net_device *dev, struct iw_request_info *info, return rc; } + spin_lock_irq(&pDevice->lock); + if (wrq->disabled) { pDevice->ePSMode = WMAC_POWER_CAM; PSvDisablePowerSaving(pDevice); + spin_unlock_irq(&pDevice->lock); return rc; } if ((wrq->flags & IW_POWER_TYPE) == IW_POWER_TIMEOUT) { @@ -1361,6 +1364,9 @@ int iwctl_siwpower(struct net_device *dev, struct iw_request_info *info, pDevice->ePSMode = WMAC_POWER_FAST; PSvEnablePowerSaving((void *)pDevice, pMgmt->wListenInterval); } + + spin_unlock_irq(&pDevice->lock); + switch (wrq->flags & IW_POWER_MODE) { case IW_POWER_UNICAST_R: DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWPOWER: IW_POWER_UNICAST_R \n");