25 Dec, 2016

1 commit


15 Dec, 2016

1 commit

  • Pull SCSI updates from James Bottomley:
    "This update includes the usual round of major driver updates (ncr5380,
    lpfc, hisi_sas, megaraid_sas, ufs, ibmvscsis, mpt3sas).

    There's also an assortment of minor fixes, mostly in error legs or
    other not very user visible stuff. The major change is the
    pci_alloc_irq_vectors replacement for the old pci_msix_.. calls; this
    effectively makes IRQ mapping generic for the drivers and allows
    blk_mq to use the information"

    * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (256 commits)
    scsi: qla4xxx: switch to pci_alloc_irq_vectors
    scsi: hisi_sas: support deferred probe for v2 hw
    scsi: megaraid_sas: switch to pci_alloc_irq_vectors
    scsi: scsi_devinfo: remove synchronous ALUA for NETAPP devices
    scsi: be2iscsi: set errno on error path
    scsi: be2iscsi: set errno on error path
    scsi: hpsa: fallback to use legacy REPORT PHYS command
    scsi: scsi_dh_alua: Fix RCU annotations
    scsi: hpsa: use %phN for short hex dumps
    scsi: hisi_sas: fix free'ing in probe and remove
    scsi: isci: switch to pci_alloc_irq_vectors
    scsi: ipr: Fix runaway IRQs when falling back from MSI to LSI
    scsi: dpt_i2o: double free on error path
    scsi: cxlflash: Migrate scsi command pointer to AFU command
    scsi: cxlflash: Migrate IOARRIN specific routines to function pointers
    scsi: cxlflash: Cleanup queuecommand()
    scsi: cxlflash: Cleanup send_tmf()
    scsi: cxlflash: Remove AFU command lock
    scsi: cxlflash: Wait for active AFU commands to timeout upon tear down
    scsi: cxlflash: Remove private command pool
    ...

    Linus Torvalds
     

18 Nov, 2016

1 commit

  • Fix the printk continuations when running the mptfusion driver.
    This patch brings the capabilities into one single syslog line again:
    mptbase: ioc1: Initiating bringup
    ioc1: LSI53C1030 B2: Capabilities={Initiator,Target}
    scsi host3: ioc1: LSI53C1030 B2, FwRev=01032341h, Ports=1, MaxQ=255, IRQ=67

    Tested on a parisc C8000 machine.

    Signed-off-by: Helge Deller
    Signed-off-by: Martin K. Petersen

    Helge Deller
     

09 Nov, 2016

2 commits


21 Oct, 2016

1 commit

  • firewire-net:
    - set min/max_mtu
    - remove fwnet_change_mtu

    nes:
    - set max_mtu
    - clean up nes_netdev_change_mtu

    xpnet:
    - set min/max_mtu
    - remove xpnet_dev_change_mtu

    hippi:
    - set min/max_mtu
    - remove hippi_change_mtu

    batman-adv:
    - set max_mtu
    - remove batadv_interface_change_mtu
    - initialization is a little async, not 100% certain that max_mtu is set
    in the optimal place, don't have hardware to test with

    rionet:
    - set min/max_mtu
    - remove rionet_change_mtu

    slip:
    - set min/max_mtu
    - streamline sl_change_mtu

    um/net_kern:
    - remove pointless ndo_change_mtu

    hsi/clients/ssi_protocol:
    - use core MTU range checking
    - remove now redundant ssip_pn_set_mtu

    ipoib:
    - set a default max MTU value
    - Note: ipoib's actual max MTU can vary, depending on if the device is in
    connected mode or not, so we'll just set the max_mtu value to the max
    possible, and let the ndo_change_mtu function continue to validate any new
    MTU change requests with checks for CM or not. Note that ipoib has no
    min_mtu set, and thus, the network core's mtu > 0 check is the only lower
    bounds here.

    mptlan:
    - use net core MTU range checking
    - remove now redundant mpt_lan_change_mtu

    fddi:
    - min_mtu = 21, max_mtu = 4470
    - remove now redundant fddi_change_mtu (including export)

    fjes:
    - min_mtu = 8192, max_mtu = 65536
    - The max_mtu value is actually one over IP_MAX_MTU here, but the idea is to
    get past the core net MTU range checks so fjes_change_mtu can validate a
    new MTU against what it supports (see fjes_support_mtu in fjes_hw.c)

    hsr:
    - min_mtu = 0 (calls ether_setup, max_mtu is 1500)

    f_phonet:
    - min_mtu = 6, max_mtu = 65541

    u_ether:
    - min_mtu = 14, max_mtu = 15412

    phonet/pep-gprs:
    - min_mtu = 576, max_mtu = 65530
    - remove redundant gprs_set_mtu

    CC: netdev@vger.kernel.org
    CC: linux-rdma@vger.kernel.org
    CC: Stefan Richter
    CC: Faisal Latif
    CC: linux-rdma@vger.kernel.org
    CC: Cliff Whickman
    CC: Robin Holt
    CC: Jes Sorensen
    CC: Marek Lindner
    CC: Simon Wunderlich
    CC: Antonio Quartulli
    CC: Sathya Prakash
    CC: Chaitra P B
    CC: Suganath Prabu Subramani
    CC: MPT-FusionLinux.pdl@broadcom.com
    CC: Sebastian Reichel
    CC: Felipe Balbi
    CC: Arvid Brodin
    CC: Remi Denis-Courmont
    Signed-off-by: Jarod Wilson
    Signed-off-by: David S. Miller

    Jarod Wilson
     

