Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp17447pxx; Wed, 28 Oct 2020 16:44:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJylACW9RqaAuRn35sMzqy3y9G64PH7Z0LjPbY+MoxQdk+FtfQRIoyGdAUrlfdB8xYtPLQVm X-Received: by 2002:aa7:c054:: with SMTP id k20mr1421322edo.224.1603928648471; Wed, 28 Oct 2020 16:44:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603928648; cv=none; d=google.com; s=arc-20160816; b=bu/tmvGMKAmRYH7PWxzfNgTngOZB9V3t7hYMv0NRyAZH1OT0H1KO2r8Vo40Ll+vvIV tMtQPaSVhNWMEA6EVMyfLn0/6Rj4wsho9JQ16D8mpJ5MLDfPreZwp3a7LgyqFcp0++jR MFGmmzxr6rqzWab5gIDY1Fuap3mavTU6O53TlqmJsnCXj7zOlKOGkuq3w6y+G3j/9E0f vj7nkeAbojmW5AKK9Hhxxk1RpNndMPg+lOtjO8LtUWFW2a+H90hRhB0HzxHBeif76b/C EVOhJhZe64dpFarYZJ7nNgt/xiOWNoHokjSFmEOBwuQKyWirat+K4kj7E77xd/J7fOXa R2eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=9z7nf3iE3DVZP0WPzpkB3Zwoy/sQUmA3X8ME/pi67sI=; b=0wS9mFW8ukREZgEZ67UWnth8t4XJFHLSDuyOIu27/G+0DiySGHZxWy+x6uR+KEPu2b TNf7xjEfiTHr8QhxydHjJBrDhwxpdQqIDpKFeoeVnIDAIEM7wIpmckAdSQvRhcFc1c8c dLeZ1qe+owKoWcpEDJtsfThZ1Wx1kr9k1GeL6l+lEOKGA9vjSFON3vlZxEerjSTUKp6x g5/iibVGjDVxlV52PiwUBEkylh/O2RBgNflw9iVrUFKfrG9FV7gpPk1XxxLnE3KTGDY1 +Wa70ms8h4DnhJmnlXSE8io3GJGe9t4yTPRF00W41We0Gd2g5XKMBfFBFNEMfBTnVLl9 vdLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ppteg6JK; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h4si754276eds.217.2020.10.28.16.43.40; Wed, 28 Oct 2020 16:44:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ppteg6JK; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389657AbgJ1Wwv (ORCPT + 99 others); Wed, 28 Oct 2020 18:52:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389661AbgJ1WwT (ORCPT ); Wed, 28 Oct 2020 18:52:19 -0400 Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3CDAC0613CF; Wed, 28 Oct 2020 15:52:18 -0700 (PDT) Received: by mail-pf1-x444.google.com with SMTP id b3so704591pfo.2; Wed, 28 Oct 2020 15:52:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=9z7nf3iE3DVZP0WPzpkB3Zwoy/sQUmA3X8ME/pi67sI=; b=ppteg6JKr0pjKgONQssRt0HAQWyJw2bu7oSNHpWMOkZsh7dEmlcSlq19UAnf/sq7N+ coLyCYQVlq4MVyevXYh1VeiOGTphkrORLJJLCBiUOQ7ph0L9wfZ7B+l+89XFA/P2ZfZ5 huvtLBO7e6JjrfZIJwcd3hxaGDAz5Y3f6NTiql0JGAkLpwlVPDA6dPJPcwXSrxPK6C/h urg3GXTkvUiPRO03ZlQnLFzciQONMjZ+wFbn2izXzP2X3Wp4CKBztotkScO9L5iIR6vm lEAXaMAyhSSgqeeQHg2sSjX8BAXA3ugqUTLl4HjAtngdUDktCeHXSNWiKoEjVlZ+lLAA /IbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=9z7nf3iE3DVZP0WPzpkB3Zwoy/sQUmA3X8ME/pi67sI=; b=IUsyP5d21rpPv2Dilw3YMrIulQ01RvAw7VYhwslqDbattOpv3VLlEKgui3/5yqV0aS WvJ4h9eKx8DK24sNXs7fh1eXcNSjlOs1dkl3dNfg2SqY+TctJT5fIpKQInLokPy2/U5y tQJOc09idQwP17Y28cbzod7XShJxPrJhwKDHrV5CR3hA3mCNLn6Abh6Ox80soejWHZPW +gPiqQFKUzzghmwaQ5EnC38psBvIcec/DUU/Z5mGgZKqNvOV2QSutuU35GJE63dBSjM+ ZciK7aGsmfrNlaLyOT52ZzEznK5DGZ1+92MZD7j+iNKk66Ti4f+UXfsOY08jNIzIFekb JjjA== X-Gm-Message-State: AOAM533YS2aKCBdyG+SO68huYmvcgAI7+LxyQfImffbRQSyBJyNtC5mW kfnPdezsOOxGVKyXmw/64d5z+gveCMVme/iZ X-Received: by 2002:a63:6647:: with SMTP id a68mr6577284pgc.7.1603895298860; Wed, 28 Oct 2020 07:28:18 -0700 (PDT) Received: from k5-sbwpb.flets-east.jp (i60-35-254-237.s41.a020.ap.plala.or.jp. [60.35.254.237]) by smtp.gmail.com with ESMTPSA id g67sm6581754pfb.9.2020.10.28.07.28.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Oct 2020 07:28:18 -0700 (PDT) From: Tsuchiya Yuto To: Amitkumar Karwar , Ganapathi Bhat , Xinming Hu , Kalle Valo , "David S. Miller" , Jakub Kicinski Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Maximilian Luz , Andy Shevchenko , verdre@v0yd.nl, Tsuchiya Yuto Subject: [RFC PATCH 0/3] mwifiex: add fw reset quirks for Microsoft Surface Date: Wed, 28 Oct 2020 23:27:50 +0900 Message-Id: <20201028142753.18855-1-kitakar@gmail.com> X-Mailer: git-send-email 2.29.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Hello all, This series adds firmware reset quirks for Microsoft Surface devices (PCIe-88W8897). Surface devices somehow requires quirks to reset the firmware. Otherwise, current mwifiex driver can reset only software level. This is not enough to recover from a bad state. To do so, in the first patch, I added a DMI-based quirk implementation for Surface devices that use mwifiex chip. The required quirk is different by generation. Surface gen3 devices (Surface 3 and Surface Pro 3) require a quirk that calls _DSM method (the third patch). Note that Surface Pro 3 is not yet supported because of the difference between Surface 3. On Surface 3, the wifi card will be immediately removed/reprobed after the _DSM call. On the other hand, Surface Pro 3 doesn't. Need to remove/reprobe wifi card ourselves. This behavior makes the support difficult. Surface gen4+ devices (Surface Pro 4 and later) require a quirk that puts wifi into D3cold before FLR. While here, created new files for quirks (mwifiex/pcie_quirks.c and mwifiex/pcie_quirks.h) because the changes are a little bit too big to add into pcie.c. Thanks, Tsuchiya Yuto Tsuchiya Yuto (3): mwifiex: pcie: add DMI-based quirk impl for Surface devices mwifiex: pcie: add reset_d3cold quirk for Surface gen4+ devices mwifiex: pcie: add reset_wsid quirk for Surface 3 drivers/net/wireless/marvell/mwifiex/Makefile | 1 + drivers/net/wireless/marvell/mwifiex/pcie.c | 21 ++ drivers/net/wireless/marvell/mwifiex/pcie.h | 2 + .../wireless/marvell/mwifiex/pcie_quirks.c | 246 ++++++++++++++++++ .../wireless/marvell/mwifiex/pcie_quirks.h | 17 ++ 5 files changed, 287 insertions(+) create mode 100644 drivers/net/wireless/marvell/mwifiex/pcie_quirks.c create mode 100644 drivers/net/wireless/marvell/mwifiex/pcie_quirks.h -- 2.29.1