Skip to contentSkip to conversation

PCMCIA fixes for 2.6.19-rc6

GIT PULL In review Dominik Brodowski 4 participants 9 messages Nov 19, 2006 – Nov 20, 2006 libata

lore
Share & tools
lore
#0 lore raw

Hej Linus,

Please pull from

	git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-fixes-2.6.git/

The diffstat and list of changes follows; the patches will be sent out to the linux-pcmcia list and other relevant subsystem lists, if applicable.

Thanks,
Dominik

----

 drivers/ata/pata_pcmcia.c       |    2 
 drivers/char/pcmcia/cm4000_cs.c |    6 -
 drivers/char/pcmcia/cm4040_cs.c |    6 -
 drivers/ide/legacy/ide-cs.c     |    2 
 drivers/pcmcia/cs.c             |    7 -
 drivers/pcmcia/cs_internal.h    |    2 
 drivers/pcmcia/ds.c             |  165 +++++++++++++++++++++++-----------------
 drivers/pcmcia/pcmcia_ioctl.c   |    7 +
 drivers/pcmcia/pd6729.c         |    8 -
 drivers/pcmcia/socket_sysfs.c   |    4 
 include/pcmcia/ss.h             |    5 -
 11 files changed, 125 insertions(+), 89 deletions(-)

----
Akinobu Mita (1):
cm4000_cs: fix return value check

Dominik Brodowski (4):
pcmcia: start over after CIS override
pcmcia: multifunction card handling fixes
pcmcia: fix 'rmmod pcmcia' with leftover devices
pcmcia: handle __copy_from_user() return value in ioctl

Komuro (1):
pcmcia: allow shared IRQs on pd6729 sockets

Marcin Juszkiewicz (1):
pcmcia: yet another IDE ID

Matt Reimer (1):
pcmcia: Add an id to ide-cs.c

#1 lore raw

PATCH 1/8 pcmcia: Add an id to ide-cs.c

From: Matt Reimer <[email protected]>
Date: Thu, 26 Oct 2006 15:56:00 -0700
Subject: [PATCH] pcmcia: Add an id to ide-cs.c

Add an ID entry for:

product info: "TRANSCEND", "TS1GCF80", "", ""
manfid: 0x000a, 0x0000
function: 4 (fixed disk)

---
 drivers/ata/pata_pcmcia.c   |    1 +
 drivers/ide/legacy/ide-cs.c |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)
drivers/ata/pata_pcmcia.c +1 -0
index e93ea27..e587e73 100644
@@ -356,6 +356,7 @@ static struct pcmcia_device_id pcmcia_de
 	PCMCIA_DEVICE_PROD_ID12("SMI VENDOR", "SMI PRODUCT", 0x30896c92, 0x703cc5f6),
 	PCMCIA_DEVICE_PROD_ID12("TOSHIBA", "MK2001MPL", 0xb4585a1a, 0x3489e003),
 	PCMCIA_DEVICE_PROD_ID1("TRANSCEND    512M   ", 0xd0909443),
+	PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS1GCF80", 0x709b1bf1, 0x2a54d4b1),
 	PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS4GCF120", 0x709b1bf1, 0xf54a91c8),
 	PCMCIA_DEVICE_PROD_ID12("WIT", "IDE16", 0x244e5994, 0x3e232852),
 	PCMCIA_DEVICE_PROD_ID1("STI Flash", 0xe4a13209),
drivers/ide/legacy/ide-cs.c +1 -0
index bef4759..8b04ed4 100644
@@ -408,6 +408,7 @@ static struct pcmcia_device_id ide_ids[]
 	PCMCIA_DEVICE_PROD_ID12("SMI VENDOR", "SMI PRODUCT", 0x30896c92, 0x703cc5f6),
 	PCMCIA_DEVICE_PROD_ID12("TOSHIBA", "MK2001MPL", 0xb4585a1a, 0x3489e003),
 	PCMCIA_DEVICE_PROD_ID1("TRANSCEND    512M   ", 0xd0909443),
+	PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS1GCF80", 0x709b1bf1, 0x2a54d4b1),
 	PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS4GCF120", 0x709b1bf1, 0xf54a91c8),
 	PCMCIA_DEVICE_PROD_ID12("WIT", "IDE16", 0x244e5994, 0x3e232852),
 	PCMCIA_DEVICE_PROD_ID1("STI Flash", 0xe4a13209),
Signature · 1 line
1.4.4
#2 lore raw

