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

sys/arch/vax/vsa/vsbus.c: revision 1.69 (patch)
	sys/arch/vax/vsa/ncr.c: revision 1.52

Fix SCSI tranfer corruption on VAXstation 3100/m30 (KA420) on netboot.

See my post on port-vax@ for details:
 https://mail-index.netbsd.org/port-vax/2024/02/16/msg004866.html
and "go ahead!" from ragge@.
This commit is contained in:
martin 2024-02-19 09:02:16 +00:00
parent e385e82380
commit 6d21c99e81
2 changed files with 15 additions and 5 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ncr.c,v 1.49.4.1 2020/03/23 10:06:26 martin Exp $ */
/* $NetBSD: ncr.c,v 1.49.4.2 2024/02/19 09:02:16 martin Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ncr.c,v 1.49.4.1 2020/03/23 10:06:26 martin Exp $");
__KERNEL_RCSID(0, "$NetBSD: ncr.c,v 1.49.4.2 2024/02/19 09:02:16 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -67,6 +67,7 @@ __KERNEL_RCSID(0, "$NetBSD: ncr.c,v 1.49.4.1 2020/03/23 10:06:26 martin Exp $");
#include <machine/sid.h>
#include <machine/scb.h>
#include <machine/clock.h>
#include <machine/ka420.h>
#include "ioconf.h"
@ -209,6 +210,16 @@ si_vsbus_attach(device_t parent, device_t self, void *aux)
else
target = (clk_page[0xbc/2] >> tweak) & 7;
/*
* Explicitly enable upto 128KB "Big DMA" on KA420.
* (It looks KA420 firmware doesn't enable it on network boot)
*/
#define STC_MODE_OFF (KA420_STC_MODE - KA420_SCS_BASE)
if (vax_boardtype == VAX_BTYP_420) {
bus_space_write_1(ncr_sc->sc_regt, ncr_sc->sc_regh,
STC_MODE_OFF, 1);
}
aprint_normal("\n");
aprint_normal_dev(self, "NCR5380, SCSI ID %d\n", target);

View File

@ -1,4 +1,4 @@
/* $NetBSD: vsbus.c,v 1.65 2018/09/03 16:29:28 riastradh Exp $ */
/* $NetBSD: vsbus.c,v 1.65.4.1 2024/02/19 09:02:16 martin Exp $ */
/*
* Copyright (c) 1996, 1999 Ludd, University of Lule}, Sweden.
* All rights reserved.
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: vsbus.c,v 1.65 2018/09/03 16:29:28 riastradh Exp $");
__KERNEL_RCSID(0, "$NetBSD: vsbus.c,v 1.65.4.1 2024/02/19 09:02:16 martin Exp $");
#include "opt_cputype.h"
@ -146,7 +146,6 @@ vsbus_attach(device_t parent, device_t self, void *aux)
} else {
dbase = KA420_DMA_BASE;
dsize = KA420_DMA_SIZE;
*(char *)(sc->sc_vsregs + 0xe0) = 1; /* Big DMA */
}
sc->sc_dmasize = dsize;
sc->sc_dmaaddr = uvm_km_alloc(kernel_map, dsize, 0,