Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp920803rdh; Fri, 24 Nov 2023 00:47:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IG0JjosXyBqmve8zX5I+jM/RbbX3auyKHdQWs4TQl8K45T91nsR4Zt8SSuCV8LGsCbFSLge X-Received: by 2002:a05:6808:221d:b0:3a7:7bea:d3cc with SMTP id bd29-20020a056808221d00b003a77bead3ccmr2414677oib.0.1700815665732; Fri, 24 Nov 2023 00:47:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700815665; cv=none; d=google.com; s=arc-20160816; b=ef0Fd+g4WBIBZ1uAtKbRoPtBkBJTWBS5mdhimF/u6LQXuVSCVh/ieIuSulx+PdXWsQ i2qUYG4ztC11SRHgGHeVpatSpb3kbEK7I6N2A0C4HP2Cr5E2x7aP796UyjnFtmdmxVIA 1dd5xediY2D95eA5/Sws/j5YacTEFgDnkJ/qrZpXkc5d9x78rpR+9gF7/mTf6H8pDNSK Yp6uMTA85+BSbiKcavoT0MzFVUsKjAeTjMVxWAhp7sFXxcd9EJ6Ia9zkj8nkzKrmOCtu HhdxWvTWZm8Ct4n+MrkCtxVVcNzBer30m59sta6eFMfex4YZ2qKPRmVb3JpjkRaAcPUz WWCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=f00/IH/VK7IpbRggj3+g+oz5Z8IIfo45MpVHhdcqIy4=; fh=B/k0++mWcjyPz7txdddjxvHs1aI3dC/UFQWBWPBdy8I=; b=e9c7Q3s93vobiXPQEJxMKUzu7MYZ7GXmVXwBWzlrWklmIJkSXCsh2Oq2SWdvC1vE2T 39YDGPWnAcqxNpOlDb5c8Q3ZT6D9+NIy0r3b6SIUxXeUD4wstRA5uRVOmCcNqUcv8BJz 4zAwmSaLclAEEdpYgWdHju7cR7cMh2taJ7KD+yJppa81g3x937VqazzyOk1AYsILOZ/Y bIrbri+YuMGon/jBAOZA2pGzAksVhl/cy4JTzUp5mQeJ/gtz4bRpGglp7YIZZD7LQ3wq SgTm1KdeII70SmdO6YAYOq1kSZ5dpJfMRfxMp8PTFQof9Jplk7rgdz8cI2teh/1PtC1h P/5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=KDaXmkX3; spf=pass (google.com: domain of linux-wireless+bounces-34-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-wireless+bounces-34-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id b19-20020a63d313000000b00577f4d85fdbsi3213749pgg.548.2023.11.24.00.47.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 00:47:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-34-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=KDaXmkX3; spf=pass (google.com: domain of linux-wireless+bounces-34-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-wireless+bounces-34-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 16E90281406 for ; Fri, 24 Nov 2023 08:47:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A462C4436; Fri, 24 Nov 2023 08:47:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="KDaXmkX3" X-Original-To: linux-wireless@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A9C89F; Fri, 24 Nov 2023 00:47:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700815659; x=1732351659; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=cAzCbwXnfLwA65VPrnihNlz9VygOMk8fpr5Mgo8JUJw=; b=KDaXmkX3NbjZl3qVQs6uRbP0fhfqsnadTUDYvURU8GgfZcBDWSw0mYv4 5m5A3xOSBD0e35okUwqFd3KZbJjT+mYf/0veKqp4+ZwMS4PoBhbsr8lZ4 ExLcaLmdHgOqNKxpn2StT37yRLvQAcrtilHsyonzDedO9hSnm2hV3thSQ FMZo4ygPg4oBE/VoyWfmyUA4NY54Qq6lOCSoU/Eot6YlKaiEqvOraVORh /qYnt8OyrwX2Nk3HRxckMuOqiEI0q8pRsEaU338RwKQpM8SfCKvM2YCXV VfW7qrUMxGUL9aojV51ajtqZTRIYy+cRxjwHvb4LXcvvP5QCWPICFvqkr Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="423525771" X-IronPort-AV: E=Sophos;i="6.04,223,1695711600"; d="scan'208";a="423525771" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Nov 2023 00:47:39 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="802137645" X-IronPort-AV: E=Sophos;i="6.04,223,1695711600"; d="scan'208";a="802137645" Received: from mvlasov-mobl1.ger.corp.intel.com (HELO localhost) ([10.251.220.89]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Nov 2023 00:47:35 -0800 From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= To: "John W. Linville" , Kalle Valo , Larry Finger , linux-wireless@vger.kernel.org, Ping-Ke Shih , Bjorn Helgaas Cc: linux-kernel@vger.kernel.org, =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Subject: [PATCH v2 00/10] wifi: rtlwifi: PCI related fixes & cleanups Date: Fri, 24 Nov 2023 10:47:15 +0200 Message-Id: <20231124084725.12738-1-ilpo.jarvinen@linux.intel.com> X-Mailer: git-send-email 2.30.2 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The rtlwifi driver has code fragments that are using old interface or custom code to access PCIe capabilities which is buggy and messy. First two patches are fixes to problems related to ASPM and LNKCTL register RMW operations. The rest of the patches cleanup PCIe capability related code. Additional note: This series provides only a stop-gap solution to the RMW concurrency issue, the overall plan is to migrate all ASPM related handling into the ASPM service driver in order for it to accurately track ASPM state [1]. [1] https://lore.kernel.org/linux-pci/20230918131103.24119-1-ilpo.jarvinen@linux.intel.com/ v2: - Remove upstream bridge ASPM code which has never functioned - Convert more bits to pci_regs.h - Ensure _rtl_pci_switch_clk_req() only changes CLKREQ_EN - wifi: prefix to all patches - Add 2 more cleanup patches for unused stuff Ilpo Järvinen (10): wifi: rtlwifi: Remove bogus and dangerous ASPM disable/enable code wifi: rtlwifi: Convert LNKCTL change to PCIe cap RMW accessors wifi: rtlwifi: Convert to use PCIe capability accessors wifi: rtlwifi: rtl8821ae: Remove unnecessary PME_Status bit set wifi: rtlwifi: rtl8821ae: Reverse PM Capability exists check wifi: rtlwifi: rtl8821ae: Use pci_find_capability() wifi: rtlwifi: rtl8821ae: Add pdev into _rtl8821ae_clear_pci_pme_status() wifi: rtlwifi: rtl8821ae: Access full PMCS reg and use pci_regs.h wifi: rtlwifi: Remove unused PCI related defines and struct wifi: rtlwifi: Remove bridge vendor/device ids drivers/net/wireless/realtek/rtlwifi/pci.c | 98 +++++-------------- drivers/net/wireless/realtek/rtlwifi/pci.h | 24 ----- .../wireless/realtek/rtlwifi/rtl8821ae/hw.c | 76 ++++---------- 3 files changed, 43 insertions(+), 155 deletions(-) -- 2.30.2