aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/bfa/bfa_core.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2020-07-24scsi: bfa: Demote seemingly unintentional kerneldoc headerLee Jones1-1/+1
This is the only use of kerneldoc in the source file and no descriptions are provided. Fixes the following W=1 kernel build warning(s): drivers/scsi/bfa/bfa_core.c:1245: warning: Function parameter or member 'bfa' not described in 'bfa_iocfc_qreg' drivers/scsi/bfa/bfa_core.c:1245: warning: Function parameter or member 'qreg' not described in 'bfa_iocfc_qreg' Link: https://lore.kernel.org/r/20200723122446.1329773-35-lee.jones@linaro.org Cc: Anil Gurumurthy <anil.gurumurthy@qlogic.com> Cc: Sudarsana Kalluru <sudarsana.kalluru@qlogic.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-04-14scsi: bfa: bfa_core.c: make bfa_isr_rspq() staticJason Yan1-1/+1
Fix the following sparse warning: drivers/scsi/bfa/bfa_core.c:712:1: warning: symbol 'bfa_isr_rspq' was not declared. Should it be static? Link: https://lore.kernel.org/r/20200407032202.36789-3-yanaijie@huawei.com Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Jason Yan <yanaijie@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-06-05treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 292Thomas Gleixner1-9/+1
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license gpl version 2 as published by the free software foundation this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 66 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Alexios Zavras <alexios.zavras@intel.com> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190529141901.606369721@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-10scsi: bfa: use ARRAY_SIZE for array sizing calculation on array __pciidsColin Ian King1-1/+1
Use the ARRAY_SIZE macro on array __pciids to determine size of the array. Improvement suggested by coccinelle. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-04-19scsi: bfa: remove bfa_module_s madnessChristoph Hellwig1-35/+31
Just call the functions directly and remove a giant pile of boilerplate code. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2016-02-23bfa: deinline __bfa_trc() and __bfa_trc32()Denys Vlasenko1-0/+19
__bfa_trc() compiles to 115 bytes of machine code. With this .config: http://busybox.net/~vda/kernel_config there are 1494 calls of __bfa_trc(). __bfa_trc32() is very similar, so it is uninlined too. However, it appears to be unused, therefore this patch ifdefs it out. Change in code size is about 130,000 bytes: text data bss dec hex filename 85975426 22294712 20627456 128897594 7aed23a vmlinux.before 85842882 22294584 20627456 128764922 7accbfa vmlinux [mkp: Removed unused __bfa_trc32()] Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com> Acked-by: Anil Gurumurthy <anil.gurumurthy@qlogic.com> CC: Fabian Frederick <fabf@skynet.be> CC: Anil Gurumurthy <anil.gurumurthy@qlogic.com> CC: Christoph Hellwig <hch@lst.de> CC: Guenter Roeck <linux@roeck-us.net> CC: Ben Hutchings <ben@decadent.org.uk> CC: James Bottomley <JBottomley@Parallels.com> CC: linux-kernel@vger.kernel.org CC: linux-scsi@vger.kernel.org Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2015-12-02bfa: File header and user visible string changesAnil Gurumurthy1-1/+1
Signed-off-by: Sudarsana Kalluru <sudarsana.kalluru@qlogic.com> Signed-off-by: Anil Gurumurthy <anil.gurumurthy@qlogic.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2015-12-02bfa: Update copyright messagesAnil Gurumurthy1-2/+3
Signed-off-by: Sudarsana Kalluru <sudarsana.kalluru@qlogic.com> Signed-off-by: Anil Gurumurthy <anil.gurumurthy@qlogic.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2013-12-19[SCSI] bfa: Fix for bcu or hcm faa query hangVijaya Mohan Guvva1-4/+4
This patch set fixes the issue of brocade management utility hang (bcu/HCM) when faa attributes are queried from multiple application threads. Hang was due to race between the threads and completion handler corruption. Signed-off-by: Vijaya Mohan Guvva <vmohan@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-06-26[SCSI] bfa: Allow rsp queue process during ioc disableVijaya Mohan Guvva1-2/+1
Allow processing completions from firmware during IOC_DISABLE request is being processed by the firmware, by setting the queue_process flag appropriately. Signed-off-by: Vijaya Mohan Guvva <vmohan@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-10-07[SCSI] bfa: Add support to read/update the FRU data.Krishna Gudipati1-0/+14
- Add FRU sub-module to support FRU read/write/update. - Add support to read/write from the temp FRU module. [jejb: fix checkpatch issues] Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-10-07[SCSI] bfa: Add support to configure min/max bandwidth for a pcifnKrishna Gudipati1-4/+5
- Added support to configure minimum bandwidth for a pcifn. - Minimum bandwith is guaranteed at per queue level. - Added support to update pcifn bandwidth dynamically without a server reboot. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-10-07[SCSI] bfa: Add support for IO throttling at port levelKrishna Gudipati1-2/+7
Add capability to limit the number of exchanges on a port to avoid queue-full conditions from the target side. Signed-off-by: Sudarsana Reddy Kalluru <skalluru@brocade.com> Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-10-07[SCSI] bfa: IOCFC state machine enhancementsKrishna Gudipati1-0/+53
- Add support to handle STOP/DISABLE events in the IOCFC state machine. - Made changes to bring the IOC down on a flash driver config read failure. - Added logic to clean the use count and fail sync registers during IOCFC init. Signed-off-by: Vijaya Mohan Guvva <vmohan@brocade.com> Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-09-24[SCSI] bfa: Fix to process mbox interrupts only if interrupts are enabled in INTx mode.Krishna Gudipati1-1/+8
- Made changes to process mbox and error interrupts only if interrupts are enabled, when running in INTx mode. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-09-24[SCSI] bfa: Add PowerPC support and enable PCIE AER handling.Krishna Gudipati1-8/+4
- Added few missing endian swap changes to support BFA on PowerPC. - Added PCIE AER support to BFA: a) Implemented the PCI error handler entry points. b) Made changes to FCS state machine to handle STOP event from the PCI error detected entry point. c) Made changes to the IO Controller state machine to handle SUSPEND event from the PCI error detected entry point. d) Made changes to restart the BFA operations on a slot_reset completion. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-03-28[SCSI] bfa: Revised Fabric Assigned Address(FAA) feature implementation.Krishna Gudipati1-206/+474
Made changes to the Fabric Assigned Address(FAA) feature implementation. Introduced the IOCFC state machine, which now handles the FAA logic, IOC and BFA sub-modules enablement. Removed un-wanted FAA enable/disable routines; FAA is enabled by default. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-03-28[SCSI] bfa: Modify ISR to process pending completionsKrishna Gudipati1-3/+10
Made changes to the driver ISR to process any pending completions even if the RME bit is not set in the interrupt status register. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-07-27[SCSI] bfa: Add support to store driver configuration in flash.Krishna Gudipati1-5/+20
- Added dconf (Driver Config) BFA sub-module. - The dconf sub-module provides interfaces and manages flash writes to the flash DRV parition. - dconf sub-module also ensures that the whole 64K DRV partition is updated on a flash write. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-07-27[SCSI] bfa: Added support to collect and reset fcport statsKrishna Gudipati1-1/+9
- Added support to collect and reset fcport stats. - Modified design to allow multiple requests for fcport stats. - fcport will remember the stats request in its stats_pending queue and service each of the queued requests after receiving a firmware response for the prior request. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-07-27[SCSI] bfa: Update RME interrupt handling.Krishna Gudipati1-16/+9
- Made changes to always acknowledge RME interrupt and update consumer index (CI) when RME interrupt is generated. - Made changes to have ASIC specific hw_rspq_ack() handler. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-06-29[SCSI] bfa: Added support to query PHY.Krishna Gudipati1-0/+14
- Added PHY sub-module. - Implemented interface to obtain stats and to read/update the fw from the PHY module. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-06-29[SCSI] bfa: Added HBA diagnostics support.Krishna Gudipati1-1/+15
- Added diagnostics sub-module to BFA. - Implemented interface to perform memtest/loopback test and some other diagnostics tests. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-06-29[SCSI] bfa: Added support for flash configurationKrishna Gudipati1-0/+15
- Added flash sub-module. - Implemented the interface to read/erase/update flash partition. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-06-29[SCSI] bfa: Added support to obtain SFP info.Krishna Gudipati1-0/+13
- Added SFP sub-module to BFA. - Added interface to collect sfp media info and sfp speed. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-06-29[SCSI] bfa: Added support for CEE info and stats query.Krishna Gudipati1-0/+14
- Added CEE sub-module. - Added support to collect stats/cee module info using BSG interface. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-06-29[SCSI] bfa: Extend BSG interface.Krishna Gudipati1-1/+20
- Added support to collect driver/fw stats. - Added support to perform adapter/ioc enable, disable operations. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-06-29[SCSI] bfa: DMA memory allocation enhancement.Krishna Gudipati1-147/+124
- Modified the design such that each BFA sub-module will provide the amount of DMA and KVA memory needed by it and queues the same request to the global dma and kva info queues. - During the memory allocation we iterate over this queue to allocate the dma and kva memory requested by sub-modules. - The change is needed to avoid requesting the aggregate amount of memory needed by all the BFA sub-modules as one contiguous chunk. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-06-29[SCSI] bfa: Brocade-1860 Fabric Adapter vHBA support.Krishna Gudipati1-23/+39
- Introduced partitioning of the BFA resources. - Added h/w queue ID in CPE messages, firmware uses h/w queue ID from messages to pick a matching RME queue. - Added message header to bfa_reqq_produce(). h/w queue ID is set in the message header and firmware modules use h/w queue ID from message header instead of from cpqe event. - Made changes to allow using all 256 queues of Brocade-1860 asic. Previously only a single queue per queue group was used. - Added function tag to BFI message header. Only used by FC BFI messages. Used to translate host tag to firmware tag. bfa_lpuid() is changed to bfa_fn_lpu() that encodes both PCI function and port ID in BFI message header. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-06-29[SCSI] bfa: Brocade-1860 Fabric Adapter PLL init fixes.Krishna Gudipati1-7/+36
- If flash controller is halted unconditionally, this results in illegal write access to flash controller register domain. Since flash controller registers are only accessible once s_clk is started - added logic to check for WGN status and halt flash controller only if it is already running. - Added check to wait for flash controller halt to be completed before proceeding with s_clk/l_clk initializations. - Removed unnecessary reset logic for PMM 1T memory and moved memory initialization after flash access enable. - Disable Brocade-1860 asic MBOX interrupt before PLL initialization. - Remove reset enable for S_CLK/L_CLK after both PLL initializations are complete. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-06-29[SCSI] bfa: Added Fabric Assigned Address(FAA) supportKrishna Gudipati1-0/+192
- Updated/added data structures and definitions to support FAA protocol. - Modified the IOC state machine to support FAA. - Introduced FAA feature configuration - enable/disable/query. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-06-29[SCSI] bfa: Enable ASIC block configuration and query.Krishna Gudipati1-0/+25
- Added ASIC block configuration APIs: - to create/delete/update the physical functions - to do adapter/port mode configuration - to query the current ASIC block configuration. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-06-29[SCSI] bfa: Enhancement for fcpim and IO tag handling.Krishna Gudipati1-2/+7
- Enhancements to FCPIM module. - Introduced IO tag management to allocate/release IOs to FCPIM module from a free IOtag pool. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-06-29[SCSI] bfa: IOC and PLL init changes for Brocade-1860 Fabric Adapter.Krishna Gudipati1-12/+16
- Introduced IOC poll mechanism which replaces current interrupt based FW READY method. - The timer based poll routine in IOC will query the ioc_fwstate register to see if there is a state change in FW, and sends the READY event. - Bug fixes in the new asic PLL initialization. - Added logic to handle CPE/RME queue interrupts before iocfc config done. 1. Use the queue_process flag to see if iocfc configuration is done in INTX mode. 2. Split the MSIX handler installation in two - one for IOC intr handler and the other for cpe/rme queue handler - and delay assigning queue handlers until iocfc config is done in MSIX mode. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-06-29[SCSI] bfa: Changes to support vport disable and enable operations.Krishna Gudipati1-1/+1
Made changes to FCS lport, vport state machines to support vport enable / disable operations. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-06-29[SCSI] bfa: Brocade-1860 Fabric Adapter Hardware EnablementKrishna Gudipati1-78/+131
- Added support for Brocade-1860 Fabric Adapter. - Made changes to support single firmware image per asic type. - Combined bfi_cbreg.h and bfi_ctreg.h defines into bfi_reg.h with only minimal defines used by host. - Added changes to setup CPE/RME Queue register offsets based on firmware response. - Removed queue register offset initializations and added register offsets to BFI config response message. - Added Brocade-1860 asic specific interrupt status definitions and mailbox interfaces. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-06-29[SCSI] bfa: Introduce IOC event notification mechanism.Krishna Gudipati1-1/+1
Introduced a generic event notification callback function that receives IOC_ENABLED, IOC_DISABLED, IOC_FAILED events and notifies the modules registered for these events. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-03-31Fix common misspellingsLucas De Marchi1-1/+1
Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2010-12-31[SCSI] bfa: remove unused defintions and misc cleanupsJing Huang1-12/+0
This patch removes unused functions, data strucutres, and definitions. It also includes misc comment and formatting cleanups. Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-31[SCSI] bfa: remove inactive functionsJing Huang1-8/+0
This patch removes some inactive functions and macros. Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-31[SCSI] bfa: replace bfa_assert with WARN_ONJing Huang1-6/+6
Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-21[SCSI] bfa: remove unused functions and misc cleanupsMaggie Zhang1-1/+1
Remove unused functions and fix checkpatch errors. Misc cleanups in comment and formatting. Signed-off-by: Maggie Zhang <xmzhang@brocade.com> Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-21[SCSI] bfa: remove all OS wrappersMaggie Zhang1-1/+1
Remove OS wrapper functions/macros, and as a result remove bfa_os_inc.h. Signed-off-by: Maggie Zhang <xmzhang@brocade.com> Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-21[SCSI] bfa: remove a file with small sizeMaggie Zhang1-0/+87
Removed bfa_drv.c, merged it to bfa_core.c and modified Makefile. Signed-off-by: Maggie Zhang <xmzhang@brocade.com> Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-21[SCSI] bfa: clean up one line functionsMaggie Zhang1-164/+9
Cleaned up one line functions. Signed-off-by: Maggie Zhang <xmzhang@brocade.com> Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-21[SCSI] bfa: remove unused and empty functionsMaggie Zhang1-78/+1
Removed unused and empty functions. Signed-off-by: Maggie Zhang <xmzhang@brocade.com> Signed-off-by: Jing Huang <xmzhang@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-10-25[SCSI] bfa: fix comments for c filesJing Huang1-56/+56
This patch addresses the comments from Randy Dunlap (Randy.Dunlap@oracle.com) regarding comment blocks that begining with "/**". bfa driver comments currently do not follow kernel-doc convention, we hence replace all /** with /* and **/ with */. Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-10-25[SCSI] bfa: remove os wrapper functions and macrosJing Huang1-16/+16
This patch replaces register access functions and macros with the the ones provided by linux. Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-10-25[SCSI] bfa: replace endian swap macros with the ones provided by linuxJing Huang1-13/+13
Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-10-25[SCSI] bfa: remove os wrapper and unused functionsJing Huang1-4/+4
This patch removes os wrapper and unused functions. bfa_os_assign(), bfa_os_memset(), bfa_os_memcpy(), bfa_os_udelay() bfa_os_vsprintf(), bfa_os_snprintf(), and bfa_os_get_clock() are replaced with direct assignment or native linux functions. Some unused functions related to VF (Vitual fabric) are also removed. Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>