21 Dec, 2010

1 commit

  • * 'for-linus' of git://git.kernel.dk/linux-2.6-block:
    cciss: fix cciss_revalidate panic
    block: max hardware sectors limit wrapper
    block: Deprecate QUEUE_FLAG_CLUSTER and use queue_limits instead
    blk-throttle: Correct the placement of smp_rmb()
    blk-throttle: Trim/adjust slice_end once a bio has been dispatched
    block: check for proper length of iov entries earlier in blk_rq_map_user_iov()
    drbd: fix for spin_lock_irqsave in endio callback
    drbd: don't recvmsg with zero length

    Linus Torvalds
     

17 Dec, 2010

1 commit

  • When stacking devices, a request_queue is not always available. This
    forced us to have a no_cluster flag in the queue_limits that could be
    used as a carrier until the request_queue had been set up for a
    metadevice.

    There were several problems with that approach. First of all it was up
    to the stacking device to remember to set queue flag after stacking had
    completed. Also, the queue flag and the queue limits had to be kept in
    sync at all times. We got that wrong, which could lead to us issuing
    commands that went beyond the max scatterlist limit set by the driver.

    The proper fix is to avoid having two flags for tracking the same thing.
    We deprecate QUEUE_FLAG_CLUSTER and use the queue limit directly in the
    block layer merging functions. The queue_limit 'no_cluster' is turned
    into 'cluster' to avoid double negatives and to ease stacking.
    Clustering defaults to being enabled as before. The queue flag logic is
    removed from the stacking function, and explicitly setting the cluster
    flag is no longer necessary in DM and MD.

    Reported-by: Ed Lin
    Signed-off-by: Martin K. Petersen
    Acked-by: Mike Snitzer
    Cc: stable@kernel.org
    Signed-off-by: Jens Axboe

    Martin K. Petersen
     

10 Dec, 2010

6 commits


09 Dec, 2010

3 commits

  • The error handler is using the test cmd->serial_number == 0 in the
    abort routines to signal that the command to be aborted has already
    completed normally. This design was to close a race window in the
    original error handler where a command could go through the normal
    completion routines after it timed out but before error handling was
    started.

    Mike Anderson pointed out that when we converted our timeout and
    softirq completions, we picked up atomicity here because the block
    layer now mediates this with the REQ_ATOM_COMPLETE flag and guarantees
    that *either* the command times out or our done routine is called, but
    ensures we can't get both occurring. That makes the serial number
    zero check redundant and it can be removed.

    Signed-off-by: James Bottomley

    James Bottomley
     
  • Firmware requires a larger configuration entry size than the driver
    currently allows, and MSI-X pretty much doesn't work with current FW,
    so disable it for now.

    Signed-off-by: Anil Ravindranath
    Signed-off-by: James Bottomley

    Anil Ravindranath
     
  • bio_map_kern() returns ERR_PTRs on failure and never returns NULL.

    [jejb: remove redundant unlikely spotted by Tobias Klauser]
    Signed-off-by: Dan Carpenter
    Acked-by: Boaz Harrosh
    Signed-off-by: James Bottomley

    Dan Carpenter
     

24 Nov, 2010

1 commit

  • f281233 (SCSI host lock push-down) broke the fas216 build:

    drivers/scsi/arm/fas216.h: In function 'fas216_noqueue_command':
    drivers/scsi/arm/fas216.h:354: error: storage class specified for parameter 'fas216_intr'
    drivers/scsi/arm/fas216.h:356: error: storage class specified for parameter 'fas216_remove'
    ...

    Fix it.

    Signed-off-by: Russell King

    Russell King
     

18 Nov, 2010

1 commit


17 Nov, 2010

1 commit

  • Move the mid-layer's ->queuecommand() invocation from being locked
    with the host lock to being unlocked to facilitate speeding up the
    critical path for drivers who don't need this lock taken anyway.

    The patch below presents a simple SCSI host lock push-down as an
    equivalent transformation. No locking or other behavior should change
    with this patch. All existing bugs and locking orders are preserved.

    Additionally, add one parameter to queuecommand,
    struct Scsi_Host *
    and remove one parameter from queuecommand,
    void (*done)(struct scsi_cmnd *)

    Scsi_Host* is a convenient pointer that most host drivers need anyway,
    and 'done' is redundant to struct scsi_cmnd->scsi_done.

    Minimal code disturbance was attempted with this change. Most drivers
    needed only two one-line modifications for their host lock push-down.

    Signed-off-by: Jeff Garzik
    Acked-by: James Bottomley
    Signed-off-by: Linus Torvalds

    Jeff Garzik
     

10 Nov, 2010

1 commit

  • REQ_HARDBARRIER is dead now, so remove the leftovers. What's left
    at this point is:

    - various checks inside the block layer.
    - sanity checks in bio based drivers.
    - now unused bio_empty_barrier helper.
    - Xen blockfront use of BLKIF_OP_WRITE_BARRIER - it's dead for a while,
    but Xen really needs to sort out it's barrier situaton.
    - setting of ordered tags in uas - dead code copied from old scsi
    drivers.
    - scsi different retry for barriers - it's dead and should have been
    removed when flushes were converted to FS requests.
    - blktrace handling of barriers - removed. Someone who knows blktrace
    better should add support for REQ_FLUSH and REQ_FUA, though.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Jens Axboe

    Christoph Hellwig
     

