NetBSD-Bugs archive

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

Re: kern/54205: mvsata(4): buffer load failed: error=27



The following reply was made to PR kern/54205; it has been noted by GNATS.

From: =?UTF-8?B?SmFyb23DrXIgRG9sZcSNZWs=?= <jaromir.dolecek%gmail.com@localhost>
To: "gnats-bugs%NetBSD.org@localhost" <gnats-bugs%netbsd.org@localhost>
Cc: 
Subject: Re: kern/54205: mvsata(4): buffer load failed: error=27
Date: Tue, 14 May 2019 19:25:24 +0200

 Looks good, feel free to commit.
 
 Jaromir
 
 Le mar. 14 mai 2019 =C3=A0 15:05, Izumi Tsutsui <tsutsui%ceres.dti.ne.jp@localhost> a=
  =C3=A9crit :
 >
 > >Number:         54205
 > >Category:       kern
 > >Synopsis:       mvsata(4): buffer load failed: error=3D27
 > >Confidential:   no
 > >Severity:       critical
 > >Priority:       medium
 > >Responsible:    kern-bug-people
 > >State:          open
 > >Class:          sw-bug
 > >Submitter-Id:   net
 > >Arrival-Date:   Tue May 14 13:05:00 +0000 2019
 > >Originator:     Izumi Tsutsui
 > >Release:        NetBSD 8.0
 > >Organization:
 > >Environment:
 > System: NetBSD 8.0 (HPT5325) #13: Tue Apr 30 13:24:19 JST 2019
 >         tsutsui@mirage:/s/src/sys/arch/evbarm/compile/HPT5325
 > Architecture: earm
 > Machine: evbarm
 > >Description:
 > When I tried to dump(8) a file system on an SATA drive to backup,
 > it failed with the following mvsata(4) error messages:
 >
 > ---
 > mvsata0:0:1: buffer load failed: error=3D27wd1a: DMA error reading fsbn 1=
 28 of 128-255 (wd1 bn 1048704; cn 1040 tn 6 sn 6), retrying
 > mvsata0:0:1: buffer load failed: error=3D27wd1a: DMA error reading fsbn 1=
 28 of 128-255 (wd1 bn 1048704; cn 1040 tn 6 sn 6), retrying
 > mvsata0:0:1: buffer load failed: error=3D27wd1a: DMA error reading fsbn 1=
 28 of 128-255 (wd1 bn 1048704; cn 1040 tn 6 sn 6), retrying
 > mvsata0:0:1: buffer load failed: error=3D27wd1a: DMA error reading fsbn 1=
 28 of 128-255 (wd1 bn 1048704; cn 1040 tn 6 sn 6), retrying
 > wd1a: DMA error reading fsbn 128 of 128-255 (wd1 bn 1048704; cn 1040 tn 6=
  sn 6), retrying
 > ---
 >
 > error=3D27 is EFBIG, maybe from sys/arch/arm/arm32/bus_dma.c
 > bus_dmamap_load_paddr().
 >
 > >How-To-Repeat:
 > - newfs -b 16384 -f 4096 -i 8192 /dev/rwd1a
 >   on an sata drive on mvsata(4) on T5325 (or other Marvell SoC)
 > - extract NetBSD/evbarm 8.0 binary sets onto it
 > - dump 0f - /dev/rwd1a | (cd /mnt; restore xf -)
 >
 > >Fix:
 > In mvsata.c maxsegsz passed to bus_dmamap_create(9) for data DMA transfer=
 s
 > is "MAXPHYS / PAGE_SIZE", but maybe it should be "MAXPHYS / PAGE_SIZE + 1=
 "
 > for page unaligned transfers, as pciide_common.c etc. do.
 >
 > ---
 > Index: sys/dev/ic/mvsata.c
 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 > RCS file: /cvsroot/src/sys/dev/ic/mvsata.c,v
 > retrieving revision 1.35
 > diff -u -p -d -r1.35 mvsata.c
 > --- sys/dev/ic/mvsata.c 2 May 2016 19:18:29 -0000       1.35
 > +++ sys/dev/ic/mvsata.c 14 May 2019 12:58:57 -0000
 > @@ -103,7 +103,8 @@ int mvsata_debug =3D 2;
 >                                            sending a cmd */
 >  #define ATAPI_MODE_DELAY       1000    /* 1s, timeout for SET_FEATURE cm=
 ds */
 >
 > -#define MVSATA_EPRD_MAX_SIZE   (sizeof(struct eprd) * (MAXPHYS / PAGE_SI=
 ZE))
 > +#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 @@ mvsata_port_init(struct mvsata_hc *mvhc,
 >         }
 >         for (i =3D 0; i < MVSATA_EDMAQ_LEN; i++) {
 >                 rv =3D 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 !=3D 0) {
 >                         aprint_error("%s:%d:%d:"
 >
 > ---
 > Izumi Tsutsui
 >
 


Home | Main Index | Thread Index | Old Index