Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0fd41363 authored by Bryan O'Sullivan's avatar Bryan O'Sullivan Committed by Roland Dreier
Browse files

IB/ipath: remove stale references to userspace SMA



When we first submitted a userspace subnet management agent, it was
rejected, so we left it out of the final driver submission.  This patch
removes a number of vestigial references to it.

Signed-off-by: default avatarBryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent b55f4f06
Loading
Loading
Loading
Loading
+3 −13
Original line number Diff line number Diff line
@@ -106,9 +106,9 @@ struct infinipath_stats {
	__u64 sps_ether_spkts;
	/* number of "ethernet" packets received by driver */
	__u64 sps_ether_rpkts;
	/* number of SMA packets sent by driver */
	/* number of SMA packets sent by driver. Obsolete. */
	__u64 sps_sma_spkts;
	/* number of SMA packets received by driver */
	/* number of SMA packets received by driver. Obsolete. */
	__u64 sps_sma_rpkts;
	/* number of times all ports rcvhdrq was full and packet dropped */
	__u64 sps_hdrqfull;
@@ -138,7 +138,7 @@ struct infinipath_stats {
	__u64 sps_pageunlocks;
	/*
	 * Number of packets dropped in kernel other than errors (ether
	 * packets if ipath not configured, sma/mad, etc.)
	 * packets if ipath not configured, etc.)
	 */
	__u64 sps_krdrops;
	/* pad for future growth */
@@ -153,8 +153,6 @@ struct infinipath_stats {
#define IPATH_STATUS_DISABLED      0x2	/* hardware disabled */
/* Device has been disabled via admin request */
#define IPATH_STATUS_ADMIN_DISABLED    0x4
#define IPATH_STATUS_OIB_SMA       0x8	/* ipath_mad kernel SMA running */
#define IPATH_STATUS_SMA          0x10	/* user SMA running */
/* Chip has been found and initted */
#define IPATH_STATUS_CHIP_PRESENT 0x20
/* IB link is at ACTIVE, usable for data traffic */
@@ -465,14 +463,6 @@ struct __ipath_sendpkt {
	struct ipath_iovec sps_iov[4];
};

/* Passed into SMA special file's ->read and ->write methods. */
struct ipath_sma_pkt
{
	__u32 unit;	/* unit on which to send packet */
	__u64 data;	/* address of payload in userspace */
	__u32 len;	/* length of payload */
};

/*
 * Data layout in I2C flash (for GUID, etc.)
 * All fields are little-endian binary unless otherwise stated
+0 −2
Original line number Diff line number Diff line
@@ -60,7 +60,6 @@
#define __IPATH_USER_SEND   0x1000	/* use user mode send */
#define __IPATH_KERNEL_SEND 0x2000	/* use kernel mode send */
#define __IPATH_EPKTDBG     0x4000	/* print ethernet packet data */
#define __IPATH_SMADBG      0x8000	/* sma packet debug */
#define __IPATH_IPATHDBG    0x10000	/* Ethernet (IPATH) gen debug */
#define __IPATH_IPATHWARN   0x20000	/* Ethernet (IPATH) warnings */
#define __IPATH_IPATHERR    0x40000	/* Ethernet (IPATH) errors */
@@ -84,7 +83,6 @@
/* print mmap/nopage stuff, not using VDBG any more */
#define __IPATH_MMDBG     0x0
#define __IPATH_EPKTDBG   0x0	/* print ethernet packet data */
#define __IPATH_SMADBG    0x0   /* process startup (init)/exit messages */
#define __IPATH_IPATHDBG  0x0	/* Ethernet (IPATH) table dump on */
#define __IPATH_IPATHWARN 0x0	/* Ethernet (IPATH) warnings on   */
#define __IPATH_IPATHERR  0x0	/* Ethernet (IPATH) errors on   */
+9 −8
Original line number Diff line number Diff line
@@ -64,7 +64,7 @@ static struct idr unit_table;
DEFINE_SPINLOCK(ipath_devs_lock);
LIST_HEAD(ipath_dev_list);

wait_queue_head_t ipath_sma_state_wait;
wait_queue_head_t ipath_state_wait;

unsigned ipath_debug = __IPATH_INFO;

@@ -618,15 +618,16 @@ void ipath_disarm_piobufs(struct ipath_devdata *dd, unsigned first,
static int ipath_wait_linkstate(struct ipath_devdata *dd, u32 state,
				int msecs)
{
	dd->ipath_sma_state_wanted = state;
	wait_event_interruptible_timeout(ipath_sma_state_wait,
	dd->ipath_state_wanted = state;
	wait_event_interruptible_timeout(ipath_state_wait,
					 (dd->ipath_flags & state),
					 msecs_to_jiffies(msecs));
	dd->ipath_sma_state_wanted = 0;
	dd->ipath_state_wanted = 0;

	if (!(dd->ipath_flags & state)) {
		u64 val;
		ipath_cdbg(SMA, "Didn't reach linkstate %s within %u ms\n",
		ipath_cdbg(VERBOSE, "Didn't reach linkstate %s within %u"
			   " ms\n",
			   /* test INIT ahead of DOWN, both can be set */
			   (state & IPATH_LINKINIT) ? "INIT" :
			   ((state & IPATH_LINKDOWN) ? "DOWN" :
@@ -1155,7 +1156,7 @@ int ipath_setrcvhdrsize(struct ipath_devdata *dd, unsigned rhdrsize)
 *
 * do appropriate marking as busy, etc.
 * returns buffer number if one found (>=0), negative number is error.
 * Used by ipath_sma_send_pkt and ipath_layer_send
 * Used by ipath_layer_send
 */
u32 __iomem *ipath_getpiobuf(struct ipath_devdata *dd, u32 * pbufnum)
{
@@ -1448,7 +1449,7 @@ static void ipath_set_ib_lstate(struct ipath_devdata *dd, int which)
	int linkcmd = (which >> INFINIPATH_IBCC_LINKCMD_SHIFT) &
			INFINIPATH_IBCC_LINKCMD_MASK;

	ipath_cdbg(SMA, "Trying to move unit %u to %s, current ltstate "
	ipath_cdbg(VERBOSE, "Trying to move unit %u to %s, current ltstate "
		   "is %s\n", dd->ipath_unit,
		   what[linkcmd],
		   ipath_ibcstatus_str[
@@ -1457,7 +1458,7 @@ static void ipath_set_ib_lstate(struct ipath_devdata *dd, int which)
			    INFINIPATH_IBCS_LINKTRAININGSTATE_SHIFT) &
			   INFINIPATH_IBCS_LINKTRAININGSTATE_MASK]);
	/* flush all queued sends when going to DOWN or INIT, to be sure that
	 * they don't block SMA and other MAD packets */
	 * they don't block MAD packets */
	if (!linkcmd || linkcmd == INFINIPATH_IBCC_LINKCMD_INIT) {
		ipath_write_kreg(dd, dd->ipath_kregs->kr_sendctrl,
				 INFINIPATH_S_ABORT);
+2 −2
Original line number Diff line number Diff line
@@ -1816,7 +1816,7 @@ int ipath_user_add(struct ipath_devdata *dd)
		if (ret < 0) {
			ipath_dev_err(dd, "Could not create wildcard "
				      "minor: error %d\n", -ret);
			goto bail_sma;
			goto bail_user;
		}

		atomic_set(&user_setup, 1);
@@ -1832,7 +1832,7 @@ int ipath_user_add(struct ipath_devdata *dd)

	goto bail;

bail_sma:
bail_user:
	user_cleanup();
bail:
	return ret;
+2 −2
Original line number Diff line number Diff line
@@ -191,8 +191,8 @@ static ssize_t atomic_port_info_read(struct file *file, char __user *buf,
	portinfo[4] = (dd->ipath_lid << 16);

	/*
	 * Notimpl yet SMLID (should we store this in the driver, in case
	 * SMA dies?)  CapabilityMask is 0, we don't support any of these
	 * Notimpl yet SMLID.
	 * CapabilityMask is 0, we don't support any of these
	 * DiagCode is 0; we don't store any diag info for now Notimpl yet
	 * M_KeyLeasePeriod (we don't support M_Key)
	 */
Loading