提交 37a9bd70 编写于 作者: T Tom Rix 提交者: Martin K. Petersen

scsi: aic7xxx: Use standard PCI subsystem, subdevice defines

Common defines should be used over custom defines.

Change and remove these defines:

 - PCIR_SUBVEND_0 to PCI_SUBSYSTEM_VENDOR_ID

 - PCIR_SUBDEV_0 to PCI_SUBSYSTEM_ID

Link: https://lore.kernel.org/r/20220322144648.2467777-1-trix@redhat.comSigned-off-by: NTom Rix <trix@redhat.com>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 5ca0faf9
...@@ -420,8 +420,6 @@ ahd_unlock(struct ahd_softc *ahd, unsigned long *flags) ...@@ -420,8 +420,6 @@ ahd_unlock(struct ahd_softc *ahd, unsigned long *flags)
/* config registers for header type 0 devices */ /* config registers for header type 0 devices */
#define PCIR_MAPS 0x10 #define PCIR_MAPS 0x10
#define PCIR_SUBVEND_0 0x2c
#define PCIR_SUBDEV_0 0x2e
/****************************** PCI-X definitions *****************************/ /****************************** PCI-X definitions *****************************/
#define PCIXR_COMMAND 0x96 #define PCIXR_COMMAND 0x96
......
...@@ -260,8 +260,8 @@ ahd_find_pci_device(ahd_dev_softc_t pci) ...@@ -260,8 +260,8 @@ ahd_find_pci_device(ahd_dev_softc_t pci)
vendor = ahd_pci_read_config(pci, PCIR_DEVVENDOR, /*bytes*/2); vendor = ahd_pci_read_config(pci, PCIR_DEVVENDOR, /*bytes*/2);
device = ahd_pci_read_config(pci, PCIR_DEVICE, /*bytes*/2); device = ahd_pci_read_config(pci, PCIR_DEVICE, /*bytes*/2);
subvendor = ahd_pci_read_config(pci, PCIR_SUBVEND_0, /*bytes*/2); subvendor = ahd_pci_read_config(pci, PCI_SUBSYSTEM_VENDOR_ID, /*bytes*/2);
subdevice = ahd_pci_read_config(pci, PCIR_SUBDEV_0, /*bytes*/2); subdevice = ahd_pci_read_config(pci, PCI_SUBSYSTEM_ID, /*bytes*/2);
full_id = ahd_compose_id(device, full_id = ahd_compose_id(device,
vendor, vendor,
subdevice, subdevice,
...@@ -298,7 +298,7 @@ ahd_pci_config(struct ahd_softc *ahd, const struct ahd_pci_identity *entry) ...@@ -298,7 +298,7 @@ ahd_pci_config(struct ahd_softc *ahd, const struct ahd_pci_identity *entry)
* Record if this is an HP board. * Record if this is an HP board.
*/ */
subvendor = ahd_pci_read_config(ahd->dev_softc, subvendor = ahd_pci_read_config(ahd->dev_softc,
PCIR_SUBVEND_0, /*bytes*/2); PCI_SUBSYSTEM_VENDOR_ID, /*bytes*/2);
if (subvendor == SUBID_HP) if (subvendor == SUBID_HP)
ahd->flags |= AHD_HP_BOARD; ahd->flags |= AHD_HP_BOARD;
......
...@@ -433,8 +433,6 @@ ahc_unlock(struct ahc_softc *ahc, unsigned long *flags) ...@@ -433,8 +433,6 @@ ahc_unlock(struct ahc_softc *ahc, unsigned long *flags)
/* config registers for header type 0 devices */ /* config registers for header type 0 devices */
#define PCIR_MAPS 0x10 #define PCIR_MAPS 0x10
#define PCIR_SUBVEND_0 0x2c
#define PCIR_SUBDEV_0 0x2e
typedef enum typedef enum
{ {
......
...@@ -673,8 +673,8 @@ ahc_find_pci_device(ahc_dev_softc_t pci) ...@@ -673,8 +673,8 @@ ahc_find_pci_device(ahc_dev_softc_t pci)
vendor = ahc_pci_read_config(pci, PCIR_DEVVENDOR, /*bytes*/2); vendor = ahc_pci_read_config(pci, PCIR_DEVVENDOR, /*bytes*/2);
device = ahc_pci_read_config(pci, PCIR_DEVICE, /*bytes*/2); device = ahc_pci_read_config(pci, PCIR_DEVICE, /*bytes*/2);
subvendor = ahc_pci_read_config(pci, PCIR_SUBVEND_0, /*bytes*/2); subvendor = ahc_pci_read_config(pci, PCI_SUBSYSTEM_VENDOR_ID, /*bytes*/2);
subdevice = ahc_pci_read_config(pci, PCIR_SUBDEV_0, /*bytes*/2); subdevice = ahc_pci_read_config(pci, PCI_SUBSYSTEM_ID, /*bytes*/2);
full_id = ahc_compose_id(device, vendor, subdevice, subvendor); full_id = ahc_compose_id(device, vendor, subdevice, subvendor);
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册