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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
From Ching Huang <[email protected]>
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 <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
From Ching Huang <[email protected]>
dma_zalloc_coherent will be phased out. Use dma_alloc_coherent instead.
Signed-off-by: Ching Huang <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
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 <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
The driver currently uses pci_set_dma_mask despite otherwise using the
generic DMA API.
Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
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 <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
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 <[email protected]>
Acked-by: Ching Huang <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
Fix error of resuming from hibernation for adapter type E.
Signed-off-by: Ching Huang <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
Sleep to avoid CPU stuck too long for waiting adapter ready.
Signed-off-by: Ching Huang <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
Handle adapter removed due to thunderbolt cable disconnection.
Signed-off-by: Ching Huang <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
Rename ACB_F_BUS_HANG_ON to ACB_F_ADAPTER_REMOVED for adapter hot-plug.
Signed-off-by: Ching Huang <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
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 <[email protected]>
Acked-by: Ching Huang <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
Simplify all arcmsr_hbaX_get_config routine by call a new
get_adapter_config function.
Signed-off-by: Ching Huang <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
Waiting for iop firmware ready before issue get_config command to iop
for adapter type A and D.
Signed-off-by: Ching Huang <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
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 <[email protected]>
Acked-by: Ching Huang <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
Fix report command result error when CHECK_CONDITION.
Signed-off-by: Ching Huang <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
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 <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
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 <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
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 <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
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 <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
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 <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
Add driver option cmd_per_lun to set host->cmd_per_lun value by user.
Signed-off-by: Ching Huang <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
Replace constant ARCMSR_MAX_OUTSTANDING_CMD by variable
acb->maxOutstanding that was determined by user.
Signed-off-by: Ching Huang <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
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 <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
Replace constant ARCMSR_MAX_FREECCB_NUM by variable acb->maxFreeCCB that
was received from firmware.
Signed-off-by: Ching Huang <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
Update ARCMSR_MAX_OUTSTANDING_CMD and ARCMSR_MAX_FREECCB_NUM to 1024.
Signed-off-by: Ching Huang <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
Add code for ACB_ADAPTER_TYPE_E to support new adapter ARC-1884.
Signed-off-by: Ching Huang <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>