aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorNicolas Souchu <nsouch@FreeBSD.org>2000-01-14 08:03:15 +0000
committerNicolas Souchu <nsouch@FreeBSD.org>2000-01-14 08:03:15 +0000
commitbdcee5cff66ac3ccfbec20fb0e2a9424434ed349 (patch)
tree7d3873a16d2c831c2f67261c268df8788573d163 /sys
parent45b8027e2561cce06fd27a8d9ef1c836685e2bad (diff)
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ppbus/ppb_1284.c4
-rw-r--r--sys/dev/ppbus/ppb_1284.h2
-rw-r--r--sys/dev/ppbus/ppi.c4
3 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/ppbus/ppb_1284.c b/sys/dev/ppbus/ppb_1284.c
index 2040874855bc..47ee046c2435 100644
--- a/sys/dev/ppbus/ppb_1284.c
+++ b/sys/dev/ppbus/ppb_1284.c
@@ -88,7 +88,7 @@ ppb_1284_reset_error(device_t bus, int state)
*
* Get IEEE1284 state
*/
-static int
+int
ppb_1284_get_state(device_t bus)
{
return (DEVTOSOFTC(bus)->state);
@@ -99,7 +99,7 @@ ppb_1284_get_state(device_t bus)
*
* Change IEEE1284 state if no error occured
*/
-static int
+int
ppb_1284_set_state(device_t bus, int state)
{
struct ppb_data *ppb = DEVTOSOFTC(bus);
diff --git a/sys/dev/ppbus/ppb_1284.h b/sys/dev/ppbus/ppb_1284.h
index de1f270ab71c..5c4010f88bf5 100644
--- a/sys/dev/ppbus/ppb_1284.h
+++ b/sys/dev/ppbus/ppb_1284.h
@@ -116,6 +116,8 @@ extern int ppb_1284_negociate(device_t, int, int);
extern int ppb_1284_terminate(device_t);
extern int ppb_1284_read_id(device_t, int, char *, int, int *);
extern int ppb_1284_read(device_t, int, char *, int, int *);
+extern int ppb_1284_get_state(device_t bus);
+extern int ppb_1284_set_state(device_t bus, int state);
extern int ppb_peripheral_terminate(device_t, int);
extern int ppb_peripheral_negociate(device_t, int, int);
diff --git a/sys/dev/ppbus/ppi.c b/sys/dev/ppbus/ppi.c
index bd0a63833810..01436543b167 100644
--- a/sys/dev/ppbus/ppi.c
+++ b/sys/dev/ppbus/ppi.c
@@ -464,10 +464,10 @@ ppiwrite(dev_t dev, struct uio *uio, int ioflag)
/* we have to be peripheral to be able to send data, so
* wait for the appropriate state
*/
- if (ppb->state < PPB_PERIPHERAL_NEGOCIATION)
+ if (ppb_1284_get_state(ppbus) < PPB_PERIPHERAL_NEGOCIATION)
ppb_1284_terminate(ppbus);
- while (ppb->state != PPB_PERIPHERAL_IDLE) {
+ while (ppb_1284_get_state(ppbus) != PPB_PERIPHERAL_IDLE) {
/* XXX should check a variable before sleeping */
#ifdef DEBUG_1284
printf("s");