Граф коммитов

158 Коммитов

Автор SHA1 Сообщение Дата
Gustavo A. R. Silva df561f6688 treewide: Use fallthrough pseudo-keyword
Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
fall-through markings when it is the case.

[1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
2020-08-23 17:36:59 -05:00
Lee Jones 7c7ef829ad scsi: arcmsr: arcmsr_hba: Remove statement with no effect
According to LKP, commit 18bc435e0a ("scsi: arcmsr: Remove some set but
unused variables") can be furthered to remove the entire statement and not
just the unused variable read into.

Snipped LKP report:

 config: x86_64-randconfig-m001-20200719
 compiler: gcc-9 (Debian 9.3.0-14) 9.3.0

 New smatch warnings:
  drivers/scsi/arcmsr/arcmsr_hba.c:1490 arcmsr_done4abort_postqueue() warn: statement has no effect 8
  drivers/scsi/arcmsr/arcmsr_hba.c:2459 arcmsr_hbaD_postqueue_isr() warn: statement has no effect 8
  drivers/scsi/arcmsr/arcmsr_hba.c:3526 arcmsr_hbaD_polling_ccbdone() warn: statement has no effect 8

 1a4f550a09 Nick Cheng  2007-09-13  1401  static void arcmsr_done4abort_postqueue(struct AdapterControlBlock *acb)
 1a4f550a09 Nick Cheng  2007-09-13  1402  {
 [...]
 18bc435e0a Lee Jones   2020-07-13 @1490                             pmu->done_qbuffer[doneq_index & 0xFFF].addressHigh;
                                                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 Delete this line.
 [...]

Link: https://lore.kernel.org/r/20200721164148.2617584-2-lee.jones@linaro.org
Cc: support@areca.com.tw
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-07-24 22:09:57 -04:00
Lee Jones 18bc435e0a scsi: arcmsr: Remove some set but unused variables
Fixes the following W=1 kernel build warning(s):

 drivers/scsi/arcmsr/arcmsr_hba.c: In function ‘arcmsr_remap_pciregion’:
 drivers/scsi/arcmsr/arcmsr_hba.c:286:30: warning: variable ‘flags’ set but not used [-Wunused-but-set-variable]
 286 | unsigned long addr, range, flags;
 | ^~~~~
 drivers/scsi/arcmsr/arcmsr_hba.c: In function ‘arcmsr_suspend’:
 drivers/scsi/arcmsr/arcmsr_hba.c:1070:11: warning: variable ‘intmask_org’ set but not used [-Wunused-but-set-variable]
 1070 | uint32_t intmask_org;
 | ^~~~~~~~~~~
 drivers/scsi/arcmsr/arcmsr_hba.c: In function ‘arcmsr_done4abort_postqueue’:
 drivers/scsi/arcmsr/arcmsr_hba.c:1410:29: warning: variable ‘cdb_phy_hipart’ set but not used [-Wunused-but-set-variable]
 1410 | unsigned long ccb_cdb_phy, cdb_phy_hipart;
 | ^~~~~~~~~~~~~~
 drivers/scsi/arcmsr/arcmsr_hba.c: In function ‘arcmsr_hbaD_postqueue_isr’:
 drivers/scsi/arcmsr/arcmsr_hba.c:2448:36: warning: variable ‘cdb_phy_hipart’ set but not used [-Wunused-but-set-variable]
 2448 | unsigned long flags, ccb_cdb_phy, cdb_phy_hipart;
 | ^~~~~~~~~~~~~~
 drivers/scsi/arcmsr/arcmsr_hba.c: In function ‘arcmsr_hbaD_polling_ccbdone’:
 drivers/scsi/arcmsr/arcmsr_hba.c:3498:36: warning: variable ‘cdb_phy_hipart’ set but not used [-Wunused-but-set-variable]
 3498 | unsigned long flags, ccb_cdb_phy, cdb_phy_hipart;
 | ^~~~~~~~~~~~~~

Link: https://lore.kernel.org/r/20200713074645.126138-15-lee.jones@linaro.org
Cc: support@areca.com.tw
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-07-15 16:01:58 -04:00
Linus Torvalds 79f51b7b9c SCSI misc on 20200402
update changing all our txt files to rst ones.  Excluding that, we
 have the usual driver updates (qla2xxx, ufs, lpfc, zfcp, ibmvfc,
 pm80xx, aacraid), a treewide update for scnprintf and some other minor
 updates.  The major core update is Hannes moving functions out of the
 aacraid driver and into the core.
 
 Signed-off-by: James E.J. Bottomley <jejb@linux.ibm.com>
 -----BEGIN PGP SIGNATURE-----
 
 iJwEABMIAEQWIQTnYEDbdso9F2cI+arnQslM7pishQUCXoYKiyYcamFtZXMuYm90
 dG9tbGV5QGhhbnNlbnBhcnRuZXJzaGlwLmNvbQAKCRDnQslM7pishSasAP4iGwSB
 Y8tFaZgWadu76+wj5MdqTBoXdhnIuFF0rZG3pQEAiIKdsfQlbSFdm75+gUtx5hG/
 GOilX/pJczTRJDCGNis=
 =g7Sk
 -----END PGP SIGNATURE-----

Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI updates from James Bottomley:
 "This series has a huge amount of churn because it pulls in Mauro's doc
  update changing all our txt files to rst ones.

  Excluding that, we have the usual driver updates (qla2xxx, ufs, lpfc,
  zfcp, ibmvfc, pm80xx, aacraid), a treewide update for scnprintf and
  some other minor updates.

  The major core change is Hannes moving functions out of the aacraid
  driver and into the core"

* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (223 commits)
  scsi: aic7xxx: aic97xx: Remove FreeBSD-specific code
  scsi: ufs: Do not rely on prefetched data
  scsi: dc395x: remove dc395x_bios_param
  scsi: libiscsi: Fix error count for active session
  scsi: hpsa: correct race condition in offload enabled
  scsi: message: fusion: Replace zero-length array with flexible-array member
  scsi: qedi: Add PCI shutdown handler support
  scsi: qedi: Add MFW error recovery process
  scsi: ufs: Enable block layer runtime PM for well-known logical units
  scsi: ufs-qcom: Override devfreq parameters
  scsi: ufshcd: Let vendor override devfreq parameters
  scsi: ufshcd: Update the set frequency to devfreq
  scsi: ufs: Resume ufs host before accessing ufs device
  scsi: ufs-mediatek: customize the delay for enabling host
  scsi: ufs: make HCE polling more compact to improve initialization latency
  scsi: ufs: allow custom delay prior to host enabling
  scsi: ufs-mediatek: use common delay function
  scsi: ufs: introduce common and flexible delay function
  scsi: ufs: use an enum for host capabilities
  scsi: ufs: fix uninitialized tx_lanes in ufshcd_disable_tx_lcc()
  ...
2020-04-02 17:03:53 -07:00
Christoph Hellwig a10183d744 scsi: simplify scsi_partsize
Call scsi_bios_ptable from scsi_partsize instead of requiring boilerplate
code in the callers.  Also switch the calling convention to match that
of the ->bios_param instances calling this function, and use true/false
for the return value instead of the weird -1 convention.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-03-24 07:57:07 -06:00
Mauro Carvalho Chehab dade67f4a5 scsi: docs: convert arcmsr_spec.txt to ReST
This file had its own peculiar style, not following any other
files inside the Kernel (as far as I saw).

Had to do a number of changes here, starting by removing the two
leading asterisks from each line, adding table and literal
block markups and changing whitespace and blank lines.

The end result is that (IMHO), it is now a lot easier to read
it as a text file, while producing a good html output.

Link: https://lore.kernel.org/r/6f8e4da4ea643adbe048f55504a59427c5e50c97.1583136624.git.mchehab+huawei@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-03-11 23:08:03 -04:00
Christoph Hellwig 4bdc0d676a remove ioremap_nocache and devm_ioremap_nocache
ioremap has provided non-cached semantics by default since the Linux 2.6
days, so remove the additional ioremap_nocache interface.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
2020-01-06 09:45:59 +01:00
Colin Ian King 9b44ffab49 scsi: arcmsr: fix indentation issues
There are a few statements that are indented incorrectly, fix these.

Link: https://lore.kernel.org/r/20191114180007.325856-1-colin.king@canonical.com
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-11-19 21:37:34 -05:00
Thomas Gleixner ec8f24b7fa treewide: Add SPDX license identifier - Makefile/Kconfig
Add SPDX license identifiers to all Make/Kconfig files which:

 - Have no license information of any form

These files fall under the project license, GPL v2 only. The resulting SPDX
license identifier is:

  GPL-2.0-only

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-21 10:50:46 +02:00
Ching Huang dfeba64dd6 scsi: arcmsr: Update driver version to v1.40.00.10-20190116
From Ching Huang <ching2048@areca.com.tw>

Update driver version to v1.40.00.10-20190116.

Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-01-22 21:38:21 -05:00
Ching Huang 317d0e027c scsi: arcmsr: Fix suspend/resume of ACB_ADAPTER_TYPE_B part 2
From Ching Huang <ching2048@areca.com.tw>

For ACB_ADAPTER_TYPE_B controller, the read/write after hibernate and
resume may sometimes result in 'isr get an illegal ccb command' in
/var/log/messages. This patch fixes it.

Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-01-22 21:38:21 -05:00
Ching Huang 3e3153b050 scsi: arcmsr: Use dma_alloc_coherent to replace dma_zalloc_coherent
From Ching Huang <ching2048@areca.com.tw>

dma_zalloc_coherent will be phased out. Use dma_alloc_coherent instead.

Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-01-22 21:38:21 -05:00
Ching Huang ad796f790c scsi: arcmsr: Update driver version to v1.40.00.10-20181217
From Ching Huang <ching2048@areca.com.tw>

Update driver version to v1.40.00.10-20181217

Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-01-08 21:58:36 -05:00
Ching Huang afdda87852 scsi: arcmsr: Fix suspend/resume of ACB_ADAPTER_TYPE_B
From Ching Huang <ching2048@areca.com.tw>

Fix suspend/resume of ACB_ADAPTER_TYPE_B

Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-01-08 21:58:36 -05:00
Ching Huang 1d120c6183 scsi: arcmsr: Separate 'set dma mask' as a function
From Ching Huang <ching2048@areca.com.tw>

Separate 'set dma mask' as a function

Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
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 <ching2048@areca.com.tw>

Add an option of set dma_mask_64 for ACB_ADAPTER_TYPE_A

Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
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 <ching2048@areca.com.tw>

Update ACB_ADAPTER_TYPE_D for >4gb ccb addressing

Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
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 <ching2048@areca.com.tw>

Update ACB_ADAPTER_TYPE_C for >4GB ccb addressing

Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
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 <ching2048@areca.com.tw>

Update ACB_ADAPTER_TYPE_B for >4GB ccb addressing

Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
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 <ching2048@areca.com.tw>

Update ACB_ADAPTER_TYPE_A for >4GB ccb addressing

Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
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 <ching2048@areca.com.tw>

Update arcmsr_alloc_ccb_pool for ccb buffer address above 4GB

Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
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 <ching2048@areca.com.tw>

Merge arcmsr_alloc_io_queue to arcmsr_alloc_ccb_pool

Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
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 <ching2048@areca.com.tw>

Rename arcmsr_free_mu to arcmsr_free_io_queue

Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
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 <ching2048@areca.com.tw>

Rename acb structure member roundup_ccbsize to ioqueue_size

Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-01-08 21:58:36 -05:00
Christoph Hellwig 2a3d4eb8e2 scsi: flip the default on use_clustering
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 <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-12-18 23:13:12 -05:00
Christoph Hellwig b3b07762db scsi: arcmsr: use dma_set_mask
The driver currently uses pci_set_dma_mask despite otherwise using the
generic DMA API.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-11-15 14:26:28 -05:00
YueHaibing 242b4a39be scsi: arcmsr: Remove set but not used variables 'id, lun'
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/scsi/arcmsr/arcmsr_hba.c: In function 'arcmsr_drain_donequeue':
drivers/scsi/arcmsr/arcmsr_hba.c:1320:10: warning:
 variable 'lun' set but not used [-Wunused-but-set-variable]

drivers/scsi/arcmsr/arcmsr_hba.c:1320:6: warning:
 variable 'id' set but not used [-Wunused-but-set-variable]

Never used since introduction in commit ae52e7f09f ("arcmsr: Support 1024 scatter-gather list entries and improve AP while FW trapped and behaviors of EHs").

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-10-16 18:13:59 -04:00
Colin Ian King ca2ade2415 scsi: arcmsr: clean up clang warning on extraneous parentheses
There are extraneous parantheses that are causing clang to produce a
warning so remove these.

Clean up 3 clang warnings:
equality comparison with extraneous parentheses [-Wparentheses-equality]

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Ching Huang <ching2048@areca.com.tw>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-10-10 23:21:35 -04:00
Geert Uytterhoeven 948dff7a41 scsi: arcmsr: Spelling s/rebulid/rebuild/
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-09-11 20:58:29 -04:00
Ching Huang cb12ba356c scsi: arcmsr: Update driver version to v1.40.00.09-20180709
Update driver version to v1.40.00.09-20180709

Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-07-12 22:34:59 -04:00
Ching Huang 97fe222524 scsi: arcmsr: Fix error of resuming from hibernation for adapter type E
Fix error of resuming from hibernation for adapter type E.

Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-07-12 22:34:34 -04:00
Ching Huang 45dce24df5 scsi: arcmsr: Change driver version to v1.40.00.05-20180309
Change driver version to v1.40.00.05-20180309

Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-03-21 18:46:30 -04:00
Ching Huang c2c62ebca1 scsi: arcmsr: Sleep to avoid CPU stuck too long for waiting adapter ready
Sleep to avoid CPU stuck too long for waiting adapter ready.

Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-03-21 18:46:30 -04:00
Ching Huang c4c1adb349 scsi: arcmsr: Handle adapter removed due to thunderbolt cable disconnection.
Handle adapter removed due to thunderbolt cable disconnection.

Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-03-21 18:46:30 -04:00
Ching Huang 50b08240de scsi: arcmsr: Rename ACB_F_BUS_HANG_ON to ACB_F_ADAPTER_REMOVED for adapter hot-plug
Rename ACB_F_BUS_HANG_ON to ACB_F_ADAPTER_REMOVED for adapter hot-plug.

Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-03-21 18:46:30 -04:00
Arnd Bergmann 45596c7889 scsi: arcmsr: avoid do_gettimeofday
The arcmsr uses its own implementation of time_to_tm(), along with
do_gettimeofday() to read the current time. While the algorithm used
here is fine in principle, it suffers from two problems:

- it assigns the seconds portion of the timeval to a 32-bit unsigned
  integer that overflows in 2106 even on 64-bit architectures.

- do_gettimeofday() returns a time_t that overflows in 2038 on all
  32-bit systems.

This changes the time retrieval function to ktime_get_real_seconds(),
which returns a proper 64-bit value, and replaces the open-coded
time_to_tm() algorithm with a call to the safe time64_to_tm().

I checked way all numbers are indexed and found that months are given in
range 0..11 while the days are in range 1..31, same as 'struct tm', but
the year value that the firmware expects starts in 2000 while 'struct
tm' is based on year 1900, so it needs a small adjustment.

[mkp: checkpatch tweaks]

Fixes: b416c09947 ("scsi: arcmsr: Add a function to set date and time to firmware")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Ching Huang <ching2048@areca.com.tw>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-01-22 20:04:02 -05:00
Ching Huang 6ae9abe0bd scsi: arcmsr: simplify arcmsr_request_device_map routine
Simplify arcmsr_request_device_map routine.

Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-12-20 21:11:51 -05:00
Ching Huang 1e9c81080d scsi: arcmsr: simplify all arcmsr_hbaX_get_config routine by call a new get_adapter_config function
Simplify all arcmsr_hbaX_get_config routine by call a new
get_adapter_config function.

Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-12-20 21:11:50 -05:00
Ching Huang 22c4ae5b99 scsi: arcmsr: simplify arcmsr_hbaE_get_config function
Simplify arcmsr_hbaE_get_config function.

Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-12-20 21:11:50 -05:00
Ching Huang b6b3084acb scsi: arcmsr: waiting for iop firmware ready before issue get_config command to iop
Waiting for iop firmware ready before issue get_config command to iop
for adapter type A and D.

Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-12-20 21:11:49 -05:00
Ching Huang df9f0ee9d5 scsi: arcmsr: simplify arcmsr_hbaC_get_config function
Simplify arcmsr_hbaC_get_config function.

Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-12-20 21:11:49 -05:00
Colin Ian King 3c62ecda0e scsi: arcmsr: remove redundant check for secs < 0
The check for secs being less than zero is redundant for two reasons.
Firstly, secs is unsigned so the check is always going to be false.
Secondly, if secs was signed the proceeding calculation of secs is never
going to be negative.  Hence we can remove this redundant check and day
and secs re-adjustment.

Detected by static analysis with smatch:
arcmsr_set_iop_datetime() warn: unsigned 'secs' is never less than zero.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Ching Huang <ching2048@areca.com.tw>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-12-11 21:37:08 -05:00
Ching Huang fa576b43f6 scsi: arcmsr: Fix command result for CHECK_CONDITION
Fix report command result error when CHECK_CONDITION.

Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-12-06 19:32:42 -05:00
Ching Huang bc81192eda scsi: arcmsr: Update driver version to v1.40.00.04-20171130
Update driver version to v1.40.00.04-20171130

Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-12-06 19:32:41 -05:00
Ching Huang 07640404bd scsi: arcmsr: Add driver module parameter msix_enable
Add module parameter msix_enable so user has the option of disabling
MSI-X interrupts if there is a platform problem.

Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-12-06 19:32:41 -05:00
Ching Huang a18686eb97 scsi: arcmsr: Add driver module parameter msi_enable
Add module parameter msi_enable so user has the option of disabling MSI
interrupts if there is a platform problem.

Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-12-06 19:32:41 -05:00
Ching Huang 852c3f3240 scsi: arcmsr: Fix grammar
Fix grammar.

Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-12-06 19:32:41 -05:00
Ching Huang a3de4b58bc scsi: arcmsr: Adjust whitespace
Adjust tabs and whitespace.

Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-12-06 19:32:41 -05:00
Ching Huang ea331f30ec scsi: arcmsr: Spin off duplicate code
Spin off duplicate code of timer init for message isr BH in arcmsr_probe
and arcmsr_resume as a function arcmsr_init_get_devmap_timer.

Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-12-06 19:32:41 -05:00
Ching Huang 2124c5b2cc scsi: arcmsr: Fix clear doorbell queue on ACB_ADAPTER_TYPE_B
Fix clear doorbell queue on ACB_ADAPTER_TYPE_B controller.

Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-12-06 19:32:41 -05:00