Hi,

I noticed that gfar_of_init() has

        if (of_device_is_compatible(np, "fsl,etsec2")) {
                mode = MQ_MG_MODE;
                poll_mode = GFAR_SQ_POLLING;
        } else {
                mode = SQ_SG_MODE;
                poll_mode = GFAR_SQ_POLLING;
        }

i.e., poll_mode is always set to GFAR_SQ_POLLING, and I can't find
anywhere that GFAR_MQ_POLLING is used (except for comments). So it seems
that everything in the else branches of the "if (priv->poll_mode ==
GFAR_SQ_POLLING)"s, including the gfar_poll_rx and gfar_poll_tx
callbacks, is currently dead code.

I'm wondering if this is deliberate, and if so, if the dead code
could/should just be removed?

FWIW, some quick testing naively doing

        if (of_device_is_compatible(np, "fsl,etsec2")) {
                mode = MQ_MG_MODE;
-               poll_mode = GFAR_SQ_POLLING;
+               poll_mode = GFAR_MQ_POLLING;
        } else {

results in broken network - ping answers the first packet, but then
nothing after that, and ssh is completely broken (and if ssh is
attempted first, ping doesn't work at all). This is on a ls1021a-derived
board.

Rasmus

Reply via email to