03 Oct, 2020

1 commit


12 Jul, 2019

1 commit

  • Pull SCSI scatter-gather list updates from James Bottomley:
    "This topic branch covers a fundamental change in how our sg lists are
    allocated to make mq more efficient by reducing the size of the
    preallocated sg list.

    This necessitates a large number of driver changes because the
    previous guarantee that if a driver specified SG_ALL as the size of
    its scatter list, it would get a non-chained list and didn't need to
    bother with scatterlist iterators is now broken and every driver
    *must* use scatterlist iterators.

    This was broken out as a separate topic because we need to convert all
    the drivers before pulling the trigger and unconverted drivers kept
    being found, necessitating a rebase"

    * tag 'scsi-sg' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (21 commits)
    scsi: core: don't preallocate small SGL in case of NO_SG_CHAIN
    scsi: lib/sg_pool.c: clear 'first_chunk' in case of no preallocation
    scsi: core: avoid preallocating big SGL for data
    scsi: core: avoid preallocating big SGL for protection information
    scsi: lib/sg_pool.c: improve APIs for allocating sg pool
    scsi: esp: use sg helper to iterate over scatterlist
    scsi: NCR5380: use sg helper to iterate over scatterlist
    scsi: wd33c93: use sg helper to iterate over scatterlist
    scsi: ppa: use sg helper to iterate over scatterlist
    scsi: pcmcia: nsp_cs: use sg helper to iterate over scatterlist
    scsi: imm: use sg helper to iterate over scatterlist
    scsi: aha152x: use sg helper to iterate over scatterlist
    scsi: s390: zfcp_fc: use sg helper to iterate over scatterlist
    scsi: staging: unisys: visorhba: use sg helper to iterate over scatterlist
    scsi: usb: image: microtek: use sg helper to iterate over scatterlist
    scsi: pmcraid: use sg helper to iterate over scatterlist
    scsi: ipr: use sg helper to iterate over scatterlist
    scsi: mvumi: use sg helper to iterate over scatterlist
    scsi: lpfc: use sg helper to iterate over scatterlist
    scsi: advansys: use sg helper to iterate over scatterlist
    ...

    Linus Torvalds
     

21 Jun, 2019

1 commit

  • Unlike the legacy I/O path, scsi-mq preallocates a large array to hold
    the scatterlist for each request. This static allocation can consume
    substantial amounts of memory on modern controllers which support a
    large number of concurrently outstanding requests.

    To facilitate a switch to a smaller static allocation combined with a
    dynamic allocation for requests that need it, we need to make sure all
    SCSI drivers handle chained scatterlists correctly.

    Convert remaining drivers that directly dereference the scatterlist
    array to using the iterator functions.

    [mkp: clarified commit message and folded in build fix reported by zeroday]

    Reviewed-by: Christoph Hellwig
    Reviewed-by: Bart Van Assche
    Reviewed-by: Ewan D. Milne
    Signed-off-by: Ming Lei
    Signed-off-by: Martin K. Petersen

    Ming Lei
     

31 May, 2019

1 commit

  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation version 2 of the license this program
    is distributed in the hope that it will be useful but without any
    warranty without even the implied warranty of merchantability or
    fitness for a particular purpose see the gnu general public license
    for more details you should have received a copy of the gnu general
    public license along with this program if not write to the free
    software foundation inc 59 temple place suite 330 boston ma 02111
    1307 usa

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

    has been chosen to replace the boilerplate/reference in 83 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Richard Fontana
    Reviewed-by: Kate Stewart
    Reviewed-by: Allison Randal
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190527070034.021731668@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

20 Mar, 2019

1 commit

  • Fix following sparse warning:

    drivers/scsi/mvumi.c:1797:48: warning: Using plain integer as NULL pointer
    drivers/scsi/mvumi.c:2143:50: warning: Using plain integer as NULL pointer
    drivers/scsi/mvumi.c:755:58: warning: Using plain integer as NULL pointer

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

    YueHaibing
     

10 Mar, 2019

