diff options
Diffstat (limited to 'include/scsi/libfc.h')
-rw-r--r-- | include/scsi/libfc.h | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h index 4b912eee33e5..7495c0ba67ee 100644 --- a/include/scsi/libfc.h +++ b/include/scsi/libfc.h | |||
@@ -47,13 +47,18 @@ | |||
47 | #define ntohll(x) be64_to_cpu(x) | 47 | #define ntohll(x) be64_to_cpu(x) |
48 | #define htonll(x) cpu_to_be64(x) | 48 | #define htonll(x) cpu_to_be64(x) |
49 | 49 | ||
50 | #define ntoh24(p) (((p)[0] << 16) | ((p)[1] << 8) | ((p)[2])) | ||
51 | 50 | ||
52 | #define hton24(p, v) do { \ | 51 | static inline u32 ntoh24(const u8 *p) |
53 | p[0] = (((v) >> 16) & 0xFF); \ | 52 | { |
54 | p[1] = (((v) >> 8) & 0xFF); \ | 53 | return (p[0] << 16) | (p[1] << 8) | p[2]; |
55 | p[2] = ((v) & 0xFF); \ | 54 | } |
56 | } while (0) | 55 | |
56 | static inline void hton24(u8 *p, u32 v) | ||
57 | { | ||
58 | p[0] = (v >> 16) & 0xff; | ||
59 | p[1] = (v >> 8) & 0xff; | ||
60 | p[2] = v & 0xff; | ||
61 | } | ||
57 | 62 | ||
58 | /** | 63 | /** |
59 | * enum fc_lport_state - Local port states | 64 | * enum fc_lport_state - Local port states |
@@ -775,6 +780,7 @@ struct fc_disc { | |||
775 | * @dev_stats: FCoE device stats (TODO: libfc should not be | 780 | * @dev_stats: FCoE device stats (TODO: libfc should not be |
776 | * FCoE aware) | 781 | * FCoE aware) |
777 | * @retry_count: Number of retries in the current state | 782 | * @retry_count: Number of retries in the current state |
783 | * @port_id: FC Port ID | ||
778 | * @wwpn: World Wide Port Name | 784 | * @wwpn: World Wide Port Name |
779 | * @wwnn: World Wide Node Name | 785 | * @wwnn: World Wide Node Name |
780 | * @service_params: Common service parameters | 786 | * @service_params: Common service parameters |
@@ -821,6 +827,7 @@ struct fc_lport { | |||
821 | u8 retry_count; | 827 | u8 retry_count; |
822 | 828 | ||
823 | /* Fabric information */ | 829 | /* Fabric information */ |
830 | u32 port_id; | ||
824 | u64 wwpn; | 831 | u64 wwpn; |
825 | u64 wwnn; | 832 | u64 wwnn; |
826 | unsigned int service_params; | 833 | unsigned int service_params; |
@@ -918,15 +925,6 @@ static inline void fc_lport_free_stats(struct fc_lport *lport) | |||
918 | } | 925 | } |
919 | 926 | ||
920 | /** | 927 | /** |
921 | * fc_lport_get_stats() - Get a local port's statistics | ||
922 | * @lport: The local port whose statistics are to be retreived | ||
923 | */ | ||
924 | static inline struct fcoe_dev_stats *fc_lport_get_stats(struct fc_lport *lport) | ||
925 | { | ||
926 | return per_cpu_ptr(lport->dev_stats, smp_processor_id()); | ||
927 | } | ||
928 | |||
929 | /** | ||
930 | * lport_priv() - Return the private data from a local port | 928 | * lport_priv() - Return the private data from a local port |
931 | * @lport: The local port whose private data is to be retreived | 929 | * @lport: The local port whose private data is to be retreived |
932 | */ | 930 | */ |
@@ -1053,7 +1051,6 @@ void fc_exch_mgr_reset(struct fc_lport *, u32 s_id, u32 d_id); | |||
1053 | * Functions for fc_functions_template | 1051 | * Functions for fc_functions_template |
1054 | */ | 1052 | */ |
1055 | void fc_get_host_speed(struct Scsi_Host *); | 1053 | void fc_get_host_speed(struct Scsi_Host *); |
1056 | void fc_get_host_port_type(struct Scsi_Host *); | ||
1057 | void fc_get_host_port_state(struct Scsi_Host *); | 1054 | void fc_get_host_port_state(struct Scsi_Host *); |
1058 | void fc_set_rport_loss_tmo(struct fc_rport *, u32 timeout); | 1055 | void fc_set_rport_loss_tmo(struct fc_rport *, u32 timeout); |
1059 | struct fc_host_statistics *fc_get_host_stats(struct Scsi_Host *); | 1056 | struct fc_host_statistics *fc_get_host_stats(struct Scsi_Host *); |