| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | #ifndef S390_CHSC_H
 | 
					
						
							|  |  |  | #define S390_CHSC_H
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2007-04-27 16:01:26 +02:00
										 |  |  | #include <linux/types.h>
 | 
					
						
							|  |  |  | #include <linux/device.h>
 | 
					
						
							| 
									
										
										
										
											2007-04-27 16:01:31 +02:00
										 |  |  | #include <asm/chpid.h>
 | 
					
						
							| 
									
										
										
										
											2008-07-14 09:59:05 +02:00
										 |  |  | #include <asm/chsc.h>
 | 
					
						
							|  |  |  | #include <asm/schid.h>
 | 
					
						
							| 
									
										
										
										
											2007-04-27 16:01:26 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2006-01-06 00:19:25 -08:00
										 |  |  | #define CHSC_SDA_OC_MSS   0x2
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | struct chsc_header { | 
					
						
							|  |  |  | 	u16 length; | 
					
						
							|  |  |  | 	u16 code; | 
					
						
							| 
									
										
										
										
											2007-02-05 21:17:40 +01:00
										 |  |  | } __attribute__ ((packed)); | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2006-03-24 03:15:14 -08:00
										 |  |  | #define NR_MEASUREMENT_CHARS 5
 | 
					
						
							|  |  |  | struct cmg_chars { | 
					
						
							|  |  |  | 	u32 values[NR_MEASUREMENT_CHARS]; | 
					
						
							| 
									
										
										
										
											2007-02-05 21:17:40 +01:00
										 |  |  | } __attribute__ ((packed)); | 
					
						
							| 
									
										
										
										
											2006-03-24 03:15:14 -08:00
										 |  |  | 
 | 
					
						
							|  |  |  | #define NR_MEASUREMENT_ENTRIES 8
 | 
					
						
							|  |  |  | struct cmg_entry { | 
					
						
							|  |  |  | 	u32 values[NR_MEASUREMENT_ENTRIES]; | 
					
						
							| 
									
										
										
										
											2007-02-05 21:17:40 +01:00
										 |  |  | } __attribute__ ((packed)); | 
					
						
							| 
									
										
										
										
											2006-03-24 03:15:14 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | struct channel_path_desc { | 
					
						
							|  |  |  | 	u8 flags; | 
					
						
							|  |  |  | 	u8 lsn; | 
					
						
							|  |  |  | 	u8 desc; | 
					
						
							|  |  |  | 	u8 chpid; | 
					
						
							|  |  |  | 	u8 swla; | 
					
						
							|  |  |  | 	u8 zeroes; | 
					
						
							|  |  |  | 	u8 chla; | 
					
						
							|  |  |  | 	u8 chpp; | 
					
						
							| 
									
										
										
										
											2007-02-05 21:17:40 +01:00
										 |  |  | } __attribute__ ((packed)); | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2007-04-27 16:01:28 +02:00
										 |  |  | struct channel_path; | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | struct css_chsc_char { | 
					
						
							|  |  |  | 	u64 res; | 
					
						
							| 
									
										
										
										
											2006-03-24 03:15:14 -08:00
										 |  |  | 	u64 : 20; | 
					
						
							|  |  |  | 	u32 secm : 1; /* bit 84 */ | 
					
						
							|  |  |  | 	u32 : 1; | 
					
						
							|  |  |  | 	u32 scmc : 1; /* bit 86 */ | 
					
						
							|  |  |  | 	u32 : 20; | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | 	u32 scssc : 1;  /* bit 107 */ | 
					
						
							|  |  |  | 	u32 scsscf : 1; /* bit 108 */ | 
					
						
							|  |  |  | 	u32 : 19; | 
					
						
							|  |  |  | }__attribute__((packed)); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | extern struct css_chsc_char css_chsc_characteristics; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2007-04-27 16:01:35 +02:00
										 |  |  | struct chsc_ssd_info { | 
					
						
							|  |  |  | 	u8 path_mask; | 
					
						
							|  |  |  | 	u8 fla_valid_mask; | 
					
						
							|  |  |  | 	struct chp_id chpid[8]; | 
					
						
							|  |  |  | 	u16 fla[8]; | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | extern int chsc_get_ssd_info(struct subchannel_id schid, | 
					
						
							|  |  |  | 			     struct chsc_ssd_info *ssd); | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | extern int chsc_determine_css_characteristics(void); | 
					
						
							| 
									
										
										
										
											2007-07-27 12:29:21 +02:00
										 |  |  | extern int chsc_alloc_sei_area(void); | 
					
						
							|  |  |  | extern void chsc_free_sei_area(void); | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2006-01-06 00:19:25 -08:00
										 |  |  | extern int chsc_enable_facility(int); | 
					
						
							| 
									
										
										
										
											2006-03-24 03:15:14 -08:00
										 |  |  | struct channel_subsystem; | 
					
						
							|  |  |  | extern int chsc_secm(struct channel_subsystem *, int); | 
					
						
							| 
									
										
										
										
											2009-06-16 10:30:22 +02:00
										 |  |  | int __chsc_do_secm(struct channel_subsystem *css, int enable, void *page); | 
					
						
							| 
									
										
										
										
											2006-01-06 00:19:25 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2007-04-27 16:01:28 +02:00
										 |  |  | int chsc_chp_vary(struct chp_id chpid, int on); | 
					
						
							| 
									
										
										
										
											2008-07-14 09:59:05 +02:00
										 |  |  | int chsc_determine_channel_path_desc(struct chp_id chpid, int fmt, int rfmt, | 
					
						
							|  |  |  | 				     int c, int m, | 
					
						
							|  |  |  | 				     struct chsc_response_struct *resp); | 
					
						
							|  |  |  | int chsc_determine_base_channel_path_desc(struct chp_id chpid, | 
					
						
							|  |  |  | 					  struct channel_path_desc *desc); | 
					
						
							| 
									
										
										
										
											2007-04-27 16:01:34 +02:00
										 |  |  | void chsc_chp_online(struct chp_id chpid); | 
					
						
							| 
									
										
										
										
											2007-04-27 16:01:28 +02:00
										 |  |  | void chsc_chp_offline(struct chp_id chpid); | 
					
						
							|  |  |  | int chsc_get_channel_measurement_chars(struct channel_path *chp); | 
					
						
							| 
									
										
										
										
											2006-01-06 00:19:23 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-07-17 17:16:47 +02:00
										 |  |  | int chsc_error_from_response(int response); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | #endif
 |