From: Russell King <rmk@arm.linux.org.uk>
To: Linux Kernel List <linux-kernel@vger.kernel.org>
Subject: Re: [CFT] 3/6 (4): add SOCKET_CARDBUS_CONFIG flag
Date: Wed, 12 Mar 2003 21:00:26 +0000 [thread overview]
Message-ID: <20030312210026.F27656@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20030312205659.C27656@flint.arm.linux.org.uk>; from rmk@arm.linux.org.uk on Wed, Mar 12, 2003 at 08:56:59PM +0000
pcmcia-4.diff
Cardbus uses socket->cb_config to detect when the cardbus card has
been initialised. Since cb_config will eventually die, we need a
solution - introduce the SOCKET_CARDBUS_CONFIG flag, which is set
once we have initialised the cardbus socket.
diff -ur orig/drivers/pcmcia/cs.c linux/drivers/pcmcia/cs.c
--- orig/drivers/pcmcia/cs.c Sun Mar 2 16:25:15 2003
+++ linux/drivers/pcmcia/cs.c Sat Mar 1 19:20:22 2003
@@ -621,8 +621,10 @@
send_event(s, CS_EVENT_PM_RESUME, CS_EVENT_PRI_LOW);
} else if (s->state & SOCKET_SETUP_PENDING) {
#ifdef CONFIG_CARDBUS
- if (s->state & SOCKET_CARDBUS)
+ if (s->state & SOCKET_CARDBUS) {
cb_alloc(s);
+ s->state |= SOCKET_CARDBUS_CONFIG;
+ }
#endif
send_event(s, CS_EVENT_CARD_INSERTION, CS_EVENT_PRI_LOW);
s->state &= ~SOCKET_SETUP_PENDING;
@@ -1072,7 +1074,7 @@
config->Vcc = s->socket.Vcc;
config->Vpp1 = config->Vpp2 = s->socket.Vpp;
config->Option = s->cap.cb_dev->subordinate->number;
- if (s->cb_config) {
+ if (s->state & SOCKET_CARDBUS_CONFIG) {
config->Attributes = CONF_VALID_CLIENT;
config->IntType = INT_CARDBUS;
config->AssignedIRQ = s->irq.AssignedIRQ;
diff -ur orig/drivers/pcmcia/cs_internal.h linux/drivers/pcmcia/cs_internal.h
--- orig/drivers/pcmcia/cs_internal.h Sat Mar 1 20:27:30 2003
+++ linux/drivers/pcmcia/cs_internal.h Sat Mar 1 19:19:50 2003
@@ -176,6 +176,7 @@
#define SOCKET_IO_REQ(i) (0x1000<<(i))
#define SOCKET_REGION_INFO 0x4000
#define SOCKET_CARDBUS 0x8000
+#define SOCKET_CARDBUS_CONFIG 0x10000
#define CHECK_HANDLE(h) \
(((h) == NULL) || ((h)->client_magic != CLIENT_MAGIC))
--
Russell King (rmk@arm.linux.org.uk) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html
next prev parent reply other threads:[~2003-03-12 20:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-12 20:56 [CFT] PCMCIA patches Russell King
2003-03-12 20:58 ` [CFT] 1/6 (2) kill get_*_map Russell King
2003-03-12 20:59 ` [CFT] 2/6 (3): Remove bus_* abstractions Russell King
2003-03-12 21:00 ` Russell King [this message]
2003-03-12 21:01 ` [CFT] 4/6 (5): Add some locking to rsrc_mgr.c Russell King
2003-03-12 21:02 ` [CFT] 5/6 (6): Introduce CONFIG_PCMCIA_PROBE Russell King
2003-03-12 21:03 ` [CFT] 6/6 (7): Remove support for old cardbus clients Russell King
2003-03-24 11:30 ` [CFT] PCMCIA patches Paul Mackerras
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=20030312210026.F27656@flint.arm.linux.org.uk \
--to=rmk@arm.linux.org.uk \
--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.