NetBSD Problem Report #12120

Received: (qmail 11386 invoked from network); 3 Feb 2001 13:59:32 -0000
Message-Id: <200102031358.f13DwgM00579@pinky.paradox.demon.co.uk>
Date: Sat, 3 Feb 2001 13:58:42 GMT
From: chris@paradox.demon.co.uk
To: gnats-bugs@gnats.netbsd.org
Subject: arm32 wdc drivers should use wdc_print_modes for a bit more info
X-Send-Pr-Version: 3.95

>Number:         12120
>Category:       port-acorn32
>Synopsis:       arm32 wdc drivers should use wdc_print_modes for a bit more info
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    port-acorn32-maintainer
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sat Feb 03 14:00:00 +0000 2001
>Closed-Date:    Sat Sep 23 19:40:10 +0000 2006
>Last-Modified:  Sat Sep 23 19:40:10 +0000 2006
>Originator:     
>Release:        02-02-2001
>Organization:
>Environment:
System: NetBSD pinky.paradox.demon.co.uk 1.5R NetBSD 1.5R (PINKY2) #10: Fri Feb 2 23:47:51 GMT 2001 chris@pinky.paradox.demon.co.uk:/usr/src/src/sys/arch/i386/compile/PINKY2 i386
Architecture: i386
Machine: i386
>Description:
	When booting the arm32 kernels do not output what mode the wdc device is running the channels/devices in.  We should use the newish wdc_print_modes call
>How-To-Repeat:
	Boot a kernel/check dmesg and note the lack of info on what mode wdc is running in.
>Fix:
Index: sys/arch/arm32/mainbus/wdc_pioc.c
===================================================================
RCS file: /usr/src/local.cvs/netbsd/sys/arch/arm32/mainbus/wdc_pioc.c,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 wdc_pioc.c
--- sys/arch/arm32/mainbus/wdc_pioc.c	2000/12/08 22:13:37	1.1.1.1
+++ sys/arch/arm32/mainbus/wdc_pioc.c	2001/01/25 00:40:55
@@ -166,6 +166,7 @@ wdc_pioc_attach(parent, self, aux)
 		return;
 	}
 	wdcattach(&sc->wdc_channel);
+	wdc_print_modes(&sc->wdc_channel);
 }

 /* End of wdc_pioc.c */
Index: sys/arch/arm32/podulebus/icside.c
===================================================================
RCS file: /usr/src/local.cvs/netbsd/sys/arch/arm32/podulebus/icside.c,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 icside.c
--- sys/arch/arm32/podulebus/icside.c	2000/12/08 22:13:38	1.1.1.1
+++ sys/arch/arm32/podulebus/icside.c	2001/01/25 00:44:04
@@ -284,6 +284,7 @@ icside_attach(parent, self, aux)
 		(void)bus_space_read_1(iot, icp->ic_irqioh, 0);
 		/* Call common attach routines */
 		wdcattach(cp);
+		wdc_print_modes(cp);
 		/* Disable interrupts */
 		(void)bus_space_read_1(iot, icp->ic_irqioh, 0);
 		pa->pa_podule->irq_addr = iobase + ide->irqstatregs[channel];
Index: sys/arch/arm32/podulebus/rapide.c
===================================================================
RCS file: /usr/src/local.cvs/netbsd/sys/arch/arm32/podulebus/rapide.c,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 rapide.c
--- sys/arch/arm32/podulebus/rapide.c	2000/12/08 22:13:38	1.1.1.1
+++ sys/arch/arm32/podulebus/rapide.c	2001/01/25 00:41:11
@@ -289,6 +289,7 @@ rapide_attach(parent, self, aux)
 		    sc->sc_intr_enable_mask);
 		/* XXX - Issue 1 cards will need to clear any pending interrupts */
 		wdcattach(cp);
+		wdc_print_modes(cp);
 		ihp = &rcp->rc_ih;
 		ihp->ih_func = rapide_intr;
 		ihp->ih_arg = rcp;
Index: sys/arch/arm32/podulebus/simide.c
===================================================================
RCS file: /usr/src/local.cvs/netbsd/sys/arch/arm32/podulebus/simide.c,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 simide.c
--- sys/arch/arm32/podulebus/simide.c	2000/12/08 22:13:39	1.1.1.1
+++ sys/arch/arm32/podulebus/simide.c	2001/01/25 00:44:21
@@ -278,6 +278,7 @@ simide_attach(parent, self, aux)
 		bus_space_write_1(sc->sc_ctliot, sc->sc_ctlioh,
 		    CONTROL_REGISTER_OFFSET, sc->sc_ctl_reg);
 		wdcattach(cp);
+		wdc_print_modes(cp);
 		ihp = &scp->sc_ih;
 		ihp->ih_func = simide_intr;
 		ihp->ih_arg = scp;
>Release-Note:
>Audit-Trail:

From: Manuel Bouyer <bouyer@antioche.lip6.fr>
To: chris@paradox.demon.co.uk
Cc: gnats-bugs@gnats.netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: port-arm32/12120: arm32 wdc drivers should use wdc_print_modes for a bit more info
Date: Sun, 4 Feb 2001 14:07:59 +0100

 I think this change is wrong, because none of these front-end support
 WDC_CAPABILITY_MODE flag; so the infos printed by wdc_print_modes() will
 not be accurate.

 --
 Manuel Bouyer <bouyer@antioche.eu.org>
 --

