aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia
diff options
context:
space:
mode:
authorRussell King <rmk+pcmcia@arm.linux.org.uk>2005-07-07 20:59:07 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-07 21:24:07 -0400
commit5bc6b68a103a6f4055890b5127ddca3a322751b0 (patch)
tree57195b4d7c6f0f97b111605f8eef6dccda83e0b8 /drivers/pcmcia
parent4230dfc9c3f708f4765736b862aa313aa97e3c2e (diff)
[PATCH] yenta: no CardBus if IRQ fails
If probing for the correct interrupt fails on yenta bridges, the driver falls back to polling for interrupt actions. However, CardBus cards cannot be used then. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r--drivers/pcmcia/cs.c15
-rw-r--r--drivers/pcmcia/yenta_socket.c10
2 files changed, 18 insertions, 7 deletions
diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c
index 4d1cc5304e17..e39178fc59d0 100644
--- a/drivers/pcmcia/cs.c
+++ b/drivers/pcmcia/cs.c
@@ -215,6 +215,13 @@ int pcmcia_register_socket(struct pcmcia_socket *socket)
215 list_add_tail(&socket->socket_list, &pcmcia_socket_list); 215 list_add_tail(&socket->socket_list, &pcmcia_socket_list);
216 up_write(&pcmcia_socket_list_rwsem); 216 up_write(&pcmcia_socket_list_rwsem);
217 217
218#ifndef CONFIG_CARDBUS
219 /*
220 * If we do not support Cardbus, ensure that
221 * the Cardbus socket capability is disabled.
222 */
223 socket->features &= ~SS_CAP_CARDBUS;
224#endif
218 225
219 /* set proper values in socket->dev */ 226 /* set proper values in socket->dev */
220 socket->dev.class_data = socket; 227 socket->dev.class_data = socket;
@@ -448,11 +455,11 @@ static int socket_setup(struct pcmcia_socket *skt, int initial_delay)
448 } 455 }
449 456
450 if (status & SS_CARDBUS) { 457 if (status & SS_CARDBUS) {
458 if (!(skt->features & SS_CAP_CARDBUS)) {
459 cs_err(skt, "cardbus cards are not supported.\n");
460 return CS_BAD_TYPE;
461 }
451 skt->state |= SOCKET_CARDBUS; 462 skt->state |= SOCKET_CARDBUS;
452#ifndef CONFIG_CARDBUS
453 cs_err(skt, "cardbus cards are not supported.\n");
454 return CS_BAD_TYPE;
455#endif
456 } 463 }
457 464
458 /* 465 /*
diff --git a/drivers/pcmcia/yenta_socket.c b/drivers/pcmcia/yenta_socket.c
index 1d593e1dc3d9..0e7aa8176692 100644
--- a/drivers/pcmcia/yenta_socket.c
+++ b/drivers/pcmcia/yenta_socket.c
@@ -868,14 +868,11 @@ static int yenta_probe_cb_irq(struct yenta_socket *socket)
868 */ 868 */
869static void yenta_get_socket_capabilities(struct yenta_socket *socket, u32 isa_irq_mask) 869static void yenta_get_socket_capabilities(struct yenta_socket *socket, u32 isa_irq_mask)
870{ 870{
871 socket->socket.features |= SS_CAP_PAGE_REGS | SS_CAP_PCCARD | SS_CAP_CARDBUS;
872 socket->socket.map_size = 0x1000;
873 socket->socket.pci_irq = socket->cb_irq; 871 socket->socket.pci_irq = socket->cb_irq;
874 if (isa_probe) 872 if (isa_probe)
875 socket->socket.irq_mask = yenta_probe_irq(socket, isa_irq_mask); 873 socket->socket.irq_mask = yenta_probe_irq(socket, isa_irq_mask);
876 else 874 else
877 socket->socket.irq_mask = 0; 875 socket->socket.irq_mask = 0;
878 socket->socket.cb_dev = socket->dev;
879 876
880 printk(KERN_INFO "Yenta: ISA IRQ mask 0x%04x, PCI irq %d\n", 877 printk(KERN_INFO "Yenta: ISA IRQ mask 0x%04x, PCI irq %d\n",
881 socket->socket.irq_mask, socket->cb_irq); 878 socket->socket.irq_mask, socket->cb_irq);
@@ -941,6 +938,9 @@ static int __devinit yenta_probe (struct pci_dev *dev, const struct pci_device_i
941 socket->socket.dev.dev = &dev->dev; 938 socket->socket.dev.dev = &dev->dev;
942 socket->socket.driver_data = socket; 939 socket->socket.driver_data = socket;
943 socket->socket.owner = THIS_MODULE; 940 socket->socket.owner = THIS_MODULE;
941 socket->socket.features = SS_CAP_PAGE_REGS | SS_CAP_PCCARD;
942 socket->socket.map_size = 0x1000;
943 socket->socket.cb_dev = dev;
944 944
945 /* prepare struct yenta_socket */ 945 /* prepare struct yenta_socket */
946 socket->dev = dev; 946 socket->dev = dev;
@@ -1011,6 +1011,10 @@ static int __devinit yenta_probe (struct pci_dev *dev, const struct pci_device_i
1011 socket->poll_timer.data = (unsigned long)socket; 1011 socket->poll_timer.data = (unsigned long)socket;
1012 socket->poll_timer.expires = jiffies + HZ; 1012 socket->poll_timer.expires = jiffies + HZ;
1013 add_timer(&socket->poll_timer); 1013 add_timer(&socket->poll_timer);
1014 printk(KERN_INFO "Yenta: no PCI IRQ, CardBus support disabled for this socket.\n"
1015 KERN_INFO "Yenta: check your BIOS CardBus, BIOS IRQ or ACPI settings.\n");
1016 } else {
1017 socket->socket.features |= SS_CAP_CARDBUS;
1014 } 1018 }
1015 1019
1016 /* Figure out what the dang thing can do for the PCMCIA layer... */ 1020 /* Figure out what the dang thing can do for the PCMCIA layer... */