mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-22 15:47:37 +00:00
Move if_alloc() up in fxp_attach() so there's an ifp before
mii_phy_probe() is called. Committed via: fxp0
This commit is contained in:
parent
5201165c85
commit
7ba33d8222
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=147289
@ -388,6 +388,13 @@ fxp_attach(device_t dev)
|
||||
|
||||
s = splimp();
|
||||
|
||||
ifp = sc->ifp = if_alloc(IFT_ETHER);
|
||||
if (ifp == NULL) {
|
||||
device_printf(dev, "can not if_alloc()\n");
|
||||
error = ENOSPC;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
/*
|
||||
* Enable bus mastering.
|
||||
*/
|
||||
@ -745,12 +752,6 @@ fxp_attach(device_t dev)
|
||||
}
|
||||
}
|
||||
|
||||
ifp = sc->ifp = if_alloc(IFT_ETHER);
|
||||
if (ifp == NULL) {
|
||||
device_printf(dev, "can not if_alloc()\n");
|
||||
error = ENOSPC;
|
||||
goto fail;
|
||||
}
|
||||
if_initname(ifp, device_get_name(dev), device_get_unit(dev));
|
||||
ifp->if_baudrate = 100000000;
|
||||
ifp->if_init = fxp_init;
|
||||
|
Loading…
Reference in New Issue
Block a user