Skip to content

Commit

Permalink
net/macb: add comment in macb_probe_queues
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Nicolas Ferre authored and David S. Miller committed Mar 31, 2015
1 parent bfa0914 commit da12011
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions drivers/net/ethernet/cadence/macb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit da12011

Please sign in to comment.