summaryrefslogtreecommitdiff
path: root/drivers/scsi/arcmsr
AgeCommit message (Collapse)Author
2019-05-21treewide: Add SPDX license identifier - Makefile/KconfigThomas Gleixner
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-01-22scsi: arcmsr: Update driver version to v1.40.00.10-20190116Ching Huang
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-22scsi: arcmsr: Fix suspend/resume of ACB_ADAPTER_TYPE_B part 2Ching Huang
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-22scsi: arcmsr: Use dma_alloc_coherent to replace dma_zalloc_coherentChing Huang
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-08scsi: arcmsr: Update driver version to v1.40.00.10-20181217Ching Huang
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-08scsi: arcmsr: Fix suspend/resume of ACB_ADAPTER_TYPE_BChing Huang
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-08scsi: arcmsr: Separate 'set dma mask' as a functionChing Huang
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-08scsi: arcmsr: Add an option of set dma_mask_64 for ACB_ADAPTER_TYPE_AChing Huang
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-08scsi: arcmsr: Update ACB_ADAPTER_TYPE_D for >4GB ccb addressingChing Huang
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-08scsi: arcmsr: Update ACB_ADAPTER_TYPE_C for >4GB ccb addressingChing Huang
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-08scsi: arcmsr: Update ACB_ADAPTER_TYPE_B for >4GB ccb addressingChing Huang
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-08scsi: arcmsr: Update ACB_ADAPTER_TYPE_A for >4GB ccb addressingChing Huang
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-08scsi: arcmsr: Update arcmsr_alloc_ccb_pool for ccb buffer address above 4GBChing Huang
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-08scsi: arcmsr: Merge arcmsr_alloc_io_queue to arcmsr_alloc_ccb_poolChing Huang
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-08scsi: arcmsr: Rename arcmsr_free_mu to arcmsr_free_io_queueChing Huang
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-08scsi: arcmsr: Rename acb structure member roundup_ccbsize to ioqueue_sizeChing Huang
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>
2018-12-18scsi: flip the default on use_clusteringChristoph Hellwig
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-11-15scsi: arcmsr: use dma_set_maskChristoph Hellwig
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-10-16scsi: arcmsr: Remove set but not used variables 'id, lun'YueHaibing
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 ae52e7f09ff5 ("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-10scsi: arcmsr: clean up clang warning on extraneous parenthesesColin Ian King
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-09-11scsi: arcmsr: Spelling s/rebulid/rebuild/Geert Uytterhoeven
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-07-12scsi: arcmsr: Update driver version to v1.40.00.09-20180709Ching Huang
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-12scsi: arcmsr: Fix error of resuming from hibernation for adapter type EChing Huang
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-03-21scsi: arcmsr: Change driver version to v1.40.00.05-20180309Ching Huang
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-21scsi: arcmsr: Sleep to avoid CPU stuck too long for waiting adapter readyChing Huang
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-21scsi: arcmsr: Handle adapter removed due to thunderbolt cable disconnection.Ching Huang
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-21scsi: arcmsr: Rename ACB_F_BUS_HANG_ON to ACB_F_ADAPTER_REMOVED for adapter ↵Ching Huang
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-01-22scsi: arcmsr: avoid do_gettimeofdayArnd Bergmann
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: b416c099472a ("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>
2017-12-20scsi: arcmsr: simplify arcmsr_request_device_map routineChing Huang
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-20scsi: arcmsr: simplify all arcmsr_hbaX_get_config routine by call a new ↵Ching Huang
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-20scsi: arcmsr: simplify arcmsr_hbaE_get_config functionChing Huang
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-20scsi: arcmsr: waiting for iop firmware ready before issue get_config command ↵Ching Huang
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-20scsi: arcmsr: simplify arcmsr_hbaC_get_config functionChing Huang
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-11scsi: arcmsr: remove redundant check for secs < 0Colin Ian King
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-06scsi: arcmsr: Fix command result for CHECK_CONDITIONChing Huang
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-06scsi: arcmsr: Update driver version to v1.40.00.04-20171130Ching Huang
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-06scsi: arcmsr: Add driver module parameter msix_enableChing Huang
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-06scsi: arcmsr: Add driver module parameter msi_enableChing Huang
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-06scsi: arcmsr: Fix grammarChing Huang
Fix grammar. Signed-off-by: Ching Huang <ching2048@areca.com.tw> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-12-06scsi: arcmsr: Adjust whitespaceChing Huang
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-06scsi: arcmsr: Spin off duplicate codeChing Huang
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-06scsi: arcmsr: Fix clear doorbell queue on ACB_ADAPTER_TYPE_BChing Huang
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-06scsi: arcmsr: Add a function to set date and time to firmwareChing Huang
Add a function arcmsr_set_iop_datetime and driver option set_date_time to set date and time to firmware. Signed-off-by: Ching Huang <ching2048@areca.com.tw> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-12-06scsi: arcmsr: Add ACB_F_MSG_GET_CONFIG to acb->acb_flagsChing Huang
Add ACB_F_MSG_GET_CONFIG to acb->acb_flags for for message interrupt checking before schedule work for get device map. Signed-off-by: Ching Huang <ching2048@areca.com.tw> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-12-06scsi: arcmsr: Add driver option cmd_per_lunChing Huang
Add driver option cmd_per_lun to set host->cmd_per_lun value by user. Signed-off-by: Ching Huang <ching2048@areca.com.tw> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-12-06scsi: arcmsr: Replace constant ARCMSR_MAX_OUTSTANDING_CMDChing Huang
Replace constant ARCMSR_MAX_OUTSTANDING_CMD by variable acb->maxOutstanding that was determined by user. Signed-off-by: Ching Huang <ching2048@areca.com.tw> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-12-06scsi: arcmsr: Add driver option host_can_queueChing Huang
Add driver option host_can_queue to set host->can_queue value by user. It's value expands up to 1024. Signed-off-by: Ching Huang <ching2048@areca.com.tw> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-12-06scsi: arcmsr: replace constant ARCMSR_MAX_FREECCB_NUMChing Huang
Replace constant ARCMSR_MAX_FREECCB_NUM by variable acb->maxFreeCCB that was received from firmware. Signed-off-by: Ching Huang <ching2048@areca.com.tw> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-12-06scsi: arcmsr: Increase host controller command queue depthChing Huang
Update ARCMSR_MAX_OUTSTANDING_CMD and ARCMSR_MAX_FREECCB_NUM to 1024. Signed-off-by: Ching Huang <ching2048@areca.com.tw> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-12-06scsi: arcmsr: Add code for ACB_ADAPTER_TYPE_EChing Huang
Add code for ACB_ADAPTER_TYPE_E to support new adapter ARC-1884. Signed-off-by: Ching Huang <ching2048@areca.com.tw> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>