Lines Matching refs:cio

694 pci_conf_io_init(struct pci_conf_io *cio, caddr_t data, u_long cmd)
705 *cio = *(struct pci_conf_io *)data;
714 cio->pat_buf_len = cio32->pat_buf_len;
715 cio->num_patterns = cio32->num_patterns;
716 cio->patterns = (void *)(uintptr_t)cio32->patterns;
717 cio->match_buf_len = cio32->match_buf_len;
718 cio->num_matches = cio32->num_matches;
719 cio->matches = (void *)(uintptr_t)cio32->matches;
720 cio->offset = cio32->offset;
721 cio->generation = cio32->generation;
722 cio->status = cio32->status;
733 pci_conf_io_update_data(const struct pci_conf_io *cio, caddr_t data,
747 d_cio->status = cio->status;
748 d_cio->generation = cio->generation;
749 d_cio->offset = cio->offset;
750 d_cio->num_matches = cio->num_matches;
760 cio32->status = cio->status;
761 cio32->generation = cio->generation;
762 cio32->offset = cio->offset;
763 cio32->num_matches = cio->num_matches;
928 struct pci_conf_io *cio = NULL;
980 cio = malloc(sizeof(struct pci_conf_io), M_TEMP,
982 pci_conf_io_init(cio, data, cmd);
987 cio->num_matches = 0;
995 if ((cio->offset != 0)
996 && (cio->generation != pci_generation)){
997 cio->status = PCI_GETCONF_LIST_CHANGED;
1006 if (cio->offset >= pci_numdevs) {
1007 cio->status = PCI_GETCONF_LAST_DEVICE;
1022 iolen = min(cio->match_buf_len - (cio->match_buf_len % confsz),
1035 if ((cio->num_patterns > 0) && (cio->num_patterns < pci_numdevs)
1036 && (cio->pat_buf_len > 0)) {
1050 if (cio->num_patterns * pci_match_conf_size(cmd) !=
1051 cio->pat_buf_len) {
1053 cio->status = PCI_GETCONF_ERROR;
1061 pattern_buf = malloc(cio->pat_buf_len, M_TEMP,
1063 error = copyin(cio->patterns, pattern_buf,
1064 cio->pat_buf_len);
1069 num_patterns = cio->num_patterns;
1070 } else if ((cio->num_patterns > 0)
1071 || (cio->pat_buf_len > 0)) {
1075 cio->status = PCI_GETCONF_ERROR;
1084 for (cio->num_matches = 0, i = 0,
1088 if (i < cio->offset)
1117 if (cio->num_matches >= ionum) {
1124 (caddr_t)cio->matches +
1125 confsz * cio->num_matches, confsz);
1128 cio->num_matches++;
1136 cio->offset = i;
1142 cio->generation = pci_generation;
1151 cio->status = PCI_GETCONF_LAST_DEVICE;
1153 cio->status = PCI_GETCONF_MORE_DEVS;
1156 pci_conf_io_update_data(cio, data, cmd);
1157 free(cio, M_TEMP);