1. 30 1月, 2009 1 次提交
  2. 11 1月, 2009 1 次提交
    • T
      ucc_geth: use correct UCCE macros · 3bc53427
      Timur Tabi 提交于
      The UCC Event Register (UCCE) already has unambigous macro definitions in qe.h,
      so we should not be defining our own in the UCC Ethernet driver.
      
      Removed unused local variable 'dev' from ucc_geth_poll(), which fixes
      a warning caused by commit 908a7a16
      ("net: Remove unused netdev arg from some NAPI interfaces.").
      
      Replaced in_be/out_be pairs with setbits32 or clrbits32, where applicable.
      Signed-off-by: NTimur Tabi <timur@freescale.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3bc53427
  3. 19 12月, 2008 1 次提交
    • A
      ucc_geth: Fix TX watchdog timeout handling · 1762a29a
      Anton Vorontsov 提交于
      The timeout handling code is currently broken in several ways:
      
      - It calls stop() (which frees all the memory and IRQ), and then
        calls startup() (which won't re-request IRQ, neither it will
        re-init the Fast UCC structure).
      - It calls these routines from the softirq context, which is wrong,
        since stop() calls free_irq() (which might sleep) and startup()
        allocates things with GFP_KERNEL.
      - It won't soft-reset the PHY. We need the PHY reset for at least
        MPC8360E-MDS boards with Marvell 88E1111 PHY, the PHY won't recover
        from timeouts w/o the reset.
      
      So the patch fixes these problems by implementing the workqueue for the
      timeout handling, and there we fully re-open the device via close() and
      open() calls. The close/open paths do the right things, and I can see
      that the driver actually survive the timeouts.
      Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1762a29a
  4. 07 5月, 2008 1 次提交
  5. 17 4月, 2008 1 次提交
  6. 11 10月, 2007 2 次提交
    • J
      [NET] drivers/net: statistics cleanup #1 -- save memory and shrink code · 09f75cd7
      Jeff Garzik 提交于
      We now have struct net_device_stats embedded in struct net_device,
      and the default ->get_stats() hook does the obvious thing for us.
      
      Run through drivers/net/* and remove the driver-local storage of
      statistics, and driver-local ->get_stats() hook where applicable.
      
      This was just the low-hanging fruit in drivers/net; plenty more drivers
      remain to be updated.
      
      [ Resolved conflicts with napi_struct changes and fix sunqe build
        regression... -DaveM ]
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      09f75cd7
    • S
      [NET]: Make NAPI polling independent of struct net_device objects. · bea3348e
      Stephen Hemminger 提交于
      Several devices have multiple independant RX queues per net
      device, and some have a single interrupt doorbell for several
      queues.
      
      In either case, it's easier to support layouts like that if the
      structure representing the poll is independant from the net
      device itself.
      
      The signature of the ->poll() call back goes from:
      
      	int foo_poll(struct net_device *dev, int *budget)
      
      to
      
      	int foo_poll(struct napi_struct *napi, int budget)
      
      The caller is returned the number of RX packets processed (or
      the number of "NAPI credits" consumed if you want to get
      abstract).  The callee no longer messes around bumping
      dev->quota, *budget, etc. because that is all handled in the
      caller upon return.
      
      The napi_struct is to be embedded in the device driver private data
      structures.
      
      Furthermore, it is the driver's responsibility to disable all NAPI
      instances in it's ->stop() device close handler.  Since the
      napi_struct is privatized into the driver's private data structures,
      only the driver knows how to get at all of the napi_struct instances
      it may have per-device.
      
      With lots of help and suggestions from Rusty Russell, Roland Dreier,
      Michael Chan, Jeff Garzik, and Jamal Hadi Salim.
      
      Bug fixes from Thomas Graf, Roland Dreier, Peter Zijlstra,
      Joseph Fannin, Scott Wood, Hans J. Koch, and Michael Chan.
      
      [ Ported to current tree and all drivers converted.  Integrated
        Stephen's follow-on kerneldoc additions, and restored poll_list
        handling to the old style to fix mutual exclusion issues.  -DaveM ]
      Signed-off-by: NStephen Hemminger <shemminger@linux-foundation.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bea3348e
  7. 08 10月, 2007 1 次提交
    • T
      [POWERPC] qe: miscellaneous code improvements and fixes to the QE library · 6b0b594b
      Timur Tabi 提交于
      This patch makes numerous miscellaneous code improvements to the QE library.
      
      1. Remove struct ucc_common and merge ucc_init_guemr() into ucc_set_type()
         (every caller of ucc_init_guemr() also calls ucc_set_type()).  Modify all
         callers of ucc_set_type() accordingly.
      
      2. Remove the unused enum ucc_pram_initial_offset.
      
      3. Refactor qe_setbrg(), also implement work-around for errata QE_General4.
      
      4. Several printk() calls were missing the terminating \n.
      
      5. Add __iomem where needed, and change u16 to __be16 and u32 to __be32 where
         appropriate.
      
      6. In ucc_slow_init() the RBASE and TBASE registers in the PRAM were programmed
         with the wrong value.
      
      7. Add the protocol type to struct us_info and updated ucc_slow_init() to
         use it, instead of always programming QE_CR_PROTOCOL_UNSPECIFIED.
      
      8. Rename ucc_slow_restart_x() to ucc_slow_restart_tx()
      
      9. Add several macros in qe.h (mostly for slow UCC support, but also to
         standardize some naming convention) and remove several unused macros.
      
      10. Update ucc_geth.c to use the new macros.
      
      11. Add ucc_slow_info.protocol to specify which QE_CR_PROTOCOL_xxx protcol
          to use when initializing the UCC in ucc_slow_init().
      
      12. Rename ucc_slow_pram.rfcr to rbmr and ucc_slow_pram.tfcr to tbmr, since
          these are the real names of the registers.
      
      13. Use the setbits, clrbits, and clrsetbits where appropriate.
      
      14. Refactor ucc_set_qe_mux_rxtx().
      
      15. Remove all instances of 'volatile'.
      
      16. Simplify get_cmxucr_reg();
      
      17. Replace qe_mux.cmxucrX with qe_mux.cmxucr[].
      
      18. Updated struct ucc_geth because struct ucc_fast is not padded any more.
      Signed-off-by: NTimur Tabi <timur@freescale.com>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      6b0b594b
  8. 25 7月, 2007 1 次提交
  9. 28 4月, 2007 3 次提交
  10. 22 10月, 2006 1 次提交
    • L
      [PATCH] ucc_geth: changes to ucc_geth driver as a result of qe_lib changes and bugfixes · 18a8e864
      Li Yang 提交于
      changes due to qe_lib changes include:
      
      o removed inclusion of platform header file
      o removed platform_device code, replaced with of_device
      o removed typedefs
      o uint -> u32 conversions
      o removed following defines:
        QE_SIZEOF_BD, BD_BUFFER_ARG, BD_BUFFER_CLEAR, BD_BUFFER,
        BD_STATUS_AND_LENGTH_SET, BD_STATUS_AND_LENGTH, and BD_BUFFER_SET
        because they hid sizeof/in_be32/out_be32 operations from the reader.
      o removed irrelevant comments, added others to resemble removed BD_ defines
      o const'd and uncasted all get_property() assignments
      
      bugfixes, courtesy of Scott Wood, include:
      
      - Read phy_address as a u32, not u8.
      - Match on type == "network" as well as compatible == "ucc_geth", as
        device_is_compatible() will only compare up to the length of the
        test string, allowing "ucc_geth_phy" to match as well.
      - fixes the MAC setting code in ucc_geth.c.  The old code was overwriting and dereferencing random stack contents.
      Signed-off-by: NLi Yang <leoli@freescale.com>
      Signed-off-by: NKim Phillips <kim.phillips@freescale.com>
      Signed-off-by: NScott Wood <scottwood@freescale.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      18a8e864
  11. 20 8月, 2006 1 次提交