15 Sep, 2016

1 commit


02 Sep, 2016

2 commits

  • The workqueues "ioc->reset_work_q" and "ioc->fw_event_q" queue a single
    work item &ioc->fault_reset_work and &fw_event->work, respectively and
    hence don't require ordering. Hence, they have been converted to use
    alloc_workqueue().

    The WQ_MEM_RECLAIM flag has been set to ensure forward progress under
    memory pressure since the workqueue belongs to a storage driver which is
    being used on a memory reclaim path.

    Since there are fixed number of work items, explicit concurrency limit
    is unnecessary here.

    Signed-off-by: Bhaktipriya Shridhar
    Acked-by: Tejun Heo
    Signed-off-by: Martin K. Petersen

    Bhaktipriya Shridhar
     
  • The workqueue "fc_rescan_work_q" queues multiple work items viz
    &ioc->fc_rescan_work, &ioc->fc_lsc_work, &ioc->fc_setup_reset_work,
    which require strict execution ordering. Hence, an ordered dedicated
    workqueue has been used.

    WQ_MEM_RECLAIM has been set since the workqueue is belongs to a storage
    driver which is being used on a memory reclaim path and hence, requires
    forward progress under memory pressure.

    Signed-off-by: Bhaktipriya Shridhar
    Acked-by: Tejun Heo
    Signed-off-by: Martin K. Petersen

    Bhaktipriya Shridhar
     

19 May, 2016

1 commit

  • Pull SCSI updates from James Bottomley:
    "First round of SCSI updates for the 4.6+ merge window.

    This batch includes the usual quota of driver updates (bnx2fc, mp3sas,
    hpsa, ncr5380, lpfc, hisi_sas, snic, aacraid, megaraid_sas). There's
    also a multiqueue update for scsi_debug, assorted bug fixes and a few
    other minor updates (refactor of scsi_sg_pools into generic code, alua
    and VPD updates, and struct timeval conversions)"

    * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (138 commits)
    mpt3sas: Used "synchronize_irq()"API to synchronize timed-out IO & TMs
    mpt3sas: Set maximum transfer length per IO to 4MB for VDs
    mpt3sas: Updating mpt3sas driver version to 13.100.00.00
    mpt3sas: Fix initial Reference tag field for 4K PI drives.
    mpt3sas: Handle active cable exception event
    mpt3sas: Update MPI header to 2.00.42
    Revert "lpfc: Delete unnecessary checks before the function call mempool_destroy"
    eata_pio: missing break statement
    hpsa: Fix type ZBC conditional checks
    scsi_lib: Decode T10 vendor IDs
    scsi_dh_alua: do not fail for unknown VPD identification
    scsi_debug: use locally assigned naa
    scsi_debug: uuid for lu name
    scsi_debug: vpd and mode page work
    scsi_debug: add multiple queue support
    bfa: fix bfa_fcb_itnim_alloc() error handling
    megaraid_sas: Downgrade two success messages to info
    cxlflash: Fix to resolve dead-lock during EEH recovery
    scsi_debug: rework resp_report_luns
    scsi_debug: use pdt constants
    ...

    Linus Torvalds
     

