incorporate changes from 0-9-base to 0-9-ALPHA
This commit is contained in:
parent
cbdb50c1c1
commit
7b2afa7fe6
@ -1,7 +1,7 @@
|
||||
#
|
||||
# BOAT_ANCHOR -- kernel for the 386-20 the gang uses for testing
|
||||
#
|
||||
# $Id: BOAT_ANCHOR,v 1.20 1993/07/18 13:09:19 cgd Exp $
|
||||
# $Id: BOAT_ANCHOR,v 1.21 1993/07/28 02:20:34 cgd Exp $
|
||||
#
|
||||
machine "i386"
|
||||
cpu "I386_CPU"
|
||||
@ -39,8 +39,7 @@ device npx0 at isa? port "IO_NPX" irq 13 vector npxintr
|
||||
|
||||
device com0 at isa? port "IO_COM1" tty irq 4 vector comintr
|
||||
|
||||
device we0 at isa? port 0x280 net irq 9 iomem 0xd0000 iosiz 8192 vector weintr
|
||||
device ed0 at isa? port 0x300 net irq 10 iomem 0xd0000 vector edintr
|
||||
device ed0 at isa? port 0x280 net irq 9 iomem 0xd0000 vector edintr
|
||||
|
||||
pseudo-device loop
|
||||
pseudo-device ether
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# GENERICISA -- Generic ISA machine -- distribution floppy
|
||||
#
|
||||
# $Id: GENERICAHA,v 1.20 1993/07/11 09:03:23 cgd Exp $
|
||||
# $Id: GENERICAHA,v 1.21 1993/07/28 02:20:38 cgd Exp $
|
||||
#
|
||||
|
||||
machine "i386"
|
||||
@ -62,9 +62,10 @@ device lpt0 at isa? port "IO_LPT3" tty irq 7 vector lptintr
|
||||
device lpa0 at isa? port "IO_LPT1" tty
|
||||
device lpa1 at isa? port "IO_LPT2" tty
|
||||
|
||||
device we0 at isa? port 0x280 net irq 9 iomem 0xd0000 iosiz 8192 vector weintr
|
||||
device ed0 at isa? port 0x280 net irq 9 iomem 0xd0000 vector edintr
|
||||
#device we0 at isa? port 0x280 net irq 9 iomem 0xd0000 iosiz 8192 vector weintr
|
||||
#device ec0 at isa? port 0x250 net irq 9 iomem 0xd8000 iosiz 8192 vector ecintr
|
||||
device ne0 at isa? port 0x300 net irq 9 vector neintr
|
||||
device ec0 at isa? port 0x250 net irq 9 iomem 0xd8000 iosiz 8192 vector ecintr
|
||||
device is0 at isa? port 0x320 net irq 10 drq 7 vector isintr
|
||||
|
||||
device wt0 at isa? port 0x300 bio irq 5 drq 1 vector wtintr
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# GENERICISA -- Generic ISA machine with aha1742 -- distribution floppy
|
||||
#
|
||||
# $Id: GENERICAHBBT,v 1.16 1993/07/11 09:03:13 cgd Exp $
|
||||
# $Id: GENERICAHBBT,v 1.17 1993/07/28 02:20:42 cgd Exp $
|
||||
#
|
||||
|
||||
machine "i386"
|
||||
@ -71,9 +71,10 @@ device lpt0 at isa? port "IO_LPT3" tty irq 7 vector lptintr
|
||||
device lpa0 at isa? port "IO_LPT1" tty
|
||||
device lpa1 at isa? port "IO_LPT2" tty
|
||||
|
||||
device we0 at isa? port 0x280 net irq 9 iomem 0xd0000 iosiz 8192 vector weintr
|
||||
device ed0 at isa? port 0x280 net irq 9 iomem 0xd0000 vector edintr
|
||||
#device we0 at isa? port 0x280 net irq 9 iomem 0xd0000 iosiz 8192 vector weintr
|
||||
#device ec0 at isa? port 0x250 net irq 9 iomem 0xd8000 iosiz 8192 vector ecintr
|
||||
device ne0 at isa? port 0x300 net irq 9 vector neintr
|
||||
device ec0 at isa? port 0x250 net irq 9 iomem 0xd8000 iosiz 8192 vector ecintr
|
||||
device is0 at isa? port 0x320 net irq 10 drq 7 vector isintr
|
||||
|
||||
device wt0 at isa? port 0x300 bio irq 5 drq 1 vector wtintr
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# PAIN -- kernel for another of cgd's 486/50 EISA boxes...
|
||||
#
|
||||
# $Id: PAIN,v 1.9 1993/07/18 13:09:26 cgd Exp $
|
||||
# $Id: PAIN,v 1.10 1993/07/28 02:20:45 cgd Exp $
|
||||
#
|
||||
machine "i386"
|
||||
cpu "I486_CPU"
|
||||
@ -15,6 +15,7 @@ options UCONSOLE, XSERVER
|
||||
options "DUMMY_NOPS"
|
||||
options FDESC,KERNFS
|
||||
options KTRACE
|
||||
options ACCOUNTING
|
||||
options SCSI
|
||||
options "COMPAT_NOMID"
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# SUN_LAMP -- kernel for one of cgd's 486/50 EISA boxes...
|
||||
#
|
||||
# $Id: SUN_LAMP,v 1.23 1993/07/18 13:09:31 cgd Exp $
|
||||
# $Id: SUN_LAMP,v 1.24 1993/07/28 02:20:48 cgd Exp $
|
||||
#
|
||||
machine "i386"
|
||||
cpu "I486_CPU"
|
||||
@ -21,7 +21,7 @@ options "COMPAT_NOMID"
|
||||
options DDB
|
||||
options "SYMTAB_SPACE=72000"
|
||||
|
||||
config netbsd root on sd0 swap on sd0
|
||||
config netbsd root on sd0 swap on sd0 and sd1 and sd2
|
||||
|
||||
controller isa0
|
||||
controller fdc0 at isa? port "IO_FD1" bio irq 6 drq 2 vector fdintr
|
||||
|
@ -12,7 +12,7 @@
|
||||
* on the understanding that TFS is not responsible for the correct
|
||||
* functioning of this software in any circumstances.
|
||||
*
|
||||
* $Id: aha1742.c,v 1.13 1993/07/17 16:20:24 mycroft Exp $
|
||||
* $Id: aha1742.c,v 1.14 1993/07/28 02:21:11 cgd Exp $
|
||||
*/
|
||||
|
||||
#include "ahb.h"
|
||||
@ -1016,12 +1016,10 @@ cheat = ecb;
|
||||
ahb_free_ecb(unit,ecb,flags);
|
||||
}
|
||||
xs->error = XS_DRIVER_STUFFUP;
|
||||
splx(s);
|
||||
return(HAD_ERROR);
|
||||
}
|
||||
} while (!(xs->flags & ITSDONE));
|
||||
|
||||
splx(s);
|
||||
scsi_debug = 0;
|
||||
ahb_debug = 0;
|
||||
if(xs->error)
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)trap.c 7.4 (Berkeley) 5/13/91
|
||||
* $Id: trap.c,v 1.11 1993/07/12 13:53:36 mycroft Exp $
|
||||
* $Id: trap.c,v 1.12 1993/07/28 02:20:59 cgd Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -173,7 +173,13 @@ copyfault:
|
||||
#endif
|
||||
#ifdef MATH_EMULATE
|
||||
i = math_emulate(&frame);
|
||||
if (i == 0) return;
|
||||
if (i == 0) {
|
||||
#ifdef TRACE_EMU /* XXX is this necessary? */
|
||||
if (frame.tf_eflags & PSL_T)
|
||||
goto trace;
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
#else
|
||||
panic("trap: math emulation necessary!");
|
||||
#endif
|
||||
@ -264,7 +270,9 @@ copyfault:
|
||||
#endif
|
||||
|
||||
nss = 0;
|
||||
if ((caddr_t)va >= vm->vm_maxsaddr && map != kernel_map) {
|
||||
if ((caddr_t)va >= vm->vm_maxsaddr
|
||||
&& (caddr_t)va < VM_MAXUSER_ADDRESS
|
||||
&& map != kernel_map) {
|
||||
nss = clrnd(btoc((unsigned)vm->vm_maxsaddr
|
||||
+ MAXSSIZ - (unsigned)va));
|
||||
if (nss > btoc(p->p_rlimit[RLIMIT_STACK].rlim_cur)) {
|
||||
@ -293,7 +301,7 @@ copyfault:
|
||||
va = trunc_page(vtopte(va));
|
||||
/* for page table, increment wiring
|
||||
as long as not a page table fault as well */
|
||||
if (!v && type != T_PAGEFLT)
|
||||
if (!v && map != kernel_map)
|
||||
vm_map_pageable(map, va, round_page(va+1), FALSE);
|
||||
if (type == T_PAGEFLT)
|
||||
return;
|
||||
@ -318,11 +326,13 @@ nogo:
|
||||
frame.tf_eflags &= ~PSL_T;
|
||||
|
||||
/* Q: how do we turn it on again? */
|
||||
/* A: it's saved in the PS */
|
||||
return;
|
||||
#endif
|
||||
|
||||
case T_BPTFLT|T_USER: /* bpt instruction fault */
|
||||
case T_TRCTRAP|T_USER: /* trace trap */
|
||||
trace:
|
||||
frame.tf_eflags &= ~PSL_T;
|
||||
i = SIGTRAP;
|
||||
break;
|
||||
|
@ -12,7 +12,7 @@
|
||||
* on the understanding that TFS is not responsible for the correct
|
||||
* functioning of this software in any circumstances.
|
||||
*
|
||||
* $Id: aha1742.c,v 1.13 1993/07/17 16:20:24 mycroft Exp $
|
||||
* $Id: aha1742.c,v 1.14 1993/07/28 02:21:11 cgd Exp $
|
||||
*/
|
||||
|
||||
#include "ahb.h"
|
||||
@ -1016,12 +1016,10 @@ cheat = ecb;
|
||||
ahb_free_ecb(unit,ecb,flags);
|
||||
}
|
||||
xs->error = XS_DRIVER_STUFFUP;
|
||||
splx(s);
|
||||
return(HAD_ERROR);
|
||||
}
|
||||
} while (!(xs->flags & ITSDONE));
|
||||
|
||||
splx(s);
|
||||
scsi_debug = 0;
|
||||
ahb_debug = 0;
|
||||
if(xs->error)
|
||||
|
@ -14,60 +14,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modification history
|
||||
*
|
||||
* $Log: if_ed.c,v $
|
||||
* Revision 1.2 1993/07/12 13:13:41 deraadt
|
||||
* moved bfdttach point to same place as other drivers, from greenman
|
||||
*
|
||||
* Revision 1.1 1993/07/03 12:19:45 cgd
|
||||
* add support for David Greenman's "ed" driver.
|
||||
*
|
||||
* Revision 1.12 93/07/07 06:27:44 davidg
|
||||
* moved call to bpfattach to after this drivers attach printf -
|
||||
* improves readability of startup messages.
|
||||
*
|
||||
* Revision 1.11 93/06/27 03:07:01 davidg
|
||||
* fixed bugs in the 3Com part of the probe routine that were uncovered by
|
||||
* the previous fix.
|
||||
*
|
||||
* Revision 1.10 93/06/25 19:23:19 davidg
|
||||
* fixed bug that caused erroneous 'Invalid irq configuration' message when
|
||||
* no board is present (during autoconfiguration).
|
||||
*
|
||||
* Revision 1.9 93/06/23 03:48:14 davidg
|
||||
* fixed minor typo introduced when cleaning up probe routine
|
||||
*
|
||||
* Revision 1.8 93/06/23 03:37:19 davidg
|
||||
* cleaned up/added some comments. Also improved readability of a part of
|
||||
* the probe routine.
|
||||
*
|
||||
* Revision 1.7 93/06/22 04:45:01 davidg
|
||||
* (no additional changes) Second beta release
|
||||
*
|
||||
* Revision 1.6 93/06/22 04:40:35 davidg
|
||||
* minor definition fix to ed_reset()
|
||||
*
|
||||
* Revision 1.5 93/06/22 04:37:39 davidg
|
||||
* fixed some comments
|
||||
*
|
||||
* Revision 1.4 93/06/22 04:34:34 davidg
|
||||
* added support to use the LLC0 'link-level control' flag
|
||||
* to disable the tranceiver for AUI operation on 3Com boards.
|
||||
* The default for this flag can be set in the kernel config
|
||||
* file - 'flags 0x01' sets the flag (disables the tranceiver).
|
||||
*
|
||||
* Revision 1.3 93/06/17 03:57:28 davidg
|
||||
* fixed some printf's
|
||||
*
|
||||
* Revision 1.2 93/06/17 03:26:49 davidg
|
||||
* fixed 3c503 code to determine 8/16bit board
|
||||
* changed attach printf to work with Interim-0.1.5 and NetBSD
|
||||
*
|
||||
* Revision 1.1 93/06/14 22:21:24 davidg
|
||||
* Beta release of device driver for SMC/WD80x3 and 3C503 ethernet boards.
|
||||
*
|
||||
*
|
||||
* $Id: if_ed.c,v 1.3 1993/07/28 02:21:17 cgd Exp $
|
||||
*/
|
||||
|
||||
#include "ed.h"
|
||||
@ -75,12 +22,13 @@
|
||||
#include "bpfilter.h"
|
||||
|
||||
#include "param.h"
|
||||
#include "systm.h"
|
||||
#include "select.h"
|
||||
#include "errno.h"
|
||||
#include "ioctl.h"
|
||||
#include "mbuf.h"
|
||||
#include "socket.h"
|
||||
#include "syslog.h"
|
||||
#include "select.h"
|
||||
|
||||
#include "net/if.h"
|
||||
#include "net/if_dl.h"
|
||||
@ -308,10 +256,25 @@ type_WD80x3:
|
||||
}
|
||||
|
||||
#if ED_DEBUG
|
||||
printf("type=%s width=%d memsize=%d\n",sc->type_str,memwidth,memsize);
|
||||
printf("type=%s memwidth=%d memsize=%d id_msize=%d\n",
|
||||
sc->type_str,memwidth,memsize,isa_dev->id_msize);
|
||||
for (i=0; i<8; i++)
|
||||
printf("%x -> %x\n", i, inb(sc->asic_addr + i));
|
||||
#endif
|
||||
/*
|
||||
* Allow the user to override the autoconfiguration
|
||||
*/
|
||||
if (isa_dev->id_msize)
|
||||
memsize = isa_dev->id_msize;
|
||||
/*
|
||||
* (note that if the user specifies both of the following flags
|
||||
* that '8bit' mode intentionally has precedence)
|
||||
*/
|
||||
if (isa_dev->id_flags & ED_FLAGS_FORCE_16BIT_MODE)
|
||||
memwidth = 16;
|
||||
if (isa_dev->id_flags & ED_FLAGS_FORCE_8BIT_MODE)
|
||||
memwidth = 8;
|
||||
|
||||
/*
|
||||
* Check 83C584 interrupt configuration register if this board has one
|
||||
* XXX - we could also check the IO address register. But why
|
||||
@ -343,7 +306,7 @@ type_WD80x3:
|
||||
/*
|
||||
* allocate one xmit buffer if < 16k, two buffers otherwise
|
||||
*/
|
||||
if (memsize < 16384) {
|
||||
if ((memsize < 16384) || (isa_dev->id_msize & ED_FLAGS_NO_DOUBLE_BUFFERING)) {
|
||||
sc->smem_ring = sc->smem_start + (ED_PAGE_SIZE * ED_TXBUF_SIZE);
|
||||
sc->txb_cnt = 1;
|
||||
sc->rec_page_start = ED_TXBUF_SIZE;
|
||||
@ -633,7 +596,7 @@ type_3Com:
|
||||
#if 0
|
||||
printf("Starting write\n");
|
||||
for (i = 0; i < 8192; ++i)
|
||||
bzerow(sc->smem_start, 8192);
|
||||
bzero(sc->smem_start, 8192);
|
||||
printf("Done.\n");
|
||||
#endif
|
||||
#if 0
|
||||
@ -789,10 +752,8 @@ ed_stop(unit)
|
||||
* to 'n' (about 5ms). It shouldn't even take 5us on modern
|
||||
* DS8390's, but just in case it's an old one.
|
||||
*/
|
||||
while ((inb(sc->nic_addr + ED_P0_ISR) & ED_ISR_RST) == 0) {
|
||||
if (--n == 0)
|
||||
break;
|
||||
}
|
||||
while (((inb(sc->nic_addr + ED_P0_ISR) & ED_ISR_RST) == 0) && --n);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
@ -941,10 +902,12 @@ ed_init(unit)
|
||||
* If this is a 3Com board, the tranceiver must be software enabled
|
||||
* (there is no settable hardware default).
|
||||
*/
|
||||
if ((sc->vendor == ED_VENDOR_3COM) && (ifp->if_flags & IFF_LLC0)) {
|
||||
outb(sc->asic_addr + ED_3COM_CR, 0);
|
||||
} else {
|
||||
outb(sc->asic_addr + ED_3COM_CR, ED_3COM_CR_XSEL);
|
||||
if (sc->vendor == ED_VENDOR_3COM) {
|
||||
if (ifp->if_flags & IFF_LLC0) {
|
||||
outb(sc->asic_addr + ED_3COM_CR, 0);
|
||||
} else {
|
||||
outb(sc->asic_addr + ED_3COM_CR, ED_3COM_CR_XSEL);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1447,13 +1410,24 @@ edintr(unit)
|
||||
}
|
||||
|
||||
/*
|
||||
* return NIC CR to standard state before looping back
|
||||
* to top: page 0, remote DMA complete, start
|
||||
* (toggling the TXP bit off, even if was just set in the
|
||||
* transmit routine, is *okay* - it is 'edge' triggered
|
||||
* from low to high)
|
||||
* return NIC CR to standard state: page 0, remote DMA complete,
|
||||
* start (toggling the TXP bit off, even if was just set
|
||||
* in the transmit routine, is *okay* - it is 'edge'
|
||||
* triggered from low to high)
|
||||
*/
|
||||
outb(sc->nic_addr + ED_P0_CR, ED_CR_RD2|ED_CR_STA);
|
||||
|
||||
/*
|
||||
* If the Network Talley Counters overflow, read them to
|
||||
* reset them. It appears that old 8390's won't
|
||||
* clear the ISR flag otherwise - resulting in an
|
||||
* infinite loop.
|
||||
*/
|
||||
if (isr & ED_ISR_CNT) {
|
||||
(void) inb(sc->nic_addr + ED_P0_CNTR0);
|
||||
(void) inb(sc->nic_addr + ED_P0_CNTR1);
|
||||
(void) inb(sc->nic_addr + ED_P0_CNTR2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1567,10 +1541,12 @@ ed_ioctl(ifp, command, data)
|
||||
* of the tranceiver for 3Com boards. The LLC0 flag disables
|
||||
* the tranceiver if set.
|
||||
*/
|
||||
if ((sc->vendor == ED_VENDOR_3COM) && (ifp->if_flags & IFF_LLC0)) {
|
||||
outb(sc->asic_addr + ED_3COM_CR, 0);
|
||||
} else {
|
||||
outb(sc->asic_addr + ED_3COM_CR, ED_3COM_CR_XSEL);
|
||||
if (sc->vendor == ED_VENDOR_3COM) {
|
||||
if (ifp->if_flags & IFF_LLC0) {
|
||||
outb(sc->asic_addr + ED_3COM_CR, 0);
|
||||
} else {
|
||||
outb(sc->asic_addr + ED_3COM_CR, ED_3COM_CR_XSEL);
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -1,16 +1,7 @@
|
||||
/*
|
||||
* National Semiconductor DS8390 NIC register definitions
|
||||
*
|
||||
* $Log: if_edreg.h,v $
|
||||
* Revision 1.1 1993/07/03 12:21:07 cgd
|
||||
* add support for David Greenman "ed" driver
|
||||
*
|
||||
* Revision 1.2 93/06/23 03:03:05 davidg
|
||||
* added some additional definitions for the 83C584 bus interface
|
||||
* chip (SMC/WD boards)
|
||||
*
|
||||
* Revision 1.1 93/06/23 03:01:07 davidg
|
||||
* Initial revision
|
||||
* $Id: if_edreg.h,v 1.2 1993/07/28 02:21:23 cgd Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -564,7 +555,19 @@ struct ed_ring {
|
||||
/*
|
||||
* this sets the default for enabling/disablng the tranceiver
|
||||
*/
|
||||
#define ED_FLAGS_DISABLE_TRANCEIVER 0x01
|
||||
#define ED_FLAGS_DISABLE_TRANCEIVER 0x01
|
||||
|
||||
/*
|
||||
* This forces the board to be used in 8/16bit mode even if it
|
||||
* autoconfigs differently
|
||||
*/
|
||||
#define ED_FLAGS_FORCE_8BIT_MODE 0x02
|
||||
#define ED_FLAGS_FORCE_16BIT_MODE 0x04
|
||||
|
||||
/*
|
||||
* This disables the use of double transmit buffers.
|
||||
*/
|
||||
#define ED_FLAGS_NO_DOUBLE_BUFFERING 0x08
|
||||
|
||||
/*
|
||||
* Definitions for Western digital/SMC WD80x3 series ASIC
|
||||
|
@ -206,10 +206,6 @@ int is_attach(isa_dev)
|
||||
|
||||
if_attach(ifp);
|
||||
|
||||
#if NBPFILTER > 0
|
||||
bpfattach(&is->bpf, ifp, DLT_EN10MB, sizeof(struct ether_header));
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Search down the ifa address list looking for the AF_LINK type
|
||||
entry
|
||||
@ -234,7 +230,12 @@ entry
|
||||
bcopy(is->arpcom.ac_enaddr, LLADDR(sdl), ETHER_ADDR_LEN);
|
||||
}
|
||||
|
||||
printf (" ethernet address %s", ether_sprintf(is->arpcom.ac_enaddr)) ;
|
||||
printf ("is%d: address %s\n", unit,
|
||||
ether_sprintf(is->arpcom.ac_enaddr)) ;
|
||||
|
||||
#if NBPFILTER > 0
|
||||
bpfattach(&is->bpf, ifp, DLT_EN10MB, sizeof(struct ether_header));
|
||||
#endif
|
||||
}
|
||||
|
||||
int
|
||||
@ -366,7 +367,7 @@ is_init(unit)
|
||||
is_start(ifp);
|
||||
}
|
||||
else
|
||||
printf("Isolink card failed to initialise\n");
|
||||
printf("is%d: card failed to initialise\n", unit);
|
||||
|
||||
(void) splx(s);
|
||||
}
|
||||
@ -518,29 +519,29 @@ isintr(unit)
|
||||
while((isr=isrdcsr(unit,0))&INTR) {
|
||||
if (isr&ERR) {
|
||||
if (isr&BABL){
|
||||
printf("is%d:BABL\n",unit);
|
||||
printf("is%d: BABL\n",unit);
|
||||
is->arpcom.ac_if.if_oerrors++;
|
||||
}
|
||||
if (isr&CERR) {
|
||||
printf("is%d:CERR\n",unit);
|
||||
printf("is%d: CERR\n",unit);
|
||||
is->arpcom.ac_if.if_collisions++;
|
||||
}
|
||||
if (isr&MISS) {
|
||||
printf("is%d:MISS\n",unit);
|
||||
printf("is%d: MISS\n",unit);
|
||||
is->arpcom.ac_if.if_ierrors++;
|
||||
}
|
||||
if (isr&MERR)
|
||||
printf("is%d:MERR\n",unit);
|
||||
printf("is%d: MERR\n",unit);
|
||||
iswrcsr(unit,0,BABL|CERR|MISS|MERR|INEA);
|
||||
}
|
||||
if (!(isr&RXON)) {
|
||||
printf("!(isr&RXON)\n");
|
||||
printf("is%d: !(isr&RXON)\n", unit);
|
||||
is->arpcom.ac_if.if_ierrors++;
|
||||
is_reset(unit);
|
||||
return(1);
|
||||
}
|
||||
if (!(isr&TXON)) {
|
||||
printf("!(isr&TXON)\n");
|
||||
printf("is%d: !(isr&TXON)\n", unit);
|
||||
is->arpcom.ac_if.if_oerrors++;
|
||||
is_reset(unit);
|
||||
return(1);
|
||||
@ -601,7 +602,7 @@ static inline void is_rint(int unit)
|
||||
/* Out of sync with hardware, should never happen */
|
||||
|
||||
if (cdm->flags & OWN) {
|
||||
printf("is%d error: out of sync\n",unit);
|
||||
printf("is%d: error: out of sync\n",unit);
|
||||
iswrcsr(unit,0,RINT|INEA);
|
||||
return;
|
||||
}
|
||||
@ -612,13 +613,13 @@ static inline void is_rint(int unit)
|
||||
iswrcsr(unit,0,RINT|INEA);
|
||||
if (cdm->flags&ERR) {
|
||||
if (cdm->flags&FRAM)
|
||||
printf("is%d:FRAM\n",unit);
|
||||
printf("is%d: FRAM\n",unit);
|
||||
if (cdm->flags&OFLO)
|
||||
printf("is%d:OFLO\n",unit);
|
||||
printf("is%d: OFLO\n",unit);
|
||||
if (cdm->flags&CRC)
|
||||
printf("is%d:CRC\n",unit);
|
||||
printf("is%d: CRC\n",unit);
|
||||
if (cdm->flags&RBUFF)
|
||||
printf("is%d:RBUFF\n",unit);
|
||||
printf("is%d: RBUFF\n",unit);
|
||||
}else
|
||||
if (cdm->flags&(STP|ENP) != (STP|ENP)) {
|
||||
do {
|
||||
@ -628,7 +629,7 @@ static inline void is_rint(int unit)
|
||||
NEXTRDS;
|
||||
}while (!(cdm->flags&(OWN|ERR|STP|ENP)));
|
||||
is->last_rd = rmd;
|
||||
printf("is%d:Chained buffer\n",unit);
|
||||
printf("is%d: Chained buffer\n",unit);
|
||||
if ((cdm->flags & (OWN|ERR|STP|ENP)) != ENP) {
|
||||
is_reset(unit);
|
||||
return;
|
||||
@ -692,6 +693,7 @@ isread(struct is_softc *is, unsigned char *buf, int len)
|
||||
* information to be at the front, but we still have to drop
|
||||
* the type and length which are at the front of any trailer data.
|
||||
*/
|
||||
is->arpcom.ac_if.if_ipackets++;
|
||||
m = isget(buf, len, off, &is->arpcom.ac_if);
|
||||
if (m == 0) return;
|
||||
#if NBPFILTER > 0
|
||||
@ -926,15 +928,21 @@ recv_print(unit,no)
|
||||
{
|
||||
register struct is_softc *is=&is_softc[unit];
|
||||
struct mds *rmd;
|
||||
int len,i;
|
||||
int len,i,printed=0;
|
||||
|
||||
rmd = (is->rd+no);
|
||||
len = rmd->mcnt;
|
||||
printf("is%d: Receive buffer %d, len = %d\n",unit,no,len);
|
||||
printf("is%d: Status %x\n",unit,isrdcsr(unit,0));
|
||||
for (i=0; i<len; i++)
|
||||
for (i=0; i<len; i++) {
|
||||
if (!printed) {
|
||||
printed=1;
|
||||
printf("is%d: data: ", unit);
|
||||
}
|
||||
printf("%x ",*(is->rbuf+(BUFSIZE*no)+i));
|
||||
printf("\n");
|
||||
}
|
||||
if (printed)
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
xmit_print(unit,no)
|
||||
@ -942,18 +950,24 @@ xmit_print(unit,no)
|
||||
{
|
||||
register struct is_softc *is=&is_softc[unit];
|
||||
struct mds *rmd;
|
||||
int i;
|
||||
int i, printed=0;
|
||||
u_short len;
|
||||
|
||||
rmd = (is->td+no);
|
||||
len = -(rmd->bcnt);
|
||||
printf("is%d:Transmit buffer %d, len = %d\n",unit,no,len);
|
||||
printf("is%d:Status %x\n",unit,isrdcsr(unit,0));
|
||||
printf("addr %x, flags %x, bcnt %x, mcnt %x\n",
|
||||
rmd->addr,rmd->flags,rmd->bcnt,rmd->mcnt);
|
||||
for (i=0; i<len; i++)
|
||||
printf("is%d: Transmit buffer %d, len = %d\n",unit,no,len);
|
||||
printf("is%d: Status %x\n",unit,isrdcsr(unit,0));
|
||||
printf("is%d: addr %x, flags %x, bcnt %x, mcnt %x\n",
|
||||
unit,rmd->addr,rmd->flags,rmd->bcnt,rmd->mcnt);
|
||||
for (i=0; i<len; i++) {
|
||||
if (!printed) {
|
||||
printed = 1;
|
||||
printf("is%d: data: ", unit);
|
||||
}
|
||||
printf("%x ",*(is->tbuf+(BUFSIZE*no)+i));
|
||||
printf("\n");
|
||||
}
|
||||
if (printed)
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -15,7 +15,7 @@
|
||||
* on the understanding that TFS is not responsible for the correct
|
||||
* functioning of this software in any circumstances.
|
||||
*
|
||||
* $Id: ultra14f.c,v 1.12 1993/07/17 11:00:11 deraadt Exp $
|
||||
* $Id: ultra14f.c,v 1.13 1993/07/28 02:21:32 cgd Exp $
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -310,7 +310,7 @@ uha_send_mbox( int unit
|
||||
,struct mscp *mscp)
|
||||
{
|
||||
int port = uha_data[unit].baseport;
|
||||
int spincount = FUDGE(delaycount) * 1; /* 1ms should be enough */
|
||||
int spincount = FUDGE(delaycount) * 1000; /* 1s should be enough */
|
||||
int s = splbio();
|
||||
|
||||
while( ((inb(port + UHA_LINT) & (UHA_LDIP))
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)wd.c 7.2 (Berkeley) 5/9/91
|
||||
* $Id: wd.c,v 1.24 1993/07/08 08:22:17 deraadt Exp $
|
||||
* $Id: wd.c,v 1.25 1993/07/28 02:21:37 cgd Exp $
|
||||
*/
|
||||
|
||||
/* Note: This code heavily modified by tih@barsoom.nhh.no; use at own risk! */
|
||||
@ -75,7 +75,7 @@
|
||||
#include "vm/vm.h"
|
||||
|
||||
#ifndef WDCNDELAY
|
||||
#define WDCNDELAY 200000 /* delay = 25us; so 5s for a controller state change */
|
||||
#define WDCNDELAY 400000 /* delay = 25us; so 10s for a controller state change */
|
||||
#endif
|
||||
#define WDCDELAY 25
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)wt.c 7.1 (Berkeley) 5/9/91
|
||||
* $Id: wt.c,v 1.4 1993/07/19 16:58:20 cgd Exp $
|
||||
* $Id: wt.c,v 1.5 1993/07/28 02:21:40 cgd Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -445,9 +445,7 @@ errxit: bp->b_flags |= B_ERROR;
|
||||
}
|
||||
/* Reading file marks or writing end of tape return 0 bytes */
|
||||
} else {
|
||||
/* XXX (cgd) - for broken 386bsd physio only:
|
||||
* bp->b_flags |= B_ERROR;
|
||||
*/
|
||||
bp->b_flags |= B_ERROR;
|
||||
wtflags &= ~(TPWO|TPRO);
|
||||
}
|
||||
}
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)wd.c 7.2 (Berkeley) 5/9/91
|
||||
* $Id: wd.c,v 1.24 1993/07/08 08:22:17 deraadt Exp $
|
||||
* $Id: wd.c,v 1.25 1993/07/28 02:21:37 cgd Exp $
|
||||
*/
|
||||
|
||||
/* Note: This code heavily modified by tih@barsoom.nhh.no; use at own risk! */
|
||||
@ -75,7 +75,7 @@
|
||||
#include "vm/vm.h"
|
||||
|
||||
#ifndef WDCNDELAY
|
||||
#define WDCNDELAY 200000 /* delay = 25us; so 5s for a controller state change */
|
||||
#define WDCNDELAY 400000 /* delay = 25us; so 10s for a controller state change */
|
||||
#endif
|
||||
#define WDCDELAY 25
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
* on the understanding that TFS is not responsible for the correct
|
||||
* functioning of this software in any circumstances.
|
||||
*
|
||||
* $Id: aha1742.c,v 1.13 1993/07/17 16:20:24 mycroft Exp $
|
||||
* $Id: aha1742.c,v 1.14 1993/07/28 02:21:11 cgd Exp $
|
||||
*/
|
||||
|
||||
#include "ahb.h"
|
||||
@ -1016,12 +1016,10 @@ cheat = ecb;
|
||||
ahb_free_ecb(unit,ecb,flags);
|
||||
}
|
||||
xs->error = XS_DRIVER_STUFFUP;
|
||||
splx(s);
|
||||
return(HAD_ERROR);
|
||||
}
|
||||
} while (!(xs->flags & ITSDONE));
|
||||
|
||||
splx(s);
|
||||
scsi_debug = 0;
|
||||
ahb_debug = 0;
|
||||
if(xs->error)
|
||||
|
@ -14,60 +14,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modification history
|
||||
*
|
||||
* $Log: if_ed.c,v $
|
||||
* Revision 1.2 1993/07/12 13:13:41 deraadt
|
||||
* moved bfdttach point to same place as other drivers, from greenman
|
||||
*
|
||||
* Revision 1.1 1993/07/03 12:19:45 cgd
|
||||
* add support for David Greenman's "ed" driver.
|
||||
*
|
||||
* Revision 1.12 93/07/07 06:27:44 davidg
|
||||
* moved call to bpfattach to after this drivers attach printf -
|
||||
* improves readability of startup messages.
|
||||
*
|
||||
* Revision 1.11 93/06/27 03:07:01 davidg
|
||||
* fixed bugs in the 3Com part of the probe routine that were uncovered by
|
||||
* the previous fix.
|
||||
*
|
||||
* Revision 1.10 93/06/25 19:23:19 davidg
|
||||
* fixed bug that caused erroneous 'Invalid irq configuration' message when
|
||||
* no board is present (during autoconfiguration).
|
||||
*
|
||||
* Revision 1.9 93/06/23 03:48:14 davidg
|
||||
* fixed minor typo introduced when cleaning up probe routine
|
||||
*
|
||||
* Revision 1.8 93/06/23 03:37:19 davidg
|
||||
* cleaned up/added some comments. Also improved readability of a part of
|
||||
* the probe routine.
|
||||
*
|
||||
* Revision 1.7 93/06/22 04:45:01 davidg
|
||||
* (no additional changes) Second beta release
|
||||
*
|
||||
* Revision 1.6 93/06/22 04:40:35 davidg
|
||||
* minor definition fix to ed_reset()
|
||||
*
|
||||
* Revision 1.5 93/06/22 04:37:39 davidg
|
||||
* fixed some comments
|
||||
*
|
||||
* Revision 1.4 93/06/22 04:34:34 davidg
|
||||
* added support to use the LLC0 'link-level control' flag
|
||||
* to disable the tranceiver for AUI operation on 3Com boards.
|
||||
* The default for this flag can be set in the kernel config
|
||||
* file - 'flags 0x01' sets the flag (disables the tranceiver).
|
||||
*
|
||||
* Revision 1.3 93/06/17 03:57:28 davidg
|
||||
* fixed some printf's
|
||||
*
|
||||
* Revision 1.2 93/06/17 03:26:49 davidg
|
||||
* fixed 3c503 code to determine 8/16bit board
|
||||
* changed attach printf to work with Interim-0.1.5 and NetBSD
|
||||
*
|
||||
* Revision 1.1 93/06/14 22:21:24 davidg
|
||||
* Beta release of device driver for SMC/WD80x3 and 3C503 ethernet boards.
|
||||
*
|
||||
*
|
||||
* $Id: if_ed.c,v 1.3 1993/07/28 02:21:17 cgd Exp $
|
||||
*/
|
||||
|
||||
#include "ed.h"
|
||||
@ -75,12 +22,13 @@
|
||||
#include "bpfilter.h"
|
||||
|
||||
#include "param.h"
|
||||
#include "systm.h"
|
||||
#include "select.h"
|
||||
#include "errno.h"
|
||||
#include "ioctl.h"
|
||||
#include "mbuf.h"
|
||||
#include "socket.h"
|
||||
#include "syslog.h"
|
||||
#include "select.h"
|
||||
|
||||
#include "net/if.h"
|
||||
#include "net/if_dl.h"
|
||||
@ -308,10 +256,25 @@ type_WD80x3:
|
||||
}
|
||||
|
||||
#if ED_DEBUG
|
||||
printf("type=%s width=%d memsize=%d\n",sc->type_str,memwidth,memsize);
|
||||
printf("type=%s memwidth=%d memsize=%d id_msize=%d\n",
|
||||
sc->type_str,memwidth,memsize,isa_dev->id_msize);
|
||||
for (i=0; i<8; i++)
|
||||
printf("%x -> %x\n", i, inb(sc->asic_addr + i));
|
||||
#endif
|
||||
/*
|
||||
* Allow the user to override the autoconfiguration
|
||||
*/
|
||||
if (isa_dev->id_msize)
|
||||
memsize = isa_dev->id_msize;
|
||||
/*
|
||||
* (note that if the user specifies both of the following flags
|
||||
* that '8bit' mode intentionally has precedence)
|
||||
*/
|
||||
if (isa_dev->id_flags & ED_FLAGS_FORCE_16BIT_MODE)
|
||||
memwidth = 16;
|
||||
if (isa_dev->id_flags & ED_FLAGS_FORCE_8BIT_MODE)
|
||||
memwidth = 8;
|
||||
|
||||
/*
|
||||
* Check 83C584 interrupt configuration register if this board has one
|
||||
* XXX - we could also check the IO address register. But why
|
||||
@ -343,7 +306,7 @@ type_WD80x3:
|
||||
/*
|
||||
* allocate one xmit buffer if < 16k, two buffers otherwise
|
||||
*/
|
||||
if (memsize < 16384) {
|
||||
if ((memsize < 16384) || (isa_dev->id_msize & ED_FLAGS_NO_DOUBLE_BUFFERING)) {
|
||||
sc->smem_ring = sc->smem_start + (ED_PAGE_SIZE * ED_TXBUF_SIZE);
|
||||
sc->txb_cnt = 1;
|
||||
sc->rec_page_start = ED_TXBUF_SIZE;
|
||||
@ -633,7 +596,7 @@ type_3Com:
|
||||
#if 0
|
||||
printf("Starting write\n");
|
||||
for (i = 0; i < 8192; ++i)
|
||||
bzerow(sc->smem_start, 8192);
|
||||
bzero(sc->smem_start, 8192);
|
||||
printf("Done.\n");
|
||||
#endif
|
||||
#if 0
|
||||
@ -789,10 +752,8 @@ ed_stop(unit)
|
||||
* to 'n' (about 5ms). It shouldn't even take 5us on modern
|
||||
* DS8390's, but just in case it's an old one.
|
||||
*/
|
||||
while ((inb(sc->nic_addr + ED_P0_ISR) & ED_ISR_RST) == 0) {
|
||||
if (--n == 0)
|
||||
break;
|
||||
}
|
||||
while (((inb(sc->nic_addr + ED_P0_ISR) & ED_ISR_RST) == 0) && --n);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
@ -941,10 +902,12 @@ ed_init(unit)
|
||||
* If this is a 3Com board, the tranceiver must be software enabled
|
||||
* (there is no settable hardware default).
|
||||
*/
|
||||
if ((sc->vendor == ED_VENDOR_3COM) && (ifp->if_flags & IFF_LLC0)) {
|
||||
outb(sc->asic_addr + ED_3COM_CR, 0);
|
||||
} else {
|
||||
outb(sc->asic_addr + ED_3COM_CR, ED_3COM_CR_XSEL);
|
||||
if (sc->vendor == ED_VENDOR_3COM) {
|
||||
if (ifp->if_flags & IFF_LLC0) {
|
||||
outb(sc->asic_addr + ED_3COM_CR, 0);
|
||||
} else {
|
||||
outb(sc->asic_addr + ED_3COM_CR, ED_3COM_CR_XSEL);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1447,13 +1410,24 @@ edintr(unit)
|
||||
}
|
||||
|
||||
/*
|
||||
* return NIC CR to standard state before looping back
|
||||
* to top: page 0, remote DMA complete, start
|
||||
* (toggling the TXP bit off, even if was just set in the
|
||||
* transmit routine, is *okay* - it is 'edge' triggered
|
||||
* from low to high)
|
||||
* return NIC CR to standard state: page 0, remote DMA complete,
|
||||
* start (toggling the TXP bit off, even if was just set
|
||||
* in the transmit routine, is *okay* - it is 'edge'
|
||||
* triggered from low to high)
|
||||
*/
|
||||
outb(sc->nic_addr + ED_P0_CR, ED_CR_RD2|ED_CR_STA);
|
||||
|
||||
/*
|
||||
* If the Network Talley Counters overflow, read them to
|
||||
* reset them. It appears that old 8390's won't
|
||||
* clear the ISR flag otherwise - resulting in an
|
||||
* infinite loop.
|
||||
*/
|
||||
if (isr & ED_ISR_CNT) {
|
||||
(void) inb(sc->nic_addr + ED_P0_CNTR0);
|
||||
(void) inb(sc->nic_addr + ED_P0_CNTR1);
|
||||
(void) inb(sc->nic_addr + ED_P0_CNTR2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1567,10 +1541,12 @@ ed_ioctl(ifp, command, data)
|
||||
* of the tranceiver for 3Com boards. The LLC0 flag disables
|
||||
* the tranceiver if set.
|
||||
*/
|
||||
if ((sc->vendor == ED_VENDOR_3COM) && (ifp->if_flags & IFF_LLC0)) {
|
||||
outb(sc->asic_addr + ED_3COM_CR, 0);
|
||||
} else {
|
||||
outb(sc->asic_addr + ED_3COM_CR, ED_3COM_CR_XSEL);
|
||||
if (sc->vendor == ED_VENDOR_3COM) {
|
||||
if (ifp->if_flags & IFF_LLC0) {
|
||||
outb(sc->asic_addr + ED_3COM_CR, 0);
|
||||
} else {
|
||||
outb(sc->asic_addr + ED_3COM_CR, ED_3COM_CR_XSEL);
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -1,16 +1,7 @@
|
||||
/*
|
||||
* National Semiconductor DS8390 NIC register definitions
|
||||
*
|
||||
* $Log: if_edreg.h,v $
|
||||
* Revision 1.1 1993/07/03 12:21:07 cgd
|
||||
* add support for David Greenman "ed" driver
|
||||
*
|
||||
* Revision 1.2 93/06/23 03:03:05 davidg
|
||||
* added some additional definitions for the 83C584 bus interface
|
||||
* chip (SMC/WD boards)
|
||||
*
|
||||
* Revision 1.1 93/06/23 03:01:07 davidg
|
||||
* Initial revision
|
||||
* $Id: if_edreg.h,v 1.2 1993/07/28 02:21:23 cgd Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -564,7 +555,19 @@ struct ed_ring {
|
||||
/*
|
||||
* this sets the default for enabling/disablng the tranceiver
|
||||
*/
|
||||
#define ED_FLAGS_DISABLE_TRANCEIVER 0x01
|
||||
#define ED_FLAGS_DISABLE_TRANCEIVER 0x01
|
||||
|
||||
/*
|
||||
* This forces the board to be used in 8/16bit mode even if it
|
||||
* autoconfigs differently
|
||||
*/
|
||||
#define ED_FLAGS_FORCE_8BIT_MODE 0x02
|
||||
#define ED_FLAGS_FORCE_16BIT_MODE 0x04
|
||||
|
||||
/*
|
||||
* This disables the use of double transmit buffers.
|
||||
*/
|
||||
#define ED_FLAGS_NO_DOUBLE_BUFFERING 0x08
|
||||
|
||||
/*
|
||||
* Definitions for Western digital/SMC WD80x3 series ASIC
|
||||
|
@ -15,7 +15,7 @@
|
||||
* on the understanding that TFS is not responsible for the correct
|
||||
* functioning of this software in any circumstances.
|
||||
*
|
||||
* $Id: ultra14f.c,v 1.12 1993/07/17 11:00:11 deraadt Exp $
|
||||
* $Id: ultra14f.c,v 1.13 1993/07/28 02:21:32 cgd Exp $
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -310,7 +310,7 @@ uha_send_mbox( int unit
|
||||
,struct mscp *mscp)
|
||||
{
|
||||
int port = uha_data[unit].baseport;
|
||||
int spincount = FUDGE(delaycount) * 1; /* 1ms should be enough */
|
||||
int spincount = FUDGE(delaycount) * 1000; /* 1s should be enough */
|
||||
int s = splbio();
|
||||
|
||||
while( ((inb(port + UHA_LINT) & (UHA_LDIP))
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)wd.c 7.2 (Berkeley) 5/9/91
|
||||
* $Id: wd.c,v 1.24 1993/07/08 08:22:17 deraadt Exp $
|
||||
* $Id: wd.c,v 1.25 1993/07/28 02:21:37 cgd Exp $
|
||||
*/
|
||||
|
||||
/* Note: This code heavily modified by tih@barsoom.nhh.no; use at own risk! */
|
||||
@ -75,7 +75,7 @@
|
||||
#include "vm/vm.h"
|
||||
|
||||
#ifndef WDCNDELAY
|
||||
#define WDCNDELAY 200000 /* delay = 25us; so 5s for a controller state change */
|
||||
#define WDCNDELAY 400000 /* delay = 25us; so 10s for a controller state change */
|
||||
#endif
|
||||
#define WDCDELAY 25
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)wt.c 7.1 (Berkeley) 5/9/91
|
||||
* $Id: wt.c,v 1.4 1993/07/19 16:58:20 cgd Exp $
|
||||
* $Id: wt.c,v 1.5 1993/07/28 02:21:40 cgd Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -445,9 +445,7 @@ errxit: bp->b_flags |= B_ERROR;
|
||||
}
|
||||
/* Reading file marks or writing end of tape return 0 bytes */
|
||||
} else {
|
||||
/* XXX (cgd) - for broken 386bsd physio only:
|
||||
* bp->b_flags |= B_ERROR;
|
||||
*/
|
||||
bp->b_flags |= B_ERROR;
|
||||
wtflags &= ~(TPWO|TPRO);
|
||||
}
|
||||
}
|
||||
|
@ -13,7 +13,7 @@
|
||||
* on the understanding that TFS is not responsible for the correct
|
||||
* functioning of this software in any circumstances.
|
||||
*
|
||||
* $Id: st.c,v 1.14 1993/07/19 11:30:54 cgd Exp $
|
||||
* $Id: st.c,v 1.15 1993/07/28 02:22:41 cgd Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -701,6 +701,8 @@ stioctl(dev_t dev, int cmd, caddr_t arg, int mode)
|
||||
return ENXIO;
|
||||
|
||||
switch(cmd) {
|
||||
default:
|
||||
return EINVAL;
|
||||
case MTIOCGET:
|
||||
g = (struct mtget *)arg;
|
||||
bzero(g, sizeof *g);
|
||||
|
@ -1 +1 @@
|
||||
revision 1.19 intentionally removed
|
||||
revision 1.20 intentionally removed
|
||||
|
@ -1 +1 @@
|
||||
revision 1.9 intentionally removed
|
||||
revision 1.10 intentionally removed
|
||||
|
@ -36,7 +36,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: kern_lkm.c,v 1.3 1993/07/19 09:57:22 cgd Exp $
|
||||
* $Id: kern_lkm.c,v 1.4 1993/07/28 02:22:08 cgd Exp $
|
||||
*/
|
||||
|
||||
#include "param.h"
|
||||
@ -307,11 +307,10 @@ int flag;
|
||||
|
||||
if( ( i = unloadp->id) == -1) { /* unload by name*/
|
||||
/*
|
||||
* Copy name in and lookup id from all loaded
|
||||
* modules. May fail.
|
||||
* Copy name and lookup id from all loaded
|
||||
* modules.
|
||||
*/
|
||||
if( err = copyinstr( unloadp->name, istr, MAXLKMNAME-1, NULL))
|
||||
break;
|
||||
copystr( unloadp->name, istr, MAXLKMNAME-1, NULL);
|
||||
/*
|
||||
* look up id...
|
||||
*/
|
||||
@ -352,11 +351,10 @@ int flag;
|
||||
|
||||
if( ( i = statp->id) == -1) { /* stat by name*/
|
||||
/*
|
||||
* Copy name in and lookup id from all loaded
|
||||
* modules. May fail.
|
||||
* Copy name and lookup id from all loaded
|
||||
* modules.
|
||||
*/
|
||||
if( err = copyinstr( statp->name, istr, MAXLKMNAME-1, NULL))
|
||||
break;
|
||||
copystr( statp->name, istr, MAXLKMNAME-1, NULL);
|
||||
/*
|
||||
* look up id...
|
||||
*/
|
||||
@ -399,10 +397,10 @@ int flag;
|
||||
statp->size = curp->size / PAGESIZE;
|
||||
statp->private = (unsigned long)curp->private.lkm_any;
|
||||
statp->ver = curp->private.lkm_any->lkm_ver;
|
||||
err = copyoutstr( curp->private.lkm_any->lkm_name,
|
||||
statp->name,
|
||||
MAXLKMNAME - 2,
|
||||
NULL);
|
||||
copystr( curp->private.lkm_any->lkm_name,
|
||||
statp->name,
|
||||
MAXLKMNAME - 2,
|
||||
NULL);
|
||||
|
||||
break;
|
||||
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)nfs_node.c 7.34 (Berkeley) 5/15/91
|
||||
* $Id: nfs_node.c,v 1.2 1993/05/20 03:18:42 cgd Exp $
|
||||
* $Id: nfs_node.c,v 1.3 1993/07/28 02:22:25 cgd Exp $
|
||||
*/
|
||||
|
||||
#include "param.h"
|
||||
@ -160,6 +160,7 @@ loop:
|
||||
np->n_sillyrename = (struct sillyrename *)0;
|
||||
np->n_size = 0;
|
||||
np->n_mtime = 0;
|
||||
np->n_lockf = 0;
|
||||
*npp = np;
|
||||
return (0);
|
||||
}
|
||||
|
@ -13,7 +13,7 @@
|
||||
* on the understanding that TFS is not responsible for the correct
|
||||
* functioning of this software in any circumstances.
|
||||
*
|
||||
* $Id: st.c,v 1.14 1993/07/19 11:30:54 cgd Exp $
|
||||
* $Id: st.c,v 1.15 1993/07/28 02:22:41 cgd Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -701,6 +701,8 @@ stioctl(dev_t dev, int cmd, caddr_t arg, int mode)
|
||||
return ENXIO;
|
||||
|
||||
switch(cmd) {
|
||||
default:
|
||||
return EINVAL;
|
||||
case MTIOCGET:
|
||||
g = (struct mtget *)arg;
|
||||
bzero(g, sizeof *g);
|
||||
|
@ -1 +1 @@
|
||||
revision 1.5 intentionally removed
|
||||
revision 1.6 intentionally removed
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)ufs_lockf.c 7.7 (Berkeley) 7/2/91
|
||||
* $Id: ufs_lockf.c,v 1.4 1993/05/22 09:01:16 cgd Exp $
|
||||
* $Id: ufs_lockf.c,v 1.5 1993/07/28 02:23:18 cgd Exp $
|
||||
*/
|
||||
|
||||
#include "param.h"
|
||||
@ -245,23 +245,20 @@ lf_setlock(lock)
|
||||
lf_printlist("lf_setlock", block);
|
||||
}
|
||||
#endif /* LOCKF_DEBUG */
|
||||
if (error = tsleep((caddr_t)lock, priority, lockstr, 0)) {
|
||||
/* Don't leave a dangling pointer in block list */
|
||||
if (lf_getblock(lock) == block) {
|
||||
struct lockf **prev;
|
||||
|
||||
/* Still there, find us on list */
|
||||
prev = &block->lf_block;
|
||||
while ((block = block->lf_block) != NOLOCKF) {
|
||||
if (block == lock) {
|
||||
*prev = block->lf_block;
|
||||
break;
|
||||
}
|
||||
prev = &block->lf_block;
|
||||
}
|
||||
if (error = tsleep((caddr_t)lock, priority, lockstr, 0)) {
|
||||
/*
|
||||
* Delete ourselves from the waiting to lock list.
|
||||
*/
|
||||
for (block = lock->lf_next;
|
||||
block != NOLOCKF;
|
||||
block = block->lf_block) {
|
||||
if (block->lf_block != lock)
|
||||
continue;
|
||||
block->lf_block = block->lf_block->lf_block;
|
||||
free(lock, M_LOCKF);
|
||||
return (error);
|
||||
}
|
||||
free(lock, M_LOCKF);
|
||||
return (error);
|
||||
panic("lf_setlock: lost lock");
|
||||
}
|
||||
}
|
||||
/*
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)vm_fault.c 7.6 (Berkeley) 5/7/91
|
||||
* $Id: vm_fault.c,v 1.6 1993/07/15 14:25:21 cgd Exp $
|
||||
* $Id: vm_fault.c,v 1.7 1993/07/28 02:23:33 cgd Exp $
|
||||
*
|
||||
*
|
||||
* Copyright (c) 1987, 1990 Carnegie-Mellon University.
|
||||
@ -529,6 +529,7 @@ thread_wakeup(&vm_pages_needed); /* XXX */
|
||||
|
||||
vm_page_lock_queues();
|
||||
vm_page_activate(m);
|
||||
vm_page_deactivate(m);
|
||||
pmap_page_protect(VM_PAGE_TO_PHYS(m), VM_PROT_NONE);
|
||||
vm_page_unlock_queues();
|
||||
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)vm_pager.c 7.4 (Berkeley) 5/7/91
|
||||
* $Id: vm_pager.c,v 1.4 1993/05/29 17:03:06 cgd Exp $
|
||||
* $Id: vm_pager.c,v 1.5 1993/07/28 02:23:40 cgd Exp $
|
||||
*
|
||||
*
|
||||
* Copyright (c) 1987, 1990 Carnegie-Mellon University.
|
||||
@ -131,7 +131,7 @@ vm_pager_init()
|
||||
* Initialize known pagers
|
||||
*/
|
||||
for (pgops = pagertab; pgops < &pagertab[npagers]; pgops++)
|
||||
(*(*pgops)->pgo_init)();
|
||||
if (*pgops) (*(*pgops)->pgo_init)();
|
||||
if (dfltpagerops == NULL)
|
||||
panic("no default pager");
|
||||
}
|
||||
@ -205,7 +205,7 @@ vm_pager_sync()
|
||||
struct pagerops **pgops;
|
||||
|
||||
for (pgops = pagertab; pgops < &pagertab[npagers]; pgops++)
|
||||
(*(*pgops)->pgo_putpage)(NULL, NULL, FALSE);
|
||||
if (*pgops) (*(*pgops)->pgo_putpage)(NULL, NULL, FALSE);
|
||||
}
|
||||
|
||||
vm_offset_t
|
||||
|
Loading…
Reference in New Issue
Block a user