summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/bfa/bfa_fcs_lport.c
Commit message (Collapse)AuthorAgeFilesLines
* [SCSI] bfa: LUN discovery issue in direct attach modeVijaya Mohan Guvva2013-12-191-1/+14
| | | | | | | | | | | In direct attach mode, if port features like QoS/Trunk/FEC/CR are enabled, driver can receive PLOGI from the target before firmware notifies lport online to the driver. In case the lport is not yet online and a PLOGI is received, send a reject to the peer port, instead of dropping it on the floor. Signed-off-by: Vijaya Mohan Guvva <vmohan@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* [SCSI] bfa: Fix crash when symb name set for offline vportVijaya Mohan Guvva2013-12-031-3/+11
| | | | | | | | | | This patch fixes a crash when tried setting symbolic name for an offline vport through sysfs. Crash is due to uninitialized pointer lport->ns, which gets initialized only on linkup (port online). Signed-off-by: Vijaya Mohan Guvva <vmohan@brocade.com> Cc: stable@vger.kernel.org Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* [SCSI] bfa: Fix FDISC timeout handlingVijaya Mohan Guvva2013-06-261-2/+17
| | | | | | | | | Retry FDISC a max of 6 times. Introduce new events to handle vport login fails due to max logins to fabric/switch. Signed-off-by: Anil Gurumurthy <agurumur@brocade.com> Signed-off-by: Vijaya Mohan Guvva <vmohan@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* [SCSI] bfa: FDMI enhancementsVijaya Mohan Guvva2013-06-261-0/+190
| | | | | | | | | Update addl. fields in FDMI to confirm to FC-GS6 standard for RPA and RHBA commands. Signed-off-by: Anil Gurumurthy <agurumur@brocade.com> Signed-off-by: Vijaya Mohan Guvva <vmohan@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* [SCSI] bfa: Fix few attributes in the RHBA CT passthru commandKrishna Gudipati2012-10-071-7/+7
| | | | | | | | | | | - Made changes to set the RHBA command max payload based on the port configured frame size. - Made changes to fix the driver/fw version size in FMDI structure. - Fix to pass the fw version for FDMI attribute type FDMI_HBA_ATTRIB_FW_VERSION rather than driver version. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* [SCSI] bfa: Add support for FC Arbitrated Loop topology.Krishna Gudipati2012-10-071-3/+138
| | | | | | | | | | | | | | | | - Add private loop topology support at 2G/4G/8G speeds with following limitations 1. No support for multiple initiators in the loop 2. No public loop support. If attached to a loop with an FL_Port, device continues to work as a private NL_Port in the loop 3. No auto topology detection. User has to manually set the configured topology to loop if attaching to loop. - When loop topology is configured, enabling FC port features QoS/Trunk/TRL are not allowed and vice versa. 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>
* [SCSI] bfa: Add support for max target ports discoveryKrishna Gudipati2012-09-241-1/+45
| | | | | | | | | | | | | | | - Changes to avoid discovering NPIV port as remote port by the other NPIV ports created on same physical port when all the NPIV ports are part of the same zone in a fabric. - Provided mechanism to support maximum number of target ports for a given initiator port (physical port + NPIV ports) irrespective of the way in which the initiator and target ports are zoned in the fabric. - Introduced module_parameter max_rport_logins to restrict number of remote ports discovery which includes target and initiator remote ports. 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>
* [SCSI] bfa: Add support to register node symbolic name with name serverKrishna Gudipati2012-09-241-2/+364
| | | | | | | | | - Changes to register node symbolic name with name server on the fabric by sending CT commands RNN_ID and RSNN_NN. 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>
* [SCSI] bfa: Add PowerPC support and enable PCIE AER handling.Krishna Gudipati2012-09-241-0/+28
| | | | | | | | | | | | | | - 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>
* [SCSI] bfa: Make changes to FCXP resource management.Krishna Gudipati2012-09-241-32/+45
| | | | | | | | | - Made changes to split FCXP resources as request and response resources. - The split will reduce the contention for FCXP resources in an open zone config. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* [SCSI] bfa: FCS remote port enhancements.Krishna Gudipati2012-09-241-4/+52
| | | | | | | | | | | | - Introduced rport qualifier structure and modified design to export remote ports with valid pid or valid pwwn to the user space. - Introduced old_pid field in the rport structure and made changes to prevent re-creating a new remote port for an already existing rport that is transitioning to a delete state. (Happens if we receive a RSCN on the existing remote port that is getting deleted). Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* [SCSI] bfa: Support vport symbolic name change from sysfs.Krishna Gudipati2012-09-241-0/+63
| | | | | | | | | | - Implemented the FC function template set_vport_symbolic_name entry point to modify the vport symbolic name from sysfs. - Implemented support to send RSPN_ID to switch to register the modified vport symbolic name. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* [SCSI] bfa: Fix to set correct return error codes and misc cleanup.Krishna Gudipati2012-07-201-3/+1
| | | | | | | | | - Remove unnecessary if NULL check in function bfa_fcs_vport_free(). - Set correct return error codes in case of memory allocation failure in the BSG ELS/CT passthru command handler. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* [SCSI] bfa: Fix bfa logging for Logical port state change notificationKrishna Gudipati2012-04-251-3/+3
| | | | | | | | Made changes to have the same logging level for Logical port online and offline events, to display these events in pairs. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* [SCSI] bfa: Fix to defer vport delete handler invocation till firmware logo ↵Krishna Gudipati2012-04-251-12/+14
| | | | | | | | | | | | | | | | | | | response. Made changes to avoid queuing the vport delete work to IM driver work queue in the bfa_fcb_lport_delete() - since at this stage we are not completely done with using the vport structure as we are still waiting for the LOGO response from the fw in online state or just doing some cleanup. Since queuing up the vport delete work at this stage will result in the FC transport layer to clean up the vport before we get the response from firmware. Made changes to queue the port delete work to the IM driver work queue - from the bfa_fcs_vport_free() function since at this state we are done with using the vport data structure and the FCS state machine is completely cleaned up. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* [SCSI] bfa: Fix to avoid vport delete hang on request queue full scenario.Krishna Gudipati2012-03-281-0/+2
| | | | | | | | | | | Fixed the LPS (Logical Port Services) state machine to send a FDISC/FLOGI to the FW from the request queue wait state, when there is space available again on the request queue. Made changes to free the vport on LOGO/cleanup complete instead of free'ing it from vport_delete_handler in the module unload scenario. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* [SCSI] bfa: Add FC-transport based Asynchronous Event Notification support.Krishna Gudipati2011-07-271-4/+70
| | | | | | | | - Added support to post vendor unique events on fc_host. - Supports adapter, port, ioc, flash and remote port based AEN events. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* [SCSI] bfa: FCS bug fixes.Krishna Gudipati2011-06-291-14/+156
| | | | | | | | | | | | | | | | | | | | | | - Added logic to initiate a PLOGI to the target, while processing a LOGO from the same target in Direct attach mode. - Added logic to generate a FCCT Reject indicating unsupported command, upon receiving FCCT/FCGS requests. - Added logic to set the fcpim in offline state and avoid any PRLI retries if a PRLI response is a reject with a reason Command Not Supported. - Updated the FDMI Supported/Current speeds. - Added logic to wait for the response from the firmware before sending ACC to PLOGI and transitioning to subsequent states - while processing an Incoming PLOGI in online state. - Added a wait state in the fcs_vport state machine - For case where FDISC is in progress and we get a vport delete request we wait for fdisc response and will transition to the appropriate state based on rsp status, else its causing both driver/fw resources to be not freed. - Remove the fc_credit_recovery module param. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* [SCSI] bfa: Brocade-1860 Fabric Adapter vHBA support.Krishna Gudipati2011-06-291-2/+2
| | | | | | | | | | | | | | | | | | - 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>
* [SCSI] bfa: FC credit recovery and misc bug fixes.Krishna Gudipati2011-06-291-3/+5
| | | | | | | | | | | | | | | | - Introduce FC credit recovery. - Added module parameter to enable/disable credit recovery. Bug Fixes: - Removed check for ignoring plogi from initiator in switched fabric mode. - The ABTS for PLOGI is going out few millisecs earlier due to FW timer calibration (around 300 miilisecs earlier). So there is a window if an accept comes during this time HBA would have initiated an ABORT. - Added 1 to FC_ELS_TOV for compensating for FW timer. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* [SCSI] bfa: Changes to support vport disable and enable operations.Krishna Gudipati2011-06-291-1/+146
| | | | | | | | 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>
* Fix common misspellingsLucas De Marchi2011-03-311-1/+1
| | | | | | Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
* Merge branch 'for-next' of ↵Linus Torvalds2011-01-131-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (43 commits) Documentation/trace/events.txt: Remove obsolete sched_signal_send. writeback: fix global_dirty_limits comment runtime -> real-time ppc: fix comment typo singal -> signal drivers: fix comment typo diable -> disable. m68k: fix comment typo diable -> disable. wireless: comment typo fix diable -> disable. media: comment typo fix diable -> disable. remove doc for obsolete dynamic-printk kernel-parameter remove extraneous 'is' from Documentation/iostats.txt Fix spelling milisec -> ms in snd_ps3 module parameter description Fix spelling mistakes in comments Revert conflicting V4L changes i7core_edac: fix typos in comments mm/rmap.c: fix comment sound, ca0106: Fix assignment to 'channel'. hrtimer: fix a typo in comment init/Kconfig: fix typo anon_inodes: fix wrong function name in comment fix comment typos concerning "consistent" poll: fix a typo in comment ... Fix up trivial conflicts in: - drivers/net/wireless/iwlwifi/iwl-core.c (moved to iwl-legacy.c) - fs/ext4/ext4.h Also fix missed 'diabled' typo in drivers/net/bnx2x/bnx2x.h while at it.
| * Merge branch 'master' into for-nextJiri Kosina2010-12-221-264/+204
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: MAINTAINERS arch/arm/mach-omap2/pm24xx.c drivers/scsi/bfa/bfa_fcpim.c Needed to update to apply fixes for which the old branch was too outdated.
| * | tree-wide: fix comment/printk typosUwe Kleine-König2010-11-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "gadget", "through", "command", "maintain", "maintain", "controller", "address", "between", "initiali[zs]e", "instead", "function", "select", "already", "equal", "access", "management", "hierarchy", "registration", "interest", "relative", "memory", "offset", "already", Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | | [SCSI] bfa: replace bfa_assert with WARN_ONJing Huang2010-12-311-10/+10
| | | | | | | | | | | | | | | Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* | | [SCSI] bfa: io tag handling and minor bug fix.Krishna Gudipati2010-12-211-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix iotag handling: 1) Update and check io tag for retry case. 2) Clearing upper 3 bits in io tag when an IO completes. The 3 upper bits in io tags are used for counting FCP exchange retry. Un-cleared bits will cause firmware to access invalid memory when the same io tag is used for an IO to a target that doesn't support FCP exchange retry. 3) Only check the effective bits when validating an iotag. Other minor fixes: 1) Added trace to get FC header type with assert of unhandled packet received. Ignore the type FC_TYPE_FC_FSS (FC_XS). 2) Fixed the adapter info display check - to check for fcmode flag even. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* | | [SCSI] bfa: direct attach mode fix.Krishna Gudipati2010-12-211-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | - Direct attach is not working due to the check of PID in fcxp_send request. - Added logic to set the lps->lp_pid with the PID assigned for n2n mode. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* | | [SCSI] bfa: remove unused functions and misc cleanupsMaggie Zhang2010-12-211-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | [SCSI] bfa: remove all OS wrappersMaggie Zhang2010-12-211-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | [SCSI] bfa: clean up one line functionsMaggie Zhang2010-12-211-31/+34
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | [SCSI] bfa: remove unused and empty functionsMaggie Zhang2010-12-211-49/+0
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | [SCSI] bfa: fix endianess sparse check warningsMaggie2010-12-211-112/+114
| | | | | | | | | | | | | | | | | | | | | First round of fix for the endianess check warnings from make C=2 CF="-D__CHECK_ENDIAN__". Signed-off-by: Maggie <xmzhang@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* | | [SCSI] bfa: fix regular sparse check warnings.Maggie2010-12-211-3/+3
| | | | | | | | | | | | | | | | | | | | | Fix all sparse check warnings from make C=2. Signed-off-by: Maggie <xmzhang@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* | | [SCSI] bfa: rename log_level to bfa_log_levelJing Huang2010-12-201-5/+5
| |/ |/| | | | | | | | | | | | | | | Rename log_level to bfa_log_level to make the global variable more bfa specific and avoid clashes with other drivers which was causing a build failure. Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* | [SCSI] bfa: fix comments for c filesJing Huang2010-10-251-214/+154
| | | | | | | | | | | | | | | | | | | | 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>
* | [SCSI] bfa: replace endian swap macros with the ones provided by linuxJing Huang2010-10-251-54/+54
| | | | | | | | | | Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* | [SCSI] bfa: remove os wrapper and unused functionsJing Huang2010-10-251-11/+11
|/ | | | | | | | | | | 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>
* [SCSI] bfa: cleanup driverKrishna Gudipati2010-09-161-270/+5141
| | | | | | | | We have flattened the BFA hierarchy and also reduced the number of source and header files we used to have earlier. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] bfa: add PBC port disable handlingJing Huang2010-07-271-0/+3
| | | | | | | | Add PBC port disable handling in BFA and return the appropriate status from BFA APIs. In bfa_fcs_lport.c, handle OFFLINE event to avoid BFA_ASSERT. Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] bfa: Replace bfa_get_attr() with specific APIsKrishna Gudipati2010-03-071-24/+2
| | | | | | | | | bfa_ioc_attr_s is a big structure and some times could cause stack overflow if defined locally, so add specific APIs that are needed to replace the use of ioc_attr local var. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] bfa: FCS authentication related changes.Krishna Gudipati2010-03-071-0/+2
| | | | | | | | | | | Made FCS authentication related changes to state machines and header files. Made changes in FCS state machines to handle the case when secret string is NULL. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] bfa: Fix to copy fpma MAC when requested by user space application.Krishna Gudipati2010-03-071-1/+6
| | | | | | | | Copy fpma MAC when requested by user space application. Added FPMA mac address to the lport attributes structure. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] bfa: Replace bfa_assert() with bfa_sm_fault()Krishna Gudipati2010-03-071-5/+5
| | | | | | | | Replace bfa_assert() with bfa_sm_fault() to get unhandled events for debugging. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] bfa: Resume BFA operations after firmware mismatch is resolved.Krishna Gudipati2010-03-041-10/+20
| | | | | | | | | | | | | | | | | | | | | | | | bfad.c & bfad_drv.h: * Created a kernel thread from pci_probe that does the bfad start operations after BFA init done on a firmware mismatch. * The kernel thread on a fw mismatch waits for an event from IOC call back and is woken up from bfa_cb_init() on BFA init success. * In normal cases of no firmware mismatch this thread is terminated in pci_probe. bfa_fcs_lport.c, fabric.c, fcs_lport.h & vport.c: * Split the lport init to attach time and init time code, so that proper config attributes are set after firmware mismatch. bfa_iocfc.c: * Handle an IOC timer issue, where the IOC timer would expire before the init completion and send Init fail event to the driver, however IOC init continues and completes successfully at the later stage. The bfa and driver were not handling this kind of deferred init completion. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] bfa: fixed checkpatch errors for bfad filesJing Huang2009-12-041-6/+5
| | | | | | | This patch fixes checkpatch errors/warnings in bfad files. Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] bfa: Brocade BFA FC SCSI driverJing Huang2009-10-021-0/+940
Add new driver for Brocade Hardware Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
OpenPOWER on IntegriCloud