Commit 79c07e9c authored by Erik Arfvidson's avatar Erik Arfvidson Committed by Greg Kroah-Hartman

staging: unisys: iochannel fix block comments

This patch fixes warning messages from checkpatch.pl specifically:
WARNING: Block comments use a trailing */ on a separate lines
Signed-off-by: default avatarErik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: default avatarBenjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 34d96c0d
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
/* /*
* Everything needed for IOPart-GuestPart communication is define in * Everything needed for IOPart-GuestPart communication is define in
* this file. Note: Everything is OS-independent because this file is * this file. Note: Everything is OS-independent because this file is
* used by Windows, Linux and possible EFI drivers. */ * used by Windows, Linux and possible EFI drivers.
*/
/* /*
* Communication flow between the IOPart and GuestPart uses the channel headers * Communication flow between the IOPart and GuestPart uses the channel headers
...@@ -66,21 +67,15 @@ ...@@ -66,21 +67,15 @@
* IO Partition is defined below. * IO Partition is defined below.
*/ */
/* /* Defines and enums. */
* Defines and enums.
*/
#define MINNUM(a, b) (((a) < (b)) ? (a) : (b)) #define MINNUM(a, b) (((a) < (b)) ? (a) : (b))
#define MAXNUM(a, b) (((a) > (b)) ? (a) : (b)) #define MAXNUM(a, b) (((a) > (b)) ? (a) : (b))
/* these define the two queues per data channel between iopart and /* define the two queues per data channel between iopart and ioguestparts */
* ioguestparts /* used by ioguestpart to 'insert' signals to iopart */
*/ #define IOCHAN_TO_IOPART 0
#define IOCHAN_TO_IOPART 0 /* used by ioguestpart to 'insert' signals to /* used by ioguestpart to 'remove' signals from iopart, same previous queue */
* iopart */ #define IOCHAN_FROM_IOPART 1
#define IOCHAN_FROM_IOPART 1 /* used by ioguestpart to 'remove' signals from
* iopart - same queue as previous queue */
/* size of cdb - i.e., scsi cmnd */ /* size of cdb - i.e., scsi cmnd */
#define MAX_CMND_SIZE 16 #define MAX_CMND_SIZE 16
...@@ -92,26 +87,29 @@ ...@@ -92,26 +87,29 @@
/* various types of network packets that can be sent in cmdrsp */ /* various types of network packets that can be sent in cmdrsp */
enum net_types { enum net_types {
NET_RCV_POST = 0, /* submit buffer to hold receiving NET_RCV_POST = 0, /* submit buffer to hold receiving
* incoming packet */ * incoming packet
*/
/* virtnic -> uisnic */ /* virtnic -> uisnic */
NET_RCV, /* incoming packet received */ NET_RCV, /* incoming packet received */
/* uisnic -> virtpci */ /* uisnic -> virtpci */
NET_XMIT, /* for outgoing net packets */ NET_XMIT, /* for outgoing net packets */
/* virtnic -> uisnic */ /* virtnic -> uisnic */
NET_XMIT_DONE, /* outgoing packet xmitted */ NET_XMIT_DONE, /* outgoing packet xmitted */
/* uisnic -> virtpci */ /* uisnic -> virtpci */
NET_RCV_ENBDIS, /* enable/disable packet reception */ NET_RCV_ENBDIS, /* enable/disable packet reception */
/* virtnic -> uisnic */ /* virtnic -> uisnic */
NET_RCV_ENBDIS_ACK, /* acknowledge enable/disable packet NET_RCV_ENBDIS_ACK, /* acknowledge enable/disable packet */
* reception */ /* reception */
/* uisnic -> virtnic */ /* uisnic -> virtnic */
NET_RCV_PROMISC, /* enable/disable promiscuous mode */ NET_RCV_PROMISC, /* enable/disable promiscuous mode */
/* virtnic -> uisnic */ /* virtnic -> uisnic */
NET_CONNECT_STATUS, /* indicate the loss or restoration of a network NET_CONNECT_STATUS, /* indicate the loss or restoration of a network
* connection */ * connection
*/
/* uisnic -> virtnic */ /* uisnic -> virtnic */
NET_MACADDR, /* indicates the client has requested to update NET_MACADDR, /* indicates the client has requested to update
* its MAC addr */ * its MAC addr
*/
NET_MACADDR_ACK, /* MAC address */ NET_MACADDR_ACK, /* MAC address */
}; };
...@@ -170,51 +168,43 @@ struct vhba_wwnn { ...@@ -170,51 +168,43 @@ struct vhba_wwnn {
} __packed; } __packed;
/* 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).
struct vhba_config_max { /* 20 bytes */ */
u32 max_channel; /* maximum channel for devices attached to this struct vhba_config_max {/* 20 bytes */
* bus */ u32 max_channel;/* maximum channel for devices attached to this bus */
u32 max_id; /* maximum SCSI ID for devices attached to this u32 max_id; /* maximum SCSI ID for devices attached to bus */
* bus */ u32 max_lun; /* maximum SCSI LUN for devices attached to bus */
u32 max_lun; /* maximum SCSI LUN for devices attached to this u32 cmd_per_lun;/* maximum number of outstanding commands per LUN */
* bus */ u32 max_io_size;/* maximum io size for devices attached to this bus */
u32 cmd_per_lun; /* maximum number of outstanding commands per
* lun that are allowed at one time */
u32 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 io size is often determined by the resource of the hba. e.g */
/* max scatter gather list length * page size / sector size */ /* max scatter gather list length * page size / sector size */
} __packed; } __packed;
struct uiscmdrsp_scsi { struct uiscmdrsp_scsi {
u64 handle; /* the handle to the cmd that was received - u64 handle; /* the handle to the cmd that was received */
* send it back as is in the rsp packet. */ /* send it back as is in the rsp packet. */
u8 cmnd[MAX_CMND_SIZE]; /* the cdb for the command */ u8 cmnd[MAX_CMND_SIZE]; /* the cdb for the command */
u32 bufflen; /* length of data to be transferred out or in */ u32 bufflen; /* length of data to be transferred out or in */
u16 guest_phys_entries; /* Number of entries in scatter-gather (sg) u16 guest_phys_entries; /* Number of entries in scatter-gather list */
* list */
struct guest_phys_info gpi_list[MAX_PHYS_INFO]; /* physical address struct guest_phys_info gpi_list[MAX_PHYS_INFO]; /* physical address
* information for each * information for each
* fragment */ * fragment
*/
enum dma_data_direction data_dir; /* direction of the data, if any */ enum dma_data_direction data_dir; /* direction of the data, if any */
struct uisscsi_dest vdest; /* identifies the virtual hba, id, struct uisscsi_dest vdest; /* identifies the virtual hba, id, */
* channel, lun to which cmd was sent */ /* channel, lun to which cmd was sent */
/* the following fields are needed to queue the rsp back to cmd /* Needed to queue the rsp back to cmd originator */
* originator */ int linuxstat; /* original Linux status used by linux vdisk */
int linuxstat; /* the original Linux status - for use by linux
* vdisk code */
u8 scsistat; /* the scsi status */ u8 scsistat; /* the scsi status */
u8 addlstat; /* non-scsi status - covers cases like timeout u8 addlstat; /* non-scsi status */
* needed by windows guests */
#define ADDL_SEL_TIMEOUT 4 #define ADDL_SEL_TIMEOUT 4
/* the following fields are need to determine the result of command */ /* the following fields are need to determine the result of command */
u8 sensebuf[MAX_SENSE_SIZE]; /* sense info in case cmd failed; */ u8 sensebuf[MAX_SENSE_SIZE]; /* sense info in case cmd failed; */
/* it holds the sense_data struct; */ /* it holds the sense_data struct; */
/* see that struct for details. */ /* see that struct for details. */
void *vdisk; /* contains pointer to the vdisk so that we can clean up void *vdisk; /* pointer to the vdisk to clean up when IO completes. */
* when the IO completes. */
int no_disk_result; int no_disk_result;
/* used to return no disk inquiry result /* used to return no disk inquiry result
* when no_disk_result is set to 1, * when no_disk_result is set to 1,
...@@ -258,15 +248,15 @@ struct uiscmdrsp_scsi { ...@@ -258,15 +248,15 @@ struct uiscmdrsp_scsi {
*/ */
#define NO_DISK_INQUIRY_RESULT_LEN 36 #define NO_DISK_INQUIRY_RESULT_LEN 36
#define MIN_INQUIRY_RESULT_LEN 5 /* we need at least 5 bytes minimum for inquiry #define MIN_INQUIRY_RESULT_LEN 5 /* 5 bytes minimum for inquiry result */
* result */
/* 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) */ #define SCSI_SPC2_VER 4 /* indicates SCSI SPC2 (SPC3 is 5) */
/* Windows and Linux want different things for a non-existent lun. So, we'll let /* Windows and Linux want different things for a non-existent lun. So, we'll let
* caller pass in the peripheral qualifier and type. * caller pass in the peripheral qualifier and type.
* NOTE:[4] SCSI returns (n-4); so we return length-1-4 or length-5. */ * NOTE:[4] SCSI returns (n-4); so we return length-1-4 or length-5.
*/
#define SET_NO_DISK_INQUIRY_RESULT(buf, len, lun, lun0notpresent, notpresent) \ #define SET_NO_DISK_INQUIRY_RESULT(buf, len, lun, lun0notpresent, notpresent) \
do { \ do { \
...@@ -305,9 +295,7 @@ struct uiscmdrsp_scsi { ...@@ -305,9 +295,7 @@ struct uiscmdrsp_scsi {
} \ } \
} while (0) } while (0)
/* /* Struct & Defines to support sense information. */
* Struct & Defines to support sense information.
*/
/* The following struct is returned in sensebuf field in uiscmdrsp_scsi. It is /* The following struct is returned in sensebuf field in uiscmdrsp_scsi. It is
* initialized in exactly the manner that is recommended in Windows (hence the * initialized in exactly the manner that is recommended in Windows (hence the
...@@ -342,13 +330,11 @@ struct sense_data { ...@@ -342,13 +330,11 @@ struct sense_data {
struct net_pkt_xmt { struct net_pkt_xmt {
int len; /* full length of data in the packet */ int len; /* full length of data in the packet */
int num_frags; /* number of fragments in frags containing data */ int num_frags; /* number of fragments in frags containing data */
struct phys_info frags[MAX_PHYS_INFO]; /* physical page information for struct phys_info frags[MAX_PHYS_INFO]; /* physical page information */
* each fragment */
char ethhdr[ETH_HEADER_SIZE]; /* the ethernet header */ char ethhdr[ETH_HEADER_SIZE]; /* the ethernet header */
struct { struct {
/* these are needed for csum at uisnic end */ /* these are needed for csum at uisnic end */
u8 valid; /* 1 = rest of this struct is valid - else u8 valid; /* 1 = struct is valid - else ignore */
* ignore */
u8 hrawoffv; /* 1 = hwrafoff is valid */ u8 hrawoffv; /* 1 = hwrafoff is valid */
u8 nhrawoffv; /* 1 = nhwrafoff is valid */ u8 nhrawoffv; /* 1 = nhwrafoff is valid */
u16 protocol; /* specifies packet protocol */ u16 protocol; /* specifies packet protocol */
...@@ -385,11 +371,12 @@ struct net_pkt_xmtdone { ...@@ -385,11 +371,12 @@ struct net_pkt_xmtdone {
struct net_pkt_rcvpost { struct net_pkt_rcvpost {
/* rcv buf size must be large enough to include ethernet data len + /* rcv buf size must be large enough to include ethernet data len +
* ethernet header len - we are choosing 2K because it is guaranteed * ethernet header len - we are choosing 2K because it is guaranteed
* to be describable */ * to be describable
struct phys_info frag; /* physical page information for the */
* single fragment 2K rcv buf */ struct phys_info frag; /* physical page information for the */
u64 unique_num; /* This is used to make sure that /* single fragment 2K rcv buf */
* receive posts are returned to */ u64 unique_num;
/* unique_num ensure that receive posts are returned to */
/* the Adapter which we sent them originally. */ /* the Adapter which we sent them originally. */
} __packed; } __packed;
...@@ -399,8 +386,7 @@ struct net_pkt_rcv { ...@@ -399,8 +386,7 @@ struct net_pkt_rcv {
u32 rcv_done_len; /* length of received data */ u32 rcv_done_len; /* length of received data */
u8 numrcvbufs; /* number of receive buffers that contain the */ u8 numrcvbufs; /* number of receive buffers that contain the */
/* incoming data; guest end MUST chain these together. */ /* incoming data; guest end MUST chain these together. */
void *rcvbuf[MAX_NET_RCV_CHAIN]; /* the list of receive buffers void *rcvbuf[MAX_NET_RCV_CHAIN]; /* list of chained rcvbufs */
* that must be chained; */
/* each entry is a receive buffer provided by NET_RCV_POST. */ /* each entry is a receive buffer provided by NET_RCV_POST. */
/* NOTE: first rcvbuf in the chain will also be provided in net.buf. */ /* NOTE: first rcvbuf in the chain will also be provided in net.buf. */
u64 unique_num; u64 unique_num;
...@@ -469,18 +455,17 @@ struct uiscmdrsp_scsitaskmgmt { ...@@ -469,18 +455,17 @@ struct uiscmdrsp_scsitaskmgmt {
#define TASK_MGMT_FAILED 0 #define TASK_MGMT_FAILED 0
} __packed; } __packed;
/* The following is used by uissd to send disk add/remove notifications to /* Used by uissd to send disk add/remove notifications to Guest */
* Guest */
/* Note that the vHba pointer is not used by the Client/Guest side. */ /* 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; /* 0-remove, 1-add */
void *v_hba; /* Pointer to vhba_info for channel info to void *v_hba; /* channel info to route msg */
* route msg */
u32 channel, id, lun; /* SCSI Path of Disk to added or removed */ u32 channel, id, lun; /* SCSI Path of Disk to added or removed */
} __packed; } __packed;
/* The following is used by virthba/vSCSI to send the Acquire/Release commands /* The following is used by virthba/vSCSI to send the Acquire/Release commands
* to the IOVM. */ * to the IOVM.
*/
struct uiscmdrsp_vdiskmgmt { struct uiscmdrsp_vdiskmgmt {
enum vdisk_mgmt_types vdisktype; enum vdisk_mgmt_types vdisktype;
...@@ -533,8 +518,8 @@ struct uiscmdrsp { ...@@ -533,8 +518,8 @@ struct uiscmdrsp {
struct uiscmdrsp_disknotify disknotify; struct uiscmdrsp_disknotify disknotify;
struct uiscmdrsp_vdiskmgmt vdiskmgmt; struct uiscmdrsp_vdiskmgmt vdiskmgmt;
}; };
void *private_data; /* used to send the response when the cmd is void *private_data; /* send the response when the cmd is */
* done (scsi & scsittaskmgmt). */ /* done (scsi & scsittaskmgmt). */
struct uiscmdrsp *next; /* General Purpose Queue Link */ struct uiscmdrsp *next; /* General Purpose Queue Link */
struct uiscmdrsp *activeQ_next; /* Used to track active commands */ struct uiscmdrsp *activeQ_next; /* Used to track active commands */
struct uiscmdrsp *activeQ_prev; /* Used to track active commands */ struct uiscmdrsp *activeQ_prev; /* Used to track active commands */
...@@ -564,15 +549,11 @@ struct spar_io_channel_protocol { ...@@ -564,15 +549,11 @@ struct spar_io_channel_protocol {
} __packed; } __packed;
#define MAX_CLIENTSTRING_LEN 1024 #define MAX_CLIENTSTRING_LEN 1024
u8 client_string[MAX_CLIENTSTRING_LEN];/* NULL terminated - so holds /* client_string is NULL termimated so holds max -1 bytes */
* max - 1 bytes */ u8 client_string[MAX_CLIENTSTRING_LEN];
} __packed; } __packed;
/* INLINE functions for initializing and accessing I/O data channels */
/*
* INLINE functions for initializing and accessing I/O data channels
*/
#define SIZEOF_PROTOCOL (COVER(sizeof(struct spar_io_channel_protocol), 64)) #define SIZEOF_PROTOCOL (COVER(sizeof(struct spar_io_channel_protocol), 64))
#define SIZEOF_CMDRSP (COVER(sizeof(struct uiscmdrsp), 64)) #define SIZEOF_CMDRSP (COVER(sizeof(struct uiscmdrsp), 64))
......
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