From: Dave Boutcher <sleddog@us.ibm.com>
To: James Bottomley <James.Bottomley@SteelEye.com>
Cc: Jeff Garzik <jgarzik@pobox.com>,
SCSI Mailing List <linux-scsi@vger.kernel.org>,
Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ibmvscsi driver - sixth version
Date: Wed, 31 Mar 2004 17:51:57 -0600 [thread overview]
Message-ID: <opr5q28vkql6e53g@us.ibm.com> (raw)
In-Reply-To: <1080776399.11299.63.camel@mulgrave>
On 31 Mar 2004 18:39:57 -0500, James Bottomley
<James.Bottomley@SteelEye.com> wrote:
>> > 14) why are you faking a PCI bus? The following is very, very wrong:
>> >
>> > +static struct pci_dev iseries_vscsi_dev = {
>> > + .dev.bus = &pci_bus_type,
>> > + .dev.bus_id = "vscsi",
>> > + .dev.release = noop_release
>> >
>> > Did I mention "very" wrong? :)
>> Because for iseries it is implemented in the pci code. While it may
>> look wrong, it is actually correct. Check out
>> arch/ppc64/kernel/iSeries_iommu.c and arch/ppc64/kernel/dma.c.
>> This device has to have dev->bus == &pci_bus_type otherwise the
>> dma_mapping_foo functions won't work correctly.
>
> Erm, something is very wrong in the iSeries code then. This
> iseries_vio_device is a struct device. As such, it should contain all
> the information it needs for the DMA API to act on it without performing
> silly pci device tricks.
>
> This looks like it's done because the iseries should be converted to the
> generic device infrastructure, but in fact it's not. Since the generic
> API has been around for over a year and was designed to solve precisely
> these very problems it needs fixing rather than trying to work around it
> in a driver.
There will always be 1 (no more, no less) of these struct devices in the
system, so I'll move the definition of this into iSeries_iommu and then
just reference it from the driver. I think that should abstract things
sufficiently.
Dave B
next prev parent reply other threads:[~2004-03-31 23:52 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-24 5:34 [PATCH] ibmvscsi driver - third version Dave Boutcher
2004-02-25 13:45 ` Christoph Hellwig
2004-02-25 17:53 ` [PATCH] ibmvscsi driver - fourth version Dave Boutcher
2004-03-11 17:43 ` James Bottomley
2004-03-11 21:25 ` Dave Boutcher
2004-03-11 22:07 ` James Bottomley
2004-03-12 15:59 ` [PATCH] ibmvscsi driver - fifth version Dave Boutcher
2004-03-31 21:26 ` [PATCH] ibmvscsi driver - sixth version Dave Boutcher
2004-03-31 21:58 ` James Bottomley
2004-03-31 22:37 ` Dave Boutcher
2004-03-31 22:02 ` Jeff Garzik
2004-03-31 23:12 ` Dave Boutcher
2004-03-31 23:39 ` James Bottomley
2004-03-31 23:51 ` Dave Boutcher [this message]
2004-04-01 0:10 ` Jeff Garzik
2004-04-01 6:17 ` [PATCH] qla2xxx: sleep while IRQ disabled fix in eh_abort Andrew Vasquez
2004-04-01 15:04 ` James Bottomley
2004-04-01 0:16 ` [PATCH] ibmvscsi driver - sixth version Jeff Garzik
2004-04-01 6:03 ` Andrew Vasquez
2004-04-01 7:13 ` Jeff Garzik
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=opr5q28vkql6e53g@us.ibm.com \
--to=sleddog@us.ibm.com \
--cc=James.Bottomley@SteelEye.com \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@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