if_ep_isa.c (56428) | if_ep_isa.c (56429) |
---|---|
1/* 2 * Copyright (c) 1994 Herb Peyerl <hpeyerl@novatel.ca> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 23 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 24 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 * | 1/* 2 * Copyright (c) 1994 Herb Peyerl <hpeyerl@novatel.ca> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 23 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 24 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 * |
30 * $FreeBSD: head/sys/dev/ep/if_ep_isa.c 56428 2000-01-23 08:23:38Z mdodd $ | 30 * $FreeBSD: head/sys/dev/ep/if_ep_isa.c 56429 2000-01-23 08:46:21Z mdodd $ |
31 */ 32 33#include <sys/param.h> 34#include <sys/systm.h> 35#include <sys/kernel.h> 36#include <sys/socket.h> 37 38#include <sys/module.h> --- 95 unchanged lines hidden (view full) --- 134 return (i->name); 135 i++; 136 } 137 /* 138 * If we see a card that is likely to be a 3c509 139 * return something so that it will work; be annoying 140 * so that the user will tell us about it though. 141 */ | 31 */ 32 33#include <sys/param.h> 34#include <sys/systm.h> 35#include <sys/kernel.h> 36#include <sys/socket.h> 37 38#include <sys/module.h> --- 95 unchanged lines hidden (view full) --- 134 return (i->name); 135 i++; 136 } 137 /* 138 * If we see a card that is likely to be a 3c509 139 * return something so that it will work; be annoying 140 * so that the user will tell us about it though. 141 */ |
142 if ((id >> 8) == ISA_ID_3C509_XXX) { | 142 if ((id >> 4) == ISA_ID_3C509_XXX) { |
143 return ("Unknown 3c509; notify maintainer!"); 144 } 145 return (NULL); 146} 147 148static void 149ep_isa_identify (driver_t *driver, device_t parent) 150{ --- 55 unchanged lines hidden (view full) --- 206 207 /* Find known ISA boards */ 208 desc = ep_isa_match_id(isa_id, ep_isa_devs); 209 if (!desc) { 210 if (bootverbose) { 211 device_printf(parent, "if_ep: unknown ID 0x%08x\n", 212 isa_id); 213 } | 143 return ("Unknown 3c509; notify maintainer!"); 144 } 145 return (NULL); 146} 147 148static void 149ep_isa_identify (driver_t *driver, device_t parent) 150{ --- 55 unchanged lines hidden (view full) --- 206 207 /* Find known ISA boards */ 208 desc = ep_isa_match_id(isa_id, ep_isa_devs); 209 if (!desc) { 210 if (bootverbose) { 211 device_printf(parent, "if_ep: unknown ID 0x%08x\n", 212 isa_id); 213 } |
214 break; | 214 continue; |
215 } 216 217 /* Retreive IRQ */ 218 data = get_eeprom_data(ELINK_ID_PORT, EEPROM_RESOURCE_CFG); 219 irq = (data >> 12); 220 221 /* Retreive IOPORT */ 222 data = get_eeprom_data(ELINK_ID_PORT, EEPROM_ADDR_CFG); --- 4 unchanged lines hidden (view full) --- 227#endif 228 229 /* Test for an adapter with PnP support. */ 230 data = get_eeprom_data(ELINK_ID_PORT, EEPROM_CAP); 231 if (data == CAP_ISA) { 232 data = get_eeprom_data(ELINK_ID_PORT, EEPROM_INT_CONFIG_1); 233 if (data & ICW1_IAS_PNP) { 234 if (bootverbose) { | 215 } 216 217 /* Retreive IRQ */ 218 data = get_eeprom_data(ELINK_ID_PORT, EEPROM_RESOURCE_CFG); 219 irq = (data >> 12); 220 221 /* Retreive IOPORT */ 222 data = get_eeprom_data(ELINK_ID_PORT, EEPROM_ADDR_CFG); --- 4 unchanged lines hidden (view full) --- 227#endif 228 229 /* Test for an adapter with PnP support. */ 230 data = get_eeprom_data(ELINK_ID_PORT, EEPROM_CAP); 231 if (data == CAP_ISA) { 232 data = get_eeprom_data(ELINK_ID_PORT, EEPROM_INT_CONFIG_1); 233 if (data & ICW1_IAS_PNP) { 234 if (bootverbose) { |
235 device_printf(parent, "if_ep: Adapter at 0x%03x in PnP mode!\n", 236 ioport); | 235 device_printf(parent, "if_ep: <%s> at 0x%03x in PnP mode!\n", 236 desc, ioport); |
237 } 238 /* Set the adaptor tag so that the next card can be found. */ 239 outb(ELINK_ID_PORT, tag--); 240 continue; 241 } 242 } 243 244 /* Set the adaptor tag so that the next card can be found. */ 245 outb(ELINK_ID_PORT, tag--); 246 247 /* Activate the adaptor at the EEPROM location. */ 248 outb(ELINK_ID_PORT, ACTIVATE_ADAPTER_TO_CONFIG); 249 250 /* Test for an adapter in TEST mode. */ 251 outw(ioport + EP_COMMAND, WINDOW_SELECT | 0); 252 data = inw(ioport + EP_W0_EEPROM_COMMAND); 253 if (data & EEPROM_TST_MODE) { | 237 } 238 /* Set the adaptor tag so that the next card can be found. */ 239 outb(ELINK_ID_PORT, tag--); 240 continue; 241 } 242 } 243 244 /* Set the adaptor tag so that the next card can be found. */ 245 outb(ELINK_ID_PORT, tag--); 246 247 /* Activate the adaptor at the EEPROM location. */ 248 outb(ELINK_ID_PORT, ACTIVATE_ADAPTER_TO_CONFIG); 249 250 /* Test for an adapter in TEST mode. */ 251 outw(ioport + EP_COMMAND, WINDOW_SELECT | 0); 252 data = inw(ioport + EP_W0_EEPROM_COMMAND); 253 if (data & EEPROM_TST_MODE) { |
254 device_printf(parent, "if_ep: Adapter at 0x%03x in TEST mode! Erase pencil mark.\n", 255 ioport); | 254 device_printf(parent, "if_ep: <%s> at port 0x%03x in TEST mode! Erase pencil mark.\n", 255 desc, ioport); |
256 continue; 257 } 258 259 child = BUS_ADD_CHILD(parent, ISA_ORDER_SPECULATIVE, "ep", -1); 260 device_set_desc_copy(child, desc); 261 device_set_driver(child, driver); 262 bus_set_resource(child, SYS_RES_IRQ, 0, irq, 1); 263 bus_set_resource(child, SYS_RES_IOPORT, 0, ioport, EP_IOSIZE); --- 90 unchanged lines hidden --- | 256 continue; 257 } 258 259 child = BUS_ADD_CHILD(parent, ISA_ORDER_SPECULATIVE, "ep", -1); 260 device_set_desc_copy(child, desc); 261 device_set_driver(child, driver); 262 bus_set_resource(child, SYS_RES_IRQ, 0, irq, 1); 263 bus_set_resource(child, SYS_RES_IOPORT, 0, ioport, EP_IOSIZE); --- 90 unchanged lines hidden --- |