From bc35c17446fab005a7e11b67b9004736f1c8498b Mon Sep 17 00:00:00 2001 From: Nicolas Souchu Date: Sun, 10 Jan 1999 12:04:56 +0000 Subject: Major ppbus commit with: + ECP parallel port chipset FIFO detection + DMA+FIFO parallel I/O handled as chipset specific + nlpt updated in order to use the above enhanced parallel I/O. Use 'lptcontrol -e' to use enhanced I/O + Various options documented in LINT + Full IEEE1284 NIBBLE and BYTE modes support. See ppbus(4) for an overview of the IEEE1284 standard + Detection of PnP parallel devices at boot + Read capability added to nlpt driver to get IEEE1284 compliant printer status with a simple 'cat /dev/lpt0' + IEEE1284 peripheral emulation added to BYTE mode. Two computers may dialog according to IEEE1284 signaling method. See PERIPH_1284 option and /sys/dev/ppbus/ppi.c All this code is supposed to provide basic functions for IEEE1284 programming. ppi.c and nlpt.c may act as examples. --- sys/dev/ppbus/vpoio.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'sys/dev/ppbus/vpoio.c') diff --git a/sys/dev/ppbus/vpoio.c b/sys/dev/ppbus/vpoio.c index e42eca7c5c2d..54791ee44dcc 100644 --- a/sys/dev/ppbus/vpoio.c +++ b/sys/dev/ppbus/vpoio.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: vpoio.c,v 1.3 1998/09/20 14:41:54 nsouch Exp $ + * $Id: vpoio.c,v 1.4 1998/12/07 21:58:16 archie Exp $ * */ @@ -41,6 +41,8 @@ #include #endif /*KERNEL */ +#include "opt_vpo.h" + #include #include #include @@ -284,8 +286,13 @@ vpoio_connect(struct vpoio_data *vpo, int how) int error; int ret; - if ((error = ppb_request_bus(&vpo->vpo_dev, how))) + if ((error = ppb_request_bus(&vpo->vpo_dev, how))) { + +#ifdef VP0_DEBUG + printf("%s: can't request bus!\n", __FUNCTION__); +#endif return error; + } if (PPB_IN_EPP_MODE(&vpo->vpo_dev)) ppb_MS_microseq(&vpo->vpo_dev, connect_epp_microseq, &ret); @@ -437,8 +444,8 @@ vpoio_outstr(struct vpoio_data *vpo, char *buffer, int size) ppb_wctr(&vpo->vpo_dev, H_AUTO | H_nSELIN | H_INIT | H_STROBE); } - /* ppb_ecp_sync(&vpo->vpo_dev); */ #endif + ppb_ecp_sync(&vpo->vpo_dev); return (error); } @@ -476,8 +483,8 @@ vpoio_instr(struct vpoio_data *vpo, char *buffer, int size) ppb_wctr(&vpo->vpo_dev, PCD | H_AUTO | H_nSELIN | H_INIT | H_STROBE); } - /* ppb_ecp_sync(&vpo->vpo_dev); */ #endif + ppb_ecp_sync(&vpo->vpo_dev); return (error); } @@ -701,6 +708,10 @@ vpoio_reset_bus(struct vpoio_data *vpo) { /* first, connect to the drive */ if (vpoio_connect(vpo, PPB_WAIT|PPB_INTR) || !vpoio_in_disk_mode(vpo)) { + +#ifdef VP0_DEBUG + printf("%s: not in disk mode!\n", __FUNCTION__); +#endif /* release ppbus */ vpoio_disconnect(vpo); return (1); -- cgit v1.2.3