r8169: add USR PCI vendor id
Subsystems (4)
Heiner Kallweit
maintainercover r8169: add USR PCI vendor id
Add constant for U.S. Robotics (USR) PCI id and use it in the r8169 driver. Alternatively this change could go thorugh the PCI tree, up to Bjorn/David.
Heiner Kallweit (2):
PCI: add USR vendor id
r8169: use proper constant for PCI vendor USR instead of id
drivers/net/ethernet/realtek/r8169.c | 2 +- include/linux/pci_ids.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-)
Signature · 1 line
2.19.1
Heiner Kallweit
maintainerPATCH 1/2 PCI: add USR vendor id
Add U.S. Robotics (USR) PCI vendor id.
--- include/linux/pci_ids.h | 2 ++ 1 file changed, 2 insertions(+)
include/linux/pci_ids.h +2 -0
@@ -2359,6 +2359,8 @@#define PCI_VENDOR_ID_SYNOPSYS 0x16c3 +#define PCI_VENDOR_ID_USR 0x16ec +#define PCI_VENDOR_ID_VITESSE 0x1725#define PCI_DEVICE_ID_VITESSE_VSC7174 0x7174
Signature · 1 line
2.19.1
Heiner Kallweit
maintainerPATCH 2/2 r8169: use proper constant for PCI vendor USR instead of numerical id
In reply to Heiner KallweitUse proper constant for PCI vendor USR instead of numerical id.
--- drivers/net/ethernet/realtek/r8169.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/realtek/r8169.c +1 -1
@@ -224,7 +224,7 @@ static const struct pci_device_id rtl8169_pci_tbl[] = { { PCI_DEVICE(PCI_VENDOR_ID_DLINK, 0x4300), 0, 0, RTL_CFG_0 }, { PCI_DEVICE(PCI_VENDOR_ID_DLINK, 0x4302), 0, 0, RTL_CFG_0 }, { PCI_DEVICE(PCI_VENDOR_ID_AT, 0xc107), 0, 0, RTL_CFG_0 }, - { PCI_DEVICE(0x16ec, 0x0116), 0, 0, RTL_CFG_0 }, + { PCI_DEVICE(PCI_VENDOR_ID_USR, 0x0116), 0, 0, RTL_CFG_0 }, { PCI_VENDOR_ID_LINKSYS, 0x1032, PCI_ANY_ID, 0x0024, 0, 0, RTL_CFG_0 }, { 0x0001, 0x8168,
Signature · 1 line
2.19.1
kbuild test robot
build botRe: [PATCH net-next 1/2] PCI: add USR vendor id
In reply to Heiner KallweitThank you for the patch! Yet something to improve:
Hi Heiner,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on net-next/master]
url: https://github.com/0day-ci/linux/commits/Heiner-Kallweit/r8169-add-USR-PCI-vendor-id/20181111-155553
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 8.1.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=8.1.0 make.cross ARCH=ia64
All errors (new ones prefixed by >>):
>> drivers/isdn//hardware/mISDN/w6692.c:1404:23: error: 'PCI_DEVICE_ID_USR_6692' undeclared here (not in a function); did you mean 'PCI_DEVICE_ID_SI_6202'?
PCI_VENDOR_ID_USR, PCI_DEVICE_ID_USR_6692, 0, 0,
^~~~~~~~~~~~~~~~~~~~~~
PCI_DEVICE_ID_SI_6202vim +1404 drivers/isdn//hardware/mISDN/w6692.c
707b2ce6 Karsten Keil 2009-07-22 1399
e8336ed0 Arvind Yadav 2017-07-15 1400 static const struct pci_device_id w6692_ids[] = {
707b2ce6 Karsten Keil 2009-07-22 1401 { PCI_VENDOR_ID_DYNALINK, PCI_DEVICE_ID_DYNALINK_IS64PH,
707b2ce6 Karsten Keil 2009-07-22 1402 PCI_ANY_ID, PCI_ANY_ID, 0, 0, (ulong)&w6692_map[0]},
707b2ce6 Karsten Keil 2009-07-22 1403 { PCI_VENDOR_ID_WINBOND2, PCI_DEVICE_ID_WINBOND2_6692,
707b2ce6 Karsten Keil 2009-07-22 @1404 PCI_VENDOR_ID_USR, PCI_DEVICE_ID_USR_6692, 0, 0,
707b2ce6 Karsten Keil 2009-07-22 1405 (ulong)&w6692_map[2]},
707b2ce6 Karsten Keil 2009-07-22 1406 { PCI_VENDOR_ID_WINBOND2, PCI_DEVICE_ID_WINBOND2_6692,
707b2ce6 Karsten Keil 2009-07-22 1407 PCI_ANY_ID, PCI_ANY_ID, 0, 0, (ulong)&w6692_map[1]},
707b2ce6 Karsten Keil 2009-07-22 1408 { }
707b2ce6 Karsten Keil 2009-07-22 1409 };
707b2ce6 Karsten Keil 2009-07-22 1410 MODULE_DEVICE_TABLE(pci, w6692_ids);707b2ce6 Karsten Keil 2009-07-22 1411
:::::: The code at line 1404 was first introduced by commit
:::::: 707b2ce6c1f4f1261788f2ff09ad82c35e0e6240 mISDN: Add driver for Winbond cards
:::::: TO: Karsten Keil <[email protected]>
:::::: CC: Karsten Keil <[email protected]>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Heiner Kallweit
maintainerPATCH v2 1/1 PCI: add USR vendor id and use it in r8169 and w6692 driver
In reply to Heiner KallweitThe PCI vendor id of U.S. Robotics isn't defined in pci_ids.h so far, only ISDN driver w6692 has a private definition. Move the definition to pci_ids.h and use it also in the r8169 driver.
---
v2:
- The original patch caused a build failure in w6692 driver because it broke the private PCI device id definition.
I hope it's ok to submit this through the netdev tree.
--- drivers/isdn/hardware/mISDN/w6692.c | 5 ----- drivers/net/ethernet/realtek/r8169.c | 2 +- include/linux/pci_ids.h | 4 ++++ 3 files changed, 5 insertions(+), 6 deletions(-)
drivers/isdn/hardware/mISDN/w6692.c +0 -5
@@ -52,11 +52,6 @@ static const struct w6692map w6692_map[] = {W6692_USR, "USR W6692"} }; -#ifndef PCI_VENDOR_ID_USR -#define PCI_VENDOR_ID_USR 0x16ec -#define PCI_DEVICE_ID_USR_6692 0x3409 -#endif -struct w6692_ch {struct bchannel bch;u32 addr;
drivers/net/ethernet/realtek/r8169.c +1 -1
@@ -224,7 +224,7 @@ static const struct pci_device_id rtl8169_pci_tbl[] = { { PCI_DEVICE(PCI_VENDOR_ID_DLINK, 0x4300), 0, 0, RTL_CFG_0 }, { PCI_DEVICE(PCI_VENDOR_ID_DLINK, 0x4302), 0, 0, RTL_CFG_0 }, { PCI_DEVICE(PCI_VENDOR_ID_AT, 0xc107), 0, 0, RTL_CFG_0 }, - { PCI_DEVICE(0x16ec, 0x0116), 0, 0, RTL_CFG_0 }, + { PCI_DEVICE(PCI_VENDOR_ID_USR, 0x0116), 0, 0, RTL_CFG_0 }, { PCI_VENDOR_ID_LINKSYS, 0x1032, PCI_ANY_ID, 0x0024, 0, 0, RTL_CFG_0 }, { 0x0001, 0x8168,
include/linux/pci_ids.h +4 -0
@@ -2359,6 +2359,10 @@#define PCI_VENDOR_ID_SYNOPSYS 0x16c3 +#define PCI_VENDOR_ID_USR 0x16ec +#define PCI_DEVICE_ID_USR_997902 0x0116 +#define PCI_DEVICE_ID_USR_6692 0x3409 +#define PCI_VENDOR_ID_VITESSE 0x1725#define PCI_DEVICE_ID_VITESSE_VSC7174 0x7174
Signature · 1 line
2.19.1
David Miller
maintainerRe: [PATCH net-next v2] PCI: add USR vendor id and use it in r8169 and w6692 driver
From: Heiner Kallweit <[email protected]>
Date: Sun, 11 Nov 2018 11:50:08 +0100
Quoted 5 lines
include/linux/pci_ids.h +0
-0
include/linux/pci_ids.h line 2367
Quoted 9 lines
include/linux/pci_ids.h +4
-0@@ -2359,6 +2359,10 @@#define PCI_VENDOR_ID_SYNOPSYS 0x16c3 +#define PCI_VENDOR_ID_USR 0x16ec +#define PCI_DEVICE_ID_USR_997902 0x0116 +#define PCI_DEVICE_ID_USR_6692 0x3409 +#define PCI_VENDOR_ID_VITESSE 0x1725#define PCI_DEVICE_ID_VITESSE_VSC7174 0x7174
Generally, as I understand the policy for linux/pci_ids.h, we only add things used in multiple locations.
So PCI_VENDOR_ID_USR is OK, since it is used in both r8169 and w6692.
But the device IDs are not, since only w6692 uses them.
Heiner Kallweit
maintainerPATCH v3 1/1 PCI: add USR vendor id and use it in r8169 and w6692 driver
In reply to Heiner KallweitThe PCI vendor id of U.S. Robotics isn't defined in pci_ids.h so far, only ISDN driver w6692 has a private definition. Move the definition to pci_ids.h and use it in the r8169 driver too.
---
v2:
- The original patch caused a build failure in w6692 driver because it broke the private PCI device id definition.
v3:
- Don't move device id's to pci_ids.h because they are used in one module only respectively.
--- drivers/isdn/hardware/mISDN/w6692.c | 3 --- drivers/net/ethernet/realtek/r8169.c | 2 +- include/linux/pci_ids.h | 2 ++ 3 files changed, 3 insertions(+), 4 deletions(-)
drivers/isdn/hardware/mISDN/w6692.c +0 -3
@@ -52,10 +52,7 @@ static const struct w6692map w6692_map[] = {W6692_USR, "USR W6692"} }; -#ifndef PCI_VENDOR_ID_USR -#define PCI_VENDOR_ID_USR 0x16ec#define PCI_DEVICE_ID_USR_6692 0x3409 -#endif struct w6692_ch {struct bchannel bch;
drivers/net/ethernet/realtek/r8169.c +1 -1
@@ -224,7 +224,7 @@ static const struct pci_device_id rtl8169_pci_tbl[] = { { PCI_DEVICE(PCI_VENDOR_ID_DLINK, 0x4300), 0, 0, RTL_CFG_0 }, { PCI_DEVICE(PCI_VENDOR_ID_DLINK, 0x4302), 0, 0, RTL_CFG_0 }, { PCI_DEVICE(PCI_VENDOR_ID_AT, 0xc107), 0, 0, RTL_CFG_0 }, - { PCI_DEVICE(0x16ec, 0x0116), 0, 0, RTL_CFG_0 }, + { PCI_DEVICE(PCI_VENDOR_ID_USR, 0x0116), 0, 0, RTL_CFG_0 }, { PCI_VENDOR_ID_LINKSYS, 0x1032, PCI_ANY_ID, 0x0024, 0, 0, RTL_CFG_0 }, { 0x0001, 0x8168,
include/linux/pci_ids.h +2 -0
@@ -2359,6 +2359,8 @@#define PCI_VENDOR_ID_SYNOPSYS 0x16c3 +#define PCI_VENDOR_ID_USR 0x16ec +#define PCI_VENDOR_ID_VITESSE 0x1725#define PCI_DEVICE_ID_VITESSE_VSC7174 0x7174
Signature · 1 line
2.19.1
Re: [PATCH net-next v3] PCI: add USR vendor id and use it in r8169 and w6692 driver
From: Heiner Kallweit <[email protected]>
Date: Sun, 11 Nov 2018 20:31:21 +0100
Quoted 4 lines
The PCI vendor id of
U.S. Robotics isn't defined inpci_ids.hso far, only ISDN driver w6692 has a private definition. Move the definition topci_ids.hand use it in the r8169 driver too.
Quoted 8 lines
Signed-off-by Heiner Kallweit <[email protected]>---
v2:
- The original patch caused a build failure in w6692 driver because it broke the private PCI device id definition.
v3:
- Don't move device id's topci_ids.hbecause they are used in one module only respectively.
Yep, that's better.
Applied, thanks!
kbuild test robot
build botRe: [PATCH net-next 2/2] r8169: use proper constant for PCI vendor USR instead of numerical id
In reply to Heiner KallweitThank you for the patch! Yet something to improve:
Hi Heiner,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on net-next/master]
url: https://github.com/0day-ci/linux/commits/Heiner-Kallweit/r8169-add-USR-PCI-vendor-id/20181111-155553
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 All errors (new ones prefixed by >>):
include/linux/slab.h:332:43: warning: dubious: x & !y
>> drivers/isdn/hardware/mISDN/w6692.c:1404:30: error: undefined identifier 'PCI_DEVICE_ID_USR_6692'
drivers/isdn/hardware/mISDN/w6692.c:1404:23: error: 'PCI_DEVICE_ID_USR_6692' undeclared here (not in a function); did you mean 'PCI_DEVICE_ID_SI_6202'?
PCI_VENDOR_ID_USR, PCI_DEVICE_ID_USR_6692, 0, 0,
^~~~~~~~~~~~~~~~~~~~~~
PCI_DEVICE_ID_SI_6202vim +/PCI_DEVICE_ID_USR_6692 +1404 drivers/isdn/hardware/mISDN/w6692.c
707b2ce6 Karsten Keil 2009-07-22 1399
e8336ed0 Arvind Yadav 2017-07-15 1400 static const struct pci_device_id w6692_ids[] = {
707b2ce6 Karsten Keil 2009-07-22 1401 { PCI_VENDOR_ID_DYNALINK, PCI_DEVICE_ID_DYNALINK_IS64PH,
707b2ce6 Karsten Keil 2009-07-22 1402 PCI_ANY_ID, PCI_ANY_ID, 0, 0, (ulong)&w6692_map[0]},
707b2ce6 Karsten Keil 2009-07-22 1403 { PCI_VENDOR_ID_WINBOND2, PCI_DEVICE_ID_WINBOND2_6692,
707b2ce6 Karsten Keil 2009-07-22 @1404 PCI_VENDOR_ID_USR, PCI_DEVICE_ID_USR_6692, 0, 0,
707b2ce6 Karsten Keil 2009-07-22 1405 (ulong)&w6692_map[2]},
707b2ce6 Karsten Keil 2009-07-22 1406 { PCI_VENDOR_ID_WINBOND2, PCI_DEVICE_ID_WINBOND2_6692,
707b2ce6 Karsten Keil 2009-07-22 1407 PCI_ANY_ID, PCI_ANY_ID, 0, 0, (ulong)&w6692_map[1]},
707b2ce6 Karsten Keil 2009-07-22 1408 { }
707b2ce6 Karsten Keil 2009-07-22 1409 };
707b2ce6 Karsten Keil 2009-07-22 1410 MODULE_DEVICE_TABLE(pci, w6692_ids);707b2ce6 Karsten Keil 2009-07-22 1411
:::::: The code at line 1404 was first introduced by commit
:::::: 707b2ce6c1f4f1261788f2ff09ad82c35e0e6240 mISDN: Add driver for Winbond cards
:::::: TO: Karsten Keil <[email protected]>
:::::: CC: Karsten Keil <[email protected]>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation