1. 27 4月, 2009 1 次提交
  2. 21 4月, 2009 1 次提交
  3. 02 4月, 2009 2 次提交
  4. 23 3月, 2009 1 次提交
    • A
      ucc_geth: Fix oops when using fixed-link support · 61fa9dcf
      Anton Vorontsov 提交于
      commit b1c4a9dd ("ucc_geth: Change
      uec phy id to the same format as gianfar's") introduced a regression
      in the ucc_geth driver that causes this oops when fixed-link is used:
      
      Unable to handle kernel paging request for data at address 0x00000000
      Faulting instruction address: 0xc0151270
      Oops: Kernel access of bad area, sig: 11 [#1]
      TMCUTU
      NIP: c0151270 LR: c0151270 CTR: c0017760
      REGS: cf81fa60 TRAP: 0300   Not tainted  (2.6.29-rc8)
      MSR: 00009032 <EE,ME,IR,DR>  CR: 24024042  XER: 20000000
      DAR: 00000000, DSISR: 20000000
      TASK = cf81cba0[1] 'swapper' THREAD: cf81e000
      GPR00: c0151270 cf81fb10 cf81cba0 00000000 c0272e20 c025f354 00001e80
      cf86b08c
      GPR08: d1068200 cffffb74 06000000 d106c200 42024042 10085148 0fffd000
      0ffc81a0
      GPR16: 00000001 00000001 00000000 007ffeb0 00000000 0000c000 cf83f36c
      cf83f000
      GPR24: 00000030 cf83f360 cf81fb20 00000000 d106c200 20000000 00001e80
      cf83f360
      NIP [c0151270] ucc_geth_open+0x330/0x1efc
      LR [c0151270] ucc_geth_open+0x330/0x1efc
      Call Trace:
      [cf81fb10] [c0151270] ucc_geth_open+0x330/0x1efc (unreliable)
      [cf81fba0] [c0187638] dev_open+0xbc/0x12c
      [cf81fbc0] [c0187e38] dev_change_flags+0x8c/0x1b0
      
      This patch fixes the issue by removing offending (and somewhat
      duplicate) code from init_phy() routine, and changes _probe()
      function to use uec_mdio_bus_name().
      
      Also, since we fully construct phy_bus_id in the _probe() routine,
      we no longer need ->phy_address and ->mdio_bus fields in
      ucc_geth_info structure.
      
      I wish the patch would be a bit shorter, but it seems like the only
      way to fix the issue in a sane way. Luckily, the patch has been
      tested with real PHYs and fixed-link, so no further regressions
      expected.
      Reported-by: NJoakim Tjernlund <Joakim.Tjernlund@transmode.se>
      Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
      Tested-by: NJoakim Tjernlund <Joakim.Tjernlund@transmode.se>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      61fa9dcf
  5. 05 2月, 2009 1 次提交
  6. 30 1月, 2009 1 次提交
  7. 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
  8. 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
  9. 07 5月, 2008 1 次提交
  10. 17 4月, 2008 1 次提交
  11. 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
  12. 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
  13. 25 7月, 2007 1 次提交
  14. 28 4月, 2007 3 次提交
  15. 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
  16. 20 8月, 2006 1 次提交