提交 807277cb 编写于 作者: D Dominik Brodowski

[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: NDominik Brodowski <linux@dominikbrodowski.net>
上级 dfb279c9
...@@ -513,6 +513,11 @@ static int socket_insert(struct pcmcia_socket *skt) ...@@ -513,6 +513,11 @@ static int socket_insert(struct pcmcia_socket *skt)
ret = socket_setup(skt, setup_delay); ret = socket_setup(skt, setup_delay);
if (ret == CS_SUCCESS) { if (ret == CS_SUCCESS) {
skt->state |= SOCKET_PRESENT; 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 #ifdef CONFIG_CARDBUS
if (skt->state & SOCKET_CARDBUS) { if (skt->state & SOCKET_CARDBUS) {
cb_alloc(skt); cb_alloc(skt);
...@@ -598,6 +603,7 @@ static int socket_resume(struct pcmcia_socket *skt) ...@@ -598,6 +603,7 @@ static int socket_resume(struct pcmcia_socket *skt)
static void socket_remove(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); socket_shutdown(skt);
cs_socket_put(skt); cs_socket_put(skt);
} }
......
...@@ -544,6 +544,9 @@ struct pcmcia_device * pcmcia_device_add(struct pcmcia_socket *s, unsigned int f ...@@ -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); list_add_tail(&p_dev->socket_device_list, &s->devices_list);
spin_unlock_irqrestore(&pcmcia_dev_list_lock, flags); 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); pcmcia_device_query(p_dev);
if (device_register(&p_dev->dev)) { if (device_register(&p_dev->dev)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册