- 09 11月, 2016 17 次提交
-
-
由 Hannes Reinecke 提交于
The ->rport_lookup callback only ever had a single implementation, so we can as well call it directly and drop the callback. Signed-off-by: NHannes Reinecke <hare@suse.com> Acked-by: NJohannes Thumshirn <jth@kernel.org> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Hannes Reinecke 提交于
The ->rport_destroy callback only ever had one implementation, so we can as well call it directly and drop the callback. Signed-off-by: NHannes Reinecke <hare@suse.com> Acked-by: NJohannes Thumshirn <jth@kernel.org> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Hannes Reinecke 提交于
The ->exch_seq_send callback only ever had one implementation, so we can call the function directly and drop the callback. Signed-off-by: NHannes Reinecke <hare@suse.com> Acked-by: NJohannes Thumshirn <jth@kernel.org> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Hannes Reinecke 提交于
The 'seq_els_rsp_send' callback only ever had one implementation, so we might as well drop it and use the function directly. Signed-off-by: NHannes Reinecke <hare@suse.com> Acked-by: NJohannes Thumshirn <jth@kernel.org> Acked-by: NJohannes Thumshirn <jth@kernel.org> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Hannes Reinecke 提交于
Occasionally it might happen that we receive a PRLI while we're still waiting for our PLOGI response. In that case we should return 'busy' LS status instead of 'plogi required' LS status. Signed-off-by: NHannes Reinecke <hare@suse.com> Reviewed-by: NBart Van Assche <bart.vanassche@sandisk.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Hannes Reinecke 提交于
PRLI is only required if the port is acting as an initiator; ports which support target functionality only do not need to send PRLI. At the same time the PRLI state is only used if the port initiated a PRLI transfer; if we received a PRLI request we should _not_ change the state as this would cause our PRLI response to be dropped. And when we receive a PRLI response we need to check if an image pair has been established; if not the remote port cannot act as a target for us and we need to disable target functionality. Signed-off-by: NHannes Reinecke <hare@suse.com> Acked-by: NJohannes Thumshirn <jth@kernel.org> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Hannes Reinecke 提交于
The libfc stack generates an RTV request, so we should be implementing an RTV responder, too. Signed-off-by: NHannes Reinecke <hare@suse.com> Acked-by: NJohannes Thumshirn <jth@kernel.org> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Hannes Reinecke 提交于
We only ever use the 'fp' argument for fc_rport_error() to encapsulate the error code, so we can as well do away with that and pass the error directly. Signed-off-by: NHannes Reinecke <hare@suse.com> Acked-by: NJohannes Thumshirn <jth@kernel.org> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Hannes Reinecke 提交于
When setting the FCP timeout we need to ensure a lower boundary for E_D_TOV and R_A_TOV, otherwise we'd be getting spurious I/O issues due to the fcp timer firing too early. Signed-off-by: NHannes Reinecke <hare@suse.com> Acked-by: NJohannes Thumshirn <jth@kernel.org> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Hannes Reinecke 提交于
If fc_rport_error_retry() is attempting to retry the remote port state we should be waiting for the configured e_d_tov value rather than the default. Signed-off-by: NHannes Reinecke <hare@suse.com> Acked-by: NJohannes Thumshirn <jth@kernel.org> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Hannes Reinecke 提交于
Signed-off-by: NHannes Reinecke <hare@suse.com> Acked-by: NJohannes Thumshirn <jth@kernel.org> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Hannes Reinecke 提交于
When we receive an FLOGI but have already sent our own we should not advance the state machine but rather wait for our FLOGI to return before continuing with PLOGI. Signed-off-by: NHannes Reinecke <hare@suse.com> Acked-by: NJohannes Thumshirn <jth@kernel.org> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Hannes Reinecke 提交于
When the port is already started we don't need to login; that will only confuse the state machine. Signed-off-by: NHannes Reinecke <hare@suse.com> Acked-by: NJohannes Thumshirn <jth@kernel.org> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Hannes Reinecke 提交于
When fc_rport_login() is called while the rport is not in RPORT_ST_INIT, RPORT_ST_READY, or RPORT_ST_DELETE login is already in progress and there's no need to drop down to FLOGI; doing so will only confuse the other side. Signed-off-by: NHannes Reinecke <hare@suse.com> Acked-by: NJohannes Thumshirn <jth@kernel.org> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Chad Dupuis 提交于
When an ELS response handler receives a -FC_EX_CLOSED, the rdata->rp_mutex is already held which can lead to a deadlock condition like the following stack trace: [<ffffffffa04d8f18>] fc_rport_plogi_resp+0x28/0x200 [libfc] [<ffffffffa04cfa1a>] fc_invoke_resp+0x6a/0xe0 [libfc] [<ffffffffa04d0c08>] fc_exch_mgr_reset+0x1b8/0x280 [libfc] [<ffffffffa04d87b3>] fc_rport_logoff+0x43/0xd0 [libfc] [<ffffffffa04ce73d>] fc_disc_stop+0x6d/0xf0 [libfc] [<ffffffffa04ce7ce>] fc_disc_stop_final+0xe/0x20 [libfc] [<ffffffffa04d55f7>] fc_fabric_logoff+0x17/0x70 [libfc] The other ELS handlers need to follow the FLOGI response handler and simply do a kref_put against the fc_rport_priv struct and exit when receving a -FC_EX_CLOSED response. Signed-off-by: NChad Dupuis <chad.dupuis@cavium.com> Reviewed-by: NHannes Reinecke <hare@suse.com> Acked-by: NJohannes Thumshirn <jth@kernel.org> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Hannes Reinecke 提交于
The list of attached 'rdata' remote port structures is RCU protected, so there is no need to take the 'disc_mutex' when traversing it. Rather we should be using rcu_read_lock() and kref_get_unless_zero() to validate the entries. We need, however, take the disc_mutex when deleting an entry; otherwise we risk clashes with list_add. Signed-off-by: NHannes Reinecke <hare@suse.com> Acked-by: NJohannes Thumshirn <jth@kernel.org> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Hannes Reinecke 提交于
The kref handling in fc_rport is a mess. This patch updates the kref handling according to the following rules: - Take a reference whenever scheduling a workqueue - Take a reference whenever an ELS command is send - Drop the reference at the end of the workqueue function - Drop the reference at the end of handling ELS replies - Take a reference when allocating an rport - Drop the reference when removing an rport Signed-off-by: NHannes Reinecke <hare@suse.com> Acked-by: NJohannes Thumshirn <jth@kernel.org> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 19 8月, 2016 3 次提交
-
-
由 Hannes Reinecke 提交于
FC-LS mandates that we should invalidate all sequences before sending a LOGO. And we should set the event to RPORT_EV_STOP when a LOGO request has been received to signal that all exchanges are terminated. Signed-off-by: NHannes Reinecke <hare@suse.com> Reviewed-by: NChad Dupuis <chad.dupuis@qlogic.com> Tested-by: NChad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Hannes Reinecke 提交于
When running in point-to-multipoint mode PLOGI is done after FLOGI completed. So when the PLOGI fails we should be sending a LOGO to the remote port. [mkp: Applied by hand] Signed-off-by: NHannes Reinecke <hare@suse.com> Reviewed-by: NChad Dupuis <chad.dupuis@qlogic.com> Tested-by: NChad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Hannes Reinecke 提交于
When receiving a PRLO it just means that the operating parameters have changed, it does _not_ mean that the port doesn't want to communicate with us. So instead of implicitly logging out we should be issueing a PRLI to figure out the new operating parameters. We can always recover once PRLI fails. Signed-off-by: NHannes Reinecke <hare@suse.com> Reviewed-by: NChad Dupuis <chad.dupuis@qlogic.com> Tested-by: NChad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 13 7月, 2016 1 次提交
-
-
由 Hannes Reinecke 提交于
Originally libfc would just be initializing the refcount to '1', and using the disc_mutex to synchronize if and when the final put should be happening. This has a race condition as the mutex might be delayed, causing other threads to access an invalid structure. This patch updates the rport reference counting to increase the reference every time 'rport_lookup' is called, and decreases the reference correspondingly. This removes the need to hold 'disc_mutex' when removing the structure, and avoids the above race condition. Signed-off-by: NHannes Reinecke <hare@suse.com> Acked-by: NVasu Dev <vasu.dev@intel.com> Reviewed-by: NJohannes Thumshirn <jthumshirn@suse.de> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 05 9月, 2013 1 次提交
-
-
由 Bart Van Assche 提交于
Change 'initiaive' into 'initiative', 'remainig' into 'remaining' and change 'exected' into 'expected'. Signed-off-by: NBart Van Assche <bvanassche@acm.org> Signed-off-by: NRobert Love <robert.w.love@intel.com>
-
- 10 7月, 2013 1 次提交
-
-
由 Mark Rustad 提交于
Reject a PLOGI from a node with an incompatible role, that is, initiator-to-initiator or target-to-target. Signed-off-by: NMark Rustad <mark.d.rustad@intel.com> Reviewed-by: NYi Zou <yi.zou@intel.com> Tested-by: NJack Morgan <jack.morgan@intel.com> Signed-off-by: NRobert Love <robert.w.love@intel.com>
-
- 11 5月, 2013 1 次提交
-
-
由 Mark Rustad 提交于
The service_params field is being checked against the symbol FC_RPORT_ROLE_FCP_INITIATOR where it really should be checked against FCP_SPPF_INIT_FCN. Signed-off-by: NMark Rustad <mark.d.rustad@intel.com> Tested-by: NJack Morgan <jack.morgan@intel.com> Signed-off-by: NRobert Love <robert.w.love@intel.com>
-
- 16 2月, 2013 1 次提交
-
-
由 Krishna Mohan 提交于
schedule_delayed_work() is using msec instead of jiffies. On PLOGI reject from target, remote port retry is scheduled @ 20 sec instead of 2sec(FC_DEF_E_D_TOV). XenServer dom0 kernel is configured with CONFIG_HZ=100Hz Signed-off-by: NKrishna Mohan <krmohan@cisco.com> Signed-off-by: NRobert Love <robert.w.love@intel.com>
-
- 16 1月, 2012 1 次提交
-
-
由 Bart Van Assche 提交于
Avoid that sparse complains about missing declarations for local functions by declaring these static or by adding an #include directive. Add the __percpu annotation where it is missing. Signed-off-by: NBart Van Assche <bvanassche@acm.org> Reviewed-by: NYi Zou <yi.zou@intel.com> Signed-off-by: NRobert Love <robert.w.love@intel.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
- 01 11月, 2011 1 次提交
-
-
由 Paul Gortmaker 提交于
For the basic SCSI infrastructure files that are exporting symbols but not modules themselves, add in the basic export.h header file to allow the exports. Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
-
- 21 7月, 2011 1 次提交
-
-
由 Lai Jiangshan 提交于
The rcu callback fc_rport_free_rcu() just calls a kfree(), so we use kfree_rcu() instead of the call_rcu(fc_rport_free_rcu). Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com> Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Robert Love <robert.w.love@intel.com> Cc: "James E.J. Bottomley" <James.Bottomley@suse.de> Reviewed-by: NJosh Triplett <josh@joshtriplett.org>
-
- 30 6月, 2011 1 次提交
-
-
由 Kiran Patil 提交于
Problem: Existing RPORT state machine continues witg FLOGI/PLOGI process only after it receices beacon from other end. Once claiming stage is over (either clain notify or clain repose), beacon is sent and state machine enters into operational mode where it initiates the rlogin process (FLOGI/PLOGI) to the peer but before this rlogin is initiated, exitsing implementation checks if it received beacon from other end, it beacon is not received yet, rlogin process is not initiated. Other end initiates FLOGI but peer end keeps on rejecting FLOGI, hence after 3 retries other end deletes associated rport, then sends a beacon. Once the beacon is received, peer end now initiates rlogin to the peer end but since associated rport is deleted FLOGI is neither accepted nor the reject response send out because rport is deleted. Hence unable to proceed withg FLOGI/PLOGI process and fails to establish VN2VN connection. Fix: VN2VN spec is not standard yet but based on exitsing collateral on T11, it appears that, both end shall send beacon and enter into 'operational mode' without explictly waiting for beacon from other end. Fix is to allow the RPORT login process as long as respective RPORT is created (as part of claim notification / claim response) even though state of RPORT is INIT. Means don't wait for beacon from peer end, if peer end initiates FLOGI (means peer end exist and responding). Notes: This patch is preparing the FCoE stack for target wrt offload. This is generic patch and harmless even if applied on storage initiator because 'else if' condition of function 'fcoe_oem_found' shall evaluate to TRUE only for targets. Dependencies: None Signed-off-by: NKiran Patil <kiran.patil@intel.com> Signed-off-by: NRobert Love <robert.w.love@intel.com> Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
-
- 01 3月, 2011 1 次提交
-
-
由 Parikh, Neerav 提交于
When an fcoe interface is being destroyed; in the process the fcoe driver will try to release all the resources it had allocated for that interface including rports. But, it seems that it does not release the reference held for the name server rport in that process resulting into a memory leak. This patch fixes that memory leak. Signed-off-by: NNeerav Parikh <neerav.parikh@intel.com> Tested-by: NRoss Brattain <ross.b.brattain@intel.com> Signed-off-by: NRobert Love <robert.w.love@intel.com> Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
-
- 13 2月, 2011 5 次提交
-
-
由 Bhanu Prakash Gollapudi 提交于
This patch enables LLD to listen to rport events and perform LLD specific operations based on the rport event. This patch also stores sp_features and spp_type in rdata for further reference by LLD. Signed-off-by: NBhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: NRobert Love <robert.w.love@intel.com> Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
-
由 Joe Eykholt 提交于
When sending an outgoing PRLI as an initiator, get the parameters from registered providers so that they all get a chance to decide on roles. The passive provider is called last, and could override the initiator role. Signed-off-by: NJoe Eykholt <jeykholt@cisco.com> Signed-off-by: NRobert Love <robert.w.love@intel.com> Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
-
由 Joe Eykholt 提交于
Allow FC-4 provider modules to hook into libfc, mostly for targets. This should allow any FC-4 module to handle PRLI requests and maintain process-association states. Each provider registers its ops with libfc and then will be called for any incoming PRLI for that FC-4 type on any instance. The provider can decide whether to handle that particular instance using any method it likes, such as ACLs or other configuration information. A count is kept of the number of successful PRLIs from the remote port. Providers are called back with an implicit PRLO when the remote port is about to be deleted or has been reset. fc_lport_recv_req() now sends incoming FC-4 requests to FC-4 providers, and there is a built-in provider always registered for handling incoming ELS requests. The call to provider recv() routines uses rcu_read_lock() so that providers aren't removed during the call. That lock is very cheap and shouldn't affect any performance on ELS requests. Providers can rely on the RCU lock to protect a session lookup as well. Signed-off-by: NJoe Eykholt <jeykholt@cisco.com> Signed-off-by: NRobert Love <robert.w.love@intel.com> Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
-
由 Randy Dunlap 提交于
Fix sparse warning for non-ANSI function declaration. Declare workqueue structs as static. Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com> Cc: Robert Love <robert.w.love@intel.com> Signed-off-by: NRobert Love <robert.w.love@intel.com> Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
-
由 Hillf Danton 提交于
This patch makes it so that we only have one call to fc_rport_error. This patch does not completely consolidate return statements, there is still one return used when not calling fc_rport_error, but alternative solutions made the code more confusing. [ Patch modified by Robert Love ] [ Patch title and commit message edited by Robert Love to make it more relevant ] Signed-off-by: NHillf Danton <dhillf@gmail.com> Signed-off-by: NRobert Love <robert.w.love@intel.com> Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
-
- 22 12月, 2010 1 次提交
-
-
由 Hillf Danton 提交于
There seems rdata should get put before return. Signed-off-by: NHillf Danton <dhillf@gmail.com> Signed-off-by: NRobert Love <robert.w.love@intel.com> Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
-
- 26 10月, 2010 1 次提交
-
-
由 Mike Christie 提交于
There does not seem to be a reason why libfc adds a 5 second delay to the user requested value for the dev loss tmo. There also does not seem to be a reason to allow setting it to 0 (or really close). This patch removes the extra 5 sec delay, and for 0 it sets it to 1 like other fc drivers. We should actually be able to set it to 0 since the queue_delayed_work API will just call queue_work, but other drivers set it to 1 in that case. Signed-off-by: NMike Christie <michaelc@cs.wisc.edu> Signed-off-by: NRobert Love <robert.w.love@intel.com> Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
-
- 28 7月, 2010 3 次提交
-
-
由 Joe Eykholt 提交于
Incoming requests shouldn't require a local exchange if we're just going to reply with one or two frames and don't expect anything further. Don't allocate exchanges for such requests until requested by the upper-layer protocol. The sequence is always NULL for new requests, so remove that as an argument to request handlers. Also change the first argument to lport->tt.seq_els_rsp_send from the sequence pointer to the received frame pointer, to supply the exchange IDs and destination ID info. Signed-off-by: NJoe Eykholt <jeykholt@cisco.com> Signed-off-by: NRobert Love <robert.w.love@intel.com> Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
-
由 Joe Eykholt 提交于
Add functions to fill in an FC header given a request header. These reduces code lines in fc_lport and fc_rport and works without an exchange/sequence assigned. fc_fill_reply_hdr() fills a header for a final reply frame. fc_fill_hdr() which is similar but allows specifying the f_ctl parameter. Add defines for F_CTL values FC_FCTL_REQ and FC_FCTL_RESP. These can be used for most request and response sequences. v2 of patch adds a line to copy the frame encapsulation info from the received frame. Signed-off-by: NJoe Eykholt <jeykholt@cisco.com> Signed-off-by: NRobert Love <robert.w.love@intel.com> Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
-
由 Joe Eykholt 提交于
To pave the way for eliminating exchanges from incoming requests, add simple inline fc_frame_sid() and fc_frame_did() functions which get the FC_IDs from the frame header. This can be almost as efficient as getting them from the sequence/exchange. Move ntohll, htonll, ntoh24 and hton24 to <scsi/fc_frame.h> since we need them there and that's included by <scsi/libfc.h> Signed-off-by: NJoe Eykholt <jeykholt@cisco.com> Signed-off-by: NRobert Love <robert.w.love@intel.com> Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
-