1. 30 10月, 2013 1 次提交
    • M
      MIPS: DECstation I/O ASIC DMA interrupt classes · 0fabe102
      Maciej W. Rozycki 提交于
      This change complements commits d0da7c002f7b2a93582187a9e3f73891a01d8ee4
      [MIPS: DEC: Convert to new irq_chip functions] and
      5359b938 [MIPS: DECstation I/O ASIC DMA
      interrupt handling fix] and implements automatic handling of the two
      classes of DMA interrupts the I/O ASIC implements, informational and
      errors.
      
      Informational DMA interrupts do not stop the transfer and use the
      `handle_edge_irq' handler that clears the request right away so that
      another request may be recorded while the previous is being handled.
      
      DMA error interrupts stop the transfer and require a corrective action
      before DMA can be reenabled.  Therefore they use the `handle_fasteoi_irq'
      handler that only clears the request on the way out.  Because MIPS
      processor interrupt inputs, one of which the I/O ASIC's interrupt
      controller is cascaded to, are level-triggered it is recommended that
      error DMA interrupt action handlers are registered with the IRQF_ONESHOT
      flag set so that they are run with the interrupt line masked.
      
      This change removes the export of clear_ioasic_dma_irq that now does not
      have to be called by device drivers to clear interrupts explicitly
      anymore.  Originally these interrupts were cleared in the .end handler of
      the `irq_chip' structure, before it was removed.
      Signed-off-by: NMaciej W. Rozycki <macro@linux-mips.org>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/5874/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      0fabe102
  2. 13 9月, 2013 1 次提交
    • M
      MIPS: DECstation I/O ASIC DMA interrupt handling fix · 5359b938
      Maciej W. Rozycki 提交于
      This change complements commit d0da7c002f7b2a93582187a9e3f73891a01d8ee4
      and brings clear_ioasic_irq back, renaming it to clear_ioasic_dma_irq at
      the same time, to make I/O ASIC DMA interrupts functional.
      
      Unlike ordinary I/O ASIC interrupts DMA interrupts need to be deasserted
      by software by writing 0 to the respective bit in I/O ASIC's System
      Interrupt Register (SIR), similarly to how CP0.Cause.IP0 and CP0.Cause.IP1
      bits are handled in the CPU (the difference is SIR DMA interrupt bits are
      R/W0C so there's no need for an RMW cycle).  Otherwise the handler is
      reentered over and over again.
      
      The only current user is the DEC LANCE Ethernet driver and its extremely
      uncommon DMA memory error handler that does not care when exactly the
      interrupt is cleared.  Anticipating the use of DMA interrupts by the Zilog
      SCC driver this change however exports clear_ioasic_dma_irq for device
      drivers to choose the right application-specific sequence to clear the
      request explicitly rather than calling it implicitly in the .irq_eoi
      handler of `struct irq_chip'.  Previously these interrupts were cleared in
      the .end handler of the said structure, before it was removed.
      Signed-off-by: NMaciej W. Rozycki <macro@linux-mips.org>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/5826/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      5359b938
  3. 10 3月, 2013 1 次提交
  4. 04 12月, 2012 1 次提交
  5. 07 6月, 2012 1 次提交
    • J
      ethernet: Remove casts to same type · 64699336
      Joe Perches 提交于
      Adding casts of objects to the same type is unnecessary
      and confusing for a human reader.
      
      For example, this cast:
      
              int y;
              int *p = (int *)&y;
      
      I used the coccinelle script below to find and remove these
      unnecessary casts.  I manually removed the conversions this
      script produces of casts with __force, __iomem and __user.
      
      @@
      type T;
      T *p;
      @@
      
      -       (T *)p
      +       p
      
      A function in atl1e_main.c was passed a const pointer
      when it actually modified elements of the structure.
      
      Change the argument to a non-const pointer.
      
      A function in stmmac needed a __force to avoid a sparse
      warning.  Added it.
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      64699336
  6. 29 3月, 2012 1 次提交
  7. 07 2月, 2012 1 次提交
  8. 01 2月, 2012 1 次提交
  9. 18 8月, 2011 1 次提交
  10. 11 8月, 2011 1 次提交
    • J
      amd: Move AMD (Lance) chipset drivers · b955f6ca
      Jeff Kirsher 提交于
      Moves the drivers for the AMD chipsets into drivers/net/ethernet/amd/
      and the necessary Kconfig and Makfile changes.
      
      The au1000 (Alchemy) driver was also moved into the same directory
      even though it is not a "Lance" driver.
      
      CC: Peter Maydell <pmaydell@chiark.greenend.org.uk>
      CC: Roman Hodek <Roman.Hodek@informatik.uni-erlangen.de>
      CC: "Maciej W. Rozycki" <macro@linux-mips.org>
      CC: Donald Becker <becker@scyld.com>
      CC: Sam Creasey <sammy@users.qual.net>
      CC: Miguel de Icaza <miguel@nuclecu.unam.mx>
      CC: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
      CC: Don Fry <pcnet32@frontier.com>
      CC: Geert Uytterhoeven <geert@linux-m68k.org>
      CC: Russell King <linux@arm.linux.org.uk>
      CC: David Davies <davies@maniac.ultranet.com>
      CC: "M.Hipp" <hippm@informatik.uni-tuebingen.de>
      CC: Pete Popov <ppopov@embeddedalley.com>
      CC: David Hinds <dahinds@users.sourceforge.net>
      CC: "Roger C. Pao" <rpao@paonet.org>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      b955f6ca
  11. 09 7月, 2011 1 次提交
  12. 22 6月, 2011 1 次提交
  13. 26 8月, 2010 1 次提交
  14. 27 7月, 2010 1 次提交
    • R
      NET: declance: Fix section mismatches · 3852cc33
      Ralf Baechle 提交于
      WARNING: drivers/net/built-in.o(.data+0x24): Section mismatch in reference from
      the variable dec_lance_tc_driver to the function .init.text:dec_lance_tc_probe()
      The variable dec_lance_tc_driver references
      the function __init dec_lance_tc_probe()
      If the reference is valid then annotate the
      variable with __init* or __refdata (see linux/init.h) or name the variable:
      *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,
      
      Fixing this one results in a new mismatch:
      
      WARNING: drivers/net/built-in.o(.devinit.text+0x14): Section mismatch in reference from the function dec_lance_tc_probe() to the function .init.text:dec_lance_probe()
      The function __devinit dec_lance_tc_probe() references
      a function __init dec_lance_probe().
      If dec_lance_probe is only used by dec_lance_tc_probe then
      annotate dec_lance_probe with a matching annotation.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      3852cc33
  15. 14 5月, 2010 1 次提交
    • J
      drivers/net: Remove unnecessary returns from void function()s · a4b77097
      Joe Perches 提交于
      This patch removes from drivers/net/ all the unnecessary
      return; statements that precede the last closing brace of
      void functions.
      
      It does not remove the returns that are immediately
      preceded by a label as gcc doesn't like that.
      
      It also does not remove null void functions with return.
      
      Done via:
      $ grep -rP --include=*.[ch] -l "return;\n}" net/ | \
        xargs perl -i -e 'local $/ ; while (<>) { s/\n[ \t\n]+return;\n}/\n}/g; print; }'
      
      with some cleanups by hand.
      
      Compile tested x86 allmodconfig only.
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a4b77097
  16. 10 5月, 2010 1 次提交
  17. 04 4月, 2010 1 次提交
    • J
      net: convert multicast list to list_head · 22bedad3
      Jiri Pirko 提交于
      Converts the list and the core manipulating with it to be the same as uc_list.
      
      +uses two functions for adding/removing mc address (normal and "global"
       variant) instead of a function parameter.
      +removes dev_mcast.c completely.
      +exposes netdev_hw_addr_list_* macros along with __hw_addr_* functions for
       manipulation with lists on a sandbox (used in bonding and 80211 drivers)
      Signed-off-by: NJiri Pirko <jpirko@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      22bedad3
  18. 18 2月, 2010 1 次提交
  19. 13 2月, 2010 1 次提交
  20. 19 11月, 2009 1 次提交
  21. 06 7月, 2009 1 次提交
  22. 08 6月, 2009 1 次提交
    • M
      declance: Restore tx descriptor ring locking · 963267bc
      Maciej W. Rozycki 提交于
      A driver overhaul on 29 Feb 2000 (!) broke locking around fiddling with 
      the tx descriptor ring in start_xmit(); a follow-on "fix" removed the 
      broken remnants altogether.  Here's a patch to restore proper locking in 
      the function -- the complement in the interrupt handler has been correct 
      all the time.
      
       This *may* have been the reason for the occasional confusion of the chip 
      -- triggering a tx timeout followed by a chip reset sequence -- seen on 
      R4k-based DECstations with the onboard Ethernet interface.  Another theory 
      is the confusion is due to an unindentified problem -- perhaps a silicon 
      erratum -- associated with the variation of the MT ASIC used to interface 
      the R4k CPU to the rest of the system on these computers; with its 
      aggressive write-back buffering the design is particularly weakly ordered 
      when it comes to MMIO (in the absence of ordering barriers uncached reads 
      are allowed to bypass earlier uncached writes, even if to the same 
      location), which may trigger all kinds of corner cases in peripheral 
      hardware as well as software.
      
      Either way this piece of code is buggy.
      Signed-off-by: NMaciej W. Rozycki <macro@linux-mips.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      963267bc
  23. 15 4月, 2009 1 次提交
  24. 25 3月, 2009 1 次提交
  25. 27 1月, 2009 1 次提交
  26. 13 11月, 2008 1 次提交
    • W
      netdevice: safe convert to netdev_priv() #part-2 · 4cf1653a
      Wang Chen 提交于
      We have some reasons to kill netdev->priv:
      1. netdev->priv is equal to netdev_priv().
      2. netdev_priv() wraps the calculation of netdev->priv's offset, obviously
         netdev_priv() is more flexible than netdev->priv.
      But we cann't kill netdev->priv, because so many drivers reference to it
      directly.
      
      This patch is a safe convert for netdev->priv to netdev_priv(netdev).
      Since all of the netdev->priv is only for read.
      But it is too big to be sent in one mail.
      I split it to 4 parts and make every part smaller than 100,000 bytes,
      which is max size allowed by vger.
      Signed-off-by: NWang Chen <wangchen@cn.fujitsu.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4cf1653a
  27. 04 11月, 2008 1 次提交
  28. 28 10月, 2008 1 次提交
  29. 12 6月, 2008 1 次提交
  30. 29 1月, 2008 1 次提交
    • J
      [netdrvr] irq handler minor cleanups in several drivers · 28fc1f5a
      Jeff Garzik 提交于
      * use irq_handler_t where appropriate
      
      * no need to use 'irq' function arg, its already stored in a data struct
      
      * rename irq handler 'irq' argument to 'dummy', where the function
        has been analyzed and proven not to use its first argument.
      
      * remove always-false "dev_id == NULL" test from irq handlers
      
      * remove pointless casts from void*
      
      * declance: irq argument is not const
      
      * add KERN_xxx printk prefix
      
      * fix minor whitespace weirdness
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      28fc1f5a
  31. 11 10月, 2007 2 次提交
  32. 22 5月, 2007 1 次提交
  33. 26 4月, 2007 1 次提交
  34. 08 2月, 2007 1 次提交
  35. 05 12月, 2006 2 次提交
  36. 07 10月, 2006 1 次提交
  37. 05 10月, 2006 1 次提交
    • D
      IRQ: Maintain regs pointer globally rather than passing to IRQ handlers · 7d12e780
      David Howells 提交于
      Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
      of passing regs around manually through all ~1800 interrupt handlers in the
      Linux kernel.
      
      The regs pointer is used in few places, but it potentially costs both stack
      space and code to pass it around.  On the FRV arch, removing the regs parameter
      from all the genirq function results in a 20% speed up of the IRQ exit path
      (ie: from leaving timer_interrupt() to leaving do_IRQ()).
      
      Where appropriate, an arch may override the generic storage facility and do
      something different with the variable.  On FRV, for instance, the address is
      maintained in GR28 at all times inside the kernel as part of general exception
      handling.
      
      Having looked over the code, it appears that the parameter may be handed down
      through up to twenty or so layers of functions.  Consider a USB character
      device attached to a USB hub, attached to a USB controller that posts its
      interrupts through a cascaded auxiliary interrupt controller.  A character
      device driver may want to pass regs to the sysrq handler through the input
      layer which adds another few layers of parameter passing.
      
      I've build this code with allyesconfig for x86_64 and i386.  I've runtested the
      main part of the code on FRV and i386, though I can't test most of the drivers.
      I've also done partial conversion for powerpc and MIPS - these at least compile
      with minimal configurations.
      
      This will affect all archs.  Mostly the changes should be relatively easy.
      Take do_IRQ(), store the regs pointer at the beginning, saving the old one:
      
      	struct pt_regs *old_regs = set_irq_regs(regs);
      
      And put the old one back at the end:
      
      	set_irq_regs(old_regs);
      
      Don't pass regs through to generic_handle_irq() or __do_IRQ().
      
      In timer_interrupt(), this sort of change will be necessary:
      
      	-	update_process_times(user_mode(regs));
      	-	profile_tick(CPU_PROFILING, regs);
      	+	update_process_times(user_mode(get_irq_regs()));
      	+	profile_tick(CPU_PROFILING);
      
      I'd like to move update_process_times()'s use of get_irq_regs() into itself,
      except that i386, alone of the archs, uses something other than user_mode().
      
      Some notes on the interrupt handling in the drivers:
      
       (*) input_dev() is now gone entirely.  The regs pointer is no longer stored in
           the input_dev struct.
      
       (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking.  It does
           something different depending on whether it's been supplied with a regs
           pointer or not.
      
       (*) Various IRQ handler function pointers have been moved to type
           irq_handler_t.
      Signed-Off-By: NDavid Howells <dhowells@redhat.com>
      (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
      7d12e780
  38. 14 9月, 2006 1 次提交