Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb in alloc_sqtd_chain(), deal with the case where ...
details: https://anonhg.NetBSD.org/src/rev/c72539214725
branches: trunk
changeset: 764405:c72539214725
user: drochner <drochner%NetBSD.org@localhost>
date: Wed Apr 20 09:32:43 2011 +0000
description:
in alloc_sqtd_chain(), deal with the case where a data packet ends
exactly at a page boundary, and the FORCE_SHORT_XFER was set by the
client (which causes that an empty descriptor is needed to terminate
the transfer), from Gordon McNutt per PR kern/44883
(fixed a bit differently than the proposed patch for aesthetical
reasons -- avoids the page pointer to come into unexpexted area earlier)
diffstat:
sys/dev/usb/ehci.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (28 lines):
diff -r 71b05e21c7cb -r c72539214725 sys/dev/usb/ehci.c
--- a/sys/dev/usb/ehci.c Wed Apr 20 08:36:07 2011 +0000
+++ b/sys/dev/usb/ehci.c Wed Apr 20 09:32:43 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ehci.c,v 1.173 2011/01/18 15:05:03 jmcneill Exp $ */
+/* $NetBSD: ehci.c,v 1.174 2011/04/20 09:32:43 drochner Exp $ */
/*
* Copyright (c) 2004-2008 The NetBSD Foundation, Inc.
@@ -52,7 +52,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.173 2011/01/18 15:05:03 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.174 2011/04/20 09:32:43 drochner Exp $");
#include "ohci.h"
#include "uhci.h"
@@ -2750,7 +2750,8 @@
usb_syncmem(&cur->dma, cur->offs, sizeof(cur->qtd),
BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD);
DPRINTFN(10,("ehci_alloc_sqtd_chain: extend chain\n"));
- dataphys += curlen;
+ if (len)
+ dataphys += curlen;
cur = next;
}
cur->qtd.qtd_status |= htole32(EHCI_QTD_IOC);
Home |
Main Index |
Thread Index |
Old Index