From: Chris Gilbert <chris@paradox.demon.co.uk>
To: Manuel Bouyer <bouyer@antioche.lip6.fr>
Cc: gnats-bugs@gnats.netbsd.org,
 netbsd-bugs@netbsd.org
Subject: Re: port-arm32/12120: arm32 wdc drivers should use wdc_print_modes for a bit more info
Date: Sun, 4 Feb 2001 16:25:25 +0000

 Looking at sys/macppc/dev/wdc_obio.c it doesn't have this flag set, and it 
 uses wdc_print_modes (AFAIR it's the original reason for having 
 wdc_print_modes)  Is it also wrong?  or have I missed something? (which is 
 probably more likely)

 Cheers,
 Chris

From: Manuel Bouyer <bouyer@antioche.lip6.fr>
To: Chris Gilbert <chris@paradox.demon.co.uk>
Cc: gnats-bugs@gnats.netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: port-arm32/12120: arm32 wdc drivers should use wdc_print_modes for a bit more info
Date: Sun, 4 Feb 2001 18:13:02 +0100

 This front-end looks quite brocken, especially the adjust_timing() stuff.
 It shoud use the set_modes callback instead, and assert WDC_CAPABILITY_MODE.
 I'll look at this later (but I can't test it).

 Note that it never updates PIO_mode and DMA_mode, so the infos printed
 here are surely not accurate. I think it's there only to inform that
 DMA is used.

 --
 Manuel Bouyer <bouyer@antioche.eu.org>
 --

From: Chris Gilbert <chris@paradox.demon.co.uk>
To: Manuel Bouyer <bouyer@antioche.lip6.fr>
Cc: gnats-bugs@gnats.netbsd.org,
 netbsd-bugs@netbsd.org
Subject: Re: port-arm32/12120: arm32 wdc drivers should use wdc_print_modes for a bit more info
Date: Sun, 4 Feb 2001 22:08:41 +0000

 Ahh, no point copying broken code then.  Certainly the reason for me adding 
 is was to just get more info.  I just prefer that people are aware that 
 controllers aren't using DMA even if the drives are.  The adding the 
 wdc_print_modes makes the output on my arm32 box:

 rapide0 at podulebus0 [ podule 1 ]: Issue 2
 atapibus0 at rapide0 channel 0
 cd0 at atapibus0 drive 1: <CD-540E, , 1.0A> type 5 cdrom removable

 cd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2 (Ultra/33)
 wd0 at rapide0 channel 0 drive 0: <QUANTUM FIREBALL SE4.3A>
 wd0: drive supports 16-sector PIO transfers, LBA addressing
 wd0: 4110 MB, 14848 cyl, 9 head, 63 sec, 512 bytes/sect x 8418816 sectors

 wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2 (Ultra/33)
 wd0(rapide0:0:0): using PIO mode 4
 cd0(rapide0:0:1): using PIO mode 4
 wd1 at rapide0 channel 1 drive 0: <QUANTUM FIREBALL1280A>
 wd1: drive supports 8-sector PIO transfers, LBA addressing
 wd1: 1222 MB, 2484 cyl, 16 head, 63 sec, 512 bytes/sect x 2503872 sectors

 wd1: drive supports PIO mode 4, DMA mode 2
 wd1(rapide0:1:0): using PIO mode 4

 So I believe that this needs tackling from a different direction?

 Cheers,
 Chris

From: Manuel Bouyer <bouyer@antioche.lip6.fr>
To: Chris Gilbert <chris@paradox.demon.co.uk>
Cc: gnats-bugs@gnats.netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: port-arm32/12120: arm32 wdc drivers should use wdc_print_modes for a bit more info
Date: Mon, 5 Feb 2001 21:03:10 +0100

 Ok, but can rapide really do PIO mode 4 ?
 You can use wdc_print_modes(), but you need to set drvp->PIO_mode to the rigth
 value for each drive before calling it (I think otherwise it defaults to
 what the drive supports, this info is already available).

 --
 Manuel Bouyer <bouyer@antioche.eu.org>
 --

From: Chris Gilbert <chris@paradox.demon.co.uk>
To: Manuel Bouyer <bouyer@antioche.lip6.fr>
Cc: gnats-bugs@gnats.netbsd.org,
 netbsd-bugs@netbsd.org
Subject: Re: port-arm32/12120: arm32 wdc drivers should use wdc_print_modes for a bit more info
Date: Mon, 5 Feb 2001 21:21:16 +0000

 Not sure, I know we run in some kind of polling mode doing 32bit reads and 
 writes. sorry my knowledge of IDE is limited.  I just hoped that the rest of 
 the stuff was right (now there's an assumption not to make again :) so that 
 wdc_print_modes would do the right thing *sigh*  It can do DMA, but we don't 
 do dma on risc-pc, (might not even do dma on arm32 at all.)

 Perhaps the PR should be left open until someone with more knowledge can look 
 into it.  That and more info on the chipsets etc can be found.

 Cheers,
 Chris
Responsible-Changed-From-To: port-arm32-maintainer->port-acorn32-maintainer 
Responsible-Changed-By: bjh21 
Responsible-Changed-When: Wed May 22 06:42:26 PDT 2002 
Responsible-Changed-Why:  
All the IDE interfaces mentioned are for Acorn hardware. 
State-Changed-From-To: open->closed
State-Changed-By: reinoud@netbsd.org
State-Changed-When: Sat, 23 Sep 2006 19:40:10 +0000
State-Changed-Why:
This issue has been resolved differently and the function referenced is no longer present and is not present in other drivers.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.