30 Oct, 2010

1 commit


27 Oct, 2010

6 commits

  • sense_buffer is both a direct member of struct pmcraid_cmd as well as
    an indirect one via an anonymous union and struct. Fix this clash by
    eliminating the direct member in favour of the anonymous struct/union
    one. The name duplication apparently isn't noticed by gcc versions
    earlier than 4.4

    Reported-by: Andi Kleen
    Signed-off-by: Anil Ravindranath
    Cc: Stable Tree
    Signed-off-by: James Bottomley

    Anil Ravindranath
     
  • If the command has timedout then the block layer has called
    blk_mark_rq_complete. If qla4xxx_cmd_wait is then called
    from qla4xxx_eh_host_reset, we will always fail, because if
    the driver calls scsi_done then the the block layer will fail
    at blk_complete_request's blk_mark_rq_complete call instead of
    calling the normal completion path including the function,
    blk_queue_end_tag, which releases the tag.

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

    Mike Christie
     
  • Signed-off-by Bo Yang
    Signed-off-by: James Bottomley

    Yang, Bo
     
  • If fw didn't raise the interrupt with the fw state change to driver
    and fw goes to failure state, driver Will check the FW state in
    driver's timeout routine and issue the reset if need. Driver will do
    the OCR upto three times until kill adapter. Also driver will issue
    OCR before driver kill adapter even if fw in operational state.

    Signed-off-by Bo Yang
    Signed-off-by: James Bottomley

    Yang, Bo
     
  • Driver add the input parameters support for max_sectors for megaraid
    sas gen2 chip. Customer can set the max_sectors support to 1MB for
    gen2 chip during the driver load.

    Signed-off-by Bo Yang
    Signed-off-by: James Bottomley

    Yang, Bo
     
  • Driver added the Device update flag to tell LSI application driver
    whether to do the device Update. LSI MegaRAID SAS application will
    check this flag to decide if it needs to update the Device or not.

    Signed-off-by Bo Yang
    Signed-off-by: James Bottomley

    Yang, Bo
     

26 Oct, 2010

