Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1021470ybe; Wed, 4 Sep 2019 11:15:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqzW7wfCnrfZzEkVeh9yK1or+tsqpixGTL0RAcciMHp0JW6nz74NpjZ95CFCqbBxKbv9LeQC X-Received: by 2002:a17:902:8a81:: with SMTP id p1mr40896904plo.71.1567620953466; Wed, 04 Sep 2019 11:15:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567620953; cv=none; d=google.com; s=arc-20160816; b=UaWdbUOFWLDQQItnSsoWE+jQebcuM9RVIXNz4OYm6ld82C3NCEO4e/mIOp5is2qEza L231YIuTu+LpKIzKAea+qfj1gP56HZuF49hHTVL+UVachPcsljuh2PdHoe1bUsOQ+rJG sTstyllHBOQiT7H+05b+rKhC6YLgimk35hg79h+ADlYygiGmrJCwLt1l4oggyT3pm2xF 40cuw/KVWrczqRjxGCkh15NEtxzZK3Tu7Emr4CENhKOjXnyX/t3s/r7UJjGras5L2zZl nwsIZFb1O5ymzRhAc4jRL9Q86cg716eOQD6uWEYFlmJFMFWH1KivdEYevQS0R24SxAd6 M0bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=fQMDZGWw1MthK7YZk+5PfoivgFACB/0KZYVpOeqtb4Y=; b=wX8y32sm0Ci4GzrD8XwGIh2Oi875qyQGZsgkVxM7yPsCfYhQSIaqjUMlf1ZaIkVA99 e6O9xYaswOPBFvUzql/0fqSsmI1PMCgua/dfvEhyD2LroCDmfZjdg07J8ykL6rSJyxDj Gep0nvd+MyCb+5+KJ3y5V0uDrdY8DOyemFTYn/FR7mfxQUoMvfj+JZDOfUf8cPNQna7e SFtqd7wxH362R1kc2PS0r02UUsCu9wAp63dtVGYXFJhHEQLckZejJ668DJG/yuBK3qth 3SMeQJxGa1Ij2H23ELzv6WeF+RLWVqBoHi8kEfzbn0yugSM0gOqk7lsVCZSLtkl7G8YR fb+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="PUaG/yb+"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g2si17845028plt.26.2019.09.04.11.15.38; Wed, 04 Sep 2019 11:15:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="PUaG/yb+"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390757AbfIDSOS (ORCPT + 99 others); Wed, 4 Sep 2019 14:14:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:59384 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390752AbfIDSOP (ORCPT ); Wed, 4 Sep 2019 14:14:15 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 33793206BA; Wed, 4 Sep 2019 18:14:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567620854; bh=sFWfSdZjLyw3QtnBRJOz2vd4Sd60c1HBghFT87T7+/A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PUaG/yb+LCSFFmCywJ/B59E88irXVRnqcLusKi7iAjWLEBbO3qthLPSkYHBF0wuX7 LtmjBlftlh1z7e25pU5xi7fO/hW/ikhiQSFGdLj8aDpA9LrEh0ebV4sh6PQ23YFqgo i7hKxi0V5vJBKd0yy+BvcmmWrjOgS0upDSS3HjcM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stanislaw Gruszka , Kalle Valo Subject: [PATCH 5.2 120/143] mt76: mt76x0u: do not reset radio on resume Date: Wed, 4 Sep 2019 19:54:23 +0200 Message-Id: <20190904175319.092622870@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190904175314.206239922@linuxfoundation.org> References: <20190904175314.206239922@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Stanislaw Gruszka commit 8f2d163cb26da87e7d8e1677368b8ba1ba4d30b3 upstream. On some machines mt76x0u firmware can hung during resume, what result on messages like below: [ 475.480062] mt76x0 1-8:1.0: Error: MCU response pre-completed! [ 475.990066] mt76x0 1-8:1.0: Error: send MCU cmd failed:-110 [ 475.990075] mt76x0 1-8:1.0: Error: MCU response pre-completed! [ 476.500003] mt76x0 1-8:1.0: Error: send MCU cmd failed:-110 [ 476.500012] mt76x0 1-8:1.0: Error: MCU response pre-completed! [ 477.010046] mt76x0 1-8:1.0: Error: send MCU cmd failed:-110 [ 477.010055] mt76x0 1-8:1.0: Error: MCU response pre-completed! [ 477.529997] mt76x0 1-8:1.0: Error: send MCU cmd failed:-110 [ 477.530006] mt76x0 1-8:1.0: Error: MCU response pre-completed! [ 477.824907] mt76x0 1-8:1.0: Error: send MCU cmd failed:-71 [ 477.824916] mt76x0 1-8:1.0: Error: MCU response pre-completed! [ 477.825029] usb 1-8: USB disconnect, device number 6 and possible whole system freeze. This can be avoided, if we do not perform mt76x0_chip_onoff() reset. Cc: stable@vger.kernel.org Fixes: 134b2d0d1fcf ("mt76x0: init files") Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo Signed-off-by: Greg Kroah-Hartman --- drivers/net/wireless/mediatek/mt76/mt76x0/usb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --- a/drivers/net/wireless/mediatek/mt76/mt76x0/usb.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x0/usb.c @@ -136,11 +136,11 @@ static const struct ieee80211_ops mt76x0 .release_buffered_frames = mt76_release_buffered_frames, }; -static int mt76x0u_init_hardware(struct mt76x02_dev *dev) +static int mt76x0u_init_hardware(struct mt76x02_dev *dev, bool reset) { int err; - mt76x0_chip_onoff(dev, true, true); + mt76x0_chip_onoff(dev, true, reset); if (!mt76x02_wait_for_mac(&dev->mt76)) return -ETIMEDOUT; @@ -173,7 +173,7 @@ static int mt76x0u_register_device(struc if (err < 0) goto out_err; - err = mt76x0u_init_hardware(dev); + err = mt76x0u_init_hardware(dev, true); if (err < 0) goto out_err; @@ -309,7 +309,7 @@ static int __maybe_unused mt76x0_resume( if (ret < 0) goto err; - ret = mt76x0u_init_hardware(dev); + ret = mt76x0u_init_hardware(dev, false); if (ret) goto err;