* Re: MSI: Use correct data offset for 32-bit MSI in read_msi_msg()
[not found] <87abr0oyj4.fsf@shaolin.home.digitalvampire.org>
@ 2007-10-03 18:25 ` Eric W. Biederman
2007-10-03 19:13 ` Roland Dreier
0 siblings, 1 reply; 5+ messages in thread
From: Eric W. Biederman @ 2007-10-03 18:25 UTC (permalink / raw)
To: Roland Dreier; +Cc: Greg KH, linux-pci, linux-kernel
Roland Dreier <roland@digitalvampire.org> writes:
> While reading the MSI code trying to find a reason why MSI wouldn't
> work for devices that have a 32-bit MSI address capability, I noticed
> that read_msi_msg() seems to read the message data from the wrong
> offset in this case.
Doh! Sorry about that.
Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
> Signed-off-by: Roland Dreier <roland@digitalvampire.org>
> ---
> Unfortunately MSI still doesn't seem to work with Intel 945GM
> integrated graphics on my laptop, even with this fix....
>
> drivers/pci/msi.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
> index be1df85..87e0161 100644
> --- a/drivers/pci/msi.c
> +++ b/drivers/pci/msi.c
> @@ -132,7 +132,7 @@ void read_msi_msg(unsigned int irq, struct msi_msg *msg)
> pci_read_config_word(dev, msi_data_reg(pos, 1), &data);
> } else {
> msg->address_hi = 0;
> - pci_read_config_word(dev, msi_data_reg(pos, 1), &data);
> + pci_read_config_word(dev, msi_data_reg(pos, 0), &data);
> }
> msg->data = data;
> break;
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: MSI: Use correct data offset for 32-bit MSI in read_msi_msg()
2007-10-03 18:25 ` MSI: Use correct data offset for 32-bit MSI in read_msi_msg() Eric W. Biederman
@ 2007-10-03 19:13 ` Roland Dreier
2007-10-03 19:55 ` Eric W. Biederman
0 siblings, 1 reply; 5+ messages in thread
From: Roland Dreier @ 2007-10-03 19:13 UTC (permalink / raw)
To: Eric W. Biederman; +Cc: Greg KH, linux-pci, linux-kernel
> > While reading the MSI code trying to find a reason why MSI wouldn't
> > work for devices that have a 32-bit MSI address capability, I noticed
> > that read_msi_msg() seems to read the message data from the wrong
> > offset in this case.
>
> Doh! Sorry about that.
Doesn't matter, it wasn't the bug hitting me anyway :) the IRQ never
got affinity changed so read_msi_msg() never even got called.
I'm starting to think that Intel 945GM graphics just has a busted MSI
implementation, although there may be a bug hiding in the Linux code
that I'm not seeing.
- R.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: MSI: Use correct data offset for 32-bit MSI in read_msi_msg()
2007-10-03 19:13 ` Roland Dreier
@ 2007-10-03 19:55 ` Eric W. Biederman
2007-10-03 20:03 ` Roland Dreier
0 siblings, 1 reply; 5+ messages in thread
From: Eric W. Biederman @ 2007-10-03 19:55 UTC (permalink / raw)
To: Roland Dreier; +Cc: Greg KH, linux-pci, linux-kernel
Roland Dreier <roland@digitalvampire.org> writes:
> > > While reading the MSI code trying to find a reason why MSI wouldn't
> > > work for devices that have a 32-bit MSI address capability, I noticed
> > > that read_msi_msg() seems to read the message data from the wrong
> > > offset in this case.
> >
> > Doh! Sorry about that.
>
> Doesn't matter, it wasn't the bug hitting me anyway :) the IRQ never
> got affinity changed so read_msi_msg() never even got called.
>
> I'm starting to think that Intel 945GM graphics just has a busted MSI
> implementation, although there may be a bug hiding in the Linux code
> that I'm not seeing.
Well it is a bug worth fixing. Who knows it may have something
to do with the disable_irq problems the forcedeth driver was seeing.
Right now MSI is still sufficiently new that everyone is still getting
the bugs out of their implementations.
Eric
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: MSI: Use correct data offset for 32-bit MSI in read_msi_msg()
2007-10-03 19:55 ` Eric W. Biederman
@ 2007-10-03 20:03 ` Roland Dreier
2007-10-03 20:34 ` Eric W. Biederman
0 siblings, 1 reply; 5+ messages in thread
From: Roland Dreier @ 2007-10-03 20:03 UTC (permalink / raw)
To: Eric W. Biederman; +Cc: Roland Dreier, Greg KH, linux-pci, linux-kernel
> Well it is a bug worth fixing. Who knows it may have something
> to do with the disable_irq problems the forcedeth driver was seeing.
I agree completely, the fix looks obvious and there's no point in
leaving the bug there. I just don't have a test case that I can point
to as being fixed by this, since I don't have a working 32-bit MSI
device...
Do you know whether the forcedeth devices have a 32-bit MSI address?
- R.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: MSI: Use correct data offset for 32-bit MSI in read_msi_msg()
2007-10-03 20:03 ` Roland Dreier
@ 2007-10-03 20:34 ` Eric W. Biederman
0 siblings, 0 replies; 5+ messages in thread
From: Eric W. Biederman @ 2007-10-03 20:34 UTC (permalink / raw)
To: Roland Dreier; +Cc: Roland Dreier, Greg KH, linux-pci, linux-kernel
Roland Dreier <rdreier@cisco.com> writes:
> > Well it is a bug worth fixing. Who knows it may have something
> > to do with the disable_irq problems the forcedeth driver was seeing.
>
> I agree completely, the fix looks obvious and there's no point in
> leaving the bug there. I just don't have a test case that I can point
> to as being fixed by this, since I don't have a working 32-bit MSI
> device...
>
> Do you know whether the forcedeth devices have a 32-bit MSI address?
Sorry I don't. The ones I have don't have an MSI capability.
Eric
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-10-03 20:35 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <87abr0oyj4.fsf@shaolin.home.digitalvampire.org>
2007-10-03 18:25 ` MSI: Use correct data offset for 32-bit MSI in read_msi_msg() Eric W. Biederman
2007-10-03 19:13 ` Roland Dreier
2007-10-03 19:55 ` Eric W. Biederman
2007-10-03 20:03 ` Roland Dreier
2007-10-03 20:34 ` Eric W. Biederman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox