21 Mar, 2007

1 commit


20 Mar, 2007

19 commits

  • It looks like megaraid_sas at least needs this to throttle its commands
    as they begin to time out. The code keeps the existing transport
    template use of eh_timed_out (and allows the transport to override the
    host if they both have this callback).

    Signed-off-by: James Bottomley

    James Bottomley
     
  • Received from Mark Salyzyn,

    This set of fixes improve error handling stability of the driver. A popular
    manifestation of the problems is an NULL pointer reference in the interrupt
    handler when referencing portions of the scsi command context, or in the
    scsi_done handling when an offlined device is referenced.

    The aacraid driver currently does not get notification of orphaned command
    completions due to devices going offline. The driver also fails to handle the
    commands that are finished by the error handler, and thus can complete again
    later at the hands of the adapter causing situations of completion of an
    invalid scsi command context. Test Unit Ready calls abort assuming that the
    abort was successful, but are not, and thus when the interrupt from the adapter
    occurs, they reference invalid command contexts. We add in a TIMED_OUT flag to
    inform the aacraid FIB context that the interrupt service should merely release
    the driver resources and not complete the command up. We take advantage of this
    with the abort handler as well for select abortable commands. And we detect and
    react if a command that can not be aborted is currently still outstanding to
    the controller when reissued by the retry mechanism.

    Signed-off-by: Mark Haverkamp
    Signed-off-by: James Bottomley

    Mark Haverkamp
     
  • Received from Mark Salyzyn,

    The raw srb ioctl is supposed to be able to take packets with 32 and 64 bit
    virtual address SG elements, it did not handle the frames with 64 bit SG
    elements well when communicating with 64 bit DMA capable adapters, and it did
    not handle the 32 bit limited DMA adapters at all. The enclosed patch now
    handles all four quadrants (32 bit / 64 bit SG elements in SRB requests + 32
    bit or 64 bit DMA capable adapters)

    This fix is required before Java based management applications in a 64 bit user
    space can submit raw srb requests to the array physical components via the
    ioctl mechanism, the allocated user memory pool on 64 bit machines under this
    environment forced the management software's hands to submit 64 bit user space
    virtual address SG elements in via the ioctl.

    Signed-off-by: Mark Haverkamp
    Signed-off-by: James Bottomley

    Mark Haverkamp
     
  • Received from Mark Salyzyn,

    This little patch removes the ',cid)' container identification argument
    from some of the functions. The argument is used in some cases as merely
    a debug helper and thus not used, and in others, the value can be
    quickly acquired from the scsi command in their single solitary use in
    the procedure rather than wasting resources on passing the argument in
    from above.

    Signed-off-by: Mark Haverkamp
    Signed-off-by: James Bottomley

    Mark Haverkamp
     
  • Received from Mark Salyzyn,

    Outstanding ioctl calls still have some problems with aborting cleanly
    in the face of a reset iop recovery action should the adapter ever enter
    into a Firmware Assert (BlinkLED) condition. The enclosed patch resolves
    some uncovered flawed handling.

    Signed-off-by: Mark Haverkamp
    Signed-off-by: James Bottomley

    Mark Haverkamp
     
  • Received from Mark Salyzyn,

    The aac_probe_container call blocks. This is an issue because it is called on
    occasion in the context of the queuecommand handler. Once in a blue moon this
    has resulted in a kernel panic sleeping during interrupt; or problems with some
    embedded system versions of the kernel that depend on queuecommand to not
    block. This ugly patch rewrites the aac_probe_container call into a new routine
    _aac_probe_container that is an asynchronous state machine to complete the
    series of operations. The legacy blocking aac_probe_container call used in
    other areas of the driver (during initialization scanning for all targets and
    in the separate hot-add/remove [aacraid] thread) merely issues
    _aac_probe_container and then simple spins calling schedule() waiting for
    completion.

    Signed-off-by: Mark Haverkamp
    Signed-off-by: James Bottomley

    Mark Haverkamp
     
  • Received from Mark Salyzyn,

    This patch is to resolve a namespace issue that will result from a patch
    expected in the future that adds a new interface; rationalized as
    correcting a long term issue where hw_fib, instead of hw_fib_va, refers
    to the virtual address space and hw_fib_pa refers to the physical
    address space. A small fragment of this patch also cleans up an unused
    variable that was close to the patch fragments.

    Signed-off-by: Mark Haverkamp
    Signed-off-by: James Bottomley

    Mark Haverkamp
     
  • Received from Mark Salyzyn,

    This patch updates the adapter restart function to deal with some
    adapters that have specific IOP reset needs. Since the code for
    restarting the adapter was in two places, changed over to utilizing a
    platform function in one place.

    Signed-off-by: Mark Haverkamp
    Signed-off-by: James Bottomley

    Mark Haverkamp
     
  • Some targets can return both valid data and sense information.
    Always update the request data_len from the SCSI command residual.
    Callers should interpret sense data to determine what parts of the
    data are valid in case of a CHECK CONDITION status.

    Signed-off-by: Pete Wyckoff
    Signed-off-by: James Bottomley

    Pete Wyckoff
     
  • tgt notifies a LLD of the failure with sense when it hits the
    user-space daemon bugs. However, tgt doesn't know anything about SCSI
    devices that initiators talks to. So it's impossible to send proper
    sense buffer (format and contents).

    This patch changes tgt not to notify a LLD of the failure with bogus
    sense. Instead, tgt just re-queues the failure command to the internal
    list so that it will be freed cleanly later on when the scsi_host is
    removed.

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

    FUJITA Tomonori
     
  • This patch updates the FC transport for all speeds identified in
    SM-HBA. Note: it does not sync the "bit" definitions, as that is
    actually insulated from user-space via the sysfs text string. (I could
    do it, but it does introduce a potential binary-incompatibility).

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

    James Smart
     
  • Signed-off-by: Andrew Vasquez
    Signed-off-by: James Bottomley

    Andrew Vasquez
     
  • The module parameter, ql2xextended_error_logging, can now be
    set dynamically by writing to the following sysfs entry:

    /sys/module/qla2xxx/parameters/ql2xextended_error_logging

    This alleviates the need for the driver to be unloaded and
    reloaded in order to enable logging.

    Signed-off-by: Andrew Vasquez
    Signed-off-by: James Bottomley

    Andrew Vasquez
     
  • There's no need given, I/O has been quiesced, RISC
    interrupts have been disabled, and finally the RISC has been
    paused. Flash manipulation on ISP21xx, ISP22xx, and ISP23xx
    parts requires the RISC to go through a full reset to
    recover.

    Signed-off-by: Andrew Vasquez
    Signed-off-by: James Bottomley

    Andrew Vasquez
     
  • We're observing soft lockups during HBA FLASH retrieval and
    update. Add cond_resched() each time around the tight-loops
    during flash read()s/write()s.

    Signed-off-by: Andrew Vasquez
    Signed-off-by: James Bottomley

    Andrew Vasquez
     
  • Signed-off-by: Andrew Vasquez
    Signed-off-by: James Bottomley

    Andrew Vasquez
     
  • qla2xxx driver fails to handle RSCN events affecting area or domain due
    to an endian issue on big endian systems. This fixes the port_id_t
    structure on big endian systems.

    Signed-off-by: Malahal Naineni
    Acked-by: Seokmann Ju
    Signed-off-by: Andrew Vasquez
    Signed-off-by: James Bottomley

    Malahal Naineni
     
  • Currently scsi_wait_scan is only built modular if SCSI is modular.
    However, it's perfectly possible for a built in SCSI still to have
    modular drivers and thus need scsi_wait_scan as a module. Therefore,
    scsi_wait_scan should always be built as a module (unless the kernel
    doesn't support modules).

    Signed-off-by: James Bottomley

    James Bottomley
     
  • Fix kernel-doc warnings in fusion driver code.

    Signed-off-by: Randy Dunlap
    Acked-by: "Moore, Eric"
    Signed-off-by: James Bottomley

    Randy Dunlap
     

12 Mar, 2007

18 commits

  • Signed-off-by: James Bottomley

    James Bottomley
     
  • This driver was removed a while ago by commit

    099175c94a221fa2723b7273883c98cd32efe900

    However, it seems that pci2000.h wasn't properly eliminated, so remove
    it now.

    Signed-off-by: Robert P. J. Day
    Signed-off-by: James Bottomley

    Robert P. J. Day
     
  • The failure to map user-space pages leads to scsi command leak. It can
    happens mostly because of user-space daemon bugs (or OOM). This patch
    makes tgt just notify a LLD of the failure with sense when
    blk_rq_map_user() fails.

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

    FUJITA Tomonori
     
  • This patch simplify the way to notify LLDs of the command completion
    and addresses the following sense buffer problems:

    - can't handle both data and sense.
    - forces user-space to use aligned sense buffer

    tgt copies sense_data from userspace to cmnd->sense_buffer (if
    necessary), maps user-space pages (if necessary) and then calls
    host->transfer_response (host->transfer_data is removed).

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

    FUJITA Tomonori
     
  • scsi tgt breaks up a command into multple scatterlists
    if we cannot fit all the data in one. This was because
    the block rq helpers did not support large requests and
    because we can get a command of any old size so it is
    hard to preallocate pages for scatterlist large enough
    (we cannot really preallocate pages with the bio map
    user path). In 2.6.20, we added large request support to
    the block layer helper, blk_rq_map_user. And at LSF,
    we talked about increasing SCSI_MAX_PHYS_SEGMENTS for
    scsi tgt if we want to support really really :) large
    (greater than 256 * PAGE_SIZE in the worst mapping case)
    requests.

    The only target currently implemented does not even support
    the multiple scatterlists stuff and only supports smaller
    requests, so this patch just coverts scsi tgt to use
    blk_rq_map_user.

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

    Mike Christie
     
  • People do not read the README and seem to like to
    unselect the crc32c module even though iscsi_tcp selects
    it for them. This patch spits a error that tells the user
    that they really do need the module. Hopefully, we will
    get fewer people asking about this now.

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

    Mike Christie
     
  • For a while now, the block layer has seperated max sectors
    and max hw sectors. Software iscsi has no limit so this patch
    increases max hw sectors, so we can support large pass through
    commands.

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

    Mike Christie
     
  • Dave Miller meantioned that the data buffer in a past
    sense fixup patch was not gauranteed to be aligned
    properly for ia64. This patch has libiscsi use get_unalinged
    to make sure. There are a couple more places in the
    digest handling we may need to do this, but we are in the middle
    of fixing that code for big endien systems so just the sense
    access is fixed here.

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

    Mike Christie
     
  • qla4xxx and iscsi_tcp or iser could be creating
    sessions at the same time, so make session_nr id
    allocation atomic.

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

    Mike Christie
     
  • This patch renames DEFAULT_MAX_RECV_DATA_SEGMENT_LENGTH to avoid
    confusion with the drivers default values (DEFAULT_MAX_RECV_DATA_SEGMENT_LENGTH
    is the iscsi RFC specific default).

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

    Mike Christie
     
  • Consolidate the mtask clearing code.

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

    Mike Christie
     
  • It's possible that we call iscsi_xmitworker after iscsi_conn_release
    which causes a oops. This patch flushes the workqueue.

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

    Mike Christie
     
  • Add missing additional sense code and provide pointer to upstream
    reference (from Doug Gilbert).

    Add missing const (from Michael Tokarev).

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

    Martin K. Petersen
     
  • Convert the sd.c SCSI logging calls to scmd_printk()/sd_printk()
    instead of plain printk().

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

    Martin K. Petersen
     
  • Make SCSI disk printing more consistent:

    - Define sd_printk(), sd_print_sense_hdr() and sd_print_result()

    - Move relevant header bits into sd.h

    - Remove all the legacy disk_name passing and use scsi_disk pointers
    where possible

    - Switch printk() lines to the new sd_ functions so that output is
    consistent

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

    Martin K. Petersen
     
  • This patch enhances SCSI error printing by:

    - Making use of scsi_print_result() in the completion functions.

    - Having scmd_printk() output the disk name (when applicable).

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

    Martin K. Petersen
     
  • Clean up constants.c and make result printing more user friendly:

    - Refactor the command and sense functions so that the actual
    formatting can be called from the various helper functions with the
    correct prefix.

    - Replace scsi_print_hostbyte() and scsi_print_driverbyte() with
    scsi_print_result() which is verbose when CONFIG_SCSI_CONSTANTS is
    on.

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

    Martin K. Petersen
     
  • zfcp_fsf_protstatus_eval() takes always the 'wrong' branch.

    Likely Profiling Results
    ---------------------------------------------------------
    [+- ] Type | # True | # False | Function:Filename@Line
    +unlikely | 11042| 0 zfcp_fsf_protstatus_eval()

    Acked-by: Swen Schillig
    Signed-off-by: Heiko Carstens
    Signed-off-by: James Bottomley

    Heiko Carstens
     

11 Mar, 2007

1 commit

  • This reverts commit d2487cb4257dafb686f682285854fe7f02ca29d8.

    Russell King points out that it's obviously bogus, and I have to agree.
    Not only does "irq" not even exist in that scope, but we obviously need
    to free the irq that we actually requested, and that's IRQ_USB.

    Reported-by: Russell King
    Cc: Andrew Morton
    Cc: Greg KH
    Cc: David Brownell ,
    Cc: Milan Svoboda
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

10 Mar, 2007

1 commit