summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2007-02-19 11:55:05 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2007-02-19 11:55:05 +0000
commit54cbe2b43ba48d31607b50b708198380f960a8e1 (patch)
treea2a789d0881da3f44d65a60d2bbc77c7068efc94 /sys
parentd0788a6541abc4f2326c60e9a61b56ce013bf0c0 (diff)
REQUEST_SENSE will say there is no sense data.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ata/atascsi.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/sys/dev/ata/atascsi.c b/sys/dev/ata/atascsi.c
index e38f54a7d54..7d055dc1631 100644
--- a/sys/dev/ata/atascsi.c
+++ b/sys/dev/ata/atascsi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: atascsi.c,v 1.3 2007/02/19 11:53:34 dlg Exp $ */
+/* $OpenBSD: atascsi.c,v 1.4 2007/02/19 11:55:04 dlg Exp $ */
/*
* Copyright (c) 2007 David Gwynne <dlg@openbsd.org>
@@ -200,22 +200,37 @@ atascsi_disk_inq(struct scsi_xfer *xs)
{
return (atascsi_stuffup(xs));
}
+
int
atascsi_disk_sync(struct scsi_xfer *xs)
{
return (atascsi_stuffup(xs));
}
+
int
-atascsi_disk_sense(struct scsi_xfer *xs)
+atascsi_disk_capacity(struct scsi_xfer *xs)
{
return (atascsi_stuffup(xs));
}
+
int
-atascsi_disk_capacity(struct scsi_xfer *xs)
+atascsi_disk_sense(struct scsi_xfer *xs)
{
- return (atascsi_stuffup(xs));
+ struct scsi_sense_data *sd = xs->data;
+
+ bzero(xs->data, xs->datalen);
+ /* check datalen > sizeof(struct scsi_sense_data)? */
+ sd->error_code = 0x70; /* XXX magic */
+ sd->flags = SKEY_NO_SENSE;
+
+ xs->error = XS_NOERROR;
+ s = splbio();
+ scsi_done(xs);
+ splx(s);
+ return (COMPLETE);
}
+
int
atascsi_atapi_cmd(struct scsi_xfer *xs)
{