All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerald Champagne <gerald.champagne@esstech.com>
To: martin@dalecki.de
Cc: linux-kernel@vger.kernel.org
Subject: Re: ide prd table size
Date: 06 Aug 2002 11:27:05 -0500	[thread overview]
Message-ID: <1028651230.25642.106.camel@localhost.localdomain> (raw)
In-Reply-To: <3D4C67F4.20807@evision.ag>

On Sat, 2002-08-03 at 18:32, Marcin Dalecki wrote:
> Well the documentation is a bit inadequate.
> The reality is a bit more complicated and reveals if you look at the
> actual usage pattern:
> 
> 1. Two drives on a channel share them.
> 2. primary and secondary channel are tightly coupled by the
>     host controller hardware (in esp the PIIX) and have to
>     be allocated in one go.

The comments say that happens, but it doesn't.  Here's the code as I see
it:

- setup_pci_device calls setup_host_channel once for ATA_PRIMARY and
once for ATA_SECONDARY.

- setup_host_channel calls setup_channel_dma, which calls the host-
specific dma init routine, which calls ata_init_dma.

- The routine ata_init_dma allocates the prd table.  It says that it
will allocate enough room for the primary and secondary interface.  In
reality, it allocates a page of memory for a table when called for the
primary controller and uses half of it.  Then it does the same thing
when called for the secondary controller.  Two different tables are
defined separately with no guarantees about their placement, and neither
interface uses the other table at all.

None of this is a big issue, but with the new code that constant is
exported to the bio code and it's not just an internal definition in the
ide driver any more.  Since that constant is now a little more
important, I think it should have a little more accurate definition.  Or
at least a little more accurate description if the number happens to
remain the same.

Thanks.

Gerald



      reply	other threads:[~2002-08-06 16:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-02 17:30 ide prd table size Gerald Champagne
2002-08-03 23:32 ` Marcin Dalecki
2002-08-06 16:27   ` Gerald Champagne [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=1028651230.25642.106.camel@localhost.localdomain \
    --to=gerald.champagne@esstech.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin@dalecki.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.