1 commit

  • Pull SCSI updates from James Bottomley:
    "This is mostly update of the usual drivers: arcmsr, qla2xxx, lpfc,
    hisi_sas, target/iscsi and target/core.

    Additionally Christoph refactored gdth as part of the dma changes. The
    major mid-layer change this time is the removal of bidi commands and
    with them the whole of the osd/exofs driver and filesystem. This is a
    major simplification for block and mq in particular"

    * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (240 commits)
    scsi: cxgb4i: validate tcp sequence number only if chip version pf
    scsi: core: replace GFP_ATOMIC with GFP_KERNEL in scsi_scan.c
    scsi: mpt3sas: Add missing breaks in switch statements
    scsi: aacraid: Fix missing break in switch statement
    scsi: kill command serial number
    scsi: csiostor: drop serial_number usage
    scsi: mvumi: use request tag instead of serial_number
    scsi: dpt_i2o: remove serial number usage
    scsi: st: osst: Remove negative constant left-shifts
    scsi: ufs-bsg: Allow reading descriptors
    scsi: ufs: Allow reading descriptor via raw upiu
    scsi: ufs-bsg: Change the calling convention for write descriptor
    scsi: ufs: Remove unused device quirks
    Revert "scsi: ufs: disable vccq if it's not needed by UFS device"
    scsi: megaraid_sas: Remove a bunch of set but not used variables
    scsi: clean obsolete return values of eh_timed_out
    scsi: sd: Optimal I/O size should be a multiple of physical block size
    scsi: MAINTAINERS: SCSI initiator and target tweaks
    scsi: fcoe: make use of fip_mode enum complete
    ...

    Linus Torvalds
     

27 Feb, 2019

1 commit


08 Jan, 2019

1 commit

  • We already need to zero out memory for dma_alloc_coherent(), as such
    using dma_zalloc_coherent() is superflous. Phase it out.

    This change was generated with the following Coccinelle SmPL patch:

    @ replace_dma_zalloc_coherent @
    expression dev, size, data, handle, flags;
    @@

    -dma_zalloc_coherent(dev, size, handle, flags)
    +dma_alloc_coherent(dev, size, handle, flags)

    Suggested-by: Christoph Hellwig
    Signed-off-by: Luis Chamberlain
    [hch: re-ran the script on the latest tree]
    Signed-off-by: Christoph Hellwig

    Luis Chamberlain
     

19 Dec, 2018

2 commits

  • The same effects can be achieved by setting the dma_boundary to
    PAGE_SIZE - 1 and the max_segment_size to PAGE_SIZE, so shift those
    settings into the drivers. Note that in many cases the setting might
    be bogus, but this keeps the status quo.

    [mkp: fix myrs and myrb]

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

    Christoph Hellwig
     
  • A few drivers were not setting the use_clustering flag at all and thus
    default to disable. Fix them up to explicitly set this field in
    preparation for additional cleanups.

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

    Christoph Hellwig
     

16 Nov, 2018

1 commit


18 Oct, 2018

1 commit

  • Switch from the legacy PCI DMA API to the generic DMA API.

    Also reuse an existing helper (after fixing the error return) to set the
    DMA mask instead of having three copies of the code.

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Johannes Thumshirn
    Signed-off-by: Martin K. Petersen

    Christoph Hellwig
     

11 Jun, 2018

1 commit

  • Pull SCSI updates from James Bottomley:
    "This is mostly updates to the usual drivers: ufs, qedf, mpt3sas, lpfc,
    xfcp, hisi_sas, cxlflash, qla2xxx.

    In the absence of Nic, we're also taking target updates which are
    mostly minor except for the tcmu refactor.

    The only real core change to worry about is the removal of high page
    bouncing (in sas, storvsc and iscsi). This has been well tested and no
    problems have shown up so far"

    * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (268 commits)
    scsi: lpfc: update driver version to 12.0.0.4
    scsi: lpfc: Fix port initialization failure.
    scsi: lpfc: Fix 16gb hbas failing cq create.
    scsi: lpfc: Fix crash in blk_mq layer when executing modprobe -r lpfc
    scsi: lpfc: correct oversubscription of nvme io requests for an adapter
    scsi: lpfc: Fix MDS diagnostics failure (Rx < Tx)
    scsi: hisi_sas: Mark PHY as in reset for nexus reset
    scsi: hisi_sas: Fix return value when get_free_slot() failed
    scsi: hisi_sas: Terminate STP reject quickly for v2 hw
    scsi: hisi_sas: Add v2 hw force PHY function for internal ATA command
    scsi: hisi_sas: Include TMF elements in struct hisi_sas_slot
    scsi: hisi_sas: Try wait commands before before controller reset
    scsi: hisi_sas: Init disks after controller reset
    scsi: hisi_sas: Create a scsi_host_template per HW module
    scsi: hisi_sas: Reset disks when discovered
    scsi: hisi_sas: Add LED feature for v3 hw
    scsi: hisi_sas: Change common allocation mode of device id
    scsi: hisi_sas: change slot index allocation mode
    scsi: hisi_sas: Introduce hisi_sas_phy_set_linkrate()
    scsi: hisi_sas: fix a typo in hisi_sas_task_prep()
    ...

    Linus Torvalds
     

