How to make Realtek nic use r8168 driver












1















I've been trying (unsuccessfully) for the last few days to make my Realtek ethernet card to work. I have no problems with my wireless connection: only the ethernet connection doesn't work.



I have Ubuntu 16.10 on a Dell Inspiron, with a RTL8101/2/6E PCI Express card. The card used the r8169 driver, which seems to be buggy and unreliable (as in here). Since the solution seems to be to use the r8168 driver, I:




  • installed the package r8168-dkms via apt-get,

  • blacklisted the r8169 module in /etc/modprobe.d/

  • rebooted.


It didn't work, as lsmod still listed the module as in use, and lspci -v still told me that the card was using the r8169 driver and module.



I finally managed to blacklist the module passing the option to grub, by adding modprobe.blacklist=r8169 to the default command line in /etc/default/grub.



The problem is that the r8168 module loads fine (I see it in lsmod), but it's not associated with the card so it doesn't show up in ifconfig (exactly as it happened to lumi in Make Linux load specific driver for given device (Realtek NIC)).



This is the relevant portion of my lshw -C network:



*-network UNCLAIMED
description: Ethernet controller
product: RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:01:00.0
version: 07
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix vpd bus_master cap_list
configuration: latency=0
resources: ioport:3000(size=256) memory:b0600000-b0600fff memory:b0400000-b0403fff


My device:



> lspci -v -s 01:00
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller (rev 07)
Subsystem: Dell RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller
Flags: bus master, fast devsel, latency 0, IRQ 11
I/O ports at 3000 [size=256]
Memory at b0600000 (64-bit, non-prefetchable) [size=4K]
Memory at b0400000 (64-bit, prefetchable) [size=16K]
Capabilities: <access denied>


Please note that in the output above lspci does not show any drivers nor kernel modules in use.



Finally, I tried to make my NIC to use the r8168 driver (as explained in this answer), to no avail:



% sudo echo 10ec 8168 > /sys/bus/pci/drivers/r8168/new_id
/sys/bus/pci/drivers/r8168/new_id: File exists.

% sudo echo "0000:01:00.0" > /sys/bus/pci/drivers/r8168/bind
/sys/bus/pci/drivers/r8168/bind: File exists.


What am I missing? Is there another way to tell a device to use a driver? Any links, clues or indications about what to read next would be helpful and very much appreciated.










