[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231117223738.GA95634@bhelgaas>
Date: Fri, 17 Nov 2023 16:37:38 -0600
From: Bjorn Helgaas <helgaas@...nel.org>
To: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
Cc: "John W. Linville" <linville@...driver.com>,
Kalle Valo <kvalo@...nel.org>,
Larry Finger <Larry.Finger@...inger.net>,
linux-wireless@...r.kernel.org, Ping-Ke Shih <pkshih@...ltek.com>,
Bjorn Helgaas <bhelgaas@...gle.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/7] wifi: rtlwifi: Convert to use PCIe capability
accessors
On Fri, Nov 17, 2023 at 11:44:20AM +0200, Ilpo Järvinen wrote:
> The rtlwifi driver accesses PCIe capabilities through custom config
> offsets.
>
> Convert the accesses to use the normal PCIe capability accessors.
> pcibridge_pciehdr_offset in the struct mp_adapter becomes unused after
> the conversion and can be removed.
More good stuff. I guess patch [1/7] was specifically for the RMW
things, and this one is for the rest?
> @@ -219,7 +220,7 @@ static void rtl_pci_disable_aspm(struct ieee80211_hw *hw)
> }
>
> /*for promising device will in L0 state after an I/O. */
> - pci_read_config_byte(rtlpci->pdev, 0x80, &tmp_u1b);
> + pcie_capability_read_word(rtlpci->pdev, PCI_EXP_LNKCTL, &tmp_u1b);
>
> /*Set corresponding value. */
> aspmlevel |= BIT(0) | BIT(1);
I guess this is PCI_EXP_LNKCTL_ASPM_L0S | PCI_EXP_LNKCTL_ASPM_L1?
There's also a similar u_pcibridge_aspmsetting mask in
rtl_pci_enable_aspm().
And some scary looking stuff in rtl_pci_get_amd_l1_patch(). And
platform_enable_dma64(). No clue what either of those does.
Powered by blists - more mailing lists