From patchwork Tue Jan 20 17:01:23 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Larry Finger X-Patchwork-Id: 5671131 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 164CBC058D for ; Tue, 20 Jan 2015 17:01:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4469F203C1 for ; Tue, 20 Jan 2015 17:01:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 75E462024F for ; Tue, 20 Jan 2015 17:01:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755475AbbATRBt (ORCPT ); Tue, 20 Jan 2015 12:01:49 -0500 Received: from mail-ob0-f174.google.com ([209.85.214.174]:45054 "EHLO mail-ob0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755385AbbATRBq (ORCPT ); Tue, 20 Jan 2015 12:01:46 -0500 Received: by mail-ob0-f174.google.com with SMTP id wo20so25281042obc.5; Tue, 20 Jan 2015 09:01:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=O64w6T2kfA3kMO6lKZRnrPC6kiyY2XYryViuSSbr8QI=; b=xoaQbatfBj1GkDs8MzPP4M71W6ZkPnLxm2TBhgWs1GIXwAG+/iUF2GotHesQmX28X9 VdRjW0bwmTcAc/cOzISI77qmbPfkQqGEv1HSOsiv/L3anUIoE+cYyd5MmPUF1oNHXawd y5TEw1WVf0+fs4xyJ6oNT66VRDdlhj+Rf6L6DvHCcH9snLBAT4U3HkkVKJa7Ag4t4J0Q 068e2JFltt33LUrS10V5+7YYGqYl0uOclQ7/5KueTo7AWfM0FGpFYwmNkPW7yNSVuL5g 9k+MoMUW36ku92aIvCz6AhfMewr+N297CUrnnQCgN4bfV2h8KMBCdHNn9GL/MAA720GV aA5Q== X-Received: by 10.202.201.214 with SMTP id z205mr7202973oif.32.1421773305594; Tue, 20 Jan 2015 09:01:45 -0800 (PST) Received: from linux.site ([69.76.245.152]) by mx.google.com with ESMTPSA id ox19sm7495599oeb.17.2015.01.20.09.01.44 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 20 Jan 2015 09:01:45 -0800 (PST) From: Larry Finger To: kvalo@codeaurora.org Cc: linux-wireless@vger.kernel.org, Troy Tan , netdev@vger.kernel.org, Larry Finger , Stable Subject: [PATCH V2 for 3.19 4/7] rtlwifi: rtl8192ee: Fix TX hang due to failure to update TX write point Date: Tue, 20 Jan 2015 11:01:23 -0600 Message-Id: <1421773286-1039-5-git-send-email-Larry.Finger@lwfinger.net> X-Mailer: git-send-email 2.1.2 In-Reply-To: <1421773286-1039-1-git-send-email-Larry.Finger@lwfinger.net> References: <1421773286-1039-1-git-send-email-Larry.Finger@lwfinger.net> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Troy Tan Initially, the routine to update the write point in the FIFO buffer was coded to save CPU time by not doing the calculation every interrupt. This was an error and results in TX hangs. Signed-off-by: Troy Tan Signed-off-by: Larry Finger Cc: Stable [V3.18] --- drivers/net/wireless/rtlwifi/rtl8192ee/trx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/wireless/rtlwifi/rtl8192ee/trx.c b/drivers/net/wireless/rtlwifi/rtl8192ee/trx.c index 0a006c4..1535680 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192ee/trx.c +++ b/drivers/net/wireless/rtlwifi/rtl8192ee/trx.c @@ -1049,8 +1049,7 @@ bool rtl92ee_is_tx_desc_closed(struct ieee80211_hw *hw, u8 hw_queue, u16 index) static u8 stop_report_cnt; struct rtl8192_tx_ring *ring = &rtlpci->tx_ring[hw_queue]; - /*checking Read/Write Point each interrupt wastes CPU */ - if (stop_report_cnt > 15 || !rtlpriv->link_info.busytraffic) { + { u16 point_diff = 0; u16 cur_tx_rp, cur_tx_wp; u32 tmpu32 = 0;