e1000: map in 0x1000 of flash if 0x10000 fails.
This commit is contained in:
parent
f448dfe063
commit
277ff6f2ce
1 changed files with 9 additions and 2 deletions
|
@ -14,6 +14,7 @@
|
||||||
#include <minix/ds.h>
|
#include <minix/ds.h>
|
||||||
#include <minix/vm.h>
|
#include <minix/vm.h>
|
||||||
#include <timers.h>
|
#include <timers.h>
|
||||||
|
#include <sys/mman.h>
|
||||||
#include "assert.h"
|
#include "assert.h"
|
||||||
#include "e1000.h"
|
#include "e1000.h"
|
||||||
#include "e1000_hw.h"
|
#include "e1000_hw.h"
|
||||||
|
@ -323,8 +324,14 @@ PRIVATE int e1000_probe(e1000_t *e, int skip)
|
||||||
/* Optionally map flash memory. */
|
/* Optionally map flash memory. */
|
||||||
if (pci_attr_r32(devind, PCI_BAR_3))
|
if (pci_attr_r32(devind, PCI_BAR_3))
|
||||||
{
|
{
|
||||||
e->flash = vm_map_phys(SELF, (void *) pci_attr_r32(devind, PCI_BAR_2),
|
if((e->flash = vm_map_phys(SELF,
|
||||||
0x10000);
|
(void *) pci_attr_r32(devind, PCI_BAR_2), 0x10000)) == MAP_FAILED) {
|
||||||
|
if((e->flash = vm_map_phys(SELF,
|
||||||
|
(void *) pci_attr_r32(devind, PCI_BAR_2), 0x1000))
|
||||||
|
== MAP_FAILED) {
|
||||||
|
panic("e1000: couldn't map in flash.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
gfpreg = E1000_READ_FLASH_REG(e, ICH_FLASH_GFPREG);
|
gfpreg = E1000_READ_FLASH_REG(e, ICH_FLASH_GFPREG);
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue