20 Mar, 2019

1 commit

  • Fixes gcc '-Wunused-but-set-variable' warning:

    drivers/message/fusion/mptspi.c: In function 'mptspi_writeIOCPage4':
    drivers/message/fusion/mptspi.c:262:9: warning:
    variable 'frameOffset' set but not used [-Wunused-but-set-variable]

    drivers/message/fusion/mptspi.c:261:9: warning:
    variable 'req_idx' set but not used [-Wunused-but-set-variable]

    They're never used and can be removed.

    Signed-off-by: YueHaibing
    Signed-off-by: Martin K. Petersen

    YueHaibing
     

19 Dec, 2018

1 commit

  • Most SCSI drivers want to enable "clustering", that is merging of
    segments so that they might span more than a single page. Remove the
    ENABLE_CLUSTERING define, and require drivers to explicitly set
    DISABLE_CLUSTERING to disable this feature.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Martin K. Petersen

    Christoph Hellwig
     

25 Apr, 2017

1 commit


12 Apr, 2016

1 commit

  • 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
     

25 Sep, 2014

1 commit

  • When using a virtual SCSI disk in a VMWare VM if blkdev_issue_zeroout is used
    data can be improperly zeroed out using the mptfusion driver. This patch
    disables write_same for this driver and the vmware subsystem_vendor which
    ensures that manual zeroing out is used instead.

    Cc: stable@vger.kernel.org
    BugLink: http://bugs.launchpad.net/bugs/1371591
    Reported-by: Bruce Lucas
    Tested-by: Chris J Arges
    Signed-off-by: Chris J Arges
    Reviewed-by: Martin K. Petersen
    Signed-off-by: Christoph Hellwig

    Chris J Arges
     

26 Jul, 2014

2 commits

  • Fixes the following smatch warnings:

    drivers/message/fusion/mptfc.c:529 mptfc_target_destroy() info:
    redundant null check on starget->hostdata calling kfree()

    drivers/message/fusion/mptspi.c:465 mptspi_target_destroy() info:
    redundant null check on starget->hostdata calling kfree()

    Signed-off-by: Joe Lawrence
    Acked-by: Sreekanth Reddy
    Signed-off-by: Christoph Hellwig

    Joe Lawrence
     
  • Fixes the following sparse warnings:

    drivers/message/fusion/mptbase.c:7011:1: warning: symbol
    'mpt_SoftResetHandler' was not declared. Should it be static?

    drivers/message/fusion/mptsas.c:1578:23: warning: symbol
    'mptsas_refreshing_device_handles' was not declared. Should it be
    static?

    drivers/message/fusion/mptsas.c:3653:24: warning: symbol
    'mptsas_expander_add' was not declared. Should it be static?

    drivers/message/fusion/mptsas.c:5327:1: warning: symbol
    'mptsas_shutdown' was not declared. Should it be static?

    drivers/message/fusion/mptspi.c:624:1: warning: symbol
    'mptscsih_quiesce_raid' was not declared. Should it be static?

    Signed-off-by: Joe Lawrence
    Acked-by: Sreekanth Reddy
    Reviewed-by: Christoph Hellwig
    Signed-off-by: Christoph Hellwig

    Joe Lawrence
     

29 May, 2014

1 commit

  • Removing the host_lock from the I/O submission path gives a huge
    scalability improvement.

    Signed-off-by: Matthew Wilcox
    Reviewed-by: Nicholas Bellinger
    Reviewed-by: Praveen Krishnamoorthy
    Acked-by: Sreekanth Reddy
    Signed-off-by: Christoph Hellwig

    Matthew Wilcox
     

10 Apr, 2013

1 commit


04 Jan, 2013

1 commit

  • CONFIG_HOTPLUG is going away as an option. As a result, the __dev*
    markings need to be removed.

    This change removes the use of __devinit, __devexit_p, __devinitdata,
    and __devexit from these drivers.

    Based on patches originally written by Bill Pemberton, but redone by me
    in order to handle some of the coding style issues better, by hand.

    Cc: Bill Pemberton
    Cc: Nagalakshmi Nandigama
    Cc: Sreekanth Reddy
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

02 May, 2011

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
     

28 Jul, 2010

1 commit


11 Apr, 2010

2 commits


30 Mar, 2010

