Staging: hv: fix coding style issues in StorVscApi.h
No typedef changes yet though. Cc: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
8dc0a06ad1
commit
9bcd786a31
@ -27,12 +27,9 @@
|
|||||||
|
|
||||||
#include "VmbusApi.h"
|
#include "VmbusApi.h"
|
||||||
|
|
||||||
|
|
||||||
/* Defines */
|
/* Defines */
|
||||||
|
#define STORVSC_RING_BUFFER_SIZE (10*PAGE_SIZE)
|
||||||
|
#define BLKVSC_RING_BUFFER_SIZE (20*PAGE_SIZE)
|
||||||
#define STORVSC_RING_BUFFER_SIZE 10*PAGE_SIZE
|
|
||||||
#define BLKVSC_RING_BUFFER_SIZE 20*PAGE_SIZE
|
|
||||||
|
|
||||||
#define STORVSC_MAX_IO_REQUESTS 64
|
#define STORVSC_MAX_IO_REQUESTS 64
|
||||||
|
|
||||||
@ -42,27 +39,20 @@
|
|||||||
* scsi host adapter essentially has 1 bus with 1 target that contains
|
* scsi host adapter essentially has 1 bus with 1 target that contains
|
||||||
* up to 256 luns.
|
* up to 256 luns.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define STORVSC_MAX_LUNS_PER_TARGET 64
|
#define STORVSC_MAX_LUNS_PER_TARGET 64
|
||||||
#define STORVSC_MAX_TARGETS 1
|
#define STORVSC_MAX_TARGETS 1
|
||||||
#define STORVSC_MAX_CHANNELS 1
|
#define STORVSC_MAX_CHANNELS 1
|
||||||
|
|
||||||
|
|
||||||
/* Fwd decl */
|
|
||||||
|
|
||||||
/* struct VMBUS_CHANNEL; */
|
|
||||||
struct hv_storvsc_request;
|
struct hv_storvsc_request;
|
||||||
|
|
||||||
|
|
||||||
/* Data types */
|
/* Data types */
|
||||||
|
typedef int (*PFN_ON_IO_REQUEST)(struct hv_device *Device,
|
||||||
typedef int (*PFN_ON_IO_REQUEST)(struct hv_device *Device, struct hv_storvsc_request *Request);
|
struct hv_storvsc_request *Request);
|
||||||
typedef void (*PFN_ON_IO_REQUEST_COMPLTN)(struct hv_storvsc_request *Request);
|
typedef void (*PFN_ON_IO_REQUEST_COMPLTN)(struct hv_storvsc_request *Request);
|
||||||
|
|
||||||
typedef int (*PFN_ON_HOST_RESET)(struct hv_device *Device);
|
typedef int (*PFN_ON_HOST_RESET)(struct hv_device *Device);
|
||||||
typedef void (*PFN_ON_HOST_RESCAN)(struct hv_device *Device);
|
typedef void (*PFN_ON_HOST_RESCAN)(struct hv_device *Device);
|
||||||
|
|
||||||
|
|
||||||
/* Matches Windows-end */
|
/* Matches Windows-end */
|
||||||
typedef enum _STORVSC_REQUEST_TYPE{
|
typedef enum _STORVSC_REQUEST_TYPE{
|
||||||
WRITE_TYPE,
|
WRITE_TYPE,
|
||||||
@ -70,7 +60,6 @@ typedef enum _STORVSC_REQUEST_TYPE{
|
|||||||
UNKNOWN_TYPE,
|
UNKNOWN_TYPE,
|
||||||
} STORVSC_REQUEST_TYPE;
|
} STORVSC_REQUEST_TYPE;
|
||||||
|
|
||||||
|
|
||||||
struct hv_storvsc_request {
|
struct hv_storvsc_request {
|
||||||
STORVSC_REQUEST_TYPE Type;
|
STORVSC_REQUEST_TYPE Type;
|
||||||
u32 Host;
|
u32 Host;
|
||||||
@ -95,10 +84,11 @@ struct hv_storvsc_request {
|
|||||||
struct hv_multipage_buffer DataBuffer;
|
struct hv_multipage_buffer DataBuffer;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/* Represents the block vsc driver */
|
/* Represents the block vsc driver */
|
||||||
typedef struct _STORVSC_DRIVER_OBJECT {
|
typedef struct _STORVSC_DRIVER_OBJECT {
|
||||||
struct hv_driver Base; /* Must be the first field */
|
/* Must be the first field */
|
||||||
|
/* Which is a bug FIXME! */
|
||||||
|
struct hv_driver Base;
|
||||||
|
|
||||||
/* Set by caller (in bytes) */
|
/* Set by caller (in bytes) */
|
||||||
u32 RingBufferSize;
|
u32 RingBufferSize;
|
||||||
@ -115,7 +105,6 @@ typedef struct _STORVSC_DRIVER_OBJECT {
|
|||||||
/* Specific to this driver */
|
/* Specific to this driver */
|
||||||
PFN_ON_IO_REQUEST OnIORequest;
|
PFN_ON_IO_REQUEST OnIORequest;
|
||||||
PFN_ON_HOST_RESET OnHostReset;
|
PFN_ON_HOST_RESET OnHostReset;
|
||||||
|
|
||||||
} STORVSC_DRIVER_OBJECT;
|
} STORVSC_DRIVER_OBJECT;
|
||||||
|
|
||||||
typedef struct _STORVSC_DEVICE_INFO {
|
typedef struct _STORVSC_DEVICE_INFO {
|
||||||
@ -124,16 +113,8 @@ typedef struct _STORVSC_DEVICE_INFO {
|
|||||||
unsigned char TargetId;
|
unsigned char TargetId;
|
||||||
} STORVSC_DEVICE_INFO;
|
} STORVSC_DEVICE_INFO;
|
||||||
|
|
||||||
|
|
||||||
/* Interface */
|
/* Interface */
|
||||||
|
int StorVscInitialize(struct hv_driver *driver);
|
||||||
|
int BlkVscInitialize(struct hv_driver *driver);
|
||||||
|
|
||||||
int
|
|
||||||
StorVscInitialize(
|
|
||||||
struct hv_driver *Driver
|
|
||||||
);
|
|
||||||
|
|
||||||
int
|
|
||||||
BlkVscInitialize(
|
|
||||||
struct hv_driver *Driver
|
|
||||||
);
|
|
||||||
#endif /* _STORVSC_API_H_ */
|
#endif /* _STORVSC_API_H_ */
|
||||||
|
Loading…
Reference in New Issue
Block a user