Lines Matching +full:dma +full:- +full:related

4  * Copyright (c) 2012 - 2017 Intel Corporation.  All rights reserved.
5 * Copyright (c) 2006 - 2012 QLogic Corporation. All rights reserved.
18 * - Redistributions of source code must retain the above
22 * - Redistributions in binary form must reproduce the above
44 #include <linux/dma-mapping.h>
73 * per driver stats, either not device nor port-specific, or
83 __u64 sps_txerrs; /* tx-related packet errors */
84 __u64 sps_rcverrs; /* non-crc rcv packet errors */
98 * First-cut critierion for "device is active" is
100 * 5-second interval. SMA packets are 64 dwords,
106 * Below contains all data related to a single context (formerly called port).
143 * number of opens (including slave sub-contexts) on this instance
155 /* non-zero if ctxt is being shared. */
157 /* non-zero if ctxt is being shared. */
179 /* per-context flags for fileops/intr communication */
271 * Get/Set IB link-level config parameters for f_get/set_ib_cfg()
276 #define QIB_IB_CFG_LWID_ENB 2 /* allowed Link-width */
277 #define QIB_IB_CFG_LWID 3 /* currently active Link-width */
280 #define QIB_IB_CFG_RXPOL_ENB 6 /* Auto-RX-polarity enable */
281 #define QIB_IB_CFG_LREV_ENB 7 /* Auto-Lane-reversal enable */
321 * These 7 values (SDR, DDR, and QDR may be ORed for auto-speed
365 * be "one-shot", so do not modify shadow.
380 * These are the generic indices for requesting per-port
385 /* send-related counters */
392 /* receive-related counters */
399 /* IB link related error counters */
447 * is chip-specific, per-port
517 * port-numbers are one-based. The first or only port is port1.
523 struct qib_chippport_specific *cpspec; /* chip-specific per-port */
528 /* QIB_POLL, etc. link-state specific flags, per port */
543 /* SendDMA related entries */
550 volatile __le64 *sdma_head_dma; /* DMA'ed by chip */
576 * Most of them are readonly, but some are write-only register,
588 /* last ibcstatus. opaque outside chip-specific code */
594 * the following two are 32-bit bitmasks, but {test,clear,set}_bit
597 unsigned long p_rcvctrl; /* shadow per-port rcvctrl */
598 unsigned long p_sendctrl; /* shadow per-port sendctrl */
629 u32 port; /* IB port number and index into dd->pports - 1 */
634 u8 led_override; /* Substituted for normal value, if non-zero */
636 u8 led_override_vals[2]; /* Alternates per blink-frame */
703 /* device data struct now contains only "general per-device" info.
704 * fields related to a physical IB port are in a qib_pportdata struct,
705 * described above) while fields only used by a particular chip-type are in
711 /* pointers to related structs for this device */
719 /* mem-mapped pointer to base of chip regs */
721 /* end of mem-mapped chip space excluding sendbuf and user regs */
728 /* qib_pportdata, points to array of (physical) port-specific
729 * data structs, indexed by pidx (0..n-1)
732 struct qib_chip_specific *cspec; /* chip-specific */
738 /* mem-mapped pointer to base of PIO buffers (if using WC PAT) */
740 /* mem-mapped pointer to base of user chip regs (if using WC PAT) */
744 * points to area where PIOavail registers will be DMA'ed.
747 * written by DMA, not by the driver! Need a copy per device
750 volatile __le64 *pioavailregs_dma; /* DMA'ed by chip */
754 /* device-specific implementations of functions needed by
756 * really just point to a device-specific table, because we
771 /* fill out chip-specific fields */
789 /* Read/modify/write of GPIO pins (potentially chip-specific */
795 * modify rcvctrl shadow[s] and write to appropriate chip-regs.
797 * (ctxt == -1) means "all contexts", only meaningful for
891 /* shadow copy of dma handles for exp tid pages */
927 * Most of them are readonly, but some are write-only register,
964 * the following two are 32-bit bitmasks, but {test,clear,set}_bit
1051 * GPIO pins for twsi-connected devices, and device code for eeprom
1061 /* control high-level access to EEPROM */
1102 int rec_cpu_num; /* for cpu affinity; -1 if none */
1134 /* clean up any per-chip chip-specific stuff */
1136 /* clean up any chip type-specific stuff */
1171 (((struct qib_filedata *)(fp)->private_data)->rcd)
1173 (((struct qib_filedata *)(fp)->private_data)->subctxt)
1175 (((struct qib_filedata *)(fp)->private_data)->tidcursor)
1177 (((struct qib_filedata *)(fp)->private_data)->pq)
1181 return ppd->dd; in dd_from_ppd()
1202 u32 pidx = port - 1; /* IB number port from 1, hdw from 0 */ in to_iport()
1204 WARN_ON(pidx >= dd->num_pports); in to_iport()
1205 return &dd->pport[pidx].ibport_data; in to_iport()
1209 * values for dd->flags (_device_ related flags) and
1219 #define QIB_NODMA_RTAIL 0x200 /* rcvhdrtail register DMA enabled */
1221 #define QIB_HAS_SEND_DMA 0x1000 /* Supports Send DMA */
1230 * values for ppd->lflags (_ib_port_ related flags)
1237 /* leave a gap for more IB-link state */
1238 #define QIBL_IB_AUTONEG_INPROG 0x1000 /* non-IBTA DDR/QDR neg active */
1239 #define QIBL_IB_AUTONEG_FAILED 0x2000 /* non-IBTA DDR/QDR neg failed */
1240 #define QIBL_IB_LINK_DISABLED 0x4000 /* Linkdown-disable forced,
1245 #define QIB_PBC_LENGTH_MASK ((1 << 11) - 1)
1283 * any non-zero value substitutes them for the Link and LinkTrain
1290 /* send dma routines */
1299 /* ppd->sdma_lock should be locked before calling this. */
1305 return ppd->sdma_descq_cnt - in qib_sdma_descq_freecnt()
1306 (ppd->sdma_descq_added - ppd->sdma_descq_removed) - 1; in qib_sdma_descq_freecnt()
1311 return ppd->sdma_state.current_state == qib_sdma_state_s99_running; in __qib_sdma_running()
1328 * benefit quite strongly from having the DMA'ed data be cacheline
1330 * (2 64-byte primary cachelines for pretty much all processors of
1345 *((u64 *) rcd->rcvhdrtail_kvaddr) = 0ULL; in qib_clear_rcvhdrtail()
1351 * volatile because it's a DMA target from the chip, routine is in qib_get_rcvhdrtail()
1355 *((volatile __le64 *)rcd->rcvhdrtail_kvaddr)); /* DMA'ed */ in qib_get_rcvhdrtail()
1392 * dma_addr wrappers - all 0's invalid for hw
1441 * allocated, or when dd->pcidev may not be valid, and at the tail end of
1452 dev_err(&(dd)->pcidev->dev, "%s: " fmt, \
1453 rvt_get_ibdev_name(&(dd)->verbs_dev.rdi), ##__VA_ARGS__)
1456 dev_warn(&(dd)->pcidev->dev, "%s: " fmt, \
1457 rvt_get_ibdev_name(&(dd)->verbs_dev.rdi), ##__VA_ARGS__)
1460 dev_err(&(dd)->pcidev->dev, "%s: IB%u:%u " fmt, \
1461 rvt_get_ibdev_name(&(dd)->verbs_dev.rdi), (dd)->unit, (port), \
1465 dev_info(&(pcidev)->dev, fmt, ##__VA_ARGS__)