19 Sep, 2016

1 commit


16 Sep, 2016

11 commits


08 Aug, 2016

1 commit


05 Aug, 2016

1 commit

  • Pull SCSI target updates from Nicholas Bellinger:
    "The most notable item is IBM virtual SCSI target driver, that was
    originally ported to target-core back in 2010 by Tomo-san, and has
    been brought forward to v4.x code by Bryant Ly, Michael Cyr and co
    over the last months.

    Also included are two ORDERED task related bug-fixes Bryant + Michael
    found along the way using ibmvscsis with AIX guests, plus a few
    miscellaneous target-core + iscsi-target bug-fixes with associated
    stable tags"

    * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
    target: fix spelling mistake: "limitiation" -> "limitation"
    target: Fix residual overflow handling in target_complete_cmd_with_length
    tcm_fc: set and unset FCP_SPPF_TARG_FCN
    iscsi-target: Fix panic when adding second TCP connection to iSCSI session
    ibmvscsis: Initial commit of IBM VSCSI Tgt Driver
    target: Fix ordered task CHECK_CONDITION early exception handling
    target: Fix ordered task target_setup_cmd_from_cdb exception hang
    target: Fix max_unmap_lba_count calc overflow
    target: Fix race between iscsi-target connection shutdown + ABORT_TASK
    target: Fix missing complete during ABORT_TASK + CMD_T_FABRIC_STOP

    Linus Torvalds
     

28 Jul, 2016

1 commit

  • Pull networking updates from David Miller:

    1) Unified UDP encapsulation offload methods for drivers, from
    Alexander Duyck.

    2) Make DSA binding more sane, from Andrew Lunn.

    3) Support QCA9888 chips in ath10k, from Anilkumar Kolli.

    4) Several workqueue usage cleanups, from Bhaktipriya Shridhar.

    5) Add XDP (eXpress Data Path), essentially running BPF programs on RX
    packets as soon as the device sees them, with the option to mirror
    the packet on TX via the same interface. From Brenden Blanco and
    others.

    6) Allow qdisc/class stats dumps to run lockless, from Eric Dumazet.

    7) Add VLAN support to b53 and bcm_sf2, from Florian Fainelli.

    8) Simplify netlink conntrack entry layout, from Florian Westphal.

    9) Add ipv4 forwarding support to mlxsw spectrum driver, from Ido
    Schimmel, Yotam Gigi, and Jiri Pirko.

    10) Add SKB array infrastructure and convert tun and macvtap over to it.
    From Michael S Tsirkin and Jason Wang.

    11) Support qdisc packet injection in pktgen, from John Fastabend.

    12) Add neighbour monitoring framework to TIPC, from Jon Paul Maloy.

    13) Add NV congestion control support to TCP, from Lawrence Brakmo.

    14) Add GSO support to SCTP, from Marcelo Ricardo Leitner.

    15) Allow GRO and RPS to function on macsec devices, from Paolo Abeni.

    16) Support MPLS over IPV4, from Simon Horman.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1622 commits)
    xgene: Fix build warning with ACPI disabled.
    be2net: perform temperature query in adapter regardless of its interface state
    l2tp: Correctly return -EBADF from pppol2tp_getname.
    net/mlx5_core/health: Remove deprecated create_singlethread_workqueue
    net: ipmr/ip6mr: update lastuse on entry change
    macsec: ensure rx_sa is set when validation is disabled
    tipc: dump monitor attributes
    tipc: add a function to get the bearer name
    tipc: get monitor threshold for the cluster
    tipc: make cluster size threshold for monitoring configurable
    tipc: introduce constants for tipc address validation
    net: neigh: disallow transition to NUD_STALE if lladdr is unchanged in neigh_update()
    MAINTAINERS: xgene: Add driver and documentation path
    Documentation: dtb: xgene: Add MDIO node
    dtb: xgene: Add MDIO node
    drivers: net: xgene: ethtool: Use phy_ethtool_gset and sset
    drivers: net: xgene: Use exported functions
    drivers: net: xgene: Enable MDIO driver
    drivers: net: xgene: Add backward compatibility
    drivers: net: phy: xgene: Add MDIO driver
    ...

    Linus Torvalds
     

