public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] deal with lack of acpi prt entries gracefully
@ 2003-09-09 20:13 Jesse Barnes
  2003-09-09 20:43 ` Andrew de Quincey
  0 siblings, 1 reply; 14+ messages in thread
From: Jesse Barnes @ 2003-09-09 20:13 UTC (permalink / raw)
  To: andrew.grover, linux-kernel

Instead of going into an infinite loop because the list isn't setup yet,
just return NULL if there are no prt entries.

Jesse


diff -Nru a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c
--- a/drivers/acpi/pci_irq.c	Tue Sep  9 10:24:14 2003
+++ b/drivers/acpi/pci_irq.c	Tue Sep  9 10:24:14 2003
@@ -71,6 +71,9 @@
 
 	ACPI_FUNCTION_TRACE("acpi_pci_irq_find_prt_entry");
 
+	if (!acpi_prt.count)
+		return_PTR(NULL);
+
 	/*
 	 * Parse through all PRT entries looking for a match on the specified
 	 * PCI device's segment, bus, device, and pin (don't care about func).

^ permalink raw reply	[flat|nested] 14+ messages in thread
* RE: [PATCH] deal with lack of acpi prt entries gracefully
@ 2003-10-01  1:22 Brown, Len
  0 siblings, 0 replies; 14+ messages in thread
From: Brown, Len @ 2003-10-01  1:22 UTC (permalink / raw)
  To: Jesse Barnes, Andrew de Quincey; +Cc: Grover, Andrew, linux-kernel

> -----Original Message-----
> From: Jesse Barnes [mailto:jbarnes@sgi.com] 
> Sent: Thursday, September 11, 2003 6:05 PM
> To: Andrew de Quincey
> Cc: Grover, Andrew; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH] deal with lack of acpi prt entries gracefully
> 
> 
> On Thu, Sep 11, 2003 at 11:00:30PM +0100, Andrew de Quincey wrote:
> > > None of the above.  We have our own NUMAlink based 
> interrupt protocol
> > > model.
> > 
> > Oooer! Hmm, the existing code would probably NOT like 
> having _PRT entries for 
> > a model it doesn't know about.... you could add support for 
> it fairly easily 
> > though I suppose...
> 
> Yeah, that's what Andy suggested too.  I guess I have to use 
> one of the
> reserved fields and try to get the ACPI spec updated.
> 
> Thanks,
> Jesse

Even if this exotic box shouldn't be running this flavor of the code,
the inifinite loop part struck me as less than bomb proof;-)
So I pulled the return on count==0 check into the ACPI patch.

Thanks,
-Len

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2003-10-01  1:23 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-09 20:13 [PATCH] deal with lack of acpi prt entries gracefully Jesse Barnes
2003-09-09 20:43 ` Andrew de Quincey
2003-09-09 21:17   ` Jesse Barnes
2003-09-09 21:38     ` Andrew de Quincey
2003-09-09 22:01       ` Jesse Barnes
2003-09-10 21:30         ` Andrew de Quincey
2003-09-10 21:38           ` Jesse Barnes
2003-09-11 20:40             ` Andrew de Quincey
2003-09-11 20:53               ` Jesse Barnes
2003-09-11 21:13                 ` Andrew de Quincey
2003-09-11 21:20                   ` Jesse Barnes
2003-09-11 22:00                     ` Andrew de Quincey
2003-09-11 22:04                       ` Jesse Barnes
  -- strict thread matches above, loose matches on Subject: below --
2003-10-01  1:22 Brown, Len

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox