aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2018-01-03scsi: qla2xxx: Allow relogin and session creation after reset[email protected]1-1/+0
When any kind of reset is issued, current code was setting state of LOGIN pending too early. This resulted into driver not retrying relogin until pervious reloin completes. Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: Quinn Tran <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2018-01-03scsi: qla2xxx: Add ability to use GPNFT/GNNFT for RSCN handlingQuinn Tran5-60/+113
add ability to use gpnft/gnnft to handle RSCN. Signed-off-by: Quinn Tran <[email protected]> Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2018-01-03scsi: qla2xxx: Properly extract ADISC error codesQuinn Tran1-8/+16
This patch fixes issue with extraction of ADISC error codes for decoding the error returned Signed-off-by: Quinn Tran <[email protected]> Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2018-01-03scsi: qla2xxx: Fix GPNFT/GNNFT error handlingQuinn Tran2-4/+19
retry gpnft/gnnft if error is encountered. Signed-off-by: Quinn Tran <[email protected]> Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2018-01-03scsi: qla2xxx: Remove session creation redundant codeQuinn Tran1-117/+5
Current code creates a session when a new port is discovered, and a PLOGI/PRLI is received. There is no need to create session when command has arrived. Signed-off-by: Quinn Tran <[email protected]> Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2018-01-03scsi: qla2xxx: Migrate switch registration commands away from mailbox interfaceQuinn Tran6-144/+347
Migrate switch registration commands: RFTID, RFFID, RNNID and RSNN_NN out of mailbox interface to reduce fabric scan bottle neck. Signed-off-by: Quinn Tran <[email protected]> Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2018-01-03scsi: qla2xxx: Fix login state machine freezeQuinn Tran1-6/+0
Relogin stop moving forward due to improper check of scan_state flag. Signed-off-by: Quinn Tran <[email protected]> Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2018-01-03scsi: qla2xxx: Reduce trace noise for Async EventsQuinn Tran1-2/+9
Add NPIV id check to reduce multiple debug messages of the same RSCN event. Signed-off-by: Quinn Tran <[email protected]> Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2018-01-03scsi: qla2xxx: Reduce the use of terminate exchangeQuinn Tran1-66/+74
reduce usage of terminate exchange when command encounter resource bottle neck. Remote initiator view it as command drop. Signed-off-by: Quinn Tran <[email protected]> Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2018-01-03scsi: qla2xxx: Add lock protection around host lookupQuinn Tran3-10/+8
Host lookup via btree is currently protected by the hardware_lock. Add hardware_lock when modifying btree to store host pointer. Signed-off-by: Quinn Tran <[email protected]> Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2018-01-03scsi: qla2xxx: Add switch command to simplify fabric discoveryQuinn Tran9-121/+1103
- add "async" gpn_ft, gnn_ft, gfpn_id, gnn_id switch commands. - For 8G and newer adapters, use async commands when it comes to fabric scan to reduce bottle neck. Signed-off-by: Quinn Tran <[email protected]> Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2018-01-03scsi: qla2xxx: Use known NPort ID for Management Server login[email protected]3-4/+4
Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2018-01-03scsi: qla2xxx: Fix session cleanup for N2NQuinn Tran7-155/+378
When connection type is N_Port to N_Port (point-to-point), there is a possibilty where initiator will not send PLOGI request and will directly send PRLI. In N2N connection the port has higher port name sends the PLOGI but not allow to send PRLI if is a target mode. Only initiator is allowed to send PRLI. Current driver code deletes old session when it receives PLOGI request. If we will not receive PLOGI request then we will not delete old session and create new session. Add check for N2N with PRLI receive only and trigger cleanup. For this case, the cleanup requires individual cmd abort instead of using implicit logout as a broad stroke flush. Signed-off-by: Krishna Kant <[email protected]> Signed-off-by: Alexei Potashnik <[email protected]> Signed-off-by: Quinn Tran <[email protected]> Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2018-01-03scsi: qla2xxx: Tweak resource count dumpQuinn Tran3-15/+48
Fetch actual data from firmware instead of static data at chip reset time. Signed-off-by: Quinn Tran <[email protected]> Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2018-01-03scsi: qla2xxx: Allow target mode to accept PRLI in dual modeQuinn Tran2-3/+18
For Dual Mode, Initiator side of the driver finish login, target side receive PRLI, but driver terminates PRLI. This patch allows target side to go ahead and accept PRLI. Signed-off-by: Quinn Tran <[email protected]> Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2018-01-03scsi: qla2xxx: Don't call dma_free_coherent with IRQ disabled.Giridhar Malavali1-1/+2
The logo ELS command allocates dma coherent memory for the data payload and serialize the completions. When this command times out, the timeout routine completes the thread waiting for completion which in turn cleanup resources allocated for this ELS command processing. Don't call generic sp->free routine when this ELS command times out to avoid to double freeing of the same resources. Signed-off-by: Giridhar Malavali <[email protected]> Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2018-01-03scsi: qla2xxx: Add ability to send PRLOQuinn Tran5-0/+96
Add ability to send Implicit PRLO to flush IOs from FW back to driver. Signed-off-by: Quinn Tran <[email protected]> Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2018-01-03scsi: qla2xxx: Add option for use reserve exch for ELSQuinn Tran3-0/+13
Add option to tell FW to reserve 1/2 of emergency exchanges for ELS. Signed-off-by: Quinn Tran <[email protected]> Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2018-01-03scsi: qla2xxx: Use shadow register for ISP27XXQuinn Tran1-1/+3
For ISP27XX, use shadow register to read FW provided REQQ's consumer index. The shadow register is dma'ed by firmware. Signed-off-by: Quinn Tran <[email protected]> Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2018-01-03scsi: qla2xxx: Enable ATIO interrupt handshake for ISP27XXQuinn Tran1-14/+25
Enable ATIO Q interrupt handshake for ISP27XX. This patch coalesce ATIO's interrupts for Quad port ISP27XX adapter. Interrupt coalesce allows performance to scale for this specific case. Signed-off-by: Quinn Tran <[email protected]> Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2018-01-03scsi: qla2xxx: Move work element processing out of DPC threadQuinn Tran5-27/+63
DPC thread can stall during switch scan due to slow switch response. This will stall other work element that needs attention. Moving work element processing and relogin logic out of DPC thread and into its own work queue. Signed-off-by: Quinn Tran <[email protected]> Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2018-01-03scsi: qla2xxx: Replace GPDB with async ADISC commandQuinn Tran3-37/+50
Replace call to Get Port DataBase MB with PDO_FORCE_ADISC flag with async ADISC command so driver can see ADISC command has error or not. Signed-off-by: Quinn Tran <[email protected]> Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2018-01-03scsi: qla2xxx: Fix Firmware dump size for Extended login and Exchange OffloadQuinn Tran2-102/+147
This patch adjusts and reallocates fw_dump memory for target mode to save for extended login and exchange offload buffers into dump captured. Signed-off-by: Quinn Tran <[email protected]> Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2018-01-03scsi: qla2xxx: Chip reset uses wrong lock during IO flush.Quinn Tran1-74/+84
As part of chip reset, all commands from all QPairs are flushed. This patch fixes code to use Q Pair lock for flush instead of using old hardware_lock. Signed-off-by: Quinn Tran <[email protected]> Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2018-01-03scsi: qla2xxx: Add boundary checks for exchanges to be offloadedQuinn Tran2-9/+33
Max boundary for exchange off load is 32k exchanges. If a system is unable to allocate large memory buffer to support this feature, then driver will reduce the number of exchanges down to a value system can support. Signed-off-by: Quinn Tran <[email protected]> Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2018-01-03scsi: qla2xxx: Use chip reset to bring down laser on unload.Quinn Tran1-35/+17
Current code uses Stop Firmware MB cmd to stop the chip before driver unload. This will leave the laser in its current state. This give the illusion of this adapter is still alive. For 8G & newer adapters, use chip reset to stop the chip and bring down the laser. Signed-off-by: Quinn Tran <[email protected]> Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2018-01-03scsi: qla2xxx: Use IOCB path to submit Control VP MBX commandQuinn Tran7-77/+143
Use IOCB patch to submit Control VP MBX command to reduce bottle-neck for mbx interface. Signed-off-by: Quinn Tran <[email protected]> Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2018-01-03scsi: qla2xxx: Fix NULL pointer access for fcport structureQuinn Tran1-4/+9
when processing iocb in a timeout case, driver was trying to log messages without verifying if the fcport structure could have valid data. This results in a NULL pointer access. Fixes: 726b85487067("qla2xxx: Add framework for async fabric discovery") Signed-off-by: Quinn Tran <[email protected]> Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2018-01-03scsi: hpsa: drop unneeded newlineJulia Lawall1-1/+1
hpsa_show_dev_msg prints other information and a newline after the message string, so the message string does not need to include a newline explicitly. Done using Coccinelle. Signed-off-by: Julia Lawall <[email protected]> Acked-by: Don Brace <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2018-01-03scsi: aacraid: Update driver version to 50877Raghava Aditya Renukunta1-1/+1
Update driver Version to 50877 Signed-off-by: Raghava Aditya Renukunta <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2018-01-03scsi: aacraid: Remove AAC_HIDE_DISK check in queue commandRaghava Aditya Renukunta2-13/+0
Earlier driver would scan throgh all supported buses and targets and add devices that responded. It would add devices that were _hidden_ by the fw. Driver would invalidate commands sent to _hidden_ devices via the AAC_HIDE_DISK check. Since the driver now adds only the devices that are supposed to be exposed, this code can be removed. Signed-off-by: Raghava Aditya Renukunta <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2018-01-03scsi: aacraid: Remove unused rescan variableRaghava Aditya Renukunta4-22/+21
Remove unused rescan variable. Signed-off-by: Raghava Aditya Renukunta <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2018-01-03scsi: aacraid: Skip schedule rescan in case of kdumpRaghava Aditya Renukunta1-1/+2
There is a chance of the driver to be stuck in kdump if drives start acting up in kdump discovery process and the kernel decides to send eh resets, which would prompt rescan to be scheduled. Do not perform a rescan in kdump context, since we do not expect a hotplug event during kdump and all the devices are going to go away anyway. Signed-off-by: Raghava Aditya Renukunta <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2018-01-03scsi: aacraid: Fix hang while scanning in eh recoveryRaghava Aditya Renukunta2-0/+13
Add back the ability to scan for hotplug changes while eh was in progress. Schedule a rescan for a later time in the eh recovery code and wait for eh to complete in the rescan worker. Signed-off-by: Raghava Aditya Renukunta <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2018-01-03scsi: aacraid: Reschedule host scan in case of failureRaghava Aditya Renukunta3-2/+44
If the driver fails to retrieve information from the fw (could happen when the fw is not fully in its senses), the driver does nothing and change is not processed correctly by the driver Schedule host rescan in case of failure. This is only for SAFW, since the information retrieval failure will happen on SAFW devices. Signed-off-by: Raghava Aditya Renukunta <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2018-01-03scsi: aacraid: Use hotplug handling function in place of scsi_scan_hostRaghava Aditya Renukunta4-9/+19
Driver uses scsi_scan_host to add new devices in the driver init path, which adds all the fw exposed devices. The drivers resorts to queue command checks to block out commands to _hidden_ devices. Use the hotplug handler code to add new devices during driver init and other areas, this is only for safw. For ARC scsi_scan_host will still apply. Signed-off-by: Raghava Aditya Renukunta <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2018-01-03scsi: aacraid: Block concurrent hotplug event handlingRaghava Aditya Renukunta3-0/+4
Currently driver will attempt to process hotplug events concurrently based on the FW interrupt. Protect safw update function with a scan mutex. Signed-off-by: Raghava Aditya Renukunta <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2018-01-03scsi: aacraid: Merge adapter setup with resolve lunsRaghava Aditya Renukunta1-5/+12
The device hotplug events are processed only after retrieving the updated lun information from the fw. Does not make sense to keep them separate. Merge both the hotplug handling and safw adapter setup code into single function. Signed-off-by: Raghava Aditya Renukunta <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2018-01-03scsi: aacraid: Refactor resolve luns code and scsi functionsRaghava Aditya Renukunta1-17/+54
Resolve luns checks the if a sdev is already present in the os to figure out if it needs to be removed. Internally the driver exposes HBA on bus 2 even though its bus 1 in the fw. Its mildly confusing. Refactor out the sdev lookup into its function to check if sdev has been added to the kernel or not. Add helper functions to add, remove and put devices based on their fw bus and target number. Signed-off-by: Raghava Aditya Renukunta <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2018-01-03scsi: aacraid: Added macros to help loop through known buses and targetsRaghava Aditya Renukunta2-17/+21
Added macros to loop through the MAX SUPPORTED Buses and Targets. This will make the code a bit easier to read. Signed-off-by: Raghava Aditya Renukunta <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2018-01-03scsi: aacraid: Process hba and container hot plug events in single functionRaghava Aditya Renukunta3-41/+30
The hotplug handler code is duplicated for hba handling and container handling. Merged function to handle hba and container hot plug events into the resolve luns functions. Added a bunch of helper functions to check the validity of a given target and to check if bus, target is container device. Signed-off-by: Raghava Aditya Renukunta <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2018-01-03scsi: aacraid: Merge func to get container informationRaghava Aditya Renukunta2-19/+19
Merge aac_get_containers to setup target function, so that information about all the present devices can be retrieved in one shot. Signed-off-by: Raghava Aditya Renukunta <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2018-01-03scsi: aacraid: Add helper function to set queue depthRaghava Aditya Renukunta1-13/+24
Add helper function to set queue depth from information retrieved from the bmic phy structure. Signed-off-by: Raghava Aditya Renukunta <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2018-01-03scsi: aacraid: Save bmic phy information for each phyRaghava Aditya Renukunta2-6/+79
Save the bmic information for each phy, so that it can processed in target setup function. Signed-off-by: Raghava Aditya Renukunta <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2018-01-03scsi: aacraid: Create helper functions to get lun infoRaghava Aditya Renukunta1-12/+42
Created inline function to retrieve lun info for each device from the phy luns structure. Signed-off-by: Raghava Aditya Renukunta <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2018-01-03scsi: aacraid: Move function around to match existing codeRaghava Aditya Renukunta1-56/+56
Move the function to get phy luns information to the top of function to set target information Signed-off-by: Raghava Aditya Renukunta <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2018-01-03scsi: aacraid: Untangle targets setup from report phy lunsRaghava Aditya Renukunta2-11/+34
Remove function call to process targets from the report phy luns function and make it a function in its own right. This will help understand the flow of the code. Signed-off-by: Raghava Aditya Renukunta <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2018-01-03scsi: aacraid: Add target setup helper functionRaghava Aditya Renukunta3-7/+15
Add helper function to setup targets devices and create the base for the upcoming patches Signed-off-by: Raghava Aditya Renukunta <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2018-01-03scsi: aacraid: Refactor and rename to make mirror existing changesRaghava Aditya Renukunta3-19/+21
Rename variables and functions to make bmic identify, report phy luns to make them consistent across code internal existing code bases Signed-off-by: Raghava Aditya Renukunta <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2018-01-03scsi: aacraid: Change phy luns function to use common bmic functionRaghava Aditya Renukunta3-63/+25
Edit function that retrieves phy lun information to use common bmic function Signed-off-by: Raghava Aditya Renukunta <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>