1. 09 1月, 2017 1 次提交
  2. 18 10月, 2016 1 次提交
    • J
      ethernet: use core min/max MTU checking · 44770e11
      Jarod Wilson 提交于
      et131x: min_mtu 64, max_mtu 9216
      
      altera_tse: min_mtu 64, max_mtu 1500
      
      amd8111e: min_mtu 60, max_mtu 9000
      
      bnad: min_mtu 46, max_mtu 9000
      
      macb: min_mtu 68, max_mtu 1500 or 10240 depending on hardware capability
      
      xgmac: min_mtu 46, max_mtu 9000
      
      cxgb2: min_mtu 68, max_mtu 9582 (pm3393) or 9600 (vsc7326)
      
      enic: min_mtu 68, max_mtu 9000
      
      gianfar: min_mtu 50, max_mu 9586
      
      hns_enet: min_mtu 68, max_mtu 9578 (v1) or 9706 (v2)
      
      ksz884x: min_mtu 60, max_mtu 1894
      
      myri10ge: min_mtu 68, max_mtu 9000
      
      natsemi: min_mtu 64, max_mtu 2024
      
      nfp: min_mtu 68, max_mtu hardware-specific
      
      forcedeth: min_mtu 64, max_mtu 1500 or 9100, depending on hardware
      
      pch_gbe: min_mtu 46, max_mtu 10300
      
      pasemi_mac: min_mtu 64, max_mtu 9000
      
      qcaspi: min_mtu 46, max_mtu 1500
      - remove qcaspi_netdev_change_mtu as it is now redundant
      
      rocker: min_mtu 68, max_mtu 9000
      
      sxgbe: min_mtu 68, max_mtu 9000
      
      stmmac: min_mtu 46, max_mtu depends on hardware
      
      tehuti: min_mtu 60, max_mtu 16384
      - driver had no max mtu checking, but product docs say 16k jumbo packets
        are supported by the hardware
      
      netcp: min_mtu 68, max_mtu 9486
      - remove netcp_ndo_change_mtu as it is now redundant
      
      via-velocity: min_mtu 64, max_mtu 9000
      
      octeon: min_mtu 46, max_mtu 65370
      
      CC: netdev@vger.kernel.org
      CC: Mark Einon <mark.einon@gmail.com>
      CC: Vince Bridgers <vbridger@opensource.altera.com>
      CC: Rasesh Mody <rasesh.mody@qlogic.com>
      CC: Nicolas Ferre <nicolas.ferre@atmel.com>
      CC: Santosh Raspatur <santosh@chelsio.com>
      CC: Hariprasad S <hariprasad@chelsio.com>
      CC:  Christian Benvenuti <benve@cisco.com>
      CC: Sujith Sankar <ssujith@cisco.com>
      CC: Govindarajulu Varadarajan <_govind@gmx.com>
      CC: Neel Patel <neepatel@cisco.com>
      CC: Claudiu Manoil <claudiu.manoil@freescale.com>
      CC: Yisen Zhuang <yisen.zhuang@huawei.com>
      CC: Salil Mehta <salil.mehta@huawei.com>
      CC: Hyong-Youb Kim <hykim@myri.com>
      CC: Jakub Kicinski <jakub.kicinski@netronome.com>
      CC: Olof Johansson <olof@lixom.net>
      CC: Jiri Pirko <jiri@resnulli.us>
      CC: Byungho An <bh74.an@samsung.com>
      CC: Girish K S <ks.giri@samsung.com>
      CC: Vipul Pandya <vipul.pandya@samsung.com>
      CC: Giuseppe Cavallaro <peppe.cavallaro@st.com>
      CC: Alexandre Torgue <alexandre.torgue@st.com>
      CC: Andy Gospodarek <andy@greyhouse.net>
      CC: Wingman Kwok <w-kwok2@ti.com>
      CC: Murali Karicheri <m-karicheri2@ti.com>
      CC: Francois Romieu <romieu@fr.zoreil.com>
      Signed-off-by: NJarod Wilson <jarod@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      44770e11
  3. 26 2月, 2016 1 次提交
  4. 28 10月, 2015 1 次提交
    • N
      forcedeth: fix unilateral interrupt disabling in netpoll path · 0b7c8743
      Neil Horman 提交于
      Forcedeth currently uses disable_irq_lockdep and enable_irq_lockdep, which in
      some configurations simply calls local_irq_disable.  This causes errant warnings
      in the netpoll path as in netpoll_send_skb_on_dev, where we disable irqs using
      local_irq_save, leading to the following warning:
      
      WARNING: at net/core/netpoll.c:352 netpoll_send_skb_on_dev+0x243/0x250() (Not
      tainted)
      Hardware name:
      netpoll_send_skb_on_dev(): eth0 enabled interrupts in poll
      (nv_start_xmit_optimized+0x0/0x860 [forcedeth])
      Modules linked in: netconsole(+) configfs ipv6 iptable_filter ip_tables ppdev
      parport_pc parport sg microcode serio_raw edac_core edac_mce_amd k8temp
      snd_hda_codec_realtek snd_hda_codec_generic forcedeth snd_hda_intel
      snd_hda_codec snd_hwdep snd_seq snd_seq_device snd_pcm snd_timer snd soundcore
      snd_page_alloc i2c_nforce2 i2c_core shpchp ext4 jbd2 mbcache sr_mod cdrom sd_mod
      crc_t10dif pata_amd ata_generic pata_acpi sata_nv dm_mirror dm_region_hash
      dm_log dm_mod [last unloaded: scsi_wait_scan]
      Pid: 1940, comm: modprobe Not tainted 2.6.32-573.7.1.el6.x86_64.debug #1
      Call Trace:
       [<ffffffff8107bbc1>] ? warn_slowpath_common+0x91/0xe0
       [<ffffffff8107bcc6>] ? warn_slowpath_fmt+0x46/0x60
       [<ffffffffa00fe5b0>] ? nv_start_xmit_optimized+0x0/0x860 [forcedeth]
       [<ffffffff814b3593>] ? netpoll_send_skb_on_dev+0x243/0x250
       [<ffffffff814b37c9>] ? netpoll_send_udp+0x229/0x270
       [<ffffffffa02e3299>] ? write_msg+0x39/0x110 [netconsole]
       [<ffffffffa02e331b>] ? write_msg+0xbb/0x110 [netconsole]
       [<ffffffff8107bd55>] ? __call_console_drivers+0x75/0x90
       [<ffffffff8107bdba>] ? _call_console_drivers+0x4a/0x80
       [<ffffffff8107c445>] ? release_console_sem+0xe5/0x250
       [<ffffffff8107d200>] ? register_console+0x190/0x3e0
       [<ffffffffa02e71a6>] ? init_netconsole+0x1a6/0x216 [netconsole]
       [<ffffffffa02e7000>] ? init_netconsole+0x0/0x216 [netconsole]
       [<ffffffff810020d0>] ? do_one_initcall+0xc0/0x280
       [<ffffffff810d4933>] ? sys_init_module+0xe3/0x260
       [<ffffffff8100b0d2>] ? system_call_fastpath+0x16/0x1b
      ---[ end trace f349c7af88e6a6d5 ]---
      console [netcon0] enabled
      netconsole: network logging started
      
      Fix it by modifying the forcedeth code to use
      disable_irq_nosync_lockdep_irqsavedisable_irq_nosync_lockdep_irqsave instead,
      which saves and restores irq state properly.  This also saves us a little code
      in the process
      
      Tested by the reporter, with successful restuls
      
      Patch applies to the head of the net tree
      Signed-off-by: NNeil Horman <nhorman@tuxdriver.com>
      CC: "David S. Miller" <davem@davemloft.net>
      Reported-by: NVasily Averin <vvs@sw.ru>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0b7c8743
  5. 14 1月, 2015 1 次提交
  6. 03 9月, 2014 1 次提交
  7. 13 8月, 2014 1 次提交
  8. 07 6月, 2014 1 次提交
  9. 05 6月, 2014 1 次提交
  10. 14 5月, 2014 1 次提交
  11. 25 3月, 2014 1 次提交
  12. 15 3月, 2014 1 次提交
  13. 19 2月, 2014 3 次提交
  14. 17 1月, 2014 1 次提交
  15. 10 12月, 2013 1 次提交
  16. 07 12月, 2013 1 次提交
    • J
      ethernet: Fix FSF address in file headers · 0ab75ae8
      Jeff Kirsher 提交于
      Several files refer to an old address for the Free Software Foundation
      in the file header comment.  Resolve by replacing the address with
      the URL <http://www.gnu.org/licenses/> so that we do not have to keep
      updating the header comments anytime the address changes.
      
      CC: Santosh Raspatur <santosh@chelsio.com>
      CC: Dimitris Michailidis <dm@chelsio.com>
      CC: Michael Chan <mchan@broadcom.com>
      CC: Santiago Leon <santil@linux.vnet.ibm.com>
      CC: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
      CC: Olof Johansson <olof@lixom.net>
      CC: Manish Chopra <manish.chopra@qlogic.com>
      CC: Sony Chacko <sony.chacko@qlogic.com>
      CC: Rajesh Borundia <rajesh.borundia@qlogic.com>
      CC: Nicolas Pitre <nico@fluxnic.net>
      CC: Steve Glendinning <steve.glendinning@shawell.net>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0ab75ae8
  17. 06 12月, 2013 1 次提交
  18. 06 11月, 2013 1 次提交
    • J
      net: Explicitly initialize u64_stats_sync structures for lockdep · 827da44c
      John Stultz 提交于
      In order to enable lockdep on seqcount/seqlock structures, we
      must explicitly initialize any locks.
      
      The u64_stats_sync structure, uses a seqcount, and thus we need
      to introduce a u64_stats_init() function and use it to initialize
      the structure.
      
      This unfortunately adds a lot of fairly trivial initialization code
      to a number of drivers. But the benefit of ensuring correctness makes
      this worth while.
      
      Because these changes are required for lockdep to be enabled, and the
      changes are quite trivial, I've not yet split this patch out into 30-some
      separate patches, as I figured it would be better to get the various
      maintainers thoughts on how to best merge this change along with
      the seqcount lockdep enablement.
      
      Feedback would be appreciated!
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      Acked-by: NJulian Anastasov <ja@ssi.bg>
      Signed-off-by: NPeter Zijlstra <peterz@infradead.org>
      Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
      Cc: James Morris <jmorris@namei.org>
      Cc: Jesse Gross <jesse@nicira.com>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Mirko Lindner <mlindner@marvell.com>
      Cc: Patrick McHardy <kaber@trash.net>
      Cc: Roger Luethi <rl@hellgate.ch>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Simon Horman <horms@verge.net.au>
      Cc: Stephen Hemminger <stephen@networkplumber.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Cc: Wensong Zhang <wensong@linux-vs.org>
      Cc: netdev@vger.kernel.org
      Link: http://lkml.kernel.org/r/1381186321-4906-2-git-send-email-john.stultz@linaro.orgSigned-off-by: NIngo Molnar <mingo@kernel.org>
      827da44c
  19. 23 5月, 2013 1 次提交
  20. 20 4月, 2013 2 次提交
  21. 03 4月, 2013 1 次提交
    • N
      forcedeth: Do a dma_mapping_error check after skb_frag_dma_map · f7f22874
      Neil Horman 提交于
      This backtrace was recently reported on a 3.9 kernel:
      
      Actual results: from syslog /var/log/messsages:
      kernel: [17539.340285] ------------[ cut here ]------------
      kernel: [17539.341012] WARNING: at lib/dma-debug.c:937 check_unmap+0x493/0x960()
      kernel: [17539.341012] Hardware name: MS-7125
      kernel: [17539.341012] forcedeth 0000:00:0a.0: DMA-API: device driver failed to
      check map error[device address=0x0000000013c88000] [size=544 bytes] [mapped as
      page]
      kernel: [17539.341012] Modules linked in: fuse ebtable_nat ipt_MASQUERADE
      nf_conntrack_netbios_ns nf_conntrack_broadcast ip6table_nat nf_nat_ipv6
      ip6table_mangle ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 iptable_nat
      nf_nat_ipv4 nf_nat iptable_mangle nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack
      nf_conntrack bnep bluetooth rfkill ebtable_filter ebtables ip6table_filter
      ip6_tables snd_hda_codec_hdmi snd_cmipci snd_mpu401_uart snd_hda_intel
      snd_intel8x0 snd_opl3_lib snd_ac97_codec gameport snd_hda_codec snd_rawmidi
      ac97_bus snd_hwdep snd_seq snd_seq_device snd_pcm snd_page_alloc snd_timer snd
      k8temp soundcore serio_raw i2c_nforce2 forcedeth ata_generic pata_acpi nouveau
      video mxm_wmi wmi i2c_algo_bit drm_kms_helper ttm drm i2c_core sata_sil pata_amd
      sata_nv uinput
      kernel: [17539.341012] Pid: 17340, comm: sshd Not tainted
      3.9.0-0.rc4.git0.1.fc19.i686.PAE #1
      kernel: [17539.341012] Call Trace:
      kernel: [17539.341012]  [<c045573c>] warn_slowpath_common+0x6c/0xa0
      kernel: [17539.341012]  [<c0701953>] ? check_unmap+0x493/0x960
      kernel: [17539.341012]  [<c0701953>] ? check_unmap+0x493/0x960
      kernel: [17539.341012]  [<c04557a3>] warn_slowpath_fmt+0x33/0x40
      kernel: [17539.341012]  [<c0701953>] check_unmap+0x493/0x960
      kernel: [17539.341012]  [<c049238f>] ? sched_clock_cpu+0xdf/0x150
      kernel: [17539.341012]  [<c0701e87>] debug_dma_unmap_page+0x67/0x70
      kernel: [17539.341012]  [<f7eae8f2>] nv_unmap_txskb.isra.32+0x92/0x100
      
      Its pretty plainly the result of an skb fragment getting unmapped without having
      its initial mapping operation checked for errors.  This patch corrects that.
      Signed-off-by: NNeil Horman <nhorman@tuxdriver.com>
      CC: "David S. Miller" <davem@davemloft.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f7f22874
  22. 10 3月, 2013 1 次提交
  23. 09 1月, 2013 1 次提交
  24. 04 1月, 2013 1 次提交
  25. 29 12月, 2012 1 次提交
  26. 04 12月, 2012 1 次提交
  27. 31 8月, 2012 3 次提交
    • D
      forcedeth: prevent TX timeouts after reboot · 3f0a1b58
      david decotigny 提交于
      This complements patch "net-forcedeth: fix TX timeout caused by TX
      pause on down link" which ensures that a lock-up sequence is not sent
      to the NIC. Present patch ensures that if a NIC is already locked-up,
      the driver will recover from it when initializing the device.
      
      It does the equivalent of the following recovery sequence:
       - write NVREG_TX_PAUSEFRAME_ENABLE_V1 to eth1's register
         NvRegTxPauseFrame
       - write NVREG_XMITCTL_START to eth1's register
         NvRegTransmitterControl
       - write 0 to eth1's register NvRegTransmitterControl
      (this is at the heart of the "unbricking" sequence mentioned in patch
       "net-forcedeth: fix TX timeout caused by TX pause on down link")
      
      Tested:
       - hardware is MCP55 device id 10de:0373 (rev a3), dual-port
       - reboot a kernel without any of patches mentioned
       - freeze the NIC (details on description for commit "net-forcedeth:
         fix TX timeout caused by TX pause on down link")
       - wait 5mn until ping hangs & TX timeout in dmesg
       - reboot on kernel with present patch
       - host is immediatly operational, no TX timeout
      Signed-off-by: NDavid Decotigny <decot@googlers.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3f0a1b58
    • D
      forcedeth: fix TX timeout caused by TX pause on down link · 1ff39eb6
      david decotigny 提交于
      On some dual-port forcedeth devices such as MCP55 10de:0373 (rev a3),
      when autoneg & TX pause are enabled while port is connected but
      interface is down, the NIC will eventually freeze (TX timeouts,
      network unreachable).
      
      This patch ensures that TX pause is not configured in hardware when
      interface is down. The TX pause request will be honored when interface
      is later configured.
      
      Tested:
       - hardware is MCP55 device id 10de:0373 (rev a3), dual-port
       - eth0 connected and UP, eth1 connected but DOWN
       - without this patch, following sequence would brick NIC:
            ifconfig eth0 down
            ifconfig eth1 up
            ifconfig eth1 down
            ethtool -A eth1 autoneg off rx on tx off
            ifconfig eth1 up
            ifconfig eth1 down
            ethtool -A eth1 autoneg on rx on tx on
            ifconfig eth1 up
            ifconfig eth1 down
            ifup eth0
            sleep 120  # or longer
            ethtool eth1
         Just in case, sequence to un-brick:
            ifconfig eth0 down
            ethtool -A eth1 autoneg off rx on tx off
            ifconfig eth1 up
            ifconfig eth1 down
            ifup eth0
       - with this patch: no TX timeout after "bricking" sequence above
      
      Details:
       - The following register accesses have been identified as the ones
         causing the NIC to freeze in "bricking" sequence above:
          - write NVREG_TX_PAUSEFRAME_ENABLE_V1 to eth1's register NvRegTxPauseFrame
          - write NVREG_MISC1_PAUSE_TX | NVREG_MISC1_FORCE to eth1's register NvRegMisc1
          - write 0 to eth1's register NvRegTransmitterControl
         This is what this patch avoids.
      Signed-off-by: NDavid Decotigny <decot@googlers.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1ff39eb6
    • D
      forcedeth: fix buffer overflow · ba9aa134
      david decotigny 提交于
      Found by manual code inspection.
      
      Tested: compile, reboot, ethtool -d ethX
      Signed-off-by: NDavid Decotigny <decot@googlers.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ba9aa134
  28. 23 7月, 2012 1 次提交
  29. 21 7月, 2012 1 次提交
  30. 11 7月, 2012 2 次提交
  31. 01 5月, 2012 1 次提交
  32. 07 4月, 2012 1 次提交
  33. 29 3月, 2012 1 次提交
  34. 16 2月, 2012 1 次提交