16 Apr, 2016

3 commits

  • VPD pages 0x0 and 0x83 are mandatory even for SPC-2, so we should be
    lowering the restriction to avoid having to whitelist every SPC-2
    compliant device.

    Signed-off-by: Hannes Reinecke
    Reviewed-by: Johannes Thumshirn
    Signed-off-by: Martin K. Petersen

    Hannes Reinecke
     
  • Now that we've done a more comprehensive fix with the intermediate
    target state we can remove the previous hack introduced with commit
    90a88d6ef88e ("scsi: fix soft lockup in scsi_remove_target() on module
    removal").

    Signed-off-by: Johannes Thumshirn
    Cc: stable@vger.kernel.org
    Reviewed-by: Ewan D. Milne
    Reviewed-by: Hannes Reinecke
    Signed-off-by: Martin K. Petersen

    Johannes Thumshirn
     
  • Add intermediate STARGET_REMOVE state to scsi_target_state to avoid
    running into the BUG_ON() in scsi_target_reap(). The STARGET_REMOVE
    state is only valid in the path from scsi_remove_target() to
    scsi_target_destroy() indicating this target is going to be removed.

    This re-fixes the problem introduced in commits bc3f02a795d3 ("[SCSI]
    scsi_remove_target: fix softlockup regression on hot remove") and
    40998193560d ("scsi: restart list search after unlock in
    scsi_remove_target") in a more comprehensive way.

    [mkp: Included James' fix for scsi_target_destroy()]

    Signed-off-by: Johannes Thumshirn
    Fixes: 40998193560dab6c3ce8d25f4fa58a23e252ef38
    Cc: stable@vger.kernel.org
    Reported-by: Sergey Senozhatsky
    Tested-by: Sergey Senozhatsky
    Reviewed-by: Ewan D. Milne
    Reviewed-by: Hannes Reinecke
    Reviewed-by: James Bottomley
    Signed-off-by: Martin K. Petersen

    Johannes Thumshirn
     

12 Apr, 2016

37 commits

  • scsi host is added after negotiating the max number of IOs with
    Firmware.

    Signed-off-by: Narsimhulu Musini
    Signed-off-by: Sesidhar Baddela
    Signed-off-by: Martin K. Petersen

    Narsimhulu Musini
     
  • While HBA reset is in progress, if IO/TM completion is received for the
    same IO then IO/TM completion path releases the driver private resources
    associated with IO. This fix prevents releasing the resources in
    IO and TM completion path if HBA reset is in progress.

    Signed-off-by: Narsimhulu Musini
    Signed-off-by: Sesidhar Baddela
    Signed-off-by: Martin K. Petersen

    Narsimhulu Musini
     
  • - On posting an IO to the firmware, adapter generates an interrupt.
    Due to hardware issues, sometimes the adapter fails to generate
    the interrupt. This behavior skips updating transmit queue-
    counters, which in turn causes the queue full condition. The fix
    addresses the queue full condition.

    - The fix also reserves a slot in transmit queue for hba reset.
    when queue full is observed during IO, there will always be room
    to post hba reset command.

    Signed-off-by: Narsimhulu Musini
    Signed-off-by: Sesidhar Baddela
    Signed-off-by: Martin K. Petersen

    Narsimhulu Musini
     
  • Fix deletes the snic targets synchronously prior to deletion of host.

    Signed-off-by: Narsimhulu Musini
    Signed-off-by: Sesidhar Baddela
    Signed-off-by: Martin K. Petersen

    Narsimhulu Musini
     
  • Fix handles control path queue issues such as queue full and sudden
    removal of hardware.

    Signed-off-by: Narsimhulu Musini
    Signed-off-by: Sesidhar Baddela
    Signed-off-by: Martin K. Petersen

    Narsimhulu Musini
     
  • - LUN goes offline if there are at least two scsi command timeouts
    Completing the IO with scsi_done() fixes the issue.

    Signed-off-by: Narsimhulu Musini
    Signed-off-by: Sesidhar Baddela
    Signed-off-by: Martin K. Petersen

    Narsimhulu Musini
     
  • Adding additional stats, and fixed logging messages.
    - Added qdepth change stats
    - Added separate isr stats for each type of interrupt
    - Fixed race in updating active IOs
    - Suppressed Link event message for DAS backend.

    Signed-off-by: Narsimhulu Musini
    Signed-off-by: Sesidhar Baddela
    Signed-off-by: Martin K. Petersen

    Narsimhulu Musini
     
  • Signed-off-by: Dick Kennedy
    Signed-off-by: James Smart
    Signed-off-by: Martin K. Petersen

    James Smart
     
  • Signed-off-by: Dick Kennedy
    Signed-off-by: James Smart
    Signed-off-by: Martin K. Petersen

    James Smart
     
  • Signed-off-by: Dick Kennedy
    Signed-off-by: James Smart
    Signed-off-by: Martin K. Petersen

    James Smart
     
  • Revise versions to reflect SmartSAN 2.0 support

    RDP updated to support additional descriptors:
    Credit descriptor
    Optical Element Data descriptors for Temperature, Voltage,
    Bias current, TX power and TX power.
    Optical Product Data descriptor.

    Signed-off-by: Dick Kennedy
    Signed-off-by: James Smart
    Signed-off-by: Martin K. Petersen

    James Smart
     
  • When the switch is rebooted, the lpfc driver fails to log
    into the fabric, and Unexpected timeout message is seen.

    Fix: Do not issue RegVFI if the FLOGI was internally aborted.

    Signed-off-by: Dick Kennedy
    Signed-off-by: James Smart
    Signed-off-by: Martin K. Petersen

    James Smart
     
  • Pass cmd iu payloads inline to adapter job structure rather than as
    separate dma buffers.

    Signed-off-by: Dick Kennedy
    Signed-off-by: James Smart
    Signed-off-by: Martin K. Petersen

    James Smart
     
  • The default rpi completion handler does back to back puts to force the
    removal of the ndlp. This ends up calling lpfc_unreg_rpi after the
    reference count is at 0.

    Fix: Check the reference count of the ndlp before getting the ref to
    make sure we are not getting a reference on a removed object.

    Signed-off-by: Dick Kennedy
    Signed-off-by: James Smart
    Signed-off-by: Martin K. Petersen

    James Smart
     
  • Driver didn't program the REG_VFI mailbox correctly, giving the adapter
    bad addresses.

    Signed-off-by: Dick Kennedy
    Signed-off-by: James Smart
    Signed-off-by: Martin K. Petersen

    James Smart
     
  • After a link bounce, when a remote port issues a LOGO while a REGLOGIN
    is pending on that port, the driver does not clean up the ndlp
    structure. May result in stack traces in the console log.

    Fix: Clear the NLP_REG_LOGIN_SEND flag on the ndlp in the routine

    Signed-off-by: Dick Kennedy
    Signed-off-by: James Smart
    Signed-off-by: Martin K. Petersen

    James Smart
     
  • Avoid that building with W=1 causes gcc to report warnings about symbols
    that have not been declared.

    Signed-off-by: Bart Van Assche
    Reviewed-by: Mike Christie
    Reviewed-by: Johannes Thumshirn
    Signed-off-by: Martin K. Petersen

    Bart Van Assche
     
  • The output of "git grep -nHw iscsi_is_flashnode_conn_dev" shows that
    this function is only called from inside source file
    drivers/scsi/scsi_transport_iscsi.c. Hence unexport this function.

    Signed-off-by: Bart Van Assche
    Reviewed-by: Mike Christie
    Reviewed-by: Johannes Thumshirn
    Signed-off-by: Martin K. Petersen

    Bart Van Assche
     
  • Avoid that building with W=1 causes gcc to report warnings about
    set-but-not-used variables.

    Signed-off-by: Bart Van Assche
    Reviewed-by: Mike Christie
    Reviewed-by: Johannes Thumshirn
    Signed-off-by: Martin K. Petersen

    Bart Van Assche
     
  • Avoid that building with W=1 causes gcc to report warnings about
    set-but-not-used variables.

    Signed-off-by: Bart Van Assche
    Reviewed-by: Mike Christie
    Reviewed-by: Johannes Thumshirn
    Signed-off-by: Martin K. Petersen

    Bart Van Assche
     
  • Running "git grep -nHw iscsi_eh_target_reset" shows that this function
    is only called from inside the drivers/scsi/libiscsi.c source
    file. Hence unexport this function.

    Signed-off-by: Bart Van Assche
    Reviewed-by: Mike Christie
    Reviewed-by: Johannes Thumshirn
    Signed-off-by: Martin K. Petersen

    Bart Van Assche
     
  • In the Linux kernel it is preferred to return a meaningful error code
    instead of -1. This patch does not change the behavior of the caller of
    qla82xx_pinit_from_rom().

    Signed-off-by: Bart Van Assche
    Cc: Quinn Tran
    Cc: Himanshu Madhani
    Cc: Christoph Hellwig
    Reviewed-by: Johannes Thumshirn
    Acked-by: Quinn Tran
    Signed-off-by: Martin K. Petersen

    Bart Van Assche
     
  • Running the command "git grep -nHw scsi_is_fc_vport" shows that this
    function is only called from inside scsi_transport_fc.c. Hence unexport
    this function.

    Signed-off-by: Bart Van Assche
    Cc: Hannes Reinecke
    Cc: James Smart
    Reviewed-by: Hannes Reinicke
    Signed-off-by: Martin K. Petersen

    Bart Van Assche
     
  • When issuing I/O we check if rport is online through libfc
    rport_lookup() function which needs to be protected by mutex lock that
    cannot acquired in I/O context. The change is to use midlayer remote
    port s dd_data which is preserved until its devloss timeout and no
    protection is required. The the scsi_cmnd error code is expected to be
    in the left 16 bits of the result field. Changed to correct this. Fnic
    driver version changed from 1.6.0.20 to 1.6.0.21

    Signed-off-by: Satish Kharat
    Signed-off-by: Sesidhar Baddela
    Reviewed-by: Ewan Milne
    Signed-off-by: Martin K. Petersen

    Satish Kharat
     
  • In case of LUN reset, the device reset command is issued with one of the
    I/Os that has timed out on that LUN. The change is to also return this
    I/O with error status set to DID_RESET. In case when the reset is issued
    using the sg_reset tool (from sg3_utils) it is a new command and new_sc
    is set to 1. Fnic driver version changed from 1.6.0.19 to 1.6.0.20

    [mkp: Fixed checkpatch warning]

    Signed-off-by: Satish Kharat
    Signed-off-by: Sesidhar Baddela
    Reviewed-by: Ewan Milne
    Signed-off-by: Martin K. Petersen

    Satish Kharat
     
  • If an I/O times out and an abort issued by host, if the abort is
    successful we need to set scsi status as DID_ABORT. Or else the
    mid-layer error handler which looks for this error code, will offline
    the device. Also if the original I/O is not found in fnic firmware, we
    will consider the abort as successful. The start_time assignment is
    moved because of the new goto. Fnic driver version changed from
    1.6.0.17a to 1.6.0.19, version 1.6.0.18 has been skipped

    [mkp: Fixed checkpatch warning]

    Signed-off-by: Satish Kharat
    Signed-off-by: Sesidhar Baddela
    Reviewed-by: Ewan D. Milne
    Signed-off-by: Martin K. Petersen

    Satish Kharat
     
  • Add new trace functions for ZBC_IN and ZBC_OUT.

    Reviewed-by: Doug Gilbert
    Reviewed-by: Ewan D. Milne
    Signed-off-by: Hannes Reinecke
    Signed-off-by: Martin K. Petersen

    Hannes Reinecke
     
  • Reviewed-by: Ewan D. Milne
    Signed-off-by: Hannes Reinecke
    Signed-off-by: Martin K. Petersen

    Hannes Reinecke
     
  • scsi_opcode_name() is displaying the opcode, not the service
    action.

    Reviewed-by: Ewan D. Milne
    Signed-off-by: Hannes Reinecke
    Signed-off-by: Martin K. Petersen

    Hannes Reinecke
     
  • On larger installations it is useful to disable automatic LUN scanning,
    and only add the required LUNs via udev rules. This can speed up bootup
    dramatically.

    This patch introduces a new scan module parameter value 'manual', which
    works like 'none', but can be overridden by setting the 'rescan' value
    from scsi_scan_target to 'SCSI_SCAN_MANUAL'. And it updates all
    relevant callers to set the 'rescan' value to 'SCSI_SCAN_MANUAL' if
    invoked via the 'scan' option in sysfs.

    Signed-off-by: Hannes Reinecke
    Reviewed-by: Ewan D. Milne
    Tested-by: Laurence Oberman
    Signed-off-by: Martin K. Petersen

    Hannes Reinecke
     
  • I'm told that some targets are liable to disconnect a REQUEST SENSE
    command. Theoretically this would cause a command undergoing autosense to
    be moved onto the disconnected list. The bus reset handler must call
    complete_cmd() for these commands, otherwise the hostdata->sensing pointer
    will not get cleared. That would cause autosense processing to stall and
    a timeout or an incorrect scsi_eh_restore_cmnd() would eventually follow.

    Signed-off-by: Finn Thain
    Reported-by: Michael Schmitz
    Tested-by: Ondrej Zary
    Reviewed-by: Hannes Reinecke
    Signed-off-by: Martin K. Petersen

    Finn Thain
     
  • Fix various issues: Comments about bus errors are incorrect. The
    PDMA asm must return the size of the memory access that faulted so the
    transfer count can be adjusted accordingly. A phase change may cause a
    bus error but should not be treated as failure. A bus error does not
    always imply a phase change and generally the transfer may continue.
    Scatter/gather doesn't seem to work with PDMA due to overruns. This is
    a pity because peak throughput seems to double with SG_ALL.
    Tested on a Mac LC III and a PowerBook 520.

    Signed-off-by: Finn Thain
    Reviewed-by: Hannes Reinecke
    Signed-off-by: Martin K. Petersen

    Finn Thain
     
  • The benefit of limiting can_queue to 1 is that atari_scsi shares the
    ST DMA chip more fairly with other drivers (e.g. falcon-ide).

    Unfortunately, this can limit SCSI bus utilization. On systems without
    IDE, atari_scsi should issue SCSI commands whenever it can arbitrate for
    the bus. Make that possible by making can_queue configurable.

    Signed-off-by: Finn Thain
    Reviewed-by: Hannes Reinecke
    Tested-by: Michael Schmitz
    Signed-off-by: Martin K. Petersen

    Finn Thain
     
  • This setting does not need to be conditional on Atari ST or TT.

    Signed-off-by: Finn Thain
    Tested-by: Michael Schmitz
    Reviewed-by: Hannes Reinecke
    Signed-off-by: Martin K. Petersen

    Finn Thain
     
  • Update kernel parameter documentation for atari_scsi, mac_scsi and
    g_NCR5380 drivers. Remove duplication.

    Signed-off-by: Finn Thain
    Reviewed-by: Hannes Reinecke
    Signed-off-by: Martin K. Petersen

    Finn Thain
     
  • Signed-off-by: Finn Thain
    Reviewed-by: Hannes Reinecke
    Tested-by: Michael Schmitz
    Tested-by: Ondrej Zary
    Signed-off-by: Martin K. Petersen

    Finn Thain
     
  • Signed-off-by: Finn Thain
    Reviewed-by: Hannes Reinecke
    Tested-by: Michael Schmitz
    Tested-by: Ondrej Zary
    Signed-off-by: Martin K. Petersen

    Finn Thain