summaryrefslogtreecommitdiff
path: root/sys/scsi/scsiconf.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/scsi/scsiconf.h')
-rw-r--r--sys/scsi/scsiconf.h50
1 files changed, 13 insertions, 37 deletions
diff --git a/sys/scsi/scsiconf.h b/sys/scsi/scsiconf.h
index 8e115ccab3c..be4d14053dc 100644
--- a/sys/scsi/scsiconf.h
+++ b/sys/scsi/scsiconf.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: scsiconf.h,v 1.108 2009/11/10 10:18:59 dlg Exp $ */
+/* $OpenBSD: scsiconf.h,v 1.109 2009/11/12 06:20:27 dlg Exp $ */
/* $NetBSD: scsiconf.h,v 1.35 1997/04/02 02:29:38 mycroft Exp $ */
/*
@@ -53,7 +53,6 @@
#include <sys/queue.h>
#include <sys/timeout.h>
#include <sys/workq.h>
-#include <sys/mutex.h>
#include <machine/cpu.h>
#include <scsi/scsi_debug.h>
@@ -235,31 +234,20 @@ _4ltol(u_int8_t *bytes)
#define DEVID_T10 3
struct devid {
- u_int8_t d_type;
- u_int8_t d_flags;
-#define DEVID_F_PRINT (1<<0)
- u_int8_t d_refcount;
- u_int8_t d_len;
-
- /*
- * the devid struct is basically a header, the actual id is allocated
- * immediately after it.
- */
+ int d_type;
+ u_int d_len;
+ u_int8_t *d_id;
};
-#define DEVID_CMP(_a, _b) ( \
- (_a) != NULL && (_b) != NULL && \
- ((_a) == (_b) || \
- ((_a)->d_type != DEVID_NONE && \
- (_a)->d_type == (_b)->d_type && \
- (_a)->d_len == (_b)->d_len && \
- bcmp((_a) + 1, (_b) + 1, (_a)->d_len) == 0)) \
+#define DEVID_CMP(_a, _b) ( \
+ (_a) != NULL && \
+ (_b) != NULL && \
+ (_a)->d_type != DEVID_NONE && \
+ (_a)->d_type == (_b)->d_type && \
+ (_a)->d_len == (_b)->d_len && \
+ bcmp((_a)->d_id, (_b)->d_id, (_a)->d_len) == 0 \
)
-struct devid * devid_alloc(u_int8_t, u_int8_t, u_int8_t, u_int8_t *);
-struct devid * devid_copy(struct devid *);
-void devid_free(struct devid *);
-
/*
* The following documentation tries to describe the relationship between the
* various structures defined in this file:
@@ -351,6 +339,7 @@ struct scsi_link {
u_int64_t node_wwn; /* world wide name of node */
u_int16_t adapter_target; /* what are we on the scsi bus */
u_int16_t adapter_buswidth; /* 8 (regular) or 16 (wide). (0 becomes 8) */
+ u_int16_t active; /* operations in progress */
u_int16_t flags; /* flags that all devices have */
#define SDEV_REMOVABLE 0x0001 /* media is removable */
#define SDEV_MEDIA_LOADED 0x0002 /* device figures are still valid */
@@ -379,8 +368,7 @@ struct scsi_link {
void *adapter_softc; /* needed for call to foo_scsi_cmd */
struct scsibus_softc *bus; /* link to the scsibus we're on */
struct scsi_inquiry_data inqdata; /* copy of INQUIRY data from probe */
- struct devid *id;
- struct mutex mtx;
+ struct devid id;
};
int scsiprint(void *, const char *);
@@ -456,8 +444,6 @@ struct scsi_xfer {
* timeout structure for hba's to use for a command
*/
struct timeout stimeout;
- void *cookie;
- void (*done)(struct scsi_xfer *);
};
/*
@@ -500,7 +486,6 @@ struct scsi_xfer {
#define XS_BUSY 5 /* The device busy, try again later? */
#define XS_SHORTSENSE 6 /* Check the ATAPI sense for the error */
#define XS_RESET 8 /* bus was reset; possible retry command */
-#define XS_NO_CCB 9 /* device should requeue io and retry */
/*
* Possible retries for scsi_test_unit_ready()
@@ -572,23 +557,14 @@ int scsi_detach_lun(struct scsibus_softc *, int, int, int);
int scsi_req_probe(struct scsibus_softc *, int, int);
int scsi_req_detach(struct scsibus_softc *, int, int, int);
-void scsi_activate(struct scsibus_softc *, int, int, int);
-
extern const u_int8_t version_to_spc[];
#define SCSISPC(x)(version_to_spc[(x) & SID_ANSII])
-struct scsi_xfer * scsi_xs_get(struct scsi_link *, int);
-void scsi_xs_exec(struct scsi_xfer *);
-void scsi_xs_put(struct scsi_xfer *);
-
/*
* Entrypoints for multipathing
*/
int mpath_path_attach(struct scsi_link *);
int mpath_path_detach(struct scsi_link *, int);
-void mpath_path_activate(struct scsi_link *);
-void mpath_path_deactivate(struct scsi_link *);
-
#endif /* _KERNEL */
#endif /* SCSI_SCSICONF_H */