Lines Matching refs:kinfo
92 struct qib_base_info *kinfo = NULL;
109 sz = sizeof(*kinfo);
118 kinfo = kzalloc(sizeof(*kinfo), GFP_KERNEL);
119 if (kinfo == NULL) {
124 ret = dd->f_get_base_info(rcd, kinfo);
128 kinfo->spi_rcvhdr_cnt = dd->rcvhdrcnt;
129 kinfo->spi_rcvhdrent_size = dd->rcvhdrentsize;
130 kinfo->spi_tidegrcnt = rcd->rcvegrcnt;
131 kinfo->spi_rcv_egrbufsize = dd->rcvegrbufsize;
135 kinfo->spi_rcv_egrbuftotlen =
137 kinfo->spi_rcv_egrperchunk = rcd->rcvegrbufs_perchunk;
138 kinfo->spi_rcv_egrchunksize = kinfo->spi_rcv_egrbuftotlen /
140 kinfo->spi_tidcnt = dd->rcvtidcnt / subctxt_cnt;
142 kinfo->spi_tidcnt += dd->rcvtidcnt % subctxt_cnt;
147 kinfo->spi_nctxts = dd->cfgctxts;
149 kinfo->spi_unit = dd->unit;
150 kinfo->spi_port = ppd->port;
152 kinfo->spi_tid_maxsize = PAGE_SIZE;
173 kinfo->spi_rcvhdr_base = (u64) rcd->rcvhdrq_phys;
174 kinfo->spi_rcvhdr_tailaddr = (u64) rcd->rcvhdrqtailaddr_phys;
175 kinfo->spi_rhf_offset = dd->rhf_offset;
176 kinfo->spi_rcv_egrbufs = (u64) rcd->rcvegr_phys;
177 kinfo->spi_pioavailaddr = (u64) dd->pioavailregs_phys;
179 kinfo->spi_status = (u64) kinfo->spi_pioavailaddr +
182 kinfo->spi_uregbase = (u64) dd->uregbase + dd->ureg_align * rcd->ctxt;
184 kinfo->spi_piocnt = rcd->piocnt;
185 kinfo->spi_piobufbase = (u64) rcd->piobufs;
186 kinfo->spi_sendbuf_status = cvt_kvaddr(rcd->user_event_mask);
188 kinfo->spi_piocnt = (rcd->piocnt / subctxt_cnt) +
191 kinfo->spi_piobufbase = (u64) rcd->piobufs +
193 (rcd->piocnt - kinfo->spi_piocnt);
197 kinfo->spi_piocnt = rcd->piocnt / subctxt_cnt;
198 kinfo->spi_piobufbase = (u64) rcd->piobufs +
199 dd->palign * kinfo->spi_piocnt * slave;
203 kinfo->spi_sendbuf_status =
206 kinfo->spi_subctxt_uregbase = cvt_kvaddr(rcd->subctxt_uregbase);
208 kinfo->spi_subctxt_rcvegrbuf =
210 kinfo->spi_subctxt_rcvhdr_base =
220 kinfo->spi_pioindex = (kinfo->spi_piobufbase - dd->pio2k_bufbase) /
222 kinfo->spi_pioalign = dd->palign;
223 kinfo->spi_qpair = QIB_KD_QP;
229 kinfo->spi_piosize = dd->piosize2k - 2 * sizeof(u32);
230 kinfo->spi_mtu = ppd->ibmaxlen; /* maxlen, not ibmtu */
231 kinfo->spi_ctxt = rcd->ctxt;
232 kinfo->spi_subctxt = subctxt_fp(fp);
233 kinfo->spi_sw_version = QIB_KERN_SWVERSION;
234 kinfo->spi_sw_version |= 1U << 31; /* QLogic-built, not kernel.org */
235 kinfo->spi_hw_version = dd->revision;
238 kinfo->spi_runtime_flags |= QIB_RUNTIME_MASTER;
240 sz = (ubase_size < sizeof(*kinfo)) ? ubase_size : sizeof(*kinfo);
241 if (copy_to_user(ubase, kinfo, sz))
244 kfree(kinfo);