summaryrefslogtreecommitdiff
path: root/drivers/scsi/qla2xxx/qla_gbl.h
AgeCommit message (Collapse)Author
2019-11-08scsi: qla2xxx: Fix device connect issues in P2P configurationArun Easi
P2P needs to take the alternate plogi route. Link: https://lore.kernel.org/r/20191105150657.8092-8-hmadhani@marvell.com Reviewed-by: Ewan D. Milne <emilne@redhat.com> Signed-off-by: Arun Easi <aeasi@marvell.com> Signed-off-by: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-08-12scsi: qla2xxx: Introduce qla2x00_els_dcmd2_free()Bart Van Assche
This patch reduces code duplication. Cc: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Tested-by: Himanshu Madhani <hmadhani@marvell.com> Reviewed-by: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-08-12scsi: qla2xxx: Inline the qla2x00_fcport_event_handler() functionBart Van Assche
Instead of calling qla2x00_fcport_event_handler() and letting the switch statement inside that function decide which other function to call, call the latter function directly. Remove the event member from the event_arg structure because it is no longer needed. Remove the qla_handle_els_plogi_done() function because it is never called. Cc: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Tested-by: Himanshu Madhani <hmadhani@marvell.com> Reviewed-by: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-08-12scsi: qla2xxx: Introduce qla2xxx_get_next_handle()Bart Van Assche
This patch reduces code duplication. Cc: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Tested-by: Himanshu Madhani <hmadhani@marvell.com> Reviewed-by: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-08-12scsi: qla2xxx: Enable type checking for the SRB free and done callback functionsBart Van Assche
Since all pointers passed to the srb_t.done() and srb_t.free() functions have type srb_t, change the type of the first argument of these functions from void * into struct srb *. This allows the compiler to verify the argument types for these functions. This patch does not change any functionality. Cc: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Tested-by: Himanshu Madhani <hmadhani@marvell.com> Reviewed-by: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-08-12scsi: qla2xxx: Change the return type of qla24xx_read_flash_data()Bart Van Assche
This change makes it easier to detect qla24xx_read_flash_data() failures and also to handle such failures. This change does not modify the behavior of the driver since all callers ignore the qla24xx_read_flash_data() return value. Cc: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Tested-by: Himanshu Madhani <hmadhani@marvell.com> Reviewed-by: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-08-12scsi: qla2xxx: Check the PCI info string output buffer sizeBart Van Assche
Pass the output buffer size to the code that generates a PCI info string and check the output buffer size while generating a PCI info string. Cc: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Tested-by: Himanshu Madhani <hmadhani@marvell.com> Reviewed-by: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-08-12scsi: qla2xxx: Declare fourth qla2x00_set_model_info() argument constBart Van Assche
Make it clear to humans and also to the compiler that the string passed as fourth argument is not modified. Cc: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Tested-by: Himanshu Madhani <hmadhani@marvell.com> Reviewed-by: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-08-12scsi: qla2xxx: Declare the fourth ql_dump_buffer() argument constBart Van Assche
This patch makes it clear to humans and also to the compiler that ql_dump_buffer() does not modify the memory the @buf argument points at. Cc: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Tested-by: Himanshu Madhani <hmadhani@marvell.com> Reviewed-by: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-06-27scsi: qla2xxx: move IO flush to the front of NVME rport unregistrationQuinn Tran
On session deletion, current qla code would unregister an NVMe session before flushing IOs. This patch would move the unregistration of NVMe session after IO flush. This way FC-NVMe layer would not have to wait for stuck IOs. In addition, qla2xxx would stop accepting new IOs during session deletion. Signed-off-by: Quinn Tran <qutran@marvell.com> Signed-off-by: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-29scsi: qla2xxx: Introduce the dsd32 and dsd64 data structuresBart Van Assche
Introduce two structures for the (DMA address, length) combination instead of using separate structure members for the DMA address and length. This patch fixes several Coverity complaints about 'cur_dsd' being used to write outside the bounds of structure members. Cc: Himanshu Madhani <hmadhani@marvell.com> Cc: Giridhar Malavali <gmalavali@marvell.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Acked-by: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-29scsi: qla2xxx: Make qla24xx_async_abort_cmd() staticBart Van Assche
Since qla24xx_async_abort_cmd() is only called from inside qla_init.c, declare that function static. Reorder a few functions to avoid that any forward declarations are needed. Cc: Himanshu Madhani <hmadhani@marvell.com> Cc: Giridhar Malavali <gmalavali@marvell.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Acked-by: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-29scsi: qla2xxx: Uninline qla2x00_init_timer()Bart Van Assche
Since qla2x00_init_timer() is not used for I/O commands there is no need to inline this function. Hence uninline this function. Cc: Himanshu Madhani <hmadhani@marvell.com> Cc: Giridhar Malavali <gmalavali@marvell.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Acked-by: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-29scsi: qla2xxx: Move qla2x00_clear_loop_id() from qla_inline.h into qla_init.cBart Van Assche
Since qla2x00_clear_loop_id() is not in the hot path, uninline it. Cc: Himanshu Madhani <hmadhani@marvell.com> Cc: Giridhar Malavali <gmalavali@marvell.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Acked-by: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-29scsi: qla2xxx: Declare qla2x00_find_new_loop_id() staticBart Van Assche
Since all qla2x00_find_new_loop_id() calls occur in the same source file as the definition of this function, move that function to just before its first caller and declare it static. Convert the header above this function into kernel-doc format. Cc: Himanshu Madhani <hmadhani@marvell.com> Cc: Giridhar Malavali <gmalavali@marvell.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Acked-by: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-15scsi: qla2xxx: Move qla2x00_set_fcport_state() from a .h into a .c fileBart Van Assche
The qla2x00_set_fcport_state() function is not in the hot path so move its definition from a .h into a .c file. Cc: Himanshu Madhani <hmadhani@marvell.com> Cc: Giridhar Malavali <gmalavali@marvell.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Acked-by: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-15scsi: qla2xxx: Declare qla24xx_build_scsi_crc_2_iocbs() staticBart Van Assche
Since qla24xx_build_scsi_crc_2_iocbs() is only used inside a single source file, declare this function static. Cc: Himanshu Madhani <hmadhani@marvell.com> Cc: Giridhar Malavali <gmalavali@marvell.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Acked-by: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-15scsi: qla2xxx: Fix formatting of pointer typesBart Van Assche
Improve source code readability by following the Linux kernel coding style for pointer types. This patch only changes whitespace. Cc: Himanshu Madhani <hmadhani@marvell.com> Cc: Giridhar Malavali <gmalavali@marvell.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Acked-by: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-03-19scsi: qla2xxx: Secure flash update support for ISP28XXMichael Hernandez
This patch adds support for Secure flash update with ISP28xx. Signed-off-by: Michael Hernandez <mhernandez@marvell.com> Signed-off-by: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-03-19scsi: qla2xxx: Add 28xx flash primary/secondary status/image mechanismJoe Carnuccio
Includes the following: - correction to 27xx image status struct; - factoring of 27xx image status validating routines to make common; - image status generation compare that works across zero wrap; - bsg interface to report current active images (as loaded by driver). Signed-off-by: Joe Carnuccio <joe.carnuccio@cavium.com> Signed-off-by: Mike Hernandez <mhernandez@marvell.com> Signed-off-by: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-03-19scsi: qla2xxx: Update flash read/write routineJoe Carnuccio
This patch makes following changes to flash access routines: - update return type for read_optrom - use void instead of uint32_t * for buffer parameter in read and write optrom routines - fix flash/nvram addressing Signed-off-by: Joe Carnuccio <joe.carnuccio@cavium.com> Signed-off-by: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-03-19scsi: qla2xxx: Add support for multiple fwdump templates/segmentsJoe Carnuccio
This patch adds multipe firmware dump template and segments support for ISP27XX/28XX. Signed-off-by: Joe Carnuccio <joe.carnuccio@cavium.com> Signed-off-by: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-03-19scsi: qla2xxx: Cleanups for NVRAM/Flash read/write pathJoe Carnuccio
This patch does following: - Clean up NVRAM code. - Optimizes reading of primary/secondary flash image validation. - Remove 0xff mask and make correct width in FLT structure. - Use endian macros to assign static fields in fwdump header. - Correct fdwt checksum calculation. - Simplify ql_dump_buffer() interface usage. - Add endianizers to 27xx firmware image validator. - fixes compiler warnings for big endian architecture. Signed-off-by: Joe Carnuccio <joe.carnuccio@cavium.com> Signed-off-by: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-03-19scsi: qla2xxx: Remove FW default templateJoe Carnuccio
This patch removes FW default template as there will never be case where the default template would be invoked. Signed-off-by: Joe Carnuccio <joe.carnuccio@cavium.com> Signed-off-by: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-02-19scsi: qla2xxx: Move marker request behind QPairQuinn Tran
Current code hard codes marker request to use request and response queue 0. This patch make use of the qpair as the path to access the request/response queues. It allows marker to be place on any hardware queue. Signed-off-by: Quinn Tran <qtran@marvell.com> Signed-off-by: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-02-19scsi: qla2xxx: Add support for setting port speedAnil Gurumurthy
This patch adds sysfs node 1. There is a new sysfs node port_speed 2. The possible values are 2(Auto neg), 8, 16, 32 3. A value outside of the above defaults to Auto neg 4. Any update to the setting causes a link toggle 5. This feature is currently only for ISP27xx Signed-off-by: Anil Gurumurthy <agurumurthy@marvell.com> Signed-off-by: Quinn Tran <qtran@marvell.com> Signed-off-by: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-01-11scsi: qla2xxx: Fix DMA error when the DIF sg buffer crosses 4GB boundaryGiridhar Malavali
When SGE buffer containing DIF information crosses 4G boundary, it results in DMA error. This patch fixes this issue by calculating SGE buffer size and if it crosses 4G boundary, driver will split it into multiple SGE buffers to avoid DMA error. Signed-off-by: Giridhar Malavali <gmalavali@marvell.com> Signed-off-by: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-09-11scsi: qla2xxx: Add mode control for each physical portQuinn Tran
Add ability to allow each physical port to control operating mode. Current code forces all ports to behave in one mode (i.e. initiator, target or dual). This patch allows user to select the operating mode for each port. - Driver must be loaded in dual mode to allow resource allocation modprobe qla2xxx qlini_mode=dual - In addition user can make adjustment to exchange resources using following command echo 1024 > /sys/class/scsi_host/host<x>/ql2xiniexchg echo 1024 > /sys/class/scsi_host/host<x>/ql2xexchoffld - trigger mode change and new setting of ql2xexchoffld|ql2xiniexchg echo [<value>] > /sys/class/scsi_host/host<x>/qlini_mode where, value can be one of following - enabled - disabled - dual - exclusive Signed-off-by: Quinn Tran <quinn.tran@cavium.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-09-11scsi: qla2xxx: Remove stale ADISC_DONE eventHimanshu Madhani
Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-09-11scsi: qla2xxx: Remove ASYNC GIDPN switch commandHimanshu Madhani
Using GPNFT/GNNFT command will be able to cover switch database with less number of scans. This patch removes Get NportID with provided WWPN/GIDPN switch command. By making this change, in large fabric with lots of remote port or NPIV ports with noisy SAN, the number of GIDPN commands issued by a port when it detects large number of remote ports going away or coming back, can overwhelmn the switch and it can becomde unresponsive. In a case where the fabric has not change, GIDPN is not required. Signed-off-by: Quinn Tran <quinn.tran@cavium.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-09-11scsi: qla2xxx: Move rport registration out of internal work_listQuinn Tran
Currently, the rport registration is being called from a single work element that is used to process QLA internal "work_list". This work_list is meant for quick and simple task (ie no sleep). The Rport registration process sometime can be delayed by upper layer. This causes back pressure with the internal queue where other jobs are unable to move forward. This patch will schedule the registration process with a new work element (fc_port.reg_work). While the RPort is being registered, the current state of the fcport will not move forward until the registration is done. If the state of the fabric has changed, a new field/next_disc_state will record the next action on whether to 'DELETE' or 'Reverify the session/ADISC'. Signed-off-by: Quinn Tran <quinn.tran@cavium.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-08-15Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsiLinus Torvalds
Pull SCSI updates from James Bottomley: "This is mostly updates to the usual drivers: mpt3sas, lpfc, qla2xxx, hisi_sas, smartpqi, megaraid_sas, arcmsr. In addition, with the continuing absence of Nic we have target updates for tcmu and target core (all with reviews and acks). The biggest observable change is going to be that we're (again) trying to switch to mulitqueue as the default (a user can still override the setting on the kernel command line). Other major core stuff is the removal of the remaining Microchannel drivers, an update of the internal timers and some reworks of completion and result handling" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (203 commits) scsi: core: use blk_mq_run_hw_queues in scsi_kick_queue scsi: ufs: remove unnecessary query(DM) UPIU trace scsi: qla2xxx: Fix issue reported by static checker for qla2x00_els_dcmd2_sp_done() scsi: aacraid: Spelling fix in comment scsi: mpt3sas: Fix calltrace observed while running IO & reset scsi: aic94xx: fix an error code in aic94xx_init() scsi: st: remove redundant pointer STbuffer scsi: qla2xxx: Update driver version to 10.00.00.08-k scsi: qla2xxx: Migrate NVME N2N handling into state machine scsi: qla2xxx: Save frame payload size from ICB scsi: qla2xxx: Fix stalled relogin scsi: qla2xxx: Fix race between switch cmd completion and timeout scsi: qla2xxx: Fix Management Server NPort handle reservation logic scsi: qla2xxx: Flush mailbox commands on chip reset scsi: qla2xxx: Fix unintended Logout scsi: qla2xxx: Fix session state stuck in Get Port DB scsi: qla2xxx: Fix redundant fc_rport registration scsi: qla2xxx: Silent erroneous message scsi: qla2xxx: Prevent sysfs access when chip is down scsi: qla2xxx: Add longer window for chip reset ...
2018-08-02scsi: qla2xxx: Migrate NVME N2N handling into state machineQuinn Tran
This patch fixes regression introduced for the N2N support for FC-NVMe. For FC-NVMe with N2N connection, instead of FW initiating the Login, Driver starts Login process. This patch migrates that new process from a standalone path into existing session management state machine. With this state change now driver will not wait for pull NPort ID from FW. Fixes: edd05de197592 ("scsi: qla2xxx: Changes to support N2N logins") Signed-off-by: Quinn Tran <quinn.tran@cavium.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-08-02scsi: qla2xxx: Fix race between switch cmd completion and timeoutQuinn Tran
Fix race condition between switch cmd completion and timeout timer. Timer has popped triggers command free. On IOCB completion, stale sp point was reused. Instead, an abort will be sent to FW to nudge the command out of FW where the normal completion will take place. RIP: 0010:qla2x00_chk_ms_status+0xf3/0x1b0 [qla2xxx] Call Trace: <IRQ> qla24xx_els_ct_entry.isra.15+0x1d4/0x2b0 [qla2xxx] qla24xx_msix_rsp_q+0x39/0xf0 [qla2xxx] qla24xx_process_response_queue+0xbc/0x2b0 [qla2xxx] qla24xx_msix_rsp_q+0x8a/0xf0 [qla2xxx] __handle_irq_event_percpu+0xa0/0x1f0 Signed-off-by: Quinn Tran <quinn.tran@cavium.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-08-02scsi: qla2xxx: Fix Management Server NPort handle reservation logicQuinn Tran
After selecting the NPort handle/loop_id, set a bit in the loop_id_map to prevent others from selecting the same NPort handle. Signed-off-by: Quinn Tran <quinn.tran@cavium.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-07-19scsi: qla2xxx: Fix NPIV deletion by calling wait_for_sess_deletionQuinn Tran
Add wait for session deletion to finish before freeing an NPIV scsi host. Fixes: 726b85487067 ("qla2xxx: Add framework for async fabric discovery") Cc: <stable@vger.kernel.org> Signed-off-by: Quinn Tran <quinn.tran@cavium.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-05-08scsi: qla2xxx: Move GPSC and GFPNID out of session managementQuinn Tran
Move GPSC & GFPNID commands out of session management to reduce time lag in reporting the session state to remote port. These commands are not essential when it comes to maintaining the rport state. Delay sending these commands after rport state is set to Online. Signed-off-by: Quinn Tran <quinn.tran@cavium.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-03-21scsi: qla2xxx: Fix Async GPN_FT for FCP and FC-NVMe scanQuinn Tran
This patch combines FCP and FC-NVMe scan into single scan when driver detects FC-NVMe capability on same port. Signed-off-by: Quinn Tran <quinn.tran@cavium.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-03-21scsi: qla2xxx: Remove nvme_done_listDarren Trapp
Signed-off-by: Darren Trapp <darren.trapp@cavium.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-01-03scsi: qla2xxx: Serialize session deletion by using work_lockQuinn Tran
for session deletion, replace sess_lock with work_lock. Under certain case sess_lock is not feasiable to acquire. The lock is needed temporarily to make sure a single call to schedule of the work element. Signed-off-by: Quinn Tran <quinn.tran@cavium.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-01-03scsi: qla2xxx: Remove unused argument from qlt_schedule_sess_for_deletion()Quinn Tran
Immeadiate flag is not used for scheduling session deletion. Remove it to simplfy session deletion code path. Signed-off-by: Quinn Tran <quinn.tran@cavium.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-01-03scsi: qla2xxx: Add ability to use GPNFT/GNNFT for RSCN handlingQuinn Tran
add ability to use gpnft/gnnft to handle RSCN. Signed-off-by: Quinn Tran <quinn.tran@cavium.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-01-03scsi: qla2xxx: Migrate switch registration commands away from mailbox interfaceQuinn Tran
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 <quinn.tran@cavium.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-01-03scsi: qla2xxx: Add switch command to simplify fabric discoveryQuinn Tran
- 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 <quinn.tran@cavium.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-01-03scsi: qla2xxx: Tweak resource count dumpQuinn Tran
Fetch actual data from firmware instead of static data at chip reset time. Signed-off-by: Quinn Tran <quinn.tran@qlogic.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-01-03scsi: qla2xxx: Add ability to send PRLOQuinn Tran
Add ability to send Implicit PRLO to flush IOs from FW back to driver. Signed-off-by: Quinn Tran <quinn.tran@cavium.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-01-03scsi: qla2xxx: Add option for use reserve exch for ELSQuinn Tran
Add option to tell FW to reserve 1/2 of emergency exchanges for ELS. Signed-off-by: Quinn Tran <quinn.tran@cavium.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-01-03scsi: qla2xxx: Move work element processing out of DPC threadQuinn Tran
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 <quinn.tran@cavium.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-11-14Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsiLinus Torvalds
Pull SCSI updates from James Bottomley: "This is mostly updates of the usual suspects: lpfc, qla2xxx, hisi_sas, megaraid_sas, pm80xx, mpt3sas, be2iscsi, hpsa. and a host of minor updates. There's no major behaviour change or additions to the core in all of this, so the potential for regressions should be small (biggest potential being in the scsi error handler changes)" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (203 commits) scsi: lpfc: Fix hard lock up NMI in els timeout handling. scsi: mpt3sas: remove a stray KERN_INFO scsi: mpt3sas: cleanup _scsih_pcie_enumeration_event() scsi: aacraid: use timespec64 instead of timeval scsi: scsi_transport_fc: add 64GBIT and 128GBIT port speed definitions scsi: qla2xxx: Suppress a kernel complaint in qla_init_base_qpair() scsi: mpt3sas: fix dma_addr_t casts scsi: be2iscsi: Use kasprintf scsi: storvsc: Avoid excessive host scan on controller change scsi: lpfc: fix kzalloc-simple.cocci warnings scsi: mpt3sas: Update mpt3sas driver version. scsi: mpt3sas: Fix sparse warnings scsi: mpt3sas: Fix nvme drives checking for tlr. scsi: mpt3sas: NVMe drive support for BTDHMAPPING ioctl command and log info scsi: mpt3sas: Add-Task-management-debug-info-for-NVMe-drives. scsi: mpt3sas: scan and add nvme device after controller reset scsi: mpt3sas: Set NVMe device queue depth as 128 scsi: mpt3sas: Handle NVMe PCIe device related events generated from firmware. scsi: mpt3sas: API's to remove nvme drive from sml scsi: mpt3sas: API 's to support NVMe drive addition to SML ...
2017-11-08scsi: qla2xxx: Convert timers to use timer_setup()Kees Cook
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: qla2xxx-upstream@qlogic.com Cc: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com> Cc: "Martin K. Petersen" <martin.petersen@oracle.com> Cc: linux-scsi@vger.kernel.org Signed-off-by: Kees Cook <keescook@chromium.org> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Tested-by: Bart Van Assche <Bart.VanAssche@wdc.com>