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
     

13 Oct, 2012

1 commit

  • Pull misc SCSI updates from James Bottomley:
    "This is an assorted set of stragglers into the merge window with
    driver updates for megaraid_sas, lpfc, bfi and mvumi. It also
    includes some fairly major fixes for virtio-scsi (scatterlist init),
    scsi_debug (off by one error), storvsc (use after free) and qla2xxx
    (potential deadlock).

    Signed-off-by: James Bottomley "

    * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (49 commits)
    [SCSI] storvsc: Account for in-transit packets in the RESET path
    [SCSI] qla2xxx: fix potential deadlock on ha->hardware_lock
    [SCSI] scsi_debug: Fix off-by-one bug when unmapping region
    [SCSI] Shorten the path length of scsi_cmd_to_driver()
    [SCSI] virtio-scsi: support online resizing of disks
    [SCSI] virtio-scsi: fix LUNs greater than 255
    [SCSI] virtio-scsi: initialize scatterlist structure
    [SCSI] megaraid_sas: Version, Changelog, Copyright update
    [SCSI] megaraid_sas: Remove duplicate code
    [SCSI] megaraid_sas: Add SystemPD FastPath support
    [SCSI] megaraid_sas: Add array boundary check for SystemPD
    [SCSI] megaraid_sas: Load io_request DataLength in bytes
    [SCSI] megaraid_sas: Add module param for configurable MSI-X vector count
    [SCSI] megaraid_sas: Remove un-needed completion_lock spinlock calls
    [SCSI] lpfc 8.3.35: Update lpfc version for 8.3.35 driver release
    [SCSI] lpfc 8.3.35: Fixed not reporting logical link speed to SCSI midlayer when QoS not on
    [SCSI] lpfc 8.3.35: Fix error with fabric service parameters causing performance issues
    [SCSI] lpfc 8.3.35: Fixed SCSI host create showing wrong link speed on SLI3 HBA ports
    [SCSI] lpfc 8.3.35: Fixed not checking solicition in progress bit when verifying FCF record for use
    [SCSI] lpfc 8.3.35: Fixed messages for misconfigured port errors
    ...

    Linus Torvalds
     

09 Oct, 2012

1 commit

  • This patch tries to shorten the path length of scsi_cmd_to_driver(). As only
    REQ_TYPE_BLOCK_PC commands can be submitted without a driver, so we could
    avoid the related NULL checking, as long as we make sure we don't use it for
    REQ_TYPE_BLOCK_PC type commands. Plus, this fixes a bug where you get
    different behaviors from REQ_TYPE_BLOCK_PC commands when a driver is and isn't
    attached.

    Signed-off-by: Li Zhong
    Reviewed-by: Martin K. Petersen
    Signed-off-by: James Bottomley

    Li Zhong
     

07 Oct, 2012

2 commits

  • In LUN RESET testing involving NetApp targets, it is observed that LUN
    RESET is failing. The fc_fcp_resp() is not completing the completion
    for the LUN RESET task since fc_fcp_resp assumes that the FCP_RSP_INFO
    is 8 bytes with the 4 byte reserved field, where in case of NetApp targets
    the FCP_RSP to LUN RESET only has 4 bytes of FCP_RSP_INFO. This leads
    fc_fcp_resp to error out w/o completing the task completion, eventually
    causing LUN RESET to be escalated to host reset, which is not very nice.

    Per FCP-3 r04, clause 9.5.15 and Table 23, the FCP_RSP_INFO field can be either
    4 bytes or 8 bytes, with the last 4 bytes as "Reserved (if any)". Therefore it
    is valid to have 4 bytes FCP_RSP_INFO like some of the NetApp targets behave.
    Fixing this by validating the FCP_RSP_INFO against both the two spec allowed
    length.

    Reported-by: Frank Zhang
    Signed-off-by: Yi Zou
    Tested-by: Ross Brattain
    Signed-off-by: Robert Love
    Signed-off-by: James Bottomley

    Yi Zou
     
  • SCSI errors were generated while writing to LUNs
    connected via NPIV ports.

    Debugging this it was found that the FCoE packets
    transmitted via the NPIV ports were not tagged with
    correct user priority as negotiated with peer by DCB
    agent. This resulted in FCoE traffic going with priority
    zero(0) that did not have priority flow control (PFC)
    enabled for it. The initiator after transferring data
    to the target never saw any reply indicating the transfer
    was complete. This resulted in error recovery (ABTS) and
    SCSI command retries by the scsi-mid layer; eventually
    resulting in I/O errors.

    This patch fixes this issue by keeping the FCoE user
    priority information in the fcoe_interface instance
    that is common for both the physical port as well as
    NPIV ports connected to that physical port; instead
    of storing it in fcoe_port structure that has a per
    port instance.

    Signed-off-by: Neerav Parikh
    Acked-by: Yi Zou
    Acked-by: John Fastabend
    Tested-by: Marcus Dennis
    Signed-off-by: Robert Love
    Signed-off-by: James Bottomley

    Neerav Parikh
     