18 commits

  • This is a trivial addition to the SG API that can receive kernel
    pointers. It is only used by the out-of-tree test module. So
    it's immediate need is questionable. For maintenance ease it might
    just get in, as it's very small.

    John.
    do you need this in the Kernel, or is it only for osd_ktest.ko?

    Signed-off-by: John A. Chandy
    Signed-off-by: Boaz Harrosh
    Signed-off-by: James Bottomley

    Boaz Harrosh
     
  • This patch adds the Scatter-Gather (sg) API to libosd.
    Scatter-gather enables a write/read of multiple none-contiguous
    areas of an object, in a single call. The extents may overlap
    and/or be in any order.

    The Scatter-Gather list is sent to the target in what is called
    a "cdb continuation segment". This is yet another possible segment
    in the osd-out-buffer. It is unlike all other segments in that it
    sits before the actual "data" segment (which until now was always
    first), and that it is signed by itself and not part of the data
    buffer. This is because the cdb-continuation-segment is considered
    a spill-over of the CDB data, and is therefor signed under
    OSD_SEC_CAPKEY and higher.

    TODO: A new osd_finalize_request_ex version should be supplied so
    the @caps received on the network also contains a size parameter
    and can be spilled over into the "cdb continuation segment".

    Thanks to John Chandy for the original
    code, and investigations. And the implementation of SG support
    in the osd-target.

    Original-coded-by: John Chandy
    Signed-off-by: Boaz Harrosh
    Signed-off-by: James Bottomley

    Boaz Harrosh
     
  • At osd_end_request first free the request that might
    point to pages, then free these pages. In reverse order
    of allocation. For now it's just anal neatness. When we'll
    use mempools It'll also pay in performance.

    Signed-off-by: Boaz Harrosh
    Signed-off-by: James Bottomley

    Boaz Harrosh
     
  • The _osd_req_finalize_attr_page was off by a mile, when trying to
    append the enc_get_attr segment instead of the proper set_attr segment.

    Also properly support when we don't have any attribute to set while
    getting a full page. And when clearing an attribute by setting it's
    size to zero.

    Reported-by: John Chandy
    Signed-off-by: Boaz Harrosh
    Signed-off-by: James Bottomley

    Boaz Harrosh
     
  • Signed-off-by: Alex Iannicelli
    Signed-off-by: James Smart
    Signed-off-by: James Bottomley

    James Smart
     
  • - Add new WQE fields as defined by new SLI interface to support new hardware.

    Signed-off-by: Alex Iannicelli
    Signed-off-by: James Smart
    Signed-off-by: James Bottomley

    James Smart
     
  • Fix critical errors

    - Update send_scsi_event to validate pnode pointer active before copying
    the wwpn information.
    - Add a message, mailbox_idle, and unlock before failing SECURITY_MGMT
    or AUTH_PORT mailbox commands
    - Prevent spin_lock_irqsave from being called twice in a row.

    Signed-off-by: Alex Iannicelli
    Signed-off-by: James Smart
    Signed-off-by: James Bottomley

    James Smart
     
  • Adapter Shutdown and Unregistration cleanup

    - Correct the logic around hba shutdown. Prior to final reset, the
    driver must wait for all XRIs to return from the adapter. Added logic
    to poll, progressively slowing the poll rate as delay gets longer.
    - Correct behavior around the rsvd1 field in UNREG_RPI_ALL mailbox
    completion and final rpi cleanup.
    - Updated logic to move pending VPI registrations to their completion
    in cases where a CVL may be received while registration in progress.
    - Added unreg all rpi mailbox command before unreg vpi.

    Signed-off-by: Alex Iannicelli
    Signed-off-by: James Smart
    Signed-off-by: James Bottomley

    James Smart
     
  • Added driver logic to detect the last devloss timeout of remote nodes which
    was still in use of FCF. At that point, the driver should set the last
    in-use remote node devloss timeout flag if it was not already set and should
    perform proper action on the in-use FCF and recover of FCF from firmware,
    depending on the state the driver's FIP engine is in.

    Find eligible FCF through FCF table rescan or the next new FCF event when
    FCF table rescan turned out empty eligible FCF, and the successful flogi
    into an FCF shall clear the HBA_DEVLOSS_TMO flag, indicating the successful
    recovery from devloss timeout.

    [jejb: add delay.h include to lpfc_hbadisc.c to fix ppc compile]
    Signed-off-by: Alex Iannicelli
    Signed-off-by: James Smart
    Signed-off-by: James Bottomley

    James Smart
     
  • Add support of received ELS commands

    - Add support for received RLS ELS command
    - Add support for received ECHO ELS command
    - Add support for received RTV ELS command

    Signed-off-by: Alex Iannicelli
    Signed-off-by: James Smart
    Signed-off-by: James Bottomley

    James Smart
     
  • FC/FCoE Discovery fixes:

    - Call the lpfc_drain_txq only for SLI4 hba
    - In lpfc_cmpl_els_fdisc, fix code path that does not free IOCB.
    - Treated firmware matching FCF property with different index as error
    - Propagate error returns from lpfc_issue_els_flogi()
    - Refactored lpfc_unregister_unused_fcf() to create a post
    lpfc_dev_loss_tmo handler call for SLI-4 devices. Allows checking of
    fcf after last ndlp released so that fcf can be released if no longer
    in use.
    - Replaced individual FCF_XXXX_DISC flag clearing in lieu of aggregate
    FCF_DISCOVERY flag upon succesful completion of flogi.
    - Correct setting of altBbCredit value in sparams to correct issue with
    logins with remote loop-based devices.

    Signed-off-by: Alex Iannicelli
    Signed-off-by: James Smart
    Signed-off-by: James Bottomley

    James Smart
     
  • There was an addition to the hardware roadmap that includes a new adapter.
    This patch adds the new definitions for the adapter.

    Signed-off-by: Wayne Boyer
    Acked-by: Brian King
    Signed-off-by: James Bottomley

    Wayne Boyer
     
  • This patch addresses the comments from Randy Dunlap (Randy.Dunlap@oracle.com)
    regarding comment blocks that begining with "/**". bfa driver comments
    currently do not follow kernel-doc convention, we hence replace all
    /** with /* and **/ with */.

    Signed-off-by: Jing Huang
    Signed-off-by: James Bottomley

    Jing Huang
     
  • This patch addresses the comments from Randy Dunlap (Randy.Dunlap@oracle.com)
    regarding comment blocks that begining with "/**". bfa driver comments
    currently do not follow kernel-doc convention, we hence replace all
    /** with /* and **/ with */.

    Signed-off-by: Jing Huang
    Signed-off-by: James Bottomley

    Jing Huang
     
  • Fix compile warning for frame size over 1024 in gcc 4.4.

    Signed-off-by: Jing Huang
    Signed-off-by: James Bottomley

    Jing Huang
     
  • This patch replaces register access functions and macros with the the ones
    provided by linux.

    Signed-off-by: Jing Huang
    Signed-off-by: James Bottomley

    Jing Huang
     
  • Signed-off-by: Jing Huang
    Signed-off-by: James Bottomley

    Jing Huang
     
  • This patch removes os wrapper and unused functions.
    bfa_os_assign(), bfa_os_memset(), bfa_os_memcpy(), bfa_os_udelay()
    bfa_os_vsprintf(), bfa_os_snprintf(), and bfa_os_get_clock() are replaced with
    direct assignment or native linux functions. Some unused functions related to VF
    (Vitual fabric) are also removed.

    Signed-off-by: Jing Huang
    Signed-off-by: James Bottomley

    Jing Huang