diff options
author | Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> | 2014-04-08 11:54:55 +0530 |
---|---|---|
committer | Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> | 2014-04-08 17:45:09 +0530 |
commit | cce8657eaaa992cb8b6e0e1a98bc02b357e60be0 (patch) | |
tree | 85e6b83e327a5951c5b76ab30870b81e36b939ad /board-qemu/slof/e1k.fs | |
parent | c90b50b5055f976a0da3c032f26fb80157292adc (diff) | |
download | SLOF-cce8657eaaa992cb8b6e0e1a98bc02b357e60be0.zip SLOF-cce8657eaaa992cb8b6e0e1a98bc02b357e60be0.tar.gz SLOF-cce8657eaaa992cb8b6e0e1a98bc02b357e60be0.tar.bz2 |
e1000: fix usage of multiple nics
When using multiple e1000 network interface netboot would fail if we
try to boot from the first interface.
During first e1000 device initialization, m_e1k.m_baseaddr_u64 (static
variable) is set to read/write pci registers. Later the second device
does process. When first e1000 driver tries netboot, it has an
assumption that m_e1k.m_baseaddr_u64 is correct, which is not the
case.
Ensure reinitialization for m_e1k.m_baseaddr_u64 when open interface
of device is called.
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Reviewed-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Diffstat (limited to 'board-qemu/slof/e1k.fs')
-rw-r--r-- | board-qemu/slof/e1k.fs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/board-qemu/slof/e1k.fs b/board-qemu/slof/e1k.fs index 6bfaef1..51855be 100644 --- a/board-qemu/slof/e1k.fs +++ b/board-qemu/slof/e1k.fs @@ -16,13 +16,15 @@ s" network" device-type INSTANCE VARIABLE obp-tftp-package get-node CONSTANT my-phandle +10 config-l@ translate-my-address 3 not AND CONSTANT baseaddr 0 VALUE e1k-priv 0 VALUE open-count : open ( -- okay? ) open-count 0= IF - open IF + open IF + baseaddr e1k-open dup not IF ." e1k-open failed" EXIT THEN drop TO e1k-priv true @@ -80,11 +82,12 @@ get-node CONSTANT my-phandle decode-int nip nip " device-id" get-node get-property IF EXIT THEN decode-int nip nip - " 10 config-l@ translate-my-address 3 not AND" evaluate + baseaddr local-mac e1k-mac-setup IF encode-bytes " local-mac-address" property THEN ; + setup-mac : setup-alias ( -- ) |