1. 01 8月, 2013 1 次提交
  2. 25 7月, 2013 2 次提交
  3. 24 6月, 2013 2 次提交
    • S
      sh_eth: fix misreporting of transmit abort · 4eb313a7
      Sergei Shtylyov 提交于
      Due to obviously missing braces, EESR.TABT (transmit abort) interrupt may be
      reported even if it hasn't happened, just when EESR.TWB (transmit descriptor
      write-back) interrupt happens. Luckily (?), EESR.TWB is disabled by the driver
      via the TRIMD register and all the interrupt masks, so that transmit abort is
      never actually logged...
      
      Put the braces where they should be and fix the incoherent comment, while at it.
      Signed-off-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4eb313a7
    • S
      sh_eth: fix unhandled RFE interrupt · ca8c3585
      Sergei Shtylyov 提交于
      EESR.RFE (receive FIFO overflow) interrupt is enabled by the driver on all SoCs
      and sh_eth_error() handles it but it's not present in any initializer/assignment
      of the 'eesr_err_check' field of 'struct sh_eth_cpu_data'. This leads to that
      interrupt not being handled and cleared, and finally to disabling IRQ and the
      driver being non-functional.
      
      Modify DEFAULT_EESR_ERR_CHECK macro and all explicit initializers of the above
      mentioned field to contain the EESR.RFE bit. Remove useless backslashes from the
      initializers, while at it.
      Signed-off-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ca8c3585
  4. 20 6月, 2013 5 次提交
  5. 13 6月, 2013 3 次提交
  6. 11 6月, 2013 1 次提交
  7. 08 6月, 2013 9 次提交
  8. 07 6月, 2013 7 次提交
  9. 28 5月, 2013 1 次提交
  10. 18 5月, 2013 1 次提交
  11. 17 5月, 2013 1 次提交
  12. 01 5月, 2013 1 次提交
  13. 30 4月, 2013 1 次提交
  14. 20 4月, 2013 2 次提交
  15. 01 4月, 2013 3 次提交
    • S
      sh_eth: make 'link' field of 'struct sh_eth_private' *int* · 3340d2aa
      Sergei Shtylyov 提交于
      The 'link' field of 'struct sh_eth_private' has type 'enum phy_state' while the
      'link' field of 'struct phy_device' is merely *int* (having values 0 and 1) and
      the former field gets assigned from the latter. Make the field match, getting
      rid of incorrectly used PHY_DOWN value in assignments/comparisons.
      Signed-off-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3340d2aa
    • S
      sh_eth: workaround for spurious ECI interrupt · 3893b273
      Sergei Shtylyov 提交于
      At least on Renesas R8A7778, EESR.ECI interrupt seems to fire regardless of its
      mask in EESIPR register. I can 100% reproduce it with the following scenario:
      target is booted with 'ip=on' option, and so IP-Config opens SoC Ether device
      but doesn't get a proper reply and then succeeds with on-board SMC chip; then
      I login and try to bring up the SoC Ether device with 'ifconfig', and I get
      an ECI interrupt once request_irq() is called by sh_eth_open() (while interrupt
      mask in EESIPR register is all 0), if that interrupt is accompanied by a pending
      EESR.FRC (frame receive completion) interrupt, I get kernel oops in sh_eth_rx()
      because sh_eth_ring_init() hasn't been called yet!
      
      The solution I worked out is the following: in sh_eth_interrupt(), mask the
      interrupt status from EESR register with the interrupt mask from EESIPR register
      in order not to handle the disabled interrupts -- but forcing EESIPR.M_ECI bit
      in this mask set because we always need to fully handle EESR.ECI interrupt in
      sh_eth_error() in order to quench it (as it doesn't get cleared by just writing
      1 to the this bit as all the other interrupts).
      
      While at it, remove unneeded initializer for 'intr_status' variable and give it
      *unsigned long* type, matching the type of sh_eth_read()'s result; fix comment.
      Signed-off-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Reviewed-by: NMax Filippov <max.filippov@cogentembedded.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3893b273
    • S
      sh_eth: fix handling of no LINK signal · 1e1b812b
      Sergei Shtylyov 提交于
      The code handling the absent LINK signal (or the absent PSR register -- which
      reflects the state of this signal) is quite naive and has probably never really
      worked.  It's probably enough to say that this code is executed only on the LINK
      change interrupt (sic!) but even if we actually have the signal and choose to
      ignore it (it might be connected to PHY's link/activity LED output as on the
      Renesas BOCK-W board), sh_eth_adjust_link() on which this code relies to update
      'mdp->link' gets executed later than the LINK change interrupt where it is
      checked, and so RX/TX never get enabled via ECMR register.
      
      So, ignore the LINK changed interrupt iff LINK signal is absent (or just chosen
      not to be used) or PSR register is absent, and enable/disable RX/TX directly in
      sh_eth_adjust_link() in this case.
      Signed-off-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1e1b812b