Commit Graph
873808 Commits
Author SHA1 Message Date
Ezequiel Garcia d516e75c71 drm/virtio: Drop deprecated load/unload initialization
Move the code around so the driver is probed the bus
.probe and removed from the bus .remove callbacks.
This commit is just a cleanup and shouldn't affect
functionality.

Signed-off-by: Ezequiel Garcia <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Gerd Hoffmann <[email protected]>
2019-01-09 09:38:49 +01:00
Jani Nikula 2f80d7bd8d drm/i915: drop all drmP.h includes
Needs just a few additional includes here and there.

Cc: Sam Ravnborg <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Acked-by: Daniel Vetter <[email protected]>
Acked-by: Sam Ravnborg <[email protected]>
Signed-off-by: Jani Nikula <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-01-09 10:26:36 +02:00
Ingo Molnar 576b50ea23 Merge tag 'perf-core-for-mingo-5.0-20190108' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
Pull perf/core fixes and improvements from Arnaldo Carvalho de Melo:

perf top:

  Arnaldo Carvalho de Melo:

  - Lift restriction on using callchains without "sym" in --sort

perf trace:

  Arnaldo Carvalho de Melo:

  - Fix ')' placement in "interrupted" syscall lines.

  - Fix alignment for [continued] lines.

perf tests:

  Florian Fainelli:

  - Add a test for the ARM 32-bit [vectors] page.

tools lib traceevent:

  Tzvetomir Stoyanov:

  - Introduce new libtracevent API: tep_override_comm().
  - Initialize host_bigendian at tep_handle allocation.
  - More namespacing changes.
  - Remove superfluous APIs.

tools headers uapi:

  Arnaldo Carvalho de Melo:

  . Update linux/{fs,vhost}.h, grab a copy o linux/mount.h, where the
    MS_ mount flags were moved.

Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
2019-01-09 07:59:40 +01:00
Dan Williams 1cb95e072e libnvdimm/dimm: Fix security capability detection for non-Intel NVDIMMs
Kees reports a crash with the following signature...

 RIP: 0010:nvdimm_visible+0x79/0x80
 [..]
 Call Trace:
  internal_create_group+0xf4/0x380
  sysfs_create_groups+0x46/0xb0
  device_add+0x331/0x680
  nd_async_device_register+0x15/0x60
  async_run_entry_fn+0x38/0x100

...when starting a QEMU environment with "label-less" DIMM. Without
labels QEMU does not publish any DSM methods. Without defined methods
the NVDIMM_FAMILY type is not established and the nfit driver will skip
registering security operations.

In that case the security state should be initialized to a negative
value in __nvdimm_create() and nvdimm_visible() should skip
interrogating the specific ops. However, since 'enum
nvdimm_security_state' was only defined to contain positive values the
"if (nvdimm->sec.state < 0)" check always fails.

Define a negative error state to allow negative state values to be
handled as expected.

Fixes: f298939655 ("acpi/nfit, libnvdimm: Introduce nvdimm_security_ops")
Reviewed-by: Dave Jiang <[email protected]>
Reported-by: Kees Cook <[email protected]>
Tested-by: Kees Cook <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
2019-01-08 22:06:09 -08:00
Nathan Chancellor ccb7f15a8a nfit: Mark some functions as __maybe_unused
On arm64 little endian allyesconfig:

