diff options
author | se <se@FreeBSD.org> | 1996-10-12 17:33:48 +0000 |
---|---|---|
committer | se <se@FreeBSD.org> | 1996-10-12 17:33:48 +0000 |
commit | 4551d22c6bdf98f05b918638fb4c3c9546e7ae25 (patch) | |
tree | 7c1d11cabb8768cb302791fb2ab10c65ece3e32a /sys | |
parent | bba6a15120372e3d04f14cec0157e229a6953825 (diff) | |
download | FreeBSD-src-4551d22c6bdf98f05b918638fb4c3c9546e7ae25.zip FreeBSD-src-4551d22c6bdf98f05b918638fb4c3c9546e7ae25.tar.gz |
Fix previous commit: The INB/OUTB macros require np->vaddr to be
initialized, or a kernel panic will occur.
Submitted by: Hidetoshi Shimokawa <simokawa@sat.t.u-tokyo.ac.jp>
Diffstat (limited to 'sys')
-rw-r--r-- | sys/pci/ncr.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/sys/pci/ncr.c b/sys/pci/ncr.c index 70f2280..c3fae46 100644 --- a/sys/pci/ncr.c +++ b/sys/pci/ncr.c @@ -1,6 +1,6 @@ /************************************************************************** ** -** $Id: ncr.c,v 1.79 1996/10/10 04:09:37 pst Exp $ +** $Id: ncr.c,v 1.80 1996/10/11 19:50:09 se Exp $ ** ** Device driver for the NCR 53C810 PCI-SCSI-Controller. ** @@ -1250,7 +1250,7 @@ static void ncr_attach (pcici_t tag, int unit); static char ident[] = - "\n$Id: ncr.c,v 1.79 1996/10/10 04:09:37 pst Exp $\n"; + "\n$Id: ncr.c,v 1.80 1996/10/11 19:50:09 se Exp $\n"; static const u_long ncr_version = NCR_VERSION * 11 + (u_long) sizeof (struct ncb) * 7 @@ -3286,6 +3286,14 @@ static void ncr_attach (pcici_t config_id, int unit) if (!pci_map_mem (config_id, 0x14, &np->vaddr, &np->paddr)) return; + /* + ** Make the controller's registers available. + ** Now the INB INW INL OUTB OUTW OUTL macros + ** can be used safely. + */ + + np->reg = (struct ncr_reg*) np->vaddr; + #ifdef NCR_IOMAPPED /* ** Try to map the controller chip into iospace. @@ -3342,14 +3350,6 @@ static void ncr_attach (pcici_t config_id, int unit) np->jump_tcb.l_paddr = NCB_SCRIPT_PHYS (np, abort); /* - ** Make the controller's registers available. - ** Now the INB INW INL OUTB OUTW OUTL macros - ** can be used safely. - */ - - np->reg = (struct ncr_reg*) np->vaddr; - - /* ** Get SCSI addr of host adapter (set by bios?). */ |