1. 31 7月, 2014 1 次提交
    • J
      mlx5: Move pci device handling from mlx5_ib to mlx5_core · 9603b61d
      Jack Morgenstein 提交于
      In preparation for a new mlx5 device which is VPI (i.e., ports can be
      either IB or ETH), move the pci device functionality from mlx5_ib
      to mlx5_core.
      
      This involves the following changes:
      1. Move mlx5_core_dev struct out of mlx5_ib_dev. mlx5_core_dev
         is now an independent structure maintained by mlx5_core.
         mlx5_ib_dev now has a pointer to that struct.
         This requires changing a lot of places where the core_dev
         struct was accessed via mlx5_ib_dev (now, this needs to
         be a pointer dereference).
      2. All PCI initializations are now done in mlx5_core. Thus,
         it is now mlx5_core which does pci_register_device (and not
         mlx5_ib, as was previously).
      3. mlx5_ib now registers itself with mlx5_core as an "interface"
         driver. This is very similar to the mechanism employed for
         the mlx4 (ConnectX) driver. Once the HCA is initialized
         (by mlx5_core), it invokes the interface drivers to do
         their initializations.
      4. There is a new event handler which the core registers:
         mlx5_core_event(). This event handler invokes the
         event handlers registered by the interfaces.
      
      Based on a patch by Eli Cohen <eli@mellanox.com>
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NEli Cohen <eli@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9603b61d
  2. 30 7月, 2014 8 次提交
  3. 29 7月, 2014 2 次提交
    • E
      ip: make IP identifiers less predictable · 04ca6973
      Eric Dumazet 提交于
      In "Counting Packets Sent Between Arbitrary Internet Hosts", Jeffrey and
      Jedidiah describe ways exploiting linux IP identifier generation to
      infer whether two machines are exchanging packets.
      
      With commit 73f156a6 ("inetpeer: get rid of ip_id_count"), we
      changed IP id generation, but this does not really prevent this
      side-channel technique.
      
      This patch adds a random amount of perturbation so that IP identifiers
      for a given destination [1] are no longer monotonically increasing after
      an idle period.
      
      Note that prandom_u32_max(1) returns 0, so if generator is used at most
      once per jiffy, this patch inserts no hole in the ID suite and do not
      increase collision probability.
      
      This is jiffies based, so in the worst case (HZ=1000), the id can
      rollover after ~65 seconds of idle time, which should be fine.
      
      We also change the hash used in __ip_select_ident() to not only hash
      on daddr, but also saddr and protocol, so that ICMP probes can not be
      used to infer information for other protocols.
      
      For IPv6, adds saddr into the hash as well, but not nexthdr.
      
      If I ping the patched target, we can see ID are now hard to predict.
      
      21:57:11.008086 IP (...)
          A > target: ICMP echo request, seq 1, length 64
      21:57:11.010752 IP (... id 2081 ...)
          target > A: ICMP echo reply, seq 1, length 64
      
      21:57:12.013133 IP (...)
          A > target: ICMP echo request, seq 2, length 64
      21:57:12.015737 IP (... id 3039 ...)
          target > A: ICMP echo reply, seq 2, length 64
      
      21:57:13.016580 IP (...)
          A > target: ICMP echo request, seq 3, length 64
      21:57:13.019251 IP (... id 3437 ...)
          target > A: ICMP echo reply, seq 3, length 64
      
      [1] TCP sessions uses a per flow ID generator not changed by this patch.
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Reported-by: NJeffrey Knockel <jeffk@cs.unm.edu>
      Reported-by: NJedidiah R. Crandall <crandall@cs.unm.edu>
      Cc: Willy Tarreau <w@1wt.eu>
      Cc: Hannes Frederic Sowa <hannes@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      04ca6973
    • M
      netlink: Fix shadow warning on jiffies · d87de1f3
      Mark Rustad 提交于
      Change formal parameter name to not shadow the global jiffies.
      Signed-off-by: NMark Rustad <mark.d.rustad@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d87de1f3
  4. 28 7月, 2014 7 次提交
  5. 25 7月, 2014 1 次提交
  6. 24 7月, 2014 4 次提交
  7. 23 7月, 2014 5 次提交
    • T
      libata: introduce ata_host->n_tags to avoid oops on SAS controllers · 1a112d10
      Tejun Heo 提交于
      1871ee13 ("libata: support the ata host which implements a queue
      depth less than 32") directly used ata_port->scsi_host->can_queue from
      ata_qc_new() to determine the number of tags supported by the host;
      unfortunately, SAS controllers doing SATA don't initialize ->scsi_host
      leading to the following oops.
      
       BUG: unable to handle kernel NULL pointer dereference at 0000000000000058
       IP: [<ffffffff814e0618>] ata_qc_new_init+0x188/0x1b0
       PGD 0
       Oops: 0002 [#1] SMP
       Modules linked in: isci libsas scsi_transport_sas mgag200 drm_kms_helper ttm
       CPU: 1 PID: 518 Comm: udevd Not tainted 3.16.0-rc6+ #62
       Hardware name: Intel Corporation S2600CO/S2600CO, BIOS SE5C600.86B.02.02.0002.122320131210 12/23/2013
       task: ffff880c1a00b280 ti: ffff88061a000000 task.ti: ffff88061a000000
       RIP: 0010:[<ffffffff814e0618>]  [<ffffffff814e0618>] ata_qc_new_init+0x188/0x1b0
       RSP: 0018:ffff88061a003ae8  EFLAGS: 00010012
       RAX: 0000000000000001 RBX: ffff88000241ca80 RCX: 00000000000000fa
       RDX: 0000000000000020 RSI: 0000000000000020 RDI: ffff8806194aa298
       RBP: ffff88061a003ae8 R08: ffff8806194a8000 R09: 0000000000000000
       R10: 0000000000000000 R11: ffff88000241ca80 R12: ffff88061ad58200
       R13: ffff8806194aa298 R14: ffffffff814e67a0 R15: ffff8806194a8000
       FS:  00007f3ad7fe3840(0000) GS:ffff880627620000(0000) knlGS:0000000000000000
       CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
       CR2: 0000000000000058 CR3: 000000061a118000 CR4: 00000000001407e0
       Stack:
        ffff88061a003b20 ffffffff814e96e1 ffff88000241ca80 ffff88061ad58200
        ffff8800b6bf6000 ffff880c1c988000 ffff880619903850 ffff88061a003b68
        ffffffffa0056ce1 ffff88061a003b48 0000000013d6e6f8 ffff88000241ca80
       Call Trace:
        [<ffffffff814e96e1>] ata_sas_queuecmd+0xa1/0x430
        [<ffffffffa0056ce1>] sas_queuecommand+0x191/0x220 [libsas]
        [<ffffffff8149afee>] scsi_dispatch_cmd+0x10e/0x300
        [<ffffffff814a3bc5>] scsi_request_fn+0x2f5/0x550
        [<ffffffff81317613>] __blk_run_queue+0x33/0x40
        [<ffffffff8131781a>] queue_unplugged+0x2a/0x90
        [<ffffffff8131ceb4>] blk_flush_plug_list+0x1b4/0x210
        [<ffffffff8131d274>] blk_finish_plug+0x14/0x50
        [<ffffffff8117eaa8>] __do_page_cache_readahead+0x198/0x1f0
        [<ffffffff8117ee21>] force_page_cache_readahead+0x31/0x50
        [<ffffffff8117ee7e>] page_cache_sync_readahead+0x3e/0x50
        [<ffffffff81172ac6>] generic_file_read_iter+0x496/0x5a0
        [<ffffffff81219897>] blkdev_read_iter+0x37/0x40
        [<ffffffff811e307e>] new_sync_read+0x7e/0xb0
        [<ffffffff811e3734>] vfs_read+0x94/0x170
        [<ffffffff811e43c6>] SyS_read+0x46/0xb0
        [<ffffffff811e33d1>] ? SyS_lseek+0x91/0xb0
        [<ffffffff8171ee29>] system_call_fastpath+0x16/0x1b
       Code: 00 00 00 88 50 29 83 7f 08 01 19 d2 83 e2 f0 83 ea 50 88 50 34 c6 81 1d 02 00 00 40 c6 81 17 02 00 00 00 5d c3 66 0f 1f 44 00 00 <89> 14 25 58 00 00 00
      
      Fix it by introducing ata_host->n_tags which is initialized to
      ATA_MAX_QUEUE - 1 in ata_host_init() for SAS controllers and set to
      scsi_host_template->can_queue in ata_host_register() for !SAS ones.
      As SAS hosts are never registered, this will give them the same
      ATA_MAX_QUEUE - 1 as before.  Note that we can't use
      scsi_host->can_queue directly for SAS hosts anyway as they can go
      higher than the libata maximum.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Reported-by: NMike Qiu <qiudayu@linux.vnet.ibm.com>
      Reported-by: NJesse Brandeburg <jesse.brandeburg@gmail.com>
      Reported-by: NPeter Hurley <peter@hurleysoftware.com>
      Reported-by: NPeter Zijlstra <peterz@infradead.org>
      Tested-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Fixes: 1871ee13 ("libata: support the ata host which implements a queue depth less than 32")
      Cc: Kevin Hao <haokexin@gmail.com>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: stable@vger.kernel.org
      1a112d10
    • N
      pinctrl: dra: dt-bindings: Fix pull enable/disable · 23d9cec0
      Nishanth Menon 提交于
      The DRA74/72 control module pins have a weak pull up and pull down.
      This is configured by bit offset 17. if BIT(17) is 1, a pull up is
      selected, else a pull down is selected.
      
      However, this pull resisstor is applied based on BIT(16) -
      PULLUDENABLE - if BIT(18) is *0*, then pull as defined in BIT(17) is
      applied, else no weak pulls are applied. We defined this in reverse.
      
      Reference: Table 18-5 (Description of the pad configuration register
      bits) in Technical Reference Manual Revision (DRA74x revision Q:
      SPRUHI2Q Revised June 2014 and DRA72x revision F: SPRUHP2F - Revised
      June 2014)
      
      Fixes: 6e58b8f1 ("ARM: dts: DRA7: Add the dts files for dra7 SoC and dra7-evm board")
      Signed-off-by: NNishanth Menon <nm@ti.com>
      Tested-by: NFelipe Balbi <balbi@ti.com>
      Acked-by: NFelipe Balbi <balbi@ti.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      23d9cec0
    • A
      net/mlx4_core: Use low memory profile on kdump kernel · 2599d858
      Amir Vadai 提交于
      When running in kdump kernel, reduce number of resources allocated for
      the hardware. This will enable the NIC to operate in this low memory
      environment at the expense of performance and some features not related
      to the basic NIC functionality.
      Signed-off-by: NAmir Vadai <amirv@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2599d858
    • T
      net: skbuff: Use ALIGN macro instead of open coding it · 0bec8c88
      Tobias Klauser 提交于
      Use ALIGN from linux/kernel.h to define SKB_DATA_ALIGN instead of open
      coding it.
      Signed-off-by: NTobias Klauser <tklauser@distanz.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0bec8c88
    • D
      net: sctp: Rename SCTP_XMIT_NAGLE_DELAY to SCTP_XMIT_DELAY · 526cbef7
      David Laight 提交于
      MSG_MORE and 'corking' a socket would require that the transmit of
      a data chunk be delayed.
      Rename the return value to be less specific.
      Signed-off-by: NDavid Laight <david.laight@aculab.com>
      Acked-by: NVlad Yasevich <vyasevich@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      526cbef7
  8. 22 7月, 2014 1 次提交
    • A
      fuse: add FUSE_NO_OPEN_SUPPORT flag to INIT · d7afaec0
      Andrew Gallagher 提交于
      Here some additional changes to set a capability flag so that clients can
      detect when it's appropriate to return -ENOSYS from open.
      
      This amends the following commit introduced in 3.14:
      
        7678ac50  fuse: support clients that don't implement 'open'
      
      However we can only add the flag to 3.15 and later since there was no
      protocol version update in 3.14.
      Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz>
      Cc: <stable@vger.kernel.org> # v3.15+
      d7afaec0
  9. 21 7月, 2014 4 次提交
  10. 19 7月, 2014 3 次提交
  11. 18 7月, 2014 2 次提交
  12. 17 7月, 2014 2 次提交