ida_eisa.c (139749) | ida_eisa.c (144991) |
---|---|
1/*- 2 * Copyright (c) 2000 Jonathan Lemon 3 * Copyright (c) 1999 by Matthew N. Dodd <winter@jurai.net> 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: --- 12 unchanged lines hidden (view full) --- 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 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#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2000 Jonathan Lemon 3 * Copyright (c) 1999 by Matthew N. Dodd <winter@jurai.net> 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: --- 12 unchanged lines hidden (view full) --- 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 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#include <sys/cdefs.h> |
29__FBSDID("$FreeBSD: head/sys/dev/ida/ida_eisa.c 139749 2005-01-06 01:43:34Z imp $"); | 29__FBSDID("$FreeBSD: head/sys/dev/ida/ida_eisa.c 144991 2005-04-13 05:06:57Z mdodd $"); |
30 31#include <sys/param.h> 32#include <sys/systm.h> 33#include <sys/kernel.h> 34#include <sys/module.h> 35#include <sys/bus.h> 36 37#include <sys/bio.h> --- 59 unchanged lines hidden (view full) --- 97 return (0); 98 99 ida_outb(ida, R_EISA_SYSTEM_DOORBELL, EISA_CHANNEL_BUSY); 100 completed = ida_inl(ida, R_EISA_COMPLETE_ADDR); 101 status = ida_inb(ida, R_EISA_LIST_STATUS); 102 ida_outb(ida, R_EISA_LOCAL_DOORBELL, EISA_CHANNEL_CLEAR); 103 104 if (completed != 0) { | 30 31#include <sys/param.h> 32#include <sys/systm.h> 33#include <sys/kernel.h> 34#include <sys/module.h> 35#include <sys/bus.h> 36 37#include <sys/bio.h> --- 59 unchanged lines hidden (view full) --- 97 return (0); 98 99 ida_outb(ida, R_EISA_SYSTEM_DOORBELL, EISA_CHANNEL_BUSY); 100 completed = ida_inl(ida, R_EISA_COMPLETE_ADDR); 101 status = ida_inb(ida, R_EISA_LIST_STATUS); 102 ida_outb(ida, R_EISA_LOCAL_DOORBELL, EISA_CHANNEL_CLEAR); 103 104 if (completed != 0) { |
105 hwqcb = (struct ida_hardware_qcb *) | 105 hwqcb = (struct ida_hardware_qcb *) |
106 ((bus_addr_t)ida->hwqcbs + 107 ((completed & ~3) - ida->hwqcb_busaddr)); 108 hwqcb->req.error = status; 109 } 110 111 return (completed); 112} 113 --- 145 unchanged lines hidden (view full) --- 259 device_printf(dev, "slot %d, illegal irq setting.\n", 260 eisa_get_slot(dev)); 261 return (ENXIO); 262 } 263 264 eisa_add_iospace(dev, (io_base + IDA_EISA_IOPORT_START), 265 IDA_EISA_IOPORT_LEN, RESVADDR_NONE); 266 | 106 ((bus_addr_t)ida->hwqcbs + 107 ((completed & ~3) - ida->hwqcb_busaddr)); 108 hwqcb->req.error = status; 109 } 110 111 return (completed); 112} 113 --- 145 unchanged lines hidden (view full) --- 259 device_printf(dev, "slot %d, illegal irq setting.\n", 260 eisa_get_slot(dev)); 261 return (ENXIO); 262 } 263 264 eisa_add_iospace(dev, (io_base + IDA_EISA_IOPORT_START), 265 IDA_EISA_IOPORT_LEN, RESVADDR_NONE); 266 |
267 eisa_add_intr(dev, irq, EISA_TRIGGER_LEVEL); /* XXX ??? */ | 267 eisa_add_intr(dev, irq, EISA_TRIGGER_LEVEL); /* XXX ??? */ |
268 269 return (0); 270} 271 272static int 273ida_eisa_attach(device_t dev) 274{ 275 struct ida_softc *ida; --- 72 unchanged lines hidden --- | 268 269 return (0); 270} 271 272static int 273ida_eisa_attach(device_t dev) 274{ 275 struct ida_softc *ida; --- 72 unchanged lines hidden --- |