Commit 6cf6e5e6 authored by Sameer Wadgaonkar's avatar Sameer Wadgaonkar Committed by Greg Kroah-Hartman

staging: unisys: include: iochannel.h: fixed comment formatting issues

Removed comments from the right side of the lines.

Added kernel-doc like comments and cleaned up the inline comments in the
structures.
Signed-off-by: default avatarSameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: default avatarDavid Kershner <david.kershner@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5bf74b44
...@@ -71,8 +71,10 @@ ...@@ -71,8 +71,10 @@
#define MAXNUM(a, b) (((a) > (b)) ? (a) : (b)) #define MAXNUM(a, b) (((a) > (b)) ? (a) : (b))
/* Define the two queues per data channel between iopart and ioguestparts. */ /* Define the two queues per data channel between iopart and ioguestparts. */
/* Used by ioguestpart to 'insert' signals to iopart. */ /* Used by ioguestpart to 'insert' signals to iopart. */
#define IOCHAN_TO_IOPART 0 #define IOCHAN_TO_IOPART 0
/* Used by ioguestpart to 'remove' signals from iopart, same previous queue. */ /* Used by ioguestpart to 'remove' signals from iopart, same previous queue. */
#define IOCHAN_FROM_IOPART 1 #define IOCHAN_FROM_IOPART 1
...@@ -83,46 +85,45 @@ ...@@ -83,46 +85,45 @@
#define MAX_PHYS_INFO 64 #define MAX_PHYS_INFO 64
/* Various types of network packets that can be sent in cmdrsp. */ /*
enum net_types { * enum net_types - Various types of network packets that can be sent in cmdrsp.
NET_RCV_POST = 0, /* * @NET_RCV_POST: Submit buffer to hold receiving incoming packet.
* Submit buffer to hold receiving * @NET_RCV: visornic -> uisnic. Incoming packet received.
* incoming packet * @NET_XMIT: uisnic -> visornic. For outgoing packet.
*/ * @NET_XMIT_DONE: visornic -> uisnic. Outgoing packet xmitted.
/* visornic -> uisnic */ * @NET_RCV_ENBDIS: uisnic -> visornic. Enable/Disable packet reception.
NET_RCV, /* incoming packet received */ * @NET_RCV_ENBDIS_ACK: visornic -> uisnic. Acknowledge enable/disable packet.
/* uisnic -> visornic */ * @NET_RCV_PROMISC: uisnic -> visornic. Enable/Disable promiscuous mode.
NET_XMIT, /* for outgoing net packets */ * @NET_CONNECT_STATUS: visornic -> uisnic. Indicate the loss or restoration of
/* visornic -> uisnic */ * a network connection.
NET_XMIT_DONE, /* outgoing packet xmitted */ * @NET_MACADDR: uisnic -> visornic. Indicates the client has requested
/* uisnic -> visornic */ * to update it's MAC address.
NET_RCV_ENBDIS, /* enable/disable packet reception */ * @NET_MACADDR_ACK: MAC address acknowledge.
/* visornic -> uisnic */
NET_RCV_ENBDIS_ACK, /* acknowledge enable/disable packet */
/* reception */
/* uisnic -> visornic */
NET_RCV_PROMISC, /* enable/disable promiscuous mode */
/* visornic -> uisnic */
NET_CONNECT_STATUS, /*
* indicate the loss or restoration of a network
* connection
*/
/* uisnic -> visornic */
NET_MACADDR, /*
* Indicates the client has requested to update
* it's MAC address
*/ */
NET_MACADDR_ACK, /* MAC address acknowledge */ enum net_types {
NET_RCV_POST = 0,
NET_RCV,
NET_XMIT,
NET_XMIT_DONE,
NET_RCV_ENBDIS,
NET_RCV_ENBDIS_ACK,
/* Reception */
NET_RCV_PROMISC,
NET_CONNECT_STATUS,
NET_MACADDR,
NET_MACADDR_ACK,
}; };
#define ETH_MIN_DATA_SIZE 46 /* minimum eth data size */ /* Minimum eth data size */
#define ETH_MIN_DATA_SIZE 46
#define ETH_MIN_PACKET_SIZE (ETH_HLEN + ETH_MIN_DATA_SIZE) #define ETH_MIN_PACKET_SIZE (ETH_HLEN + ETH_MIN_DATA_SIZE)
#define VISOR_ETH_MAX_MTU 16384 /* maximum data size */ /* Maximum data size */
#define VISOR_ETH_MAX_MTU 16384
#ifndef MAX_MACADDR_LEN #ifndef MAX_MACADDR_LEN
#define MAX_MACADDR_LEN 6 /* number of bytes in MAC address */ /* Number of bytes in MAC address */
#define MAX_MACADDR_LEN 6
#endif #endif
/* Various types of scsi task mgmt commands. */ /* Various types of scsi task mgmt commands. */
...@@ -156,10 +157,16 @@ struct guest_phys_info { ...@@ -156,10 +157,16 @@ struct guest_phys_info {
#define GPI_ENTRIES_PER_PAGE (PAGE_SIZE / sizeof(struct guest_phys_info)) #define GPI_ENTRIES_PER_PAGE (PAGE_SIZE / sizeof(struct guest_phys_info))
/*
* struct uisscsi_dest
* @channel: Bus number.
* @id: Target number.
* @lun: Logical unit number.
*/
struct uisscsi_dest { struct uisscsi_dest {
u32 channel; /* channel == bus number */ u32 channel;
u32 id; /* id == target number */ u32 id;
u32 lun; /* lun == logical unit number */ u32 lun;
} __packed; } __packed;
struct vhba_wwnn { struct vhba_wwnn {
...@@ -168,53 +175,71 @@ struct vhba_wwnn { ...@@ -168,53 +175,71 @@ struct vhba_wwnn {
} __packed; } __packed;
/* /*
* struct vhba_config_max
* @max_channel: Maximum channel for devices attached to this bus.
* @max_id: Maximum SCSI ID for devices attached to bus.
* @max_lun: Maximum SCSI LUN for devices attached to bus.
* @cmd_per_lun: Maximum number of outstanding commands per LUN.
* @max_io_size: Maximum io size for devices attached to this bus. Max io size
* is often determined by the resource of the hba.
* e.g Max scatter gather list length * page size / sector size.
*
* WARNING: Values stired in this structure must contain maximum counts (not * WARNING: Values stired in this structure must contain maximum counts (not
* maximum values). * maximum values).
*
* 20 bytes
*/ */
struct vhba_config_max {/* 20 bytes */ struct vhba_config_max {
u32 max_channel;/* maximum channel for devices attached to this bus */ u32 max_channel;
u32 max_id; /* maximum SCSI ID for devices attached to bus */ u32 max_id;
u32 max_lun; /* maximum SCSI LUN for devices attached to bus */ u32 max_lun;
u32 cmd_per_lun;/* maximum number of outstanding commands per LUN */ u32 cmd_per_lun;
u32 max_io_size;/* maximum io size for devices attached to this bus */ u32 max_io_size;
/* max io size is often determined by the resource of the hba. e.g */
/* max scatter gather list length * page size / sector size */
} __packed; } __packed;
struct uiscmdrsp_scsi { /*
u64 handle; /* the handle to the cmd that was received */ * struct uiscmdrsp_scsi
/* send it back as is in the rsp packet. */ *
u8 cmnd[MAX_CMND_SIZE]; /* the cdb for the command */ * @handle: The handle to the cmd that was received. Send it back as
u32 bufflen; /* length of data to be transferred out or in */ * is in the rsp packet.
u16 guest_phys_entries; /* Number of entries in scatter-gather list */ * @cmnd: The cdb for the command.
struct guest_phys_info gpi_list[MAX_PHYS_INFO]; /* physical address * @bufflen: Length of data to be transferred out or in.
* information for each * @guest_phys_entries: Number of entries in scatter-gather list.
* fragment * @struct gpi_list: Physical address information for each fragment.
*/ * @enum data_dir: Direction of the data, if any.
enum dma_data_direction data_dir; /* direction of the data, if any */ * @struct vdest: Identifies the virtual hba, id, channel, lun to which
struct uisscsi_dest vdest; /* identifies the virtual hba, id, */ * cmd was sent.
/* channel, lun to which cmd was sent */ * @linuxstat: Original Linux status used by Linux vdisk.
* @scsistat: The scsi status.
/* Needed to queue the rsp back to cmd originator. */ * @addlstat: Non-scsi status.
int linuxstat; /* original Linux status used by Linux vdisk */ * @sensebuf: Sense info in case cmd failed. sensebuf holds the
u8 scsistat; /* the scsi status */ * sense_data struct. See sense_data struct for more
u8 addlstat; /* non-scsi status */ * details.
#define ADDL_SEL_TIMEOUT 4 * @*vdisk: Pointer to the vdisk to clean up when IO completes.
* @no_disk_result: Used to return no disk inquiry result when
/* The following fields are need to determine the result of command. */ * no_disk_result is set to 1
u8 sensebuf[MAX_SENSE_SIZE]; /* sense info in case cmd failed; */
/* sensebuf holds the sense_data struct; */
/* See sense_data struct for more details. */
void *vdisk; /* Pointer to the vdisk to clean up when IO completes. */
int no_disk_result;
/*
* Used to return no disk inquiry result
* when no_disk_result is set to 1,
* scsi.scsistat is SAM_STAT_GOOD * scsi.scsistat is SAM_STAT_GOOD
* scsi.addlstat is 0 * scsi.addlstat is 0
* scsi.linuxstat is SAM_STAT_GOOD * scsi.linuxstat is SAM_STAT_GOOD
* That is, there is NO error. * That is, there is NO error.
*/ */
struct uiscmdrsp_scsi {
u64 handle;
u8 cmnd[MAX_CMND_SIZE];
u32 bufflen;
u16 guest_phys_entries;
struct guest_phys_info gpi_list[MAX_PHYS_INFO];
enum dma_data_direction data_dir;
struct uisscsi_dest vdest;
/* Needed to queue the rsp back to cmd originator. */
int linuxstat;
u8 scsistat;
u8 addlstat;
#define ADDL_SEL_TIMEOUT 4
/* The following fields are need to determine the result of command. */
u8 sensebuf[MAX_SENSE_SIZE];
void *vdisk;
int no_disk_result;
} __packed; } __packed;
/* /*
...@@ -234,22 +259,35 @@ struct uiscmdrsp_scsi { ...@@ -234,22 +259,35 @@ struct uiscmdrsp_scsi {
* connected to this logical unit. * connected to this logical unit.
*/ */
#define DEV_NOT_CAPABLE 0x7f /* /*
* peripheral qualifier of 0x3 * Peripheral qualifier of 0x3
* peripheral type of 0x1f * Peripheral type of 0x1f
* specifies no device but target present * Specifies no device but target present
*/ */
#define DEV_NOT_CAPABLE 0x7f
#define DEV_DISK_CAPABLE_NOT_PRESENT 0x20 /* peripheral qualifier of 0x1 /*
* peripheral type of 0 - disk * Peripheral qualifier of 0x1
* Specifies device capable, but * Peripheral type of 0 - disk
* not present * Specifies device capable, but not present
*/ */
#define DEV_DISK_CAPABLE_NOT_PRESENT 0x20
/* HiSup = 1; shows support for report luns must be returned for lun 0. */
#define DEV_HISUPPORT 0x10
#define DEV_HISUPPORT 0x10 /* /*
* HiSup = 1; shows support for report luns * Peripheral qualifier of 0x3
* must be returned for lun 0. * Peripheral type of 0x1f
* Specifies no device but target present
*/
#define DEV_NOT_CAPABLE 0x7f
/*
* Peripheral qualifier of 0x1
* Peripheral type of 0 - disk
* Specifies device capable, but not present
*/ */
#define DEV_DISK_CAPABLE_NOT_PRESENT 0x20
/* HiSup = 1; shows support for report luns must be returned for lun 0. */
#define DEV_HISUPPORT 0x10
/* /*
* NOTE: Linux code assumes inquiry contains 36 bytes. Without checking length * NOTE: Linux code assumes inquiry contains 36 bytes. Without checking length
...@@ -258,11 +296,12 @@ struct uiscmdrsp_scsi { ...@@ -258,11 +296,12 @@ struct uiscmdrsp_scsi {
* inquiry result. * inquiry result.
*/ */
#define NO_DISK_INQUIRY_RESULT_LEN 36 #define NO_DISK_INQUIRY_RESULT_LEN 36
/* 5 bytes minimum for inquiry result */
#define MIN_INQUIRY_RESULT_LEN 5 /* 5 bytes minimum for inquiry result */ #define MIN_INQUIRY_RESULT_LEN 5
/* SCSI device version for no disk inquiry result */ /* SCSI device version for no disk inquiry result */
#define SCSI_SPC2_VER 4 /* indicates SCSI SPC2 (SPC3 is 5) */ /* indicates SCSI SPC2 (SPC3 is 5) */
#define SCSI_SPC2_VER 4
/* Struct and Defines to support sense information. */ /* Struct and Defines to support sense information. */
...@@ -297,35 +336,48 @@ struct sense_data { ...@@ -297,35 +336,48 @@ struct sense_data {
u8 sense_key_specific[3]; u8 sense_key_specific[3];
} __packed; } __packed;
struct net_pkt_xmt { /*
int len; /* full length of data in the packet */ * struct net_pkt_xmt
int num_frags; /* number of fragments in frags containing data */ * @len: Full length of data in the packet.
struct phys_info frags[MAX_PHYS_INFO]; /* physical page information */ * @num_frags: Number of fragments in frags containing data.
char ethhdr[ETH_HLEN]; /* the ethernet header */ * @struct phys_info frags: Physical page information.
struct { * @ethhdr: The ethernet header.
/* These are needed for csum at uisnic end */ * @struct lincsum: These are needed for csum at uisnic end.
u8 valid; /* 1 = struct is valid - else ignore */ * @valid: 1 = struct is valid - else ignore.
u8 hrawoffv; /* 1 = hwrafoff is valid */ * @hrawoffv: 1 = hwrafoff is valid.
u8 nhrawoffv; /* 1 = nhwrafoff is valid */ * @nhrawoffv: 1 = nhwrafoff is valid.
__be16 protocol; /* specifies packet protocol */ * @protocol: Specifies packet protocol.
__wsum csum; /* value used to set skb->csum at IOPart */ * @csum: Value used to set skb->csum at IOPart.
u32 hrawoff; /* value used to set skb->h.raw at IOPart */ * @hrawoff: Value used to set skb->h.raw at IOPart. hrawoff points to
/* hrawoff points to the start of the TRANSPORT LAYER HEADER */ * the start of the TRANSPORT LAYER HEADER.
u32 nhrawoff; /* value used to set skb->nh.raw at IOPart */ * @nhrawoff: Value used to set skb->nh.raw at IOPart. nhrawoff points to
/* nhrawoff points to the start of the NETWORK LAYER HEADER */ * the start of the NETWORK LAYER HEADER.
} lincsum; *
/*
* NOTE: * NOTE:
* The full packet is described in frags but the ethernet header is * The full packet is described in frags but the ethernet header is
* separately kept in ethhdr so that uisnic doesn't have "MAP" the * separately kept in ethhdr so that uisnic doesn't have "MAP" the
* guest memory to get to the header. uisnic needs ethhdr to * guest memory to get to the header. uisnic needs ethhdr to
* determine how to route the packet. * determine how to route the packet.
*/ */
struct net_pkt_xmt {
int len;
int num_frags;
struct phys_info frags[MAX_PHYS_INFO];
char ethhdr[ETH_HLEN];
struct {
u8 valid;
u8 hrawoffv;
u8 nhrawoffv;
__be16 protocol;
__wsum csum;
u32 hrawoff;
u32 nhrawoff;
} lincsum;
} __packed; } __packed;
struct net_pkt_xmtdone { struct net_pkt_xmtdone {
u32 xmt_done_result; /* result of NET_XMIT */ /* Result of NET_XMIT */
u32 xmt_done_result;
} __packed; } __packed;
/* /*
...@@ -341,14 +393,12 @@ struct net_pkt_xmtdone { ...@@ -341,14 +393,12 @@ struct net_pkt_xmtdone {
((VISOR_ETH_MAX_MTU + ETH_HLEN + RCVPOST_BUF_SIZE - 1) \ ((VISOR_ETH_MAX_MTU + ETH_HLEN + RCVPOST_BUF_SIZE - 1) \
/ RCVPOST_BUF_SIZE) / RCVPOST_BUF_SIZE)
/* /* rcv buf size must be large enough to include ethernet data len + ethernet
* rcv buf size must be large enough to include ethernet data len + ethernet
* header len - we are choosing 2K because it is guaranteed to be describable. * header len - we are choosing 2K because it is guaranteed to be describable.
*/ */
struct net_pkt_rcvpost { struct net_pkt_rcvpost {
/* Physical page information for the single fragment 2K rcv buf */ /* Physical page information for the single fragment 2K rcv buf */
struct phys_info frag; struct phys_info frag;
/* /*
* Ensures that receive posts are returned to the adapter which we sent * Ensures that receive posts are returned to the adapter which we sent
* them from originally. * them from originally.
...@@ -358,143 +408,148 @@ struct net_pkt_rcvpost { ...@@ -358,143 +408,148 @@ struct net_pkt_rcvpost {
} __packed; } __packed;
/* /*
* struct net_pkt_rcv
* @rcv_done_len: Length of the received data.
* @numrcvbufs: Contains the incoming data. Guest side MUST chain these
* together.
* @*rcvbuf: List of chained rcvbufa. Each entry is a receive buffer
* provided by NET_RCV_POST. NOTE: First rcvbuf in the
* chain will also be provided in net.buf.
* @unique_num:
* @rcvs_dropped_delta:
*
* The number of rcvbuf that can be chained is based on max mtu and size of each * The number of rcvbuf that can be chained is based on max mtu and size of each
* rcvbuf. * rcvbuf.
*/ */
struct net_pkt_rcv { struct net_pkt_rcv {
u32 rcv_done_len; /* length of received data */ u32 rcv_done_len;
/*
* numrcvbufs: contain the incoming data; guest side MUST chain these
* together.
*/
u8 numrcvbufs; u8 numrcvbufs;
void *rcvbuf[MAX_NET_RCV_CHAIN];
void *rcvbuf[MAX_NET_RCV_CHAIN]; /* list of chained rcvbufs */
/* Each entry is a receive buffer provided by NET_RCV_POST. */
/* NOTE: first rcvbuf in the chain will also be provided in net.buf. */
u64 unique_num; u64 unique_num;
u32 rcvs_dropped_delta; u32 rcvs_dropped_delta;
} __packed; } __packed;
struct net_pkt_enbdis { struct net_pkt_enbdis {
void *context; void *context;
u16 enable; /* 1 = enable, 0 = disable */ /* 1 = enable, 0 = disable */
u16 enable;
} __packed; } __packed;
struct net_pkt_macaddr { struct net_pkt_macaddr {
void *context; void *context;
u8 macaddr[MAX_MACADDR_LEN]; /* 6 bytes */ /* 6 bytes */
u8 macaddr[MAX_MACADDR_LEN];
} __packed; } __packed;
/* cmd rsp packet used for VNIC network traffic */ /*
* struct uiscmdrsp_net - cmd rsp packet used for VNIC network traffic.
* @enum type:
* @*buf:
* @union:
* @struct xmt: Used for NET_XMIT.
* @struct xmtdone: Used for NET_XMIT_DONE.
* @struct rcvpost: Used for NET_RCV_POST.
* @struct rcv: Used for NET_RCV.
* @struct enbdis: Used for NET_RCV_ENBDIS, NET_RCV_ENBDIS_ACK,
* NET_RCV_PROMSIC, and NET_CONNECT_STATUS.
* @struct macaddr:
*/
struct uiscmdrsp_net { struct uiscmdrsp_net {
enum net_types type; enum net_types type;
void *buf; void *buf;
union { union {
struct net_pkt_xmt xmt; /* used for NET_XMIT */ struct net_pkt_xmt xmt;
struct net_pkt_xmtdone xmtdone; /* used for NET_XMIT_DONE */ struct net_pkt_xmtdone xmtdone;
struct net_pkt_rcvpost rcvpost; /* used for NET_RCV_POST */ struct net_pkt_rcvpost rcvpost;
struct net_pkt_rcv rcv; /* used for NET_RCV */ struct net_pkt_rcv rcv;
struct net_pkt_enbdis enbdis; /* used for NET_RCV_ENBDIS, */ struct net_pkt_enbdis enbdis;
/* NET_RCV_ENBDIS_ACK, */
/* NET_RCV_PROMSIC, */
/* and NET_CONNECT_STATUS */
struct net_pkt_macaddr macaddr; struct net_pkt_macaddr macaddr;
}; };
} __packed; } __packed;
/*
* struct uiscmdrsp_scsitaskmgmt
* @enum tasktype: The type of task.
* @struct vdest: The vdisk for which this task mgmt is generated.
* @handle: This is a handle that the guest has saved off for its
* own use. The handle value is preserved by iopart and
* returned as in task mgmt rsp.
* @notify_handle: For Linux guests, this is a pointer to wait_queue_head
* that a thread is waiting on to see if the taskmgmt
* command has completed. When the rsp is received by
* guest, the thread receiving the response uses this to
* notify the thread waiting for taskmgmt command
* completion. It's value is preserved by iopart and
* returned as in the task mgmt rsp.
* @notifyresult_handle: This is a handle to the location in the guest where
* the result of the taskmgmt command (result field) is
* saved to when the response is handled. It's value is
* preserved by iopart and returned as is in the task mgmt
* rsp.
* @result: Result of taskmgmt command - set by IOPart.
*/
struct uiscmdrsp_scsitaskmgmt { struct uiscmdrsp_scsitaskmgmt {
/* The type of task. */
enum task_mgmt_types tasktype; enum task_mgmt_types tasktype;
/* The vdisk for which this task mgmt is generated. */
struct uisscsi_dest vdest; struct uisscsi_dest vdest;
/*
* This is a handle that the guest has saved off for its own use.
* The handle value is preserved by iopart and returned as in task
* mgmt rsp.
*/
u64 handle; u64 handle;
/*
* For Linux guests, this is a pointer to wait_queue_head that a
* thread is waiting on to see if the taskmgmt command has completed.
* When the rsp is received by guest, the thread receiving the
* response uses this to notify the thread waiting for taskmgmt
* command completion. It's value is preserved by iopart and returned
* as in the task mgmt rsp.
*/
u64 notify_handle; u64 notify_handle;
/*
* This is a handle to the location in the guest where the result of
* the taskmgmt command (result field) is saved to when the response
* is handled. It's value is preserved by iopart and returned as in
* the task mgmt rsp.
*/
u64 notifyresult_handle; u64 notifyresult_handle;
/* Result of taskmgmt command - set by IOPart - values are: */
char result; char result;
#define TASK_MGMT_FAILED 0 #define TASK_MGMT_FAILED 0
} __packed; } __packed;
/* Used by uissd to send disk add/remove notifications to Guest. */ /*
/* Note that the vHba pointer is not used by the Client/Guest side. */ * struct uiscmdrsp_disknotify - Used by uissd to send disk add/remove
* notifications to Guest.
* @add: 0-remove, 1-add.
* @*v_hba: Channel info to route msg.
* @channel: SCSI Path of Disk to added or removed.
* @id: SCSI Path of Disk to added or removed.
* @lun: SCSI Path of Disk to added or removed.
*
* Note that the vHba pointer is not used by the Client/Guest side.
*/
struct uiscmdrsp_disknotify { struct uiscmdrsp_disknotify {
u8 add; /* 0-remove, 1-add */ u8 add;
void *v_hba; /* channel info to route msg */ void *v_hba;
u32 channel, id, lun; /* SCSI Path of Disk to added or removed */ u32 channel, id, lun;
} __packed; } __packed;
/* /*
* The following is used by virthba/vSCSI to send the Acquire/Release commands * struct uiscmdrsp_vdiskmgmt - The following is used by virthba/vSCSI to send
* to the IOVM. * the Acquire/Release commands to the IOVM.
* @enum vdisktype: The type of task.
* @struct vdest: The vdisk for which this task mgmt is generated.
* @handle: This is a handle that the guest has saved off for its
* own use. It's value is preserved by iopart and returned
* as in the task mgmt rsp.
* @notify_handle: For Linux guests, this is a pointer to wait_queue_head
* that a thread is waiting on to see if the tskmgmt
* command has completed. When the rsp is received by
* guest, the thread receiving the response uses this to
* notify the thread waiting for taskmgmt command
* completion. It's value is preserved by iopart and
* returned as in the task mgmt rsp.
* @notifyresult_handle: Handle to the location in guest where the result of the
* taskmgmt command (result field) is saved to when the
* response is handled. It's value is preserved by iopart
* and returned as in the task mgmt rsp.
* @result: Result of taskmgmt command - set by IOPart.
*/ */
struct uiscmdrsp_vdiskmgmt { struct uiscmdrsp_vdiskmgmt {
/* The type of task */
enum vdisk_mgmt_types vdisktype; enum vdisk_mgmt_types vdisktype;
/* The vdisk for which this task mgmt is generated */
struct uisscsi_dest vdest; struct uisscsi_dest vdest;
/*
* This is a handle that the guest has saved off for its own use. It's
* value is preserved by iopart and returned as in the task mgmt rsp.
*/
u64 handle; u64 handle;
/*
* For Linux guests, this is a pointer to wait_queue_head that a
* thread is waiting on to see if the tskmgmt command has completed.
* When the rsp is received by guest, the thread receiving the
* response uses this to notify the thread waiting for taskmgmt
* command completion. It's value is preserved by iopart and returned
* as in the task mgmt rsp.
*/
u64 notify_handle; u64 notify_handle;
/*
* Handle to the location in guest where the result of the
* taskmgmt command (result field) is saved to when the response
* is handled. It's value is preserved by iopart and returned as in
* the task mgmt rsp.
*/
u64 notifyresult_handle; u64 notifyresult_handle;
/* Result of taskmgmt command - set by IOPart - values are: */
char result; char result;
} __packed; } __packed;
/* Keeping cmd and rsp info in one structure for now cmd rsp packet for SCSI */ /* Keeping cmd and rsp info in one structure for now cmd rsp packet for SCSI */
struct uiscmdrsp { struct uiscmdrsp {
char cmdtype; char cmdtype;
/* Describes what type of information is in the struct */
/* Describes what type of information is in the struct */
#define CMD_SCSI_TYPE 1 #define CMD_SCSI_TYPE 1
#define CMD_NET_TYPE 2 #define CMD_NET_TYPE 2
#define CMD_SCSITASKMGMT_TYPE 3 #define CMD_SCSITASKMGMT_TYPE 3
...@@ -509,21 +564,33 @@ struct uiscmdrsp { ...@@ -509,21 +564,33 @@ struct uiscmdrsp {
}; };
/* Send the response when the cmd is done (scsi and scsittaskmgmt). */ /* Send the response when the cmd is done (scsi and scsittaskmgmt). */
void *private_data; void *private_data;
struct uiscmdrsp *next; /* General Purpose Queue Link */ /* General Purpose Queue Link */
struct uiscmdrsp *activeQ_next; /* Pointer to the nextactive commands */ struct uiscmdrsp *next;
struct uiscmdrsp *activeQ_prev; /* Pointer to the prevactive commands */ /* Pointer to the nextactive commands */
struct uiscmdrsp *activeQ_next;
/* Pointer to the prevactive commands */
struct uiscmdrsp *activeQ_prev;
} __packed; } __packed;
/* total = 28 bytes */
struct iochannel_vhba { struct iochannel_vhba {
struct vhba_wwnn wwnn; /* 8 bytes */ /* 8 bytes */
struct vhba_config_max max; /* 20 bytes */ struct vhba_wwnn wwnn;
} __packed; /* total = 28 bytes */ /* 20 bytes */
struct vhba_config_max max;
} __packed;
struct iochannel_vnic { struct iochannel_vnic {
u8 macaddr[6]; /* 6 bytes */ /* 6 bytes */
u32 num_rcv_bufs; /* 4 bytes */ u8 macaddr[6];
u32 mtu; /* 4 bytes */ /* 4 bytes */
uuid_le zone_uuid; /* 16 bytes */ u32 num_rcv_bufs;
/* 4 bytes */
u32 mtu;
/* 16 bytes */
uuid_le zone_uuid;
} __packed; } __packed;
/* /*
* This is just the header of the IO channel. It is assumed that directly after * This is just the header of the IO channel. It is assumed that directly after
* this header there is a large region of memory which contains the command and * this header there is a large region of memory which contains the command and
...@@ -550,4 +617,5 @@ struct visor_io_channel { ...@@ -550,4 +617,5 @@ struct visor_io_channel {
#define PI_PAGE_SIZE 0x1000 #define PI_PAGE_SIZE 0x1000
#define PI_PAGE_MASK 0x0FFF #define PI_PAGE_MASK 0x0FFF
#endif /* __IOCHANNEL_H__ */ /* __IOCHANNEL_H__ */
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment