aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio/chp.h
diff options
context:
space:
mode:
authorPeter Oberparleiter <peter.oberparleiter@de.ibm.com>2007-04-27 16:01:31 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2007-04-27 16:01:39 +0200
commite5854a5839fa426a7873f038080f63587de5f1f1 (patch)
treec0a3705df925e652ff0694a47e7acb98e5f7d7bd /drivers/s390/cio/chp.h
parentf5ba6c863617c15d22cce5f8666ff4c832773025 (diff)
downloadkernel_goldelico_gta04-e5854a5839fa426a7873f038080f63587de5f1f1.zip
kernel_goldelico_gta04-e5854a5839fa426a7873f038080f63587de5f1f1.tar.gz
kernel_goldelico_gta04-e5854a5839fa426a7873f038080f63587de5f1f1.tar.bz2
[S390] cio: Channel-path configure function.
Add a new attribute to the channel-path sysfs directory through which channel-path configure operations can be triggered. Also listen for hardware events requesting channel-path configure operations and process them accordingly. Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio/chp.h')
-rw-r--r--drivers/s390/cio/chp.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/drivers/s390/cio/chp.h b/drivers/s390/cio/chp.h
index ac2b1a9..862af69 100644
--- a/drivers/s390/cio/chp.h
+++ b/drivers/s390/cio/chp.h
@@ -10,10 +10,23 @@
#include <linux/types.h>
#include <linux/device.h>
-
-#include "chpid.h"
+#include <asm/chpid.h>
#include "chsc.h"
+#define CHP_STATUS_STANDBY 0
+#define CHP_STATUS_CONFIGURED 1
+#define CHP_STATUS_RESERVED 2
+#define CHP_STATUS_NOT_RECOGNIZED 3
+
+static inline int chp_test_bit(u8 *bitmap, int num)
+{
+ int byte = num >> 3;
+ int mask = 128 >> (num & 7);
+
+ return (bitmap[byte] & mask) ? 1 : 0;
+}
+
+
struct channel_path {
struct chp_id chpid;
int state;
@@ -33,5 +46,8 @@ int chp_process_crw(int id, int available);
void chp_remove_cmg_attr(struct channel_path *chp);
int chp_add_cmg_attr(struct channel_path *chp);
int chp_new(struct chp_id chpid);
+void chp_cfg_schedule(struct chp_id chpid, int configure);
+void chp_cfg_cancel_deconfigure(struct chp_id chpid);
+int chp_info_get_status(struct chp_id chpid);
#endif /* S390_CHP_H */