1. 10 12月, 2014 14 次提交
    • H
      r8152: redefine REALTEK_USB_DEVICE · d9a28c5b
      hayeswang 提交于
      Redefine REALTEK_USB_DEVICE for the desired USB interface for probe().
      There are three USB interfaces for the device. USB_CLASS_COMM and
      USB_CLASS_CDC_DATA are for ECM mode (config #2). USB_CLASS_VENDOR_SPEC
      is for the vendor mode (config #1). However, we are not interesting
      in USB_CLASS_CDC_DATA for probe(), so redefine REALTEK_USB_DEVICE
      to ignore the USB interface class of USB_CLASS_CDC_DATA.
      Signed-off-by: NHayes Wang <hayeswang@realtek.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d9a28c5b
    • E
      net: avoid two atomic operations in fast clones · 6ffe75eb
      Eric Dumazet 提交于
      Commit ce1a4ea3 ("net: avoid one atomic operation in skb_clone()")
      took the wrong way to save one atomic operation.
      
      It is actually possible to avoid two atomic operations, if we
      do not change skb->fclone values, and only rely on clone_ref
      content to signal if the clone is available or not.
      
      skb_clone() can simply use the fast clone if clone_ref is 1.
      
      kfree_skbmem() can avoid the atomic_dec_and_test() if clone_ref is 1.
      
      Note that because we usually free the clone before the original skb,
      this particular attempt is only done for the original skb to have better
      branch prediction.
      
      SKB_FCLONE_FREE is removed.
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Cc: Chris Mason <clm@fb.com>
      Cc: Sabrina Dubroca <sd@queasysnail.net>
      Cc: Vijay Subramanian <subramanian.vijay@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6ffe75eb
    • M
      rtnetlink: delay RTM_DELLINK notification until after ndo_uninit() · 395eea6c
      Mahesh Bandewar 提交于
      The commit 56bfa7ee ("unregister_netdevice : move RTM_DELLINK to
      until after ndo_uninit") tried to do this ealier but while doing so
      it created a problem. Unfortunately the delayed rtmsg_ifinfo() also
      delayed call to fill_info(). So this translated into asking driver
      to remove private state and then query it's private state. This
      could have catastropic consequences.
      
      This change breaks the rtmsg_ifinfo() into two parts - one takes the
      precise snapshot of the device by called fill_info() before calling
      the ndo_uninit() and the second part sends the notification using
      collected snapshot.
      
      It was brought to notice when last link is deleted from an ipvlan device
      when it has free-ed the port and the subsequent .fill_info() call is
      trying to get the info from the port.
      
      kernel: [  255.139429] ------------[ cut here ]------------
      kernel: [  255.139439] WARNING: CPU: 12 PID: 11173 at net/core/rtnetlink.c:2238 rtmsg_ifinfo+0x100/0x110()
      kernel: [  255.139493] Modules linked in: ipvlan bonding w1_therm ds2482 wire cdc_acm ehci_pci ehci_hcd i2c_dev i2c_i801 i2c_core msr cpuid bnx2x ptp pps_core mdio libcrc32c
      kernel: [  255.139513] CPU: 12 PID: 11173 Comm: ip Not tainted 3.18.0-smp-DEV #167
      kernel: [  255.139514] Hardware name: Intel RML,PCH/Ibis_QC_18, BIOS 1.0.10 05/15/2012
      kernel: [  255.139515]  0000000000000009 ffff880851b6b828 ffffffff815d87f4 00000000000000e0
      kernel: [  255.139516]  0000000000000000 ffff880851b6b868 ffffffff8109c29c 0000000000000000
      kernel: [  255.139518]  00000000ffffffa6 00000000000000d0 ffffffff81aaf580 0000000000000011
      kernel: [  255.139520] Call Trace:
      kernel: [  255.139527]  [<ffffffff815d87f4>] dump_stack+0x46/0x58
      kernel: [  255.139531]  [<ffffffff8109c29c>] warn_slowpath_common+0x8c/0xc0
      kernel: [  255.139540]  [<ffffffff8109c2ea>] warn_slowpath_null+0x1a/0x20
      kernel: [  255.139544]  [<ffffffff8150d570>] rtmsg_ifinfo+0x100/0x110
      kernel: [  255.139547]  [<ffffffff814f78b5>] rollback_registered_many+0x1d5/0x2d0
      kernel: [  255.139549]  [<ffffffff814f79cf>] unregister_netdevice_many+0x1f/0xb0
      kernel: [  255.139551]  [<ffffffff8150acab>] rtnl_dellink+0xbb/0x110
      kernel: [  255.139553]  [<ffffffff8150da90>] rtnetlink_rcv_msg+0xa0/0x240
      kernel: [  255.139557]  [<ffffffff81329283>] ? rhashtable_lookup_compare+0x43/0x80
      kernel: [  255.139558]  [<ffffffff8150d9f0>] ? __rtnl_unlock+0x20/0x20
      kernel: [  255.139562]  [<ffffffff8152cb11>] netlink_rcv_skb+0xb1/0xc0
      kernel: [  255.139563]  [<ffffffff8150a495>] rtnetlink_rcv+0x25/0x40
      kernel: [  255.139565]  [<ffffffff8152c398>] netlink_unicast+0x178/0x230
      kernel: [  255.139567]  [<ffffffff8152c75f>] netlink_sendmsg+0x30f/0x420
      kernel: [  255.139571]  [<ffffffff814e0b0c>] sock_sendmsg+0x9c/0xd0
      kernel: [  255.139575]  [<ffffffff811d1d7f>] ? rw_copy_check_uvector+0x6f/0x130
      kernel: [  255.139577]  [<ffffffff814e11c9>] ? copy_msghdr_from_user+0x139/0x1b0
      kernel: [  255.139578]  [<ffffffff814e1774>] ___sys_sendmsg+0x304/0x310
      kernel: [  255.139581]  [<ffffffff81198723>] ? handle_mm_fault+0xca3/0xde0
      kernel: [  255.139585]  [<ffffffff811ebc4c>] ? destroy_inode+0x3c/0x70
      kernel: [  255.139589]  [<ffffffff8108e6ec>] ? __do_page_fault+0x20c/0x500
      kernel: [  255.139597]  [<ffffffff811e8336>] ? dput+0xb6/0x190
      kernel: [  255.139606]  [<ffffffff811f05f6>] ? mntput+0x26/0x40
      kernel: [  255.139611]  [<ffffffff811d2b94>] ? __fput+0x174/0x1e0
      kernel: [  255.139613]  [<ffffffff814e2129>] __sys_sendmsg+0x49/0x90
      kernel: [  255.139615]  [<ffffffff814e2182>] SyS_sendmsg+0x12/0x20
      kernel: [  255.139617]  [<ffffffff815df092>] system_call_fastpath+0x12/0x17
      kernel: [  255.139619] ---[ end trace 5e6703e87d984f6b ]---
      Signed-off-by: NMahesh Bandewar <maheshb@google.com>
      Reported-by: NToshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
      Cc: Eric Dumazet <edumazet@google.com>
      Cc: Roopa Prabhu <roopa@cumulusnetworks.com>
      Cc: David S. Miller <davem@davemloft.net>
      Acked-by: NEric Dumazet <edumazet@google.com>
      Acked-by: NThomas Graf <tgraf@suug.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      395eea6c
    • S
      tc_act: export uapi header file · 5f4d8d97
      stephen hemminger 提交于
      This file is used by iproute2 and should be exported.
      Signed-off-by: NStephen Hemminger <stephen@networkplumber.org>
      Acked-by: NJiri Pirko <jiri@resnulli.us>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5f4d8d97
    • D
      Merge branch 'cxgb4-next' · 7ee81365
      David S. Miller 提交于
      Hariprasad Shenai says:
      
      ====================
      cxgb4/cxgb4vf: T5 BAR2 and ethtool related fixes
      
      This series adds new interface to calculate BAR2 SGE queue register address for
      cxgb4 and cxgb4vf driver and some more sge related fixes for T5. Also adds a
      patch which updates the FW version displayed by ethtool after firmware flash.
      
      The patches series is created against 'net-next' tree.
      And includes patches on cxgb4 and cxgb4vf driver.
      
      We have included all the maintainers of respective drivers. Kindly review the
      change and let us know in case of any review comments.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7ee81365
    • H
      cxgb4: Update firmware version after flashing it via ethtool · dff04bce
      Hariprasad Shenai 提交于
      After successfully loading new firmware, reload the new firmware's version
      number information so "ethtool -i", etc. will report the right value
      Signed-off-by: NHariprasad Shenai <hariprasad@chelsio.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      dff04bce
    • H
      cxgb4/cxgb4vf: Use new interfaces to calculate BAR2 SGE Queue Register addresses · df64e4d3
      Hariprasad Shenai 提交于
      Use BAR2 Going To Sleep (GTS) for T5 and later. Use new BAR2 User Doorbells for
      T5 for both cxgb4 and cxgb4vf driver.
      
      Based on original work by Casey Leedom <leedom@chelsio.com>
      Signed-off-by: NHariprasad Shenai <hariprasad@chelsio.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      df64e4d3
    • H
      cxgb4/cxgb4vf: Add code to calculate T5 BAR2 Offsets for SGE Queue Registers · e85c9a7a
      Hariprasad Shenai 提交于
      Add new Common Code facilities for calculating T5 BAR2 Offsets for SGE Queue
      Registers. This new code can handle situations where
      
          Queues Per Page * SGE BAR2 Queue Register Area Size > Page Size
      
      Based on original work by Casey Leedom <leedom@chelsio.com>
      Signed-off-by: NHariprasad Shenai <hariprasad@chelsio.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e85c9a7a
    • H
      cxgb4vf: Add and initialize some sge params for VF driver · e0a8b34a
      Hariprasad Shenai 提交于
      Add sge_vf_eq_qpp and sge_vf_iq_qpp to (struct sge_params), initialize
      sge_queues_per_page and sge_vf_qpp in t4vf_get_sge_params(), add new
      t4vf_prep_adapter() which initializes basic adapter parameters.
      
      Grab both SGE_EGRESS_QUEUES_PER_PAGE_VF and SGE_INGRESS_QUEUES_PER_PAGE_VF
      for VF Drivers since we need both to calculate the User Doorbell area
      offsets for Egress and Ingress Queues.
      
      Based on original work by Casey Leedom <leedom@chelsio.com>
      Signed-off-by: NHariprasad Shenai <hariprasad@chelsio.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e0a8b34a
    • E
      tipc: drop tx side permission checks · 88b17b6a
      Erik Hugne 提交于
      Part of the old remote management feature is a piece of code
      that checked permissions on the local system to see if a certain
      operation was permitted, and if so pass the command to a remote
      node. This serves no purpose after the removal of remote management
      with commit 5902385a ("tipc: obsolete the remote management
      feature") so we remove it.
      Signed-off-by: NErik Hugne <erik.hugne@ericsson.com>
      Reviewed-by: NJon Maloy <jon.maloy@ericsson.com>
      Reviewed-by: NYing Xue <ying.xue@windriver.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      88b17b6a
    • J
      rocker: fix eth_type type in struct rocker_ctrl · 11e6c65a
      Jiri Pirko 提交于
      Signed-off-by: NJiri Pirko <jiri@resnulli.us>
      Signed-off-by: NScott Feldman <sfeldma@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      11e6c65a
    • J
      rocker: introduce be put/get variants and use it when appropriate · 9b03c71f
      Jiri Pirko 提交于
      This kills the sparse warnings.
      Signed-off-by: NJiri Pirko <jiri@resnulli.us>
      Signed-off-by: NScott Feldman <sfeldma@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9b03c71f
    • D
      ipv6: remove useless spin_lock/spin_unlock · 86fe8f89
      Duan Jiong 提交于
      xchg is atomic, so there is no necessary to use spin_lock/spin_unlock
      to protect it. At last, remove the redundant
      opt = xchg(&inet6_sk(sk)->opt, opt); statement.
      Signed-off-by: NDuan Jiong <duanj.fnst@cn.fujitsu.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      86fe8f89
    • L
      amd-xgbe: IRQ names require allocated memory · 54ceb9ec
      Lendacky, Thomas 提交于
      When requesting an irq, the name passed in must be (part of) allocated
      memory. The irq name was a local variable and resulted in random
      characters when listing /proc/interrupts. Add a character field to the
      xgbe_channel structure to hold the irq name and use that.
      Signed-off-by: NTom Lendacky <thomas.lendacky@amd.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      54ceb9ec
  2. 09 12月, 2014 26 次提交