diff options
author | Krishna Gudipati <kgudipat@brocade.com> | 2012-08-22 22:50:43 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2012-09-24 04:10:56 -0400 |
commit | ee1a4a42f6198c2b6e7c9fba6a952d1f4f89d627 (patch) | |
tree | ead7372ab22e9cf4734148b02f28a713f40c321d /drivers/scsi/bfa/bfa_fcs.h | |
parent | ebfe83921bd860e0b28a1a74e90be57baf2c8255 (diff) |
[SCSI] bfa: FCS remote port enhancements.
- 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>
Diffstat (limited to 'drivers/scsi/bfa/bfa_fcs.h')
-rw-r--r-- | drivers/scsi/bfa/bfa_fcs.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/scsi/bfa/bfa_fcs.h b/drivers/scsi/bfa/bfa_fcs.h index 050a7e900434..ef0ec66f714a 100644 --- a/drivers/scsi/bfa/bfa_fcs.h +++ b/drivers/scsi/bfa/bfa_fcs.h | |||
@@ -286,9 +286,8 @@ bfa_fcs_lport_get_drvport(struct bfa_fcs_lport_s *port) | |||
286 | 286 | ||
287 | bfa_boolean_t bfa_fcs_lport_is_online(struct bfa_fcs_lport_s *port); | 287 | bfa_boolean_t bfa_fcs_lport_is_online(struct bfa_fcs_lport_s *port); |
288 | struct bfa_fcs_lport_s *bfa_fcs_get_base_port(struct bfa_fcs_s *fcs); | 288 | struct bfa_fcs_lport_s *bfa_fcs_get_base_port(struct bfa_fcs_s *fcs); |
289 | void bfa_fcs_lport_get_rports(struct bfa_fcs_lport_s *port, | 289 | void bfa_fcs_lport_get_rport_quals(struct bfa_fcs_lport_s *port, |
290 | wwn_t rport_wwns[], int *nrports); | 290 | struct bfa_rport_qualifier_s rport[], int *nrports); |
291 | |||
292 | wwn_t bfa_fcs_lport_get_rport(struct bfa_fcs_lport_s *port, wwn_t wwn, | 291 | wwn_t bfa_fcs_lport_get_rport(struct bfa_fcs_lport_s *port, wwn_t wwn, |
293 | int index, int nrports, bfa_boolean_t bwwn); | 292 | int index, int nrports, bfa_boolean_t bwwn); |
294 | 293 | ||
@@ -326,10 +325,14 @@ void bfa_fcs_lport_offline(struct bfa_fcs_lport_s *port); | |||
326 | void bfa_fcs_lport_delete(struct bfa_fcs_lport_s *port); | 325 | void bfa_fcs_lport_delete(struct bfa_fcs_lport_s *port); |
327 | struct bfa_fcs_rport_s *bfa_fcs_lport_get_rport_by_pid( | 326 | struct bfa_fcs_rport_s *bfa_fcs_lport_get_rport_by_pid( |
328 | struct bfa_fcs_lport_s *port, u32 pid); | 327 | struct bfa_fcs_lport_s *port, u32 pid); |
328 | struct bfa_fcs_rport_s *bfa_fcs_lport_get_rport_by_old_pid( | ||
329 | struct bfa_fcs_lport_s *port, u32 pid); | ||
329 | struct bfa_fcs_rport_s *bfa_fcs_lport_get_rport_by_pwwn( | 330 | struct bfa_fcs_rport_s *bfa_fcs_lport_get_rport_by_pwwn( |
330 | struct bfa_fcs_lport_s *port, wwn_t pwwn); | 331 | struct bfa_fcs_lport_s *port, wwn_t pwwn); |
331 | struct bfa_fcs_rport_s *bfa_fcs_lport_get_rport_by_nwwn( | 332 | struct bfa_fcs_rport_s *bfa_fcs_lport_get_rport_by_nwwn( |
332 | struct bfa_fcs_lport_s *port, wwn_t nwwn); | 333 | struct bfa_fcs_lport_s *port, wwn_t nwwn); |
334 | struct bfa_fcs_rport_s *bfa_fcs_lport_get_rport_by_qualifier( | ||
335 | struct bfa_fcs_lport_s *port, wwn_t pwwn, u32 pid); | ||
333 | void bfa_fcs_lport_add_rport(struct bfa_fcs_lport_s *port, | 336 | void bfa_fcs_lport_add_rport(struct bfa_fcs_lport_s *port, |
334 | struct bfa_fcs_rport_s *rport); | 337 | struct bfa_fcs_rport_s *rport); |
335 | void bfa_fcs_lport_del_rport(struct bfa_fcs_lport_s *port, | 338 | void bfa_fcs_lport_del_rport(struct bfa_fcs_lport_s *port, |
@@ -421,6 +424,7 @@ struct bfa_fcs_rport_s { | |||
421 | struct bfa_fcs_s *fcs; /* fcs instance */ | 424 | struct bfa_fcs_s *fcs; /* fcs instance */ |
422 | struct bfad_rport_s *rp_drv; /* driver peer instance */ | 425 | struct bfad_rport_s *rp_drv; /* driver peer instance */ |
423 | u32 pid; /* port ID of rport */ | 426 | u32 pid; /* port ID of rport */ |
427 | u32 old_pid; /* PID before rport goes offline */ | ||
424 | u16 maxfrsize; /* maximum frame size */ | 428 | u16 maxfrsize; /* maximum frame size */ |
425 | __be16 reply_oxid; /* OX_ID of inbound requests */ | 429 | __be16 reply_oxid; /* OX_ID of inbound requests */ |
426 | enum fc_cos fc_cos; /* FC classes of service supp */ | 430 | enum fc_cos fc_cos; /* FC classes of service supp */ |