Darren Reed wrote:
Garrett,
Looking through mii.h...
The interfaces for some functions have you passing 8 and 16bit types
as well as 8/16bit types in some structures. Are there particular
requirements
for the use of such small types?
Well, they are the natural sizes (especially for the 16 bit data items)
of these values.
If mii_reset is optional, providing a "mii_reset_nop" function for folks
to use in their driver (rather than a NULL) may make the infrastructure
eaiser? (a NULL function pointer becomes a bug)
Not really... I test for NULL explicitly.
Given that -1 isn't used, shouldn't mii_get_speed() return uint32_t?
Thoughts on it returning uint64_t and returning kbps instead of mbps?
Mbps is more convenient for all the drivers, since that is what they are
already using internally. I don't think we need to worry about
fractional Mbps, since only 10, 100, and 1000 are legal values.
uint32_t could be used instead of int. I'm not sure that it matters though.
- Garrett
Darren
_______________________________________________
networking-discuss mailing list
[email protected]