This patch series removes the private duplicates of PCI definitions in
favour of generic definitions defined in pci_regs.h.
This driver only uses one of the generic PCI definitons, i.e.
PCI_REVISION_ID, which is included from pci_regs.h and its private
version is removed from skfbi.h with all other private defines.
The skfbi.h defines PCI_REV_ID which is renamed to PCI_REVISION_ID in
drvfbi.c to make it compatible with the generic define in pci_regs.h.
Puranjay Mohan (3):
net: fddi: skfp: Rename PCI_REV_ID to PCI_REVISION_ID
net: fddi: skfp: Include generic PCI definitions
net: fddi: skfp: Remove unused private PCI definitions
drivers/net/fddi/skfp/drvfbi.c | 4 +-
drivers/net/fddi/skfp/h/skfbi.h | 207 +-------------------------------
2 files changed, 3 insertions(+), 208 deletions(-)
--
2.21.0
Rename the PCI_REV_ID define to PCI_REVISION_ID in skfbi.h
and drvfbi.c to make it compatible with the pci_regs.h
which defines it as PCI_REVISION_ID.
Signed-off-by: Puranjay Mohan <[email protected]>
---
drivers/net/fddi/skfp/drvfbi.c | 2 +-
drivers/net/fddi/skfp/h/skfbi.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/fddi/skfp/drvfbi.c b/drivers/net/fddi/skfp/drvfbi.c
index bdd5700e71fa..b324c1acf195 100644
--- a/drivers/net/fddi/skfp/drvfbi.c
+++ b/drivers/net/fddi/skfp/drvfbi.c
@@ -127,7 +127,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 {
diff --git a/drivers/net/fddi/skfp/h/skfbi.h b/drivers/net/fddi/skfp/h/skfbi.h
index 89557457b352..a05ce16171be 100644
--- a/drivers/net/fddi/skfp/h/skfbi.h
+++ b/drivers/net/fddi/skfp/h/skfbi.h
@@ -31,7 +31,7 @@
#define PCI_DEVICE_ID 0x02 /* 16 bit Device ID */
#define PCI_COMMAND 0x04 /* 16 bit Command */
#define PCI_STATUS 0x06 /* 16 bit Status */
-#define PCI_REV_ID 0x08 /* 8 bit Revision ID */
+#define PCI_REVISION_ID 0x08 /* 8 bit Revision ID */
#define PCI_CLASS_CODE 0x09 /* 24 bit Class Code */
#define PCI_CACHE_LSZ 0x0c /* 8 bit Cache Line Size */
#define PCI_LAT_TIM 0x0d /* 8 bit Latency Timer */
--
2.21.0
On Thu, 20 Jun 2019 23:37:51 +0530
Puranjay Mohan <[email protected]> wrote:
> This patch series removes the private duplicates of PCI definitions in
> favour of generic definitions defined in pci_regs.h.
>
> This driver only uses one of the generic PCI definitons, i.e.
> PCI_REVISION_ID, which is included from pci_regs.h and its private
> version is removed from skfbi.h with all other private defines.
>
> The skfbi.h defines PCI_REV_ID which is renamed to PCI_REVISION_ID in
> drvfbi.c to make it compatible with the generic define in pci_regs.h.
>
> Puranjay Mohan (3):
> net: fddi: skfp: Rename PCI_REV_ID to PCI_REVISION_ID
> net: fddi: skfp: Include generic PCI definitions
> net: fddi: skfp: Remove unused private PCI definitions
>
> drivers/net/fddi/skfp/drvfbi.c | 4 +-
> drivers/net/fddi/skfp/h/skfbi.h | 207 +-------------------------------
> 2 files changed, 3 insertions(+), 208 deletions(-)
>
Does anyone still have the hardware to test this?
Maybe FDDI should be put out to pasture.
On Thu, Jun 20, 2019 at 11:37:52PM +0530, Puranjay Mohan wrote:
> Rename the PCI_REV_ID define to PCI_REVISION_ID in skfbi.h
> and drvfbi.c to make it compatible with the pci_regs.h
> which defines it as PCI_REVISION_ID.
We already cache the revision in struct pci_dev. In doubt you should
use that one.