lkml.org 
[lkml]   [2000]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: pdev_enable_device no longer used ?
Hello Gerard!

> Having to call some pdev_enable_device() to have the cache line size
> configured looks like shit to me. After all, the BARs, INT, LATENCY TIMER,
> etc.. are configured prior to entering driver probe.

Once upon a time, they used to be, but they no longer are. Unfortunately, there
are lots of bogus devices which must be never assigned BARs nor routed
interrupts. You need to call pci_enable_device() after you recognize the device
as handled by your driver to get BARs and interrupts set up. Also, if your
driver uses bus mastering, it should call pci_set_master().

> Why should the cache line size be deferred to some call to some obscure
> mismaned thing ?

See above. I'm also not joyfully jumping when I think of it, but consider
it being a tax on being compatible with the rough world of buggy PCI devices.
Anyway, it's still zillion times better than random drivers modifying such
configuration registers in random manner, knowing nothing about the host
bridge and other such stuff.

(Side note: I'm not saying the method your driver uses was bad at the time
it was designed, I'm only saying that it's wrong wrt. the rest of the kernel
and it should be gone.)

Have a nice fortnight
--
Martin `MJ' Mares <mj@ucw.cz> <mj@suse.cz> http://atrey.karlin.mff.cuni.cz/~mj/
CChheecckk yyoouurr dduupplleexx sswwiittcchh..
-
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 13:28    [W:0.066 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site