From fbc68749c09b20b0d094c091570e6ac82dab742b Mon Sep 17 00:00:00 2001 From: Ilias Apalodimas Date: Thu, 12 Oct 2017 21:00:46 +0300 Subject: Renamed mm.h -> mm_api.h Minor identation fixes Signed-off-by: Ilias Apalodimas --- drivers/r8169.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'drivers/r8169.c') diff --git a/drivers/r8169.c b/drivers/r8169.c index af8a454..8089a35 100644 --- a/drivers/r8169.c +++ b/drivers/r8169.c @@ -16,7 +16,7 @@ /* Us */ #include #include -#include +#include typedef unsigned long dma_addr_t; char *rxBuffers[256]; @@ -122,10 +122,11 @@ int main(int argc, char *argv[]) printf("Could not reserve on contiguous 4GB address space\n"); goto out; } - + printf("iobase: %p iocur : %p\n", iobase, iocur); ret = iomem_alloc(device, 2 * 1024 * 1024, &iocur, &rx_data); if (ret) goto out; + printf("iobase: %p iocur : %p\n", iobase, iocur); if (rtl8169_rx_fill(device, rxRing, &rx_data) != 0) { printf("Could not fill ring\n"); @@ -135,12 +136,10 @@ int main(int argc, char *argv[]) /* signal ready */ ioctl(device, 500, NULL); i = 0; - while (1) - { + while (1) { if (i >= NUM_RX_DESC) i = 0; - for (; i < NUM_RX_DESC; i++) - { + for (; i < NUM_RX_DESC; i++) { __u32 status; status = le32_to_cpu(rxRing[i].opts1) & ~0; /// either ~(RxBOVF | RxFOVF) or ~0; @@ -149,7 +148,6 @@ int main(int argc, char *argv[]) usleep(100*1000); break; } - /* This barrier is needed to keep us from reading * any other fields out of the Rx descriptor until * we know the status of DescOwn @@ -227,7 +225,6 @@ process_pkt: rxRing[i].opts2 = 0; rtl8169_mark_to_asic(&rxRing[i], 2048); } - } out: @@ -238,5 +235,4 @@ out: if (container) close(container); return -1; - } -- cgit v1.2.3