share|improve this question





























    1















    I've been trying (unsuccessfully) for the last few days to make my Realtek ethernet card to work. I have no problems with my wireless connection: only the ethernet connection doesn't work.



    I have Ubuntu 16.10 on a Dell Inspiron, with a RTL8101/2/6E PCI Express card. The card used the r8169 driver, which seems to be buggy and unreliable (as in here). Since the solution seems to be to use the r8168 driver, I:




    • installed the package r8168-dkms via apt-get,

    • blacklisted the r8169 module in /etc/modprobe.d/

    • rebooted.


    It didn't work, as lsmod still listed the module as in use, and lspci -v still told me that the card was using the r8169 driver and module.



    I finally managed to blacklist the module passing the option to grub, by adding modprobe.blacklist=r8169 to the default command line in /etc/default/grub.



    The problem is that the r8168 module loads fine (I see it in lsmod), but it's not associated with the card so it doesn't show up in ifconfig (exactly as it happened to lumi in Make Linux load specific driver for given device (Realtek NIC)).



    This is the relevant portion of my lshw -C network:



    *-network UNCLAIMED
    description: Ethernet controller
    product: RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller
    vendor: Realtek Semiconductor Co., Ltd.
    physical id: 0
    bus info: pci@0000:01:00.0
    version: 07
    width: 64 bits
    clock: 33MHz
    capabilities: pm msi pciexpress msix vpd bus_master cap_list
    configuration: latency=0
    resources: ioport:3000(size=256) memory:b0600000-b0600fff memory:b0400000-b0403fff


    My device:



    > lspci -v -s 01:00
    01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller (rev 07)
    Subsystem: Dell RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller
    Flags: bus master, fast devsel, latency 0, IRQ 11
    I/O ports at 3000 [size=256]
    Memory at b0600000 (64-bit, non-prefetchable) [size=4K]
    Memory at b0400000 (64-bit, prefetchable) [size=16K]
    Capabilities: <access denied>


    Please note that in the output above lspci does not show any drivers nor kernel modules in use.



    Finally, I tried to make my NIC to use the r8168 driver (as explained in this answer), to no avail:



    % sudo echo 10ec 8168 > /sys/bus/pci/drivers/r8168/new_id
    /sys/bus/pci/drivers/r8168/new_id: File exists.

    % sudo echo "0000:01:00.0" > /sys/bus/pci/drivers/r8168/bind
    /sys/bus/pci/drivers/r8168/bind: File exists.


    What am I missing? Is there another way to tell a device to use a driver? Any links, clues or indications about what to read next would be helpful and very much appreciated.










    share|improve this question



























      1












      1








      1








      I've been trying (unsuccessfully) for the last few days to make my Realtek ethernet card to work. I have no problems with my wireless connection: only the ethernet connection doesn't work.



      I have Ubuntu 16.10 on a Dell Inspiron, with a RTL8101/2/6E PCI Express card. The card used the r8169 driver, which seems to be buggy and unreliable (as in here). Since the solution seems to be to use the r8168 driver, I:




      • installed the package r8168-dkms via apt-get,

      • blacklisted the r8169 module in /etc/modprobe.d/

      • rebooted.


      It didn't work, as lsmod still listed the module as in use, and lspci -v still told me that the card was using the r8169 driver and module.



      I finally managed to blacklist the module passing the option to grub, by adding modprobe.blacklist=r8169 to the default command line in /etc/default/grub.



      The problem is that the r8168 module loads fine (I see it in lsmod), but it's not associated with the card so it doesn't show up in ifconfig (exactly as it happened to lumi in Make Linux load specific driver for given device (Realtek NIC)).



      This is the relevant portion of my lshw -C network:



      *-network UNCLAIMED
      description: Ethernet controller
      product: RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller
      vendor: Realtek Semiconductor Co., Ltd.
      physical id: 0
      bus info: pci@0000:01:00.0
      version: 07
      width: 64 bits
      clock: 33MHz
      capabilities: pm msi pciexpress msix vpd bus_master cap_list
      configuration: latency=0
      resources: ioport:3000(size=256) memory:b0600000-b0600fff memory:b0400000-b0403fff


      My device:



      > lspci -v -s 01:00
      01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller (rev 07)
      Subsystem: Dell RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller
      Flags: bus master, fast devsel, latency 0, IRQ 11
      I/O ports at 3000 [size=256]
      Memory at b0600000 (64-bit, non-prefetchable) [size=4K]
      Memory at b0400000 (64-bit, prefetchable) [size=16K]
      Capabilities: <access denied>


      Please note that in the output above lspci does not show any drivers nor kernel modules in use.



      Finally, I tried to make my NIC to use the r8168 driver (as explained in this answer), to no avail:



      % sudo echo 10ec 8168 > /sys/bus/pci/drivers/r8168/new_id
      /sys/bus/pci/drivers/r8168/new_id: File exists.

      % sudo echo "0000:01:00.0" > /sys/bus/pci/drivers/r8168/bind
      /sys/bus/pci/drivers/r8168/bind: File exists.


      What am I missing? Is there another way to tell a device to use a driver? Any links, clues or indications about what to read next would be helpful and very much appreciated.










      share|improve this question
















      I've been trying (unsuccessfully) for the last few days to make my Realtek ethernet card to work. I have no problems with my wireless connection: only the ethernet connection doesn't work.



      I have Ubuntu 16.10 on a Dell Inspiron, with a RTL8101/2/6E PCI Express card. The card used the r8169 driver, which seems to be buggy and unreliable (as in here). Since the solution seems to be to use the r8168 driver, I:




      • installed the package r8168-dkms via apt-get,

      • blacklisted the r8169 module in /etc/modprobe.d/

      • rebooted.


      It didn't work, as lsmod still listed the module as in use, and lspci -v still told me that the card was using the r8169 driver and module.



      I finally managed to blacklist the module passing the option to grub, by adding modprobe.blacklist=r8169 to the default command line in /etc/default/grub.



      The problem is that the r8168 module loads fine (I see it in lsmod), but it's not associated with the card so it doesn't show up in ifconfig (exactly as it happened to lumi in Make Linux load specific driver for given device (Realtek NIC)).



      This is the relevant portion of my lshw -C network:



      *-network UNCLAIMED
      description: Ethernet controller
      product: RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller
      vendor: Realtek Semiconductor Co., Ltd.
      physical id: 0
      bus info: pci@0000:01:00.0
      version: 07
      width: 64 bits
      clock: 33MHz
      capabilities: pm msi pciexpress msix vpd bus_master cap_list
      configuration: latency=0
      resources: ioport:3000(size=256) memory:b0600000-b0600fff memory:b0400000-b0403fff


      My device:



      > lspci -v -s 01:00
      01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller (rev 07)
      Subsystem: Dell RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller
      Flags: bus master, fast devsel, latency 0, IRQ 11
      I/O ports at 3000 [size=256]
      Memory at b0600000 (64-bit, non-prefetchable) [size=4K]
      Memory at b0400000 (64-bit, prefetchable) [size=16K]
      Capabilities: <access denied>


      Please note that in the output above lspci does not show any drivers nor kernel modules in use.



      Finally, I tried to make my NIC to use the r8168 driver (as explained in this answer), to no avail:



      % sudo echo 10ec 8168 > /sys/bus/pci/drivers/r8168/new_id
      /sys/bus/pci/drivers/r8168/new_id: File exists.

      % sudo echo "0000:01:00.0" > /sys/bus/pci/drivers/r8168/bind
      /sys/bus/pci/drivers/r8168/bind: File exists.


      What am I missing? Is there another way to tell a device to use a driver? Any links, clues or indications about what to read next would be helpful and very much appreciated.







      drivers kernel-modules pci realtek






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited May 29 '17 at 17:50







      cristianbravolillo

















      asked May 29 '17 at 17:12









      cristianbravolillocristianbravolillo

      63




      63






















          1 Answer
          1






          active

          oldest

          votes


















          0














          You can do this, but obviously be warned that the driver may not be fully compatible with your device!



          It also involves recompiling the kernel module, so if that worries you, then I'd advise caution. Especially as most NICs require a bespoke binary firmware blob to be loaded that may break your hardware - so please be warned, and do a little bit of homework to locate a compatible firmware blob.



          Happy to continue? Good :)



          First, you'll need to locate the driver source for your running kernel - I assume, as you are using dkms then this is already on your system somewhere. Once you have this, find the place where the MODULE_DEVICE_TABLE is registered. From a quick online search, as an example, the file r8169.c has this section in it:



          static const struct pci_device_id rtl8169_pci_tbl = {                                                                                                       
          { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8129), 0, 0, RTL_CFG_0 },
          { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8136), 0, 0, RTL_CFG_2 },
          { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8161), 0, 0, RTL_CFG_1 },
          { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8167), 0, 0, RTL_CFG_0 },
          { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8168), 0, 0, RTL_CFG_1 },
          { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8169), 0, 0, RTL_CFG_0 },
          { PCI_VENDOR_ID_DLINK, 0x4300,
          PCI_VENDOR_ID_DLINK, 0x4b10, 0, 0, RTL_CFG_1 },
          { 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_VENDOR_ID_LINKSYS, 0x1032,
          PCI_ANY_ID, 0x0024, 0, 0, RTL_CFG_0 },
          { 0x0001, 0x8168,
          PCI_ANY_ID, 0x2410, 0, 0, RTL_CFG_2 },
          {0,},
          };

          MODULE_DEVICE_TABLE(pci, rtl8169_pci_tbl);


          So this is where the kernel is told that if a device with any of the listed PCI IDs are found, then use this driver. You'll need to add an extra line to this struct, containing the PCI device ID of your NIC, recompile (hopefully just by using dkms) and restart.






          share|improve this answer























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "106"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f367940%2fhow-to-make-realtek-nic-use-r8168-driver%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            You can do this, but obviously be warned that the driver may not be fully compatible with your device!



            It also involves recompiling the kernel module, so if that worries you, then I'd advise caution. Especially as most NICs require a bespoke binary firmware blob to be loaded that may break your hardware - so please be warned, and do a little bit of homework to locate a compatible firmware blob.



            Happy to continue? Good :)



            First, you'll need to locate the driver source for your running kernel - I assume, as you are using dkms then this is already on your system somewhere. Once you have this, find the place where the MODULE_DEVICE_TABLE is registered. From a quick online search, as an example, the file r8169.c has this section in it:



            static const struct pci_device_id rtl8169_pci_tbl = {                                                                                                       
            { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8129), 0, 0, RTL_CFG_0 },
            { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8136), 0, 0, RTL_CFG_2 },
            { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8161), 0, 0, RTL_CFG_1 },
            { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8167), 0, 0, RTL_CFG_0 },
            { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8168), 0, 0, RTL_CFG_1 },
            { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8169), 0, 0, RTL_CFG_0 },
            { PCI_VENDOR_ID_DLINK, 0x4300,
            PCI_VENDOR_ID_DLINK, 0x4b10, 0, 0, RTL_CFG_1 },
            { 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_VENDOR_ID_LINKSYS, 0x1032,
            PCI_ANY_ID, 0x0024, 0, 0, RTL_CFG_0 },
            { 0x0001, 0x8168,
            PCI_ANY_ID, 0x2410, 0, 0, RTL_CFG_2 },
            {0,},
            };

            MODULE_DEVICE_TABLE(pci, rtl8169_pci_tbl);


            So this is where the kernel is told that if a device with any of the listed PCI IDs are found, then use this driver. You'll need to add an extra line to this struct, containing the PCI device ID of your NIC, recompile (hopefully just by using dkms) and restart.






            share|improve this answer




























              0














              You can do this, but obviously be warned that the driver may not be fully compatible with your device!



              It also involves recompiling the kernel module, so if that worries you, then I'd advise caution. Especially as most NICs require a bespoke binary firmware blob to be loaded that may break your hardware - so please be warned, and do a little bit of homework to locate a compatible firmware blob.



              Happy to continue? Good :)



              First, you'll need to locate the driver source for your running kernel - I assume, as you are using dkms then this is already on your system somewhere. Once you have this, find the place where the MODULE_DEVICE_TABLE is registered. From a quick online search, as an example, the file r8169.c has this section in it:



              static const struct pci_device_id rtl8169_pci_tbl = {                                                                                                       
              { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8129), 0, 0, RTL_CFG_0 },
              { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8136), 0, 0, RTL_CFG_2 },
              { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8161), 0, 0, RTL_CFG_1 },
              { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8167), 0, 0, RTL_CFG_0 },
              { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8168), 0, 0, RTL_CFG_1 },
              { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8169), 0, 0, RTL_CFG_0 },
              { PCI_VENDOR_ID_DLINK, 0x4300,
              PCI_VENDOR_ID_DLINK, 0x4b10, 0, 0, RTL_CFG_1 },
              { 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_VENDOR_ID_LINKSYS, 0x1032,
              PCI_ANY_ID, 0x0024, 0, 0, RTL_CFG_0 },
              { 0x0001, 0x8168,
              PCI_ANY_ID, 0x2410, 0, 0, RTL_CFG_2 },
              {0,},
              };

              MODULE_DEVICE_TABLE(pci, rtl8169_pci_tbl);


              So this is where the kernel is told that if a device with any of the listed PCI IDs are found, then use this driver. You'll need to add an extra line to this struct, containing the PCI device ID of your NIC, recompile (hopefully just by using dkms) and restart.






              share|improve this answer


























                0












                0








                0







                You can do this, but obviously be warned that the driver may not be fully compatible with your device!



                It also involves recompiling the kernel module, so if that worries you, then I'd advise caution. Especially as most NICs require a bespoke binary firmware blob to be loaded that may break your hardware - so please be warned, and do a little bit of homework to locate a compatible firmware blob.



                Happy to continue? Good :)



                First, you'll need to locate the driver source for your running kernel - I assume, as you are using dkms then this is already on your system somewhere. Once you have this, find the place where the MODULE_DEVICE_TABLE is registered. From a quick online search, as an example, the file r8169.c has this section in it:



                static const struct pci_device_id rtl8169_pci_tbl = {                                                                                                       
                { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8129), 0, 0, RTL_CFG_0 },
                { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8136), 0, 0, RTL_CFG_2 },
                { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8161), 0, 0, RTL_CFG_1 },
                { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8167), 0, 0, RTL_CFG_0 },
                { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8168), 0, 0, RTL_CFG_1 },
                { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8169), 0, 0, RTL_CFG_0 },
                { PCI_VENDOR_ID_DLINK, 0x4300,
                PCI_VENDOR_ID_DLINK, 0x4b10, 0, 0, RTL_CFG_1 },
                { 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_VENDOR_ID_LINKSYS, 0x1032,
                PCI_ANY_ID, 0x0024, 0, 0, RTL_CFG_0 },
                { 0x0001, 0x8168,
                PCI_ANY_ID, 0x2410, 0, 0, RTL_CFG_2 },
                {0,},
                };

                MODULE_DEVICE_TABLE(pci, rtl8169_pci_tbl);


                So this is where the kernel is told that if a device with any of the listed PCI IDs are found, then use this driver. You'll need to add an extra line to this struct, containing the PCI device ID of your NIC, recompile (hopefully just by using dkms) and restart.






                share|improve this answer













                You can do this, but obviously be warned that the driver may not be fully compatible with your device!



                It also involves recompiling the kernel module, so if that worries you, then I'd advise caution. Especially as most NICs require a bespoke binary firmware blob to be loaded that may break your hardware - so please be warned, and do a little bit of homework to locate a compatible firmware blob.



                Happy to continue? Good :)



                First, you'll need to locate the driver source for your running kernel - I assume, as you are using dkms then this is already on your system somewhere. Once you have this, find the place where the MODULE_DEVICE_TABLE is registered. From a quick online search, as an example, the file r8169.c has this section in it:



                static const struct pci_device_id rtl8169_pci_tbl = {                                                                                                       
                { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8129), 0, 0, RTL_CFG_0 },
                { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8136), 0, 0, RTL_CFG_2 },
                { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8161), 0, 0, RTL_CFG_1 },
                { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8167), 0, 0, RTL_CFG_0 },
                { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8168), 0, 0, RTL_CFG_1 },
                { PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8169), 0, 0, RTL_CFG_0 },
                { PCI_VENDOR_ID_DLINK, 0x4300,
                PCI_VENDOR_ID_DLINK, 0x4b10, 0, 0, RTL_CFG_1 },
                { 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_VENDOR_ID_LINKSYS, 0x1032,
                PCI_ANY_ID, 0x0024, 0, 0, RTL_CFG_0 },
                { 0x0001, 0x8168,
                PCI_ANY_ID, 0x2410, 0, 0, RTL_CFG_2 },
                {0,},
                };

                MODULE_DEVICE_TABLE(pci, rtl8169_pci_tbl);


                So this is where the kernel is told that if a device with any of the listed PCI IDs are found, then use this driver. You'll need to add an extra line to this struct, containing the PCI device ID of your NIC, recompile (hopefully just by using dkms) and restart.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered May 29 '17 at 18:09









                einonmeinonm

                1,224520




                1,224520






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Unix & Linux Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f367940%2fhow-to-make-realtek-nic-use-r8168-driver%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    How to make a Squid Proxy server?

                    Is this a new Fibonacci Identity?

                    19世紀