aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-12-06scsi: arcmsr: Add driver module parameter msix_enableChing Huang1-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 <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2017-12-06scsi: arcmsr: Add driver module parameter msi_enableChing Huang1-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 <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2017-12-06scsi: arcmsr: Fix grammarChing Huang1-1/+1
Fix grammar. Signed-off-by: Ching Huang <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2017-12-06scsi: arcmsr: Adjust whitespaceChing Huang2-221/+221
Adjust tabs and whitespace. Signed-off-by: Ching Huang <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2017-12-06scsi: arcmsr: Spin off duplicate codeChing Huang1-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 <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2017-12-06scsi: arcmsr: Fix clear doorbell queue on ACB_ADAPTER_TYPE_BChing Huang1-2/+11
Fix clear doorbell queue on ACB_ADAPTER_TYPE_B controller. Signed-off-by: Ching Huang <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2017-12-06scsi: arcmsr: Add a function to set date and time to firmwareChing Huang2-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 <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2017-12-06scsi: arcmsr: Add ACB_F_MSG_GET_CONFIG to acb->acb_flagsChing Huang2-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 <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2017-12-06scsi: arcmsr: Add driver option cmd_per_lunChing Huang2-3/+11
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]>
2017-12-06scsi: arcmsr: Replace constant ARCMSR_MAX_OUTSTANDING_CMDChing Huang1-3/+3
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]>
2017-12-06scsi: arcmsr: Add driver option host_can_queueChing Huang2-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 <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2017-12-06scsi: arcmsr: replace constant ARCMSR_MAX_FREECCB_NUMChing Huang2-5/+9
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]>
2017-12-06scsi: arcmsr: Increase host controller command queue depthChing Huang1-7/+2
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]>
2017-12-06scsi: arcmsr: Add code for ACB_ADAPTER_TYPE_EChing Huang2-3/+649
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]>
2017-12-06scsi: arcmsr: simplify arcmsr_iop_init functionChing Huang1-184/+75
Simplify arcmsr_iop_init function. Signed-off-by: Ching Huang <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2017-12-06scsi: arcmsr: Redefine ACB_ADAPTER_TYPE_A, _B, _C, _DChing Huang2-6/+6
Redefine ACB_ADAPTER_TYPE_A, _B, _C, _D and subsequent changes. Signed-off-by: Ching Huang <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2017-12-04scsi: ibmvscsis: add DRC indices to debug statementsBryant G. Ly1-150/+170
Where applicable, changes pr_debug, pr_info, pr_err, etc. calls to the dev_* versions. This adds the DRC index of the device to the corresponding trace statement. Signed-off-by: Bryant G. Ly <[email protected]> Signed-off-by: Brad Warrum <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2017-12-04scsi: ipr: fix incorrect indentation of assignment statementColin Ian King1-2/+2
Remove one extraneous level of indentation on an assignment statement. Signed-off-by: Colin Ian King <[email protected]> Acked-by: Brian King <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2017-12-04scsi: csiostor: fix spelling mistake: "Couldnt" -> "Couldn't"Colin Ian King1-3/+3
Trivial fix to spelling mistake in error message text. Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2017-12-04scsi: bnx2fc: fix spelling mistake: "Couldnt" -> "Couldn't"Colin Ian King1-2/+2
Trivial fix to spelling mistake in error message text. Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2017-12-04scsi: sd: add missing KERN_CONT for disk spin-upMichał Mirosław1-3/+3
KERN_CONT is now required for continued printks(). Add it. Signed-off-by: Michał Mirosław <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2017-12-04scsi: ufs: add some definitions included in UFS HCI specification[email protected]1-0/+16
These would be used in the future in some specific drivers. Signed-off-by: Kiwoong Kim <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2017-12-04scsi: mpt3sas: Remove unused variable requeue_eventSuganath Prabu S1-7/+5
No Functional change just cleanup. Removed variable requeue_event and made function as void. Signed-off-by: Suganath Prabu S <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2017-12-04scsi: mpt3sas: Replace PCI pool old APIRomain Perier1-6/+6
The PCI pool API is deprecated. This commit replaces the PCI pool old API by the appropriate function with the DMA pool API. Signed-off-by: Romain Perier <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2017-12-04scsi: fnic: Fix coccinelle warningsVasyl Gomonovych1-19/+1
Remove the duplicate copies of this simple function and use an open-coded version. drivers/scsi/fnic/fnic_debugfs.c:122:11-31: WARNING opportunity for simple_open, see also structure on line 223 Generated by: coccinelle/api/simple_open.cocci Signed-off-by: Vasyl Gomonovych <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2017-12-04scsi: ses: don't ask for diagnostic pages repeatedly during probeLi Dongyang1-4/+7
We are testing if there is a match with the ses device in a loop by calling ses_match_to_enclosure(), which will issue scsi receive diagnostics commands to the ses device for every device on the same host. On one of our boxes with 840 disks, it takes a long time to load the driver: [root@g1b-oss06 ~]# time modprobe ses real 40m48.247s user 0m0.001s sys 0m0.196s With the patch: [root@g1b-oss06 ~]# time modprobe ses real 0m17.915s user 0m0.008s sys 0m0.053s Note that we still need to refresh page 10 when we see a new disk to create the link. Signed-off-by: Li Dongyang <[email protected]> Tested-by: Jason Ozolins <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2017-12-04scsi: wd719x: make card_types static const, shrinks object sizeColin Ian King1-1/+3
Don't populate the read-only array card_types on the stack but instead make it static and constify it. Makes the object code smaller by over 110 bytes: Before: text data bss dec hex filename 25625 5752 0 31377 7a91 drivers/scsi/wd719x.o After: text data bss dec hex filename 25447 5816 0 31263 7a1f drivers/scsi/wd719x.o (gcc version 7.2.0 x86_64) Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2017-12-04scsi: scsi_debug: remove jiffies_to_timespecArnd Bergmann1-4/+1
There is no need to go through an intermediate timespec to convert to ktime_t when we just want a simple multiplication. This gets rid of one of the few users of jiffies_to_timespec, which I hope to remove as part of the y2038 cleanup. Signed-off-by: Arnd Bergmann <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Acked-by: Douglas Gilbert <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2017-12-04scsi: hpsa: remove an unnecessary NULL checkDan Carpenter1-2/+0
device->scsi3addr[] is an array, not a pointer, so it can't be NULL. I've removed the check. [mkp: fixed typo] Signed-off-by: Dan Carpenter <[email protected]> Acked-by: Don Brace <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2017-12-04scsi: lpfc: update driver version to 11.4.0.5James Smart1-1/+1
Update the driver version to 11.4.0.5 Signed-off-by: Dick Kennedy <[email protected]> Signed-off-by: James Smart <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2017-12-04scsi: lpfc: small sg cnt cleanupJames Smart5-8/+19
The logic for sg_seg_cnt is a bit convoluted. This patch tries to clean up a couple of areas, especially around the +2 and +1 logic. This patch: - Cleans up the lpfc_sg_seg_cnt attribute to specify a real minimum rather than making the minimum be whatever the default is. - Removes the hardcoding of +2 (for the number of elements we use in a sgl for cmd iu and rsp iu) and +1 (an additional entry to compensate for nvme's reduction of io size based on a possible partial page) logic in sg list initialization. In the case where the +1 logic is referenced in host and target io checks, use the values set in the transport template as that value was properly set. There can certainly be more done in this area and it will be addressed in combined host/target driver effort. Signed-off-by: Dick Kennedy <[email protected]> Signed-off-by: James Smart <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2017-12-04scsi: lpfc: Fix driver handling of nvme resources during unloadJames Smart3-11/+105
During driver unload, the driver may crash due to NULL pointers. The NULL pointers were due to the driver not protecting itself sufficiently during some of the teardown paths. Additionally, the driver was not waiting for and cleanup up nvme io resources. As such, the driver wasn't making the callbacks to the transport, stalling the transports association teardown. This patch waits for io clean up before tearding down and adds checks for possible NULL pointers. Cc: <[email protected]> # 4.12+ Signed-off-by: Dick Kennedy <[email protected]> Signed-off-by: James Smart <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2017-12-04scsi: lpfc: Fix crash during driver unload with running nvme trafficJames Smart2-0/+25
When the driver is unloading, the nvme transport could be in the process of submitting new requests, will send abort requests to terminate associations, or may make LS-related requests. The driver's abort and request entry points currently is ignorant of the unloading state and is starting the requests even though the infrastructure to complete them continues to teardown. Change the entry points for new requests to check whether unloading and if so, reject the requests. Abort routines check unloading, and if so, noop the request. An abort is noop'd as the teardown paths are already aborting/terminating the io outstanding at the time the teardown initiated. Signed-off-by: Dick Kennedy <[email protected]> Signed-off-by: James Smart <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2017-12-04scsi: lpfc: Correct driver deregistrations with host nvme transportJames Smart3-6/+114
The driver's interaction with the host nvme transport has been incorrect for a while. The driver did not wait for the unregister callbacks (waited only 5 jiffies). Thus the driver may remove objects that may be referenced by subsequent abort commands from the transport, and the actual unregister callback was effectively a noop. This was especially problematic if the driver was unloaded. The driver now waits for the unregister callbacks, as it should, before continuing with teardown. Signed-off-by: Dick Kennedy <[email protected]> Signed-off-by: James Smart <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2017-12-04scsi: lpfc: correct port registrations with nvme_fcJames Smart2-9/+14
The driver currently registers any remote port that has NVME support. It should only be registering target ports. Register only target ports. Signed-off-by: Dick Kennedy <[email protected]> Signed-off-by: James Smart <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2017-12-04scsi: lpfc: Linux LPFC driver does not process all RSCNsJames Smart3-5/+25
During RSCN storms, the driver does not rediscover some targets. The driver marks some RSCN as to be handled after the ones it's working on. The driver missed processing some deferred RSCN. Move where the driver checks for deferred RSCNs and initiate deferred RSCN handling if the flag was set. Also revise nport state within the RSCN confirm routine. Add some state data to a possible debug print to aid future debugging. Signed-off-by: Dick Kennedy <[email protected]> Signed-off-by: James Smart <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2017-12-04scsi: lpfc: Fix ndlp ref count for pt2pt mode issue RSCNJames Smart1-2/+2
pt2pt ndlp ref count prematurely goes to 0. There was reference removed that should only be removed if connected to a switch, not if in point-to-point mode. Add a mode check before the reference remove. Signed-off-by: Dick Kennedy <[email protected]> Signed-off-by: James Smart <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2017-12-04scsi: lpfc: Adjust default value of lpfc_nvmet_mrqJames Smart4-22/+42
The current default for async hw receive queues is 1, which presents issues under heavy load as number of queues influence the available async receive buffer limits. Raise the default to the either the current hw limit (16) or the number of hw qs configured (io channel value). Revise the attribute definition for mrq to better reflect what we do for hw queues. E.g. 0 means default to optimal (# of cpus), non-zero specifies a specific limit. Before this change, mrq=0 meant target mode was disabled. As 0 now has a different meaning, rework the if tests to use the better nvmet_support check. Signed-off-by: Dick Kennedy <[email protected]> Signed-off-by: James Smart <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2017-12-04scsi: lpfc: Fix display for debugfs queInfoJames Smart1-7/+7
Display for lpfc/fnX/iDiag/queInfo isn't formatted perfectly. Corrected the format strings for the queue info debug messages. Signed-off-by: Dick Kennedy <[email protected]> Signed-off-by: James Smart <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2017-12-04scsi: lpfc: Driver fails to detect direct attach storage arrayJames Smart1-16/+20
The driver does not respond to PLOGI from the direct attach target. The driver uses incorrect S_ID in CONFIG_LINK, after FLOGI completion Correct by issuing CONFIG_LINK with the correct S_ID after receiving the PLOGI from the target Signed-off-by: Dick Kennedy <[email protected]> Signed-off-by: James Smart <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2017-12-04scsi: lpfc: Raise maximum NVME sg list size for 256 elementsJames Smart1-1/+1
Raise the maximum NVME sg list size allowed to 256 elements. Signed-off-by: Dick Kennedy <[email protected]> Signed-off-by: James Smart <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2017-12-04scsi: lpfc: Fix NVME LS abort_xriJames Smart1-0/+1
Performing an LS abort results in the following message being seen: 0603 Invalid CQ subtype 6: 00000300 22000002 ffff0016 d0050000 and the associated exchange is not properly freed. The code did not recognize the exchange type that was aborted, thus it was not properly handled. Correct by adding the NVME LS ELS type to the exchange types that are recognized. Signed-off-by: Dick Kennedy <[email protected]> Signed-off-by: James Smart <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2017-12-04scsi: lpfc: Fix crash after bad bar setup on driver attachmentJames Smart1-33/+51
In test cases where an instance of the driver is detached and reattached, the driver will crash on reattachment. There is a compound if statement that will skip over the bar setup if the pci_resource_start call is not successful. The driver erroneously returns success to its bar setup in this scenario even though the bars aren't properly configured. Rework the offending code segment for proper initialization steps. If the pci_resource_start call fails, -ENOMEM is now returned. Sample stack: rport-5:0-10: blocked FC remote port time out: removing rport BUG: unable to handle kernel NULL pointer dereference at (null) ... lpfc_sli4_wait_bmbx_ready+0x32/0x70 [lpfc] ... ... RIP: 0010:... ... lpfc_sli4_wait_bmbx_ready+0x32/0x70 [lpfc] Call Trace: ... lpfc_sli4_post_sync_mbox+0x106/0x4d0 [lpfc] ... ? __alloc_pages_nodemask+0x176/0x420 ... ? __kmalloc+0x2e/0x230 ... lpfc_sli_issue_mbox_s4+0x533/0x720 [lpfc] ... ? mempool_alloc+0x69/0x170 ... ? dma_generic_alloc_coherent+0x8f/0x140 ... lpfc_sli_issue_mbox+0xf/0x20 [lpfc] ... lpfc_sli4_driver_resource_setup+0xa6f/0x1130 [lpfc] ... ? lpfc_pci_probe_one+0x23e/0x16f0 [lpfc] ... lpfc_pci_probe_one+0x445/0x16f0 [lpfc] ... local_pci_probe+0x45/0xa0 ... work_for_cpu_fn+0x14/0x20 ... process_one_work+0x17a/0x440 Cc: <[email protected]> # 4.12+ Signed-off-by: Dick Kennedy <[email protected]> Signed-off-by: James Smart <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2017-12-04scsi: lpfc: Handle XRI_ABORTED_CQE in soft IRQJames Smart5-75/+35
XRI_ABORTED_CQE completions were not being handled in the fast path. They were being queued and deferred to the lpfc worker thread for processing. This is an artifact of the driver design prior to moving queue processing out of the isr and into a workq element. Now that queue processing is already in a deferred context, remove this artifact and process them directly. Signed-off-by: Dick Kennedy <[email protected]> Signed-off-by: James Smart <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2017-12-04scsi: lpfc: Expand WQE capability of every NVME hardware queueJames Smart5-43/+112
Hardware queues are a fast staging area to push commands into the adapter. The adapter should drain them extremely quickly. However, under heavy io load, the host cpu is pushing commands faster than the drain rate of the adapter causing the driver to resource busy commands. Enlarge the hardware queue (wq & cq) to support a larger number of queue entries (4x the prior size) before backpressure. Enlarging the queue requires larger contiguous buffers (16k) per logical page for the hardware. This changed calling sequences that were expecting 4K page sizes that now must pass a parameter with the page sizes. It also required use of a new version of an adapter command that can vary the page size values. Signed-off-by: Dick Kennedy <[email protected]> Signed-off-by: James Smart <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2017-12-04scsi: lpfc: FLOGI failures are reported when connected to a private loop.James Smart1-13/+14
When the HBA is connected to a private loop, the driver reports FLOGI loop-open failure as functional error. This is an expected condition. Mark loop-open failure as a warning instead of error. Signed-off-by: Dick Kennedy <[email protected]> Signed-off-by: James Smart <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2017-12-04scsi: bfa: remove unused pointer 'port'Colin Ian King1-3/+0
The pointer 'port' is being assigned but it is never read, hence it is redundant and can be removed. Cleans up clang warning: drivers/scsi/bfa/bfad_attr.c:505:2: warning: Value stored to 'port' is never read. Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2017-12-04scsi: aacraid: remove unused variable managed_request_idColin Ian King1-3/+0
Variable managed_request_id is being assigned but it is never read, hence it is redundant and can be removed. Cleans up clang warning: drivers/scsi/aacraid/linit.c:706:5: warning: Value stored to 'managed_request_id' is never read Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2017-12-04scsi: st: fix kernel-doc mismatchRandy Dunlap1-1/+1
Fix kernel-doc function name and comments in st.c::read_ns_show(): change us to ns to match the function name. Signed-off-by: Randy Dunlap <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2017-12-04scsi: fix another I2O typoRandy Dunlap1-1/+1
Correct another typo I20 to I2O. Signed-off-by: Randy Dunlap <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>