05 May, 2016

1 commit

  • Replace all trans_start updates with netif_trans_update helper.
    change was done via spatch:

    struct net_device *d;
    @@
    - d->trans_start = jiffies
    + netif_trans_update(d)

    Compile tested only.

    Cc: user-mode-linux-devel@lists.sourceforge.net
    Cc: linux-xtensa@linux-xtensa.org
    Cc: linux1394-devel@lists.sourceforge.net
    Cc: linux-rdma@vger.kernel.org
    Cc: netdev@vger.kernel.org
    Cc: MPT-FusionLinux.pdl@broadcom.com
    Cc: linux-scsi@vger.kernel.org
    Cc: linux-can@vger.kernel.org
    Cc: linux-parisc@vger.kernel.org
    Cc: linux-omap@vger.kernel.org
    Cc: linux-hams@vger.kernel.org
    Cc: linux-usb@vger.kernel.org
    Cc: linux-wireless@vger.kernel.org
    Cc: linux-s390@vger.kernel.org
    Cc: devel@driverdev.osuosl.org
    Cc: b.a.t.m.a.n@lists.open-mesh.org
    Cc: linux-bluetooth@vger.kernel.org
    Signed-off-by: Florian Westphal
    Acked-by: Felipe Balbi
    Acked-by: Mugunthan V N
    Acked-by: Antonio Quartulli
    Signed-off-by: David S. Miller

    Florian Westphal
     

30 Apr, 2016

1 commit

  • mptsas_smp_handler() checks for dma mapping errors by comparison
    returned address with zero, while pci_dma_mapping_error() should be
    used.

    Found by Linux Driver Verification project (linuxtesting.org).

    Signed-off-by: Alexey Khoroshilov
    Acked-by: Sathya Prakash Veerichetty
    Signed-off-by: Martin K. Petersen

    Alexey Khoroshilov
     

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
     

24 Feb, 2016

2 commits

  • mpt_attach() was not checking for the failure to create fw_event_q.
    Also, iounmap() was not being called in all error cases after ioremap()
    had been called by mpt_mapresources().

    Signed-off-by: Ewan D. Milne
    Reported-by: Insu Yun
    Reviewed-by: Tomas Henzl
    Reviewed-by: Johannes Thumshirn
    Signed-off-by: Martin K. Petersen

    Ewan D. Milne
     
  • The seq_mpt_print_ioc_summary function is used for the
    /proc/mpt/iocN/summary implementation and never gets called when
    CONFIG_PROC_FS is disabled:

    drivers/message/fusion/mptbase.c:6851:13: warning: 'seq_mpt_print_ioc_summary' defined but not used [-Wunused-function]
    static void seq_mpt_print_ioc_summary(MPT_ADAPTER *ioc, struct seq_file *m, int showlan)

    This adds an #ifdef to hide the function definition in that case and
    avoid the warning.

    Signed-off-by: Arnd Bergmann
    Signed-off-by: Martin K. Petersen

    Arnd Bergmann
     

12 Nov, 2015

2 commits


10 Nov, 2015

1 commit

  • This patch changes the !blk-mq path to the same defaults as the blk-mq
    I/O path by always enabling block tagging, and always using host wide
    tags. We've had blk-mq available for a few releases so bugs with
    this mode should have been ironed out, and this ensures we get better
    coverage of over tagging setup over different configs.

    Signed-off-by: Christoph Hellwig
    Acked-by: Jens Axboe
    Reviewed-by: Hannes Reinecke
    Signed-off-by: James Bottomley

    Christoph Hellwig
     

26 Aug, 2015

