NetBSD Problem Report #49517
From martin@aprisoft.de Tue Dec 30 21:08:00 2014
Return-Path: <martin@aprisoft.de>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id A4282A5B2E
for <gnats-bugs@gnats.NetBSD.org>; Tue, 30 Dec 2014 21:08:00 +0000 (UTC)
Message-Id: <20141230210720.7F784ED0E4F@emmas.aprisoft.de>
Date: Tue, 30 Dec 2014 22:07:20 +0100 (CET)
From: martin@NetBSD.org
Reply-To: martin@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: si driver has DMA problems
X-Send-Pr-Version: 3.95
>Number: 49517
>Category: port-vax
>Synopsis: si driver has DMA problems
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: port-vax-maintainer
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Dec 30 21:10:00 +0000 2014
>Closed-Date: Thu Apr 12 18:48:56 +0000 2018
>Last-Modified: Fri Apr 13 06:30:01 +0000 2018
>Originator: Martin Husemann
>Release: NetBSD 7.99.2
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD 7.99.3 NetBSD 7.99.3 (GENERIC) #8: Tue Dec 30 19:18:41 CET 2014 martin@seven-days-to-the-wolves.aprisoft.de:/usr/obj/vax/usr/src/sys/arch/vax/compile/GENERIC vax
Architecture: vax
Machine: vax
>Description:
The NCR5380 driver seems to corrupt kernel memory on incoming (i.e. read)
transfers basically imediately. Random things happen (programs die, ...)
after a few transfers.
Forcing all IN operations to do PIO makes the system pretty much stable:
Index: ncr.c
===================================================================
RCS file: /cvsroot/src/sys/arch/vax/vsa/ncr.c,v
retrieving revision 1.48
diff -u -r1.48 ncr.c
--- ncr.c 14 Dec 2010 23:31:16 -0000 1.48
+++ ncr.c 30 Dec 2014 21:01:29 -0000
@@ -254,6 +254,9 @@
if (sr->sr_flags & SR_IMMED)
return;
+ if (!(xs->xs_control & XS_CTL_DATA_OUT))
+ return;
+
xlen = ncr_sc->sc_datalen;
/* Make sure our caller checked sc_min_dma_len. */
>How-To-Repeat:
Try to install on a MicroVax 3100 to a scsi disk.
>Fix:
n/a
>Release-Note:
>Audit-Trail:
From: David Brownlee <abs@absd.org>
To: "gnats-bugs@netbsd.org" <gnats-bugs@netbsd.org>
Cc: port-vax-maintainer@netbsd.org,
"gnats-admin@netbsd.org" <gnats-admin@netbsd.org>, netbsd-bugs@netbsd.org,
port-vax List <port-vax@netbsd.org>
Subject: Re: port-vax/49517: si driver has DMA problems
Date: Tue, 20 Jan 2015 16:28:05 +0000
Just a random thought, could this is be related to trying a MAXPHYS
(64K) sized transfer? I seem to recall something related to the vax
NCR5380 having a less than 64K max transfer size limit...
On 30 December 2014 at 21:10, <martin@netbsd.org> wrote:
>>Number: 49517
>>Category: port-vax
>>Synopsis: si driver has DMA problems
>>Confidential: no
>>Severity: serious
>>Priority: medium
>>Responsible: port-vax-maintainer
>>State: open
>>Class: sw-bug
>>Submitter-Id: net
>>Arrival-Date: Tue Dec 30 21:10:00 +0000 2014
>>Originator: Martin Husemann
>>Release: NetBSD 7.99.2
>>Organization:
> The NetBSD Foundation, Inc.
>>Environment:
> System: NetBSD 7.99.3 NetBSD 7.99.3 (GENERIC) #8: Tue Dec 30 19:18:41 CET 2014 martin@seven-days-to-the-wolves.aprisoft.de:/usr/obj/vax/usr/src/sys/arch/vax/compile/GENERIC vax
> Architecture: vax
> Machine: vax
>>Description:
>
> The NCR5380 driver seems to corrupt kernel memory on incoming (i.e. read)
> transfers basically imediately. Random things happen (programs die, ...)
> after a few transfers.
>
> Forcing all IN operations to do PIO makes the system pretty much stable:
>
> Index: ncr.c
> ===================================================================
> RCS file: /cvsroot/src/sys/arch/vax/vsa/ncr.c,v
> retrieving revision 1.48
> diff -u -r1.48 ncr.c
> --- ncr.c 14 Dec 2010 23:31:16 -0000 1.48
> +++ ncr.c 30 Dec 2014 21:01:29 -0000
> @@ -254,6 +254,9 @@
> if (sr->sr_flags & SR_IMMED)
> return;
>
> + if (!(xs->xs_control & XS_CTL_DATA_OUT))
> + return;
> +
> xlen = ncr_sc->sc_datalen;
>
> /* Make sure our caller checked sc_min_dma_len. */
>
>
>>How-To-Repeat:
>
> Try to install on a MicroVax 3100 to a scsi disk.
>
>>Fix:
> n/a
>
From: Anders Magnusson <ragge@ludd.ltu.se>
To: gnats-bugs@NetBSD.org, port-vax-maintainer@NetBSD.org,
gnats-admin@NetBSD.org, netbsd-bugs@NetBSD.org, martin@NetBSD.org
Cc:
Subject: Re: port-vax/49517: si driver has DMA problems
Date: Tue, 20 Jan 2015 20:19:54 +0100
That depends on the hardware. A VS2K for example have 16k.
The MV3100 has 128k DMA space. It is actually a separate block of memory
(not in normal RAM) from where the data later must be copied to its
destination.
David Brownlee skrev den 2015-01-20 17:30:
> The following reply was made to PR port-vax/49517; it has been noted by GNATS.
>
> From: David Brownlee <abs@absd.org>
> To: "gnats-bugs@netbsd.org" <gnats-bugs@netbsd.org>
> Cc: port-vax-maintainer@netbsd.org,
> "gnats-admin@netbsd.org" <gnats-admin@netbsd.org>, netbsd-bugs@netbsd.org,
> port-vax List <port-vax@netbsd.org>
> Subject: Re: port-vax/49517: si driver has DMA problems
> Date: Tue, 20 Jan 2015 16:28:05 +0000
>
> Just a random thought, could this is be related to trying a MAXPHYS
> (64K) sized transfer? I seem to recall something related to the vax
> NCR5380 having a less than 64K max transfer size limit...
>
> On 30 December 2014 at 21:10, <martin@netbsd.org> wrote:
> >>Number: 49517
> >>Category: port-vax
> >>Synopsis: si driver has DMA problems
> >>Confidential: no
> >>Severity: serious
> >>Priority: medium
> >>Responsible: port-vax-maintainer
> >>State: open
> >>Class: sw-bug
> >>Submitter-Id: net
> >>Arrival-Date: Tue Dec 30 21:10:00 +0000 2014
> >>Originator: Martin Husemann
> >>Release: NetBSD 7.99.2
> >>Organization:
> > The NetBSD Foundation, Inc.
> >>Environment:
> > System: NetBSD 7.99.3 NetBSD 7.99.3 (GENERIC) #8: Tue Dec 30 19:18:41 CET 2014 martin@seven-days-to-the-wolves.aprisoft.de:/usr/obj/vax/usr/src/sys/arch/vax/compile/GENERIC vax
> > Architecture: vax
> > Machine: vax
> >>Description:
> >
> > The NCR5380 driver seems to corrupt kernel memory on incoming (i.e. read)
> > transfers basically imediately. Random things happen (programs die, ...)
> > after a few transfers.
> >
> > Forcing all IN operations to do PIO makes the system pretty much stable:
> >
> > Index: ncr.c
> > ===================================================================
> > RCS file: /cvsroot/src/sys/arch/vax/vsa/ncr.c,v
> > retrieving revision 1.48
> > diff -u -r1.48 ncr.c
> > --- ncr.c 14 Dec 2010 23:31:16 -0000 1.48
> > +++ ncr.c 30 Dec 2014 21:01:29 -0000
> > @@ -254,6 +254,9 @@
> > if (sr->sr_flags & SR_IMMED)
> > return;
> >
> > + if (!(xs->xs_control & XS_CTL_DATA_OUT))
> > + return;
> > +
> > xlen = ncr_sc->sc_datalen;
> >
> > /* Make sure our caller checked sc_min_dma_len. */
> >
> >
> >>How-To-Repeat:
> >
> > Try to install on a MicroVax 3100 to a scsi disk.
> >
> >>Fix:
> > n/a
> >
>
State-Changed-From-To: open->closed
State-Changed-By: ragge@NetBSD.org
State-Changed-When: Thu, 12 Apr 2018 18:48:56 +0000
State-Changed-Why:
Fixed now. It was an intermix between hardware and logical page sizes.
From: "Anders Magnusson" <ragge@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/49517 CVS commit: src/sys/arch/vax/vsa
Date: Thu, 12 Apr 2018 18:45:57 +0000
Module Name: src
Committed By: ragge
Date: Thu Apr 12 18:45:57 UTC 2018
Modified Files:
src/sys/arch/vax/vsa: vsbus.c
Log Message:
Fix bug causing DMA to/from user space fail. Fixes PR#49517.
This bug has been around since 2003.
Thanks to Martin Husemann for providing hardware to debug on!
To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/sys/arch/vax/vsa/vsbus.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: PR/49517 CVS commit: src/sys/arch/vax/vsa
Date: Fri, 13 Apr 2018 08:28:05 +0200
On Thu, Apr 12, 2018 at 06:50:01PM +0000, Anders Magnusson wrote:
> Thanks to Martin Husemann for providing hardware to debug on!
Actually the hardware was provided by Holm Tiffe. Thanks!
Martin
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.