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: <e49daf89-1bf0-77e8-c71f-ec0802f25f6c@linuxfoundation.org>
Date:   Wed, 19 Jun 2019 12:04:19 -0600
From:   Shuah Khan <skhan@...uxfoundation.org>
To:     Puranjay Mohan <puranjay12@...il.com>
Cc:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        Bjorn Helgaas <bjorn@...gaas.com>,
        linux-kernel-mentees@...ts.linuxfoundation.org,
        Shuah Khan <skhan@...uxfoundation.org>
Subject: Re: [PATCH] net: fddi: skfp: Include generic PCI definitions from
 pci_regs.h

On 6/19/19 11:45 AM, Puranjay Mohan wrote:
> Include the generic PCI definitions from include/uapi/linux/pci_regs.h
> change PCI_REV_ID to PCI_REVISION_ID to make it compatible with the
> generic define.
> This driver uses only one generic PCI define.
> 
> Signed-off-by: Puranjay Mohan <puranjay12@...il.com>
> ---
>   drivers/net/fddi/skfp/drvfbi.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/fddi/skfp/drvfbi.c b/drivers/net/fddi/skfp/drvfbi.c
> index bdd5700e71fa..38f6d943385d 100644
> --- a/drivers/net/fddi/skfp/drvfbi.c
> +++ b/drivers/net/fddi/skfp/drvfbi.c
> @@ -20,6 +20,7 @@
>   #include "h/supern_2.h"
>   #include "h/skfbiinc.h"
>   #include <linux/bitrev.h>
> +#include <uapi/linux/pci_regs.h>
>   
>   #ifndef	lint
>   static const char ID_sccs[] = "@(#)drvfbi.c	1.63 99/02/11 (C) SK " ;
> @@ -127,7 +128,7 @@ static void card_start(struct s_smc *smc)
>   	 *	 at very first before any other initialization functions is
>   	 *	 executed.
>   	 */
> -	rev_id = inp(PCI_C(PCI_REV_ID)) ;
> +	rev_id = inp(PCI_C(PCI_REVISION_ID)) ;
>   	if ((rev_id & 0xf0) == SK_ML_ID_1 || (rev_id & 0xf0) == SK_ML_ID_2) {
>   		smc->hw.hw_is_64bit = TRUE ;
>   	} else {
> 

Why not delete the PCI_REV_ID define in:

drivers/net/fddi/skfp/h/skfbi.h

It looks like this header has duplicate PCI config space header defines,
not just this one. Some of them are slightly different names:

e.g:

#define PCI_CACHE_LSZ   0x0c    /*  8 bit       Cache Line Size */

Looks like it defines the standard PCI config space instead of
including and using the standard defines from uapi/linux/pci_regs.h

Something to look into.

thanks,
-- Shuah





Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