From: Andrey Ulanov <Andrey.Ulanov@acronis.com>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] PCMCIA bug fix
Date: Tue, 29 Jun 2004 19:38:09 +0400 [thread overview]
Message-ID: <20040629153809.GA6531@dhcp6-7.acronis.ru> (raw)
[-- Attachment #1: Type: text/plain, Size: 193 bytes --]
I tested with one of ieee1394+usb2.0 PCMCIA adapters. Worked fine.
Without this patch only first device (ieee1394 controller) was
detected.
Please apply.
--
with best regards, Andrey Ulanov.
[-- Attachment #2: pcmcia-multi.patch --]
[-- Type: text/plain, Size: 918 bytes --]
--- linux/drivers/pcmcia/cardbus.c.pcmcia 2004-06-29 18:37:27.000000000 +0400
+++ linux/drivers/pcmcia/cardbus.c 2004-06-29 18:39:37.000000000 +0400
@@ -435,12 +435,12 @@
pci_readb(&tmp, PCI_HEADER_TYPE, &hdr);
fn = 1;
if (hdr & 0x80) {
- do {
- tmp.devfn = fn;
+ for (i = 0; i < 8; i++) {
+ tmp.devfn = i;
if (pci_readw(&tmp, PCI_VENDOR_ID, &v) || !v || v == 0xffff)
- break;
+ continue;
fn++;
- } while (fn < 8);
+ };
}
s->functions = fn;
@@ -450,11 +450,17 @@
memset(c, 0, fn * sizeof(struct cb_config_t));
irq = s->cap.pci_irq;
- for (i = 0; i < fn; i++) {
- struct pci_dev *dev = &c[i].dev;
+ for (i = 0, fn = 0; i < 8; i++) {
+ struct pci_dev *dev = &c[fn].dev;
u8 irq_pin;
int r;
+ tmp.devfn = i;
+ if(pci_readw(&tmp, PCI_VENDOR_ID, &v) || !v || v == 0xffff)
+ continue;
+
+ fn++;
+
dev->bus = bus;
dev->sysdata = bus->sysdata;
dev->devfn = i;
next reply other threads:[~2004-06-29 15:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-29 15:38 Andrey Ulanov [this message]
2004-06-29 15:48 ` [PATCH] PCMCIA bug fix Russell King
2004-06-30 5:39 ` Andrey Ulanov
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=20040629153809.GA6531@dhcp6-7.acronis.ru \
--to=andrey.ulanov@acronis.com \
--cc=linux-kernel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.