Source-Changes-D archive

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

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



On Fri, Jan 25, 2019 at 08:04:07AM +0000, SAITOH Masanobu wrote:
> Modified Files:
> 	src/sys/dev/pci: if_wm.c
> 
> Log Message:
>  80003's SERDES is not the same as 82575's but the same as legacy devices.
> Use the old methods on 80003.
> 
> XXX The reason why this bug existed is that our order of WM_T_* was little
> different from FreeBSD's enum e1000_mac_type. From 80003 to PCH_CNP and from
> 82575 to I211 are swapped.

Wouldn't it be better to prevent this kind of bug in the future by putting
the decision which method to use into a switch-statement and have the
compiler worry about ordering? (And duplicates and omissions.)

--chris


Home | Main Index | Thread Index | Old Index