Lines Matching refs:dd
345 struct ipath_devdata *dd = to_idev(qp->ibqp.device)->dd; in ipath_post_one_send() local
350 !(dd->ipath_flags & IPATH_LINKACTIVE)) { in ipath_post_one_send()
422 } else if (wqe->length > to_idev(qp->ibqp.device)->dd->ipath_ibmtu) in ipath_post_one_send()
605 lid &= ~((1 << dev->dd->ipath_lmc) - 1); in ipath_ib_rcv()
606 if (unlikely(lid != dev->dd->ipath_lid)) { in ipath_ib_rcv()
723 ipath_snapshot_counters(dev->dd, &dev->ipath_sword, in ipath_ib_timer()
734 ipath_snapshot_counters(dev->dd, &ta, &tb, in ipath_ib_timer()
1103 struct ipath_devdata *dd = dev->dd; in ipath_verbs_send_dma() local
1115 ret = ipath_sdma_verbs_send(dd, tx->ss, tx->len, tx); in ipath_verbs_send_dma()
1135 qp->s_pkt_delay = ipath_pkt_delay(plen, dd->delay_mult, qp->s_dmult); in ipath_verbs_send_dma()
1159 if (ndesc >= dd->ipath_sdma_descq_cnt) in ipath_verbs_send_dma()
1171 ret = ipath_sdma_verbs_send(dd, ss, dwords, tx); in ipath_verbs_send_dma()
1199 ret = ipath_sdma_verbs_send(dd, NULL, 0, tx); in ipath_verbs_send_dma()
1227 struct ipath_devdata *dd = to_idev(qp->ibqp.device)->dd; in ipath_verbs_send_pio() local
1235 piobuf = ipath_getpiobuf(dd, plen, NULL); in ipath_verbs_send_pio()
1247 qp->s_pkt_delay = ipath_pkt_delay(plen, dd->delay_mult, qp->s_dmult); in ipath_verbs_send_pio()
1261 flush_wc = dd->ipath_flags & IPATH_PIO_FLUSH_WC; in ipath_verbs_send_pio()
1325 struct ipath_devdata *dd = to_idev(qp->ibqp.device)->dd; in ipath_verbs_send() local
1342 !(dd->ipath_flags & IPATH_HAS_SEND_DMA)) in ipath_verbs_send()
1352 int ipath_snapshot_counters(struct ipath_devdata *dd, u64 *swords, in ipath_snapshot_counters() argument
1358 if (!(dd->ipath_flags & IPATH_INITTED)) { in ipath_snapshot_counters()
1363 *swords = ipath_snap_cntr(dd, dd->ipath_cregs->cr_wordsendcnt); in ipath_snapshot_counters()
1364 *rwords = ipath_snap_cntr(dd, dd->ipath_cregs->cr_wordrcvcnt); in ipath_snapshot_counters()
1365 *spkts = ipath_snap_cntr(dd, dd->ipath_cregs->cr_pktsendcnt); in ipath_snapshot_counters()
1366 *rpkts = ipath_snap_cntr(dd, dd->ipath_cregs->cr_pktrcvcnt); in ipath_snapshot_counters()
1367 *xmit_wait = ipath_snap_cntr(dd, dd->ipath_cregs->cr_sendstallcnt); in ipath_snapshot_counters()
1382 int ipath_get_counters(struct ipath_devdata *dd, in ipath_get_counters() argument
1385 struct ipath_cregs const *crp = dd->ipath_cregs; in ipath_get_counters()
1388 if (!(dd->ipath_flags & IPATH_INITTED)) { in ipath_get_counters()
1394 ipath_snap_cntr(dd, crp->cr_ibsymbolerrcnt); in ipath_get_counters()
1396 ipath_snap_cntr(dd, crp->cr_iblinkerrrecovcnt); in ipath_get_counters()
1403 ipath_snap_cntr(dd, crp->cr_iblinkdowncnt); in ipath_get_counters()
1405 ipath_snap_cntr(dd, crp->cr_rxdroppktcnt) + in ipath_get_counters()
1406 ipath_snap_cntr(dd, crp->cr_rcvovflcnt) + in ipath_get_counters()
1407 ipath_snap_cntr(dd, crp->cr_portovflcnt) + in ipath_get_counters()
1408 ipath_snap_cntr(dd, crp->cr_err_rlencnt) + in ipath_get_counters()
1409 ipath_snap_cntr(dd, crp->cr_invalidrlencnt) + in ipath_get_counters()
1410 ipath_snap_cntr(dd, crp->cr_errlinkcnt) + in ipath_get_counters()
1411 ipath_snap_cntr(dd, crp->cr_erricrccnt) + in ipath_get_counters()
1412 ipath_snap_cntr(dd, crp->cr_errvcrccnt) + in ipath_get_counters()
1413 ipath_snap_cntr(dd, crp->cr_errlpcrccnt) + in ipath_get_counters()
1414 ipath_snap_cntr(dd, crp->cr_badformatcnt) + in ipath_get_counters()
1415 dd->ipath_rxfc_unsupvl_errs; in ipath_get_counters()
1418 ipath_snap_cntr(dd, crp->cr_rxotherlocalphyerrcnt); in ipath_get_counters()
1421 ipath_snap_cntr(dd, crp->cr_rxvlerrcnt); in ipath_get_counters()
1423 ipath_snap_cntr(dd, crp->cr_rcvebpcnt); in ipath_get_counters()
1424 cntrs->port_xmit_discards = ipath_snap_cntr(dd, crp->cr_unsupvlcnt); in ipath_get_counters()
1425 cntrs->port_xmit_data = ipath_snap_cntr(dd, crp->cr_wordsendcnt); in ipath_get_counters()
1426 cntrs->port_rcv_data = ipath_snap_cntr(dd, crp->cr_wordrcvcnt); in ipath_get_counters()
1427 cntrs->port_xmit_packets = ipath_snap_cntr(dd, crp->cr_pktsendcnt); in ipath_get_counters()
1428 cntrs->port_rcv_packets = ipath_snap_cntr(dd, crp->cr_pktrcvcnt); in ipath_get_counters()
1431 ipath_snap_cntr(dd, crp->cr_locallinkintegrityerrcnt) : in ipath_get_counters()
1432 ((dd->ipath_flags & IPATH_GPIO_ERRINTRS) ? in ipath_get_counters()
1433 dd->ipath_lli_errs : dd->ipath_lli_errors); in ipath_get_counters()
1436 ipath_snap_cntr(dd, crp->cr_excessbufferovflcnt) : in ipath_get_counters()
1437 dd->ipath_overrun_thresh_errs; in ipath_get_counters()
1439 ipath_snap_cntr(dd, crp->cr_vl15droppedpktcnt) : 0; in ipath_get_counters()
1512 props->vendor_part_id = dev->dd->ipath_deviceid; in ipath_query_device()
1513 props->hw_ver = dev->dd->ipath_pcirev; in ipath_query_device()
1536 props->max_pkeys = ipath_get_npkeys(dev->dd); in ipath_query_device()
1575 u32 ipath_get_cr_errpkey(struct ipath_devdata *dd) in ipath_get_cr_errpkey() argument
1577 return ipath_read_creg32(dd, dd->ipath_cregs->cr_errpkey); in ipath_get_cr_errpkey()
1584 struct ipath_devdata *dd = dev->dd; in ipath_query_port() local
1586 u16 lid = dd->ipath_lid; in ipath_query_port()
1591 props->lmc = dd->ipath_lmc; in ipath_query_port()
1594 ibcstat = dd->ipath_lastibcstat; in ipath_query_port()
1596 props->state = ipath_ib_linkstate(dd, ibcstat) + 1; in ipath_query_port()
1600 ipath_cvt_physportstate[dd->ipath_lastibcstat & in ipath_query_port()
1601 dd->ibcs_lts_mask]; in ipath_query_port()
1605 props->pkey_tbl_len = ipath_get_npkeys(dd); in ipath_query_port()
1606 props->bad_pkey_cntr = ipath_get_cr_errpkey(dd) - in ipath_query_port()
1609 props->active_width = dd->ipath_link_width_active; in ipath_query_port()
1611 props->active_speed = dd->ipath_link_speed_active; in ipath_query_port()
1616 switch (dd->ipath_ibmtu) { in ipath_query_port()
1675 ipath_set_linkstate(dev->dd, IPATH_IB_LINKDOWN); in ipath_modify_port()
1692 gid->global.interface_id = dev->dd->ipath_guid; in ipath_query_gid()
1851 unsigned ipath_get_npkeys(struct ipath_devdata *dd) in ipath_get_npkeys() argument
1853 return ARRAY_SIZE(dd->ipath_pd[0]->port_pkeys); in ipath_get_npkeys()
1861 unsigned ipath_get_pkey(struct ipath_devdata *dd, unsigned index) in ipath_get_pkey() argument
1866 if (index >= ARRAY_SIZE(dd->ipath_pd[0]->port_pkeys)) in ipath_get_pkey()
1869 ret = dd->ipath_pd[0]->port_pkeys[index]; in ipath_get_pkey()
1880 if (index >= ipath_get_npkeys(dev->dd)) { in ipath_query_pkey()
1885 *pkey = ipath_get_pkey(dev->dd, index); in ipath_query_pkey()
1926 struct ipath_devdata *dd = (struct ipath_devdata *) arg; in __verbs_timer() local
1929 ipath_ib_timer(dd->verbs_dev); in __verbs_timer()
1931 mod_timer(&dd->verbs_timer, jiffies + 1); in __verbs_timer()
1934 static int enable_timer(struct ipath_devdata *dd) in enable_timer() argument
1946 if (dd->ipath_flags & IPATH_GPIO_INTR) { in enable_timer()
1947 ipath_write_kreg(dd, dd->ipath_kregs->kr_debugportselect, in enable_timer()
1950 dd->ipath_gpio_mask |= (u64) (1 << IPATH_GPIO_PORT0_BIT); in enable_timer()
1951 ipath_write_kreg(dd, dd->ipath_kregs->kr_gpio_mask, in enable_timer()
1952 dd->ipath_gpio_mask); in enable_timer()
1955 init_timer(&dd->verbs_timer); in enable_timer()
1956 dd->verbs_timer.function = __verbs_timer; in enable_timer()
1957 dd->verbs_timer.data = (unsigned long)dd; in enable_timer()
1958 dd->verbs_timer.expires = jiffies + 1; in enable_timer()
1959 add_timer(&dd->verbs_timer); in enable_timer()
1964 static int disable_timer(struct ipath_devdata *dd) in disable_timer() argument
1967 if (dd->ipath_flags & IPATH_GPIO_INTR) { in disable_timer()
1969 dd->ipath_gpio_mask &= ~((u64) (1 << IPATH_GPIO_PORT0_BIT)); in disable_timer()
1970 ipath_write_kreg(dd, dd->ipath_kregs->kr_gpio_mask, in disable_timer()
1971 dd->ipath_gpio_mask); in disable_timer()
1978 del_timer_sync(&dd->verbs_timer); in disable_timer()
1988 int ipath_register_ib_device(struct ipath_devdata *dd) in ipath_register_ib_device() argument
2005 if (dd->ipath_sdma_descq_cnt) { in ipath_register_ib_device()
2006 tx = kmalloc(dd->ipath_sdma_descq_cnt * sizeof *tx, in ipath_register_ib_device()
2060 if (dd->ipath_flags & IPATH_HAS_LINK_LATENCY) in ipath_register_ib_device()
2069 ipath_get_counters(dd, &cntrs); in ipath_register_ib_device()
2088 for (i = 0; i < dd->ipath_sdma_descq_cnt; i++, tx++) in ipath_register_ib_device()
2097 sys_image_guid = dd->ipath_guid; in ipath_register_ib_device()
2099 idev->ib_unit = dd->ipath_unit; in ipath_register_ib_device()
2100 idev->dd = dd; in ipath_register_ib_device()
2104 dev->node_guid = dd->ipath_guid; in ipath_register_ib_device()
2139 dev->dma_device = &dd->pcidev->dev; in ipath_register_ib_device()
2194 enable_timer(dd); in ipath_register_ib_device()
2208 ipath_dev_err(dd, "cannot register verbs: %d!\n", -ret); in ipath_register_ib_device()
2212 dd->verbs_dev = idev; in ipath_register_ib_device()
2223 disable_timer(dev->dd); in ipath_unregister_ib_device()
2228 ipath_dev_err(dev->dd, "pending list not empty!\n"); in ipath_unregister_ib_device()
2230 ipath_dev_err(dev->dd, "piowait list not empty!\n"); in ipath_unregister_ib_device()
2232 ipath_dev_err(dev->dd, "rnrwait list not empty!\n"); in ipath_unregister_ib_device()
2234 ipath_dev_err(dev->dd, "multicast table memory leak!\n"); in ipath_unregister_ib_device()
2241 ipath_dev_err(dev->dd, "QP memory leak! %u still in use\n", in ipath_unregister_ib_device()
2255 return sprintf(buf, "%x\n", dev->dd->ipath_pcirev); in show_rev()
2265 ret = dev->dd->ipath_f_get_boardname(dev->dd, buf, 128); in show_hca()