1. 27 3月, 2013 2 次提交
    • G
      stmmac: support extend descriptors · c24602ef
      Giuseppe CAVALLARO 提交于
      This patch is to support the extend descriptors available
      in the chips newer than the 3.50.
      
      In case of the extend descriptors cannot be supported,
      at runtime, the driver will continue to work using the old style.
      
      In detail, this support extends the main descriptor structure
      adding new descriptors: 4, 5, 6, 7. The desc4 gives us extra
      information about the received ethernet payload when it is
      carrying PTP packets or TCP/UDP/ICMP over IP packets.
      The descriptors 6 and 7 are used for saving HW L/H timestamps (PTP).
      
      V2: this new version removes the Koption added in the first implementation
      because all the checks now to verify if the extended descriptors are
      actually supported happen at probe time.
      Signed-off-by: NGiuseppe Cavallaro <peppe.cavallaro@st.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c24602ef
    • G
      stmmac: reorganize chain/ring modes removing Koptions · 4a7d666a
      Giuseppe CAVALLARO 提交于
      Previously we had two Koptions to decide if the stmmac
      had to use either a ring or a chain to manage its descriptors.
      This patch removes the Kernel configuration options and it allow us
      to use the chain mode by passing a module option.
      Ring mode continues to be the default.
      
      Also with this patch, it will be easier to validate the driver built and
      guarantee that all the two modes always compile fine.
      Signed-off-by: NGiuseppe Cavallaro <peppe.cavallaro@st.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4a7d666a
  2. 15 3月, 2013 1 次提交
  3. 16 2月, 2013 1 次提交
  4. 11 2月, 2013 2 次提交
  5. 05 2月, 2013 1 次提交
  6. 04 2月, 2013 1 次提交
  7. 23 1月, 2013 1 次提交
  8. 15 1月, 2013 1 次提交
  9. 07 1月, 2013 1 次提交
  10. 15 12月, 2012 1 次提交
  11. 08 12月, 2012 1 次提交
  12. 04 12月, 2012 2 次提交
  13. 27 11月, 2012 5 次提交
  14. 07 10月, 2012 1 次提交
    • E
      net: remove skb recycling · acb600de
      Eric Dumazet 提交于
      Over time, skb recycling infrastructure got litle interest and
      many bugs. Generic rx path skb allocation is now using page
      fragments for efficient GRO / TCP coalescing, and recyling
      a tx skb for rx path is not worth the pain.
      
      Last identified bug is that fat skbs can be recycled
      and it can endup using high order pages after few iterations.
      
      With help from Maxime Bizon, who pointed out that commit
      87151b86 (net: allow pskb_expand_head() to get maximum tailroom)
      introduced this regression for recycled skbs.
      
      Instead of fixing this bug, lets remove skb recycling.
      
      Drivers wanting really hot skbs should use build_skb() anyway,
      to allocate/populate sk_buff right before netif_receive_skb()
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Cc: Maxime Bizon <mbizon@freebox.fr>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      acb600de
  15. 22 9月, 2012 2 次提交
  16. 01 9月, 2012 4 次提交
    • S
      net:stmmac: convert driver to use devm_request_and_ioremap. · 3f8bdecd
      Srinivas Kandagatla 提交于
      This patch moves calls to ioremap and request_mem_region to
      devm_request_and_ioremap call.
      Signed-off-by: NSrinivas Kandagatla <srinivas.kandagatla@st.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3f8bdecd
    • S
      net:stmmac: Remove bus_id from mdio platform data. · d56631a6
      Srinivas Kandagatla 提交于
      This patch removes bus_id from mdio platform data, The reason to remove
      bus_id is, stmmac mdio bus_id is always same as stmmac bus-id, so there
      is no point in passing this in different variable.
      Also stmmac ethernet driver connects to phy with bus_id passed its
      platform data.
      So, having single bus-id is much simpler.
      Signed-off-by: NSrinivas Kandagatla <srinivas.kandagatla@st.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d56631a6
    • S
      net:stmmac: fix broken stmmac_pltfr_remove. · 1f9defa0
      Srinivas Kandagatla 提交于
      This patch fixes stmmac_pltfr_remove function, which is broken because,
      it is accessing plat variable via freed memory priv pointer which gets
      freed by free_netdev called from stmmac_dvr_remove.
      
      In short this patch caches the plat pointer in local variable before
      calling stmmac_dvr_remove to prevent code accessing freed memory.
      
      Without this patch any attempt to remove the stmmac device will fail as
      below:
      
      Unregistering eth 0 ...
      Unable to handle kernel paging request at virtual address 6b6b6bab
      pgd = de5dc000
      [6b6b6bab] *pgd=00000000
      Internal error: Oops: 5 [#1] PREEMPT SMP
      Modules linked in: cdev(O+)
      CPU: 0    Tainted: G           O  (3.3.1_stm24_0210-b2000+ #25)
      PC is at stmmac_pltfr_remove+0x2c/0xa0
      LR is at stmmac_pltfr_remove+0x28/0xa0
      pc : [<c01b8908>]    lr : [<c01b8904>]    psr: 60000013
      sp : def6be78  ip : de6c5a00  fp : 00000000
      r10: 00000028  r9 : c082d81d  r8 : 00000001
      r7 : de65a600  r6 : df81b240  r5 : c0413fd8  r4 : 00000000
      r3 : 6b6b6b6b  r2 : def6be6c  r1 : c0355e2b  r0 : 00000020
      Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
      Control: 10c53c7d  Table: 5e5dc04a  DAC: 00000015
      Process insmod (pid: 738, stack limit = 0xdef6a2f0)
      Stack: (0xdef6be78 to 0xdef6c000)
      be60:                                                       c0413fe0
      c0403658
      be80: c0400bb0 c019270c c01926f8 c0191478 00000000 c0414014 c0413fe0
      c01914d8
      bea0: 00000000 c0413fe0 df8045d0 c019109c c0413fe0 c0400bf0 c0413fd8
      c018f04c
      bec0: 00000000 bf000000 c0413fd8 c01929a0 c0413fd8 bf000000 00000000
      c0192bfc
      bee0: bf00009c bf000014 def6a000 c000859c 00000000 00000001 bf00009c
      bf00009c
      bf00: 00000001 bf00009c 00000001 bf0000e4 de65a600 00000001 c082d81d
      c0058cd0
      bf20: bf0000a8 c004fbd8 c0056414 c082d815 c02aea20 bf0001f0 00b0b008
      e0846208
      bf40: c03ec8a0 e0846000 0000db0d e0850604 e08504de e0853a24 00000204
      000002d4
      bf60: 00000000 00000000 0000001c 0000001d 00000009 00000000 00000006
      00000000
      bf80: 00000003 f63d4e2e 0000db0d bef02ed8 00000080 c000d2e8 def6a000
      00000000
      bfa0: 00000000 c000d140 f63d4e2e 0000db0d 00b0b018 0000db0d 00b0b008
      b6f4f298
      bfc0: f63d4e2e 0000db0d bef02ed8 00000080 00000003 00000000 00010000
      00000000
      bfe0: 00b0b008 bef02c64 00008d20 b6ef3784 60000010 00b0b018 5a5a5a5a
      5a5a5a5a
      [<c01b8908>] (stmmac_pltfr_remove+0x2c/0xa0) from [<c019270c>]
      (platform_drv_remove+0x14/0x18)
      [<c019270c>] (platform_drv_remove+0x14/0x18) from [<c0191478>]
      (__device_release_driver+0x64/0xa4)
      [<c0191478>] (__device_release_driver+0x64/0xa4) from [<c01914d8>]
      (device_release_driver+0x20/0x2c)
      [<c01914d8>] (device_release_driver+0x20/0x2c) from [<c019109c>]
      (bus_remove_device+0xcc/0xdc)
      [<c019109c>] (bus_remove_device+0xcc/0xdc) from [<c018f04c>]
      (device_del+0x104/0x160)
      [<c018f04c>] (device_del+0x104/0x160) from [<c01929a0>]
      (platform_device_del+0x18/0x58)
      [<c01929a0>] (platform_device_del+0x18/0x58) from [<c0192bfc>]
      (platform_device_unregister+0xc/0x18)
      [<c0192bfc>] (platform_device_unregister+0xc/0x18) from [<bf000014>]
      (r_init+0x14/0x2c [cdev])
      [<bf000014>] (r_init+0x14/0x2c [cdev]) from [<c000859c>]
      (do_one_initcall+0x90/0x160)
      [<c000859c>] (do_one_initcall+0x90/0x160) from [<c0058cd0>]
      (sys_init_module+0x15c4/0x1794)
      [<c0058cd0>] (sys_init_module+0x15c4/0x1794) from [<c000d140>]
      (ret_fast_syscall+0x0/0x30)
      Code: e1a04000 e59f0070 eb039b65 e59636e4 (e5933040)
      Signed-off-by: NSrinivas Kandagatla <srinivas.kandagatla@st.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1f9defa0
    • S
      net:stmmac: Add check if mdiobus is registered in stmmac_mdio_unregister · a5cf5ce9
      Srinivas Kandagatla 提交于
      This patch adds a basic check in stmmac_mdio_unregister to see if mdio
      bus registeration for this driver was actually sucessfull or not.
      
      Use case here is, if BSP considers using mdio-gpio bus along with stmmac
      driver by passing mdio_bus_data as NULL in platform data.
      Call to stmmac_mdio_register with mdio_bus_data as NULL returns 0, which
      is a considered sucessfull call form stmmac. Then again when we unload
      the driver we just call stmmac_mdio_unregister, this is were the actual
      problem is stmmac-mdio code dont really know at this instance of calling
      that stmmac_mdio_register was actually successful.
      
      So Adding a check in stmmac_mdio_unregister is always safe.
      
      Without this patch stmmac driver calls stmmac_mdio_register from
      stmmac_release which Segfaults as mii bus was never registered at the
      first point.
      
      Originally the this bug was found when unloading an stmmac driver
      instance which uses mdio-gpio for smi access.
      Signed-off-by: NSrinivas Kandagatla <srinivas.kandagatla@st.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a5cf5ce9
  17. 25 8月, 2012 1 次提交
  18. 23 8月, 2012 2 次提交
  19. 20 8月, 2012 1 次提交
  20. 09 8月, 2012 1 次提交
    • A
      net/stmmac: mark probe function as __devinit · f5addb91
      Arnd Bergmann 提交于
      Driver probe functions are generally __devinit so they will be
      discarded after initialization for non-hotplug kernels.
      This was found by a new warning after patch 6a228452 "stmmac: Add
      device-tree support" adds a new __devinit function that is called
      from stmmac_pltfr_probe.
      
      Without this patch, building socfpga_defconfig results in:
      
      WARNING: drivers/net/ethernet/stmicro/stmmac/stmmac.o(.text+0x5d4c): Section mismatch in reference from the function stmmac_pltfr_probe() to the function .devinit.text:stmmac_probe_config_dt()
      The function stmmac_pltfr_probe() references
      the function __devinit stmmac_probe_config_dt().
      This is often because stmmac_pltfr_probe lacks a __devinit
      annotation or the annotation of stmmac_probe_config_dt is wrong.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Stefan Roese <sr@denx.de>
      Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: netdev@vger.kernel.org
      Acked-by: NStefan Roese <sr@denx.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f5addb91
  21. 31 7月, 2012 1 次提交
  22. 20 7月, 2012 1 次提交
  23. 11 7月, 2012 1 次提交
  24. 10 7月, 2012 2 次提交
    • D
      stmmac: Fix for higher mtu size handling · 684901a6
      Deepak Sikri 提交于
      For the higher mtu sizes requiring the buffer size greater than 8192,
      the buffers are sent or received using multiple dma descriptors/ same
      descriptor with option of multi buffer handling.
      It was observed during tests that the driver was missing on data
      packets during the normal ping operations if the data buffers being used
      catered to jumbo frame handling.
      
      The memory barrriers are added in between preparation of dma descriptors
      in the jumbo frame handling path to ensure all instructions before
      enabling the dma are complete.
      Signed-off-by: NDeepak Sikri <deepak.sikri@st.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      684901a6
    • D
      stmmac: Fix for nfs hang on multiple reboot · 8e839891
      Deepak Sikri 提交于
      It was observed that during multiple reboots nfs hangs. The status of
      receive descriptors shows that all the descriptors were in control of
      CPU, and none were assigned to DMA.
      Also the DMA status register confirmed that the Rx buffer is
      unavailable.
      
      This patch adds the fix for the same by adding the memory barriers to
      ascertain that the all instructions before enabling the Rx or Tx DMA are
      completed which involves the proper setting of the ownership bit in DMA
      descriptors.
      Signed-off-by: NDeepak Sikri <deepak.sikri@st.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8e839891
  25. 01 7月, 2012 2 次提交
    • G
      stmmac: add the Energy Efficient Ethernet support · d765955d
      Giuseppe CAVALLARO 提交于
      This patch adds the Energy Efficient Ethernet support to the stmmac.
      
      Please see the driver's documentation for further details about this support
      in the driver.
      
      Thanks also goes to Rayagond Kokatanur for his first implementation.
      
      Note:
       to clearly manage and expose the lpi interrupt status and eee ethtool
       stats I've had to do some modifications to the driver's design and I
       found really useful to move other parts of the code (e.g. mmc irq stat)
       in the main directly. So this means that some core has been reworked
       to introduce the EEE.
      
      v1: initial patch
      v2: fixed some sparse issues (typos)
      v3: erroneously sent the v2 renamed as v3
      v4:
      	o Fixed the return value of the stmmac_eee_init as suggested by D.Miller
      	o Totally reviewed the ethtool support for EEE
      	o Added a new internal parameter to tune the SW timer for TX LPI.
      v5: do not change any eee setting in case of the stmmac_ethtool_op_set_eee fails
          (it has to return -EOPNOTSUPP in that case).
      Signed-off-by: NGiuseppe Cavallaro <peppe.cavallaro@st.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d765955d
    • G
      stmmac: do not use strict_strtoul but kstrtoint · ea2ab871
      Giuseppe CAVALLARO 提交于
      This patch replaces the obsolete strict_strtoul with kstrtoint.
      
      v2: also removed casting on kstrtoul.
      v3: use kstrtoint instead of kstrtoul due to all vars are integer.
          thanks to E. Dumazet.
      Signed-off-by: NGiuseppe Cavallaro <peppe.cavallaro@st.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ea2ab871
  26. 12 6月, 2012 1 次提交
    • S
      net: stmmac: Fix clock en-/disable calls · 883ffd6e
      Stefan Roese 提交于
      clk_{un}prepare is mandatory for platforms using common clock framework.
      Since these drivers are used by SPEAr platform, which supports common
      clock framework, add clk_{un}prepare() support for them. Otherwise
      the clocks are not correctly en-/disabled and ethernet support doesn't
      work.
      Signed-off-by: NStefan Roese <sr@denx.de>
      Cc: Viresh Kumar <viresh.linux@gmail.com>
      Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      883ffd6e