Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/scsipi Perform the exorcism on scsipi_mode_select() ...
details: https://anonhg.NetBSD.org/src/rev/b10773d105e7
branches: trunk
changeset: 551548:b10773d105e7
user: mycroft <mycroft%NetBSD.org@localhost>
date: Mon Sep 08 03:33:31 2003 +0000
description:
Perform the exorcism on scsipi_mode_select() too.
diffstat:
sys/dev/scsipi/scsipi_all.h | 14 +++-----------
sys/dev/scsipi/scsipi_base.c | 13 +++++++------
2 files changed, 10 insertions(+), 17 deletions(-)
diffs (65 lines):
diff -r 8fa5b2c1c801 -r b10773d105e7 sys/dev/scsipi/scsipi_all.h
--- a/sys/dev/scsipi/scsipi_all.h Mon Sep 08 03:24:12 2003 +0000
+++ b/sys/dev/scsipi/scsipi_all.h Mon Sep 08 03:33:31 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: scsipi_all.h,v 1.23 2003/09/08 03:24:12 mycroft Exp $ */
+/* $NetBSD: scsipi_all.h,v 1.24 2003/09/08 03:33:31 mycroft Exp $ */
/*
* SCSI and SCSI-like general interface description
@@ -104,16 +104,8 @@
u_int8_t byte2;
#define SMS_SP 0x01 /* save page */
#define SMS_PF 0x10 /* page format (0 = SCSI-1, 1 = SCSI-2) */
- u_int8_t unused;
- union {
- struct {
- u_int8_t unused;
- u_int8_t length;
- } scsi __attribute__((packed));
- struct {
- u_int8_t length[2];
- } atapi __attribute__((packed));
- } u_len;
+ u_int8_t unused[2];
+ u_int8_t length;
u_int8_t control;
} __attribute__((packed));
diff -r 8fa5b2c1c801 -r b10773d105e7 sys/dev/scsipi/scsipi_base.c
--- a/sys/dev/scsipi/scsipi_base.c Mon Sep 08 03:24:12 2003 +0000
+++ b/sys/dev/scsipi/scsipi_base.c Mon Sep 08 03:33:31 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: scsipi_base.c,v 1.89 2003/09/08 03:24:12 mycroft Exp $ */
+/* $NetBSD: scsipi_base.c,v 1.90 2003/09/08 03:33:32 mycroft Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2002 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: scsipi_base.c,v 1.89 2003/09/08 03:24:12 mycroft Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scsipi_base.c,v 1.90 2003/09/08 03:33:32 mycroft Exp $");
#include "opt_scsi.h"
@@ -1248,13 +1248,14 @@
struct scsipi_mode_select scsipi_cmd;
int error;
+#if 1
+ if (scsipi_periph_bustype(periph) == SCSIPI_BUSTYPE_ATAPI)
+ panic("scsipi_mode_select: what the Hell am I doing here?");
+#endif
memset(&scsipi_cmd, 0, sizeof(scsipi_cmd));
scsipi_cmd.opcode = MODE_SELECT;
scsipi_cmd.byte2 = byte2;
- if (scsipi_periph_bustype(periph) == SCSIPI_BUSTYPE_ATAPI)
- _lto2b(len, scsipi_cmd.u_len.atapi.length);
- else
- scsipi_cmd.u_len.scsi.length = len & 0xff;
+ scsipi_cmd.length = len & 0xff;
error = scsipi_command(periph, (struct scsipi_generic *)&scsipi_cmd,
sizeof(scsipi_cmd), (void *)data, len, retries, timeout, NULL,
flags | XS_CTL_DATA_OUT);
Home |
Main Index |
Thread Index |
Old Index