linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michel Lanners <mlan@cpu.lu>
To: hedrick@Astro.Dyer.Vanderbilt.Edu
Cc: drow@false.org, mj@ucw.cz, Paul.Mackerras@cs.anu.edu.au,
	linuxppc-dev@lists.linuxppc.org
Subject: Re: Trying a Promise Ultra/66 on powerpc
Date: Sun, 8 Aug 1999 21:54:12 +0200 (CEST)	[thread overview]
Message-ID: <199908081954.VAA02923@piglet.cpu.lu> (raw)
In-Reply-To: <Pine.LNX.3.96.990728021015.14664A-100000@Astro.Dyer.Vanderbilt.Edu>

[-- Attachment #1: Type: TEXT/plain, Size: 3863 bytes --]

Hi all,

I've got it working as well ;-) Was a big headache, though...

Read on for the details.

First, the hardware: a PowerMac 7600, upgraded G3/300, 112 MB RAM,
kernel 2.2.10 with the genam patch from Andre, Promise Ultra/66 with
BIOS 1.11.

Problems start with the changed definition of a few ide functions, now
using hw_regs_t, in asm-ppc/ide.h. As a result,
arch/ppc/kernel/pmac_setup.c and chrp_pci.c need to include linux/ide.h
instead of asm/ide.h. In addition, pmac_setup.c
defines an empty ide_init_default_hwifs(), but it was previously
defined in asm-ppc/ide.h. Patch (linux-asm-ide.patch) below.

Then, I had the problem of enabling the PCI IO space of the card; I
have tried a more generic patch which I'll send in a different mail
with other PCI-related stuff (IRQ related).

What annoyed me the most, was getting access to the I/O-ports of the
Promise going. Turns out that the PCI config registers contain the IO
address as seen from the bus, which is not the same as seen from the
CPU. In fact, they start at 0x0 on the PCI bus, but the host bridge
maps that area to 0xf2000000 on the processor bus. 

This fact was already catered for with the definition of outb/inb and
friends, which get an offset added to the port. Unfortunately, the
PowerMac IDE code undoes this and replaces it with a different
mechanism, which in essence removes the offset. Grrr..

I've solved the problem by adding the right offset directly to the
io-port values as found in the kernel's PCI structures. I think this
needs more serious rework, though. Paul, are you the author of the
PowerMac IDE stuff? So we can work this out... 

On  28 Jul, this message from Andre M. Hedrick echoed through cyberspace:
>> > pdc202xx.c has no tuneproc.  Is this deliberate?
> 
> YES, there are no known or possible way to ever get the card in to a PIO
> mode that is meaningful.  The BIOS defaults to a fixed value.

Not sure what it means, but Promise' doc says it can do PIO modes. But
I prefer DMA ;-)....

>> > As it is I get this (off a 5400 RPM Maxtor 25.4G DiamondMax)
>> > /dev/hdc:
>> >   Timing buffered disk reads:  32 MB in  5.83 seconds = 5.49 MB/sec
>> 
>> This is not brilliant, but acceptable. What mode of operation was that
>> in? UDMA? Or regular DMA or even PIO?
> 
> I am glad that it meets with your approval, if you can do better do it!

;-)) How about this:

/dev/hde:
 Timing buffered disk reads:  64 MB in  6.60 seconds = 9.70 MB/sec
Maxtor 91024D4; 10G 7200 RPM, UDMA-2 ie 33 MB/s.

However, I don't know what this means:
[root@piglet ~]# hdparm -i /dev/hde  

/dev/hde:

 Model=Maxtor 91024D4, FwRev=NAN4251A, SerialNo=W407PXHA
 Config={ Fixed }
 RawCHS=19590/16/63, TrkSize=0, SectSize=0, ECCbytes=54
 BuffType=3(DualPortCache), BuffSize=512kB, MaxMultSect=16, MultSect=off
 DblWordIO=no, maxPIO=2(fast), DMA=yes, maxDMA=2(fast)
 CurCHS=19590/16/63, CurSects=-66060037, LBA=yes, LBAsects=19746720
 WARNING 85806757 ORPHANED SECTORS :: KERNEL REPORTING ERROR
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

 tDMA={min:120,rec:120}, DMA modes: mword0 mword1 *mword2 
 IORDY=on/off, tPIO={min:120,w/IORDY:120}, PIO modes: mode3 mode4 
 UDMA modes: mode0 mode1 mode2 
 Drive Supports : ATA/ATAPI-4 T13 1153D revision 17 : ATA-1 ATA-2 ATA-3 ATA-4 

Any ideas? Drive bug, driver capacity calculation error, or endianess
error?

Andre, I have had my machine hang solid when doing either 

	hdparm -I /dev/hde   	or
	hdparm -d1 -X66 /dev/hde

Any idea what could be causing this?

Thanks, all!

Michel

-------------------------------------------------------------------------
Michel Lanners                 |  " Read Philosophy.  Study Art.
23, Rue Paul Henkes            |    Ask Questions.  Make Mistakes.
L-1710 Luxembourg              |
email   mlan@cpu.lu            |
http://www.cpu.lu/~mlan        |                     Learn Always. "

