[SCSI] fc_transport: Add an API to allow an LLD to create vports
[safe/jmp/linux-2.6] / include / scsi / scsi_dh.h
index 04d0d84..33efce2 100644 (file)
@@ -32,6 +32,7 @@ enum {
         */
        SCSI_DH_DEV_FAILED,     /* generic device error */
        SCSI_DH_DEV_TEMP_BUSY,
+       SCSI_DH_DEV_UNSUPP,     /* device handler not supported */
        SCSI_DH_DEVICE_MAX,     /* max device blkerr definition */
 
        /*
@@ -54,6 +55,26 @@ enum {
        SCSI_DH_NOSYS,
        SCSI_DH_DRIVER_MAX,
 };
-
+#if defined(CONFIG_SCSI_DH) || defined(CONFIG_SCSI_DH_MODULE)
 extern int scsi_dh_activate(struct request_queue *);
 extern int scsi_dh_handler_exist(const char *);
+extern int scsi_dh_attach(struct request_queue *, const char *);
+extern void scsi_dh_detach(struct request_queue *);
+#else
+static inline int scsi_dh_activate(struct request_queue *req)
+{
+       return 0;
+}
+static inline int scsi_dh_handler_exist(const char *name)
+{
+       return 0;
+}
+static inline int scsi_dh_attach(struct request_queue *req, const char *name)
+{
+       return SCSI_DH_NOSYS;
+}
+static inline void scsi_dh_detach(struct request_queue *q)
+{
+       return;
+}
+#endif