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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: 
 <PH0PR18MB473488E1ABF01D5E35A4AAF0C784A@PH0PR18MB4734.namprd18.prod.outlook.com>
Date: Wed, 6 Dec 2023 14:12:27 +0000
From: Shinas Rasheed <srasheed@...vell.com>
To: Michal Schmidt <mschmidt@...hat.com>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Haseeb Gani
	<hgani@...vell.com>, Vimlesh Kumar <vimleshk@...vell.com>,
        "egallen@...hat.com" <egallen@...hat.com>,
        "pabeni@...hat.com"
	<pabeni@...hat.com>,
        "horms@...nel.org" <horms@...nel.org>,
        "kuba@...nel.org"
	<kuba@...nel.org>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "wizhao@...hat.com" <wizhao@...hat.com>,
        "konguyen@...hat.com"
	<konguyen@...hat.com>,
        Veerasenareddy Burru <vburru@...vell.com>,
        Sathesh B
 Edara <sedara@...vell.com>,
        Eric Dumazet <edumazet@...gle.com>,
        Abhijit
 Ayarekar <aayarekar@...vell.com>,
        Satananda Burla <sburla@...vell.com>
Subject: RE: [EXT] Re: [PATCH net v1] octeon_ep: explicitly test for firmware
 ready value

Hi Michal

> -----Original Message-----
> From: Michal Schmidt <mschmidt@...hat.com>
> Sent: Wednesday, December 6, 2023 7:28 PM
> To: Shinas Rasheed <srasheed@...vell.com>
> >                 pci_read_config_byte(pdev, (pos + 8), &status);
> >                 dev_info(&pdev->dev, "Firmware ready status = %u\n", status);
> > -               return status;
> > +#define FW_STATUS_READY 1ULL
> > +               return (status == FW_STATUS_READY) ? true : false;
> 
> "status == FW_STATUS_READY" is already the bool value you want. You
> don't need to use the ternary operator here.
> 

In some abnormal cases, the driver can read the firmware ready status as 2. Hence this need for explicitly checking if status
is indeed 1 or not. If it is 2, the function should understand it as the firmware is not ready. (It has to be strictly 1 for the driver
to understand it as ready)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