aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-ppc64/iSeries/vio.h
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@shinybook.infradead.org>2005-07-02 08:39:09 -0400
committerDavid Woodhouse <dwmw2@shinybook.infradead.org>2005-07-02 08:39:09 -0400
commitd2f6409584e2c62ffad81690562330ff3bf4a458 (patch)
tree3bdfb97d0b51be2f7f414f2107e97603c1206abb /include/asm-ppc64/iSeries/vio.h
parente1b09eba2686eca94a3a188042b518df6044a3c1 (diff)
parent4a89a04f1ee21a7c1f4413f1ad7dcfac50ff9b63 (diff)
Merge with master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'include/asm-ppc64/iSeries/vio.h')
-rw-r--r--include/asm-ppc64/iSeries/vio.h57
1 files changed, 29 insertions, 28 deletions
diff --git a/include/asm-ppc64/iSeries/vio.h b/include/asm-ppc64/iSeries/vio.h
index 3e5766a849d6..6c05e6257f53 100644
--- a/include/asm-ppc64/iSeries/vio.h
+++ b/include/asm-ppc64/iSeries/vio.h
@@ -8,32 +8,32 @@
8 * Colin Devilbiss <devilbis@us.ibm.com> 8 * Colin Devilbiss <devilbis@us.ibm.com>
9 * 9 *
10 * (C) Copyright 2000 IBM Corporation 10 * (C) Copyright 2000 IBM Corporation
11 * 11 *
12 * This header file is used by the iSeries virtual I/O device 12 * This header file is used by the iSeries virtual I/O device
13 * drivers. It defines the interfaces to the common functions 13 * drivers. It defines the interfaces to the common functions
14 * (implemented in drivers/char/viopath.h) as well as defining 14 * (implemented in drivers/char/viopath.h) as well as defining
15 * common functions and structures. Currently (at the time I 15 * common functions and structures. Currently (at the time I
16 * wrote this comment) the iSeries virtual I/O device drivers 16 * wrote this comment) the iSeries virtual I/O device drivers
17 * that use this are 17 * that use this are
18 * drivers/block/viodasd.c 18 * drivers/block/viodasd.c
19 * drivers/char/viocons.c 19 * drivers/char/viocons.c
20 * drivers/char/viotape.c 20 * drivers/char/viotape.c
21 * drivers/cdrom/viocd.c 21 * drivers/cdrom/viocd.c
22 * 22 *
23 * The iSeries virtual ethernet support (veth.c) uses a whole 23 * The iSeries virtual ethernet support (veth.c) uses a whole
24 * different set of functions. 24 * different set of functions.
25 * 25 *
26 * This program is free software; you can redistribute it and/or 26 * This program is free software; you can redistribute it and/or
27 * modify it under the terms of the GNU General Public License as 27 * modify it under the terms of the GNU General Public License as
28 * published by the Free Software Foundation; either version 2 of the 28 * published by the Free Software Foundation; either version 2 of the
29 * License, or (at your option) anyu later version. 29 * License, or (at your option) anyu later version.
30 * 30 *
31 * This program is distributed in the hope that it will be useful, but 31 * This program is distributed in the hope that it will be useful, but
32 * WITHOUT ANY WARRANTY; without even the implied warranty of 32 * WITHOUT ANY WARRANTY; without even the implied warranty of
33 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 33 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
34 * General Public License for more details. 34 * General Public License for more details.
35 * 35 *
36 * You should have received a copy of the GNU General Public License 36 * You should have received a copy of the GNU General Public License
37 * along with this program; if not, write to the Free Software Foundation, 37 * along with this program; if not, write to the Free Software Foundation,
38 * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 38 * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
39 * 39 *
@@ -44,39 +44,41 @@
44#include <asm/iSeries/HvTypes.h> 44#include <asm/iSeries/HvTypes.h>
45#include <asm/iSeries/HvLpEvent.h> 45#include <asm/iSeries/HvLpEvent.h>
46 46
47/* iSeries virtual I/O events use the subtype field in 47/*
48 * iSeries virtual I/O events use the subtype field in
48 * HvLpEvent to figure out what kind of vio event is coming 49 * HvLpEvent to figure out what kind of vio event is coming
49 * in. We use a table to route these, and this defines 50 * in. We use a table to route these, and this defines
50 * the maximum number of distinct subtypes 51 * the maximum number of distinct subtypes
51 */ 52 */
52#define VIO_MAX_SUBTYPES 8 53#define VIO_MAX_SUBTYPES 8
53 54
54/* Each subtype can register a handler to process their events. 55/*
56 * Each subtype can register a handler to process their events.
55 * The handler must have this interface. 57 * The handler must have this interface.
56 */ 58 */
57typedef void (vio_event_handler_t) (struct HvLpEvent * event); 59typedef void (vio_event_handler_t) (struct HvLpEvent * event);
58 60
59int viopath_open(HvLpIndex remoteLp, int subtype, int numReq); 61extern int viopath_open(HvLpIndex remoteLp, int subtype, int numReq);
60int viopath_close(HvLpIndex remoteLp, int subtype, int numReq); 62extern int viopath_close(HvLpIndex remoteLp, int subtype, int numReq);
61int vio_setHandler(int subtype, vio_event_handler_t * beh); 63extern int vio_setHandler(int subtype, vio_event_handler_t * beh);
62int vio_clearHandler(int subtype); 64extern int vio_clearHandler(int subtype);
63int viopath_isactive(HvLpIndex lp); 65extern int viopath_isactive(HvLpIndex lp);
64HvLpInstanceId viopath_sourceinst(HvLpIndex lp); 66extern HvLpInstanceId viopath_sourceinst(HvLpIndex lp);
65HvLpInstanceId viopath_targetinst(HvLpIndex lp); 67extern HvLpInstanceId viopath_targetinst(HvLpIndex lp);
66void vio_set_hostlp(void); 68extern void vio_set_hostlp(void);
67void *vio_get_event_buffer(int subtype); 69extern void *vio_get_event_buffer(int subtype);
68void vio_free_event_buffer(int subtype, void *buffer); 70extern void vio_free_event_buffer(int subtype, void *buffer);
69 71
70extern HvLpIndex viopath_hostLp; 72extern HvLpIndex viopath_hostLp;
71extern HvLpIndex viopath_ourLp; 73extern HvLpIndex viopath_ourLp;
72 74
73#define VIOCHAR_MAX_DATA 200 75#define VIOCHAR_MAX_DATA 200
74 76
75#define VIOMAJOR_SUBTYPE_MASK 0xff00 77#define VIOMAJOR_SUBTYPE_MASK 0xff00
76#define VIOMINOR_SUBTYPE_MASK 0x00ff 78#define VIOMINOR_SUBTYPE_MASK 0x00ff
77#define VIOMAJOR_SUBTYPE_SHIFT 8 79#define VIOMAJOR_SUBTYPE_SHIFT 8
78 80
79#define VIOVERSION 0x0101 81#define VIOVERSION 0x0101
80 82
81/* 83/*
82 * This is the general structure for VIO errors; each module should have 84 * This is the general structure for VIO errors; each module should have
@@ -89,8 +91,8 @@ struct vio_error_entry {
89 int errno; 91 int errno;
90 const char *msg; 92 const char *msg;
91}; 93};
92const struct vio_error_entry *vio_lookup_rc(const struct vio_error_entry 94extern const struct vio_error_entry *vio_lookup_rc(
93 *local_table, u16 rc); 95 const struct vio_error_entry *local_table, u16 rc);
94 96
95enum viosubtypes { 97enum viosubtypes {
96 viomajorsubtype_monitor = 0x0100, 98 viomajorsubtype_monitor = 0x0100,
@@ -102,7 +104,6 @@ enum viosubtypes {
102 viomajorsubtype_scsi = 0x0700 104 viomajorsubtype_scsi = 0x0700
103}; 105};
104 106
105
106enum vioconfigsubtype { 107enum vioconfigsubtype {
107 vioconfigget = 0x0001, 108 vioconfigget = 0x0001,
108}; 109};