1. 31 7月, 2013 1 次提交
  2. 05 6月, 2013 1 次提交
    • T
      net: mvneta: read MAC address from hardware when available · 8cc3e439
      Thomas Petazzoni 提交于
      This patch improves the logic used by the mvneta driver to find a MAC
      address for a particular interface. Until now, it was only looking at
      the Device Tree, and if no address was found, was falling back to
      generating a random MAC address.
      
      This patch adds the intermediate solution of reading the MAC address
      from the hardware registers, in case it has been set by the
      bootloader. So the order is now:
      
       1) MAC address from the Device Tree
       2) MAC address from the hardware registers
       3) Random MAC address
      
      This requires moving the MAC address initialization a little bit later
      in the ->probe() code, because it now requires the hardware registers
      to be remapped.
      Signed-off-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Cc: Joe Perches <joe@perches.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8cc3e439
  3. 28 5月, 2013 1 次提交
  4. 16 4月, 2013 1 次提交
    • W
      net: mvneta: fix improper tx queue usage in mvneta_tx() · ee40a116
      Willy Tarreau 提交于
      mvneta_tx() was using a static tx queue number causing crashes as
      soon as a little bit of traffic was sent via the interface, because
      it is normally expected that the same queue should be used as in
      dev_queue_xmit().
      
      As suggested by Ben Hutchings, let's use skb_get_queue_mapping() to
      get the proper Tx queue number, and use alloc_etherdev_mqs() instead
      of alloc_etherdev_mq() to create the queues.
      
      Both my Mirabox and my OpenBlocks AX3 used to crash without this patch
      and don't anymore with it. The issue appeared in 3.8 but became more
      visible after the fix allowing GSO to be enabled.
      
      Original work was done by Dmitri Epshtein and Thomas Petazzoni. I
      just adapted it to take care of Ben's comments.
      Signed-off-by: NWilly Tarreau <w@1wt.eu>
      Cc: Dmitri Epshtein <dima@marvell.com>
      Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Cc: Gregory CLEMENT <gregory.clement@free-electrons.com>
      Cc: Ben Hutchings <bhutchings@solarflare.com>
      Tested-by: NGregory CLEMENT <gregory.clement@free-electrons.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ee40a116
  5. 09 4月, 2013 1 次提交
  6. 15 3月, 2013 1 次提交
  7. 29 1月, 2013 1 次提交
  8. 22 12月, 2012 1 次提交
  9. 21 11月, 2012 3 次提交
  10. 16 11月, 2012 1 次提交
    • T
      net: mvneta: driver for Marvell Armada 370/XP network unit · c5aff182
      Thomas Petazzoni 提交于
      This patch contains a new network driver for the network unit of the
      ARM Marvell Armada 370 and the Armada XP. Both SoCs use the PJ4B
      processor, a Marvell-developed ARM core that implements the ARMv7
      instruction set.
      
      Compared to previous ARM Marvell SoCs (Kirkwood, Orion, Discovery),
      the network unit in Armada 370 and Armada XP is highly different. This
      is the reason why this new 'mvneta' driver is needed, while the older
      ARM Marvell SoCs use the 'mv643xx_eth' driver.
      
      Here is an overview of the most important hardware changes that
      require a new, specific, driver for the network unit of Armada 370/XP:
      
       - The new network unit has a completely different design and layout
         for the RX and TX descriptors. They are now organized as a simple
         array (each RX and TX queue has base address and size of this
         array) rather than a linked list as in the old SoCs.
      
       - The new network unit has a different RXQ and TXQ management: this
         management is done using special read/write counter registers,
         while in the Old SocS, it was done using the Ownership bit in RX
         and TX descriptors.
      
       - The new network unit has different interrupt registers
      
       - The new network unit way of cleaning of interrupts is not done by
         writing to the cause register, but by updating per-queue counters
      
       - The new network unit has different GMAC registers (link, speed,
         duplex configuration) and different WRR registers.
      
       - The new network unit has lots of new units like PnC (Parser and
         Classifier), PMT, BM (Memory Buffer Management), xPON, and more.
      
      The driver proposed in the current patch only handles the basic
      features. Additional hardware features will progressively be supported
      as needed.
      
      This code has originally been written by Rami Rosen
      <rosenr@marvell.com>, and then reviewed and cleaned up by Thomas
      Petazzoni <thomas.petazzoni@free-electrons.com>.
      Signed-off-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      c5aff182