1. 07 12月, 2016 33 次提交
  2. 06 12月, 2016 7 次提交
    • N
      net: stmmac: clear reset value of snps, wr_osr_lmt/snps, rd_osr_lmt before writing · 6b3374cb
      Niklas Cassel 提交于
      WR_OSR_LMT and RD_OSR_LMT have a reset value of 1.
      Since the reset value wasn't cleared before writing, the value in the
      register would be incorrect if specifying an uneven value for
      snps,wr_osr_lmt/snps,rd_osr_lmt.
      
      Zero is a valid value for the properties, since the databook specifies:
      maximum outstanding requests = WR_OSR_LMT + 1.
      
      We do not want to change the behavior for existing users when the
      property is missing. Therefore, default to 1 if the property is missing,
      since that is the same as the reset value.
      Signed-off-by: NNiklas Cassel <niklas.cassel@axis.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6b3374cb
    • D
      net: hix5hd2_gmac: add reset control and clock signals · 7087140d
      Dongpo Li 提交于
      Add three reset control signals, "mac_core_rst", "mac_ifc_rst" and
      "phy_rst".
      The following diagram explained how the reset signals work.
      
                              SoC
      |-----------------------------------------------------
      |                               ------                |
      |                               | cpu |               |
      |                               ------                |
      |                                  |                  |
      |                              ------------ AMBA bus  |
      |                         GMAC     |                  |
      |                            ----------------------   |
      | ------------- mac_core_rst | --------------      |  |
      | |clock and   |-------------->|   mac core  |     |  |
      | |reset       |             | --------------      |  |
      | |generator   |----         |       |             |  |
      | -------------     |        | ----------------    |  |
      |          |        ---------->| mac interface |   |  |
      |          |     mac_ifc_rst | ----------------    |  |
      |          |                 |       |             |  |
      |          |                 | ------------------  |  |
      |          |phy_rst          | | RGMII interface | |  |
      |          |                 | ------------------  |  |
      |          |                 ----------------------   |
      |----------|------------------------------------------|
                 |                          |
                 |                      ----------
                 |--------------------- |PHY chip |
                                        ----------
      
      The "mac_core_rst" represents "mac core reset signal", it resets
      the mac core including packet processing unit, descriptor processing unit,
      tx engine, rx engine, control unit.
      The "mac_ifc_rst" represents "mac interface reset signal", it resets
      the mac interface. The mac interface unit connects mac core and
      data interface like MII/RMII/RGMII. After we set a new value of
      interface mode, we must reset mac interface to reload the new mode value.
      The "mac_core_rst" and "mac_ifc_rst" are both optional to be
      backward compatible with the hix5hd2 SoC.
      The "phy_rst" represents "phy reset signal", it does a hardware reset
      on the PHY chip. This reset signal is optional if the PHY can work well
      without the hardware reset.
      
      Add one more clock signal, the existing is MAC core clock,
      and the new one is MAC interface clock.
      The MAC interface clock is optional to be backward compatible with
      the hix5hd2 SoC.
      Signed-off-by: NDongpo Li <lidongpo@hisilicon.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7087140d
    • D
      net: hix5hd2_gmac: add tx scatter-gather feature · e5222b1c
      Dongpo Li 提交于
      "hisi-gemac-v2" adds the SG/TXCSUM/TSO/UFO features.
      This patch only adds the SG(scatter-gather) driver for transmitting,
      the drivers of other features will be submitted later.
      Signed-off-by: NDongpo Li <lidongpo@hisilicon.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e5222b1c
    • D
      net: hix5hd2_gmac: add generic compatible string · d0fb6ba7
      Dongpo Li 提交于
      The "hix5hd2" is SoC name, add the generic ethernet driver name.
      The "hisi-gemac-v1" is the basic version and "hisi-gemac-v2" adds
      the SG/TXCSUM/TSO/UFO features.
      Signed-off-by: NDongpo Li <lidongpo@hisilicon.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d0fb6ba7
    • S
      net: dsa: mv88e6xxx: Use EDSA on mv88e6097 · 2bfcfcd3
      Stefan Eichenberger 提交于
      Use DSA_TAG_PROTO_EDSA as tag_protocol for the mv88e6097. The
      initialisation was missing before.
      
      Fixes: a1f482aa8c33 ("net: dsa: mv88e6xxx: Move the tagging protocol into info")
      Signed-off-by: NStefan Eichenberger <stefan.eichenberger@netmodule.com>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2bfcfcd3
    • F
      net: ep93xx_eth: Do not crash unloading module · c823abac
      Florian Fainelli 提交于
      When we unload the ep93xx_eth, whether we have opened the network
      interface or not, we will either hit a kernel paging request error, or a
      simple NULL pointer de-reference because:
      
      - if ep93xx_open has been called, we have created a valid DMA mapping
        for ep->descs, when we call ep93xx_stop, we also call
        ep93xx_free_buffers, ep->descs now has a stale value
      
      - if ep93xx_open has not been called, we have a NULL pointer for
        ep->descs, so performing any operation against that address just won't
        work
      
      Fix this by adding a NULL pointer check for ep->descs which means that
      ep93xx_free_buffers() was able to successfully tear down the descriptors
      and free the DMA cookie as well.
      
      Fixes: 1d22e05d ("[PATCH] Cirrus Logic ep93xx ethernet driver")
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c823abac
    • P
      net: calxeda: xgmac: use new api ethtool_{get|set}_link_ksettings · b0da4f74
      Philippe Reynes 提交于
      The ethtool api {get|set}_settings is deprecated.
      We move this driver to new api {get|set}_link_ksettings.
      Signed-off-by: NPhilippe Reynes <tremyfr@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b0da4f74