1 commit

  • …it slab.h inclusion from percpu.h

    percpu.h is included by sched.h and module.h and thus ends up being
    included when building most .c files. percpu.h includes slab.h which
    in turn includes gfp.h making everything defined by the two files
    universally available and complicating inclusion dependencies.

    percpu.h -> slab.h dependency is about to be removed. Prepare for
    this change by updating users of gfp and slab facilities include those
    headers directly instead of assuming availability. As this conversion
    needs to touch large number of source files, the following script is
    used as the basis of conversion.

    http://userweb.kernel.org/~tj/misc/slabh-sweep.py

    The script does the followings.

    * Scan files for gfp and slab usages and update includes such that
    only the necessary includes are there. ie. if only gfp is used,
    gfp.h, if slab is used, slab.h.

    * When the script inserts a new include, it looks at the include
    blocks and try to put the new include such that its order conforms
    to its surrounding. It's put in the include block which contains
    core kernel includes, in the same order that the rest are ordered -
    alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
    doesn't seem to be any matching order.

    * If the script can't find a place to put a new include (mostly
    because the file doesn't have fitting include block), it prints out
    an error message indicating which .h file needs to be added to the
    file.

    The conversion was done in the following steps.

    1. The initial automatic conversion of all .c files updated slightly
    over 4000 files, deleting around 700 includes and adding ~480 gfp.h
    and ~3000 slab.h inclusions. The script emitted errors for ~400
    files.

    2. Each error was manually checked. Some didn't need the inclusion,
    some needed manual addition while adding it to implementation .h or
    embedding .c file was more appropriate for others. This step added
    inclusions to around 150 files.

    3. The script was run again and the output was compared to the edits
    from #2 to make sure no file was left behind.

    4. Several build tests were done and a couple of problems were fixed.
    e.g. lib/decompress_*.c used malloc/free() wrappers around slab
    APIs requiring slab.h to be added manually.

    5. The script was run on all .h files but without automatically
    editing them as sprinkling gfp.h and slab.h inclusions around .h
    files could easily lead to inclusion dependency hell. Most gfp.h
    inclusion directives were ignored as stuff from gfp.h was usually
    wildly available and often used in preprocessor macros. Each
    slab.h inclusion directive was examined and added manually as
    necessary.

    6. percpu.h was updated not to include slab.h.

    7. Build test were done on the following configurations and failures
    were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
    distributed build env didn't work with gcov compiles) and a few
    more options had to be turned off depending on archs to make things
    build (like ipr on powerpc/64 which failed due to missing writeq).

    * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
    * powerpc and powerpc64 SMP allmodconfig
    * sparc and sparc64 SMP allmodconfig
    * ia64 SMP allmodconfig
    * s390 SMP allmodconfig
    * alpha SMP allmodconfig
    * um on x86_64 SMP allmodconfig

    8. percpu.h modifications were reverted so that it could be applied as
    a separate patch and serve as bisection point.

    Given the fact that I had only a couple of failures from tests on step
    6, I'm fairly confident about the coverage of this conversion patch.
    If there is a breakage, it's likely to be something in one of the arch
    headers which should be easily discoverable easily on most builds of
    the specific arch.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

23 Aug, 2009

1 commit


10 Jun, 2009

5 commits

  • 1) rewrite of ioctl_cmds internal generated function that issue commands to
    firmware, porting them to be single threaded using the generic MPT_MGMT
    struct. All wait Queues are replace by completion Queue.
    2) added seperate callback handler for ioctl task managment
    (mptctl_taskmgmt_reply), to handle command that timeout
    3) rewrite mptctl_bus_reset

    Signed-off-by: Kashyap Desai
    Signed-off-by: James Bottomley

    Kashyap, Desai
     
  • 1.) Added taskmgmt_quiesce_io flag in IOC and removed resetPending from
    _MPT_SCSI_HOST struct.
    2.) Reset from Scsi mid layer and internal Reset are seperate context.
    Adding DeviceResetCtx for internal Device reset frame.
    mptsas_taskmgmt_complete is optimized as part of implementation.

    Signed-off-by: Kashyap Desai
    Signed-off-by: James Bottomley

    Kashyap, Desai
     
  • 1.) rewrite taskmanagement request and completion routines, making them
    single threaded and using the generic MPT_MGMT struct, deleting
    mptscsih_TMHandler, replacing with single request TM handler
    mptscsih_IssueTaskMgmt, and killing the watchdog timer functions.
    2.) cleanup ioc_reset callback handlers, introducing wrappers for
    synchronizing error recovery (mpt_set_taskmgmt_in_progress_flag,
    mpt_clear_taskmgmt_in_progress_flag), as the fusion firmware only handles
    one task management request at a time

    Signed-off-by: Kashyap Desai
    Signed-off-by: James Bottomley

    Kashyap, Desai
     
  • Rewrite of all internal generated functions that issue commands to firmware,
    porting them to be single threaded using the generic MPT_MGMT
    struct. Implemented using completion Queue.

    Signed-off-by: Kashyap Desai
    Signed-off-by: James Bottomley

    Kashyap, Desai
     
  • The reason for this change is there is a data corruption when four different
    physical memory regions in the 36GB to 37GB region are
    accessed. This is only affecting 1078.

    The solution is we need to use different addressing when filling in
    the scatter gather table for the effected memory regions. So instead
    of snooping on all four different memory holes, we treat any physical
    addresses in the 36GB address with the same algorithm.

    The fix is explained below
    1) Ensure that the message frames are NOT located in the trouble
    region. There is no remapping available for message frames, they must
    be allocated outside the problem region.
    2) Ensure that Sense buffers are NOT in the trouble region. There is
    no remapping available.
    3) Walk through the SGE entries and if any are inside the trouble region
    then they need to be remapped as discussed below.
    1) Set the Local Address bit in the SGE Flags field.
    MPI_SGE_FLAGS_LOCAL_ADDRESS
    2) Ensure we are using 64-bit SGEs
    3) Set MSb (Bit 63) of the 64-bit address, this will indicate buffer
    location is Host Memory.

    Signed-off-by: Kashyap Desai
    Signed-off-by: James Bottomley

    Kashyap, Desai
     

