diff options
author | se <se@FreeBSD.org> | 1995-09-11 12:10:19 +0000 |
---|---|---|
committer | se <se@FreeBSD.org> | 1995-09-11 12:10:19 +0000 |
commit | 1b15405165baa6d27d795f8a4afc3d7f6e9288a1 (patch) | |
tree | 91203b8f02895cd417eee598c516eff1ab746f88 | |
parent | 0b188ff7251225bef2d5a6f7a9158c003cfefebe (diff) | |
download | FreeBSD-src-1b15405165baa6d27d795f8a4afc3d7f6e9288a1.zip FreeBSD-src-1b15405165baa6d27d795f8a4afc3d7f6e9288a1.tar.gz |
Put back p_script component into NCR control block.
The driver currently doesn't use it, but ncrcontrol needs it
to print some script addresses relative to the script start.
-rw-r--r-- | sys/pci/ncr.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/sys/pci/ncr.c b/sys/pci/ncr.c index fa99be7..4854548 100644 --- a/sys/pci/ncr.c +++ b/sys/pci/ncr.c @@ -1,6 +1,6 @@ /************************************************************************** ** -** $Id: ncr.c,v 1.45 1995/09/08 14:29:48 se Exp $ +** $Id: ncr.c,v 1.46 1995/09/08 19:30:11 se Exp $ ** ** Device driver for the NCR 53C810 PCI-SCSI-Controller. ** @@ -977,6 +977,7 @@ struct ncb { ** A copy of the script, relocated for this ncb. */ struct script *script; + u_long p_script; /* ** The SCSI address of the host adapter. @@ -1258,7 +1259,7 @@ static void ncr_attach (pcici_t tag, int unit); static char ident[] = - "\n$Id: ncr.c,v 1.45 1995/09/08 14:29:48 se Exp $\n"; + "\n$Id: ncr.c,v 1.46 1995/09/08 19:30:11 se Exp $\n"; u_long ncr_version = NCR_VERSION * 11 + (u_long) sizeof (struct ncb) * 7 @@ -2982,8 +2983,15 @@ static void ncr_script_copy_and_bind (struct script *script, ncb_p np) ncrcmd *src, *dst, *start, *end; int relocs; +#ifndef __NetBSD__ np->script = (struct script*) vm_page_alloc_contig (round_page(sizeof (struct script)), 0x100000, 0xffffffff, PAGE_SIZE); +#else /* !__NetBSD___ */ + np->script = (struct script *) + malloc (sizeof (struct script), M_DEVBUF, M_WAITOK); +#endif /* __NetBSD__ */ + + np->p_script = vtophys(np->script); src = script->start; dst = np->script->start; @@ -3429,11 +3437,11 @@ static void ncr_attach (pcici_t config_id, int unit) #else /* !__NetBSD__ */ np->sc_link.adapter_unit = unit; np->sc_link.adapter_targ = np->myaddr; + np->sc_link.fordriver = 0; #endif /* !__NetBSD__ */ np->sc_link.adapter = &ncr_switch; np->sc_link.device = &ncr_dev; np->sc_link.flags = 0; - np->sc_link.fordriver = 0; #ifdef __NetBSD__ config_found(self, &np->sc_link, ncr_print); |