Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-8]: src/sys/dev/ic Pull up following revision(s) (requested by ts...



details:   https://anonhg.NetBSD.org/src/rev/0ca56856adc9
branches:  netbsd-8
changeset: 452371:0ca56856adc9
user:      martin <martin%NetBSD.org@localhost>
date:      Sun Jun 30 19:00:10 2019 +0000

description:
Pull up following revision(s) (requested by tsutsui in ticket #1283):

        sys/dev/ic/mvsata.c: revision 1.47
        sys/dev/ic/mvsata.c: revision 1.48

Fix "mvsata:0:0:1: buffer load failed: error=27" failure.  PR/54205
Ok'ed by jdolecek@.
Should be pulled up to netbsd-8.

Add a missing newline in an error message.  Noticed in PR/54205

diffstat:

 sys/dev/ic/mvsata.c |  11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diffs (46 lines):

diff -r 0d4f0b2b157c -r 0ca56856adc9 sys/dev/ic/mvsata.c
--- a/sys/dev/ic/mvsata.c       Thu Jun 27 13:18:28 2019 +0000
+++ b/sys/dev/ic/mvsata.c       Sun Jun 30 19:00:10 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mvsata.c,v 1.35 2016/05/02 19:18:29 christos Exp $     */
+/*     $NetBSD: mvsata.c,v 1.35.10.1 2019/06/30 19:00:10 martin 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.35 2016/05/02 19:18:29 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mvsata.c,v 1.35.10.1 2019/06/30 19:00:10 martin Exp $");
 
 #include "opt_mvsata.h"
 
@@ -103,7 +103,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 *);
@@ -2918,7 +2919,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:"
@@ -3125,7 +3126,7 @@
        rv = bus_dmamap_load(mvport->port_dmat, data_dmamap, databuf, datalen,
            NULL, BUS_DMA_NOWAIT | lop);
        if (rv) {
-               aprint_error("%s:%d:%d: buffer load failed: error=%d",
+               aprint_error("%s:%d:%d: buffer load failed: error=%d\n",
                    device_xname(MVSATA_DEV2(mvport)), mvport->port_hc->hc,
                    mvport->port, rv);
                return rv;



Home | Main Index | Thread Index | Old Index