04 Oct, 2012

1 commit

  • Pull preparatory patches for user API disintegration from David Howells:
    "The patches herein prepare for the extraction of the Userspace API
    bits from the various header files named in the Kbuild files.

    New subdirectories are created under either include/uapi/ or
    arch/x/include/uapi/ that correspond to the subdirectory containing
    that file under include/ or arch/x/include/.

    The new subdirs under the uapi/ directory are populated with Kbuild
    files that mostly do nothing at this time. Further patches will
    disintegrate the headers in each original directory and fill in the
    Kbuild files as they do it.

    These patches also:

    (1) fix up #inclusions of "foo.h" rather than .

    (2) Remove some redundant #includes from the DRM code.

    (3) Make the kernel build infrastructure handle Kbuild files both in
    the old places and the new UAPI place that both specify headers
    to be exported.

    (4) Fix some kernel tools that #include kernel headers during their
    build.

    I have compile tested this with allyesconfig against x86_64,
    allmodconfig against i386 and a scattering of additional defconfigs of
    other arches. Prepared for main script

    Signed-off-by: David Howells
    Acked-by: Arnd Bergmann
    Acked-by: Thomas Gleixner
    Acked-by: Michael Kerrisk
    Acked-by: Paul E. McKenney
    Acked-by: Dave Jones
    Acked-by: H. Peter Anvin "

    * tag 'uapi-prep-20121002' of git://git.infradead.org/users/dhowells/linux-headers:
    UAPI: Plumb the UAPI Kbuilds into the user header installation and checking
    UAPI: x86: Differentiate the generated UAPI and internal headers
    UAPI: Remove the objhdr-y export list
    UAPI: Move linux/version.h
    UAPI: Set up uapi/asm/Kbuild.asm
    UAPI: x86: Fix insn_sanity build failure after UAPI split
    UAPI: x86: Fix the test_get_len tool
    UAPI: (Scripted) Set up UAPI Kbuild files
    UAPI: Partition the header include path sets and add uapi/ header directories
    UAPI: (Scripted) Convert #include "..." to #include in kernel system headers
    UAPI: (Scripted) Convert #include "..." to #include in drivers/gpu/
    UAPI: (Scripted) Remove redundant DRM UAPI header #inclusions from drivers/gpu/.
    UAPI: Refer to the DRM UAPI headers with and from certain headers only

    Linus Torvalds
     

03 Oct, 2012

