Subject: port-arm32/6357: WDC driver fails to probe discs on RISCPC
To: None <gnats-bugs@gnats.netbsd.org>
From: None <rearnsha@arm.com>
List: netbsd-bugs
Date: 10/25/1998 15:37:53
>Number:         6357
>Category:       port-arm32
>Synopsis:       WDC driver fails to probe discs on RISCPC
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Oct 25 07:50:00 1998
>Last-Modified:
>Originator:     
>Organization:
-- 
>Release:        NetBSD-current<NetBSD-current source date>
>Environment:
	
System: NetBSD buzzard 1.3H NetBSD 1.3H (BUZZARD) #1: Sun Oct 25 15:09:19 GMT 1998 rearnsha@shark1:/work/rearnsha/netbsd/sys/arch/arm32/compile/BUZZARD arm32


>Description:
	Missing changes in the wdc_pioc.c code for the new wdc driver causes
	the kernel to fail to probe the discs.  Having fixed the probe the
	machine then fails to take disc interrupts correctly.
>How-To-Repeat:
	Try to boot a -current kernel built from the RISCPC configuration
>Fix:
	Patch below.  
Index: wdc_pioc.c
===================================================================
RCS file: /xx/rearnsha.old/netbsd/usr/cvs/src/sys/arch/arm32/mainbus/wdc_pioc.c,v
retrieving revision 1.1.1.5
diff -p -r1.1.1.5 wdc_pioc.c
*** wdc_pioc.c	1998/10/16 12:11:46	1.1.1.5
--- wdc_pioc.c	1998/10/25 14:53:54
*************** wdc_pioc_attach(parent, self, aux)
*** 144,150 ****
  	    &sc->wdc_channel.ctl_ioh))
  		panic("%s: couldn't map aux registers\n", self->dv_xname);
  
! 	sc->sc_ih = intr_claim(pa->pa_irq, IPL_BIO, "wdc",  wdcintr, sc);
  	if (!sc->sc_ih)
  		panic("%s: Cannot claim IRQ %d\n", self->dv_xname, pa->pa_irq);
  	sc->sc_wdcdev.cap |= WDC_CAPABILITY_DATA16;
--- 144,151 ----
  	    &sc->wdc_channel.ctl_ioh))
  		panic("%s: couldn't map aux registers\n", self->dv_xname);
  
! 	sc->sc_ih = intr_claim(pa->pa_irq, IPL_BIO, "wdc",  wdcintr, 
! 			       &sc->wdc_channel);
  	if (!sc->sc_ih)
  		panic("%s: Cannot claim IRQ %d\n", self->dv_xname, pa->pa_irq);
  	sc->sc_wdcdev.cap |= WDC_CAPABILITY_DATA16;
*************** wdc_pioc_attach(parent, self, aux)
*** 152,157 ****
--- 153,159 ----
  	sc->sc_wdcdev.channels = &sc->wdc_channel;
  	sc->sc_wdcdev.nchannels = 1;
  	sc->wdc_channel.channel = 0;
+ 	sc->wdc_channel.wdc = &wc->wc_wdcdev
  	sc->wdc_channel.ch_queue = malloc(sizeof(struct channel_queue),
  	    M_DEVBUF, M_NOWAIT);
  	if (sc->wdc_channel.ch_queue == NULL) {

>Audit-Trail:
>Unformatted: