librecore-org / librecore

GNU General Public License v2.0
88 stars 10 forks source link

[rtl8168] MAC address is hard-coded / generic #8

Closed ghost closed 7 years ago

ghost commented 7 years ago

Tested on both the ga-g41m-es2l and the ga-945gcm-s2l.

If I understand correctly, these NIC's have to be reset, which hard-codes a MAC address. This is not really ideal. Although the workaround is relatively easy ('spoof' the real MAC), it would be nice if this would just work.

ArthurHeymans commented 7 years ago

maybe reset only is enough on ga-945gcm-s2l and spoofing of mac is not required. Further investigation is needed.

I think the best way to implement this is have a function in coreboot to be able to load an int from cbfs and then use that as macaddress, while stil having a default value in case of absence.

zamaudio commented 7 years ago

MAC addresses are 6 bytes.. you can't load that into an int. But you could load it as text field and have it parsed from cbfs?

zamaudio commented 7 years ago

https://github.com/coreboot/coreboot/blob/master/src/mainboard/google/beltino/lan.c looks like google already did this kind of thing for a chromeos board. We need to test this sequence of code on our boards since its the same pci id 10ec:8168. If it works, we should integrate something like this into our PCI driver.

ghost commented 7 years ago

https://review.coreboot.org/#/c/17672/

zamaudio commented 7 years ago

Can someone test the above patch please before it gets merged... ^

ghost commented 7 years ago

Tested on two ga-g41m-es2l's: working perfectly.

Tested on two ga-945gcm-s2l's: working perfectly.

zamaudio commented 7 years ago

Sweet thanks!