2 commits

  • Pull first round of SCSI updates from James Bottomley:
    "This is a large set of updates, mostly for drivers (qla2xxx [including
    support for new 83xx based card], qla4xxx, mpt2sas, bfa, zfcp, hpsa,
    be2iscsi, isci, lpfc, ipr, ibmvfc, ibmvscsi, megaraid_sas).

    There's also a rework for tape adding virtually unlimited numbers of
    tape drives plus a set of dif fixes for sd and a fix for a live lock
    on hot remove of SCSI devices.

    This round includes a signed tag pull of isci-for-3.6

    Signed-off-by: James Bottomley "

    Fix up trivial conflict in drivers/scsi/qla2xxx/qla_nx.c due to new PCI
    helper function use in a function that was removed by this pull.

    * tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (198 commits)
    [SCSI] st: remove st_mutex
    [SCSI] sd: Ensure we correctly disable devices with unknown protection type
    [SCSI] hpsa: gen8plus Smart Array IDs
    [SCSI] qla4xxx: Update driver version to 5.03.00-k1
    [SCSI] qla4xxx: Disable generating pause frames for ISP83XX
    [SCSI] qla4xxx: Fix double clearing of risc_intr for ISP83XX
    [SCSI] qla4xxx: IDC implementation for Loopback
    [SCSI] qla4xxx: update copyrights in LICENSE.qla4xxx
    [SCSI] qla4xxx: Fix panic while rmmod
    [SCSI] qla4xxx: Fail probe_adapter if IRQ allocation fails
    [SCSI] qla4xxx: Prevent MSI/MSI-X falling back to INTx for ISP82XX
    [SCSI] qla4xxx: Update idc reg in case of PCI AER
    [SCSI] qla4xxx: Fix double IDC locking in qla4_8xxx_error_recovery
    [SCSI] qla4xxx: Clear interrupt while unloading driver for ISP83XX
    [SCSI] qla4xxx: Print correct IDC version
    [SCSI] qla4xxx: Added new mbox cmd to pass driver version to FW
    [SCSI] scsi_dh_alua: Enable STPG for unavailable ports
    [SCSI] scsi_remove_target: fix softlockup regression on hot remove
    [SCSI] ibmvscsi: Fix host config length field overflow
    [SCSI] ibmvscsi: Remove backend abstraction
    ...

    Linus Torvalds
     
  • Convert #include "..." to #include in kernel system headers.

    Signed-off-by: David Howells
    Acked-by: Arnd Bergmann
    Acked-by: Thomas Gleixner
    Acked-by: Paul E. McKenney
    Acked-by: Dave Jones

    David Howells
     

24 Sep, 2012

3 commits


14 Sep, 2012

1 commit

  • The scsi netlink code confuses the netlink port id with a process id,
    going so far as to read NETLINK_CREDS(skb)->pid instead of the correct
    NETLINK_CB(skb).pid. Fortunately it does not matter because nothing
    registers to respond to scsi netlink requests.

    The only interesting use of the scsi_netlink interface is
    fc_host_post_vendor_event which sends a netlink multicast message.

    Since nothing registers to handle scsi netlink messages kill all of the
    registration logic, while retaining the same error handling behavior
    preserving the userspace visible behavior and removing all of the
    confused code that thought a netlink port id was a process id.

    This was tested with a kernel allyesconfig build which had no problems.

    Cc: James Bottomley
    Cc: James Smart
    Signed-off-by: "Eric W. Biederman"
    Signed-off-by: David S. Miller

    Eric W. Biederman
     

24 Aug, 2012

1 commit

  • libsas power management routines to suspend and recover the sas domain
    based on a model where the lldd is allowed and expected to be
    "forgetful".

    sas_suspend_ha - disable event processing allowing the lldd to take down
    links without concern for causing hotplug events.
    Regardless of whether the lldd actually posts link down
    messages libsas notifies the lldd that all
    domain_devices are gone.

    sas_prep_resume_ha - on the way back up before the lldd starts link
    training clean out any spurious events that were
    generated on the way down, and re-enable event
    processing

    sas_resume_ha - after the lldd has started and decided that all phys
    have posted link-up events this routine is called to let
    libsas start it's own timeout of any phys that did not
    resume. After the timeout an lldd can cancel the
    phy teardown by posting a link-up event.

    Storage for ex_change_count (u16) and phy_change_count (u8) are changed
    to int so they can be set to -1 to indicate 'invalidated'.

    Signed-off-by: Dan Williams
    Reviewed-by: Jacek Danecki
    Tested-by: Maciej Patelczyk
    Acked-by: Alan Stern
    Signed-off-by: James Bottomley

    Dan Williams
     

