From patchwork Thu Oct 19 00:16:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Larry Finger X-Patchwork-Id: 10015603 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 B89CE60215 for ; Thu, 19 Oct 2017 00:16:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AB6C728E00 for ; Thu, 19 Oct 2017 00:16:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9FD6928E03; Thu, 19 Oct 2017 00:16:48 +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.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID 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 E9E2428E00 for ; Thu, 19 Oct 2017 00:16:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751498AbdJSAQp (ORCPT ); Wed, 18 Oct 2017 20:16:45 -0400 Received: from mail-oi0-f68.google.com ([209.85.218.68]:45339 "EHLO mail-oi0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751077AbdJSAQo (ORCPT ); Wed, 18 Oct 2017 20:16:44 -0400 Received: by mail-oi0-f68.google.com with SMTP id f66so11955517oib.2 for ; Wed, 18 Oct 2017 17:16:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=SwuN4R8ISNkHCgiWTQ9DB/qH8c6WDVxgkoSxvF+NGGo=; b=fRi1Dz8F3BgiaBsIns+/RLlfgnqmHIEwMMYYpCJuGhFk2U+3LcFQ/lKVj6pQGlgvNY VD0zJJ92I0s10FHQn2MlyQVE4RAEHKq3UU0lnrazoKSbs2QeogcZe4by4TbbdtvqPEH9 qGWU7/NnhxXe/Y4J6WeSIRXvmDmSqOdXVXqYxsRLrD0rlS34uhkHZOk02zIAYhcU5bL/ 8PTnHGZYLzbO6p9ZLsVsmL0Ux493g1gUiIqq7iJUgkl3rMhWZWtaJDYV8Yk2dmH4MR8O +kN0v4FlOBRTs6I1caM9hkm1rQCtmSdxRRuPKRksbIhbTvm5nvx4rkcPXrXDOGsS5+nV TF8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=SwuN4R8ISNkHCgiWTQ9DB/qH8c6WDVxgkoSxvF+NGGo=; b=btUPRqOa4zHkQGTq7FcQ1NQygQw3sQZk9YcS7TXrF2J32HDukvKmQ2DHSSYHVUgwI9 5UvKBvKdgfEp5ejgi7RYF/JZvyvAjiHJMRToTbj3SURQSwzJ3VRd7HsaBeTTIL5CsRFU 99ryxRh8KsXxvfHaQ3jTIp++LPW36Nk46QT0GlD5KDVSt67QdOnSH0pCb8muVHoiXeUd t2K7EwtlwvU39nZchUNzEHW1+q65T13XKitiPEtvmh1l+RtL57RxG4l0Ez+B6BtWH6o6 0Yz5iTy7+4QvLgEpDoBP/wexAnwyqLR5UlL8/3731Gb72zyxHZtZZ9OIun9EYck/6acj 1Lkw== X-Gm-Message-State: AMCzsaWokUBHr2bN6I2VNEryIjGf6E5oc7yJ0jLwU0RGeGiYuFXdhokj PBVz+uuINT5p9erIAtQOUt+MqQ== X-Google-Smtp-Source: ABhQp+SkgWZL4Zj5AphTH5HnlY7pzlJZelUYydCpy9+NlPlkhS09Aun60IqZ0ROhkrIca6KPcwmM1Q== X-Received: by 10.157.45.131 with SMTP id g3mr2475460otb.405.1508372203691; Wed, 18 Oct 2017 17:16:43 -0700 (PDT) Received: from linux-4v1g.suse (cpe-24-31-251-255.kc.res.rr.com. [24.31.251.255]) by smtp.gmail.com with ESMTPSA id x3sm4731052otb.58.2017.10.18.17.16.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Oct 2017 17:16:43 -0700 (PDT) Subject: Re: rtlwifi oops To: nirinA , James Cameron , linux-wireless@vger.kernel.org References: <20171018223320.GB641@us.netrek.org> From: Larry Finger Message-ID: Date: Wed, 18 Oct 2017 19:16:42 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US 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 On 10/18/2017 06:18 PM, nirinA wrote: > not really a rtlwifi oops then. maybe issue with udev as that also disabled the > usb mouse. > but i have no problem since. i will report if i will catch it again. > > thanks, > > -- > nirinA > > James Cameron wrote: >> On Thu, Oct 19, 2017 at 01:31:43AM +0300, nirinA wrote: >>> hello there, >>> i got the oops below with a rtl8192cu:0bda:8178 and kernel 4.13.6, but >>> cannot reproduce it. >>> i use this device since 4.3 or so without noticing any issue. >>> >>> nirinA >>> >>> [  239.338040] usb 2-1.3: new high-speed USB device number 4 using ehci-pci >>> [  239.417728] usb 2-1.3: New USB device found, idVendor=0bda, >>> idProduct=8178 >>> [  239.417730] usb 2-1.3: New USB device strings: Mfr=1, Product=2, >>> SerialNumber=3 >>> [  239.417731] usb 2-1.3: Product: 802.11n WLAN Adapter >>> [  239.417732] usb 2-1.3: Manufacturer: Realtek >>> [  239.417733] usb 2-1.3: SerialNumber: 00e04c000001 >>> [  239.578100] rtl8192cu: Chip version 0x11 >>> [  239.678225] usb 2-1-port3: disabled by hub (EMI?), re-enabling... >> Just prior to the oops, your USB hub disabled the port being used by >> the wireless device. >> >> While the response of the driver seems wrong, it is a difficult >> condition to reproduce; one must either force or forge the disabling >> by the hub. >> >>> [  239.678230] usb 2-1.3: USB disconnect, device number 4 >>> [  239.679128] rtl_usb: reg 0x30, usbctrl_vendorreq TimeOut! >>> status:0xffffffed value=0x0 This sequence of events is unusual. A driver should be able to trust that the platform is behaving correctly and normally. In reviewing the USB probe routine, the only thing I could see is that one returned value is not being checked. If the problem happens again, please try the following patch: I will test and push this patch because that value should be checked, but I'm not sure it would correct your problem. Larry diff --git a/drivers/net/wireless/realtek/rtlwifi/usb.c b/drivers/net/wireless/realtek/rtlwifi/usb.c index 5590d07d0918..092cd2da15f6 100644 --- a/drivers/net/wireless/realtek/rtlwifi/usb.c +++ b/drivers/net/wireless/realtek/rtlwifi/usb.c @@ -1082,6 +1082,8 @@ int rtl_usb_probe(struct usb_interface *intf, init_completion(&rtlpriv->firmware_loading_complete); SET_IEEE80211_DEV(hw, &intf->dev); udev = interface_to_usbdev(intf); + if (!udev) + return -ENODEV; usb_get_dev(udev); usb_priv = rtl_usbpriv(hw); memset(usb_priv, 0, sizeof(*usb_priv));