[lkml]   [2005]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: avoiding pci_disable_device()...
At Mon, 14 Feb 2005 21:05:58 -0500,
Jeff Garzik wrote:
> Arjan van de Ven wrote:
> >>No. You also need to consider situations such as out-of-tree drivers
> >>for the same hardware (might not use PCI API), and situations where you
> >>have peer devices discovered and used (PCI API doesn't have "hey, <this>
> >>device is associated with <current driver>, too" capability)
> >
> >
> >
> > there's not a lot you or anyone else can do about such broken (and often
> > proprietary) drivers.... if a device doesn't use the kernel API's its
> > end of game basically. Adding more new API's isn't going to help you ...
> This specific instance isn't about adding a new API, but using an
> existing one correctly.
> If pci_request_regions() fails, that implies another driver is using the
> kernel API to let you know the region is unavailable. You should honor
> that, by not disabling the hardware in that case.

I guess an enable counter as Alan proposed would fix this problem
well, except for the case that an out-of-tree driver allocates the
resource without calling pci_enable_device().

OTOH this will introduce more buglets to broken drivers which don't
call pci_disable_device() properly. Consequently, the ad hoc fix to
each driver like Jeff's patch might be most practical...

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 14:10    [W:0.053 / U:12.252 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site