aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi
diff options
context:
space:
mode:
Diffstat (limited to 'include/scsi')
-rw-r--r--include/scsi/osd_initiator.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/include/scsi/osd_initiator.h b/include/scsi/osd_initiator.h
index 02bd9f716357..f787d24d3bab 100644
--- a/include/scsi/osd_initiator.h
+++ b/include/scsi/osd_initiator.h
@@ -84,6 +84,15 @@ static inline void osd_dev_set_ver(struct osd_dev *od, enum osd_std_version v)
84#endif 84#endif
85} 85}
86 86
87static inline bool osd_dev_is_ver1(struct osd_dev *od)
88{
89#ifdef OSD_VER1_SUPPORT
90 return od->version == OSD_VER1;
91#else
92 return false;
93#endif
94}
95
87struct osd_request; 96struct osd_request;
88typedef void (osd_req_done_fn)(struct osd_request *or, void *private); 97typedef void (osd_req_done_fn)(struct osd_request *or, void *private);
89 98
@@ -120,14 +129,9 @@ struct osd_request {
120 int async_error; 129 int async_error;
121}; 130};
122 131
123/* OSD Version control */
124static inline bool osd_req_is_ver1(struct osd_request *or) 132static inline bool osd_req_is_ver1(struct osd_request *or)
125{ 133{
126#ifdef OSD_VER1_SUPPORT 134 return osd_dev_is_ver1(or->osd_dev);
127 return or->osd_dev->version == OSD_VER1;
128#else
129 return false;
130#endif
131} 135}
132 136
133/* 137/*