1. 17 8月, 2008 3 次提交
  2. 21 7月, 2008 2 次提交
    • M
      r8169: avoid thrashing PCI conf space above RTL_GIGA_MAC_VER_06 · 77332894
      Marcus Sundberg 提交于
      The magic write to register 0x82 will often cause PCI config space on
      my 8168 (PCI ID 10ec:8168, revision 2. mounted in an LG P300 laptop)
      to be filled with ones during driver load, and thus breaking NIC
      operation until reboot. If it does not happen on first driver load it
      can easily be reproduced by unloading and loading the driver a few
      times.
      
      The magic write was added long ago by this commit:
      
      Author: François Romieu <romieu@fr.zoreil.com>
      Date:   Sat Jan 10 06:00:46 2004 -0500
      
           [netdrvr r8169] Merge of changes done by Realtek to rtl8169_init_one():
           - phy capability settings allows lower or equal capability as suggested
             in Realtek's changes;
           - I/O voodoo;
           - no need to s/mdio_write/RTL8169_WRITE_GMII_REG/;
           - s/rtl8169_hw_PHY_config/rtl8169_hw_phy_config/;
           - rtl8169_hw_phy_config(): ad-hoc struct "phy_magic" to limit duplication
             of code (yep, the u16 -> int conversions should work as expected);
           - variable renames and whitepace changes ignored.
      
      As the 8168 wasn't supported by that version this patch simply removes
      the bogus write from mac versions <= RTL_GIGA_MAC_VER_06.
      
      [The change above makes sense for the 8101/8102 too -- Ueimor]
      Signed-off-by: NMarcus Sundberg <marcus@ingate.com>
      Signed-off-by: NFrancois Romieu <romieu@fr.zoreil.com>
      77332894
    • F
      r8169: multicast register update · f887cce8
      Francois Romieu 提交于
      The layout of the 8101 series is identical to that of the 8168 one,
      thus allowing to pack everything not 8169 related above MAC_VER_06.
      New 810x and 8168 chipsets should automagically behave correctly.
      
      It matches code in Realtek's 1.008.00 8101 and 8.007.00 8168 drivers.
      Signed-off-by: NFrancois Romieu <romieu@fr.zoreil.com>
      f887cce8
  3. 29 6月, 2008 2 次提交
  4. 18 4月, 2008 2 次提交
  5. 13 1月, 2008 1 次提交
  6. 09 1月, 2008 1 次提交
    • D
      [NET]: Fix drivers to handle napi_disable() disabling interrupts. · d1d08d12
      David S. Miller 提交于
      When we add the generic napi_disable_pending() breakout
      logic to net_rx_action() it means that napi_disable()
      can cause NAPI poll interrupt events to be disabled.
      
      And this is exactly what we want.  If a napi_disable()
      is pending, and we are looping in the ->poll(), we want
      ->poll() event interrupts to stay disabled and we want
      to complete the NAPI poll ASAP.
      
      When ->poll() break out during device down was being handled on a
      per-driver basis, often these drivers would turn interrupts back on
      when '!netif_running()' was detected.
      
      And this would just cause a reschedule of the NAPI ->poll() in the
      interrupt handler before the napi_disable() could get in there and
      grab the NAPI_STATE_SCHED bit.
      
      The vast majority of drivers don't care if napi_disable() might have
      the side effect of disabling NAPI ->poll() event interrupts.  In all
      such cases, when a napi_disable() is performed, the driver just
      disabled interrupts or is about to.
      
      However there were three exceptions to this in PCNET32, R8169, and
      SKY2.  To fix those cases, at the subsequent napi_enable() points, I
      added code to ensure that the ->poll() interrupt events are enabled in
      the hardware.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      Acked-by: NDon Fry <pcnet32@verizon.net>
      d1d08d12
  7. 23 12月, 2007 1 次提交
  8. 10 11月, 2007 5 次提交
  9. 29 10月, 2007 2 次提交
  10. 19 10月, 2007 13 次提交
  11. 11 10月, 2007 5 次提交
    • A
      r8169: endianness · b1eab701
      Al Viro 提交于
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      b1eab701
    • J
      [netdrvr] Stop using legacy hooks ->self_test_count, ->get_stats_count · b9f2c044
      Jeff Garzik 提交于
      These have been superceded by the new ->get_sset_count() hook.
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b9f2c044
    • J
      [ETHTOOL] Provide default behaviors for a few ethtool sub-ioctls · 88d3aafd
      Jeff Garzik 提交于
      For the operations
      	get-tx-csum
      	get-sg
      	get-tso
      	get-ufo
      the default ethtool_op_xxx behavior is fine for all drivers, so we
      permit op==NULL to imply the default behavior.
      
      This provides a more uniform behavior across all drivers, eliminating
      ethtool(8) "ioctl not supported" errors on older drivers that had
      not been updated for the latest sub-ioctls.
      
      The ethtool_op_xxx() functions are left exported, in case anyone
      wishes to call them directly from a driver-private implementation --
      a not-uncommon case.  Should an ethtool_op_xxx() helper remain unused
      for a while, except by net/core/ethtool.c, we can un-export it at a
      later date.
      
      [ Resolved conflicts with set/get value ethtool patch... -DaveM ]
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      88d3aafd
    • R
      [NET]: Nuke SET_MODULE_OWNER macro. · 10d024c1
      Ralf Baechle 提交于
      It's been a useless no-op for long enough in 2.6 so I figured it's time to
      remove it.  The number of people that could object because they're
      maintaining unified 2.4 and 2.6 drivers is probably rather small.
      
      [ Handled drivers added by netdev tree and some missed IRDA cases... -DaveM ]
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      10d024c1
    • 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. 06 10月, 2007 1 次提交
    • F
      r8169: revert part of 6dccd16b · c946b304
      Francois Romieu 提交于
      The 8169/8110SC currently announces itself as:
      [...]
      eth0: RTL8169sc/8110sc at 0x........, ..:..:..:..:..:.., XID 18000000 IRQ ..
                                                                   ^^^^^^^^
      It uses RTL_GIGA_MAC_VER_05 and this part of the changeset can cut
      its performance by a factor of 2~2.5 as reported by Timo.
      
      (the driver includes code just before the hunk to write the ChipCmd
      register when mac_version == RTL_GIGA_MAC_VER_0[1-4])
      Signed-off-by: NFrancois Romieu <romieu@fr.zoreil.com>
      Cc: Timo Jantunen <jeti@welho.com>
      Signed-off-by: NJeff Garzik <jeff@garzik.org>
      c946b304
  13. 20 9月, 2007 2 次提交