# HG changeset patch # User Louis Opter # Date 1326038050 -3600 # Node ID e0cd016d4fc59de6ecfc8c07048b8810d45794f0 # Parent 87704b867fb065e95d6d8f10da1b575630518a05 Restore the reset code and print the mac address diff -r 87704b867fb0 -r e0cd016d4fc5 rathaxes_add_lkm_ethernet_sample.patch --- a/rathaxes_add_lkm_ethernet_sample.patch Sun Jan 08 16:49:38 2012 +0100 +++ b/rathaxes_add_lkm_ethernet_sample.patch Sun Jan 08 16:54:10 2012 +0100 @@ -37,7 +37,7 @@ new file mode 100644 --- /dev/null +++ b/rathaxes/samples/lkm/e1000.blt -@@ -0,0 +1,284 @@ +@@ -0,0 +1,293 @@ +with e1000, Ethernet, Socket, PCI, LKM, Log +{ + template type e1000::Context() @@ -190,7 +190,7 @@ + } + + /* Reset the card */ -+ rtx_e1000_print_status(&rtx_ether_ctx->hw_ctx); ++ rtx_e1000_register_write32(&rtx_ether_ctx->hw_ctx, E1000_CTRL, E1000_CMD_RST); + udelay(10); + + /* Now we can load its mac address */ @@ -212,6 +212,15 @@ + memcpy(rtx_ether_ctx->net_dev->perm_addr, + rtx_ether_ctx->net_dev->dev_addr, + rtx_ether_ctx->net_dev->addr_len); ++ ++ pr_info("e1000::create: Mac Adress: %x:%x:%x:%x:%x:%x\n", ++ rtx_ether_ctx->net_dev->dev_addr[0], ++ rtx_ether_ctx->net_dev->dev_addr[1], ++ rtx_ether_ctx->net_dev->dev_addr[2], ++ rtx_ether_ctx->net_dev->dev_addr[3], ++ rtx_ether_ctx->net_dev->dev_addr[4], ++ rtx_ether_ctx->net_dev->dev_addr[5]); ++ + } + + chunk ::CALL