Use symbolic name rather thanhard coding the cap pointer offset for

type two devices.
This commit is contained in:
Warner Losh 2005-10-29 05:49:06 +00:00
parent a52364d522
commit 87623e8dd6
2 changed files with 2 additions and 1 deletions

View File

@ -430,7 +430,7 @@ pci_read_extcap(device_t pcib, pcicfgregs *cfg)
ptrptr = PCIR_CAP_PTR;
break;
case 2:
ptrptr = 0x14;
ptrptr = PCIR_CAP_PTR_2;
break;
default:
return; /* no extended capabilities support */

View File

@ -166,6 +166,7 @@
/* config registers for header type 2 (CardBus) devices */
#define PCIR_CAP_PTR_2 0x14
#define PCIR_SECSTAT_2 0x16
#define PCIR_PRIBUS_2 0x18