29 May, 2018

1 commit

  • The BLK_EH_NOT_HANDLED implies nothing happen, but very often that
    is not what is happening - instead the driver already completed the
    command. Fix the symbolic name to reflect that a little better.

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Hannes Reinecke
    Reviewed-by: Johannes Thumshirn
    Signed-off-by: Jens Axboe

    Christoph Hellwig
     

21 Apr, 2018

1 commit


25 Apr, 2017

1 commit

  • As Christoph Hellwig noted, SCSI commands that transfer data always have
    a SG entry. The patch removes dead code in mvumi_make_sgl(),
    mvumi_complete_cmd() and mvumi_timed_out() that handle zero
    scsi_sg_count(scmd) case.

    Also the patch adds pci_unmap_sg() on failure path in mvumi_make_sgl().

    Signed-off-by: Alexey Khoroshilov
    Reviewed-by: Christoph Hellwig
    Signed-off-by: Martin K. Petersen

    Alexey Khoroshilov
     

07 Feb, 2017

1 commit


06 Mar, 2016

1 commit

  • The mvumi scsi hides the references to its suspend/resume functions in
    an #ifdef but does not hide the implementation the same way:

    drivers/scsi/mvumi.c:2632:12: error: 'mvumi_suspend' defined but not used [-Werror=unused-function]
    drivers/scsi/mvumi.c:2651:12: error: 'mvumi_resume' defined but not used [-Werror=unused-function]

    This adds __maybe_unused annotations so the compiler knows it can
    silently drop them instead of warning, while avoiding the addition of
    another #ifdef.

    Signed-off-by: Arnd Bergmann
    Reviewed-by: Johannes Thumshirn
    Signed-off-by: Martin K. Petersen

    Arnd Bergmann
     

12 Nov, 2015

1 commit

  • struct mvumi_hs_page2 stores a "seconds_since1970" field which is of
    type u64. It is however, written to, using 'struct timeval' which has
    a 32-bit seconds field and whose value will overflow in year 2038.
    This patch uses ktime_get_real_seconds() instead since it provides a
    64-bit seconds value, which is 2038 safe.

    Signed-off-by: Tina Ruchandani
    Reviewed-by: Johannes Thumshirn
    Signed-off-by: Martin K. Petersen

    Tina Ruchandani
     

13 Aug, 2014

1 commit

  • We should prefer `struct pci_device_id` over `DEFINE_PCI_DEVICE_TABLE` to
    meet kernel coding style guidelines. This issue was reported by checkpatch.

    A simplified version of the semantic patch that makes this change is as
    follows (http://coccinelle.lip6.fr/):

    //

    @@
    identifier i;
    declarer name DEFINE_PCI_DEVICE_TABLE;
    initializer z;
    @@

    - DEFINE_PCI_DEVICE_TABLE(i)
    + const struct pci_device_id i[]
    = z;

    //

    [bhelgaas: add semantic patch]
    Signed-off-by: Benoit Taine
    Signed-off-by: Bjorn Helgaas

    Benoit Taine
     

09 Aug, 2014

1 commit

  • Remove the now unnecessary memset too.

    Signed-off-by: Joe Perches
    Cc: Adam Radford
    Cc: "James E.J. Bottomley"
    Cc: Jayamohan Kallickal
    Cc: Dario Ballabio
    Cc: Michael Neuffer
    Cc: "Stephen M. Cameron"
    Cc: Neela Syam Kolli
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     

14 Oct, 2013

1 commit

  • Since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d
    (device-core: Ensure drvdata = NULL when no driver is bound),
    the driver core clears the driver data to NULL after device_release
    or on probe failure. Thus, it is not needed to manually clear the
    device driver data to NULL.

    Signed-off-by: Jingoo Han
    Cc: James Bottomley
    Signed-off-by: Jiri Kosina

    Jingoo Han
     

16 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,
    __devinitconst, 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: Adam Radford
    Cc: "James E.J. Bottomley"
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

07 Oct, 2012

1 commit


01 Sep, 2012

1 commit


27 Aug, 2011

1 commit

  • The Marvell Universal Message Interface (UMI) defines a messaging
    interface between host and Marvell products (Plato, for example). It
    considers situations of limited system resource and optimized system
    performance.
    UMI driver translates host request to message and sends message
    to FW via UMI, FW receives message and processes it, then sends response
    to UMI driver.
    FW generates an interrupt when it needs to send information or
    response to UMI driver

    Signed-off-by: Jianyun Li
    Signed-off-by: James Bottomley

    Jianyun Li