summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2005-11-12 23:34:06 +0100
committerDominik Brodowski <linux@dominikbrodowski.net>2005-11-12 23:35:34 +0100
commit807277cbf9a240b133ee378a53b65375088ef62a (patch)
treee908475eb7cd340b58946e2ab8b55b2573944dbc
parentdfb279c97510da659816f4f055146bb1f9f0a870 (diff)
downloadblackbird-op-linux-807277cbf9a240b133ee378a53b65375088ef62a.tar.gz
blackbird-op-linux-807277cbf9a240b133ee378a53b65375088ef62a.zip
[PCMCIA] inform user of insertion and ejection events
Print out minimal information in dmesg whnever a CardBus or PCMCIA card is inserted into or ejected from a slot. This will make debugging certain types of bugs much easier, and is similar to output produced by other hotpluggable buses. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
-rw-r--r--drivers/pcmcia/cs.c6
-rw-r--r--drivers/pcmcia/ds.c3
2 files changed, 9 insertions, 0 deletions
diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c
index 234cdca6fe13..a30aa74304a2 100644
--- a/drivers/pcmcia/cs.c
+++ b/drivers/pcmcia/cs.c
@@ -513,6 +513,11 @@ static int socket_insert(struct pcmcia_socket *skt)
ret = socket_setup(skt, setup_delay);
if (ret == CS_SUCCESS) {
skt->state |= SOCKET_PRESENT;
+
+ printk(KERN_NOTICE "pccard: %s card inserted into slot %d\n",
+ (skt->state & SOCKET_CARDBUS) ? "CardBus" : "PCMCIA",
+ skt->sock);
+
#ifdef CONFIG_CARDBUS
if (skt->state & SOCKET_CARDBUS) {
cb_alloc(skt);
@@ -598,6 +603,7 @@ static int socket_resume(struct pcmcia_socket *skt)
static void socket_remove(struct pcmcia_socket *skt)
{
+ printk(KERN_NOTICE "pccard: card ejected from slot %d\n", skt->sock);
socket_shutdown(skt);
cs_socket_put(skt);
}
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c
index 39d096b52926..7f8219f3fd9e 100644
--- a/drivers/pcmcia/ds.c
+++ b/drivers/pcmcia/ds.c
@@ -544,6 +544,9 @@ struct pcmcia_device * pcmcia_device_add(struct pcmcia_socket *s, unsigned int f
list_add_tail(&p_dev->socket_device_list, &s->devices_list);
spin_unlock_irqrestore(&pcmcia_dev_list_lock, flags);
+ printk(KERN_NOTICE "pcmcia: registering new device %s\n",
+ p_dev->devname);
+
pcmcia_device_query(p_dev);
if (device_register(&p_dev->dev)) {
OpenPOWER on IntegriCloud