aboutsummaryrefslogtreecommitdiffstats
path: root/net/ncsi/ncsi-pkt.h
diff options
context:
space:
mode:
authorGavin Shan <gwshan@linux.vnet.ibm.com>2016-07-19 11:54:20 +1000
committerDavid S. Miller <davem@davemloft.net>2016-07-19 20:49:17 -0700
commit7a82ecf4cfb854955198945340ae13558b64e1af (patch)
treea2ae3a2862a8e724231de15f8e0582437fd877d3 /net/ncsi/ncsi-pkt.h
parentnet/ncsi: Package and channel management (diff)
downloadlinux-dev-7a82ecf4cfb854955198945340ae13558b64e1af.tar.xz
linux-dev-7a82ecf4cfb854955198945340ae13558b64e1af.zip
net/ncsi: NCSI AEN packet handler
This introduces NCSI AEN packet handlers that result in (A) the currently active channel is reconfigured; (B) Currently active channel is deconfigured and disabled, another channel is chosen as active one and configured. Case (B) won't happen if hardware arbitration has been enabled, the channel that was in active state is suspended simply. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Acked-by: Joel Stanley <joel@jms.id.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ncsi/ncsi-pkt.h')
-rw-r--r--net/ncsi/ncsi-pkt.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/net/ncsi/ncsi-pkt.h b/net/ncsi/ncsi-pkt.h
index 4bdefd988354..3ea49ed0a935 100644
--- a/net/ncsi/ncsi-pkt.h
+++ b/net/ncsi/ncsi-pkt.h
@@ -31,6 +31,12 @@ struct ncsi_rsp_pkt_hdr {
__be16 reason; /* Response reason */
};
+struct ncsi_aen_pkt_hdr {
+ struct ncsi_pkt_hdr common; /* Common NCSI packet header */
+ unsigned char reserved2[3]; /* Reserved */
+ unsigned char type; /* AEN packet type */
+};
+
/* NCSI common command packet */
struct ncsi_cmd_pkt {
struct ncsi_cmd_pkt_hdr cmd; /* Command header */
@@ -296,6 +302,30 @@ struct ncsi_rsp_gpuuid_pkt {
__be32 checksum;
};
+/* AEN: Link State Change */
+struct ncsi_aen_lsc_pkt {
+ struct ncsi_aen_pkt_hdr aen; /* AEN header */
+ __be32 status; /* Link status */
+ __be32 oem_status; /* OEM link status */
+ __be32 checksum; /* Checksum */
+ unsigned char pad[14];
+};
+
+/* AEN: Configuration Required */
+struct ncsi_aen_cr_pkt {
+ struct ncsi_aen_pkt_hdr aen; /* AEN header */
+ __be32 checksum; /* Checksum */
+ unsigned char pad[22];
+};
+
+/* AEN: Host Network Controller Driver Status Change */
+struct ncsi_aen_hncdsc_pkt {
+ struct ncsi_aen_pkt_hdr aen; /* AEN header */
+ __be32 status; /* Status */
+ __be32 checksum; /* Checksum */
+ unsigned char pad[18];
+};
+
/* NCSI packet revision */
#define NCSI_PKT_REVISION 0x01
@@ -376,4 +406,10 @@ struct ncsi_rsp_gpuuid_pkt {
#define NCSI_PKT_RSP_R_LENGTH 0x0005 /* Invalid payload length */
#define NCSI_PKT_RSP_R_UNKNOWN 0x7fff /* Command type unsupported */
+/* NCSI AEN packet type */
+#define NCSI_PKT_AEN 0xFF /* AEN Packet */
+#define NCSI_PKT_AEN_LSC 0x00 /* Link status change */
+#define NCSI_PKT_AEN_CR 0x01 /* Configuration required */
+#define NCSI_PKT_AEN_HNCDSC 0x02 /* HNC driver status change */
+
#endif /* __NCSI_PKT_H__ */