26 Jul, 2012

1 commit


20 Jul, 2012

15 commits

  • Now that scsi registers its async scan work with the async subsystem,
    wait_for_device_probe() is sufficient for ensuring all scanning is
    complete.

    [jejb: fix merge problems with eea03c20ae38 Make wait_for_device_probe() also do scsi_complete_async_scans()]
    Signed-off-by: Dan Williams
    Tested-by: Eldad Zack
    Signed-off-by: James Bottomley

    Dan Williams
     
  • Make use of USB quirk method to identify such HDD while reading
    the cache status in sd_probe(). If cache quirk is present for
    the HDD, lets assume that cache is enabled and make WCE bit
    equal to 1.

    Signed-off-by: Namjae Jeon
    Signed-off-by: Pankaj Kumar
    Signed-off-by: Amit Sahrawat
    Signed-off-by: James Bottomley

    Namjae Jeon
     
  • The timer and the completion are only used for slow path tasks (smp, and
    lldd tmfs), yet we incur the allocation space and cpu setup time for
    every fast path task.

    Cc: Xiangliang Yu
    Acked-by: Jack Wang
    Signed-off-by: Dan Williams
    Signed-off-by: James Bottomley

    Dan Williams
     
  • On the way to add a new sata_device field, noticed that libsas is
    carrying port multiplier infrastructure that is explicitly disabled by
    sas_discover_sata(). The aic94xx touches the unused port_no, so leave
    that field in case there was some use for it.

    Signed-off-by: Dan Williams
    Signed-off-by: James Bottomley

    Dan Williams
     
  • When recovering failed eh-cmnds let the lldd attempt an abort via
    scsi_abort_eh_cmnd before escalating.

    Reviewed-by: Jacek Danecki
    Signed-off-by: Dan Williams
    Signed-off-by: James Bottomley

    Dan Williams
     
  • The strategy handlers may be called in places that are problematic for
    libsas (i.e. sata resets outside of domain revalidation filtering /
    libata link recovery), or problematic for userspace (non-blocking ioctl
    to sleeping reset functions). However, these routines are also called
    for eh escalations and recovery of scsi_eh_prep_cmnd(), so permit them
    as long as we are running in the host's error handler, otherwise arrange
    for them to be triggered in eh_context.

    Signed-off-by: Dan Williams
    Signed-off-by: James Bottomley

    Dan Williams
     
  • When managing shost->host_eh_scheduled libata assumes that there is a
    1:1 shost-to-ata_port relationship. libsas creates a 1:N relationship
    so it needs to manage host_eh_scheduled cumulatively at the host level.
    The sched_eh and end_eh port port ops allow libsas to track when domain
    devices enter/leave the "eh-pending" state under ha->lock (previously
    named ha->state_lock, but it is no longer just a lock for ha->state
    changes).

    Since host_eh_scheduled indicates eh without backing commands pinning
    the device it can be deallocated at any time. Move the taking of the
    domain_device reference under the port_lock to guarantee that the
    ata_port stays around for the duration of eh.

    Reviewed-by: Jacek Danecki
    Acked-by: Jeff Garzik
    Signed-off-by: Dan Williams
    Signed-off-by: James Bottomley

    Dan Williams
     
  • Introduce scsi_dh_attached_handler_name() to retrieve the name of the
    scsi_dh that is attached to the scsi_device associated with the provided
    request queue. Returns NULL if a scsi_dh is not attached.

    Also, fix scsi_dh_{attach,detach} function header comments to document
    @q rather than @sdev.

    Signed-off-by: Mike Snitzer
    Tested-by: Babu Moger
    Reviewed-by: Chandra Seetharaman
    Acked-by: Hannes Reinecke
    Signed-off-by: James Bottomley

    Mike Snitzer
     
  • During alua transitions, an array can return transitioning
    status in response to rtpg requests. These requests get
    retried for a maximum of 60 seconds by default before timing
    out. Sometimes this timeout isn't sufficient to allow the
    array to complete the transition. T10-spc4 addresses this
    under 'Report Target Port Groups' command.

    This update retrieves the timeout value from the storage
    array if available and retries the transitioning rtpgs
    for up to the 'implied transitioning timeout' value

    Signed-off-by: Rob Evers
    Reviewed-by: Babu Moger
    Signed-off-by: James Bottomley

    Rob Evers
     
  • This has scsi_internal_device_unblock/scsi_target_unblock take
    the new state to set the devices as an argument instead of
    always setting to running. The patch also converts users of these
    functions.

    This allows the FC and iSCSI class to transition devices from blocked
    to transport-offline, so that when fast_io_fail/replacement_timeout
    has fired we do not set the devices back to running. Instead, we
    set them to SDEV_TRANSPORT_OFFLINE.

    Signed-off-by: Mike Christie
    Signed-off-by: James Bottomley

    Mike Christie
     
  • This patch adds a new state SDEV_TRANSPORT_OFFLINE. It will
    be used by transport classes to offline devices for cases like
    when the fast_io_fail/recovery_tmo fires. In those cases we
    want all IO to fail, and we have not yet escalated to dev_loss_tmo
    behavior where we are removing the devices.

    Currently to handle this state, transport classes are setting
    the scsi_device's state to running, setting their internal
    session/port structs state to something that indicates failed,
    and then failing IO from some transport check in the queuecommand.

    The reason for the new value is so that users can distinguish
    between a device failure that is a result of a transport problem
    vs the wide range of errors that devices get offlined for
    when a scsi command times out and we offline the devices there.
    It also fixes the confusion as to why the transport class is
    failing IO, but has set the device state from blocked to running.

    Signed-off-by: Mike Christie
    Signed-off-by: James Bottomley

    Mike Christie
     
  • Updates newly added stats from fc_get_host_stats,
    added new function fc_exch_update_stats to
    update exches related stats from fc_exch.c
    by going thru internal ema_list elements.

    Signed-off-by: Vasu Dev
    Acked-by : Robert Love
    Tested-by: Ross Brattain
    Signed-off-by: James Bottomley

    Vasu Dev
     
  • Adds stats to track FCP pkt and frame alloc
    failure.

    Signed-off-by: Vasu Dev
    Acked-by : Robert Love
    Tested-by: Ross Brattain
    Signed-off-by: James Bottomley

    Vasu Dev
     
  • The libfc is used by fcoe but fcoe agnostic,
    and therefore should not have any fcoe references.

    So renaming fcoe_dev_stats from libfc as its for fc_stats.
    After that libfc is fcoe string free except some strings for
    Open-FCoE.org.

    Signed-off-by: Vasu Dev
    Acked-by : Robert Love
    Tested-by: Ross Brattain
    Acked-by: Bhanu Prakash Gollapudi
    Signed-off-by: James Bottomley

    Vasu Dev
     
  • The libfc provides more flexibility and with that
    we can monitor some more FC specific stats for
    FC exches or FCP error cases, this patch add
    such new FC stats.

    The patch adds *only* FC specific new stats to
    existing fc_host attribute container.

    Added stats names are self explanatory as
    existing FC stats already has, however anyway
    still added commentary along their definition
    to describe them.

    Signed-off-by: Vasu Dev
    Acked-by : Robert Love
    Tested-by: Ross Brattain
    Signed-off-by: James Bottomley

    Vasu Dev
     

