vpoio.c (185003) | vpoio.c (187576) |
---|---|
1/*- 2 * Copyright (c) 1998, 1999 Nicolas Souchu 3 * Copyright (c) 2000 Alcove - Nicolas Souchu 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 14 unchanged lines hidden (view full) --- 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * 27 * 28 */ 29 30#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1998, 1999 Nicolas Souchu 3 * Copyright (c) 2000 Alcove - Nicolas Souchu 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 14 unchanged lines hidden (view full) --- 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * 27 * 28 */ 29 30#include <sys/cdefs.h> |
31__FBSDID("$FreeBSD: head/sys/dev/ppbus/vpoio.c 185003 2008-11-16 17:42:02Z jhb $"); | 31__FBSDID("$FreeBSD: head/sys/dev/ppbus/vpoio.c 187576 2009-01-21 23:10:06Z jhb $"); |
32 33#ifdef _KERNEL 34#include <sys/param.h> 35#include <sys/systm.h> 36#include <sys/module.h> 37#include <sys/bus.h> 38#include <sys/malloc.h> 39 --- 564 unchanged lines hidden (view full) --- 604 INB_NIBBLE_H, (void *)&(vpo)->vpo_nibble.h, 605 INB_NIBBLE_L, (void *)&(vpo)->vpo_nibble.l, 606 INB_NIBBLE_F, nibble_inbyte_hook, 607 INB_NIBBLE_P, (void *)&(vpo)->vpo_nibble); 608 609 /* 610 * Initialize mode dependent in/out microsequences 611 */ | 32 33#ifdef _KERNEL 34#include <sys/param.h> 35#include <sys/systm.h> 36#include <sys/module.h> 37#include <sys/bus.h> 38#include <sys/malloc.h> 39 --- 564 unchanged lines hidden (view full) --- 604 INB_NIBBLE_H, (void *)&(vpo)->vpo_nibble.h, 605 INB_NIBBLE_L, (void *)&(vpo)->vpo_nibble.l, 606 INB_NIBBLE_F, nibble_inbyte_hook, 607 INB_NIBBLE_P, (void *)&(vpo)->vpo_nibble); 608 609 /* 610 * Initialize mode dependent in/out microsequences 611 */ |
612 ppb_lock(ppbus); |
|
612 if ((error = ppb_request_bus(ppbus, vpo->vpo_dev, PPB_WAIT))) 613 goto error; 614 615 /* ppbus sets automatically the last mode entered during detection */ 616 switch (vpo->vpo_mode_found) { 617 case VP0_MODE_EPP: 618 ppb_MS_GET_init(ppbus, vpo->vpo_dev, epp17_instr_body); 619 ppb_MS_PUT_init(ppbus, vpo->vpo_dev, epp17_outstr_body); --- 11 unchanged lines hidden (view full) --- 631 break; 632 default: 633 panic("vpo: unknown mode %d", vpo->vpo_mode_found); 634 } 635 636 ppb_release_bus(ppbus, vpo->vpo_dev); 637 638error: | 613 if ((error = ppb_request_bus(ppbus, vpo->vpo_dev, PPB_WAIT))) 614 goto error; 615 616 /* ppbus sets automatically the last mode entered during detection */ 617 switch (vpo->vpo_mode_found) { 618 case VP0_MODE_EPP: 619 ppb_MS_GET_init(ppbus, vpo->vpo_dev, epp17_instr_body); 620 ppb_MS_PUT_init(ppbus, vpo->vpo_dev, epp17_outstr_body); --- 11 unchanged lines hidden (view full) --- 632 break; 633 default: 634 panic("vpo: unknown mode %d", vpo->vpo_mode_found); 635 } 636 637 ppb_release_bus(ppbus, vpo->vpo_dev); 638 639error: |
640 ppb_unlock(ppbus); |
|
639 return (error); 640} 641 642/* 643 * vpoio_reset_bus() 644 * 645 */ 646int --- 139 unchanged lines hidden --- | 641 return (error); 642} 643 644/* 645 * vpoio_reset_bus() 646 * 647 */ 648int --- 139 unchanged lines hidden --- |