Merge tag 'cxl-for-5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl
[linux-2.6-microblaze.git] / drivers / thunderbolt / tb_msgs.h
index bcabfcb..fe1afa4 100644 (file)
@@ -535,15 +535,25 @@ struct tb_xdp_header {
        u32 type;
 };
 
+struct tb_xdp_error_response {
+       struct tb_xdp_header hdr;
+       u32 error;
+};
+
 struct tb_xdp_uuid {
        struct tb_xdp_header hdr;
 };
 
 struct tb_xdp_uuid_response {
-       struct tb_xdp_header hdr;
-       uuid_t src_uuid;
-       u32 src_route_hi;
-       u32 src_route_lo;
+       union {
+               struct tb_xdp_error_response err;
+               struct {
+                       struct tb_xdp_header hdr;
+                       uuid_t src_uuid;
+                       u32 src_route_hi;
+                       u32 src_route_lo;
+               };
+       };
 };
 
 struct tb_xdp_properties {
@@ -555,13 +565,18 @@ struct tb_xdp_properties {
 };
 
 struct tb_xdp_properties_response {
-       struct tb_xdp_header hdr;
-       uuid_t src_uuid;
-       uuid_t dst_uuid;
-       u16 offset;
-       u16 data_length;
-       u32 generation;
-       u32 data[0];
+       union {
+               struct tb_xdp_error_response err;
+               struct {
+                       struct tb_xdp_header hdr;
+                       uuid_t src_uuid;
+                       uuid_t dst_uuid;
+                       u16 offset;
+                       u16 data_length;
+                       u32 generation;
+                       u32 data[];
+               };
+       };
 };
 
 /*
@@ -580,7 +595,10 @@ struct tb_xdp_properties_changed {
 };
 
 struct tb_xdp_properties_changed_response {
-       struct tb_xdp_header hdr;
+       union {
+               struct tb_xdp_error_response err;
+               struct tb_xdp_header hdr;
+       };
 };
 
 enum tb_xdp_error {
@@ -591,9 +609,4 @@ enum tb_xdp_error {
        ERROR_NOT_READY,
 };
 
-struct tb_xdp_error_response {
-       struct tb_xdp_header hdr;
-       u32 error;
-};
-
 #endif