summaryrefslogtreecommitdiff
path: root/sys/scsi
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2008-06-02 15:44:00 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2008-06-02 15:44:00 +0000
commit43875e0365db377cdc1cc52777605c4afb96f362 (patch)
tree7232d1e0a50831d6209cdb4af4f2f786c62e8af2 /sys/scsi
parent515a82b7166b924e809b94458934945f348669c8 (diff)
Shrink scsi_mode_sense_buf to 254 bytes so ahci doesn't get upset at
trying to dma-map odd length data areas. No other alignment should be required according to miod@. Makes my new SATA tape drive work. ok deraadt@
Diffstat (limited to 'sys/scsi')
-rw-r--r--sys/scsi/scsi_all.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/scsi/scsi_all.h b/sys/scsi/scsi_all.h
index 21c34501178..7d0395ec251 100644
--- a/sys/scsi/scsi_all.h
+++ b/sys/scsi/scsi_all.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: scsi_all.h,v 1.45 2008/04/10 13:18:07 dlg Exp $ */
+/* $OpenBSD: scsi_all.h,v 1.46 2008/06/02 15:43:59 krw Exp $ */
/* $NetBSD: scsi_all.h,v 1.10 1996/09/12 01:57:17 thorpej Exp $ */
/*
@@ -435,8 +435,10 @@ struct scsi_mode_header_big {
union scsi_mode_sense_buf {
struct scsi_mode_header hdr;
struct scsi_mode_header_big hdr_big;
- u_char buf[255]; /* 256 bytes breaks some devices. */
-} __packed; /* Ensure sizeof() is 255! */
+ u_char buf[254]; /* 255 & 256 bytes breaks some devices. */
+ /* ahci doesn't like 255, various don't like */
+ /* 256 because length must fit in 8 bits. */
+} __packed; /* Ensure sizeof() is 254! */
struct scsi_report_luns_data {
u_int8_t length[4]; /* length of LUN inventory, in bytes */