26 Jul, 2016

2 commits

  • Export cxgbi_ppm_release() to release
    ppod manager and cxgbi_tagmask_set() to
    set tag mask, they are used by cxgb3i, cxgb4i
    and cxgbit.

    Signed-off-by: Varun Prakash
    Reviewed-by: Steve Wise
    Signed-off-by: David S. Miller

    Varun Prakash
     
  • Add common library module(libcxgb.ko) for
    Chelsio drivers to remove duplicate code.

    Code for iSCSI DDP Page Pod Manager is moved
    from cxgb4.ko to libcxgb.ko. Earlier only cxgbit.ko
    was using this code, now cxgb3i and cxgb4i will
    also use common Page Pod manager code.

    In future this module will have common connection
    management and hardware specific code that can be
    shared by multiple Chelsio drivers.

    Signed-off-by: Varun Prakash
    Reviewed-by: Steve Wise
    Signed-off-by: David S. Miller

    Varun Prakash
     

24 Jul, 2016

2 commits


21 Jul, 2016

3 commits


20 Jul, 2016

5 commits

  • If a Simple command is sent with a failure, target_setup_cmd_from_cdb
    returns with TCM_UNSUPPORTED_SCSI_OPCODE or TCM_INVALID_CDB_FIELD.

    So in the cases where target_setup_cmd_from_cdb returns an error, we
    never get far enough to call target_execute_cmd to increment simple_cmds.
    Since simple_cmds isn't incremented, the result of the failure from
    target_setup_cmd_from_cdb causes transport_generic_request_failure to
    decrement simple_cmds, due to call to transport_complete_task_attr.

    With this dev->simple_cmds or dev->dev_ordered_sync is now -1, not 0.
    So when a subsequent command with an Ordered Task is sent, it causes
    a hang, since dev->simple_cmds is at -1.

    Tested-by: Bryant G. Ly
    Signed-off-by: Bryant G. Ly
    Tested-by: Michael Cyr
    Signed-off-by: Michael Cyr
    Cc: stable@vger.kernel.org # 4.4+
    Signed-off-by: Nicholas Bellinger

    Nicholas Bellinger
     
  • If a command with a Simple task attribute is failed due to a Unit
    Attention, then a subsequent command with an Ordered task attribute
    will hang forever. The reason for this is that the Unit Attention
    status is checked for in target_setup_cmd_from_cdb, before the call
    to target_execute_cmd, which calls target_handle_task_attr, which
    in turn increments dev->simple_cmds.

    However, transport_generic_request_failure still calls
    transport_complete_task_attr, which will decrement dev->simple_cmds.
    In this case, simple_cmds is now -1. So when a command with the
    Ordered task attribute is sent, target_handle_task_attr sees that
    dev->simple_cmds is not 0, so it decides it can't execute the
    command until all the (nonexistent) Simple commands have completed.

    Reported-by: Michael Cyr
    Tested-by: Michael Cyr
    Reported-by: Bryant G. Ly
    Tested-by: Bryant G. Ly
    Cc: stable@vger.kernel.org # 4.4+
    Signed-off-by: Nicholas Bellinger

    Nicholas Bellinger
     
  • max_discard_sectors only 32bits, and some non scsi backend
    devices will set this to the max 0xffffffff, so we can end up
    overflowing during the max_unmap_lba_count calculation.

    This fixes a regression caused by my patch:

    commit 8a9ebe717a133ba7bc90b06047f43cc6b8bcb8b3
    Author: Mike Christie
    Date: Mon Jan 18 14:09:27 2016 -0600

    target: Fix WRITE_SAME/DISCARD conversion to linux 512b sectors

    which can result in extra discards being sent to due the overflow
    causing max_unmap_lba_count to be smaller than what the backing
    device can actually support.

    Signed-off-by: Mike Christie
    Reviewed-by: Bart Van Assche
    Cc: stable@vger.kernel.org
    Signed-off-by: Nicholas Bellinger

    Mike Christie
     
  • This patch fixes a race in iscsit_release_commands_from_conn() ->
    iscsit_free_cmd() -> transport_generic_free_cmd() + wait_for_tasks=1,
    where CMD_T_FABRIC_STOP could end up being set after the final
    kref_put() is called from core_tmr_abort_task() context.

    This results in transport_generic_free_cmd() blocking indefinately
    on se_cmd->cmd_wait_comp, because the target_release_cmd_kref()
    check for CMD_T_FABRIC_STOP returns false.

    To address this bug, make iscsit_release_commands_from_conn()
    do list_splice and set CMD_T_FABRIC_STOP early while holding
    iscsi_conn->cmd_lock. Also make iscsit_aborted_task() only
    remove iscsi_cmd_t if CMD_T_FABRIC_STOP has not already been
    set.

    Finally in target_release_cmd_kref(), only honor fabric_stop
    if CMD_T_ABORTED has been set.

    Cc: Mike Christie
    Cc: Quinn Tran
    Cc: Himanshu Madhani
    Cc: Christoph Hellwig
    Cc: Hannes Reinecke
    Cc: stable@vger.kernel.org # 3.14+
    Tested-by: Nicholas Bellinger
    Signed-off-by: Nicholas Bellinger

    Nicholas Bellinger
     
  • During transport_generic_free_cmd() with a concurrent TMR
    ABORT_TASK and shutdown CMD_T_FABRIC_STOP bit set, the
    caller will be blocked on se_cmd->cmd_wait_stop completion
    until the final kref_put() -> target_release_cmd_kref()
    has been invoked to call complete().

    However, when ABORT_TASK is completed with FUNCTION_COMPLETE
    in core_tmr_abort_task(), the aborted se_cmd will have already
    been removed from se_sess->sess_cmd_list via list_del_init().

    This results in target_release_cmd_kref() hitting the
    legacy list_empty() == true check, invoking ->release_cmd()
    but skipping complete() to wakeup se_cmd->cmd_wait_stop
    blocked earlier in transport_generic_free_cmd() code.

    To address this bug, it's safe to go ahead and drop the
    original list_empty() check so that fabric_stop invokes
    the complete() as expected, since list_del_init() can
    safely be used on a empty list.

    Cc: Mike Christie
    Cc: Quinn Tran
    Cc: Himanshu Madhani
    Cc: Christoph Hellwig
    Cc: Hannes Reinecke
    Cc: stable@vger.kernel.org # 3.14+
    Tested-by: Nicholas Bellinger
    Signed-off-by: Nicholas Bellinger

    Nicholas Bellinger
     

