lkml.org 
[lkml]   [2000]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.4.0-test12-pre7


On Thu, 7 Dec 2000, Russell King wrote:
>
> Is it intentional that pci_assign_unassigned_resources should:
> 1. enable all devices?
> 2. enable bus master on all devices?

Probably intentional, but probably for all the wrong reasons.

The device enabling is still required for all drivers that aren't PCI
aware of PCI PnP issues. And remember - that used to be pretty much every
single Linux driver out there. So a traditional Linux system pretty much
required that all the devices came up fully enabled, because most drivers
wouldn't know to enable them (as shown by the UHCI bug).

These days, we should probably remove all the logic to enable everything
in pci_assign_unassigned_resources(), because these days pretty much all
PCI drivers are supposed to know about enabling the device (otherwise they
wouldn't work in a PC PnP environment anyway).

The only special case to this rule is "legacy devices" - things like
serial ports in legacy regions, VGA consoles etc, where a driver can use
them without even being aware of the fact that the hardware may be PCI.
Those devices tend to need setup even just for booting, though, so they
tend to be enabled rather early for other reasons anyway.

So I would probably vote for getting rid of the device enables in
pci_assign_unassigned_resources() (for all the reasons already mentioned
by others - scribbling over memory due to not being quiescent etc). But
it's not worth breaking now. 2.5.x material. Most PCI drivers may already
do the right thing, but I bet that the USB driver wasn't the only one who
forgot..

Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:51    [W:0.046 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site