1 commit

  • These are signed values the come from the user, we put a cap on the
    upper bounds but not on the lower bounds.

    We use "karg.dataSgeOffset" to calculate "sz". We verify "sz" and
    proceed as if that means that "karg.dataSgeOffset" is correct but this
    fails to consider that the "sz" calculations can have integer overflows.

    Signed-off-by: Dan Carpenter
    Reviewed-by: Johannes Thumshirn
    Signed-off-by: James Bottomley

    Dan Carpenter
     

13 Jun, 2015

2 commits

  • If and when this gets enabled the driver could should split
    up IO memory space properly and that is quite a bit of work.
    Just remove the uncommented dead MTRR code then.

    There are a few motivations for this:

    a) Take advantage of PAT when available

    b) Help bury MTRR code away, MTRR is architecture specific and on
    x86 its replaced by PAT

    c) Help with the goal of eventually using _PAGE_CACHE_UC over
    _PAGE_CACHE_UC_MINUS on x86 on ioremap_nocache() (see commit
    de33c442e titled "x86 PAT: fix performance drop for glx,
    use UC minus for ioremap(), ioremap_nocache() and
    pci_mmap_page_range()")

    Signed-off-by: Luis R. Rodriguez
    Acked-by: Sreekanth Reddy
    Signed-off-by: James Bottomley

    Luis R. Rodriguez
     
  • A user of scsi_track_queue_full should pass to the function a constant value
    untill the queue-depth changes, otherwise the internal logic in
    scsi_track_queue_full rejects the change. Other users of this function use a
    'sdev->queue_depth - 1' as depth parameter, let's do the same.

    Signed-off-by: Tomas Henzl
    Acked-by: "Sreekanth Reddy"
    Signed-off-by: James Bottomley

    Tomas Henzl
     

04 Feb, 2015

1 commit

  • The I2O layer deals with a technology that to say the least didn't catch on
    in the market.

    The only relevant products are some of the AMI MegaRAID - which supported I2O
    and its native mode (The native mode is faster and runs on Linux), an
    obscure crypto ethernet card that's now so many years out of date nobody
    would use it, the old DPT controllers, which speak their own dialect and
    have their own driver - and ermm.. thats about it.

    We also know the code isn't in good shape as recently a patch was proposed
    and queried as buggy, which in turn showed the existing code was broken
    already by prior "clean up" and nobody had noticed that either.

    It's coding style robot code nothing more. Like some forgotten corridor
    cleaned relentlessly by a lost Roomba but where no user has trodden in years.

    Move it to staging and then to /dev/null.

    The headers remain as they are shared with dpt_i2o.

    Signed-off-by: Alan Cox
    Signed-off-by: Greg Kroah-Hartman

    Alan Cox
     

24 Nov, 2014

1 commit

  • Drop the now unused reason argument from the ->change_queue_depth method.
    Also add a return value to scsi_adjust_queue_depth, and rename it to
    scsi_change_queue_depth now that it can be used as the default
    ->change_queue_depth implementation.

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Mike Christie
    Reviewed-by: Hannes Reinecke

    Christoph Hellwig
     

12 Nov, 2014

4 commits

  • Remove the tagged argument from scsi_adjust_queue_depth, and just let it
    handle the queue depth. For most drivers those two are fairly separate,
    given that most modern drivers don't care about the SCSI "tagged" status
    of a command at all, and many old drivers allow queuing of multiple
    untagged commands in the driver.

    Instead we start out with the ->simple_tags flag set before calling
    ->slave_configure, which is how all drivers actually looking at
    ->simple_tags except for one worke anyway. The one other case looks
    broken, but I've kept the behavior as-is for now.

    Except for that we only change ->simple_tags from the ->change_queue_type,
    and when rejecting a tag message in a single driver, so keeping this
    churn out of scsi_adjust_queue_depth is a clear win.

    Now that the usage of scsi_adjust_queue_depth is more obvious we can
    also remove all the trivial instances in ->slave_alloc or ->slave_configure
    that just set it to the cmd_per_lun default.

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Mike Christie
    Reviewed-by: Hannes Reinecke
    Reviewed-by: Martin K. Petersen

    Christoph Hellwig
     
  • Allow a driver to ask for block layer tags by setting .use_blk_tags in the
    host template, in which case it will always see a valid value in
    request->tag, similar to the behavior when using blk-mq. This means even
    SCSI "untagged" commands will now have a tag, which is especially useful
    when using a host-wide tag map.

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Mike Christie
    Reviewed-by: Martin K. Petersen
    Reviewed-by: Hannes Reinecke

    Christoph Hellwig
     
  • This function shouldn't change the queue type, just the depth.

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Mike Christie
    Reviewed-by: Martin K. Petersen
    Reviewed-by: Hannes Reinecke

    Christoph Hellwig
     
  • Remove the ordered_tags field, we haven't been issuing ordered tags based
    on it since the big barrier rework in 2010.

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Mike Christie
    Reviewed-by: Bart Van Assche
    Reviewed-by: Martin K. Petersen

    Christoph Hellwig
     

08 Oct, 2014

1 commit

  • Pull SCSI updates from James Bottomley:
    "This patch set consists of the usual driver updates (megaraid_sas,
    arcmsr, be2iscsi, lpfc, mpt2sas, mpt3sas, qla2xxx, ufs) plus several
    assorted fixes and miscellaneous updates (including the
    pci_msix_enable_range() changes that have been pending for a while)"

    * tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (202 commits)
    scsi: add a CONFIG_SCSI_MQ_DEFAULT option
    ufs: definitions for phy interface
    ufs: tune bkops while power managment events
    ufs: Add support for clock scaling using devfreq framework
    ufs: Add freq-table-hz property for UFS device
    ufs: Add support for clock gating
    ufs: refactor configuring power mode
    ufs: add UFS power management support
    ufs: introduce well known logical unit in ufs
    ufs: manually add well known logical units
    ufs: Active Power Mode - configuring bActiveICCLevel
    ufs: improve init sequence
    ufs: refactor query descriptor API support
    ufs: add voting support for host controller power
    ufs: Add clock initialization support
    ufs: Add regulator enable support
    ufs: Allow vendor specific initialization
    scsi: don't add scsi_device if its already visible
    scsi: fix the type for well known LUs
    scsi: fix comment in struct Scsi_Host definition
    ...

    Linus Torvalds
     

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
     

