On Sun, Mar 09, 2025 at 03:00:46PM -0400, o...@eigenstate.org wrote: > Quoth tlaro...@kergis.com: > > > > More generally, wouldn't it be more clear to use PCI_VENDOR_ID, > > PCI_DEVICE_ID, > > etc. from a header instead of the hardcoded values? (that may be hard > > to grep to find if support is there or not---I missed at first that > > there is a U.S. Robotics card with a Realtek chip in the list since > > the vendor id is 0x16EC, to be compared with Realtek 0x10EC.) > > > > What do you, and what do other think about this? > > It's far clearer, in my books, to have: > > switch(did){ > case 0x8169: /* Rtl8169 */ > ... > } > > > in the one place that it's used, than to have it hidden in > a header somewhere. All of our drivers are currently self > contained, and use this pattern. Let's not break that. >
Would you accept at least, in the very file, defines: #define REALTEK_VID 0x10EC #define USROBOTICS_VID 0x16EC so that one can write: Rtl8100e = (0x8136<<16)|REALTEK_VID, /* RTL810[01]E: pci -e */ Rtl8169c = (0x0116<<16)|USROBOTICS_VID, /* RTL8169C+ (USR997902) */ that is far easier to catch instead of 0x10EC vs 0x16EC, one above the other (I thought it was a typo before consulting the PCI databases). -- Thierry Laronde <tlaronde +AT+ kergis +dot+ com> http://www.kergis.com/ http://kertex.kergis.com/ Key fingerprint = 0FF7 E906 FBAF FE95 FD89 250D 52B1 AE95 6006 F40C ------------------------------------------ 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/T832e366730c74bfa-M4e199640c27164a0b32e7411 Delivery options: https://9fans.topicbox.com/groups/9fans/subscription