aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi/libfc.h
diff options
context:
space:
mode:
authorJoe Eykholt <jeykholt@cisco.com>2010-07-20 15:20:56 -0700
committerJames Bottomley <James.Bottomley@suse.de>2010-07-28 09:05:59 -0500
commit251748a99e631a2c46edcf9e519cfc60fae8153d (patch)
tree6255e513473fffde4691f761c53e82440d763d18 /include/scsi/libfc.h
parent[SCSI] libfc: eliminate rport LOGO state (diff)
downloadlinux-dev-251748a99e631a2c46edcf9e519cfc60fae8153d.tar.xz
linux-dev-251748a99e631a2c46edcf9e519cfc60fae8153d.zip
[SCSI] libfc: add fc_frame_sid() and fc_frame_did() functions
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: Joe Eykholt <jeykholt@cisco.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'include/scsi/libfc.h')
-rw-r--r--include/scsi/libfc.h18
1 files changed, 0 insertions, 18 deletions
diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h
index e6f07fba432c..f1ce793f33b3 100644
--- a/include/scsi/libfc.h
+++ b/include/scsi/libfc.h
@@ -42,24 +42,6 @@
#define FC_EX_TIMEOUT 1 /* Exchange timeout */
#define FC_EX_CLOSED 2 /* Exchange closed */
-/* some helpful macros */
-
-#define ntohll(x) be64_to_cpu(x)
-#define htonll(x) cpu_to_be64(x)
-
-
-static inline u32 ntoh24(const u8 *p)
-{
- return (p[0] << 16) | (p[1] << 8) | p[2];
-}
-
-static inline void hton24(u8 *p, u32 v)
-{
- p[0] = (v >> 16) & 0xff;
- p[1] = (v >> 8) & 0xff;
- p[2] = v & 0xff;
-}
-
/**
* enum fc_lport_state - Local port states
* @LPORT_ST_DISABLED: Disabled