summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/arcmsr (follow)
Commit message (Collapse)AuthorAgeFilesLines
* scsi: arcmsr: Update driver version to v1.40.00.10-20190116Ching Huang2019-01-231-1/+1
| | | | | | | | | 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>
* scsi: arcmsr: Fix suspend/resume of ACB_ADAPTER_TYPE_B part 2Ching Huang2019-01-231-1/+5
| | | | | | | | | | | 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>
* scsi: arcmsr: Use dma_alloc_coherent to replace dma_zalloc_coherentChing Huang2019-01-231-3/+3
| | | | | | | | | 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>
* scsi: arcmsr: Update driver version to v1.40.00.10-20181217Ching Huang2019-01-091-1/+1
| | | | | | | | | 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>
* scsi: arcmsr: Fix suspend/resume of ACB_ADAPTER_TYPE_BChing Huang2019-01-091-1/+10
| | | | | | | | | 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>
* scsi: arcmsr: Separate 'set dma mask' as a functionChing Huang2019-01-091-21/+30
| | | | | | | | | 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>
* scsi: arcmsr: Add an option of set dma_mask_64 for ACB_ADAPTER_TYPE_AChing Huang2019-01-091-0/+4
| | | | | | | | | 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>
* scsi: arcmsr: Update ACB_ADAPTER_TYPE_D for >4GB ccb addressingChing Huang2019-01-091-6/+18
| | | | | | | | | 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>
* scsi: arcmsr: Update ACB_ADAPTER_TYPE_C for >4GB ccb addressingChing Huang2019-01-091-12/+15
| | | | | | | | | 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>
* scsi: arcmsr: Update ACB_ADAPTER_TYPE_B for >4GB ccb addressingChing Huang2019-01-091-5/+17
| | | | | | | | | 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>
* scsi: arcmsr: Update ACB_ADAPTER_TYPE_A for >4GB ccb addressingChing Huang2019-01-091-5/+20
| | | | | | | | | 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>
* scsi: arcmsr: Update arcmsr_alloc_ccb_pool for ccb buffer address above 4GBChing Huang2019-01-092-9/+19
| | | | | | | | | 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>
* scsi: arcmsr: Merge arcmsr_alloc_io_queue to arcmsr_alloc_ccb_poolChing Huang2019-01-091-50/+77
| | | | | | | | | 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>
* scsi: arcmsr: Rename arcmsr_free_mu to arcmsr_free_io_queueChing Huang2019-01-091-4/+4
| | | | | | | | | 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>
* scsi: arcmsr: Rename acb structure member roundup_ccbsize to ioqueue_sizeChing Huang2019-01-092-10/+10
| | | | | | | | | 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>
* scsi: flip the default on use_clusteringChristoph Hellwig2018-12-191-1/+0
| | | | | | | | | | 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>
* scsi: arcmsr: use dma_set_maskChristoph Hellwig2018-11-151-4/+4
| | | | | | | | 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>
* scsi: arcmsr: Remove set but not used variables 'id, lun'YueHaibing2018-10-171-3/+0
| | | | | | | | | | | | | | | | 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>
* scsi: arcmsr: clean up clang warning on extraneous parenthesesColin Ian King2018-10-111-3/+3
| | | | | | | | | | | | 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>
* scsi: arcmsr: Spelling s/rebulid/rebuild/Geert Uytterhoeven2018-09-121-10/+10
| | | | | Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: arcmsr: Update driver version to v1.40.00.09-20180709Ching Huang2018-07-131-1/+1
| | | | | | | 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>
* scsi: arcmsr: Fix error of resuming from hibernation for adapter type EChing Huang2018-07-131-0/+7
| | | | | | | 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>
* scsi: arcmsr: Change driver version to v1.40.00.05-20180309Ching Huang2018-03-211-1/+1
| | | | | | | 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>
* scsi: arcmsr: Sleep to avoid CPU stuck too long for waiting adapter readyChing Huang2018-03-211-0/+10
| | | | | | | 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>
* scsi: arcmsr: Handle adapter removed due to thunderbolt cable disconnection.Ching Huang2018-03-211-0/+80
| | | | | | | 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>
* scsi: arcmsr: Rename ACB_F_BUS_HANG_ON to ACB_F_ADAPTER_REMOVED for adapter ↵Ching Huang2018-03-211-1/+1
| | | | | | | | | 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>
* scsi: arcmsr: avoid do_gettimeofdayArnd Bergmann2018-01-231-27/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* scsi: arcmsr: simplify arcmsr_request_device_map routineChing Huang2017-12-211-135/+34
| | | | | | | 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>
* scsi: arcmsr: simplify all arcmsr_hbaX_get_config routine by call a new ↵Ching Huang2017-12-211-195/+48
| | | | | | | | | | 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>
* scsi: arcmsr: simplify arcmsr_hbaE_get_config functionChing Huang2017-12-211-15/+3
| | | | | | | 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>
* scsi: arcmsr: waiting for iop firmware ready before issue get_config command ↵Ching Huang2017-12-211-0/+2
| | | | | | | | | | 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>
* scsi: arcmsr: simplify arcmsr_hbaC_get_config functionChing Huang2017-12-211-12/+3
| | | | | | | 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>
* scsi: arcmsr: remove redundant check for secs < 0Colin Ian King2017-12-121-4/+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>
* scsi: arcmsr: Fix command result for CHECK_CONDITIONChing Huang2017-12-071-1/+2
| | | | | | | 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>
* scsi: arcmsr: Update driver version to v1.40.00.04-20171130Ching Huang2017-12-071-1/+1
| | | | | | | 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>
* scsi: arcmsr: Add driver module parameter msix_enableChing Huang2017-12-071-0/+7
| | | | | | | | 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>
* scsi: arcmsr: Add driver module parameter msi_enableChing Huang2017-12-071-3/+13
| | | | | | | | 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>
* scsi: arcmsr: Fix grammarChing Huang2017-12-071-1/+1
| | | | | | | Fix grammar. Signed-off-by: Ching Huang <ching2048@areca.com.tw> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: arcmsr: Adjust whitespaceChing Huang2017-12-072-221/+221
| | | | | | | Adjust tabs and whitespace. Signed-off-by: Ching Huang <ching2048@areca.com.tw> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: arcmsr: Spin off duplicate codeChing Huang2017-12-071-14/+13
| | | | | | | | 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>
* scsi: arcmsr: Fix clear doorbell queue on ACB_ADAPTER_TYPE_BChing Huang2017-12-071-2/+11
| | | | | | | 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>
* scsi: arcmsr: Add a function to set date and time to firmwareChing Huang2017-12-072-0/+131
| | | | | | | | 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>
* scsi: arcmsr: Add ACB_F_MSG_GET_CONFIG to acb->acb_flagsChing Huang2017-12-072-5/+17
| | | | | | | | 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>
* scsi: arcmsr: Add driver option cmd_per_lunChing Huang2017-12-072-3/+11
| | | | | | | 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>
* scsi: arcmsr: Replace constant ARCMSR_MAX_OUTSTANDING_CMDChing Huang2017-12-071-3/+3
| | | | | | | | 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>
* scsi: arcmsr: Add driver option host_can_queueChing Huang2017-12-072-6/+14
| | | | | | | | 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>
* scsi: arcmsr: replace constant ARCMSR_MAX_FREECCB_NUMChing Huang2017-12-072-5/+9
| | | | | | | | 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>
* scsi: arcmsr: Increase host controller command queue depthChing Huang2017-12-071-7/+2
| | | | | | | 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>
* scsi: arcmsr: Add code for ACB_ADAPTER_TYPE_EChing Huang2017-12-072-3/+649
| | | | | | | 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>
* scsi: arcmsr: simplify arcmsr_iop_init functionChing Huang2017-12-071-184/+75
| | | | | | | Simplify arcmsr_iop_init function. Signed-off-by: Ching Huang <ching2048@areca.com.tw> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>