Re: [PATCH 1/8] pcmcia: Add an id to ide-cs.c

Quoted 10 lines · Dominik Brodowski

From: Matt Reimer <[email protected]>
Date: Thu, 26 Oct 2006 15:56:00 -0700
Subject: [PATCH] pcmcia: Add an id to ide-cs.c

Add an ID entry for:

product info: "TRANSCEND", "TS1GCF80", "", ""
manfid: 0x000a, 0x0000
function: 4 (fixed disk)

Erm, silly question: isn't this supposed to be matched by the following:

static struct pcmcia_device_id ide_ids[] = {
        PCMCIA_DEVICE_FUNC_ID(4),

or are we going to be ignoring the function ID and only matching using the manfid and product info strings?

Signature · 3 lines
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core
#3 lore raw

Re: [PATCH 1/8] pcmcia: Add an id to ide-cs.c

Hi,

Quoted 12 lines · Russell King
Quoted 10 lines · Dominik Brodowski

From: Matt Reimer <[email protected]>
Date: Thu, 26 Oct 2006 15:56:00 -0700
Subject: [PATCH] pcmcia: Add an id to ide-cs.c

Add an ID entry for:

product info: "TRANSCEND", "TS1GCF80", "", ""
manfid: 0x000a, 0x0000
function: 4 (fixed disk)

Quoted 7 lines

Erm, silly question: isn't this supposed to be matched by the following:

static struct pcmcia_device_id ide_ids[] = {
        PCMCIA_DEVICE_FUNC_ID(4),

or are we going to be ignoring the function ID and only matching using the manfid and product info strings?

As the matching by func_id is fuzzy and gives false positives, this is a multiple-step process:

a) the kernel checks all built-in and previously loaded modules for prod_id and manf_id matches

b) userspace (udev/hotplug + modprobe) loads appropriate modules (including those which are only matched by func_id

c) during the module initialization (e.g. modprobe hasn't returned yet) the kernel checks the modules based on prod_id and manf_id matches

d) after all these modprobe calls return, userspace writes "1" into /sys/$devpath/allow_func_id_match. Then, the kernel re-checks all built-in and previously loaded modules for func_id "fuzzy" matches.

It is self-evident that steps b)-d) only work once userspace is ready. As PCMCIA drivers should be able to work even before that, manf_id and prod_id table entries do make sense even if func_id matching works.

Thanks,
Dominik

#4 lore raw

Re: [PATCH 1/8] pcmcia: Add an id to ide-cs.c

Quoted 12 lines · Dominik Brodowski

As the matching by func_id is fuzzy and gives false positives, this is a multiple-step process:

a) the kernel checks all built-in and previously loaded modules for prod_id and manf_id matches

b) userspace (udev/hotplug + modprobe) loads appropriate modules (including those which are only matched by func_id

c) during the module initialization (e.g. modprobe hasn't returned yet) the kernel checks the modules based on prod_id and manf_id matches

Quoted 7 lines

d) after all these modprobe calls return, userspace writes "1" into /sys/$devpath/allow_func_id_match. Then, the kernel re-checks all built-in and previously loaded modules for func_id "fuzzy" matches.

It is self-evident that steps b)-d) only work once userspace is ready. As PCMCIA drivers should be able to work even before that, manf_id and prod_id table entries do make sense even if func_id matching works.

However, it doesn't scale. You're going to be forever adding entry after entry after entry to drivers. It's a never-ending job.

Of course, it's really up to you whether you want this task. 8)

Signature · 3 lines
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core
#5 lore raw

PATCH 2/8 pcmcia: yet another IDE ID

In reply to Dominik Brodowski

From: Marcin Juszkiewicz <[email protected]>
Date: Mon, 30 Oct 2006 22:28:09 +0100
Subject: [PATCH] pcmcia: yet another IDE ID

Microdrive reported by one of OpenEmbedded developers.

product info: "WEIDA", "TWTTI", ""
manfid: 0x000a, 0x0000
function: 4 (fixed disk)

(equivalent update to pata_pcmcia.c by Dominik Brodowski)

---
 drivers/ata/pata_pcmcia.c   |    1 +
 drivers/ide/legacy/ide-cs.c |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)
drivers/ata/pata_pcmcia.c +1 -0
index e587e73..03f77f3 100644
@@ -359,6 +359,7 @@ static struct pcmcia_device_id pcmcia_de
 	PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS1GCF80", 0x709b1bf1, 0x2a54d4b1),
 	PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS4GCF120", 0x709b1bf1, 0xf54a91c8),
 	PCMCIA_DEVICE_PROD_ID12("WIT", "IDE16", 0x244e5994, 0x3e232852),
+	PCMCIA_DEVICE_PROD_ID12("WEIDA", "TWTTI", 0xcc7cf69c, 0x212bb918),
 	PCMCIA_DEVICE_PROD_ID1("STI Flash", 0xe4a13209),
 	PCMCIA_DEVICE_PROD_ID12("STI", "Flash 5.0", 0xbf2df18d, 0x8cb57a0e),
 	PCMCIA_MFC_DEVICE_PROD_ID12(1, "SanDisk", "ConnectPlus", 0x7a954bd9, 0x74be00c6),
drivers/ide/legacy/ide-cs.c +1 -0
index 8b04ed4..7e8d778 100644
@@ -411,6 +411,7 @@ static struct pcmcia_device_id ide_ids[]
 	PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS1GCF80", 0x709b1bf1, 0x2a54d4b1),
 	PCMCIA_DEVICE_PROD_ID12("TRANSCEND", "TS4GCF120", 0x709b1bf1, 0xf54a91c8),
 	PCMCIA_DEVICE_PROD_ID12("WIT", "IDE16", 0x244e5994, 0x3e232852),
+	PCMCIA_DEVICE_PROD_ID12("WEIDA", "TWTTI", 0xcc7cf69c, 0x212bb918),
 	PCMCIA_DEVICE_PROD_ID1("STI Flash", 0xe4a13209),
 	PCMCIA_DEVICE_PROD_ID12("STI", "Flash 5.0", 0xbf2df18d, 0x8cb57a0e),
 	PCMCIA_MFC_DEVICE_PROD_ID12(1, "SanDisk", "ConnectPlus", 0x7a954bd9, 0x74be00c6),
Signature · 1 line
1.4.4
#7 lore raw
In reply to Dominik Brodowski
Quoted 9 lines · On Sun, 19 Nov 2006 11:34:27 -0500 Dominik Brodowski…

Hej Linus,

Please pull from

	git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-fixes-2.6.git/

...

pcmcia: fix 'rmmod pcmcia' with leftover devices

Is this the patch about which Daniel said "does not fix the problem:
ds.c:ds_event() will never be called because s->callback is set to NULL just before send_event() which means send_event() does nothing at all.."?

#8 lore raw

Hi,

Quoted 9 lines · Andrew Morton
Quoted 6 lines · On Sun, 19 Nov 2006 11:34:27 -0500 Dominik Brodowski…

Hej Linus,

Please pull from

Quoted 7 lines
Quoted 3 lines

...

pcmcia: fix 'rmmod pcmcia' with leftover devices

Is this the patch about which Daniel said "does not fix the problem:
ds.c:ds_event() will never be called because s->callback is set to NULL just before send_event() which means send_event() does nothing at all.."?

Yes, this tree included this broken patch. I have re-created a new tree, now including Daniel's proper patch instead of my broken one, and one other bugfix to one of my patches (spotted by Randy Dunlap) which can be pulled from

git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-fixes-new-2.6.git/

The diffstat and list of changes follows.

Thanks,
Dominik

----

 drivers/ata/pata_pcmcia.c       |    2 
 drivers/char/pcmcia/cm4000_cs.c |    6 -
 drivers/char/pcmcia/cm4040_cs.c |    6 -
 drivers/ide/legacy/ide-cs.c     |    2 
 drivers/pcmcia/cs_internal.h    |    2 
 drivers/pcmcia/ds.c             |  170 +++++++++++++++++++++++-----------------
 drivers/pcmcia/pcmcia_ioctl.c   |    7 +
 drivers/pcmcia/pd6729.c         |    8 -
 drivers/pcmcia/socket_sysfs.c   |    4 
 include/pcmcia/ss.h             |    5 -
 10 files changed, 126 insertions(+), 86 deletions(-)

----
Akinobu Mita (1):
cm4000_cs: fix return value check

Daniel Ritz (1):
pcmcia: fix 'rmmod pcmcia' with unbound devices

Dominik Brodowski (3):
pcmcia: start over after CIS override
pcmcia: multifunction card handling fixes
pcmcia: handle __copy_from_user() return value in ioctl

Komuro (1):
pcmcia: allow shared IRQs on pd6729 sockets

Marcin Juszkiewicz (1):
pcmcia: yet another IDE ID

Matt Reimer (1):
pcmcia: Add an id to ide-cs.c