diff options
author | James Bottomley <jejb@titanic.(none)> | 2005-11-04 23:29:52 -0500 |
---|---|---|
committer | James Bottomley <jejb@titanic.(none)> | 2005-11-04 23:29:52 -0500 |
commit | 849a8924a6740ecbf9711e015beca69425f0c429 (patch) | |
tree | 2bae44c5fb170a655696b7253eec7ee13c6fa437 /include/scsi/scsi_transport_fc.h | |
parent | 7015faa7df829876a0f931cd18aa6d7c24a1b581 (diff) | |
parent | ee807c2d43b54183c16580857837dae8ccb2ed22 (diff) |
Merge by Hand
Conflicts in dec_esp.c (Thanks Bacchus), scsi_transport_iscsi.c and
scsi_transport_fc.h
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'include/scsi/scsi_transport_fc.h')
-rw-r--r-- | include/scsi/scsi_transport_fc.h | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/include/scsi/scsi_transport_fc.h b/include/scsi/scsi_transport_fc.h index c04405bead2d..fac547d32a98 100644 --- a/include/scsi/scsi_transport_fc.h +++ b/include/scsi/scsi_transport_fc.h | |||
@@ -29,6 +29,7 @@ | |||
29 | 29 | ||
30 | #include <linux/config.h> | 30 | #include <linux/config.h> |
31 | #include <linux/sched.h> | 31 | #include <linux/sched.h> |
32 | #include <scsi/scsi.h> | ||
32 | 33 | ||
33 | struct scsi_transport_template; | 34 | struct scsi_transport_template; |
34 | 35 | ||
@@ -385,6 +386,8 @@ struct fc_function_template { | |||
385 | struct fc_host_statistics * (*get_fc_host_stats)(struct Scsi_Host *); | 386 | struct fc_host_statistics * (*get_fc_host_stats)(struct Scsi_Host *); |
386 | void (*reset_fc_host_stats)(struct Scsi_Host *); | 387 | void (*reset_fc_host_stats)(struct Scsi_Host *); |
387 | 388 | ||
389 | int (*issue_fc_host_lip)(struct Scsi_Host *); | ||
390 | |||
388 | /* allocation lengths for host-specific data */ | 391 | /* allocation lengths for host-specific data */ |
389 | u32 dd_fcrport_size; | 392 | u32 dd_fcrport_size; |
390 | 393 | ||
@@ -428,6 +431,34 @@ struct fc_function_template { | |||
428 | }; | 431 | }; |
429 | 432 | ||
430 | 433 | ||
434 | /** | ||
435 | * fc_remote_port_chkready - called to validate the remote port state | ||
436 | * prior to initiating io to the port. | ||
437 | * | ||
438 | * Returns a scsi result code that can be returned by the LLDD. | ||
439 | * | ||
440 | * @rport: remote port to be checked | ||
441 | **/ | ||
442 | static inline int | ||
443 | fc_remote_port_chkready(struct fc_rport *rport) | ||
444 | { | ||
445 | int result; | ||
446 | |||
447 | switch (rport->port_state) { | ||
448 | case FC_PORTSTATE_ONLINE: | ||
449 | result = 0; | ||
450 | break; | ||
451 | case FC_PORTSTATE_BLOCKED: | ||
452 | result = DID_BUS_BUSY << 16; | ||
453 | break; | ||
454 | default: | ||
455 | result = DID_NO_CONNECT << 16; | ||
456 | break; | ||
457 | } | ||
458 | return result; | ||
459 | } | ||
460 | |||
461 | |||
431 | struct scsi_transport_template *fc_attach_transport( | 462 | struct scsi_transport_template *fc_attach_transport( |
432 | struct fc_function_template *); | 463 | struct fc_function_template *); |
433 | void fc_release_transport(struct scsi_transport_template *); | 464 | void fc_release_transport(struct scsi_transport_template *); |
@@ -436,8 +467,6 @@ struct fc_rport *fc_remote_port_add(struct Scsi_Host *shost, | |||
436 | int channel, struct fc_rport_identifiers *ids); | 467 | int channel, struct fc_rport_identifiers *ids); |
437 | void fc_remote_port_delete(struct fc_rport *rport); | 468 | void fc_remote_port_delete(struct fc_rport *rport); |
438 | void fc_remote_port_rolechg(struct fc_rport *rport, u32 roles); | 469 | void fc_remote_port_rolechg(struct fc_rport *rport, u32 roles); |
439 | int fc_remote_port_block(struct fc_rport *rport); | ||
440 | void fc_remote_port_unblock(struct fc_rport *rport); | ||
441 | int scsi_is_fc_rport(const struct device *); | 470 | int scsi_is_fc_rport(const struct device *); |
442 | 471 | ||
443 | static inline u64 wwn_to_u64(u8 *wwn) | 472 | static inline u64 wwn_to_u64(u8 *wwn) |