aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_els.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-12-21lpfc: Use kzalloc instead of kmallocPunit Vara1-2/+1
This patch is to the lpfc_els.c which resolves following warning reported by coccicheck: WARNING: kzalloc should be used for rdp_context, instead of kmalloc/memset Signed-off-by: Punit Vara <punitvara@gmail.com> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinicke <hare@suse.de> Reviewed-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com> Reviewed-by: Sebastian Herbszt <herbszt@gmx.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2015-12-21lpfc: Use new FDMI speed definitions for 10G, 25G and 40G FCoE.James Smart1-0/+3
Use new FDMI speed definitions for 10G, 25G and 40G FCoE. Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinicke <hare@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2015-12-21lpfc: Fix RDP ACC being too long.James Smart1-0/+10
Fix RDP ACC being too long. Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinicke <hare@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2015-12-21lpfc: Fix RDP Speed reporting.James Smart1-10/+7
Fix RDP Speed reporting. Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinicke <hare@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2015-12-21lpfc: Modularize and cleanup FDMI code in driverJames Smart1-30/+69
Modularize, cleanup, add comments - for FDMI code in driver Note: I don't like the comments with leading # - but as we have a lot if present, I'm deferring to handle it in one big fix later. Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinicke <hare@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2015-12-21lpfc: Fix RegLogin failed error seen on Lancer FC during port bounceJames Smart1-5/+9
Fix RegLogin failed error seen on Lancer FC during port bounce Fix the statemachine and ref counting. Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinicke <hare@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2015-12-21lpfc: Fix the FLOGI discovery logic to comply with T11 standardsJames Smart1-186/+156
Fix the FLOGI discovery logic to comply with T11 standards We weren't properly setting fabric parameters, such as R_A_TOV and E_D_TOV, when we registered the vfi object in default configs and pt2pt configs. Revise to now pass service params with the values to the firmware and ensure they are reset on link bounce. Required reworking the call sequence in the discovery threads. Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinicke <hare@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2015-11-09lpfc: fix memory leak and NULL dereferenceSudip Mukherjee1-1/+7
kmalloc() can return NULL and without checking we were dereferencing it. Moreover if kmalloc succeeds but the function fails in other parts then we were returning the error code but we missed freeing lcb_context. While at it fixed one related checkpatch warning. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Reviewed-by: James Smart <james.smart@avagotech.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
2015-10-27lpfc: The linux driver does not reinitiate discovery after a failed FLOGIJames Smart1-2/+7
Forgot to clear FCF Discovery in-progress flag upon FLOGI failures. Thus we didn't restart FLOGI. Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
2015-10-27lpfc: Fix for discovery failure in PT2PT when FLOGI's ELS ACC response gets abortedJames Smart1-14/+17
Fix for discovery failure in PT2PT when FLOGI's ELS ACC response gets aborted Change login state machine to: - Restart FLOGI if prior is ABTS'd - Reject incoming FLOGIs if we have one pending The above ensures that we always finish FLOGI processing, regardless of who initated FLOGI, before processing PLOGI's. Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
2015-10-27lpfc: Add support for Lancer G6 and 32G FC linksJames Smart1-0/+2
Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
2015-10-27fix: lpfc_send_rscn_event sends bigger buffer sizeAles Novak1-1/+1
lpfc_send_rscn_event() allocates data for sizeof(struct lpfc_rscn_event_header) + payload_len, but claims that the data has size of sizeof(struct lpfc_els_event_header) + payload_len. That leads to buffer overruns. Signed-off-by: Ales Novak <alnovak@suse.cz> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Sebastian Herbszt <herbszt@gmx.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
2015-10-27lpfc: remove set but not used variablesSebastian Herbszt1-55/+1
Remove set but not used variables. Signed-off-by: Sebastian Herbszt <herbszt@gmx.de> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
2015-06-13lpfc: Fix to drop PLOGIs from fabric node till LOGO processing completesJames Smart1-11/+3
The domain controller PLOGI's concurrent with prior LOGO's/unreg_rpi's completing created a race condition where driver rpi ref count can inadvertantly hit 0 and the rpi attempted to be freed. This error sometimes resulted in Warning messages indicating kref.h via lfpc_nlp_get+0x128. Correct by dropping any new PLOGI until the prior nport state has settled. Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
2015-06-13lpfc: Devices are not discovered during takeaway/giveback testingJames Smart1-12/+10
When a remote nport changes it's DID, a new ndlp is used. However, we left the old ndlp state unchanged and still in a discovery state. The may stall discovery resulting in some devices not being discovered. Correct by swapping the state of the 2 ndlp's when a DID swap is detected. Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
2015-06-13lpfc: Fix vport deletion failure.James Smart1-0/+2
If a vport was deleted while in the middle of discovery, we weren't clearing the nport discovery flag. Correct by clearing the flag and cancelling our discovery timeout timer. Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
2015-06-13lpfc: Check for active portpeerbeacon.James Smart1-4/+15
LCB requests to set Beacon would fail if the beacon was already enabled internally as the mailbox command used to query the state failes with an already-set status. Correct by enhancing the check so we don't fail if if the already set status comes back. Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
2015-06-05lpfc: Fix rport leak.James Smart1-3/+9
Correct locking and refcounting in tracking our rports Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com> Signed-off-by: James Smart <james.smart@avagotech.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
2015-06-05lpfc: Correct loss of RSCNs during array takeaway/giveback testing.James Smart1-5/+7
Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
2015-06-05lpfc: Correct reporting of vport state on fdisc command failure.James Smart1-1/+2
Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
2015-06-05lpfc: Add support for RDP ELS command.James Smart1-0/+420
Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
2015-06-05lpfc: Add support for ELS LCB.James Smart1-4/+235
Also has a little whitespace fixing. Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
2015-04-10lpfc: Update copyright to 2015James Smart1-1/+1
Update copyright to 2015 Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
2015-04-10lpfc: Fix internal loopback failure.James Smart1-1/+5
Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
2015-04-10lpfc: Fix premature release of rpi bit in bitmaskJames Smart1-0/+5
Currently, the driver plays off the fact that older sli4 adapters have a different rpi access pattern that allowed for the rpi reference to be released earlier in the teardown sequence, allowing the driver to recycle the rpi value sooner. Newer sli4 adapters have a different access pattern that requires us to wait for a later mailbox completion. This changes the put call location on the newer sli4 adapters. Symptoms of the error are "0110 ELS" and the "0372 iotag" errors. Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
2015-04-10lpfc: Initiator sends wrong BBCredit value for either FLOGI or FLOGI_ACCJames Smart1-1/+0
Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
2015-04-10lpfc: Fix FDMI Fabric support in driver for BrocadeJames Smart1-1/+1
Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
2015-04-10lpfc: Linux lpfc driver doesn't re-establish the link after a cable pull on LPe12002James Smart1-2/+1
Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
2015-01-09lpfc: correct device removal deadlock after link bounceJames Smart1-0/+9
This patch, applicable to 8G/4G/2G adapters, adds a call that resumes transmit operations after a link bounce. Without it, targets that tried to suspend exchanges after a link bounce (such as tape devices using sequence level error recovery) would never resume io operation, causing scan failures, and eventually deadlocks if a device removal request is made. Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com> Reviewed-by: Ewan D. Milne <emilne@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-09-16lpfc: fix low priority issues from fortify source code scanJames Smart1-12/+4
Fixed Low priority issues from lpfc given by fortify source code scan. Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-09-16lpfc: fix high priority issues from fortify source code scanJames Smart1-1/+4
Fixed High priority issues from lpfc given by fortify source code scan. Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-09-16lpfc: fix race between LOGO/PLOGI handling causing NULL pointerJames Smart1-0/+7
Fix race between LOGO/PLOGI handling causing NULL pointer Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-09-16lpfc: fix discovery timeout during nameserver loginJames Smart1-0/+5
Fix discovery timeout during nameserver login Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-06-02lpfc: Update Copyright on changed filesJames Smart1-1/+1
Update Copyright on changed files Signed-off-by: James Smart <james.smart@emulex.com> Reviewed-By: Dick Kennedy <dick.kennedy@emulex.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-03-15[SCSI] lpfc 8.3.45: Fixed crash during driver unload.James Smart1-4/+14
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2014-03-15[SCSI] lpfc 8.3.44: Fixed unassigned variable in ELS timeout messageJames Smart1-0/+1
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2014-03-15[SCSI] lpfc 8.3.44: Fix kernel panics from corrupted ndlp listJames Smart1-25/+55
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2014-03-15[SCSI] lpfc 8.3.44: Fix Crash in lpfc_els_timeout_handlerJames Smart1-51/+50
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-08-23[SCSI] lpfc 8.3.41: Add first burst support to driverJames Smart1-0/+2
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-06-26[SCSI] lpfc 8.3.40: Update Copyrights to 2013 for 8.3.38, 8.3.39, and 8.3.40 modificationsJames Smart1-1/+1
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-05-02[SCSI] lpfc 8.3.39: Reduced tmo value set to FLOGI WQE for quick recovery from FLOGI sequence timeoutJames Smart1-3/+6
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-05-02[SCSI] lpfc 8.3.39: Add log message when completes with clean address bit set to zeroJames Smart1-0/+3
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-05-02[SCSI] lpfc 8.3.39: Fixed pt2pt and loop discovery problems on topology changes.James Smart1-12/+81
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-05-02[SCSI] lpfc 8.3.39: Remove driver dependency on HZJames Smart1-4/+6
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-04-09[SCSI] lpfc 8.3.38: Fixed degraded performance after cable pullsJames Smart1-0/+15
The service parameters for the VPI/RPIs were incorrect, resulting in lower utilization Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-04-09[SCSI] lpfc 8.3.38: Fixed NMI watch dog panic's when resetting the hba.James Smart1-4/+2
Fixed NMI watch dog panic's when resetting the hba. Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-01-30[SCSI] lpfc 8.3.37: Fixed exhausted retry for plogi to nameserver.James Smart1-0/+7
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-01-30[SCSI] lpfc 8.3.37: Fixed ELS_REC received on the unsolicited receive queueJames Smart1-2/+16
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-11-27[SCSI] lpfc 8.3.36: Fixed setting sequential delivery bitJames Smart1-2/+6
Fixed setting sequential delivery bit in a service class that is not valid Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-10-08[SCSI] lpfc 8.3.35: Fix error with fabric service parameters causing performance issuesJames Smart1-0/+2
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>