aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ipath/ipath_kernel.h
diff options
context:
space:
mode:
authorBryan O'Sullivan <bos@pathscale.com>2006-07-01 07:35:52 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-07-01 12:55:58 -0400
commita2acb2ff36876fdfa5f7a8bf811765aadc74c1c1 (patch)
treeea0e6aaacd36cac011dacae3554b6576dea56d9d /drivers/infiniband/hw/ipath/ipath_kernel.h
parent6700efdfc06d2dc9ef77988a00182c2ede0f1be0 (diff)
[PATCH] IB/ipath: allow diags on any unit
There is no longer a /dev/ipath_diag file; instead, there's /dev/ipath_diag0, 1, etc. It's still not possible to have diags run on more than one unit at a time, but that's easy to fix at some point. Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com> Cc: "Michael S. Tsirkin" <mst@mellanox.co.il> Cc: Roland Dreier <rolandd@cisco.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_kernel.h')
-rw-r--r--drivers/infiniband/hw/ipath/ipath_kernel.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_kernel.h b/drivers/infiniband/hw/ipath/ipath_kernel.h
index 57dea8c443be..412480d1109f 100644
--- a/drivers/infiniband/hw/ipath/ipath_kernel.h
+++ b/drivers/infiniband/hw/ipath/ipath_kernel.h
@@ -355,8 +355,10 @@ struct ipath_devdata {
355 char *ipath_freezemsg; 355 char *ipath_freezemsg;
356 /* pci access data structure */ 356 /* pci access data structure */
357 struct pci_dev *pcidev; 357 struct pci_dev *pcidev;
358 struct cdev *cdev; 358 struct cdev *user_cdev;
359 struct class_device *class_dev; 359 struct cdev *diag_cdev;
360 struct class_device *user_class_dev;
361 struct class_device *diag_class_dev;
360 /* timer used to prevent stats overflow, error throttling, etc. */ 362 /* timer used to prevent stats overflow, error throttling, etc. */
361 struct timer_list ipath_stats_timer; 363 struct timer_list ipath_stats_timer;
362 /* check for stale messages in rcv queue */ 364 /* check for stale messages in rcv queue */
@@ -538,7 +540,7 @@ extern int __ipath_verbs_piobufavail(struct ipath_devdata *);
538extern int __ipath_verbs_rcv(struct ipath_devdata *, void *, void *, u32); 540extern int __ipath_verbs_rcv(struct ipath_devdata *, void *, void *, u32);
539 541
540void ipath_layer_add(struct ipath_devdata *); 542void ipath_layer_add(struct ipath_devdata *);
541void ipath_layer_del(struct ipath_devdata *); 543void ipath_layer_remove(struct ipath_devdata *);
542 544
543int ipath_init_chip(struct ipath_devdata *, int); 545int ipath_init_chip(struct ipath_devdata *, int);
544int ipath_enable_wc(struct ipath_devdata *dd); 546int ipath_enable_wc(struct ipath_devdata *dd);
@@ -552,14 +554,14 @@ int ipath_cdev_init(int minor, char *name, struct file_operations *fops,
552void ipath_cdev_cleanup(struct cdev **cdevp, 554void ipath_cdev_cleanup(struct cdev **cdevp,
553 struct class_device **class_devp); 555 struct class_device **class_devp);
554 556
555int ipath_diag_init(void); 557int ipath_diag_add(struct ipath_devdata *);
556void ipath_diag_cleanup(void); 558void ipath_diag_remove(struct ipath_devdata *);
557void ipath_diag_bringup_link(struct ipath_devdata *); 559void ipath_diag_bringup_link(struct ipath_devdata *);
558 560
559extern wait_queue_head_t ipath_sma_state_wait; 561extern wait_queue_head_t ipath_sma_state_wait;
560 562
561int ipath_user_add(struct ipath_devdata *dd); 563int ipath_user_add(struct ipath_devdata *dd);
562void ipath_user_del(struct ipath_devdata *dd); 564void ipath_user_remove(struct ipath_devdata *dd);
563 565
564struct sk_buff *ipath_alloc_skb(struct ipath_devdata *dd, gfp_t); 566struct sk_buff *ipath_alloc_skb(struct ipath_devdata *dd, gfp_t);
565 567
@@ -843,9 +845,10 @@ extern struct mutex ipath_mutex;
843 845
844#define IPATH_DRV_NAME "ipath_core" 846#define IPATH_DRV_NAME "ipath_core"
845#define IPATH_MAJOR 233 847#define IPATH_MAJOR 233
848#define IPATH_USER_MINOR_BASE 0
846#define IPATH_SMA_MINOR 128 849#define IPATH_SMA_MINOR 128
847#define IPATH_DIAG_MINOR 129 850#define IPATH_DIAG_MINOR_BASE 129
848#define IPATH_NMINORS 130 851#define IPATH_NMINORS 255
849 852
850#define ipath_dev_err(dd,fmt,...) \ 853#define ipath_dev_err(dd,fmt,...) \
851 do { \ 854 do { \