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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>