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
This commit is contained in:
Stephan Aßmus
2008-08-08 10:43:08 +00:00
parent 3521e43f97
commit 95d27b2afd
@@ -501,7 +501,7 @@ rtl8169_open(const char *name, uint32 flags, void** cookie)
TRACE("IRQ %d\n", device->irq); TRACE("IRQ %d\n", device->irq);
// map registers into memory // 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; val &= PCI_address_memory_32_mask;
TRACE("hardware register address %p\n", (void *) val); TRACE("hardware register address %p\n", (void *) val);
device->regArea = map_mem(&device->regAddr, (void *)val, 256, 0, "rtl8169 register"); device->regArea = map_mem(&device->regAddr, (void *)val, 256, 0, "rtl8169 register");