Subject: RE: Patches for NetBSD 1.5.1 on DEC Multias (UDB)
To: 'Juergen Weiss' <weiss@Uni-Mainz.DE>
From: David Woyciesjes <DAW@yalepress3.unipress.yale.edu>
List: port-alpha
Date: 07/27/2001 16:59:11
	Well, I was on my Multia, used ftp to get this message...
http://mail-index.netbsd.org/port-alpha/2001/07/20/0017.html
... directly from the mail archive (so Windoze wouldn't pollute it), and
trimmed it to two patch files, one for the stray interrupt (which worked
doen the same process), and this (at the end of message) for the PCMCIA,
which failed, like this:

multia# pwd
/usr/src/sys/dev/isa
multia# patch <pcmcia.patch
Hmm... Looks like a new-style context diff to me...
The text leading up to this was:
-------------------------
*** i82365_isasubr.c.orig	Tue May  9 22:20:25 2000
--- i82365_isasubr.c	Sun Dec  3 17:28:35 2000
-------------------------
Patching file i82365_isasubr.c using Plan A...
Hunk #1 failed at 237.
Hunk #2 failed at 268.
Hunk #3 failed at 339.
Hunk #4 failed at 353.
Hunk #5 failed at 478.
5 out of 5 hunks failed--saving rejects to i82365_isasubr.c.rej
done

What did I goof?

---   David A Woyciesjes
---   C & IS Support Specialist
---   Yale University Press
---   mailto:david.woyciesjes@yale.edu
---   (203) 432-0953
---   ICQ # - 905818

...Here's what's in the file pcmcia.patch that I used...

*** i82365_isasubr.c.orig	Tue May  9 22:20:25 2000
--- i82365_isasubr.c	Sun Dec  3 17:28:35 2000
***************
*** 237,243 ****
  		/* Clear any pending interrupt. */
  		(void) pcic_read(h, PCIC_CSC);
  
! 		if ((sc->ih = isa_intr_establish(ic, irq, IST_EDGE, IPL_TTY,
  		    pcic_isa_count_intr, h)) == NULL)
  			panic("cant get interrupt");
  
--- 237,243 ----
  		/* Clear any pending interrupt. */
  		(void) pcic_read(h, PCIC_CSC);
  
! 		if ((sc->ih = isa_intr_establish(ic, irq, IST_LEVEL,
IPL_TTY,
  		    pcic_isa_count_intr, h)) == NULL)
  			panic("cant get interrupt");
  
***************
*** 268,274 ****
  	}
  	sc->intr_mask[h->chip] = mask;
  
! 	printf("%s\n", sc->intr_mask ? "" : " none");
  }
  
  /*
--- 268,274 ----
  	}
  	sc->intr_mask[h->chip] = mask;
  
! 	printf("%s\n", sc->intr_mask[h->chip] ? "" : " none");
  }
  
  /*
***************
*** 339,345 ****
  				    "detected as available\n",
  				    sc->dev.dv_xname, sc->irq);
  		} else if (chipmask == 0 ||
! 		    isa_intr_alloc(ic, chipmask, IST_EDGE, &sc->irq)) {
  			printf("%s: no available irq; ", sc->dev.dv_xname);
  			sc->irq = IRQUNK;
  		} else if ((chipmask & ~(1 << sc->irq)) == 0 && chipuniq ==
0) {
--- 339,345 ----
  				    "detected as available\n",
  				    sc->dev.dv_xname, sc->irq);
  		} else if (chipmask == 0 ||
! 		    isa_intr_alloc(ic, chipmask, IST_LEVEL, &sc->irq)) {
  			printf("%s: no available irq; ", sc->dev.dv_xname);
  			sc->irq = IRQUNK;
  		} else if ((chipmask & ~(1 << sc->irq)) == 0 && chipuniq ==
0) {
***************
*** 353,359 ****
  	}
  
  	if (sc->irq != IRQUNK) {
! 		sc->ih = isa_intr_establish(ic, sc->irq, IST_EDGE, IPL_TTY,
  		    pcic_intr, sc);
  		if (sc->ih == NULL) {
  			printf("%s: can't establish interrupt",
--- 353,359 ----
  	}
  
  	if (sc->irq != IRQUNK) {
! 		sc->ih = isa_intr_establish(ic, sc->irq, IST_LEVEL, IPL_TTY,
  		    pcic_intr, sc);
  		if (sc->ih == NULL) {
  			printf("%s: can't establish interrupt",
***************
*** 478,484 ****
  	int reg;
  
  	if (pf->cfe->flags & PCMCIA_CFE_IRQLEVEL)
! 		ist = IST_EDGE;
  	else if (pf->cfe->flags & PCMCIA_CFE_IRQPULSE)
  		ist = IST_PULSE;
  	else
--- 478,484 ----
  	int reg;
  
  	if (pf->cfe->flags & PCMCIA_CFE_IRQLEVEL)
! 		ist = IST_LEVEL;
  	else if (pf->cfe->flags & PCMCIA_CFE_IRQPULSE)
  		ist = IST_PULSE;
  	else