summaryrefslogtreecommitdiffstats
path: root/sys/scsi/ses.c
diff options
context:
space:
mode:
authormarco <marco@openbsd.org>2005-08-18 21:04:47 +0000
committermarco <marco@openbsd.org>2005-08-18 21:04:47 +0000
commite4b2d639a85dfa85c8edf331f945bb45e0efcd08 (patch)
tree5d1f34e66bf809fae3c2874a14687f135828a022 /sys/scsi/ses.c
parentSkip (trap) instruction in cpu_fork() instead of proc_trampoline(). (diff)
downloadwireguard-openbsd-e4b2d639a85dfa85c8edf331f945bb45e0efcd08.tar.xz
wireguard-openbsd-e4b2d639a85dfa85c8edf331f945bb45e0efcd08.zip
Silly dlg did not read my old code careful enough. Missed 2 bits that are
necessary for the blinkenlight magic. Also removed some XXX cruft that was misleading.
Diffstat (limited to 'sys/scsi/ses.c')
-rw-r--r--sys/scsi/ses.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/sys/scsi/ses.c b/sys/scsi/ses.c
index f59d571356d..d7ce4dd2f51 100644
--- a/sys/scsi/ses.c
+++ b/sys/scsi/ses.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ses.c,v 1.22 2005/08/18 12:26:39 dlg Exp $ */
+/* $OpenBSD: ses.c,v 1.23 2005/08/18 21:04:47 marco Exp $ */
/*
* Copyright (c) 2005 David Gwynne <dlg@openbsd.org>
@@ -148,8 +148,6 @@ ses_match(struct device *parent, void *match, void *aux)
(inq->version & SID_ANSII) == SID_ANSII_SCSI3)
return (3);
- /* XXX apparently we can match on passthrough devs too? */
-
return (0);
}
@@ -399,8 +397,6 @@ ses_read_status(struct ses_softc *sc, int autoconf)
sizeof(cmd), sc->sc_buf, sc->sc_buflen, 2, 3000, NULL, flags) != 0)
return (1);
- /* XXX should we check any values in the status header? */
-
return (0);
}
@@ -607,7 +603,7 @@ ses_write_config(struct ses_softc *sc)
memset(&cmd, 0, sizeof(cmd));
cmd.opcode = SEND_DIAGNOSTIC;
- cmd.flags |= SES_DIAG_PCV;
+ cmd.flags |= SES_DIAG_PF;
cmd.length = htobe16(sc->sc_buflen);
flags = SCSI_DATA_OUT;
#ifndef SCSIDEBUG
@@ -624,10 +620,8 @@ ses_write_config(struct ses_softc *sc)
int
ses_bio_blink(struct ses_softc *sc, struct bioc_blink *blink)
{
-#if notyet
struct ses_slot *slot;
- /* XXX isnt strictly needed? */
if (ses_read_status(sc, 1) != 0)
return (EIO);
@@ -640,10 +634,11 @@ ses_bio_blink(struct ses_softc *sc, struct bioc_blink *blink)
return (EINVAL);
/* zero out the config fields */
- /* XXX previous config is lost */
slot->sl_stat->f2 = 0x00;
slot->sl_stat->f3 = 0x00;
+ slot->sl_stat->com = SES_STAT_SELECT;
+
switch (blink->bb_status) {
case BIOC_SBUNBLINK:
break;
@@ -662,7 +657,7 @@ ses_bio_blink(struct ses_softc *sc, struct bioc_blink *blink)
if (ses_write_config(sc) != 0)
return (EIO);
-#endif /* notyet */
+
return (0);
}
#endif