27 Jun, 2013

1 commit

  • This is the kernel part of the modification to extract the net params
    from the ibft sysfs to the iface struct used for the connection
    request upon sync_session in the open-iscsi util.

    Three new session sysfs params are defined:
    boot_root - holds the name of the /sys/firmware/ibft or iscsi_rootN
    boot_nic - holds the ethernetN name
    boot_target - holds the targetN name

    Signed-off-by: Eddie Wai
    Reviewed-by: Mike Christie
    Signed-off-by: James Bottomley

    Eddie Wai
     

25 Jun, 2013

1 commit

  • Not all disks fill out the VPD pages correctly. Add a blacklist flag
    that allows us ignore the SBC-3 VPD pages for a given device. The
    BLIST_SKIP_VPD_PAGES flag triggers our existing skip_vpd_pages
    scsi_device parameter to bypass VPD scanning.

    Also blacklist the offending Seagate drive model.

    Reported-by: Mike Snitzer
    Signed-off-by: Martin K. Petersen
    Signed-off-by: James Bottomley

    Martin K. Petersen
     

05 Jun, 2013

2 commits

  • Introduce eh_timeout which can be used for error handling purposes. This
    was previously hardcoded to 10 seconds in the SCSI error handling
    code. However, for some fast-fail scenarios it is necessary to be able
    to tune this as it can take several iterations (bus device, target, bus,
    controller) before we give up.

    Signed-off-by: Martin K. Petersen
    Signed-off-by: James Bottomley

    Martin K. Petersen
     
  • Remove the arbitrary expectation in libsas that all SCSI commands are 16 bytes
    or less. Instead do all copies via cmd->cmd_len (and use a pointer to this in
    the libsas task instead of a copy). Note that this still doesn't enable > 16
    byte CDB support in the underlying drivers because their internal format has
    to be fixed and the wire format of > 16 byte CDBs according to the SAS spec is
    different. the libsas drivers (isci, aic94xx, mvsas and pm8xxx are all
    updated for this change.

    Cc: Lukasz Dorau
    Cc: Maciej Patelczyk
    Cc: Dave Jiang
    Cc: Jack Wang
    Cc: Lindar Liu
    Cc: Xiangliang Yu
    Signed-off-by: James Bottomley

    James Bottomley
     

10 May, 2013

4 commits


07 May, 2013

1 commit

  • With the introduction of REQ_PM, modify sd's runtime suspend operation
    functions to use that flag so that the operations to put the device into
    runtime suspended state(i.e. sync cache and stop device) will not affect
    its runtime PM status.

    Signed-off-by: Lin Ming
    Signed-off-by: Aaron Lu
    Acked-by: Alan Stern
    Signed-off-by: James Bottomley

    Lin Ming
     

03 May, 2013

1 commit


02 May, 2013

1 commit

  • Pull VFS updates from Al Viro,

    Misc cleanups all over the place, mainly wrt /proc interfaces (switch
    create_proc_entry to proc_create(), get rid of the deprecated
    create_proc_read_entry() in favor of using proc_create_data() and
    seq_file etc).

    7kloc removed.

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (204 commits)
    don't bother with deferred freeing of fdtables
    proc: Move non-public stuff from linux/proc_fs.h to fs/proc/internal.h
    proc: Make the PROC_I() and PDE() macros internal to procfs
    proc: Supply a function to remove a proc entry by PDE
    take cgroup_open() and cpuset_open() to fs/proc/base.c
    ppc: Clean up scanlog
    ppc: Clean up rtas_flash driver somewhat
    hostap: proc: Use remove_proc_subtree()
    drm: proc: Use remove_proc_subtree()
    drm: proc: Use minor->index to label things, not PDE->name
    drm: Constify drm_proc_list[]
    zoran: Don't print proc_dir_entry data in debug
    reiserfs: Don't access the proc_dir_entry in r_open(), r_start() r_show()
    proc: Supply an accessor for getting the data from a PDE's parent
    airo: Use remove_proc_subtree()
    rtl8192u: Don't need to save device proc dir PDE
    rtl8187se: Use a dir under /proc/net/r8180/
    proc: Add proc_mkdir_data()
    proc: Move some bits from linux/proc_fs.h to linux/{of.h,signal.h,tty.h}
    proc: Move PDE_NET() to fs/proc/proc_net.c
    ...

    Linus Torvalds
     

01 May, 2013

2 commits

  • Merge third batch of fixes from Andrew Morton:
    "Most of the rest. I still have two large patchsets against AIO and
    IPC, but they're a bit stuck behind other trees and I'm about to
    vanish for six days.

    - random fixlets
    - inotify
    - more of the MM queue
    - show_stack() cleanups
    - DMI update
    - kthread/workqueue things
    - compat cleanups
    - epoll udpates
    - binfmt updates
    - nilfs2
    - hfs
    - hfsplus
    - ptrace
    - kmod
    - coredump
    - kexec
    - rbtree
    - pids
    - pidns
    - pps
    - semaphore tweaks
    - some w1 patches
    - relay updates
    - core Kconfig changes
    - sysrq tweaks"

    * emailed patches from Andrew Morton : (109 commits)
    Documentation/sysrq: fix inconstistent help message of sysrq key
    ethernet/emac/sysrq: fix inconstistent help message of sysrq key
    sparc/sysrq: fix inconstistent help message of sysrq key
    powerpc/xmon/sysrq: fix inconstistent help message of sysrq key
    ARM/etm/sysrq: fix inconstistent help message of sysrq key
    power/sysrq: fix inconstistent help message of sysrq key
    kgdb/sysrq: fix inconstistent help message of sysrq key
    lib/decompress.c: fix initconst
    notifier-error-inject: fix module names in Kconfig
    kernel/sys.c: make prctl(PR_SET_MM) generally available
    UAPI: remove empty Kbuild files
    menuconfig: print more info for symbol without prompts
    init/Kconfig: re-order CONFIG_EXPERT options to fix menuconfig display
    kconfig menu: move Virtualization drivers near other virtualization options
    Kconfig: consolidate CONFIG_DEBUG_STRICT_USER_COPY_CHECKS
    relay: use macro PAGE_ALIGN instead of FIX_SIZE
    kernel/relay.c: move FIX_SIZE macro into relay.c
    kernel/relay.c: remove unused function argument actor
    drivers/w1/slaves/w1_ds2760.c: fix the error handling in w1_ds2760_add_slave()
    drivers/w1/slaves/w1_ds2781.c: fix the error handling in w1_ds2781_add_slave()
    ...

    Linus Torvalds
     
  • Remove empty Kbuild files as they cause problems with the patch program which
    removes files that become empty.

    Signed-off-by: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Howells
     

12 Apr, 2013

3 commits


10 Apr, 2013

2 commits

  • all users converted to ->show_info()/->write_info()

    Signed-off-by: Al Viro

    Al Viro
     
  • It's still an obsolete interface; don't introduce those in new drivers.
    However, it's saner than the ->proc_info() and commits after this one
    will convert the existing ->proc_info() users to it.

    The read side is ->show_info(seq_file *, struct Scsi_Host *); use
    seq_... for generating contents.

    The write side is ->write_info(struct Scsi_Host *, char *, int).

    Again, this is driven by procfs needs; we are going to kill ->write_proc()
    and ->read_proc() and this is the main obstacle to burying that piece of
    shit.

    Signed-off-by: Al Viro

    Al Viro
     

26 Mar, 2013

2 commits


03 Mar, 2013

1 commit

  • Pull SCSI updates from James Bottomley:
    "This is an assorted set of stragglers into the merge window with
    driver updates for qla2xxx, megaraid_sas, storvsc and ufs.

    It also includes pulls of the uapi tree (all the remaining SCSI
    pieces) and the fcoe tree (updates to fcoe and libfc)"

    * tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (81 commits)
    [SCSI] ufs: Separate PCI code into glue driver
    [SCSI] ufs: Segregate PCI Specific Code
    [SCSI] scsi: fix lpfc build when wmb() is defined as mb()
    [SCSI] storvsc: Handle dynamic resizing of the device
    [SCSI] storvsc: Restructure error handling code on command completion
    [SCSI] storvsc: avoid usage of WRITE_SAME
    [SCSI] aacraid: suppress two GCC warnings
    [SCSI] hpsa: check for dma_mapping_error in hpsa_passthru ioctls
    [SCSI] hpsa: reorganize error handling in hpsa_passthru_ioctl
    [SCSI] hpsa: check for dma_mapping_error in hpsa_map_sg_chain_block
    [SCSI] hpsa: Check for dma_mapping_error for all code paths using fill_cmd
    [SCSI] hpsa: Check for dma_mapping_error in hpsa_map_one
    [SCSI] dc395x: uninitialized variable in device_alloc()
    [SCSI] Fix range check in scsi_host_dif_capable()
    [SCSI] storvsc: Initialize the sglist
    [SCSI] mpt2sas: Add support for OEM specific controller
    [SCSI] ipr: Fix oops while resetting an ipr adapter
    [SCSI] fnic: Fnic Trace Utility
    [SCSI] fnic: New debug flags and debug log messages
    [SCSI] fnic: fnic driver may hit BUG_ON on device reset
    ...

    Linus Torvalds
     

01 Mar, 2013

2 commits


24 Feb, 2013

1 commit


26 Jan, 2013

2 commits

  • Commit 166a2967b45ede2e2e56f3ede3cd32053dc17812 "libata: tell scsi layer
    device supports runtime power off" introduced the can_power_off flag for
    scsi_device and is used to support ZPODD implementation in SCSI layer.
    Since ZPODD is now implemented in ATA layer, that flag is no longer
    needed, so remove it.

    Signed-off-by: Aaron Lu
    Signed-off-by: Jeff Garzik

    Aaron Lu
     
  • When the ODD is powered off, any action the user did to the ODD that
    would generate a media event will trigger an ACPI interrupt, so the
    poll for media event is no longer necessary. And the poll will also
    cause a runtime status change, which will stop the ODD from staying in
    powered off state, so the poll should better be stopped.

    But since we don't have access to the gendisk structure in LLDs, here
    comes the disk_events_disable_depth for scsi device. This field is a
    hint set by LLDs to convey information to upper layer drivers. A value
    of 0 means media poll is necessary for the device, while values above 0
    means media poll is not needed and should better be skipped. So we can
    increase its value when we are to power off the ODD in ATA layer and
    decrease its value when the ODD is powered on, effectively silence the
    media events poll.

    Signed-off-by: Aaron Lu
    Signed-off-by: Jeff Garzik

    Aaron Lu
     

08 Jan, 2013

1 commit


20 Dec, 2012

1 commit


15 Dec, 2012

5 commits

  • Similarly they can be moved into libfcoe instead of being private to fcoe now.
    Also add comments particularly on the term LESB to the corresponding function.

    Signed-off-by: Yi Zou
    Cc: Bhanu Prakash Gollapudi
    Tested-by: Marcus Dennis
    Signed-off-by: Robert Love

    Yi Zou
     
  • With the previous patch, fcoe_link_speed_update() can be moved into libfcoe and
    exported to used by fcoe, bnx2fc, and etc.

    Signed-off-by: Yi Zou
    Cc: Bhanu Prakash Gollapudi
    Tested-by: Marcus Dennis
    Signed-off-by: Robert Love

    Yi Zou
     
  • Adds support to fcoe_port's newly added get_netdev fucntion pointer.

    Signed-off-by: Yi Zou
    Cc: Bhanu Prakash Gollapudi
    Tested-by: Marcus Dennis
    Signed-off-by: Robert Love

    Yi Zou
     
  • Currently, in the default kernel fcoe driver, it is needed to get to the underlying
    private per fcoe transport's private structure, e.g., fcoe_interface in
    fcoe.ko, and returns the associated netdev. The similar logic exists in other
    fcoe drivers, e.g., bnx2fc, so we add a function pointer into the common
    fcoe_port struct to allow individual fcoe transport implementaion (fcoe
    and bnx2fc) to get the corresponding netdev associated with a give lport.

    Then a inline fcoe_get_netdev() is added as part of libfcoe for all underlying
    fcoe transport drivers to use regardless of its individual fcoe transport
    driver, and also allows move more common code such as fcoe_link_speed_update or
    fcoe_ctlr_get_lesb to be in libfcoe, rather than specific to fcoe.

    This patch is a prep work that adds aforementioned fucntion pointer, and
    followed by the actual code changes to make use of it.

    Signed-off-by: Yi Zou
    Cc: Bhanu Prakash Gollapudi
    Tested-by: Marcus Dennis
    Signed-off-by: Robert Love

    Yi Zou
     
  • This patch does a few things.

    1) Makes /sys/bus/fcoe/ctlr_{create,destroy} interfaces.
    These interfaces take an and will either
    create an FCoE Controller or destroy an FCoE
    Controller depending on which file is written to.

    The new FCoE Controller will start in a DISABLED
    state and will not do discovery or login until it
    is ENABLED. This pause will allow us to configure
    the FCoE Controller before enabling it.

    2) Makes the 'mode' attribute of a fcoe_ctlr_device
    writale. This allows the user to configure the mode
    in which the FCoE Controller will start in when it
    is ENABLED.

    Possible modes are 'Fabric', or 'VN2VN'.

    The default mode for a fcoe_ctlr{,_device} is 'Fabric'.
    Drivers must implement the set_fcoe_ctlr_mode routine
    to support this feature.

    libfcoe offers an exported routine to set a FCoE
    Controller's mode. The mode can only be changed
    when the FCoE Controller is DISABLED.

    This patch also removes the get_fcoe_ctlr_mode pointer
    in the fcoe_sysfs function template, the code in
    fcoe_ctlr.c to get the mode and the assignment of
    the fcoe_sysfs function pointer to the fcoe_ctlr.c
    implementation (in fcoe and bnx2fc). fcoe_sysfs can
    return that value for the mode without consulting the
    LLD.

    3) Make a 'enabled' attribute of a fcoe_ctlr_device. On a
    read, fcoe_sysfs will return the attribute's value. On
    a write, fcoe_sysfs will call the LLD (if there is a
    callback) to notifiy that the enalbed state has changed.

    This patch maintains the old FCoE control interfaces as
    module parameters, but it adds comments pointing out that
    the old interfaces are deprecated.

    Signed-off-by: Robert Love
    Acked-by: Neil Horman

    Robert Love
     

14 Dec, 2012

2 commits

  • Pull first round of SCSI updates from James Bottomley:
    "This patch set includes two large new drivers: mpt3sas (for the next
    gen fusion SAS hardware) and csiostor a FCoE offload driver for the
    Chelsio converged network cards (this includes some net changes which
    I've OK'd with DaveM).

    The rest of the patch is driver updates (qla2xxx, lpfc, hptiop,
    be2iscsi) plus a few assorted updates and bug fixes.

    We also have a Power Management rework in the Upper Layer Drivers
    preparatory to doing ACPI zero power optical devices, but the actual
    enabler is still being worked on.

    Signed-off-by: James Bottomley "

    * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (72 commits)
    [SCSI] mpt3sas: add new driver supporting 12GB SAS
    [SCSI] scsi_transport_sas: add 12GB definitions for mpt3sas
    [SCSI] miscdevice: Adding support for MPT3SAS_MINOR(222)
    [SCSI] csiostor: remove unneeded memset()
    [SCSI] csiostor: Fix sparse warnings.
    [SCSI] qla2xxx: Display that driver is operating in legacy interrupt mode.
    [SCSI] qla2xxx: Dont clear drv active on iospace config failure.
    [SCSI] qla2xxx: Fix typo in qla2xxx driver.
    [SCSI] qla2xxx: Update ql2xextended_error_logging parameter description with new option.
    [SCSI] qla2xxx: Parameterize the link speed of hba rather than fcport.
    [SCSI] qla2xxx: Add 16Gb/s case to get port speed capability.
    [SCSI] qla2xxx: Move marking fcport online ahead of setting iiDMA speed.
    [SCSI] qla2xxx: Add acquiring of risc semaphore before doing ISP reset.
    [SCSI] qla2xxx: Ignore driver ack bit if corresponding presence bit is not set.
    [SCSI] qla2xxx: Fix typo in qla83xx_fw_dump function.
    [SCSI] qla2xxx: Add Gen3 PCIe speed 8GT/s to the log message.
    [SCSI] qla2xxx: Use correct Request-Q-Out register during bidirectional request processing
    [SCSI] qla2xxx: Move noisy Start scsi failed messages to verbose logging level.
    [SCSI] qla2xxx: Fix coccinelle warnings in qla2x00_relogin.
    [SCSI] qla2xxx: No fcport FC-4 type assignment in GA_NXT response.
    ...

    Linus Torvalds
     
  • Pull infiniband upate from Roland Dreier:
    "First batch of InfiniBand/RDMA changes for the 3.8 merge window:
    - A good chunk of Bart Van Assche's SRP fixes
    - UAPI disintegration from David Howells
    - mlx4 support for "64-byte CQE" hardware feature from Or Gerlitz
    - Other miscellaneous fixes"

    Fix up trivial conflict in mellanox/mlx4 driver.

    * tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: (33 commits)
    RDMA/nes: Fix for crash when registering zero length MR for CQ
    RDMA/nes: Fix for terminate timer crash
    RDMA/nes: Fix for BUG_ON due to adding already-pending timer
    IB/srp: Allow SRP disconnect through sysfs
    srp_transport: Document sysfs attributes
    srp_transport: Simplify attribute initialization code
    srp_transport: Fix attribute registration
    IB/srp: Document sysfs attributes
    IB/srp: send disconnect request without waiting for CM timewait exit
    IB/srp: destroy and recreate QP and CQs when reconnecting
    IB/srp: Eliminate state SRP_TARGET_DEAD
    IB/srp: Introduce the helper function srp_remove_target()
    IB/srp: Suppress superfluous error messages
    IB/srp: Process all error completions
    IB/srp: Introduce srp_handle_qp_err()
    IB/srp: Simplify SCSI error handling
    IB/srp: Keep processing commands during host removal
    IB/srp: Eliminate state SRP_TARGET_CONNECTING
    IB/srp: Increase block layer timeout
    RDMA/cm: Change return value from find_gid_port()
    ...

    Linus Torvalds
     

