Lines Matching +full:per +full:- +full:port +full:- +full:set
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
99 * two thousand dwords combined Tx, Rx traffic per
100 * 5-second interval. SMA packets are 64 dwords,
101 * and occur "a few per second", presumably each way.
106 * Below contains all data related to a single context (formerly called port).
128 * or QIB_CMD_ACK_EVENT with IPATH_EVENT_DISARM_BUFS set.
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. */
171 /* how many egrbufs per chunk */
179 /* per-context flags for fileops/intr communication */
200 /* pkeys set by this use of this ctxt */
204 /* so funcs that need physical port can get it easily */
226 /* verbs stats per CTX */
271 * Get/Set IB link-level config parameters for f_get/set_ib_cfg()
272 * Mostly for MADs that set or query link parameters, also ipath
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 */
295 #define QIB_IB_CFG_PORT 21 /* switch port we are connected to */
299 * IB_LINKINITCMD_POLL and SLEEP are also used as set/get values for
321 * These 7 values (SDR, DDR, and QDR may be ORed for auto-speed
333 /* max number of IB ports supported per HCA */
339 #define QIB_IB_TBL_VL_HIGH_ARB 1 /* Get/set VL high priority weights */
340 #define QIB_IB_TBL_VL_LOW_ARB 2 /* Get/set VL low priority weights */
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 */
447 * is chip-specific, per-port
514 * The structure below encapsulates data relevant to a physical IB Port.
515 * Current chips support only one such port, but the separation
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 */
539 * get status cheaply, whenever they want. One qword of status per port
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 */
613 /* list of pkeys programmed; 0 if not set */
628 u8 hw_pidx; /* physical port index */
629 u32 port; /* IB port number and index into dd->pports - 1 */ member
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
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) */
747 * written by DMA, not by the driver! Need a copy per device
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 */
786 /* per chip actions needed for IB Link up/down changes */
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
802 /* Read/modify/write sendctrl appropriately for op and port. */
845 /* device (not port) flags, basically device capabilities */
855 /* pio bufs allocated per ctxt */
860 * number of ctxts configured as max; zero is set to number chip
898 * per unit status, see also portdata statusp
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
967 unsigned long rcvctrl; /* shadow per device rcvctrl */
968 unsigned long sendctrl; /* shadow per device sendctrl */
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()
1199 static inline struct qib_ibport *to_iport(struct ib_device *ibdev, u32 port) in to_iport() argument
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
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)
1282 * Set LED override, only the two LSBs have "public" meaning, but
1283 * any non-zero value substitutes them for the Link and LinkTrain
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()
1319 * number of words used for protocol header if not set by qib_userinit();
1329 * aligned and a cacheline multiple, so we set the size to 32 dwords
1330 * (2 64-byte primary cachelines for pretty much all processors of
1345 *((u64 *) rcd->rcvhdrtail_kvaddr) = 0ULL; in qib_clear_rcvhdrtail()
1355 *((volatile __le64 *)rcd->rcvhdrtail_kvaddr)); /* DMA'ed */ in qib_get_rcvhdrtail()
1392 * dma_addr wrappers - all 0's invalid for hw
1414 extern ushort qib_mini_init; /* If set, do few (ideally 0) writes to chip */
1441 * allocated, or when dd->pcidev may not be valid, and at the tail end of
1444 * the IB port# to be definitive as to what's happening..
1446 * first to avoid possible serial port delays from printk.
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__)
1459 #define qib_dev_porterr(dd, port, fmt, ...) \ argument
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__)