Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 162242
b: refs/heads/master
c: 9bcd786
h: refs/heads/master
v: v3
  • Loading branch information
Greg Kroah-Hartman committed Sep 15, 2009
1 parent df31c4b commit 561dc4f
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 53 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8dc0a06ad1f192ea0c8dbe4d2090206c7d880281
refs/heads/master: 9bcd786a311d7601f25a986e106d2bf774a22fdd
85 changes: 33 additions & 52 deletions trunk/drivers/staging/hv/include/StorVscApi.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,9 @@

#include "VmbusApi.h"


/* 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

Expand All @@ -42,98 +39,82 @@
* scsi host adapter essentially has 1 bus with 1 target that contains
* up to 256 luns.
*/

#define STORVSC_MAX_LUNS_PER_TARGET 64
#define STORVSC_MAX_TARGETS 1
#define STORVSC_MAX_TARGETS 1
#define STORVSC_MAX_CHANNELS 1


/* Fwd decl */

/* struct VMBUS_CHANNEL; */
struct hv_storvsc_request;


/* Data types */

typedef int (*PFN_ON_IO_REQUEST)(struct hv_device *Device, struct hv_storvsc_request *Request);
typedef int (*PFN_ON_IO_REQUEST)(struct hv_device *Device,
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 void (*PFN_ON_HOST_RESCAN)(struct hv_device *Device);


/* Matches Windows-end */
typedef enum _STORVSC_REQUEST_TYPE{
WRITE_TYPE,
READ_TYPE,
UNKNOWN_TYPE,
} STORVSC_REQUEST_TYPE;


struct hv_storvsc_request {
STORVSC_REQUEST_TYPE Type;
u32 Host;
u32 Bus;
u32 TargetId;
u32 LunId;
u8 * Cdb;
u32 CdbLen;
u32 Status;
u32 BytesXfer;
STORVSC_REQUEST_TYPE Type;
u32 Host;
u32 Bus;
u32 TargetId;
u32 LunId;
u8 *Cdb;
u32 CdbLen;
u32 Status;
u32 BytesXfer;

unsigned char* SenseBuffer;
u32 SenseBufferSize;
unsigned char *SenseBuffer;
u32 SenseBufferSize;

void * Context;
void *Context;

PFN_ON_IO_REQUEST_COMPLTN OnIOCompletion;
PFN_ON_IO_REQUEST_COMPLTN OnIOCompletion;

/* This points to the memory after DataBuffer */
void * Extension;
void *Extension;

struct hv_multipage_buffer DataBuffer;
};


/* Represents the block vsc driver */
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) */
u32 RingBufferSize;
u32 RingBufferSize;

/* Allocate this much private extension for each I/O request */
u32 RequestExtSize;
u32 RequestExtSize;

/* Maximum # of requests in flight per channel/device */
u32 MaxOutstandingRequestsPerChannel;
u32 MaxOutstandingRequestsPerChannel;

/* Set by the caller to allow us to re-enumerate the bus on the host */
PFN_ON_HOST_RESCAN OnHostRescan;
PFN_ON_HOST_RESCAN OnHostRescan;

/* Specific to this driver */
PFN_ON_IO_REQUEST OnIORequest;
PFN_ON_HOST_RESET OnHostReset;

PFN_ON_IO_REQUEST OnIORequest;
PFN_ON_HOST_RESET OnHostReset;
} STORVSC_DRIVER_OBJECT;

typedef struct _STORVSC_DEVICE_INFO {
unsigned int PortNumber;
unsigned char PathId;
unsigned char TargetId;
unsigned int PortNumber;
unsigned char PathId;
unsigned char TargetId;
} STORVSC_DEVICE_INFO;


/* 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_ */

0 comments on commit 561dc4f

Please sign in to comment.