diff options
author | Paul Mundt <lethal@linux-sh.org> | 2011-03-17 07:44:08 (GMT) |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2011-03-17 07:44:08 (GMT) |
commit | 1d2a1959fe534279cf37aba20b08c24c20840e52 (patch) | |
tree | 67c0b9aa7fe22a44bf0b4af88947799203eb8f67 /drivers/staging/hv/vmbus_api.h | |
parent | 5a79ce76e9bb8f4b2cd8106ee36d15ee05013bcf (diff) | |
parent | 054cfaacf88865bff1dd58d305443d5d6c068a08 (diff) | |
download | linux-1d2a1959fe534279cf37aba20b08c24c20840e52.tar.xz |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into sh-latest
Diffstat (limited to 'drivers/staging/hv/vmbus_api.h')
-rw-r--r-- | drivers/staging/hv/vmbus_api.h | 91 |
1 files changed, 56 insertions, 35 deletions
diff --git a/drivers/staging/hv/vmbus_api.h b/drivers/staging/hv/vmbus_api.h index 2da3f52..f0d96eb 100644 --- a/drivers/staging/hv/vmbus_api.h +++ b/drivers/staging/hv/vmbus_api.h @@ -25,6 +25,9 @@ #ifndef _VMBUS_API_H_ #define _VMBUS_API_H_ +#include <linux/device.h> +#include <linux/workqueue.h> + #define MAX_PAGE_BUFFER_COUNT 16 #define MAX_MULTIPAGE_BUFFER_COUNT 32 /* 128K */ @@ -32,17 +35,17 @@ /* Single-page buffer */ struct hv_page_buffer { - u32 Length; - u32 Offset; - u64 Pfn; + u32 len; + u32 offset; + u64 pfn; }; /* Multiple-page buffer */ struct hv_multipage_buffer { /* Length and Offset determines the # of pfns in the array */ - u32 Length; - u32 Offset; - u64 PfnArray[MAX_MULTIPAGE_BUFFER_COUNT]; + u32 len; + u32 offset; + u64 pfn_array[MAX_MULTIPAGE_BUFFER_COUNT]; }; /* 0x18 includes the proprietary packet header */ @@ -59,29 +62,29 @@ struct hv_driver; struct hv_device; struct hv_dev_port_info { - u32 InterruptMask; - u32 ReadIndex; - u32 WriteIndex; - u32 BytesAvailToRead; - u32 BytesAvailToWrite; + u32 int_mask; + u32 read_idx; + u32 write_idx; + u32 bytes_avail_toread; + u32 bytes_avail_towrite; }; struct hv_device_info { - u32 ChannelId; - u32 ChannelState; - struct hv_guid ChannelType; - struct hv_guid ChannelInstance; - - u32 MonitorId; - u32 ServerMonitorPending; - u32 ServerMonitorLatency; - u32 ServerMonitorConnectionId; - u32 ClientMonitorPending; - u32 ClientMonitorLatency; - u32 ClientMonitorConnectionId; - - struct hv_dev_port_info Inbound; - struct hv_dev_port_info Outbound; + u32 chn_id; + u32 chn_state; + struct hv_guid chn_type; + struct hv_guid chn_instance; + + u32 monitor_id; + u32 server_monitor_pending; + u32 server_monitor_latency; + u32 server_monitor_conn_id; + u32 client_monitor_pending; + u32 client_monitor_latency; + u32 client_monitor_conn_id; + + struct hv_dev_port_info inbound; + struct hv_dev_port_info outbound; }; /* Base driver object */ @@ -89,30 +92,48 @@ struct hv_driver { const char *name; /* the device type supported by this driver */ - struct hv_guid deviceType; - - int (*OnDeviceAdd)(struct hv_device *device, void *data); - int (*OnDeviceRemove)(struct hv_device *device); - void (*OnCleanup)(struct hv_driver *driver); + struct hv_guid dev_type; + + /* + * Device type specific drivers (net, blk etc.) + * need a mechanism to get a pointer to + * device type specific driver structure given + * a pointer to the base hyperv driver structure. + * The current code solves this problem using + * a hack. Support this need explicitly + */ + void *priv; + + struct device_driver driver; + + int (*dev_add)(struct hv_device *device, void *data); + int (*dev_rm)(struct hv_device *device); + void (*cleanup)(struct hv_driver *driver); }; /* Base device object */ struct hv_device { /* the driver for this device */ - struct hv_driver *Driver; + struct hv_driver *drv; char name[64]; + struct work_struct probe_failed_work_item; + + int probe_error; + /* the device type id of this device */ - struct hv_guid deviceType; + struct hv_guid dev_type; /* the device instance id of this device */ - struct hv_guid deviceInstance; + struct hv_guid dev_instance; + + struct device device; struct vmbus_channel *channel; /* Device extension; */ - void *Extension; + void *ext; }; #endif /* _VMBUS_API_H_ */ |