linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <bh40@calva.net>
To: Joseph Garcia <jpgarcia@execpc.com>, linuxppc-dev@lists.linuxppc.org
Subject: Re: Problems with Ethernet on PowerBook Wallstreet G3
Date: Thu, 13 Apr 2000 15:59:06 +0200	[thread overview]
Message-ID: <20000413155906.012320@mailhost.mipsys.com> (raw)
In-Reply-To: <38F5C457.C46F04B2@execpc.com>


On Thu, Apr 13, 2000, Joseph Garcia <jpgarcia@execpc.com> wrote:

>Could this be related to the IDE issues that have been discovered with
my hard
>drive?  This would mean that there could be a bug in the way DMA is
>implemented
>in hardware on the wallstreet motherboard.  It has been mentioned its
>possible.
>(small flashback: corruption on occation when playing sound, often ro
programs
>when executed (vi got hit; would run, but would error. few flipped bits
>probably), mentioned in SoundJam's readme.  'Contact Apple')

Note that the controller used on the wallstreet is the same used on the
Beige G3 and is very close to the one used in iMacs and B&W G3s.

>Since MacOS doesn't seem to have any of these problems, there is a solution.
>
>my hard drive from dmesg:
>hda: IBM-DYLA-28100, ATA DISK drive
>hda: IBM-DYLA-28100, 7815MB w/459kB Cache, CHS=15880/16/63, (U)DMA
>
>Since my brother's lombard has a Toshiba HD, could this all be funkyness with
>IBM drives, God forbid? (as opposed to just the BMAC+ doesnt have the hw bug)
>
>Before we start being suspicious, anyone with a non-IBM drive having this
>problem?

Well, there is no mention I've seen of such a bug in the Darwin driver.
However, there are a few things worth noting:

 - Darwin enables a bit in the host bridge that allows retrying of some
DMA transactions. Look like this bit is necessary (don't ask me why) and
is not set by the firmware. I have added code to set it in my recent
kernels. However, since Wallstreet's are usually booted via BootX, MacOS
should have set it before entering the kernel. (I don't have the details
under the hand, but you can look in my rsync tree, it's in pmac_pci.c).

 - Older Darwin source contains a comment about a bug in Ohare and Grand
Central DBDMA controller known to clobber datas around memory buffers
when they are not 16-byte aligned. Well, to my knowledge, the IDE always
transfers aligned pages, and the controller in the wallstreet is not an
ohare, but it's worth noting (and should be fixed in other drivers).

 - I have to check what's exactly happening when an odd byte count is
transferred (this happens regulary with ATAPI). The controller itself
always transfer even quantities. Darwin has special provisions for that
by adding a special command at the end of the DBDMA transfer to copy this
remaining byte to a bit bucket. We don't.

 - Before starting a DBDMA command, it would be nice to issue at least a
sync to make sure that the write of the last DBDMA commands to memory has
left the CPU write buffer and will be hanlded by the cache coherency
before the DBDMA controller actually starts. I don't know if there's room
for trouble or not, but this would do no harm. Actually, I'm wondering if
it may be better to store DBDMA command lists in non-cachable memory.

 - There may be something wrong in the MDMA timing calculations. The code
we use should be equivalent to darwin. but...


That's all I have in mind for now. Of course, there's still the
possibility of a bug in the IDE layer that would cause this corruption...
(or a bug in the sound driver that would cause the sound DBDMA channel to
overflow it's allocated buffers but I don't think so).

Note finally that a generic kernel ext2 bug was recently found that could
cause corruptions under certain conditions, especially OOM. (see the
kernel mailing list).

Ben.


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

  reply	other threads:[~2000-04-13 13:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.LNX.4.10.10004130948140.10131-100000@opal.biophys.uni-duesseldorf.de>
2000-04-13  9:39 ` Problems with Ethernet on PowerBook Wallstreet G3 Wolfgang Denk
     [not found]   ` <38F5B1C0.FC8863EB@drea.dnd.ca>
2000-04-13 12:57     ` Joseph Garcia
2000-04-13 13:59       ` Benjamin Herrenschmidt [this message]
2000-04-13 16:47       ` David A. Gatwood
     [not found] <38F5A91D.1212ECEC@drea.dnd.ca>
2000-04-13 12:23 ` Wolfgang Denk
2000-04-12 22:45 Wolfgang Denk
     [not found] <Pine.LNX.3.96.1000412105423.25261A-100000@deepspace.mklinux.org>
2000-04-12 18:10 ` Joseph Garcia
2000-04-12 18:55   ` David A. Gatwood
2000-04-12 22:18   ` Wolfgang Denk
2000-04-12 18:25 ` Benjamin Herrenschmidt
2000-04-12 20:06   ` Michael Schmitz
     [not found] <Pine.LNX.3.96.1000411215343.219D-100000@deepspace.mklinux.org>
2000-04-12 12:44 ` Benjamin Herrenschmidt
  -- strict thread matches above, loose matches on Subject: below --
2000-04-11 18:22 Wolfgang Denk

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=20000413155906.012320@mailhost.mipsys.com \
    --to=bh40@calva.net \
    --cc=jpgarcia@execpc.com \
    --cc=linuxppc-dev@lists.linuxppc.org \
    /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).