08 Jun, 2016

2 commits


29 May, 2016

1 commit

  • Pull SCSI target updates from Nicholas Bellinger:
    "Here are the outstanding target pending updates for v4.7-rc1.

    The highlights this round include:

    - Allow external PR/ALUA metadata path be defined at runtime via top
    level configfs attribute (Lee)
    - Fix target session shutdown bug for ib_srpt multi-channel (hch)
    - Make TFO close_session() and shutdown_session() optional (hch)
    - Drop se_sess->sess_kref + convert tcm_qla2xxx to internal kref
    (hch)
    - Add tcm_qla2xxx endpoint attribute for basic FC jammer (Laurence)
    - Refactor iscsi-target RX/TX PDU encode/decode into common code
    (Varun)
    - Extend iscsit_transport with xmit_pdu, release_cmd, get_rx_pdu,
    validate_parameters, and get_r2t_ttt for generic ISO offload
    (Varun)
    - Initial merge of cxgb iscsi-segment offload target driver (Varun)

    The bulk of the changes are Chelsio's new driver, along with a number
    of iscsi-target common code improvements made by Varun + Co along the
    way"

    * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (29 commits)
    iscsi-target: Fix early sk_data_ready LOGIN_FLAGS_READY race
    cxgbit: Use type ISCSI_CXGBIT + cxgbit tpg_np attribute
    iscsi-target: Convert transport drivers to signal rdma_shutdown
    iscsi-target: Make iscsi_tpg_np driver show/store use generic code
    tcm_qla2xxx Add SCSI command jammer/discard capability
    iscsi-target: graceful disconnect on invalid mapping to iovec
    target: need_to_release is always false, remove redundant check and kfree
    target: remove sess_kref and ->shutdown_session
    iscsi-target: remove usage of ->shutdown_session
    tcm_qla2xxx: introduce a private sess_kref
    target: make close_session optional
    target: make ->shutdown_session optional
    target: remove acl_stop
    target: consolidate and fix session shutdown
    cxgbit: add files for cxgbit.ko
    iscsi-target: export symbols
    iscsi-target: call complete on conn_logout_comp
    iscsi-target: clear tx_thread_active
    iscsi-target: add new offload transport type
    iscsi-target: use conn_transport->transport_type in text rsp
    ...

    Linus Torvalds
     

