• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/drivers/infiniband/hw/ipath/

Lines Matching defs:dd

409 		if (unlikely(lid != dev->dd->ipath_lid)) {
523 ipath_snapshot_counters(dev->dd, &dev->ipath_sword,
534 ipath_snapshot_counters(dev->dd, &ta, &tb,
757 * @dd: the infinipath device
763 int ipath_verbs_send(struct ipath_devdata *dd, u32 hdrwords,
772 if (unlikely((plen << 2) > dd->ipath_ibmaxlen)) {
778 piobuf = ipath_getpiobuf(dd, NULL);
835 int ipath_snapshot_counters(struct ipath_devdata *dd, u64 *swords,
841 if (!(dd->ipath_flags & IPATH_INITTED)) {
843 ipath_dbg("unit %u not usable\n", dd->ipath_unit);
847 *swords = ipath_snap_cntr(dd, dd->ipath_cregs->cr_wordsendcnt);
848 *rwords = ipath_snap_cntr(dd, dd->ipath_cregs->cr_wordrcvcnt);
849 *spkts = ipath_snap_cntr(dd, dd->ipath_cregs->cr_pktsendcnt);
850 *rpkts = ipath_snap_cntr(dd, dd->ipath_cregs->cr_pktrcvcnt);
851 *xmit_wait = ipath_snap_cntr(dd, dd->ipath_cregs->cr_sendstallcnt);
861 * @dd: the infinipath device
866 int ipath_get_counters(struct ipath_devdata *dd,
871 if (!(dd->ipath_flags & IPATH_INITTED)) {
873 ipath_dbg("unit %u not usable\n", dd->ipath_unit);
878 ipath_snap_cntr(dd, dd->ipath_cregs->cr_ibsymbolerrcnt);
880 ipath_snap_cntr(dd, dd->ipath_cregs->cr_iblinkerrrecovcnt);
887 ipath_snap_cntr(dd, dd->ipath_cregs->cr_iblinkdowncnt);
889 ipath_snap_cntr(dd, dd->ipath_cregs->cr_rxdroppktcnt) +
890 ipath_snap_cntr(dd, dd->ipath_cregs->cr_rcvovflcnt) +
891 ipath_snap_cntr(dd, dd->ipath_cregs->cr_portovflcnt) +
892 ipath_snap_cntr(dd, dd->ipath_cregs->cr_err_rlencnt) +
893 ipath_snap_cntr(dd, dd->ipath_cregs->cr_invalidrlencnt) +
894 ipath_snap_cntr(dd, dd->ipath_cregs->cr_erricrccnt) +
895 ipath_snap_cntr(dd, dd->ipath_cregs->cr_errvcrccnt) +
896 ipath_snap_cntr(dd, dd->ipath_cregs->cr_errlpcrccnt) +
897 ipath_snap_cntr(dd, dd->ipath_cregs->cr_badformatcnt) +
898 dd->ipath_rxfc_unsupvl_errs;
900 ipath_snap_cntr(dd, dd->ipath_cregs->cr_rcvebpcnt);
902 ipath_snap_cntr(dd, dd->ipath_cregs->cr_unsupvlcnt);
904 ipath_snap_cntr(dd, dd->ipath_cregs->cr_wordsendcnt);
906 ipath_snap_cntr(dd, dd->ipath_cregs->cr_wordrcvcnt);
908 ipath_snap_cntr(dd, dd->ipath_cregs->cr_pktsendcnt);
910 ipath_snap_cntr(dd, dd->ipath_cregs->cr_pktrcvcnt);
912 (dd->ipath_flags & IPATH_GPIO_ERRINTRS) ?
913 dd->ipath_lli_errs : dd->ipath_lli_errors;
914 cntrs->excessive_buffer_overrun_errors = dd->ipath_overrun_thresh_errs;
964 props->vendor_id = dev->dd->ipath_vendorid;
965 props->vendor_part_id = dev->dd->ipath_deviceid;
966 props->hw_ver = dev->dd->ipath_pcirev;
987 props->max_pkeys = ipath_get_npkeys(dev->dd);
1012 u32 ipath_get_cr_errpkey(struct ipath_devdata *dd)
1014 return ipath_read_creg32(dd, dd->ipath_cregs->cr_errpkey);
1022 u16 lid = dev->dd->ipath_lid;
1030 ibcstat = dev->dd->ipath_lastibcstat;
1034 dev->dd->ipath_lastibcstat & 0xf];
1038 props->pkey_tbl_len = ipath_get_npkeys(dev->dd);
1039 props->bad_pkey_cntr = ipath_get_cr_errpkey(dev->dd) -
1049 switch (dev->dd->ipath_ibmtu) {
1108 ipath_set_linkstate(dev->dd, IPATH_IB_LINKDOWN);
1125 gid->global.interface_id = dev->dd->ipath_guid;
1280 * @dd: the infinipath device
1282 unsigned ipath_get_npkeys(struct ipath_devdata *dd)
1284 return ARRAY_SIZE(dd->ipath_pd[0]->port_pkeys);
1289 * @dd: the infinipath device
1292 unsigned ipath_get_pkey(struct ipath_devdata *dd, unsigned index)
1296 if (index >= ARRAY_SIZE(dd->ipath_pd[0]->port_pkeys))
1299 ret = dd->ipath_pd[0]->port_pkeys[index];
1310 if (index >= ipath_get_npkeys(dev->dd)) {
1315 *pkey = ipath_get_pkey(dev->dd, index);
1356 struct ipath_devdata *dd = (struct ipath_devdata *) arg;
1362 if (dd->ipath_flags & IPATH_POLL_RX_INTR)
1363 ipath_kreceive(dd);
1366 ipath_ib_timer(dd->verbs_dev);
1368 mod_timer(&dd->verbs_timer, jiffies + 1);
1371 static int enable_timer(struct ipath_devdata *dd)
1383 if (dd->ipath_flags & IPATH_GPIO_INTR) {
1384 ipath_write_kreg(dd, dd->ipath_kregs->kr_debugportselect,
1387 dd->ipath_gpio_mask |= (u64) (1 << IPATH_GPIO_PORT0_BIT);
1388 ipath_write_kreg(dd, dd->ipath_kregs->kr_gpio_mask,
1389 dd->ipath_gpio_mask);
1392 init_timer(&dd->verbs_timer);
1393 dd->verbs_timer.function = __verbs_timer;
1394 dd->verbs_timer.data = (unsigned long)dd;
1395 dd->verbs_timer.expires = jiffies + 1;
1396 add_timer(&dd->verbs_timer);
1401 static int disable_timer(struct ipath_devdata *dd)
1404 if (dd->ipath_flags & IPATH_GPIO_INTR) {
1407 val = ipath_read_kreg64(dd, dd->ipath_kregs->kr_gpio_mask);
1408 dd->ipath_gpio_mask &= ~((u64) (1 << IPATH_GPIO_PORT0_BIT));
1409 ipath_write_kreg(dd, dd->ipath_kregs->kr_gpio_mask,
1410 dd->ipath_gpio_mask);
1417 del_timer_sync(&dd->verbs_timer);
1424 * @dd: the device data structure
1427 int ipath_register_ib_device(struct ipath_devdata *dd)
1493 ipath_get_counters(dd, &cntrs);
1517 sys_image_guid = dd->ipath_guid;
1519 idev->ib_unit = dd->ipath_unit;
1520 idev->dd = dd;
1524 dev->node_guid = dd->ipath_guid;
1559 dev->dma_device = &dd->pcidev->dev;
1613 enable_timer(dd);
1625 ipath_dev_err(dd, "cannot register verbs: %d!\n", -ret);
1629 dd->verbs_dev = idev;
1637 disable_timer(dev->dd);
1644 ipath_dev_err(dev->dd, "pending list not empty!\n");
1646 ipath_dev_err(dev->dd, "piowait list not empty!\n");
1648 ipath_dev_err(dev->dd, "rnrwait list not empty!\n");
1650 ipath_dev_err(dev->dd, "multicast table memory leak!\n");
1666 return sprintf(buf, "%x\n", dev->dd->ipath_pcirev);
1675 ret = dev->dd->ipath_f_get_boardname(dev->dd, buf, 128);