Lines Matching refs:ofs
530 unsigned int ofs;
541 ofs = PCI_CAPLISTPTR_REG;
544 ofs = PCI_CARDBUS_CAPLISTPTR_REG;
550 ofs = PCI_CAPLIST_PTR(pci_conf_read(pc, tag, ofs));
551 while (ofs != 0) {
552 if ((ofs & 3) || (ofs < 0x40)) {
561 reg = pci_conf_read(pc, tag, ofs);
564 *offset = ofs;
569 ofs = PCI_CAPLIST_NEXT(reg);
580 unsigned int ofs;
582 if (pci_get_capability(pc, tag, PCI_CAP_LDT, &ofs, NULL) == 0)
585 while (ofs != 0) {
587 if ((ofs & 3) || (ofs < 0x40))
590 reg = pci_conf_read(pc, tag, ofs);
593 *offset = ofs;
598 ofs = PCI_CAPLIST_NEXT(reg);
652 unsigned int ofs;
658 ofs = PCI_EXTCAPLIST_BASE;
659 reg = pci_conf_read(pc, tag, ofs);
665 if ((ofs & 3) || ofs < PCI_EXTCAPLIST_BASE)
666 panic("%s: invalid offset %u", __func__, ofs);
670 *offset = ofs;
675 ofs = PCI_EXTCAPLIST_NEXT(reg);
676 if (ofs == 0)
678 reg = pci_conf_read(pc, tag, ofs);
870 int ofs, i, j;
875 if (pci_get_capability(pc, tag, PCI_CAP_VPD, &ofs, ®) == 0)
882 pci_conf_write(pc, tag, ofs, reg);
893 reg = pci_conf_read(pc, tag, ofs);
895 data[i] = pci_conf_read(pc, tag, PCI_VPD_DATAREG(ofs));
906 int ofs, i, j;
911 if (pci_get_capability(pc, tag, PCI_CAP_VPD, &ofs, ®) == 0)
915 pci_conf_write(pc, tag, PCI_VPD_DATAREG(ofs), data[i]);
920 pci_conf_write(pc, tag, ofs, reg);
931 reg = pci_conf_read(pc, tag, ofs);