diff options
author | Sebastian Ott <sebott@linux.vnet.ibm.com> | 2013-06-05 12:58:35 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2013-06-26 15:10:14 -0400 |
commit | da5b6cb162b6bef39d76446a5e015d6a111459b1 (patch) | |
tree | dae7bc447358be3c4f2a25e27c9a2d2bf1e1034b /drivers/s390/cio/chsc.h | |
parent | d475f942b1dd6a897dac3ad4ed98d6994b275378 (diff) |
s390/qdio: cleanup chsc SSQD usage
Cleanup the function qdio_setup_get_ssqd. Fix some possible
memleaks and an unchecked allocation and create a wrapper
for SSQD in chsc.c .
Reviewed-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio/chsc.h')
-rw-r--r-- | drivers/s390/cio/chsc.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/s390/cio/chsc.h b/drivers/s390/cio/chsc.h index 62d096f11e65..2b88e74e6b65 100644 --- a/drivers/s390/cio/chsc.h +++ b/drivers/s390/cio/chsc.h | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <asm/chpid.h> | 7 | #include <asm/chpid.h> |
8 | #include <asm/chsc.h> | 8 | #include <asm/chsc.h> |
9 | #include <asm/schid.h> | 9 | #include <asm/schid.h> |
10 | #include <asm/qdio.h> | ||
10 | 11 | ||
11 | #define CHSC_SDA_OC_MSS 0x2 | 12 | #define CHSC_SDA_OC_MSS 0x2 |
12 | 13 | ||
@@ -72,6 +73,20 @@ struct chsc_ssd_info { | |||
72 | u16 fla[8]; | 73 | u16 fla[8]; |
73 | }; | 74 | }; |
74 | 75 | ||
76 | struct chsc_ssqd_area { | ||
77 | struct chsc_header request; | ||
78 | u16:10; | ||
79 | u8 ssid:2; | ||
80 | u8 fmt:4; | ||
81 | u16 first_sch; | ||
82 | u16:16; | ||
83 | u16 last_sch; | ||
84 | u32:32; | ||
85 | struct chsc_header response; | ||
86 | u32:32; | ||
87 | struct qdio_ssqd_desc qdio_ssqd; | ||
88 | } __packed; | ||
89 | |||
75 | struct chsc_scpd { | 90 | struct chsc_scpd { |
76 | struct chsc_header request; | 91 | struct chsc_header request; |
77 | u32:2; | 92 | u32:2; |
@@ -111,7 +126,7 @@ int chsc_determine_fmt1_channel_path_desc(struct chp_id chpid, | |||
111 | void chsc_chp_online(struct chp_id chpid); | 126 | void chsc_chp_online(struct chp_id chpid); |
112 | void chsc_chp_offline(struct chp_id chpid); | 127 | void chsc_chp_offline(struct chp_id chpid); |
113 | int chsc_get_channel_measurement_chars(struct channel_path *chp); | 128 | int chsc_get_channel_measurement_chars(struct channel_path *chp); |
114 | 129 | int chsc_ssqd(struct subchannel_id schid, struct chsc_ssqd_area *ssqd); | |
115 | int chsc_error_from_response(int response); | 130 | int chsc_error_from_response(int response); |
116 | 131 | ||
117 | int chsc_siosl(struct subchannel_id schid); | 132 | int chsc_siosl(struct subchannel_id schid); |