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
| ||
|
Message-ID: <CADEbmW1qF7UvGr0rZ0NUMiP0Lybgz3CHLB3JVBn_Na-8md-tgQ@mail.gmail.com> Date: Thu, 7 Dec 2023 09:45:15 +0100 From: Michal Schmidt <mschmidt@...hat.com> To: Shinas Rasheed <srasheed@...vell.com> Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org, hgani@...vell.com, vimleshk@...vell.com, egallen@...hat.com, pabeni@...hat.com, horms@...nel.org, kuba@...nel.org, davem@...emloft.net, wizhao@...hat.com, konguyen@...hat.com, Veerasenareddy Burru <vburru@...vell.com>, Sathesh Edara <sedara@...vell.com>, Eric Dumazet <edumazet@...gle.com>, Abhijit Ayarekar <aayarekar@...vell.com>, Satananda Burla <sburla@...vell.com> Subject: Re: [PATCH net v2] octeon_ep: explicitly test for firmware ready value On Thu, Dec 7, 2023 at 8:50 AM Shinas Rasheed <srasheed@...vell.com> wrote: > > The firmware ready value is 1, and get firmware ready status > function should explicitly test for that value. The firmware > ready value read will be 2 after driver load, and on unbind > till firmware rewrites the firmware ready back to 0, the value > seen by driver will be 2, which should be regarded as not ready. > > Fixes: 10c073e40469 ("octeon_ep: defer probe if firmware not ready") > Signed-off-by: Shinas Rasheed <srasheed@...vell.com> > --- > V2: > - Fixed redundant logic > > V1: https://lore.kernel.org/all/20231206063549.2590305-1-srasheed@marvell.com/ > > drivers/net/ethernet/marvell/octeon_ep/octep_main.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/marvell/octeon_ep/octep_main.c b/drivers/net/ethernet/marvell/octeon_ep/octep_main.c > index 552970c7dec0..b8ae269f6f97 100644 > --- a/drivers/net/ethernet/marvell/octeon_ep/octep_main.c > +++ b/drivers/net/ethernet/marvell/octeon_ep/octep_main.c > @@ -1258,7 +1258,8 @@ static bool get_fw_ready_status(struct pci_dev *pdev) > > 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); The parentheses are not necessary, but if you find it better readable this way, so be it. Reviewed-by: Michal Schmidt <mschmidt@...hat.com> > } > return false; > } > -- > 2.25.1 >
Powered by blists - more mailing lists