Lines 279-299
gen_attach(device_t dev)
Link Here
|
279 |
goto fail; |
279 |
goto fail; |
280 |
} |
280 |
} |
281 |
|
281 |
|
282 |
/* Install interrupt handlers */ |
|
|
283 |
error = bus_setup_intr(dev, sc->res[_RES_IRQ1], |
284 |
INTR_TYPE_NET | INTR_MPSAFE, NULL, gen_intr, sc, &sc->ih); |
285 |
if (error != 0) { |
286 |
device_printf(dev, "cannot setup interrupt handler1\n"); |
287 |
goto fail; |
288 |
} |
289 |
|
290 |
error = bus_setup_intr(dev, sc->res[_RES_IRQ2], |
291 |
INTR_TYPE_NET | INTR_MPSAFE, NULL, gen_intr2, sc, &sc->ih2); |
292 |
if (error != 0) { |
293 |
device_printf(dev, "cannot setup interrupt handler2\n"); |
294 |
goto fail; |
295 |
} |
296 |
|
297 |
/* Setup ethernet interface */ |
282 |
/* Setup ethernet interface */ |
298 |
sc->ifp = if_alloc(IFT_ETHER); |
283 |
sc->ifp = if_alloc(IFT_ETHER); |
299 |
if_setsoftc(sc->ifp, sc); |
284 |
if_setsoftc(sc->ifp, sc); |
Lines 310-315
gen_attach(device_t dev)
Link Here
|
310 |
IFCAP_HWCSUM_IPV6); |
295 |
IFCAP_HWCSUM_IPV6); |
311 |
if_setcapenable(sc->ifp, if_getcapabilities(sc->ifp)); |
296 |
if_setcapenable(sc->ifp, if_getcapabilities(sc->ifp)); |
312 |
|
297 |
|
|
|
298 |
/* Install interrupt handlers */ |
299 |
error = bus_setup_intr(dev, sc->res[_RES_IRQ1], |
300 |
INTR_TYPE_NET | INTR_MPSAFE, NULL, gen_intr, sc, &sc->ih); |
301 |
if (error != 0) { |
302 |
device_printf(dev, "cannot setup interrupt handler1\n"); |
303 |
goto fail; |
304 |
} |
305 |
|
306 |
error = bus_setup_intr(dev, sc->res[_RES_IRQ2], |
307 |
INTR_TYPE_NET | INTR_MPSAFE, NULL, gen_intr2, sc, &sc->ih2); |
308 |
if (error != 0) { |
309 |
device_printf(dev, "cannot setup interrupt handler2\n"); |
310 |
goto fail; |
311 |
} |
312 |
|
313 |
/* Attach MII driver */ |
313 |
/* Attach MII driver */ |
314 |
mii_flags = 0; |
314 |
mii_flags = 0; |
315 |
switch (sc->phy_mode) |
315 |
switch (sc->phy_mode) |