Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic Fix "mvsata:0:0:1: buffer load failed: error=27" ...
details: https://anonhg.NetBSD.org/src/rev/f9b691c6ac70
branches: trunk
changeset: 457407:f9b691c6ac70
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Sun Jun 23 06:29:22 2019 +0000
description:
Fix "mvsata:0:0:1: buffer load failed: error=27" failure. PR/54205
Ok'ed by jdolecek@.
Should be pulled up to netbsd-8.
diffstat:
sys/dev/ic/mvsata.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (37 lines):
diff -r e8e5a4a0be24 -r f9b691c6ac70 sys/dev/ic/mvsata.c
--- a/sys/dev/ic/mvsata.c Sun Jun 23 02:14:14 2019 +0000
+++ b/sys/dev/ic/mvsata.c Sun Jun 23 06:29:22 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mvsata.c,v 1.46 2018/11/12 20:54:03 jdolecek Exp $ */
+/* $NetBSD: mvsata.c,v 1.47 2019/06/23 06:29:22 tsutsui Exp $ */
/*
* Copyright (c) 2008 KIYOHARA Takashi
* All rights reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mvsata.c,v 1.46 2018/11/12 20:54:03 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mvsata.c,v 1.47 2019/06/23 06:29:22 tsutsui Exp $");
#include "opt_mvsata.h"
@@ -113,7 +113,8 @@
sending a cmd */
#define ATAPI_MODE_DELAY 1000 /* 1s, timeout for SET_FEATURE cmds */
-#define MVSATA_EPRD_MAX_SIZE (sizeof(struct eprd) * (MAXPHYS / PAGE_SIZE))
+#define MVSATA_MAX_SEGS (MAXPHYS / PAGE_SIZE + 1)
+#define MVSATA_EPRD_MAX_SIZE (sizeof(struct eprd) * MVSATA_MAX_SEGS)
static void mvsata_probe_drive(struct ata_channel *);
@@ -3110,7 +3111,7 @@
}
for (i = 0; i < MVSATA_EDMAQ_LEN; i++) {
rv = bus_dmamap_create(mvport->port_dmat, MAXPHYS,
- MAXPHYS / PAGE_SIZE, MAXPHYS, 0, BUS_DMA_NOWAIT,
+ MVSATA_MAX_SEGS, MAXPHYS, 0, BUS_DMA_NOWAIT,
&mvport->port_reqtbl[i].data_dmamap);
if (rv != 0) {
aprint_error("%s:%d:%d:"
Home |
Main Index |
Thread Index |
Old Index