9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: forsyth@plan9.cs.york.ac.uk forsyth@plan9.cs.york.ac.uk
Subject: Panic trap booting plan 9
Date: Fri, 15 Sep 1995 22:14:04 -0400	[thread overview]
Message-ID: <19950916021404.12o8XZ1c_f1xOy1fArGa2khTPaLiD5mGu1mnoK54NuI@z> (raw)

>	> panic:crda write 16382 to 16384

i had a related problem with one (out of 50) ``ne2000 compatible''
cards.  it was very compatible ...  here are some changes that might help,
but they are not definitive.

diff old /sys/src/boot/pc/ether8390.c
342d341
< 
351c350
< 	ulong dp8390, crda;
---
> 	ulong dp8390;
369,370d367
< 	 * This is straight from the DP8390[12D] datasheet, hence
< 	 * the initial set up for read.
372,377c369,373
< 	crda = to-1-ctlr->card.bit16;
< 	dp8390outb(dp8390+Rbcr0, (len+1+ctlr->card.bit16) & 0xFF);
< 	dp8390outb(dp8390+Rbcr1, ((len+1+ctlr->card.bit16)>>8) & 0xFF);
< 	dp8390outb(dp8390+Rsar0, crda & 0xFF);
< 	dp8390outb(dp8390+Rsar1, (crda>>8) & 0xFF);
< 	dp8390outb(dp8390+Cr, Page0|RDMAread|Sta);
---
> 	dp8390outb(dp8390+Rsar0, to & 0xFF);
> 	dp8390outb(dp8390+Rsar1, (to>>8) & 0xFF);
> 	dp8390outb(dp8390+Rbcr0, len & 0xFF);
> 	dp8390outb(dp8390+Rbcr1, (len>>8) & 0xFF);
> 	dp8390outb(dp8390+Cr, Page0|RDMAwrite|Sta);
379,397d374
< 	for(;;){
< 		crda = dp8390inb(dp8390+Crda0);
< 		crda |= dp8390inb(dp8390+Crda1)<<8;
< 		if(crda == to){
< 			/*
< 			 * Start the remote DMA write and make sure
< 			 * the registers are correct.
< 			 */
< 			dp8390outb(dp8390+Cr, Page0|RDMAwrite|Sta);
< 
< 			crda = dp8390inb(dp8390+Crda0);
< 			crda |= dp8390inb(dp8390+Crda1)<<8;
< 			if(crda != to)
< 				panic("crda write %d to %d\n", crda, to);
< 
< 			break;
< 		}
< 	}
< 
413d389
< 
442d417
< 
581,582c556
< 	while(isr = dp8390inb(dp8390+Isr)){
< 
---
> 	while(isr = (dp8390inb(dp8390+Isr) & (Cnte|Ovwe|Txee|Rxee|Ptxe|Prxe))){

		----------------------
diff old /sys/src/9/pc/ether8390.c
353c353
< 	ulong dp8390, crda;
---
> 	ulong dp8390;
371,372d370
< 	 * This is straight from the DP8390[12D] datasheet, hence
< 	 * the initial set up for read.
374,398c372,376
< 	crda = to-1-ctlr->card.bit16;
< 	dp8390outb(dp8390+Rbcr0, (len+1+ctlr->card.bit16) & 0xFF);
< 	dp8390outb(dp8390+Rbcr1, ((len+1+ctlr->card.bit16)>>8) & 0xFF);
< 	dp8390outb(dp8390+Rsar0, crda & 0xFF);
< 	dp8390outb(dp8390+Rsar1, (crda>>8) & 0xFF);
< 	dp8390outb(dp8390+Cr, Page0|RDMAread|Sta);
< 
< 	for(;;){
< 		crda = dp8390inb(dp8390+Crda0);
< 		crda |= dp8390inb(dp8390+Crda1)<<8;
< 		if(crda == to){
< 			/*
< 			 * Start the remote DMA write and make sure
< 			 * the registers are correct.
< 			 */
< 			dp8390outb(dp8390+Cr, Page0|RDMAwrite|Sta);
< 
< 			crda = dp8390inb(dp8390+Crda0);
< 			crda |= dp8390inb(dp8390+Crda1)<<8;
< 			if(crda != to)
< 				panic("crda write %d to %d\n", crda, to);
< 
< 			break;
< 		}
< 	}
---
> 	dp8390outb(dp8390+Rsar0, to & 0xFF);
> 	dp8390outb(dp8390+Rsar1, (to>>8) & 0xFF);
> 	dp8390outb(dp8390+Rbcr0, len & 0xFF);
> 	dp8390outb(dp8390+Rbcr1, (len>>8) & 0xFF);
> 	dp8390outb(dp8390+Cr, Page0|RDMAwrite|Sta);






             reply	other threads:[~1995-09-16  2:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-09-16  2:14 forsyth [this message]
  -- strict thread matches above, loose matches on Subject: below --
1995-09-16  0:03 jmk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19950916021404.12o8XZ1c_f1xOy1fArGa2khTPaLiD5mGu1mnoK54NuI@z \
    --to=forsyth@plan9.cs.york.ac.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).