summaryrefslogtreecommitdiffstats
path: root/drivers/staging/unisys/include
diff options
context:
space:
mode:
authorDavid Kershner <david.kershner@unisys.com>2015-06-15 23:31:58 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-06-16 14:33:51 -0700
commitdbb9d619941ad57dbe3c6667764e1eccd5ee5f1b (patch)
treec0afa04b8d8cd4f476ff26c1a39266bc428561af /drivers/staging/unisys/include
parent39630ee2a37e57cc8dfa3cf5a55f8249d6e883bc (diff)
downloadtalos-obmc-linux-dbb9d619941ad57dbe3c6667764e1eccd5ee5f1b.tar.gz
talos-obmc-linux-dbb9d619941ad57dbe3c6667764e1eccd5ee5f1b.zip
staging: unisys: define structures outside of iochannel
During testing with visornic the offset of num_rcv_bufs was being reported at 188 instead of 186. The vnic structure starts at 180 and the macaddr is only 6 bytes long. When I defined and packed the structures outside of the struct and then referenced them in the struct the correct offset was generated. Signed-off-by: David Kershner <david.kershner@unisys.com> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/unisys/include')
-rw-r--r--drivers/staging/unisys/include/iochannel.h24
1 files changed, 13 insertions, 11 deletions
diff --git a/drivers/staging/unisys/include/iochannel.h b/drivers/staging/unisys/include/iochannel.h
index 64a581a4b4e4..a559812342dc 100644
--- a/drivers/staging/unisys/include/iochannel.h
+++ b/drivers/staging/unisys/include/iochannel.h
@@ -540,6 +540,16 @@ struct uiscmdrsp {
struct uiscmdrsp *activeQ_prev; /* Used to track active commands */
} __packed;
+struct iochannel_vhba {
+ struct vhba_wwnn wwnn; /* 8 bytes */
+ struct vhba_config_max max; /* 20 bytes */
+} __packed; /* total = 28 bytes */
+struct iochannel_vnic {
+ u8 macaddr[6]; /* 6 bytes */
+ u32 num_rcv_bufs; /* 4 bytes */
+ u32 mtu; /* 4 bytes */
+ uuid_le zone_uuid; /* 16 bytes */
+} __packed;
/* 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
* response queues as specified in cmd_q and rsp_q SIGNAL_QUEUE_HEADERS.
@@ -549,17 +559,9 @@ struct spar_io_channel_protocol {
struct signal_queue_header cmd_q;
struct signal_queue_header rsp_q;
union {
- struct {
- struct vhba_wwnn wwnn; /* 8 bytes */
- struct vhba_config_max max; /* 20 bytes */
- } vhba; /* total = 28 bytes */
- struct {
- u8 macaddr[MAX_MACADDR_LEN]; /* 6 bytes */
- u32 num_rcv_bufs; /* 4 bytes */
- u32 mtu; /* 4 bytes */
- uuid_le zone_uuid; /* 16 bytes */
- } vnic; /* total = 30 bytes */
- };
+ struct iochannel_vhba vhba;
+ struct iochannel_vnic vnic;
+ } __packed;
#define MAX_CLIENTSTRING_LEN 1024
u8 client_string[MAX_CLIENTSTRING_LEN];/* NULL terminated - so holds
OpenPOWER on IntegriCloud