aboutsummaryrefslogtreecommitdiff
path: root/sys/scsi/sctarg.c
diff options
context:
space:
mode:
authorJustin T. Gibbs <gibbs@FreeBSD.org>1998-06-01 03:44:56 +0000
committerJustin T. Gibbs <gibbs@FreeBSD.org>1998-06-01 03:44:56 +0000
commit6ea8a98e865022b1bd755a3a2f2f406dc433c7cf (patch)
tree7ed89118bc8c7bcc32254b8f0bd493f7afa8fe96 /sys/scsi/sctarg.c
parentfca35cd32f8eba553a5ce14b90cc19899c600ff5 (diff)
downloadsrc-6ea8a98e865022b1bd755a3a2f2f406dc433c7cf.tar.gz
src-6ea8a98e865022b1bd755a3a2f2f406dc433c7cf.zip
Add sctargattach that initializes the bufq data structure.
Notes
Notes: svn path=/head/; revision=36555
Diffstat (limited to 'sys/scsi/sctarg.c')
-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 bdf1d0ee02a0..568844ebd5ba 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)
{