16 Jul, 2008

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (102 commits)
    [SCSI] scsi_dh: fix kconfig related build errors
    [SCSI] sym53c8xx: Fix bogus sym_que_entry re-implementation of container_of
    [SCSI] scsi_cmnd.h: remove double inclusion of linux/blkdev.h
    [SCSI] make struct scsi_{host,target}_type static
    [SCSI] fix locking in host use of blk_plug_device()
    [SCSI] zfcp: Cleanup external header file
    [SCSI] zfcp: Cleanup code in zfcp_erp.c
    [SCSI] zfcp: zfcp_fsf cleanup.
    [SCSI] zfcp: consolidate sysfs things into one file.
    [SCSI] zfcp: Cleanup of code in zfcp_aux.c
    [SCSI] zfcp: Cleanup of code in zfcp_scsi.c
    [SCSI] zfcp: Move status accessors from zfcp to SCSI include file.
    [SCSI] zfcp: Small QDIO cleanups
    [SCSI] zfcp: Adapter reopen for large number of unsolicited status
    [SCSI] zfcp: Fix error checking for ELS ADISC requests
    [SCSI] zfcp: wait until adapter is finished with ERP during auto-port
    [SCSI] ibmvfc: IBM Power Virtual Fibre Channel Adapter Client Driver
    [SCSI] sg: Add target reset support
    [SCSI] lib: Add support for the T10 (SCSI) Data Integrity Field CRC
    [SCSI] sd: Move scsi_disk() accessor function to sd.h
    ...

    Linus Torvalds
     

12 Jul, 2008

1 commit


08 Jul, 2008

1 commit

  • The problem here is that if the ioc faults too early in the bring up
    sequence (as it usually does for an irq routing problem), ioc_reset gets
    called before the scsi host is even allocated. This causes an oops when
    it later schedules a renegotiation. Fix this by checking ioc->sh before
    trying to renegotiate.

    Cc: "Moore, Eric"
    Cc: Stable Tree
    Signed-off-by: James Bottomley

    James Bottomley
     

05 Jun, 2008

1 commit


13 Oct, 2007

10 commits


28 Jul, 2007

1 commit


19 Jul, 2007

2 commits


16 Jul, 2007

1 commit

  • * master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (166 commits)
    [SCSI] ibmvscsi: convert to use the data buffer accessors
    [SCSI] dc395x: convert to use the data buffer accessors
    [SCSI] ncr53c8xx: convert to use the data buffer accessors
    [SCSI] sym53c8xx: convert to use the data buffer accessors
    [SCSI] ppa: coding police and printk levels
    [SCSI] aic7xxx_old: remove redundant GFP_ATOMIC from kmalloc
    [SCSI] i2o: remove redundant GFP_ATOMIC from kmalloc from device.c
    [SCSI] remove the dead CYBERSTORMIII_SCSI option
    [SCSI] don't build scsi_dma_{map,unmap} for !HAS_DMA
    [SCSI] Clean up scsi_add_lun a bit
    [SCSI] 53c700: Remove printk, which triggers because of low scsi clock on SNI RMs
    [SCSI] sni_53c710: Cleanup
    [SCSI] qla4xxx: Fix underrun/overrun conditions
    [SCSI] megaraid_mbox: use mutex instead of semaphore
    [SCSI] aacraid: add 51245, 51645 and 52245 adapters to documentation.
    [SCSI] qla2xxx: update version to 8.02.00-k1.
    [SCSI] qla2xxx: add support for NPIV
    [SCSI] stex: use resid for xfer len information
    [SCSI] Add Brownie 1200U3P to blacklist
    [SCSI] scsi.c: convert to use the data buffer accessors
    ...

    Linus Torvalds