Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@oss.sgi.com>
To: Erik Niessen <erik_niessen@hotmail.com>
Cc: linux-mips@oss.sgi.com
Subject: Re: Doing DMA with the ide-driver
Date: Thu, 6 Jul 2000 03:25:10 +0200	[thread overview]
Message-ID: <20000706032510.A5122@bacchus.dhis.org> (raw)
In-Reply-To: <20000706002824.64367.qmail@hotmail.com>; from erik_niessen@hotmail.com on Thu, Jul 06, 2000 at 02:28:24AM +0200

On Thu, Jul 06, 2000 at 02:28:24AM +0200, Erik Niessen wrote:

> I am trying to get an external ide-pci controller (CMD 646) working on an 
> embedded mips board. The kernel-source is based on a 2.2.12 source tree.
> 
> The problem is doing DMA. I receive address (0x80ff0000) for my dmatable in 
> the function ide_setup_dma (__get_free_pages). Then in ide_buildtable it 
> sets up the dmatable. Address 0x80376000 and a count of 0x400 
> (check_partition reads 2 sectors from the harddrive). These are all virtual 
> addresses. For setting up the dmatable I use physical addresses. On the 
> embedded board there is a 1:1 map of i/o bus to main memory so 
> platform_mem_iobus_base is 0.
> 
> So after doing the DMA read, I read only zero's at address 0x80376000 and 
> the kernel hangs. But the harddrive is ready and I can't find any errors. It 
> seems that it writes the data to a different memory location. After 
> searching the memory the data is written at address 0x80000000??  Is the 
> memory manager somewhere in between???
> 
> The next thing I did was reserving a piece of physical memory for DMA and 
> fill in the dmatable myself. So that it uses my piece of reserved memory. 
> After I did this, the data was at the correct address and the kernel didn't 
> crash. Is this the solution???

What you're observing can be explained by caches not being flushed properly.
What kernel versions are you using?

  Ralf

      reply	other threads:[~2000-07-06  1:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-07-06  0:28 Doing DMA with the ide-driver Erik Niessen
2000-07-06  1:25 ` Ralf Baechle [this message]

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=20000706032510.A5122@bacchus.dhis.org \
    --to=ralf@oss.sgi.com \
    --cc=erik_niessen@hotmail.com \
    --cc=linux-mips@oss.sgi.com \
    /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