aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/cadence/macb.c
diff options
context:
space:
mode:
authorNicolas Ferre <nicolas.ferre@atmel.com>2015-03-31 15:02:00 +0200
committerDavid S. Miller <davem@davemloft.net>2015-03-31 16:51:17 -0400
commitda120112493460332b5b430070ca0ea205c37632 (patch)
treeb2c44abfa5a17aa0bda1a8742ed2f3d41db18718 /drivers/net/ethernet/cadence/macb.c
parentnet/macb: only probe queues once and use stored values (diff)
downloadlinux-dev-da120112493460332b5b430070ca0ea205c37632.tar.xz
linux-dev-da120112493460332b5b430070ca0ea205c37632.zip
net/macb: add comment in macb_probe_queues
As we access the MID register directly, we need to tell why we don't use the macb_is_gem() dedicated function. Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--drivers/net/ethernet/cadence/macb.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c
index ac1f18142f7e..68d59b3900b1 100644
--- a/drivers/net/ethernet/cadence/macb.c
+++ b/drivers/net/ethernet/cadence/macb.c
@@ -2161,9 +2161,13 @@ static void macb_probe_queues(void __iomem *mem,
*queue_mask = 0x1;
*num_queues = 1;
- /* is it macb or gem ? */
+ /* is it macb or gem ?
+ *
+ * We need to read directly from the hardware here because
+ * we are early in the probe process and don't have the
+ * MACB_CAPS_MACB_IS_GEM flag positioned
+ */
mid = readl_relaxed(mem + MACB_MID);
-
if (MACB_BFEXT(IDNUM, mid) < 0x2)
return;