08 Jul, 2012

2 commits

  • fill_result_tf() grabs the taskfile flags from the originating qc which
    sas_ata_qc_fill_rtf() promptly overwrites. The presence of an
    ata_taskfile in the sata_device makes it tempting to just copy the full
    contents in sas_ata_qc_fill_rtf(). However, libata really only wants
    the fis contents and expects the other portions of the taskfile to not
    be touched by ->qc_fill_rtf. To that end store a fis buffer in the
    sata_device and use ata_tf_from_fis() like every other ->qc_fill_rtf()
    implementation.

    Cc:
    Reported-by: Praveen Murali
    Tested-by: Praveen Murali
    Signed-off-by: Dan Williams
    Signed-off-by: James Bottomley

    Dan Williams
     
  • Avoid crashing if the private_data pointer happens to be NULL. This has
    been seen sometimes when a host reset happens, notably when there are
    many LUNs:

    host3: Assigned Port ID 0c1601
    scsi host3: libfc: Host reset succeeded on port (0c1601)
    BUG: unable to handle kernel NULL pointer dereference at 0000000000000350
    IP: [] scsi_send_eh_cmnd+0x58/0x3a0

    Process scsi_eh_3 (pid: 4144, threadinfo ffff88030920c000, task ffff880326b160c0)
    Stack:
    000000010372e6ba 0000000000000282 000027100920dca0 ffffffffa0038ee0
    0000000000000000 0000000000030003 ffff88030920dc80 ffff88030920dc80
    00000002000e0000 0000000a00004000 ffff8803242f7760 ffff88031326ed80
    Call Trace:
    [] ? lock_timer_base+0x70/0x70
    [] scsi_eh_tur+0x3e/0xc0
    [] scsi_eh_test_devices+0x76/0x170
    [] scsi_eh_host_reset+0x85/0x160
    [] scsi_eh_ready_devs+0x91/0x110
    [] scsi_unjam_host+0xed/0x1f0
    [] scsi_error_handler+0x1a8/0x200
    [] ? scsi_unjam_host+0x1f0/0x1f0
    [] kthread+0x9e/0xb0
    [] kernel_thread_helper+0x4/0x10
    [] ? kthread_freezable_should_stop+0x70/0x70
    [] ? gs_change+0x13/0x13
    Code: 25 28 00 00 00 48 89 45 c8 31 c0 48 8b 87 80 00 00 00 48 8d b5 60 ff ff ff 89 d1 48 89 fb 41 89 d6 4c 89 fa 48 8b 80 b8 00 00 00
    8b 80 50 03 00 00 48 8b 00 48 89 85 38 ff ff ff 48 8b 07 4c
    RIP [] scsi_send_eh_cmnd+0x58/0x3a0
    RSP
    CR2: 0000000000000350

    Signed-off-by: Mark Rustad
    Tested-by: Marcus Dennis
    Cc:
    Signed-off-by: James Bottomley

    Mark Rustad
     

