lockd: convert nsm_mutex to a spinlock
[safe/jmp/linux-2.6] / include / linux / rio.h
index 930bbb7..68e3f68 100644 (file)
@@ -17,7 +17,6 @@
 #ifdef __KERNEL__
 
 #include <linux/types.h>
-#include <linux/config.h>
 #include <linux/ioport.h>
 #include <linux/list.h>
 #include <linux/errno.h>
@@ -26,6 +25,7 @@
 
 #define RIO_ANY_DESTID         0xff
 #define RIO_NO_HOPCOUNT                -1
+#define RIO_INVALID_DESTID     0xffff
 
 #define RIO_MAX_MPORT_RESOURCES        16
 #define RIO_MAX_DEV_RESOURCES  16
@@ -91,6 +91,7 @@ struct rio_mport;
  * @swpinfo: Switch port info
  * @src_ops: Source operation capabilities
  * @dst_ops: Destination operation capabilities
+ * @dma_mask: Mask of bits of RIO address this device implements
  * @rswitch: Pointer to &struct rio_switch if valid for this device
  * @driver: Driver claiming this device
  * @dev: Device model device
@@ -112,6 +113,7 @@ struct rio_dev {
        u32 swpinfo;            /* Only used for switches */
        u32 src_ops;
        u32 dst_ops;
+       u64 dma_mask;
        struct rio_switch *rswitch;     /* RIO switch info */
        struct rio_driver *driver;      /* RIO driver claiming this device */
        struct device dev;      /* LDM device structure */
@@ -130,7 +132,7 @@ struct rio_dev {
  */
 struct rio_msg {
        struct resource *res;
-       void (*mcback) (struct rio_mport * mport, int mbox, int slot);
+       void (*mcback) (struct rio_mport * mport, void *dev_id, int mbox, int slot);
 };
 
 /**
@@ -138,11 +140,13 @@ struct rio_msg {
  * @node: Node in list of doorbell events
  * @res: Doorbell resource
  * @dinb: Doorbell event callback
+ * @dev_id: Device specific pointer to pass on event
  */
 struct rio_dbell {
        struct list_head node;
        struct resource *res;
-       void (*dinb) (struct rio_mport * mport, u16 src, u16 dst, u16 info);
+       void (*dinb) (struct rio_mport *mport, void *dev_id, u16 src, u16 dst, u16 info);
+       void *dev_id;
 };
 
 /**
@@ -312,9 +316,9 @@ extern int rio_hw_add_outb_message(struct rio_mport *, struct rio_dev *, int,
                                   void *, size_t);
 extern int rio_hw_add_inb_buffer(struct rio_mport *, int, void *);
 extern void *rio_hw_get_inb_message(struct rio_mport *, int);
-extern int rio_open_inb_mbox(struct rio_mport *, int, int);
+extern int rio_open_inb_mbox(struct rio_mport *, void *, int, int);
 extern void rio_close_inb_mbox(struct rio_mport *, int);
-extern int rio_open_outb_mbox(struct rio_mport *, int, int);
+extern int rio_open_outb_mbox(struct rio_mport *, void *, int, int);
 extern void rio_close_outb_mbox(struct rio_mport *, int);
 
 #endif                         /* __KERNEL__ */