21 May, 2016

1 commit

  • Pull rdma updates from Doug Ledford:
    "Primary 4.7 merge window changes

    - Updates to the new Intel X722 iWARP driver
    - Updates to the hfi1 driver
    - Fixes for the iw_cxgb4 driver
    - Misc core fixes
    - Generic RDMA READ/WRITE API addition
    - SRP updates
    - Misc ipoib updates
    - Minor mlx5 updates"

    * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: (148 commits)
    IB/mlx5: Fire the CQ completion handler from tasklet
    net/mlx5_core: Use tasklet for user-space CQ completion events
    IB/core: Do not require CAP_NET_ADMIN for packet sniffing
    IB/mlx4: Fix unaligned access in send_reply_to_slave
    IB/mlx5: Report Scatter FCS device capability when supported
    IB/mlx5: Add Scatter FCS support for Raw Packet QP
    IB/core: Add Scatter FCS create flag
    IB/core: Add Raw Scatter FCS device capability
    IB/core: Add extended device capability flags
    i40iw: pass hw_stats by reference rather than by value
    i40iw: Remove unnecessary synchronize_irq() before free_irq()
    i40iw: constify i40iw_vf_cqp_ops structure
    IB/mlx5: Add UARs write-combining and non-cached mapping
    IB/mlx5: Allow mapping the free running counter on PROT_EXEC
    IB/mlx4: Use list_for_each_entry_safe
    IB/SA: Use correct free function
    IB/core: Fix a potential array overrun in CMA and SA agent
    IB/core: Remove unnecessary check in ibnl_rcv_msg
    IB/IWPM: Fix a potential skb leak
    RDMA/nes: replace custom print_hex_dump()
    ...

    Linus Torvalds
     

18 May, 2016

