summaryrefslogtreecommitdiffstats
path: root/sys/scsi
diff options
context:
space:
mode:
authorgibbs <gibbs@FreeBSD.org>1998-06-01 03:44:56 +0000
committergibbs <gibbs@FreeBSD.org>1998-06-01 03:44:56 +0000
commitec33d6bd5e04d7a4e47dddef1e980d317ad0dc44 (patch)
treecf8487314a29282599dcbdbbd192f9f9f0407b90 /sys/scsi
parent40735bd785625e5f7e6fb6db229a3f03503ff2a3 (diff)
downloadFreeBSD-src-ec33d6bd5e04d7a4e47dddef1e980d317ad0dc44.zip
FreeBSD-src-ec33d6bd5e04d7a4e47dddef1e980d317ad0dc44.tar.gz
Add sctargattach that initializes the bufq data structure.
Diffstat (limited to 'sys/scsi')
-rw-r--r--sys/scsi/sctarg.c30
1 files changed, 21 insertions, 9 deletions
diff --git a/sys/scsi/sctarg.c b/sys/scsi/sctarg.c
index bdf1d0e..568844e 100644
--- a/sys/scsi/sctarg.c
+++ b/sys/scsi/sctarg.c
@@ -37,7 +37,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: sctarg.c,v 1.23 1997/12/02 21:07:02 phk Exp $
+ * $Id: sctarg.c,v 1.24 1998/01/24 02:54:51 eivind Exp $
*/
#include "opt_bounce.h"
@@ -83,18 +83,18 @@ static void sctarg_strategy(struct buf *bp, struct scsi_link *sc_link);
static struct scsi_device sctarg_switch =
{
- NULL,
- sctargstart, /* we have a queue, and this is how we service it */
- NULL,
- NULL,
- "sctarg",
- 0,
+ NULL,
+ sctargstart, /* we have a queue, and this is how we service it */
+ NULL,
+ NULL,
+ "sctarg",
+ 0,
{0, 0},
SDEV_ONCE_ONLY,
- 0,
+ sctargattach,
"Processor Target",
sctargopen,
- sizeof(struct scsi_data),
+ sizeof(struct scsi_data),
T_TARGET,
0,
0,
@@ -105,6 +105,18 @@ static struct scsi_device sctarg_switch =
};
static errval
+sctargattach(struct scsi_link *sc_link)
+{
+ struct scsi_data *sctarg;
+
+ sctarg = sc_link->sd;
+ bufq_init(&sctarg->buf_queue);
+ sctarg->flags = 0;
+
+ return 0;
+}
+
+static errval
sctarg_open(dev_t dev, int flags, int fmt, struct proc *p,
struct scsi_link *sc_link)
{
OpenPOWER on IntegriCloud