diff options
author | Marco Peereboom <marco@cvs.openbsd.org> | 2009-11-05 03:33:53 +0000 |
---|---|---|
committer | Marco Peereboom <marco@cvs.openbsd.org> | 2009-11-05 03:33:53 +0000 |
commit | da070d530c1c6b123eb24e34db48251ca1f04d52 (patch) | |
tree | 1addc34954610ed621a1311d459df0758d2a0a2c /sys/scsi/scsiconf.h | |
parent | 57a5a2863daad723dd081b62ec1c6888f5435bfe (diff) |
The big diff dlg committed to the midlayer breaks NO_CCB and
TRY_AGAIN_LATER. NO_CCB is a timer based mechanism that can trivially
be made to fail by running IO to two or more disks simultaneously. The
TRY_AGAIN_LATER thing is more subtle because it now is a permanent
failure instead of transient however this is much harder to hit because
something must have gone wrong before it hits.
ok deraadt krw miod
Diffstat (limited to 'sys/scsi/scsiconf.h')
-rw-r--r-- | sys/scsi/scsiconf.h | 49 |
1 files changed, 13 insertions, 36 deletions
diff --git a/sys/scsi/scsiconf.h b/sys/scsi/scsiconf.h index f3039640b3d..244ff1817a7 100644 --- a/sys/scsi/scsiconf.h +++ b/sys/scsi/scsiconf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: scsiconf.h,v 1.105 2009/10/23 01:02:29 dlg Exp $ */ +/* $OpenBSD: scsiconf.h,v 1.106 2009/11/05 03:33:52 marco 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 *); }; /* @@ -571,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 */ |