Signed-off-by: Niklas Söderlund niso@kth.se --- hwaccess.c | 3 ++- nicintel.c | 3 ++- programmer.h | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/hwaccess.c b/hwaccess.c index d6da603..3786149 100644 --- a/hwaccess.c +++ b/hwaccess.c @@ -264,10 +264,11 @@ int rmmio_le_writeb(uint8_t val, void *addr) return 0; }
-void rmmio_le_writew(uint16_t val, void *addr) +int rmmio_le_writew(uint16_t val, void *addr) { register_undo_mmio_writew(addr); mmio_le_writew(val, addr); + return 0; }
void rmmio_le_writel(uint32_t val, void *addr) diff --git a/nicintel.c b/nicintel.c index 98ba29f..b3126a7 100644 --- a/nicintel.c +++ b/nicintel.c @@ -100,7 +100,8 @@ int nicintel_init(void) * what we should do with it. Write 0x0001 because we have nothing * better to do with our time. */ - pci_rmmio_writew(0x0001, nicintel_control_bar + CSR_FCR); + if (pci_rmmio_writew(0x0001, nicintel_control_bar + CSR_FCR)) + return 1;
max_rom_decode.parallel = NICINTEL_MEMMAP_SIZE; register_par_programmer(&par_programmer_nicintel, BUS_PARALLEL); diff --git a/programmer.h b/programmer.h index 32962c0..4df78b4 100644 --- a/programmer.h +++ b/programmer.h @@ -351,7 +351,7 @@ int rmmio_writeb(uint8_t val, void *addr); int rmmio_writew(uint16_t val, void *addr); int rmmio_writel(uint32_t val, void *addr); int rmmio_le_writeb(uint8_t val, void *addr); -void rmmio_le_writew(uint16_t val, void *addr); +int rmmio_le_writew(uint16_t val, void *addr); void rmmio_le_writel(uint32_t val, void *addr); #define pci_rmmio_writeb rmmio_le_writeb #define pci_rmmio_writew rmmio_le_writew