aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan O'Sullivan <bos@pathscale.com>2006-08-25 14:24:34 -0400
committerRoland Dreier <rolandd@cisco.com>2006-09-22 18:22:32 -0400
commit0fd41363e0785247b7c19127318abc8b5eacc86b (patch)
treebf71d78bd12008367e1c0293280a50a9628133f3
parentb55f4f06c834a67f949a5219c5f97ffafa240989 (diff)
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: Bryan O'Sullivan <bryan.osullivan@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
-rw-r--r--drivers/infiniband/hw/ipath/ipath_common.h16
-rw-r--r--drivers/infiniband/hw/ipath/ipath_debug.h2
-rw-r--r--drivers/infiniband/hw/ipath/ipath_driver.c17
-rw-r--r--drivers/infiniband/hw/ipath/ipath_file_ops.c4
-rw-r--r--drivers/infiniband/hw/ipath/ipath_fs.c4
-rw-r--r--drivers/infiniband/hw/ipath/ipath_init_chip.c12
-rw-r--r--drivers/infiniband/hw/ipath/ipath_intr.c14
-rw-r--r--drivers/infiniband/hw/ipath/ipath_kernel.h11
-rw-r--r--drivers/infiniband/hw/ipath/ipath_layer.c3
-rw-r--r--drivers/infiniband/hw/ipath/ipath_layer.h3
-rw-r--r--drivers/infiniband/hw/ipath/ipath_qp.c35
-rw-r--r--drivers/infiniband/hw/ipath/ipath_stats.c27
-rw-r--r--drivers/infiniband/hw/ipath/ipath_sysfs.c4
-rw-r--r--drivers/infiniband/hw/ipath/ipath_verbs.c2
14 files changed, 35 insertions, 119 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_common.h b/drivers/infiniband/hw/ipath/ipath_common.h
index 062bd392e7e5..f8df3b771c26 100644
--- a/drivers/infiniband/hw/ipath/ipath_common.h
+++ b/drivers/infiniband/hw/ipath/ipath_common.h
@@ -106,9 +106,9 @@ struct infinipath_stats {
106 __u64 sps_ether_spkts; 106 __u64 sps_ether_spkts;
107 /* number of "ethernet" packets received by driver */ 107 /* number of "ethernet" packets received by driver */
108 __u64 sps_ether_rpkts; 108 __u64 sps_ether_rpkts;
109 /* number of SMA packets sent by driver */ 109 /* number of SMA packets sent by driver. Obsolete. */
110 __u64 sps_sma_spkts; 110 __u64 sps_sma_spkts;
111 /* number of SMA packets received by driver */ 111 /* number of SMA packets received by driver. Obsolete. */
112 __u64 sps_sma_rpkts; 112 __u64 sps_sma_rpkts;
113 /* number of times all ports rcvhdrq was full and packet dropped */ 113 /* number of times all ports rcvhdrq was full and packet dropped */
114 __u64 sps_hdrqfull; 114 __u64 sps_hdrqfull;
@@ -138,7 +138,7 @@ struct infinipath_stats {
138 __u64 sps_pageunlocks; 138 __u64 sps_pageunlocks;
139 /* 139 /*
140 * Number of packets dropped in kernel other than errors (ether 140 * Number of packets dropped in kernel other than errors (ether
141 * packets if ipath not configured, sma/mad, etc.) 141 * packets if ipath not configured, etc.)
142 */ 142 */
143 __u64 sps_krdrops; 143 __u64 sps_krdrops;
144 /* pad for future growth */ 144 /* pad for future growth */
@@ -153,8 +153,6 @@ struct infinipath_stats {
153#define IPATH_STATUS_DISABLED 0x2 /* hardware disabled */ 153#define IPATH_STATUS_DISABLED 0x2 /* hardware disabled */
154/* Device has been disabled via admin request */ 154/* Device has been disabled via admin request */
155#define IPATH_STATUS_ADMIN_DISABLED 0x4 155#define IPATH_STATUS_ADMIN_DISABLED 0x4
156#define IPATH_STATUS_OIB_SMA 0x8 /* ipath_mad kernel SMA running */
157#define IPATH_STATUS_SMA 0x10 /* user SMA running */
158/* Chip has been found and initted */ 156/* Chip has been found and initted */
159#define IPATH_STATUS_CHIP_PRESENT 0x20 157#define IPATH_STATUS_CHIP_PRESENT 0x20
160/* IB link is at ACTIVE, usable for data traffic */ 158/* IB link is at ACTIVE, usable for data traffic */
@@ -465,14 +463,6 @@ struct __ipath_sendpkt {
465 struct ipath_iovec sps_iov[4]; 463 struct ipath_iovec sps_iov[4];
466}; 464};
467 465
468/* Passed into SMA special file's ->read and ->write methods. */
469struct ipath_sma_pkt
470{
471 __u32 unit; /* unit on which to send packet */
472 __u64 data; /* address of payload in userspace */
473 __u32 len; /* length of payload */
474};
475
476/* 466/*
477 * Data layout in I2C flash (for GUID, etc.) 467 * Data layout in I2C flash (for GUID, etc.)
478 * All fields are little-endian binary unless otherwise stated 468 * All fields are little-endian binary unless otherwise stated
diff --git a/drivers/infiniband/hw/ipath/ipath_debug.h b/drivers/infiniband/hw/ipath/ipath_debug.h
index f415beda0d32..df69f0d80b8b 100644
--- a/drivers/infiniband/hw/ipath/ipath_debug.h
+++ b/drivers/infiniband/hw/ipath/ipath_debug.h
@@ -60,7 +60,6 @@
60#define __IPATH_USER_SEND 0x1000 /* use user mode send */ 60#define __IPATH_USER_SEND 0x1000 /* use user mode send */
61#define __IPATH_KERNEL_SEND 0x2000 /* use kernel mode send */ 61#define __IPATH_KERNEL_SEND 0x2000 /* use kernel mode send */
62#define __IPATH_EPKTDBG 0x4000 /* print ethernet packet data */ 62#define __IPATH_EPKTDBG 0x4000 /* print ethernet packet data */
63#define __IPATH_SMADBG 0x8000 /* sma packet debug */
64#define __IPATH_IPATHDBG 0x10000 /* Ethernet (IPATH) gen debug */ 63#define __IPATH_IPATHDBG 0x10000 /* Ethernet (IPATH) gen debug */
65#define __IPATH_IPATHWARN 0x20000 /* Ethernet (IPATH) warnings */ 64#define __IPATH_IPATHWARN 0x20000 /* Ethernet (IPATH) warnings */
66#define __IPATH_IPATHERR 0x40000 /* Ethernet (IPATH) errors */ 65#define __IPATH_IPATHERR 0x40000 /* Ethernet (IPATH) errors */
@@ -84,7 +83,6 @@
84/* print mmap/nopage stuff, not using VDBG any more */ 83/* print mmap/nopage stuff, not using VDBG any more */
85#define __IPATH_MMDBG 0x0 84#define __IPATH_MMDBG 0x0
86#define __IPATH_EPKTDBG 0x0 /* print ethernet packet data */ 85#define __IPATH_EPKTDBG 0x0 /* print ethernet packet data */
87#define __IPATH_SMADBG 0x0 /* process startup (init)/exit messages */
88#define __IPATH_IPATHDBG 0x0 /* Ethernet (IPATH) table dump on */ 86#define __IPATH_IPATHDBG 0x0 /* Ethernet (IPATH) table dump on */
89#define __IPATH_IPATHWARN 0x0 /* Ethernet (IPATH) warnings on */ 87#define __IPATH_IPATHWARN 0x0 /* Ethernet (IPATH) warnings on */
90#define __IPATH_IPATHERR 0x0 /* Ethernet (IPATH) errors on */ 88#define __IPATH_IPATHERR 0x0 /* Ethernet (IPATH) errors on */
diff --git a/drivers/infiniband/hw/ipath/ipath_driver.c b/drivers/infiniband/hw/ipath/ipath_driver.c
index e6261bb9a8a1..520c38f13868 100644
--- a/drivers/infiniband/hw/ipath/ipath_driver.c
+++ b/drivers/infiniband/hw/ipath/ipath_driver.c
@@ -64,7 +64,7 @@ static struct idr unit_table;
64DEFINE_SPINLOCK(ipath_devs_lock); 64DEFINE_SPINLOCK(ipath_devs_lock);
65LIST_HEAD(ipath_dev_list); 65LIST_HEAD(ipath_dev_list);
66 66
67wait_queue_head_t ipath_sma_state_wait; 67wait_queue_head_t ipath_state_wait;
68 68
69unsigned ipath_debug = __IPATH_INFO; 69unsigned ipath_debug = __IPATH_INFO;
70 70
@@ -618,15 +618,16 @@ void ipath_disarm_piobufs(struct ipath_devdata *dd, unsigned first,
618static int ipath_wait_linkstate(struct ipath_devdata *dd, u32 state, 618static int ipath_wait_linkstate(struct ipath_devdata *dd, u32 state,
619 int msecs) 619 int msecs)
620{ 620{
621 dd->ipath_sma_state_wanted = state; 621 dd->ipath_state_wanted = state;
622 wait_event_interruptible_timeout(ipath_sma_state_wait, 622 wait_event_interruptible_timeout(ipath_state_wait,
623 (dd->ipath_flags & state), 623 (dd->ipath_flags & state),
624 msecs_to_jiffies(msecs)); 624 msecs_to_jiffies(msecs));
625 dd->ipath_sma_state_wanted = 0; 625 dd->ipath_state_wanted = 0;
626 626
627 if (!(dd->ipath_flags & state)) { 627 if (!(dd->ipath_flags & state)) {
628 u64 val; 628 u64 val;
629 ipath_cdbg(SMA, "Didn't reach linkstate %s within %u ms\n", 629 ipath_cdbg(VERBOSE, "Didn't reach linkstate %s within %u"
630 " ms\n",
630 /* test INIT ahead of DOWN, both can be set */ 631 /* test INIT ahead of DOWN, both can be set */
631 (state & IPATH_LINKINIT) ? "INIT" : 632 (state & IPATH_LINKINIT) ? "INIT" :
632 ((state & IPATH_LINKDOWN) ? "DOWN" : 633 ((state & IPATH_LINKDOWN) ? "DOWN" :
@@ -1155,7 +1156,7 @@ int ipath_setrcvhdrsize(struct ipath_devdata *dd, unsigned rhdrsize)
1155 * 1156 *
1156 * do appropriate marking as busy, etc. 1157 * do appropriate marking as busy, etc.
1157 * returns buffer number if one found (>=0), negative number is error. 1158 * returns buffer number if one found (>=0), negative number is error.
1158 * Used by ipath_sma_send_pkt and ipath_layer_send 1159 * Used by ipath_layer_send
1159 */ 1160 */
1160u32 __iomem *ipath_getpiobuf(struct ipath_devdata *dd, u32 * pbufnum) 1161u32 __iomem *ipath_getpiobuf(struct ipath_devdata *dd, u32 * pbufnum)
1161{ 1162{
@@ -1448,7 +1449,7 @@ static void ipath_set_ib_lstate(struct ipath_devdata *dd, int which)
1448 int linkcmd = (which >> INFINIPATH_IBCC_LINKCMD_SHIFT) & 1449 int linkcmd = (which >> INFINIPATH_IBCC_LINKCMD_SHIFT) &
1449 INFINIPATH_IBCC_LINKCMD_MASK; 1450 INFINIPATH_IBCC_LINKCMD_MASK;
1450 1451
1451 ipath_cdbg(SMA, "Trying to move unit %u to %s, current ltstate " 1452 ipath_cdbg(VERBOSE, "Trying to move unit %u to %s, current ltstate "
1452 "is %s\n", dd->ipath_unit, 1453 "is %s\n", dd->ipath_unit,
1453 what[linkcmd], 1454 what[linkcmd],
1454 ipath_ibcstatus_str[ 1455 ipath_ibcstatus_str[
@@ -1457,7 +1458,7 @@ static void ipath_set_ib_lstate(struct ipath_devdata *dd, int which)
1457 INFINIPATH_IBCS_LINKTRAININGSTATE_SHIFT) & 1458 INFINIPATH_IBCS_LINKTRAININGSTATE_SHIFT) &
1458 INFINIPATH_IBCS_LINKTRAININGSTATE_MASK]); 1459 INFINIPATH_IBCS_LINKTRAININGSTATE_MASK]);
1459 /* flush all queued sends when going to DOWN or INIT, to be sure that 1460 /* flush all queued sends when going to DOWN or INIT, to be sure that
1460 * they don't block SMA and other MAD packets */ 1461 * they don't block MAD packets */
1461 if (!linkcmd || linkcmd == INFINIPATH_IBCC_LINKCMD_INIT) { 1462 if (!linkcmd || linkcmd == INFINIPATH_IBCC_LINKCMD_INIT) {
1462 ipath_write_kreg(dd, dd->ipath_kregs->kr_sendctrl, 1463 ipath_write_kreg(dd, dd->ipath_kregs->kr_sendctrl,
1463 INFINIPATH_S_ABORT); 1464 INFINIPATH_S_ABORT);
diff --git a/drivers/infiniband/hw/ipath/ipath_file_ops.c b/drivers/infiniband/hw/ipath/ipath_file_ops.c
index f865ce89b73f..4080fed2dcd9 100644
--- a/drivers/infiniband/hw/ipath/ipath_file_ops.c
+++ b/drivers/infiniband/hw/ipath/ipath_file_ops.c
@@ -1816,7 +1816,7 @@ int ipath_user_add(struct ipath_devdata *dd)
1816 if (ret < 0) { 1816 if (ret < 0) {
1817 ipath_dev_err(dd, "Could not create wildcard " 1817 ipath_dev_err(dd, "Could not create wildcard "
1818 "minor: error %d\n", -ret); 1818 "minor: error %d\n", -ret);
1819 goto bail_sma; 1819 goto bail_user;
1820 } 1820 }
1821 1821
1822 atomic_set(&user_setup, 1); 1822 atomic_set(&user_setup, 1);
@@ -1832,7 +1832,7 @@ int ipath_user_add(struct ipath_devdata *dd)
1832 1832
1833 goto bail; 1833 goto bail;
1834 1834
1835bail_sma: 1835bail_user:
1836 user_cleanup(); 1836 user_cleanup();
1837bail: 1837bail:
1838 return ret; 1838 return ret;
diff --git a/drivers/infiniband/hw/ipath/ipath_fs.c b/drivers/infiniband/hw/ipath/ipath_fs.c
index 0936d8e8d704..a5eb30a06a5c 100644
--- a/drivers/infiniband/hw/ipath/ipath_fs.c
+++ b/drivers/infiniband/hw/ipath/ipath_fs.c
@@ -191,8 +191,8 @@ static ssize_t atomic_port_info_read(struct file *file, char __user *buf,
191 portinfo[4] = (dd->ipath_lid << 16); 191 portinfo[4] = (dd->ipath_lid << 16);
192 192
193 /* 193 /*
194 * Notimpl yet SMLID (should we store this in the driver, in case 194 * Notimpl yet SMLID.
195 * SMA dies?) CapabilityMask is 0, we don't support any of these 195 * CapabilityMask is 0, we don't support any of these
196 * DiagCode is 0; we don't store any diag info for now Notimpl yet 196 * DiagCode is 0; we don't store any diag info for now Notimpl yet
197 * M_KeyLeasePeriod (we don't support M_Key) 197 * M_KeyLeasePeriod (we don't support M_Key)
198 */ 198 */
diff --git a/drivers/infiniband/hw/ipath/ipath_init_chip.c b/drivers/infiniband/hw/ipath/ipath_init_chip.c
index 75c372136702..44669dc2e22d 100644
--- a/drivers/infiniband/hw/ipath/ipath_init_chip.c
+++ b/drivers/infiniband/hw/ipath/ipath_init_chip.c
@@ -53,8 +53,8 @@ module_param_named(cfgports, ipath_cfgports, ushort, S_IRUGO);
53MODULE_PARM_DESC(cfgports, "Set max number of ports to use"); 53MODULE_PARM_DESC(cfgports, "Set max number of ports to use");
54 54
55/* 55/*
56 * Number of buffers reserved for driver (layered drivers and SMA 56 * Number of buffers reserved for driver (verbs and layered drivers.)
57 * send). Reserved at end of buffer list. Initialized based on 57 * Reserved at end of buffer list. Initialized based on
58 * number of PIO buffers if not set via module interface. 58 * number of PIO buffers if not set via module interface.
59 * The problem with this is that it's global, but we'll use different 59 * The problem with this is that it's global, but we'll use different
60 * numbers for different chip types. So the default value is not 60 * numbers for different chip types. So the default value is not
@@ -80,7 +80,7 @@ MODULE_PARM_DESC(kpiobufs, "Set number of PIO buffers for driver");
80 * 80 *
81 * Allocate the eager TID buffers and program them into infinipath. 81 * Allocate the eager TID buffers and program them into infinipath.
82 * We use the network layer alloc_skb() allocator to allocate the 82 * We use the network layer alloc_skb() allocator to allocate the
83 * memory, and either use the buffers as is for things like SMA 83 * memory, and either use the buffers as is for things like verbs
84 * packets, or pass the buffers up to the ipath layered driver and 84 * packets, or pass the buffers up to the ipath layered driver and
85 * thence the network layer, replacing them as we do so (see 85 * thence the network layer, replacing them as we do so (see
86 * ipath_rcv_layer()). 86 * ipath_rcv_layer()).
@@ -450,9 +450,9 @@ static void enable_chip(struct ipath_devdata *dd,
450 u32 val; 450 u32 val;
451 int i; 451 int i;
452 452
453 if (!reinit) { 453 if (!reinit)
454 init_waitqueue_head(&ipath_sma_state_wait); 454 init_waitqueue_head(&ipath_state_wait);
455 } 455
456 ipath_write_kreg(dd, dd->ipath_kregs->kr_rcvctrl, 456 ipath_write_kreg(dd, dd->ipath_kregs->kr_rcvctrl,
457 dd->ipath_rcvctrl); 457 dd->ipath_rcvctrl);
458 458
diff --git a/drivers/infiniband/hw/ipath/ipath_intr.c b/drivers/infiniband/hw/ipath/ipath_intr.c
index 250e2a9f01bb..49bf7bb15b04 100644
--- a/drivers/infiniband/hw/ipath/ipath_intr.c
+++ b/drivers/infiniband/hw/ipath/ipath_intr.c
@@ -201,7 +201,7 @@ static void handle_e_ibstatuschanged(struct ipath_devdata *dd,
201 ib_linkstate(lstate)); 201 ib_linkstate(lstate));
202 } 202 }
203 else 203 else
204 ipath_cdbg(SMA, "Unit %u link state %s, last " 204 ipath_cdbg(VERBOSE, "Unit %u link state %s, last "
205 "was %s\n", dd->ipath_unit, 205 "was %s\n", dd->ipath_unit,
206 ib_linkstate(lstate), 206 ib_linkstate(lstate),
207 ib_linkstate((unsigned) 207 ib_linkstate((unsigned)
@@ -213,7 +213,7 @@ static void handle_e_ibstatuschanged(struct ipath_devdata *dd,
213 if (lstate == IPATH_IBSTATE_INIT || 213 if (lstate == IPATH_IBSTATE_INIT ||
214 lstate == IPATH_IBSTATE_ARM || 214 lstate == IPATH_IBSTATE_ARM ||
215 lstate == IPATH_IBSTATE_ACTIVE) 215 lstate == IPATH_IBSTATE_ACTIVE)
216 ipath_cdbg(SMA, "Unit %u link state down" 216 ipath_cdbg(VERBOSE, "Unit %u link state down"
217 " (state 0x%x), from %s\n", 217 " (state 0x%x), from %s\n",
218 dd->ipath_unit, 218 dd->ipath_unit,
219 (u32)val & IPATH_IBSTATE_MASK, 219 (u32)val & IPATH_IBSTATE_MASK,
@@ -269,7 +269,7 @@ static void handle_e_ibstatuschanged(struct ipath_devdata *dd,
269 INFINIPATH_IBCS_LINKSTATE_MASK) 269 INFINIPATH_IBCS_LINKSTATE_MASK)
270 == INFINIPATH_IBCS_L_STATE_ACTIVE) 270 == INFINIPATH_IBCS_L_STATE_ACTIVE)
271 /* if from up to down be more vocal */ 271 /* if from up to down be more vocal */
272 ipath_cdbg(SMA, 272 ipath_cdbg(VERBOSE,
273 "Unit %u link now down (%s)\n", 273 "Unit %u link now down (%s)\n",
274 dd->ipath_unit, 274 dd->ipath_unit,
275 ipath_ibcstatus_str[ltstate]); 275 ipath_ibcstatus_str[ltstate]);
@@ -596,11 +596,11 @@ static int handle_errors(struct ipath_devdata *dd, ipath_err_t errs)
596 596
597 if (!noprint && *msg) 597 if (!noprint && *msg)
598 ipath_dev_err(dd, "%s error\n", msg); 598 ipath_dev_err(dd, "%s error\n", msg);
599 if (dd->ipath_sma_state_wanted & dd->ipath_flags) { 599 if (dd->ipath_state_wanted & dd->ipath_flags) {
600 ipath_cdbg(VERBOSE, "sma wanted state %x, iflags now %x, " 600 ipath_cdbg(VERBOSE, "driver wanted state %x, iflags now %x, "
601 "waking\n", dd->ipath_sma_state_wanted, 601 "waking\n", dd->ipath_state_wanted,
602 dd->ipath_flags); 602 dd->ipath_flags);
603 wake_up_interruptible(&ipath_sma_state_wait); 603 wake_up_interruptible(&ipath_state_wait);
604 } 604 }
605 605
606 return chkerrpkts; 606 return chkerrpkts;
diff --git a/drivers/infiniband/hw/ipath/ipath_kernel.h b/drivers/infiniband/hw/ipath/ipath_kernel.h
index af342314b368..a600347bba6a 100644
--- a/drivers/infiniband/hw/ipath/ipath_kernel.h
+++ b/drivers/infiniband/hw/ipath/ipath_kernel.h
@@ -245,8 +245,8 @@ struct ipath_devdata {
245 u32 ipath_pioavregs; 245 u32 ipath_pioavregs;
246 /* IPATH_POLL, etc. */ 246 /* IPATH_POLL, etc. */
247 u32 ipath_flags; 247 u32 ipath_flags;
248 /* ipath_flags sma is waiting for */ 248 /* ipath_flags driver is waiting for */
249 u32 ipath_sma_state_wanted; 249 u32 ipath_state_wanted;
250 /* last buffer for user use, first buf for kernel use is this 250 /* last buffer for user use, first buf for kernel use is this
251 * index. */ 251 * index. */
252 u32 ipath_lastport_piobuf; 252 u32 ipath_lastport_piobuf;
@@ -306,10 +306,6 @@ struct ipath_devdata {
306 u32 ipath_pcibar0; 306 u32 ipath_pcibar0;
307 /* so we can rewrite it after a chip reset */ 307 /* so we can rewrite it after a chip reset */
308 u32 ipath_pcibar1; 308 u32 ipath_pcibar1;
309 /* sequential tries for SMA send and no bufs */
310 u32 ipath_nosma_bufs;
311 /* duration (seconds) ipath_nosma_bufs set */
312 u32 ipath_nosma_secs;
313 309
314 /* HT/PCI Vendor ID (here for NodeInfo) */ 310 /* HT/PCI Vendor ID (here for NodeInfo) */
315 u16 ipath_vendorid; 311 u16 ipath_vendorid;
@@ -534,7 +530,7 @@ int ipath_diag_add(struct ipath_devdata *);
534void ipath_diag_remove(struct ipath_devdata *); 530void ipath_diag_remove(struct ipath_devdata *);
535void ipath_diag_bringup_link(struct ipath_devdata *); 531void ipath_diag_bringup_link(struct ipath_devdata *);
536 532
537extern wait_queue_head_t ipath_sma_state_wait; 533extern wait_queue_head_t ipath_state_wait;
538 534
539int ipath_user_add(struct ipath_devdata *dd); 535int ipath_user_add(struct ipath_devdata *dd);
540void ipath_user_remove(struct ipath_devdata *dd); 536void ipath_user_remove(struct ipath_devdata *dd);
@@ -818,7 +814,6 @@ extern struct mutex ipath_mutex;
818#define IPATH_DRV_NAME "ib_ipath" 814#define IPATH_DRV_NAME "ib_ipath"
819#define IPATH_MAJOR 233 815#define IPATH_MAJOR 233
820#define IPATH_USER_MINOR_BASE 0 816#define IPATH_USER_MINOR_BASE 0
821#define IPATH_SMA_MINOR 128
822#define IPATH_DIAG_MINOR_BASE 129 817#define IPATH_DIAG_MINOR_BASE 129
823#define IPATH_NMINORS 255 818#define IPATH_NMINORS 255
824 819
diff --git a/drivers/infiniband/hw/ipath/ipath_layer.c b/drivers/infiniband/hw/ipath/ipath_layer.c
index 10f578e2aed6..e46aa4ed2a7e 100644
--- a/drivers/infiniband/hw/ipath/ipath_layer.c
+++ b/drivers/infiniband/hw/ipath/ipath_layer.c
@@ -162,9 +162,6 @@ int ipath_layer_register(void *(*l_add)(int, struct ipath_devdata *),
162 if (dd->ipath_layer.l_arg) 162 if (dd->ipath_layer.l_arg)
163 continue; 163 continue;
164 164
165 if (!(*dd->ipath_statusp & IPATH_STATUS_SMA))
166 *dd->ipath_statusp |= IPATH_STATUS_OIB_SMA;
167
168 spin_unlock_irqrestore(&ipath_devs_lock, flags); 165 spin_unlock_irqrestore(&ipath_devs_lock, flags);
169 dd->ipath_layer.l_arg = l_add(dd->ipath_unit, dd); 166 dd->ipath_layer.l_arg = l_add(dd->ipath_unit, dd);
170 spin_lock_irqsave(&ipath_devs_lock, flags); 167 spin_lock_irqsave(&ipath_devs_lock, flags);
diff --git a/drivers/infiniband/hw/ipath/ipath_layer.h b/drivers/infiniband/hw/ipath/ipath_layer.h
index 4a27ede49941..3854a4eae684 100644
--- a/drivers/infiniband/hw/ipath/ipath_layer.h
+++ b/drivers/infiniband/hw/ipath/ipath_layer.h
@@ -66,9 +66,6 @@ int ipath_layer_set_piointbufavail_int(struct ipath_devdata *dd);
66#define IPATH_LAYER_INT_SEND_CONTINUE 0x10 66#define IPATH_LAYER_INT_SEND_CONTINUE 0x10
67#define IPATH_LAYER_INT_BCAST 0x40 67#define IPATH_LAYER_INT_BCAST 0x40
68 68
69/* _verbs_layer.l_flags */
70#define IPATH_VERBS_KERNEL_SMA 0x1
71
72extern unsigned ipath_debug; /* debugging bit mask */ 69extern unsigned ipath_debug; /* debugging bit mask */
73 70
74#endif /* _IPATH_LAYER_H */ 71#endif /* _IPATH_LAYER_H */
diff --git a/drivers/infiniband/hw/ipath/ipath_qp.c b/drivers/infiniband/hw/ipath/ipath_qp.c
index b86858e70f2a..c0267cf8ca8c 100644
--- a/drivers/infiniband/hw/ipath/ipath_qp.c
+++ b/drivers/infiniband/hw/ipath/ipath_qp.c
@@ -645,33 +645,6 @@ __be32 ipath_compute_aeth(struct ipath_qp *qp)
645} 645}
646 646
647/** 647/**
648 * set_verbs_flags - set the verbs layer flags
649 * @dd: the infinipath device
650 * @flags: the flags to set
651 */
652static int set_verbs_flags(struct ipath_devdata *dd, unsigned flags)
653{
654 struct ipath_devdata *ss;
655 unsigned long lflags;
656
657 spin_lock_irqsave(&ipath_devs_lock, lflags);
658
659 list_for_each_entry(ss, &ipath_dev_list, ipath_list) {
660 if (!(ss->ipath_flags & IPATH_INITTED))
661 continue;
662 if ((flags & IPATH_VERBS_KERNEL_SMA) &&
663 !(*ss->ipath_statusp & IPATH_STATUS_SMA))
664 *ss->ipath_statusp |= IPATH_STATUS_OIB_SMA;
665 else
666 *ss->ipath_statusp &= ~IPATH_STATUS_OIB_SMA;
667 }
668
669 spin_unlock_irqrestore(&ipath_devs_lock, lflags);
670
671 return 0;
672}
673
674/**
675 * ipath_create_qp - create a queue pair for a device 648 * ipath_create_qp - create a queue pair for a device
676 * @ibpd: the protection domain who's device we create the queue pair for 649 * @ibpd: the protection domain who's device we create the queue pair for
677 * @init_attr: the attributes of the queue pair 650 * @init_attr: the attributes of the queue pair
@@ -784,10 +757,6 @@ struct ib_qp *ipath_create_qp(struct ib_pd *ibpd,
784 } 757 }
785 qp->ip = NULL; 758 qp->ip = NULL;
786 ipath_reset_qp(qp); 759 ipath_reset_qp(qp);
787
788 /* Tell the core driver that the kernel SMA is present. */
789 if (init_attr->qp_type == IB_QPT_SMI)
790 set_verbs_flags(dev->dd, IPATH_VERBS_KERNEL_SMA);
791 break; 760 break;
792 761
793 default: 762 default:
@@ -862,10 +831,6 @@ int ipath_destroy_qp(struct ib_qp *ibqp)
862 struct ipath_ibdev *dev = to_idev(ibqp->device); 831 struct ipath_ibdev *dev = to_idev(ibqp->device);
863 unsigned long flags; 832 unsigned long flags;
864 833
865 /* Tell the core driver that the kernel SMA is gone. */
866 if (qp->ibqp.qp_type == IB_QPT_SMI)
867 set_verbs_flags(dev->dd, 0);
868
869 spin_lock_irqsave(&qp->s_lock, flags); 834 spin_lock_irqsave(&qp->s_lock, flags);
870 qp->state = IB_QPS_ERR; 835 qp->state = IB_QPS_ERR;
871 spin_unlock_irqrestore(&qp->s_lock, flags); 836 spin_unlock_irqrestore(&qp->s_lock, flags);
diff --git a/drivers/infiniband/hw/ipath/ipath_stats.c b/drivers/infiniband/hw/ipath/ipath_stats.c
index 70351b7e35c0..30a825928fcf 100644
--- a/drivers/infiniband/hw/ipath/ipath_stats.c
+++ b/drivers/infiniband/hw/ipath/ipath_stats.c
@@ -271,33 +271,6 @@ void ipath_get_faststats(unsigned long opaque)
271 } 271 }
272 } 272 }
273 273
274 if (dd->ipath_nosma_bufs) {
275 dd->ipath_nosma_secs += 5;
276 if (dd->ipath_nosma_secs >= 30) {
277 ipath_cdbg(SMA, "No SMA bufs avail %u seconds; "
278 "cancelling pending sends\n",
279 dd->ipath_nosma_secs);
280 /*
281 * issue an abort as well, in case we have a packet
282 * stuck in launch fifo. This could corrupt an
283 * outgoing user packet in the worst case,
284 * but this is a pretty catastrophic, anyway.
285 */
286 ipath_write_kreg(dd, dd->ipath_kregs->kr_sendctrl,
287 INFINIPATH_S_ABORT);
288 ipath_disarm_piobufs(dd, dd->ipath_lastport_piobuf,
289 dd->ipath_piobcnt2k +
290 dd->ipath_piobcnt4k -
291 dd->ipath_lastport_piobuf);
292 /* start again, if necessary */
293 dd->ipath_nosma_secs = 0;
294 } else
295 ipath_cdbg(SMA, "No SMA bufs avail %u tries, "
296 "after %u seconds\n",
297 dd->ipath_nosma_bufs,
298 dd->ipath_nosma_secs);
299 }
300
301done: 274done:
302 mod_timer(&dd->ipath_stats_timer, jiffies + HZ * 5); 275 mod_timer(&dd->ipath_stats_timer, jiffies + HZ * 5);
303} 276}
diff --git a/drivers/infiniband/hw/ipath/ipath_sysfs.c b/drivers/infiniband/hw/ipath/ipath_sysfs.c
index 56f12202ff49..8476dd3c7af4 100644
--- a/drivers/infiniband/hw/ipath/ipath_sysfs.c
+++ b/drivers/infiniband/hw/ipath/ipath_sysfs.c
@@ -107,8 +107,8 @@ static const char *ipath_status_str[] = {
107 "Initted", 107 "Initted",
108 "Disabled", 108 "Disabled",
109 "Admin_Disabled", 109 "Admin_Disabled",
110 "OIB_SMA", 110 "", /* This used to be the old "OIB_SMA" status. */
111 "SMA", 111 "", /* This used to be the old "SMA" status. */
112 "Present", 112 "Present",
113 "IB_link_up", 113 "IB_link_up",
114 "IB_configured", 114 "IB_configured",
diff --git a/drivers/infiniband/hw/ipath/ipath_verbs.c b/drivers/infiniband/hw/ipath/ipath_verbs.c
index 1776330914e5..ab0006288b41 100644
--- a/drivers/infiniband/hw/ipath/ipath_verbs.c
+++ b/drivers/infiniband/hw/ipath/ipath_verbs.c
@@ -1573,7 +1573,7 @@ int ipath_register_ib_device(struct ipath_devdata *dd)
1573 dev->mmap = ipath_mmap; 1573 dev->mmap = ipath_mmap;
1574 1574
1575 snprintf(dev->node_desc, sizeof(dev->node_desc), 1575 snprintf(dev->node_desc, sizeof(dev->node_desc),
1576 IPATH_IDSTR " %s kernel_SMA", system_utsname.nodename); 1576 IPATH_IDSTR " %s", system_utsname.nodename);
1577 1577
1578 ret = ib_register_device(dev); 1578 ret = ib_register_device(dev);
1579 if (ret) 1579 if (ret)