1. 09 8月, 2014 1 次提交
  2. 03 8月, 2014 1 次提交
  3. 06 6月, 2014 6 次提交
    • A
      dm9000: avoid sleeping in dm9000_timeout callback · 58237983
      Andrew Ruder 提交于
      On the DM9000B, dm9000_msleep() is called during the dm9000_timeout()
      routine.  Since dm9000_timeout() holds the main spinlock through the
      entire routine, mdelay() needs to be used rather than msleep().
      Furthermore, the mutex_lock()/mutex_unlock() should be avoided so as to
      not sleep with spinlocks held.
      Signed-off-by: NAndrew Ruder <andrew.ruder@elecsyscorp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      58237983
    • A
      dm9000: handle initial link status · aac6d022
      Andrew Ruder 提交于
      On the DM9000A/DM9000B force the initial check of the link status.  The
      DM9000A/B has a link status changed event and this interrupt bit isn't
      always set out of reset when a cable is plugged in.  This results in the
      driver not seeing the cable attached link status until the cable is
      removed and plugged in again.
      Signed-off-by: NAndrew Ruder <andrew.ruder@elecsyscorp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      aac6d022
    • A
      dm9000: remove redundant ISR status clear · 36259012
      Andrew Ruder 提交于
      Since dm9000_interrupt() is already reading/clearing every set bit in
      DM9000_ISR, this additional clear in dm9000_rx() (which is only called
      by dm9000_interrupt()) is unnecessary and can be removed.
      Signed-off-by: NAndrew Ruder <andrew.ruder@elecsyscorp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      36259012
    • A
      dm9000: clean up edge-triggered irq compatibility · 17ad78de
      Andrew Ruder 提交于
      DM9000 uses level-triggered interrupts.  Some systems (PXA270) only
      support edge-triggered interrupts on GPIOs.  Some changes are necessary
      to ensure that interrupts are not triggered while the GPIO interrupt is
      masked or we will miss the interrupt forever.
      
      * Make some helper functions called dm9000_mask_interrupts() and
        dm9000_unmask_interrupts() for readability.
      
      * dm9000_init_dm9000(): ensure that this function always leaves interrupts
        masked regardless of the state when it entered the function.  This is
        primarily to support the situation in dm9000_open where the logic used
        to go:
      
          dm9000_open()
              dm9000_init_dm9000()
                  unmask interrupts
              request_irq()
      
        If an interrupt occurred between unmasking the interrupt and
        requesting the irq, it would be missed forever as the edge event would
        never be seen by the GPIO hardware in the PXA270.  This allows us to
        change the logic to:
      
          dm9000_open()
              dm9000_init_dm9000()
                  dm9000_mask_interrupts()
              request_irq()
              dm9000_unmask_interrupts()
      
      * dm9000_timeout(), dm9000_drv_resume(): Add the missing
        dm9000_unmask_interrupts() now required by the change above.
      
      * dm9000_shutdown(): Use mask helper function
      
      * dm9000_interrupt(): Use mask/unmask helper functions
      Signed-off-by: NAndrew Ruder <andrew.ruder@elecsyscorp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      17ad78de
    • A
      dm9000: clean up reset code · 751bb6fd
      Andrew Ruder 提交于
      * Change a hard-coded 0x3 to NCR_RST | NCR_MAC_LBK in dm9000_reset
      
      * Every single place where dm9000_init_dm9000 was ran, a dm9000_reset
        was called immediately before-hand.  Bring dm9000_reset into
        dm9000_init_dm9000.
      
      * The following commit updated the dm9000_probe reset routine to use NCR_RST
        | NCR_MAC_LBK:
      
          6741f40d DM9000B: driver initialization upgrade
      
        and a later commit added a bug-fix to always reset the chip twice:
      
          09ee9f87 dm9000: Implement full reset of DM9000 network device
      
        Unfortunately, since the changes in 6741f40d were made by replacing the
        dm9000_probe dm9000_reset with the adjusted iow(), the changes in
        09ee9f87 were not incorporated into the dm9000_probe reset.
        Furthermore, it bypassed the requisite reset-delay causing some boards
        to get at least one "read wrong id ..." dev_err message during
        dm9000_probe.
      Signed-off-by: NAndrew Ruder <andrew.ruder@elecsyscorp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      751bb6fd
    • A
      dm9000: acquire irq flags from device tree · 6b50d038
      Andrew Ruder 提交于
      The DM9000 supports both active high interrupts and active low interrupts.
      This is configured via the attached EEPROM.  In the device-tree case, make sure
      that the DM9000 driver passes the correct flags to request_irq.
      Signed-off-by: NAndrew Ruder <andrew.ruder@elecsyscorp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6b50d038
  4. 25 3月, 2014 1 次提交
  5. 17 1月, 2014 2 次提交
    • B
      dm9000: fix a lot of checkpatch issues · 5b22721d
      Barry Song 提交于
      recently, dm9000 codes have many checkpatch errors and warnings:
      
      WARNING: please, no space before tabs
      3: FILE: dm9000.c:3:
      + * ^ICopyright (C) 1997  Sten Wang$
      
      WARNING: please, no space before tabs
      5: FILE: dm9000.c:5:
      + * ^IThis program is free software; you can redistribute it and/or$
      
      WARNING: please, no space before tabs
      6: FILE: dm9000.c:6:
      + * ^Imodify it under the terms of the GNU General Public License$
      
      WARNING: please, no space before tabs
      7: FILE: dm9000.c:7:
      + * ^Ias published by the Free Software Foundation; either version 2$
      
      WARNING: please, no space before tabs
      8: FILE: dm9000.c:8:
      + * ^Iof the License, or (at your option) any later version.$
      
      WARNING: please, no space before tabs
      10: FILE: dm9000.c:10:
      + * ^IThis program is distributed in the hope that it will be useful,$
      
      WARNING: please, no space before tabs
      11: FILE: dm9000.c:11:
      + * ^Ibut WITHOUT ANY WARRANTY; without even the implied warranty of$
      
      WARNING: please, no space before tabs
      12: FILE: dm9000.c:12:
      + * ^IMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the$
      
      WARNING: please, no space before tabs
      13: FILE: dm9000.c:13:
      + * ^IGNU General Public License for more details.$
      
      WARNING: do not add new typedefs
      97: FILE: dm9000.c:97:
      +typedef struct board_info {
      
      ERROR: spaces prohibited around that ':' (ctx:WxV)
      113: FILE: dm9000.c:113:
      +	unsigned int	in_suspend :1;
       	            	           ^
      
      ERROR: spaces prohibited around that ':' (ctx:WxV)
      114: FILE: dm9000.c:114:
      +	unsigned int	wake_supported :1;
       	            	               ^
      
      This patch fixes important errors in it.
      Signed-off-by: NBarry Song <Baohua.Song@csr.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5b22721d
    • P
      drivers/net: delete non-required instances of include <linux/init.h> · a81ab36b
      Paul Gortmaker 提交于
      None of these files are actually using any __init type directives
      and hence don't need to include <linux/init.h>.   Most are just a
      left over from __devinit and __cpuinit removal, or simply due to
      code getting copied from one driver to the next.
      
      This covers everything under drivers/net except for wireless, which
      has been submitted separately.
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a81ab36b
  6. 18 10月, 2013 4 次提交
  7. 03 10月, 2013 1 次提交
  8. 31 8月, 2013 1 次提交
  9. 28 5月, 2013 1 次提交
  10. 21 5月, 2013 1 次提交
  11. 18 5月, 2013 1 次提交
  12. 01 4月, 2013 1 次提交
    • J
      DM9000B: driver initialization upgrade · 6741f40d
      Joseph CHANG 提交于
      Fix bug for DM9000 revision B which contain a DSP PHY
      
      DM9000B use DSP PHY instead previouse DM9000 revisions' analog PHY,
      So need extra change in initialization, For
      explicity PHY Reset and PHY init parameter, and
      first DM9000_NCR reset need NCR_MAC_LBK bit by dm9000_probe().
      
      Following DM9000_NCR reset cause by dm9000_open() clear the
      NCR_MAC_LBK bit.
      
      Without this fix, Power-up FIFO pointers error happen around 2%
      rate among Davicom's customers' boards. With this fix, All above
      cases can be solved.
      Signed-off-by: NJoseph CHANG <josright123@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6741f40d
  13. 19 3月, 2013 1 次提交
  14. 07 1月, 2013 1 次提交
  15. 11 12月, 2012 1 次提交
    • M
      net: dm9000: use io{read,write}*_rep accessors · daadaf6f
      Matthew Leach 提交于
      The {read,write}s{b,w,l} operations are not defined by all
      architectures and are being removed from the asm-generic/io.h
      interface.
      
      This patch replaces the usage of these string functions in the default
      DM9000 accessors with io{read,write}{8,16,32}_rep calls instead. This
      is required as the dm9000 driver is in use by the blackfin
      architecture which uses the asm-generic io accessors.
      
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Ben Herrenschmidt <benh@kernel.crashing.org>
      Cc: David Miller <davem@davemloft.net>
      Cc: netdev@vger.kernel.org
      Signed-off-by: NMatthew Leach <matthew@mattleach.net>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      daadaf6f
  16. 04 12月, 2012 1 次提交
  17. 16 2月, 2012 1 次提交
  18. 07 2月, 2012 1 次提交
  19. 01 2月, 2012 1 次提交
  20. 27 11月, 2011 1 次提交
  21. 17 11月, 2011 1 次提交
  22. 21 8月, 2011 1 次提交
  23. 18 8月, 2011 1 次提交
  24. 13 8月, 2011 1 次提交
  25. 12 6月, 2011 1 次提交
  26. 07 6月, 2011 1 次提交
  27. 02 6月, 2011 1 次提交
    • M
      net: dm9000: Get the chip in a known good state before enabling interrupts · 6979d5dd
      Mark Brown 提交于
      Currently the DM9000 driver requests the primary interrupt before it
      resets the chip and puts it into a known good state. This means that if
      the chip is asserting interrupt for some reason we can end up with a
      screaming IRQ that the interrupt handler is unable to deal with. Avoid
      this by only requesting the interrupt after we've reset the chip so we
      know what state it's in.
      
      This started manifesting itself on one of my boards in the past month or
      so, I suspect as a result of some core infrastructure changes removing
      some form of mitigation against bad behaviour here, even when things boot
      it seems that the new code brings the interface up more quickly.
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6979d5dd
  28. 19 4月, 2011 1 次提交
  29. 16 4月, 2011 1 次提交
  30. 29 3月, 2011 1 次提交
  31. 01 3月, 2011 1 次提交