Allow to write the intpin ivar using the pci_set_intpin() accessor. There

are some Sun PCI devices around which bogusly set intpin to 0, although
they use the intline mechanism; this allows the device driver to correct
that.

Reviewed by:	imp
This commit is contained in:
Thomas Moestl 2003-07-01 13:54:10 +00:00
parent 3cc956548f
commit 036c2cfbfa

View File

@ -1232,6 +1232,9 @@ pci_write_ivar(device_t dev, device_t child, int which, uintptr_t value)
dinfo = device_get_ivars(child);
switch (which) {
case PCI_IVAR_INTPIN:
dinfo->cfg.intpin = value;
return (0);
case PCI_IVAR_ETHADDR:
case PCI_IVAR_SUBVENDOR:
case PCI_IVAR_SUBDEVICE:
@ -1242,7 +1245,6 @@ pci_write_ivar(device_t dev, device_t child, int which, uintptr_t value)
case PCI_IVAR_SUBCLASS:
case PCI_IVAR_PROGIF:
case PCI_IVAR_REVID:
case PCI_IVAR_INTPIN:
case PCI_IVAR_IRQ:
case PCI_IVAR_BUS:
case PCI_IVAR_SLOT: