summaryrefslogtreecommitdiffstats
path: root/src/drivers/net/pnic.c
diff options
context:
space:
mode:
authorMichael Brown2008-04-22 18:40:50 +0200
committerMichael Brown2008-04-22 18:40:50 +0200
commit1ba959c6b342b314dfb01ca0a926ed6832c090b3 (patch)
treed977e301ebfe46d76f9def376e9edb173b96eb26 /src/drivers/net/pnic.c
parent[Infiniband] Fix event queue doorbell ringing on Arbel (diff)
downloadipxe-1ba959c6b342b314dfb01ca0a926ed6832c090b3.tar.gz
ipxe-1ba959c6b342b314dfb01ca0a926ed6832c090b3.tar.xz
ipxe-1ba959c6b342b314dfb01ca0a926ed6832c090b3.zip
[NETDEV] Add notion of link state
Add ability for network devices to flag link up/down state to the networking core. Autobooting code will now wait for link-up before attempting DHCP. IPoIB reflects the Infiniband link state as the network device link state (which is not strictly correct; we also need a succesful IPoIB IPv4 broadcast group join), but is probably more informative.
Diffstat (limited to 'src/drivers/net/pnic.c')
-rw-r--r--src/drivers/net/pnic.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/drivers/net/pnic.c b/src/drivers/net/pnic.c
index b431ec52..c7f08670 100644
--- a/src/drivers/net/pnic.c
+++ b/src/drivers/net/pnic.c
@@ -250,6 +250,9 @@ static int pnic_probe ( struct pci_device *pci,
status = pnic_command ( pnic, PNIC_CMD_READ_MAC, NULL, 0,
netdev->ll_addr, ETH_ALEN, NULL );
+ /* Mark as link up; PNIC has no concept of link state */
+ netdev_link_up ( netdev );
+
/* Register network device */
if ( ( rc = register_netdev ( netdev ) ) != 0 )
goto err;