From: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
To: Matthew Wilcox <matthew@wil.cx>
Cc: Jean Delvare <khali@linux-fr.org>,
Enrico Bartky <DOSProfi@web.de>,
linux-pci@atrey.karlin.mff.cuni.cz,
LM Sensors <sensors@stimpy.netroedge.com>,
LKML <linux-kernel@vger.kernel.org>,
Maarten Deprez <maartendeprez@scarlet.be>,
Greg KH <gregkh@suse.de>
Subject: Re: M7101
Date: Tue, 8 Feb 2005 14:13:22 +0300 [thread overview]
Message-ID: <20050208141322.A2831@jurassic.park.msu.ru> (raw)
In-Reply-To: <20050206150611.GR20386@parcelfarce.linux.theplanet.co.uk>; from matthew@wil.cx on Sun, Feb 06, 2005 at 03:06:11PM +0000
On Sun, Feb 06, 2005 at 03:06:11PM +0000, Matthew Wilcox wrote:
> Looks pretty good to me. For clarity, I'd change:
>
> - m7101 = pci_scan_single_device(dev->bus, 0x18);
> + m7101 = pci_scan_single_device(dev->bus, PCI_DEVFN(3, 0));
No, it's pretty broken regardless of the change. The integrated devices
on ALi southbridges (IDE, PMU, USB etc.) have programmable IDSELs,
so using hardcoded devfn is just dangerous. We must figure out what
the device number PMU will have before we turn it on.
Something like this:
// NOTE: These values are for m1543. Someone must verify whether
// they are the same for m1533 or not.
static char pmu_idsels[4] __devinitdata = { 28, 29, 14, 15 };
...
/* Get IDSEL mapping for PMU (bits 2-3 of 0x72). */
pci_read_config_byte(dev, 0x72, &val);
devnum = pmu_idsel[(val >> 2) & 3] - 11;
m7101 = pci_get_slot(dev->bus, PCI_DEVFN(devnum, 0));
if (m7101) {
/* Failure - there is another device with the same number. */
pci_dev_put(m7101);
return;
}
/* Enable PMU. */
...
m7101 = pci_scan_single_device(dev->bus, PCI_DEVFN(devnum, 0));
...
Ivan.
next prev parent reply other threads:[~2005-02-08 11:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-05 21:18 M7101 Enrico Bartky
2005-02-06 14:26 ` M7101 Jean Delvare
2005-02-06 15:06 ` M7101 Matthew Wilcox
2005-02-08 11:13 ` Ivan Kokshaysky [this message]
2005-02-08 20:39 ` M7101 Ondrej Zary
2005-02-07 3:42 ` M7101 Grant Grundler
2005-02-12 18:52 ` M7101 Jean Delvare
2005-02-07 20:43 ` M7101 Greg KH
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=20050208141322.A2831@jurassic.park.msu.ru \
--to=ink@jurassic.park.msu.ru \
--cc=DOSProfi@web.de \
--cc=gregkh@suse.de \
--cc=khali@linux-fr.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@atrey.karlin.mff.cuni.cz \
--cc=maartendeprez@scarlet.be \
--cc=matthew@wil.cx \
--cc=sensors@stimpy.netroedge.com \
/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®