2 commits

  • Pull trivial tree updates from Jiri Kosina.

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (21 commits)
    gitignore: fix wording
    mfd: ab8500-debugfs: fix "between" in printk
    memstick: trivial fix of spelling mistake on management
    cpupowerutils: bench: fix "average"
    treewide: Fix typos in printk
    IB/mlx4: printk fix
    pinctrl: sirf/atlas7: fix printk spelling
    serial: mctrl_gpio: Grammar s/lines GPIOs/line GPIOs/, /sets/set/
    w1: comment spelling s/minmum/minimum/
    Blackfin: comment spelling s/divsor/divisor/
    metag: Fix misspellings in comments.
    ia64: Fix misspellings in comments.
    hexagon: Fix misspellings in comments.
    tools/perf: Fix misspellings in comments.
    cris: Fix misspellings in comments.
    c6x: Fix misspellings in comments.
    blackfin: Fix misspelling of 'register' in comment.
    avr32: Fix misspelling of 'definitions' in comment.
    treewide: Fix typos in printk
    Doc: treewide : Fix typos in DocBook/filesystem.xml
    ...

    Linus Torvalds
     
  • Pull networking updates from David Miller:
    "Highlights:

    1) Support SPI based w5100 devices, from Akinobu Mita.

    2) Partial Segmentation Offload, from Alexander Duyck.

    3) Add GMAC4 support to stmmac driver, from Alexandre TORGUE.

    4) Allow cls_flower stats offload, from Amir Vadai.

    5) Implement bpf blinding, from Daniel Borkmann.

    6) Optimize _ASYNC_ bit twiddling on sockets, unless the socket is
    actually using FASYNC these atomics are superfluous. From Eric
    Dumazet.

    7) Run TCP more preemptibly, also from Eric Dumazet.

    8) Support LED blinking, EEPROM dumps, and rxvlan offloading in mlx5e
    driver, from Gal Pressman.

    9) Allow creating ppp devices via rtnetlink, from Guillaume Nault.

    10) Improve BPF usage documentation, from Jesper Dangaard Brouer.

    11) Support tunneling offloads in qed, from Manish Chopra.

    12) aRFS offloading in mlx5e, from Maor Gottlieb.

    13) Add RFS and RPS support to SCTP protocol, from Marcelo Ricardo
    Leitner.

    14) Add MSG_EOR support to TCP, this allows controlling packet
    coalescing on application record boundaries for more accurate
    socket timestamp sampling. From Martin KaFai Lau.

    15) Fix alignment of 64-bit netlink attributes across the board, from
    Nicolas Dichtel.

    16) Per-vlan stats in bridging, from Nikolay Aleksandrov.

    17) Several conversions of drivers to ethtool ksettings, from Philippe
    Reynes.

    18) Checksum neutral ILA in ipv6, from Tom Herbert.

    19) Factorize all of the various marvell dsa drivers into one, from
    Vivien Didelot

    20) Add VF support to qed driver, from Yuval Mintz"

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1649 commits)
    Revert "phy dp83867: Fix compilation with CONFIG_OF_MDIO=m"
    Revert "phy dp83867: Make rgmii parameters optional"
    r8169: default to 64-bit DMA on recent PCIe chips
    phy dp83867: Make rgmii parameters optional
    phy dp83867: Fix compilation with CONFIG_OF_MDIO=m
    bpf: arm64: remove callee-save registers use for tmp registers
    asix: Fix offset calculation in asix_rx_fixup() causing slow transmissions
    switchdev: pass pointer to fib_info instead of copy
    net_sched: close another race condition in tcf_mirred_release()
    tipc: fix nametable publication field in nl compat
    drivers: net: Don't print unpopulated net_device name
    qed: add support for dcbx.
    ravb: Add missing free_irq() calls to ravb_close()
    qed: Remove a stray tab
    net: ethernet: fec-mpc52xx: use phy_ethtool_{get|set}_link_ksettings
    net: ethernet: fec-mpc52xx: use phydev from struct net_device
    bpf, doc: fix typo on bpf_asm descriptions
    stmmac: hardware TX COE doesn't work when force_thresh_dma_mode is set
    net: ethernet: fs-enet: use phy_ethtool_{get|set}_link_ksettings
    net: ethernet: fs-enet: use phydev from struct net_device
    ...

    Linus Torvalds
     

17 May, 2016

