diff options
author | Bryan O'Sullivan <bos@pathscale.com> | 2006-07-01 07:35:52 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-01 12:55:58 -0400 |
commit | a2acb2ff36876fdfa5f7a8bf811765aadc74c1c1 (patch) | |
tree | ea0e6aaacd36cac011dacae3554b6576dea56d9d /drivers/infiniband/hw/ipath/ipath_kernel.h | |
parent | 6700efdfc06d2dc9ef77988a00182c2ede0f1be0 (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.h | 19 |
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 *); | |||
538 | extern int __ipath_verbs_rcv(struct ipath_devdata *, void *, void *, u32); | 540 | extern int __ipath_verbs_rcv(struct ipath_devdata *, void *, void *, u32); |
539 | 541 | ||
540 | void ipath_layer_add(struct ipath_devdata *); | 542 | void ipath_layer_add(struct ipath_devdata *); |
541 | void ipath_layer_del(struct ipath_devdata *); | 543 | void ipath_layer_remove(struct ipath_devdata *); |
542 | 544 | ||
543 | int ipath_init_chip(struct ipath_devdata *, int); | 545 | int ipath_init_chip(struct ipath_devdata *, int); |
544 | int ipath_enable_wc(struct ipath_devdata *dd); | 546 | int ipath_enable_wc(struct ipath_devdata *dd); |
@@ -552,14 +554,14 @@ int ipath_cdev_init(int minor, char *name, struct file_operations *fops, | |||
552 | void ipath_cdev_cleanup(struct cdev **cdevp, | 554 | void ipath_cdev_cleanup(struct cdev **cdevp, |
553 | struct class_device **class_devp); | 555 | struct class_device **class_devp); |
554 | 556 | ||
555 | int ipath_diag_init(void); | 557 | int ipath_diag_add(struct ipath_devdata *); |
556 | void ipath_diag_cleanup(void); | 558 | void ipath_diag_remove(struct ipath_devdata *); |
557 | void ipath_diag_bringup_link(struct ipath_devdata *); | 559 | void ipath_diag_bringup_link(struct ipath_devdata *); |
558 | 560 | ||
559 | extern wait_queue_head_t ipath_sma_state_wait; | 561 | extern wait_queue_head_t ipath_sma_state_wait; |
560 | 562 | ||
561 | int ipath_user_add(struct ipath_devdata *dd); | 563 | int ipath_user_add(struct ipath_devdata *dd); |
562 | void ipath_user_del(struct ipath_devdata *dd); | 564 | void ipath_user_remove(struct ipath_devdata *dd); |
563 | 565 | ||
564 | struct sk_buff *ipath_alloc_skb(struct ipath_devdata *dd, gfp_t); | 566 | struct 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 { \ |