From patchwork Wed Feb 22 09:54:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hilberg X-Patchwork-Id: 9586509 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 41198600CA for ; Wed, 22 Feb 2017 09:54:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0952B288AD for ; Wed, 22 Feb 2017 09:54:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F1D7E288EA; Wed, 22 Feb 2017 09:54:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B527A288AD for ; Wed, 22 Feb 2017 09:54:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754396AbdBVJyl (ORCPT ); Wed, 22 Feb 2017 04:54:41 -0500 Received: from mail.kernelconcepts.de ([188.40.83.200]:49640 "EHLO mail.kernelconcepts.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751347AbdBVJyi (ORCPT ); Wed, 22 Feb 2017 04:54:38 -0500 Received: from [93.227.204.184] (helo=vbox.localnet) by mail.kernelconcepts.de with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cgTdQ-0001kf-NH for linux-wireless@vger.kernel.org; Wed, 22 Feb 2017 10:54:56 +0100 From: Christian Hilberg To: linux-wireless@vger.kernel.org Subject: Re: [rtl8xxxu] rtl8192cu (0bda:8176) on linux-4.9.11 (arm) high sirq rate Date: Wed, 22 Feb 2017 10:54:26 +0100 Message-ID: <1911802.4OUzV9TSOC@vbox> Organization: kernel concepts User-Agent: KMail/5.2.3 (Linux/4.9.0-1-amd64; KDE/5.28.0; x86_64; ; ) In-Reply-To: <1581189.s4o7FEpKoz@vbox> References: <1581189.s4o7FEpKoz@vbox> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi again, Am Montag, 20. Februar 2017, 14:51:54 CET schrieb Christian Hilberg: > Hi all, > > currently I'm testing rtl8xxxu on an ARM device (i.mx28, armv5te) under > linux-4.9.11 with a RealTek 8192cu (0bda:8176) wifi dongle. Since > I had to set CONFIG_RTL8XXXU_UNTESTED, I'm prepared to see some > rough edges here and there. :-) The rtl8xxxu driver identifies the device as "8188CU", and so does lsusb. > The driver actually works and I'm getting a stable connection on > a WPA2 secured wifi network. As a firmware blob, the driver loads > the "rtl8192cufw_TMSC.bin", which I extracted from [0]. > > However, the sirg rate is rather high (between 20% to 50% in top), > as soon as the device is getting upped, that is, as soon as IFF_UP > gets written to the device via ioctl(). I've dug further into this. It shows that if in the driver's rtl8xxxu_identify_chip() routine for the RTL8188C variant I set priv->usb_interrupts = 0, then the sirq load vanishes and the driver apparently still works: ---8<--- ---8<--- Seems to me that rtl8xxxu_int_complete() does nothing with the URB data but to re-submit it (just to satisfy hardware which wants its interrupts to be handled maybe?). I'm not at all clear whether the above change would be the Right Thing to do. Jes, do you have any thoughts on this? Are there 8188CU variants which need interrupts to be handled? Regards, Christian > [0] > http://ftp.de.debian.org/debian/pool/non-free/f/firmware-nonfree/firmware-r > ealtek_20161130-2_all.deb diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c b/drivers/ net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c index 82d949ede294..2daacfd059b8 100644 --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c @@ -1687,7 +1687,7 @@ static int rtl8xxxu_identify_chip(struct rtl8xxxu_priv *priv) priv->rx_paths = 1; priv->tx_paths = 1; priv->rtl_chip = RTL8188C; - priv->usb_interrupts = 1; + priv->usb_interrupts = 0; priv->has_wifi = 1; }