diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2011-01-02 00:49:06 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2011-01-02 00:49:06 +0000 |
commit | 4ca44bef3da389cc4556166e0c99ec18a7dca17a (patch) | |
tree | 70d61643c4afd473be083ce9ed046cd69b4dd7ed /sys/arch/sparc64 | |
parent | be99bbff684b77e6579754318bced0219fccb29b (diff) |
Use the session ID passed to use by the virtual disk client, and pass back
a bit more information to the client during the attribute negotiation phase.
Gets us past the attribute negotiation phase against an OpenSolaris virtual
disk client.
Diffstat (limited to 'sys/arch/sparc64')
-rw-r--r-- | sys/arch/sparc64/dev/vdsp.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/sys/arch/sparc64/dev/vdsp.c b/sys/arch/sparc64/dev/vdsp.c index 0cb3922b5a9..fca04548116 100644 --- a/sys/arch/sparc64/dev/vdsp.c +++ b/sys/arch/sparc64/dev/vdsp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vdsp.c,v 1.3 2011/01/02 00:35:23 kettenis Exp $ */ +/* $OpenBSD: vdsp.c,v 1.4 2011/01/02 00:49:05 kettenis Exp $ */ /* * Copyright (c) 2009 Mark Kettenis * @@ -130,6 +130,12 @@ struct vdsk_desc_msg { #define VDSK_MAJOR 1 #define VDSK_MINOR 0 +/* + * And we only support Block Read, Block Write and Flush commands. + */ +#define VD_OP_MASK \ + ((1 << VD_OP_BREAD) | (1 << VD_OP_BWRITE) | (1 << VD_OP_FLUSH)) + struct vdsp_softc { struct device sc_dv; int sc_idx; @@ -477,8 +483,9 @@ vdsp_rx_vio_ver_info(struct vdsp_softc *sc, struct vio_msg_tag *tag) return; } + sc->sc_local_sid = vi->tag.sid; + vi->tag.stype = VIO_SUBTYPE_ACK; - vi->tag.sid = sc->sc_local_sid; vi->minor = VDSK_MINOR; vi->dev_class = VDEV_DISK_SERVER; vdsp_sendmsg(sc, vi, sizeof(*vi)); @@ -823,8 +830,11 @@ vdsp_open(void *arg1, void *arg2) ai.tag.stype_env = VIO_ATTR_INFO; ai.tag.sid = sc->sc_local_sid; ai.xfer_mode = sc->sc_xfer_mode; + ai.vd_type = VD_DISK_TYPE_DISK; ai.vdisk_block_size = sc->sc_vdisk_block_size; + ai.operations = VD_OP_MASK; ai.vdisk_size = sc->sc_vdisk_size; + ai.max_xfer_sz = MAXPHYS / sc->sc_vdisk_block_size; vdsp_sendmsg(sc, &ai, sizeof(ai)); } |