Hi Michael, On Thu, Apr 19, 2018 at 4:05 AM, Michael Schmitz <schmitzmic@xxxxxxxxx> wrote:
From: Michael Karcher <kernel@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> Add platform device driver to populate the ax88796 platform data from information provided by the XSurf100 zorro device driver. The ax88796 module will be loaded through this module's probe function. Signed-off-by: Michael Karcher <kernel@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> Signed-off-by: Michael Schmitz <schmitzmic@xxxxxxxxx>
This is now commit 861928f4e60e826c ("net-next: New ax88796 platform driver for Amiga X-Surf 100 Zorro board (m68k)").
--- /dev/null +++ b/drivers/net/ethernet/8390/xsurf100.c
+#define __NS8390_init ax_NS8390_init
[...]
+#include "lib8390.c"
drivers/net/ethernet/8390/lib8390.c:202: warning: ‘__ei_open’ defined but not used drivers/net/ethernet/8390/lib8390.c:231: warning: ‘__ei_close’ defined but not used drivers/net/ethernet/8390/lib8390.c:255: warning: ‘__ei_tx_timeout’ defined but not used drivers/net/ethernet/8390/lib8390.c:302: warning: ‘__ei_start_xmit’ defined but not used drivers/net/ethernet/8390/lib8390.c:510: warning: ‘__ei_poll’ defined but not used drivers/net/ethernet/8390/lib8390.c:851: warning: ‘__ei_get_stats’ defined but not used drivers/net/ethernet/8390/lib8390.c:951: warning: ‘__ei_set_multicast_list’ defined but not used drivers/net/ethernet/8390/lib8390.c:989: warning: ‘____alloc_ei_netdev’ defined but not used So I was wondering: why is this file included, as XSURF100 selects AX88796, while ax88796.c includes lib8390.c anyway? Apparently lib8390.c is included for register definitions (provided by 8390.h, and can easily be fixed), and for the __NS8390_init() implementation, called below.
+static void xs100_block_output(struct net_device *dev, int count, + const unsigned char *buf, const int start_page) +{
[...]
+ while ((ei_inb(nic_base + EN0_ISR) & ENISR_RDC) == 0) { + if (jiffies - dma_start > 2 * HZ / 100) { /* 20ms */ + netdev_warn(dev, "timeout waiting for Tx RDC.\n"); + ei_local->reset_8390(dev); + ax_NS8390_init(dev, 1); + break; + } + } + + ei_outb(ENISR_RDC, nic_base + EN0_ISR); /* Ack intr. */ + ei_local->dmaing &= ~0x01; +}
Can we get rid of the inclusion of lib8390.c, and the related warnings? Perhaps ax88796.c can export its ax_NS8390_init(), iff the implementation is identical? Or is there a better solution? Thanks! Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds -- To unsubscribe from this list: send the line "unsubscribe linux-m68k" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html