01 Dec, 2012

2 commits


27 Nov, 2012

1 commit

  • Force large capacity (> 0xFFFFFFFF blocks) drives to use READ/WRITE(16) instead
    of READ/WRITE(10). Some(most/all?) USB enclosures do not like READ(10) commands
    when a large capacity drive is installed. This issue was reported and discussed
    here: http://marc.info/?l=linux-usb&m=135247705222324

    Signed-off-by: Jason J. Herne
    Signed-off-by: James Bottomley

    Jason J. Herne
     

14 Nov, 2012

2 commits

  • Implement support for WRITE SAME(10) and WRITE SAME(16) in the SCSI disk
    driver.

    - We set the default maximum to 0xFFFF because there are several
    devices out there that only support two-byte block counts even with
    WRITE SAME(16). We only enable transfers bigger than 0xFFFF if the
    device explicitly reports MAXIMUM WRITE SAME LENGTH in the BLOCK
    LIMITS VPD.

    - max_write_same_blocks can be overriden per-device basis in sysfs.

    - The UNMAP discovery heuristics remain unchanged but the discard
    limits are tweaked to match the "real" WRITE SAME commands.

    - In the error handling logic we now distinguish between WRITE SAME
    with and without UNMAP set.

    The discovery process heuristics are:

    - If the device reports a SCSI level of SPC-3 or greater we'll issue
    READ SUPPORTED OPERATION CODES to find out whether WRITE SAME(16) is
    supported. If that's the case we will use it.

    - If the device supports the block limits VPD and reports a MAXIMUM
    WRITE SAME LENGTH bigger than 0xFFFF we will use WRITE SAME(16).

    - Otherwise we will use WRITE SAME(10) unless the target LBA is beyond
    0xFFFFFFFF or the block count exceeds 0xFFFF.

    - no_write_same is set for ATA, FireWire and USB.

    Signed-off-by: Martin K. Petersen
    Reviewed-by: Mike Snitzer
    Reviewed-by: Jeff Garzik
    Signed-off-by: James Bottomley

    Martin K. Petersen
     
  • The REPORT SUPPORTED OPERATION CODES command can be used to query
    whether a given opcode is supported by a device. Add a helper function
    that allows us to look up commands.

    We only issue RSOC if the device reports compliance with SPC-3 or
    later. But to err on the side of caution we disable the command for ATA,
    FireWire and USB.

    Signed-off-by: Martin K. Petersen
    Acked-by: Mike Snitzer
    Signed-off-by: James Bottomley

    Martin K. Petersen