Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/dev/pci



Jason Thorpe wrote:

On Feb 15, 2006, at 4:02 PM, Gavan Fantom wrote:


Module Name:    src
Committed By:    gavan
Date:        Thu Feb 16 00:02:00 UTC 2006

Modified Files:
    src/sys/dev/pci: if_wm.c
Added Files:
    src/sys/dev/pci: if_wmvar.h

Log Message:
Compute the EEPROM checksum to determine the presence of valid EEPROM data.
If EEPROM data is invalid, allow a MD hook to supply EEPROM data instead.

An MD hook is wrong. You should be using properties for this (you can set the property in your platform's device_register() routine). (Yes, I know that there are currently other drivers that do this incorrectly, but those came before properties existed in our kernel.)

I'll convert this to device properties.

Would it be best to create properties for MAC address, cfg1, cfg2 and swdpin, or would it be better to allow MD code to copy (or construct) the entire EEPROM into device properties and let the driver choose the bits it needs (and may need in the future)?



Home | Main Index | Thread Index | Old Index