aic7xxx: use standard pci subsystem, subdevice defines
Subsystems (2)
PATCH 1/1 aic7xxx: use standard pci subsystem, subdevice defines
From: Tom Rix <[email protected]>
Common defines should be used over custom defines.
Change and remove these definesPCIR_SUBVEND_0 to PCI_SUBSYSTEM_VENDOR_IDPCIR_SUBDEV_0 to PCI_SUBSYSTEM_ID
Signed-off-by Tom Rix <[email protected]>
--- drivers/scsi/aic7xxx/aic79xx_osm.h | 2 -- drivers/scsi/aic7xxx/aic79xx_pci.c | 6 +++--- drivers/scsi/aic7xxx/aic7xxx_osm.h | 2 -- drivers/scsi/aic7xxx/aic7xxx_pci.c | 4 ++-- 4 files changed, 5 insertions(+), 9 deletions(-)
drivers/scsi/aic7xxx/aic79xx_osm.h +0 -2
@@ -420,8 +420,6 @@ ahd_unlock(struct ahd_softc *ahd, unsigned long *flags)/* config registers for header type 0 devices */ #define PCIR_MAPS 0x10 -#define PCIR_SUBVEND_0 0x2c -#define PCIR_SUBDEV_0 0x2e/****************************** PCI-X definitions *****************************/ #define PCIXR_COMMAND 0x96
drivers/scsi/aic7xxx/aic79xx_pci.c +3 -3
@@ -260,8 +260,8 @@ ahd_find_pci_device(ahd_dev_softc_t pci) vendor =ahd_pci_read_config (pci,PCIR_DEVVENDOR ,/*bytes*/ 2 ); device =ahd_pci_read_config (pci,PCIR_DEVICE ,/*bytes*/ 2 ); - subvendor =ahd_pci_read_config (pci,PCIR_SUBVEND_0 ,/*bytes*/ 2 ); - subdevice =ahd_pci_read_config (pci,PCIR_SUBDEV_0 ,/*bytes*/ 2 ); + subvendor =ahd_pci_read_config (pci,PCI_SUBSYSTEM_VENDOR_ID ,/*bytes*/ 2 ); + subdevice =ahd_pci_read_config (pci,PCI_SUBSYSTEM_ID ,/*bytes*/ 2 ); full_id = ahd_compose_id(device, vendor, subdevice,
@@ -298,7 +298,7 @@ ahd_pci_config(struct ahd_softc *ahd, const struct ahd_pci_identity *entry)* Record if this is an HP board. */ subvendor =ahd_pci_read_config (ahd->dev_softc, -PCIR_SUBVEND_0 ,/*bytes*/ 2 ); +PCI_SUBSYSTEM_VENDOR_ID ,/*bytes*/ 2 );if (subvendor ==SUBID_HP ) ahd->flags |=AHD_HP_BOARD ;
drivers/scsi/aic7xxx/aic7xxx_osm.h +0 -2
@@ -433,8 +433,6 @@ ahc_unlock(struct ahc_softc *ahc, unsigned long *flags)/* config registers for header type 0 devices */ #define PCIR_MAPS 0x10 -#define PCIR_SUBVEND_0 0x2c -#define PCIR_SUBDEV_0 0x2e typedef enum {
drivers/scsi/aic7xxx/aic7xxx_pci.c +2 -2
@@ -673,8 +673,8 @@ ahc_find_pci_device(ahc_dev_softc_t pci) vendor =ahc_pci_read_config (pci,PCIR_DEVVENDOR ,/*bytes*/ 2 ); device =ahc_pci_read_config (pci,PCIR_DEVICE ,/*bytes*/ 2 ); - subvendor =ahc_pci_read_config (pci,PCIR_SUBVEND_0 ,/*bytes*/ 2 ); - subdevice =ahc_pci_read_config (pci,PCIR_SUBDEV_0 ,/*bytes*/ 2 ); + subvendor =ahc_pci_read_config (pci,PCI_SUBSYSTEM_VENDOR_ID ,/*bytes*/ 2 ); + subdevice =ahc_pci_read_config (pci,PCI_SUBSYSTEM_ID ,/*bytes*/ 2 ); full_id =ahc_compose_id (device, vendor, subdevice, subvendor);/*
Signature · 1 line
2.26.3
Martin K. Petersen
AppliedTom,
Quoted 3 lines
Change and remove these defines
PCIR_SUBVEND_0toPCI_SUBSYSTEM_VENDOR_IDPCIR_SUBDEV_0toPCI_SUBSYSTEM_ID
Applied to 5.18/scsi-staging, thanks!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering
Martin K. Petersen
AppliedQuoted 9 lines · On Tue, 22 Mar 2022 07:46:48 -0700, [email protected] wrote:
From: Tom Rix <[email protected]>
Common defines should be used over custom defines.
Change and remove these defines
PCIR_SUBVEND_0toPCI_SUBSYSTEM_VENDOR_IDPCIR_SUBDEV_0toPCI_SUBSYSTEM_ID[...]
Applied to 5.18/scsi-fixes, thanks!
[1/1] aic7xxx: use standard pci subsystem, subdevice defines
https://git.kernel.org/mkp/scsi/c/37a9bd7090cd
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering