From 95d27b2afdd13df7530e209c9a788bb33817ba2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Fri, 8 Aug 2008 10:43:08 +0000 Subject: [PATCH] Applied patch by "anxiety": * Tracked down the problem[1] to the wrong offset being read from the pci config. Now matches Realtek's Linux driver. I couldn't find why it worked before as the value hasn't changed since the original version added to the repository. This is only verified with my own 8168 but I found no special logic in other drivers for 8167 or 8169. [1] See #1853, "RTL8168 recognized but not working" I don't have the hardware myself to test. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26873 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/kernel/drivers/network/rtl8169/device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/add-ons/kernel/drivers/network/rtl8169/device.c b/src/add-ons/kernel/drivers/network/rtl8169/device.c index 4b947992ec..f2f367b539 100644 --- a/src/add-ons/kernel/drivers/network/rtl8169/device.c +++ b/src/add-ons/kernel/drivers/network/rtl8169/device.c @@ -499,9 +499,9 @@ rtl8169_open(const char *name, uint32 flags, void** cookie) } TRACE("IRQ %d\n", device->irq); - + // map registers into memory - val = gPci->read_pci_config(device->pciInfo->bus, device->pciInfo->device, device->pciInfo->function, 0x14, 4); + val = gPci->read_pci_config(device->pciInfo->bus, device->pciInfo->device, device->pciInfo->function, 0x18, 4); val &= PCI_address_memory_32_mask; TRACE("hardware register address %p\n", (void *) val); device->regArea = map_mem(&device->regAddr, (void *)val, 256, 0, "rtl8169 register");