Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Option N.V. Wireless WAN modem driver
On Tue, 28 Jul 2009, David Young wrote:
> On Mon, Jul 27, 2009 at 09:02:05AM +0100, Iain Hibbert wrote:
> > The devices initially attach as umass with the windows etc drivers on (I
> > did not manage to mount the fs though) and after a SCSI REZERO_UNIT
> > command will detach and reattach as the modem. I see that some other
> > drivers handle the transition automatically but I find that a little
> > distasteful and would prefer to have some kind of hotplug manager for
> > that. Any news on that devd?
>
> How do you send the SCSI REZERO_UNIT command? It isn't mentioned in
> scsictl(8), but I may be looking for the wrong thing.
Sorry yeah I forgot about that, I added it to scsictl(8)
iain
Index: scsictl.8
===================================================================
RCS file: /cvsroot/src/sbin/scsictl/scsictl.8,v
retrieving revision 1.25
diff -u -r1.25 scsictl.8
--- scsictl.8 30 Apr 2008 13:10:53 -0000 1.25
+++ scsictl.8 29 Jul 2009 07:30:19 -0000
@@ -28,7 +28,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd January 22, 2007
+.Dd June 29, 2009
.Dt SCSICTL 8
.Os
.Sh NAME
@@ -150,6 +150,16 @@
.Li SCIOCRESET
ioctl.
.Pp
+.Nm rezero
+.Pp
+Send a
+.Dq REZERO UNIT
+command to the device.
+This is useful for devices that initially attach as a CD-ROM
+containing drivers.
+Upon receipt of this command, such devices may detach from the
+bus and reattach as a different type of device.
+.Pp
.Nm start
.Pp
Send a
Index: scsictl.c
===================================================================
RCS file: /cvsroot/src/sbin/scsictl/scsictl.c,v
retrieving revision 1.31
diff -u -r1.31 scsictl.c
--- scsictl.c 28 Apr 2008 20:23:09 -0000 1.31
+++ scsictl.c 29 Jul 2009 07:30:20 -0000
@@ -82,6 +82,7 @@
void device_release(int, char *[]);
void device_reserve(int, char *[]);
void device_reset(int, char *[]);
+void device_rezero(int, char *[]);
void device_debug(int, char *[]);
void device_prevent(int, char *[]);
void device_allow(int, char *[]);
@@ -102,6 +103,7 @@
{ "release", "", device_release },
{ "reserve", "", device_reserve },
{ "reset", "", device_reset },
+ { "rezero", "", device_rezero },
{ "debug", "level", device_debug },
{ "prevent", "", device_prevent },
{ "allow", "", device_allow },
@@ -807,6 +809,29 @@
}
/*
+ * device_rezero:
+ *
+ * Issue a REZERO command to a SCSI device.
+ */
+void
+device_rezero(int argc, char *argv[])
+{
+ struct scsi_rezero_unit cmd;
+
+ /* No arguments. */
+ if (argc != 0)
+ usage();
+
+ memset(&cmd, 0, sizeof(cmd));
+
+ cmd.opcode = SCSI_REZERO_UNIT;
+
+ scsi_command(fd, &cmd, sizeof(cmd), NULL, 0, 10000, 0);
+
+ return;
+}
+
+/*
* device_debug:
*
* Set debug level to a SCSI device.
Home |
Main Index |
Thread Index |
Old Index