29 Jun, 2012

2 commits


23 Jun, 2012

1 commit

  • Several bug reports have been received recently for USB mass-storage
    devices that don't handle READ CAPACITY(16) commands properly. They
    report bogus sizes, in some cases becoming unusable as a result.

    The bugs were triggered by commit
    09b6b51b0b6c1b9bb61815baf205e4d74c89ff04 (SCSI & usb-storage: add
    flags for VPD pages and REPORT LUNS), which caused usb-storage to stop
    overriding the SCSI level reported by devices. By default, the sd
    driver will try READ CAPACITY(16) first for any device whose level is
    above SCSI_SPC_2.

    It seems likely that any device large enough to require the use of
    READ CAPACITY(16) (i.e., 2 TB or more) would be able to handle READ
    CAPACITY(10) commands properly. Indeed, I don't know of any devices
    that don't handle READ CAPACITY(10) properly.

    Therefore this patch (as1559) adds a new flag telling the sd driver
    to try READ CAPACITY(10) before READ CAPACITY(16), and sets this flag
    for every USB mass-storage device. If a device really is larger than
    2 TB, sd will fall back to READ CAPACITY(16) just as it used to.

    This fixes Bugzilla #43391.

    Signed-off-by: Alan Stern
    Acked-by: Hans de Goede
    CC: "James E.J. Bottomley"
    CC: Matthew Dharm
    Cc: stable
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern