lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <MN0PR12MB6101B914FFDEA3882E8BB232E2809@MN0PR12MB6101.namprd12.prod.outlook.com>
Date:   Mon, 20 Mar 2023 13:26:55 +0000
From:   "Limonciello, Mario" <Mario.Limonciello@....com>
To:     Felix Fietkau <nbd@....name>,
        Lorenzo Bianconi <lorenzo@...nel.org>,
        Ryder Lee <ryder.lee@...iatek.com>
CC:     "Tsao, Anson" <anson.tsao@....com>,
        Shayne Chen <shayne.chen@...iatek.com>,
        Sean Wang <sean.wang@...iatek.com>,
        Kalle Valo <kvalo@...nel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        "linux-wireless@...r.kernel.org" <linux-wireless@...r.kernel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-mediatek@...ts.infradead.org" 
        <linux-mediatek@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Matthias Brugger <matthias.bgg@...il.com>
Subject: RE: [PATCH] wifi: mt76: mt7921e: Set memory space enable in
 PCI_COMMAND if unset

[Public]



> -----Original Message-----
> From: Limonciello, Mario <Mario.Limonciello@....com>
> Sent: Friday, March 10, 2023 11:00
> To: Matthias Brugger <matthias.bgg@...il.com>
> Cc: Limonciello, Mario <Mario.Limonciello@....com>; Tsao, Anson
> <anson.tsao@....com>; Felix Fietkau <nbd@....name>; Lorenzo Bianconi
> <lorenzo@...nel.org>; Ryder Lee <ryder.lee@...iatek.com>; Shayne Chen
> <shayne.chen@...iatek.com>; Sean Wang <sean.wang@...iatek.com>;
> Kalle Valo <kvalo@...nel.org>; David S. Miller <davem@...emloft.net>; Eric
> Dumazet <edumazet@...gle.com>; Jakub Kicinski <kuba@...nel.org>;
> Paolo Abeni <pabeni@...hat.com>; linux-wireless@...r.kernel.org;
> netdev@...r.kernel.org; linux-arm-kernel@...ts.infradead.org; linux-
> mediatek@...ts.infradead.org; linux-kernel@...r.kernel.org
> Subject: [PATCH] wifi: mt76: mt7921e: Set memory space enable in
> PCI_COMMAND if unset
> 
> When the BIOS has been configured for Fast Boot, systems with mt7921e
> have non-functional wifi.  Turning on Fast boot caused both bus master
> enable and memory space enable bits in PCI_COMMAND not to get
> configured.
> 
> The mt7921 driver already sets bus master enable, but explicitly check
> and set memory access enable as well to fix this problem.
> 
> Tested-by: Anson Tsao <anson.tsao@....com>
> Signed-off-by: Mario Limonciello <mario.limonciello@....com>
> ---
>  drivers/net/wireless/mediatek/mt76/mt7921/pci.c | 6 ++++++
>  1 file changed, 6 insertions(+)

Hi Felix, Lorenzo, Ryder,

Any comments please?

Thanks,

> 
> diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/pci.c
> b/drivers/net/wireless/mediatek/mt76/mt7921/pci.c
> index 8a53d8f286db..24a2aafa6e2a 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt7921/pci.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt7921/pci.c
> @@ -256,6 +256,7 @@ static int mt7921_pci_probe(struct pci_dev *pdev,
>  	struct mt7921_dev *dev;
>  	struct mt76_dev *mdev;
>  	int ret;
> +	u16 cmd;
> 
>  	ret = pcim_enable_device(pdev);
>  	if (ret)
> @@ -265,6 +266,11 @@ static int mt7921_pci_probe(struct pci_dev *pdev,
>  	if (ret)
>  		return ret;
> 
> +	pci_read_config_word(pdev, PCI_COMMAND, &cmd);
> +	if (!(cmd & PCI_COMMAND_MEMORY)) {
> +		cmd |= PCI_COMMAND_MEMORY;
> +		pci_write_config_word(pdev, PCI_COMMAND, cmd);
> +	}
>  	pci_set_master(pdev);
> 
>  	ret = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_ALL_TYPES);
> --
> 2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