Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb Apply De Morgan's law to the TD maximum transfer...
details: https://anonhg.NetBSD.org/src/rev/91b7635e4dea
branches: trunk
changeset: 351016:91b7635e4dea
user: skrll <skrll%NetBSD.org@localhost>
date: Mon Jan 30 21:32:39 2017 +0000
description:
Apply De Morgan's law to the TD maximum transfer length check logic and
wrap the long line
diffstat:
sys/dev/usb/ohci.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (28 lines):
diff -r 3c660d09262f -r 91b7635e4dea sys/dev/usb/ohci.c
--- a/sys/dev/usb/ohci.c Mon Jan 30 21:27:19 2017 +0000
+++ b/sys/dev/usb/ohci.c Mon Jan 30 21:32:39 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ohci.c,v 1.266 2017/01/30 21:27:19 skrll Exp $ */
+/* $NetBSD: ohci.c,v 1.267 2017/01/30 21:32:39 skrll Exp $ */
/*
* Copyright (c) 1998, 2004, 2005, 2012 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.266 2017/01/30 21:27:19 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.267 2017/01/30 21:32:39 skrll Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -632,7 +632,8 @@
* crossing per TD
*/
curlen = len;
- if (!(sphyspg == ephyspg || sphyspg + OHCI_PAGE_SIZE == ephyspg)) {
+ if (sphyspg != ephyspg &&
+ sphyspg + OHCI_PAGE_SIZE != ephyspg)) {
/* must use multiple TDs, fill as much as possible. */
curlen = 2 * OHCI_PAGE_SIZE -
(sdataphys & (OHCI_PAGE_SIZE - 1));
Home |
Main Index |
Thread Index |
Old Index