From: Martin Mares <mj@suse.cz>
To: Gérard Roudier <groudier@club-internet.fr>
Cc: Jamie Lokier <lk@tantalophile.demon.co.uk>,
davej@suse.de,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: pdev_enable_device no longer used ?
Date: Mon, 11 Dec 2000 21:55:01 +0100 [thread overview]
Message-ID: <20001211215501.A390@albireo.ucw.cz> (raw)
In-Reply-To: <20001211002850.A14393@pcep-jamie.cern.ch> <Pine.LNX.4.10.10012111956510.1805-100000@linux.local>
In-Reply-To: <Pine.LNX.4.10.10012111956510.1805-100000@linux.local>; from groudier@club-internet.fr on Mon, Dec 11, 2000 at 08:20:20PM +0100
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/
next prev parent reply other threads:[~2000-12-11 21:25 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-12-09 11:30 davej
2000-12-09 11:38 ` Russell King
2000-12-09 12:15 ` Ivan Kokshaysky
2000-12-09 12:36 ` davej
2000-12-09 12:53 ` Alan Cox
2000-12-09 13:08 ` davej
2000-12-09 13:44 ` Ivan Kokshaysky
2000-12-09 14:26 ` Gérard Roudier
2000-12-09 17:48 ` Russell King
2000-12-09 20:57 ` Alan Cox
2000-12-09 15:04 ` Martin Mares
2000-12-09 18:11 ` davej
2000-12-10 23:28 ` Jamie Lokier
2000-12-11 0:34 ` davej
2000-12-11 19:40 ` Gérard Roudier
2000-12-12 2:43 ` Jes Sorensen
2000-12-11 19:20 ` Gérard Roudier
2000-12-11 20:55 ` Martin Mares [this message]
2000-12-11 20:49 ` Gérard Roudier
2000-12-11 21:48 ` David S. Miller
2000-12-11 21:30 ` Gérard Roudier
2000-12-11 22:21 ` David S. Miller
2000-12-11 22:07 ` Gérard Roudier
2000-12-11 23:03 ` David S. Miller
2000-12-12 19:17 ` Gérard Roudier
2000-12-12 20:14 ` David S. Miller
2000-12-12 20:28 ` Gérard Roudier
2000-12-12 22:39 ` David S. Miller
2000-12-11 23:16 ` Martin Mares
2000-12-12 18:56 ` Gérard Roudier
2000-12-12 12:21 ` Adrian Cox
2000-12-12 2:39 ` Jes Sorensen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20001211215501.A390@albireo.ucw.cz \
--to=mj@suse.cz \
--cc=davej@suse.de \
--cc=groudier@club-internet.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=lk@tantalophile.demon.co.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®