17 Sep, 2014

3 commits

  • There are other kconfig symbols which use SCSI_FC_ATTRS.
    In order to maintain sanity and prevent kconfig warnings, change
    all of these from using 'select' to using 'depends on' so that
    proper symbol dependencies will be honored and circular depends
    problems will be avoided.
    This fixes kconfig warnings and build errors:

    warning: (LIBFC && SCSI_IBMVFC && SCSI_QLA_FC && SCSI_LPFC && ZFCP && SCSI_BFA_FC && SCSI_CHELSIO_FCOE && FUSION_FC) selects SCSI_FC_ATTRS which has unmet direct dependencies (SCSI && NET)
    drivers/scsi/scsi_transport_fc.c: In function 'fc_host_post_event':
    drivers/scsi/scsi_transport_fc.c:543:7: error: 'scsi_nl_sock' undeclared (first use in this function)
    drivers/scsi/scsi_transport_fc.c: In function 'fc_host_post_vendor_event':
    drivers/scsi/scsi_transport_fc.c:611:7: error: 'scsi_nl_sock' undeclared (first use in this function)

    Reported-by: Fengguang Wu [0-day test robot]
    Signed-off-by: Randy Dunlap
    Signed-off-by: David S. Miller

    Randy Dunlap
     
  • Fix kernel-doc excess parameter warning:

    Warning(..//drivers/message/fusion/mptbase.c:1411): Excess function parameter 'prod_name' description in 'mpt_get_product_name'

    Signed-off-by: Randy Dunlap
    Reviewed-by: Ewan D. Milne
    Signed-off-by: Christoph Hellwig

    Randy Dunlap
     
  • Rounding up to a multiple of 4 should be done using the ALIGN
    macro. As a bonus, this also makes the generated code smaller.

    In GetIocFacts(), sz is assigned to a few lines below without being
    read in the meantime, so it is ok that it doesn't end up with the same
    value as facts->FWImageSize.

    Signed-off-by: Rasmus Villemoes
    Reviewed-by: Joe Lawrence
    Signed-off-by: Christoph Hellwig

    Rasmus Villemoes
     

26 Jul, 2014

6 commits

  • Fixes the following smatch warnings:

    drivers/message/fusion/mptbase.c:652 mptbase_reply() warn: variable
    dereferenced before check 'reply' (see line 639)

    [JL: No-brainer, the enclosing switch statement dereferences
    reply, so we can't get here unless reply is valid.]

    drivers/message/fusion/mptsas.c:1255 mptsas_taskmgmt_complete() error:
    we previously assumed 'pScsiTmReply' could be null (see line 1227)

    [HCH: Reading the code in mptsas_taskmgmt_complete it's pretty
    obvious that it can't do anything useful if mr/pScsiTmReply are
    NULL, so I suspect it would be best to just return at the
    beginning of the function.

    I'd love to understand if it actually could ever be zero, which I
    doubt. Maybe the LSI people can shed some light on that?]

    drivers/message/fusion/mptsas.c:3888 mptsas_not_responding_devices()
    error: we previously assumed 'port_info->phy_info' could be null
    (see line 3875)

    [HCH: It's pretty obvious from reading mptsas_sas_io_unit_pg0 that
    we never register a port_info with a NULL phy_info in the lists,
    so all NULL checks on it could be deleted.]

    drivers/message/fusion/mptscsih.c:1284 mptscsih_info() error:
    we previously assumed 'h' could be null (see line 1274)

    [HCH: shost_priv can't return NULL, so the if (h) should be
    removed.]

    drivers/message/fusion/mptscsih.c:1388 mptscsih_qcmd() error: we
    previously assumed 'vdevice' could be null (see line 1373)

    [HCH: vdevice can't ever be NULL here, it's allocated in
    ->slave_alloc and thus guaranteed to be around when
    ->queuecommand is called.]

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

    Joe Lawrence
     
  • Tack the firmware reply event_data payload to the end of its
    corresponding struct fw_event_work allocation. Rework fw_event_work
    allocation calculations to include the event_data size where
    appropriate.

    This clarifies the code a bit and avoids the following smatch warnings:

    drivers/message/fusion/mptsas.c:1003 mptsas_queue_device_delete()
    error: memcpy() 'fw_event->event_data' too small (29 vs 36)

    drivers/message/fusion/mptsas.c:1017 mptsas_queue_rescan() error: not
    allocating enough data 168 vs 160

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

    Joe Lawrence
     
  • The struct _MPT_ADAPTER doesn't need a full copy of the product string,
    so prod_name can point to the string literal storage that the driver
    already provides.

    Avoids the following smatch warning:

    drivers/message/fusion/mptbase.c:2858 MptDisplayIocCapabilities()
    warn: this array is probably non-NULL. 'ioc->prod_name'

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

    Joe Lawrence
     
  • Let memdup_user handle the kmalloc, copy_from_user and error checking
    kfree code.

    Spotted by the following smatch (false positive) warning:

    drivers/message/fusion/mptctl.c:1369 mptctl_getiocinfo() warn:
    possible info leak 'karg'

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

    Joe Lawrence
     
  • 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
     

25 Jul, 2014

1 commit

  • Avoid taking the queue_lock to check the per-device queue limit. Instead
    we do an atomic_inc_return early on to grab our slot in the queue,
    and if necessary decrement it after finishing all checks.

    Unlike the host and target busy counters this doesn't allow us to avoid the
    queue_lock in the request_fn due to the way the interface works, but it'll
    allow us to prepare for using the blk-mq code, which doesn't use the
    queue_lock at all, and it at least avoids a queue_lock round trip in
    scsi_device_unbusy, which is still important given how busy the queue_lock
    is.

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Hannes Reinecke
    Reviewed-by: Webb Scales
    Acked-by: Jens Axboe
    Tested-by: Bart Van Assche
    Tested-by: Robert Elliott

    Christoph Hellwig
     

18 Jul, 2014

1 commit