Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-6]: src/sys/dev/scsipi Pull up revision 1.53 (requested by bouy...
details: https://anonhg.NetBSD.org/src/rev/988a11d4bac2
branches: netbsd-1-6
changeset: 529225:988a11d4bac2
user: tron <tron%NetBSD.org@localhost>
date: Fri Nov 01 16:40:31 2002 +0000
description:
Pull up revision 1.53 (requested by bouyer in ticket #733):
Do PIO transfers for len < 4 bytes. From Matthias Drochner in private mail.
diffstat:
sys/dev/scsipi/atapi_wdc.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (30 lines):
diff -r f34356edc0d0 -r 988a11d4bac2 sys/dev/scsipi/atapi_wdc.c
--- a/sys/dev/scsipi/atapi_wdc.c Fri Nov 01 16:37:42 2002 +0000
+++ b/sys/dev/scsipi/atapi_wdc.c Fri Nov 01 16:40:31 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: atapi_wdc.c,v 1.52 2002/05/18 14:49:55 bouyer Exp $ */
+/* $NetBSD: atapi_wdc.c,v 1.52.2.1 2002/11/01 16:40:31 tron Exp $ */
/*
* Copyright (c) 1998, 2001 Manuel Bouyer.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: atapi_wdc.c,v 1.52 2002/05/18 14:49:55 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: atapi_wdc.c,v 1.52.2.1 2002/11/01 16:40:31 tron Exp $");
#ifndef WDCDEBUG
#define WDCDEBUG
@@ -368,8 +368,10 @@
* 2 bytes. It's a bug to request such transfers for ATAPI
* but as the request can come from userland, we have to
* protect against it.
+ * Also some devices seems to not handle DMA xfers of less than
+ * 4 bytes.
*/
- if (sc_xfer->datalen & 0x01)
+ if (sc_xfer->datalen < 4 || (sc_xfer->datalen & 0x01))
xfer->c_flags |= C_FORCEPIO;
xfer->cmd = sc_xfer;
Home |
Main Index |
Thread Index |
Old Index