4 commits

  • There is a iscsi-target/tcp login race in LOGIN_FLAGS_READY
    state assignment that can result in frequent errors during
    iscsi discovery:

    "iSCSI Login negotiation failed."

    To address this bug, move the initial LOGIN_FLAGS_READY
    assignment ahead of iscsi_target_do_login() when handling
    the initial iscsi_target_start_negotiation() request PDU
    during connection login.

    As iscsi_target_do_login_rx() work_struct callback is
    clearing LOGIN_FLAGS_READ_ACTIVE after subsequent calls
    to iscsi_target_do_login(), the early sk_data_ready
    ahead of the first iscsi_target_do_login() expects
    LOGIN_FLAGS_READY to also be set for the initial
    login request PDU.

    As reported by Maged, this was first obsered using an
    MSFT initiator running across multiple VMWare host
    virtual machines with iscsi-target/tcp.

    Reported-by: Maged Mokhtar
    Tested-by: Maged Mokhtar
    Signed-off-by: Nicholas Bellinger

    Nicholas Bellinger
     
  • Instead of having cxgbit use type ISCSI_HW_OFFLOAD + 'hw_offload'
    tpg_np attribute, it should be using it's own driver specific
    type + attribute

    Cc: Varun Prakash
    Cc: Hariprasad Shenai
    Cc: Christoph Hellwig
    Cc: Sagi Grimberg
    Signed-off-by: Nicholas Bellinger

    Nicholas Bellinger
     
  • Instead of special casing the handful of callers that check for
    iser-target rdma verbs specific shutdown, use a simple flag at
    iscsit_transport->rdma_shutdown so each driver can signal this.

    Also, update iscsi-target/tcp + cxgbit to rdma_shutdown = false.

    Cc: Varun Prakash
    Cc: Hariprasad Shenai
    Cc: Christoph Hellwig
    Cc: Sagi Grimberg
    Signed-off-by: Nicholas Bellinger

    Nicholas Bellinger
     
  • Go ahead and fold the duplicate iscsi_tpg_np driver attribute
    show/store functions into generic callers, invoked by current
    driver specific functions.

    This allows for future v4.8+ changes to have iscsi_target_mod
    use tpg_np driver attributes at runtime, instead of having
    the defaults hardcoded in iscsi_target_configfs.c.

    Also, drop the unused/legacy 'sctp' attribute for non standard
    RFC-3720 operation with IPPROTO_SCTP.

    Cc: Varun Prakash
    Cc: Hariprasad Shenai
    Cc: Christoph Hellwig
    Cc: Sagi Grimberg
    Signed-off-by: Nicholas Bellinger

    Nicholas Bellinger
     

14 May, 2016

1 commit

  • The SRP target driver will need to allocate and chain it's own SGLs soon.
    For this export target_alloc_sgl, and add a new argument to it so that it
    can allocate an additional chain entry that doesn't point to a page. Also
    export transport_free_sgl after renaming it to target_free_sgl to free
    these SGLs again.

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Bart Van Assche
    Signed-off-by: Doug Ledford

    Christoph Hellwig
     

10 May, 2016

2 commits

  • Ensures the first page entry is within bounds. A failed check would
    terminate the iSCSI connection instead of causing a NULL-dereference.

    This violation seems to happen with certain iSCSI commands where the
    computed CDB length is zero but the expected transfer length is
    non-zero. The real problem is probably on the iSCSI initiator side
    since there is a discrepancy between the iSCSI header and the
    encapsulated CDB Opcode.

    Signed-off-by: Imran Haider
    Signed-off-by: Nicholas Bellinger

    Imran Haider
     
  • The removal the #ifdef'd code on CONFIG_ARCH_HAS_SG_CHAIN in
    commit 02c4de53add1b79 ("target/rd: always chain S/G list")
    removed the setting of need_to_release to true, so we are now left
    with need_to_release always being false and hence the conditional
    kfree is never reached. Clean up the dead code by removing need_to_release
    and the conditional kfree.

    Signed-off-by: Colin Ian King
    Reviewed-by: Christoph Hellwig
    Signed-off-by: Nicholas Bellinger

    Colin Ian King