public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: David Mosberger <davidm@hpl.hp.com>
To: linux-ia64@vger.kernel.org
Subject: Re: [Linux-ia64] [PATCH] fix casting problem in megaraid driver
Date: Wed, 06 Sep 2000 01:30:08 +0000	[thread overview]
Message-ID: <marc-linux-ia64-105590678205454@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-105590678205441@msgid-missing>

Hi Andrew,

>>>>> On Tue, 5 Sep 2000 10:50:38 -0700, aip@turbolinux.com said:

  Andrew> This patch fixes bug where mbox's pointer was cast to
  Andrew> integer, caused segfault.

The patch looks a bit suspicious to me.  I'm not familiar with the
megaraid driver, but looking at the relevant code, it's clear that
"paddr" really is a 32 bit PCI address (it gets written to the device
as a sequence of four byte writes), so changing it to u64 clearly
isn't 100% correct.

Now, looking at the code that calls the routine in question:

 mega_register_mailbox (megaCfg, virt_to_bus ((void *) &megaCfg->mailbox64));

we find that, yuck, this is another driver that hasn't been updated
for the PCI DMA interface.  Not much point in hacking around in this
driver until this gets rectified...

Note that the virt_to_bus() and bus_to_virt() macros have been
obsoleted by the PCI DMA interface and will be removed from the kernel
at some future point (I'm tempted to do this now so we'll discover
right away which drivers need cleaning up).

Can you ask the megaraid maintainers to update their driver to use the
PCI DMA interface?

	--david


  parent reply	other threads:[~2000-09-06  1:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-09-01 19:08 [Linux-ia64] [PATCH] fix casting problem in megaraid driver aip
2000-09-05 17:50 ` aip
2000-09-06  1:30 ` David Mosberger [this message]
2000-09-06  1:50 ` Matt_Domsch

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=marc-linux-ia64-105590678205454@msgid-missing \
    --to=davidm@hpl.hp.com \
    --cc=linux-ia64@vger.kernel.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