[-- Attachment #2: linux-asm-ide.patch --]
[-- Type: TEXT/plain, Size: 1185 bytes --]

--- linux/arch/ppc/kernel/pmac_setup.c	Sun Aug  8 21:26:26 1999
+++ linux-ideok/arch/ppc/kernel/pmac_setup.c	Sun Aug  8 19:12:16 1999
@@ -41,6 +41,7 @@
 #include <linux/blk.h>
 #include <linux/vt_kern.h>
 #include <linux/console.h>
+#include <linux/ide.h>
 #include <asm/prom.h>
 #include <asm/system.h>
 #include <asm/pgtable.h>
@@ -53,7 +54,6 @@
 #include <asm/ohare.h>
 #include <asm/mediabay.h>
 #include <asm/feature.h>
-#include <asm/ide.h>
 #include <asm/machdep.h>
 
 #include "time.h"
@@ -550,10 +550,12 @@
  * This registers the standard ports for this architecture with the IDE
  * driver.
  */
+/* It is already defined in include/asm-ppc/ide.h
 void
 ide_init_default_hwifs(void)
 {
 }
+ */
 #endif
 
 __initfunc(void
--- linux/arch/ppc/kernel/chrp_pci.c	Sat Aug  7 17:09:39 1999
+++ linux-ideok/arch/ppc/kernel/chrp_pci.c	Sat Aug  7 17:33:51 1999
@@ -8,6 +8,7 @@
 #include <linux/string.h>
 #include <linux/init.h>
 #include <linux/openpic.h>
+#include <linux/ide.h>
 
 #include <asm/io.h>
 #include <asm/pgtable.h>
@@ -15,7 +16,6 @@
 #include <asm/hydra.h>
 #include <asm/prom.h>
 #include <asm/gg2.h>
-#include <asm/ide.h>
 #include <asm/machdep.h>
 
 #include "pci.h"

  reply	other threads:[~1999-08-08 19:54 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <19990727112137.A897@drow.res.cmu.edu>
     [not found] ` <Pine.LNX.3.96.990727160229.10158B-100000@Astro.Dyer.Vanderbilt.Edu>
     [not found]   ` <19990727102627.A370@drow.res.cmu.edu>
     [not found]     ` <Pine.LNX.3.96.990727093644.6993B-100000@Astro.Dyer.Vanderbilt.Edu>
     [not found]       ` <19990727235430.D1046@albireo.ucw.cz>
1999-07-28  3:04         ` Trying a Promise Ultra/66 on powerpc Daniel Jacobowitz
1999-07-28  5:48           ` Michel Lanners
1999-07-28  7:17             ` Andre M. Hedrick
1999-08-08 19:54               ` Michel Lanners [this message]
1999-08-08 20:55                 ` Tom Rini
1999-08-08 21:01                   ` Michel Lanners
1999-08-09  3:22                   ` Daniel Jacobowitz
1999-08-09  6:02                   ` Paul Mackerras
1999-08-09 19:28                     ` Tom Rini
1999-08-09 20:06                       ` Michel Lanners
1999-08-09  3:26                 ` Daniel Jacobowitz
1999-08-09 21:13                   ` Michel Lanners
1999-08-12 20:05                   ` Michel Lanners
1999-08-13  8:43                     ` Geert Uytterhoeven
1999-08-09  5:13                 ` Paul Mackerras
1999-08-09  5:18                   ` David A. Gatwood
1999-08-09  5:33                     ` Paul Mackerras
1999-08-09  5:38                       ` David A. Gatwood
1999-08-09  6:50                   ` Benjamin Herrenschmidt
1999-08-09 20:15                     ` Michel Lanners
1999-08-09 20:23                   ` Michel Lanners
1999-08-10  0:10                     ` Paul Mackerras
1999-08-10  5:38                       ` Michel Lanners
1999-08-10  8:45                         ` Benjamin Herrenschmidt
1999-08-15  9:20                         ` Martin Mares
1999-08-10 12:56                       ` Geert Uytterhoeven
1999-08-12 17:30                         ` Michel Lanners
1999-07-28  6:18           ` Tom Rini
1999-07-28  8:07           ` Martin Mares
1999-07-29  0:31             ` Andre M. Hedrick
1999-08-01  7:23           ` Michel Lanners
1999-07-29  9:16 Benjamin Herrenschmidt
1999-08-08 20:00 ` Michel Lanners
1999-08-08 20:52   ` Geert Uytterhoeven
1999-08-08 21:21     ` Michel Lanners
1999-08-08 21:27       ` Geert Uytterhoeven
1999-08-15  9:23       ` Martin Mares
  -- strict thread matches above, loose matches on Subject: below --
1999-08-13 14:28 Justin McKillican
     [not found] <199908092022.WAA00327@piglet.cpu.lu>
1999-08-15  9:39 ` Martin Mares

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=199908081954.VAA02923@piglet.cpu.lu \
    --to=mlan@cpu.lu \
    --cc=Paul.Mackerras@cs.anu.edu.au \
    --cc=drow@false.org \
    --cc=hedrick@Astro.Dyer.Vanderbilt.Edu \
    --cc=linuxppc-dev@lists.linuxppc.org \
    --cc=mj@ucw.cz \
    /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).