drivers/acpi/nfit/intel.c:149:12: warning: unused function 'intel_security_unlock' [-Wunused-function]
static int intel_security_unlock(struct nvdimm *nvdimm,
           ^
drivers/acpi/nfit/intel.c:230:12: warning: unused function 'intel_security_erase' [-Wunused-function]
static int intel_security_erase(struct nvdimm *nvdimm,
           ^
drivers/acpi/nfit/intel.c:279:12: warning: unused function 'intel_security_query_overwrite' [-Wunused-function]
static int intel_security_query_overwrite(struct nvdimm *nvdimm)
           ^
drivers/acpi/nfit/intel.c:316:12: warning: unused function 'intel_security_overwrite' [-Wunused-function]
static int intel_security_overwrite(struct nvdimm *nvdimm,
           ^
4 warnings generated.

Mark these functions as __maybe_unused because they are only used when
CONFIG_X86 is set.

Fixes: 4c6926a23b ("acpi/nfit, libnvdimm: Add unlock of nvdimm support for Intel DIMMs")
Suggested-by: Dan Williams <[email protected]>
Signed-off-by: Nathan Chancellor <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
2019-01-08 22:04:38 -08:00
Zhenyu Wang f0e9943725 drm/i915/gvt: Fix workload request allocation before request add
In commit 6bb2a2af8b ("drm/i915/gvt: Fix crash after request->hw_context change"),
forgot to handle workload scan path in ELSP handler case which was to
optimize scanning earlier instead of in gvt submission thread, so request
alloc and add was splitting then which is against right process.

This trys to do a partial revert of that commit which still has workload
request alloc helper and make sure shadow state population is handled after
request alloc for target state buffer.

v3: Fix missed workload status setting in request alloc error path
v2: Fix dispatch workload err path that should add request after alloc anyway.

Fixes: 6bb2a2af8b ("drm/i915/gvt: Fix crash after request->hw_context change")
Cc: Bin Yang <[email protected]>
Cc: Chris Wilson <[email protected]>
Tested-by: Bin Yang <[email protected]>
Reviewed-by: Xiaolin Zhang <[email protected]>
Signed-off-by: Zhenyu Wang <[email protected]>
2019-01-09 12:59:09 +08:00
Greg Kroah-Hartman c20e57b32d f2fs: no need to check return value of debugfs_create functions
When calling debugfs functions, there is no need to ever check the
return value.  The function can work or not, but the code logic should
never do something different based on this.

Cc: Jaegeuk Kim <[email protected]>
Cc: Chao Yu <[email protected]>
Cc: [email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Reviewed-by: Chao Yu <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
2019-01-08 20:41:09 -08:00
Jaegeuk Kim 5d539245cb f2fs: export FS_NOCOW_FL flag to user
This exports pin_file status to user.

Reviewed-by: Chao Yu <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
2019-01-08 20:41:09 -08:00
Chao Yu 36c5733f95 f2fs: check inject_rate validity during configuring
Type of inject_rate is unsigned int, let's check new value's
validity during configuring.

Signed-off-by: Chao Yu <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
2019-01-08 20:41:09 -08:00
Jeff Moyer 40405851af block: clarify documentation for blk_{start|finish}_plug
There was some confusion about what these functions did.  Make it clear
that this is a hint for upper layers to pass to the block layer, and
that it does not guarantee that I/O will not be submitted between a
start and finish plug.

Reported-by: "Darrick J. Wong" <[email protected]>
Reviewed-by: Darrick J. Wong <[email protected]>
Reviewed-by: Ming Lei <[email protected]>
Signed-off-by: Jeff Moyer <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
2019-01-08 20:49:46 -07:00
Colin Ian King 7b8f32eee7 scsi: bnx2i: fix indentation issue, remove a tab
The return statement is indented incorrectly, fix this by removing a single
tab.

Signed-off-by: Colin Ian King <[email protected]>
Acked-by: Manish Rangankar <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2019-01-08 22:31:36 -05:00
John Garry 082c2cd203 scsi: sd: Make protection lookup tables static and relocate functions
Currently the protection lookup tables in sd_prot_flag_mask() and
sd_prot_op() are declared as non-static. As such, they will be rebuilt for
each respective function call.

Optimise by making them static.

This saves ~100B object code for sd.c:

Before:
   text	   data	    bss	    dec	    hex	filename
  25403	   1024	     16	  26443	   674b	drivers/scsi/sd.o

After:
  text	   data	    bss	    dec	    hex	filename
  25299	   1024	     16	  26339	   66e3	drivers/scsi/sd.o

In addition, since those same functions are declared in sd.h, but each are
only referenced in sd.c, relocate them to that same c file.

The inline specifier is dropped also, since gcc should be able to make the
decision to inline.

Signed-off-by: John Garry <[email protected]>
Reviewed-by: Bart Van Assche <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2019-01-08 22:29:32 -05:00
Logan Gunthorpe cc29a1b0a3 scsi: isci: initialize shost fully before calling scsi_add_host()
scsi_mq_setup_tags(), which is called by scsi_add_host(), calculates the
command size to allocate based on the prot_capabilities. In the isci
driver, scsi_host_set_prot() is called after scsi_add_host() so the command
size gets calculated to be smaller than it needs to be.  Eventually,
scsi_mq_init_request() locates the 'prot_sdb' after the command assuming it
was sized correctly and a buffer overrun may occur.

However, seeing blk_mq_alloc_rqs() rounds up to the nearest cache line
size, the mistake can go unnoticed.

The bug was noticed after the struct request size was reduced by commit
9d037ad707 ("block: remove req->timeout_list")

Which likely reduced the allocated space for the request by an entire cache
line, enough that the overflow could be hit and it caused a panic, on boot,
at:

  RIP: 0010:t10_pi_complete+0x77/0x1c0
  Call Trace:
    <IRQ>
    sd_done+0xf5/0x340
    scsi_finish_command+0xc3/0x120
    blk_done_softirq+0x83/0xb0
    __do_softirq+0xa1/0x2e6
    irq_exit+0xbc/0xd0
    call_function_single_interrupt+0xf/0x20
    </IRQ>

sd_done() would call scsi_prot_sg_count() which reads the number of
entities in 'prot_sdb', but seeing 'prot_sdb' is located after the end of
the allocated space it reads a garbage number and erroneously calls
t10_pi_complete().

To prevent this, the calls to scsi_host_set_prot() are moved into
isci_host_alloc() before the call to scsi_add_host(). Out of caution, also
move the similar call to scsi_host_set_guard().

Fixes: 3d2d752549 ("[SCSI] isci: T10 DIF support")
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Logan Gunthorpe <[email protected]>
Cc: Intel SCU Linux support <[email protected]>
Cc: Artur Paszkiewicz <[email protected]>
Cc: "James E.J. Bottomley" <[email protected]>
Cc: "Martin K. Petersen" <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Jens Axboe <[email protected]>
Cc: Jeff Moyer <[email protected]>
Reviewed-by: Jeff Moyer <[email protected]>
Reviewed-by: Jens Axboe <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2019-01-08 22:27:24 -05:00
Luo Jiaxing 1afb4b8524 scsi: hisi_sas: Add debugfs IOST file and add file operations
This patch create debugfs file for IOST and add file operations.

Signed-off-by: Luo Jiaxing <[email protected]>
Signed-off-by: John Garry <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2019-01-08 21:58:37 -05:00
Luo Jiaxing 148e379f60 scsi: hisi_sas: Add debugfs DQ file and add file operations
This patch create debugfs file for DQ and add file operations

Signed-off-by: Luo Jiaxing <[email protected]>
Signed-off-by: John Garry <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2019-01-08 21:58:37 -05:00
Luo Jiaxing 971afae7cf scsi: hisi_sas: Add debugfs CQ file and add file operations
This patch create debugfs file for CQ and add file operations.

Signed-off-by: Luo Jiaxing <[email protected]>
Signed-off-by: John Garry <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2019-01-08 21:58:37 -05:00
Luo Jiaxing 61a6ebf3f5 scsi: hisi_sas: Add debugfs for port registers
This patch create debugfs file for port register and add file operations.

Signed-off-by: Luo Jiaxing <[email protected]>
Signed-off-by: John Garry <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2019-01-08 21:58:37 -05:00
Luo Jiaxing caefac1996 scsi: hisi_sas: Debugfs global register create file and add file operations
This patch create debugfs file for global register and add file
operations.

Signed-off-by: Luo Jiaxing <[email protected]>
Signed-off-by: John Garry <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2019-01-08 21:58:37 -05:00
Luo Jiaxing 49159a5e41 scsi: hisi_sas: Take debugfs snapshot for all regs
This patch takes snapshot for global regs, port regs, CQ, DQ, IOST, ITCT.

Add code for snapshot trig and generate dump directory.

Signed-off-by: Luo Jiaxing <[email protected]>
Signed-off-by: John Garry <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2019-01-08 21:58:37 -05:00
Luo Jiaxing eb1c2b72b7 scsi: hisi_sas: Alloc debugfs snapshot buffer memory for all registers
This patch allocates snapshot memory for global reg, port regs, CQ, DQ,
IOST, ITCT.

When we fail to allocate memory for some registers, we free the memory
and set hisi_sas_debugfs_enable as 0 to stop loading debugfs from running.

Signed-off-by: Luo Jiaxing <[email protected]>
Signed-off-by: John Garry <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2019-01-08 21:58:37 -05:00
Luo Jiaxing ef63464bcf scsi: hisi_sas: Create root and device debugfs directories
This patch creates root directory at hisi_sas_init() and generates device
directory when we probe device driver.

And we remove the root directory at hisi_sas_exit(), but recursively
delete device directory when we remove device driver.

Signed-off-by: Luo Jiaxing <[email protected]>
Signed-off-by: John Garry <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2019-01-08 21:58:37 -05:00
Ching Huang ad796f790c scsi: arcmsr: Update driver version to v1.40.00.10-20181217
From Ching Huang <[email protected]>

Update driver version to v1.40.00.10-20181217

Signed-off-by: Ching Huang <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2019-01-08 21:58:36 -05:00
Ching Huang afdda87852 scsi: arcmsr: Fix suspend/resume of ACB_ADAPTER_TYPE_B
From Ching Huang <[email protected]>

Fix suspend/resume of ACB_ADAPTER_TYPE_B

Signed-off-by: Ching Huang <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2019-01-08 21:58:36 -05:00
Ching Huang 1d120c6183 scsi: arcmsr: Separate 'set dma mask' as a function
From Ching Huang <[email protected]>

Separate 'set dma mask' as a function

Signed-off-by: Ching Huang <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2019-01-08 21:58:36 -05:00
Ching Huang 7ec7261f66 scsi: arcmsr: Add an option of set dma_mask_64 for ACB_ADAPTER_TYPE_A
From Ching Huang <[email protected]>

Add an option of set dma_mask_64 for ACB_ADAPTER_TYPE_A

Signed-off-by: Ching Huang <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2019-01-08 21:58:36 -05:00
Ching Huang a36ade416d scsi: arcmsr: Update ACB_ADAPTER_TYPE_D for >4GB ccb addressing
From Ching Huang <[email protected]>

Update ACB_ADAPTER_TYPE_D for >4gb ccb addressing

Signed-off-by: Ching Huang <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2019-01-08 21:58:36 -05:00
Ching Huang c71ec5511b scsi: arcmsr: Update ACB_ADAPTER_TYPE_C for >4GB ccb addressing
From Ching Huang <[email protected]>

Update ACB_ADAPTER_TYPE_C for >4GB ccb addressing

Signed-off-by: Ching Huang <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2019-01-08 21:58:36 -05:00
Ching Huang e66764f276 scsi: arcmsr: Update ACB_ADAPTER_TYPE_B for >4GB ccb addressing
From Ching Huang <[email protected]>

Update ACB_ADAPTER_TYPE_B for >4GB ccb addressing

Signed-off-by: Ching Huang <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2019-01-08 21:58:36 -05:00
Ching Huang 9e386a55e0 scsi: arcmsr: Update ACB_ADAPTER_TYPE_A for >4GB ccb addressing
From Ching Huang <[email protected]>

Update ACB_ADAPTER_TYPE_A for >4GB ccb addressing

Signed-off-by: Ching Huang <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2019-01-08 21:58:36 -05:00
Ching Huang 7860a48686 scsi: arcmsr: Update arcmsr_alloc_ccb_pool for ccb buffer address above 4GB
From Ching Huang <[email protected]>

Update arcmsr_alloc_ccb_pool for ccb buffer address above 4GB

Signed-off-by: Ching Huang <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2019-01-08 21:58:36 -05:00
Ching Huang 222f1189b0 scsi: arcmsr: Merge arcmsr_alloc_io_queue to arcmsr_alloc_ccb_pool
From Ching Huang <[email protected]>

Merge arcmsr_alloc_io_queue to arcmsr_alloc_ccb_pool

Signed-off-by: Ching Huang <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2019-01-08 21:58:36 -05:00
Ching Huang 609d08581a scsi: arcmsr: Rename arcmsr_free_mu to arcmsr_free_io_queue
From Ching Huang <[email protected]>

Rename arcmsr_free_mu to arcmsr_free_io_queue

Signed-off-by: Ching Huang <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2019-01-08 21:58:36 -05:00
Ching Huang 381d66da72 scsi: arcmsr: Rename acb structure member roundup_ccbsize to ioqueue_size
From Ching Huang <[email protected]>

Rename acb structure member roundup_ccbsize to ioqueue_size

Signed-off-by: Ching Huang <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2019-01-08 21:58:36 -05:00
Christoph Hellwig bb327df832 scsi: gdth: use generic DMA API
Switch from the legacy PCI DMA API to the generic DMA API.  Also switch
to dma_map_single from pci_map_page in one case where this makes the code
simpler.

Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2019-01-08 21:58:35 -05:00
Christoph Hellwig d8e1e6add2 scsi: gdth: remove interrupt coalescing support
This code has been under a never defined ifdef since the beginning
of time (or at least history), and has just bitrotted.  Nuke it.

Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2019-01-08 21:58:35 -05:00
Christoph Hellwig 9affa59785 scsi: gdth: remove dead code under #ifdef GDTH_IOCTL_PROC
This can't ever be compiled into the kernel, so remove it.

Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2019-01-08 21:58:35 -05:00
Christoph Hellwig 1d978c336a scsi: gdth: remove dead dma statistics code
This code can't be built into the kernel without editing the source
file and is not generally useful.

[mkp: typo]

Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2019-01-08 21:58:35 -05:00
Christoph Hellwig e09c142891 scsi: gdth: remove dead rtc code
This code has been under the never defined GDTH_RTC ifdef forever,
nuke it.

Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2019-01-08 21:58:35 -05:00
Christoph Hellwig adfa080bf2 scsi: gdth: remove direct serial port access
Remove never compile in support for sending debug traces straight to
the serial port using direct port access.

Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2019-01-08 21:58:35 -05:00
Christoph Hellwig 314814552a scsi: gdth: remove ISA and EISA support
The non-PCI code has bitrotted for quite a while and will just oops
on load because it passes a NULL pointer to the PCI DMA routines.

Lets kill it for good - if someone really wants to use one of these
cards I'll help mentoring them to write a proper driver glue.

Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2019-01-08 21:58:35 -05:00
Linus Torvalds a88cc8da02 Merge branch 'akpm' (patches from Andrew)
Merge misc fixes from Andrew Morton:
 "14 fixes"

* emailed patches from Andrew Morton <[email protected]>:
  mm, page_alloc: do not wake kswapd with zone lock held
  hugetlbfs: revert "use i_mmap_rwsem for more pmd sharing synchronization"
  hugetlbfs: revert "Use i_mmap_rwsem to fix page fault/truncate race"
  mm: page_mapped: don't assume compound page is huge or THP
  mm/memory.c: initialise mmu_notifier_range correctly
  tools/vm/page_owner: use page_owner_sort in the use example
  kasan: fix krealloc handling for tag-based mode
  kasan: make tag based mode work with CONFIG_HARDENED_USERCOPY
  kasan, arm64: use ARCH_SLAB_MINALIGN instead of manual aligning
  mm, memcg: fix reclaim deadlock with writeback
  mm/usercopy.c: no check page span for stack objects
  slab: alien caches must not be initialized if the allocation of the alien cache failed
  fork, memcg: fix cached_stacks case
  zram: idle writeback fixes and cleanup
2019-01-08 18:58:29 -08:00
Christoph Hellwig 463563fa74 scsi: gdth: remove gdth_{alloc,free}_ioctl
Out of the three callers once insists on the scratch buffer, and the
others are fine with a new allocation.  Switch those two to just use
pci_alloc_consistent directly, and open code the scratch buffer
allocation in the remaining one.  This avoids a case where we might
be doing a memory allocation under a spinlock with irqs disabled.

[mkp: typo]

Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2019-01-08 21:57:42 -05:00
Christoph Hellwig 8d22022c3a scsi: gdth: reuse dma coherent allocation in gdth_show_info
gdth_show_info currently allocs and frees a dma buffer four times which
isn't very efficient. Reuse a single allocation instead.

Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2019-01-08 21:57:42 -05:00
Christoph Hellwig 9f475ebff8 scsi: gdth: refactor ioc_general
This function is a huge mess with duplicated error handling.  Split out
a few useful helpers and use goto labels to untangle the error handling
and no-data ioctl handling.

Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2019-01-08 21:57:41 -05:00
Gustavo A. R. Silva 5bd5f66cf1 scsi: lpfc: lpfc_sli: Mark expected switch fall-throughs
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where
we are expecting to fall through.

Notice that, in this particular case, I replaced "Drop thru" and "Fall
Thru" with "fall through" annotations, which is what GCC is expecting to
find.

Also, in some cases a dash is added as a token in order to separate the
"fall through" annotation from the rest of the comment on the same line,
which is what GCC is expecting to find.

Addresses-Coverity-ID: 114979 ("Missing break in switch")
Addresses-Coverity-ID: 114980 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <[email protected]>
Acked-by: Dick Kennedy <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2019-01-08 21:57:26 -05:00
Gustavo A. R. Silva 12de280b36 scsi: smartpqi_init: fix boolean expression in pqi_device_remove_start
Fix boolean expression by using logical AND operator '&&' instead of
bitwise operator '&'.

This issue was detected with the help of Coccinelle.

Fixes: 1e46731efd ("scsi: smartpqi: check for null device pointers")
Signed-off-by: Gustavo A. R. Silva <[email protected]>
Signed-off-by: Gustavo A. R. Silva <[email protected]>
Acked-by: Don Brace <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2019-01-08 21:57:26 -05:00
Stanley Chu 3f7e62bba0 scsi: core: Synchronize request queue PM status only on successful resume
The commit 356fd2663c ("scsi: Set request queue runtime PM status back to
active on resume") fixed up the inconsistent RPM status between request
queue and device. However changing request queue RPM status shall be done
only on successful resume, otherwise status may be still inconsistent as
below,

Request queue: RPM_ACTIVE
Device: RPM_SUSPENDED

This ends up soft lockup because requests can be submitted to underlying
devices but those devices and their required resource are not resumed.

For example,

After above inconsistent status happens, IO request can be submitted to UFS
device driver but required resource (like clock) is not resumed yet thus
lead to warning as below call stack,

WARN_ON(hba->clk_gating.state != CLKS_ON);
ufshcd_queuecommand
scsi_dispatch_cmd
scsi_request_fn
__blk_run_queue
cfq_insert_request
__elv_add_request
blk_flush_plug_list
blk_finish_plug
jbd2_journal_commit_transaction
kjournald2

We may see all behind IO requests hang because of no response from storage
host or device and then soft lockup happens in system. In the end, system
may crash in many ways.

Fixes: 356fd2663c (scsi: Set request queue runtime PM status back to active on resume)
Cc: [email protected]
Signed-off-by: Stanley Chu <[email protected]>
Reviewed-by: Bart Van Assche <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2019-01-08 21:57:26 -05:00
Julia Lawall 251f24e63f scsi: pm80xx: reduce indentation
Delete tab aligning a statement with the right hand side of a preceding
assignment rather than the left hand side.

Found with the help of Coccinelle.

[mkp: added space]

Signed-off-by: Julia Lawall <[email protected]>
Acked-by: Jack Wang <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2019-01-08 21:57:25 -05:00
YueHaibing 72b4a0465f scsi: qla4xxx: check return code of qla4xxx_copy_from_fwddb_param
The return code should be check while qla4xxx_copy_from_fwddb_param fails.

Signed-off-by: YueHaibing <[email protected]>
Acked-by: Manish Rangankar <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2019-01-08 21:57:25 -05:00
Tomas Henzl d1f38d995e scsi: megaraid_sas: correct an info message
This was apparently forgotten in
894169db1 ("scsi: megaraid_sas: Use 63-bit DMA addressing").

Signed-off-by: Tomas Henzl <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2019-01-08 21:57:25 -05:00