aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2006-09-16 18:04:37 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-10-01 12:06:41 -0400
commit20f130495c07cd01fb423c3dec7f045038118dec (patch)
tree092c23eb22988a0d3e07165b7fa99709d69d050d
parentefd92dfaad962c4fbaf4251b28578c97bd3aa85f (diff)
[SERIAL] serial_cs: handle Nokia multi->single port bodge via config quirk
According to the existing code, Nokia only make single-port cards, but are detected as multi-port cards. Handle this in roughly the same way via the config quirk - forcing it to be a real single port card (info->multi=0) changes the way we allocate the IO memory, which might stop the card working. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r--drivers/serial/serial_cs.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/drivers/serial/serial_cs.c b/drivers/serial/serial_cs.c
index 788ba404efc6..704922073bbf 100644
--- a/drivers/serial/serial_cs.c
+++ b/drivers/serial/serial_cs.c
@@ -132,6 +132,18 @@ static int quirk_post_ibm(struct pcmcia_device *link)
132 return -ENODEV; 132 return -ENODEV;
133} 133}
134 134
135/*
136 * Nokia cards are not really multiport cards. Shouldn't this
137 * be handled by setting the quirk entry .multi = 0 | 1 ?
138 */
139static void quirk_config_nokia(struct pcmcia_device *link)
140{
141 struct serial_info *info = link->priv;
142
143 if (info->multi > 1)
144 info->multi = 1;
145}
146
135static void quirk_wakeup_oxsemi(struct pcmcia_device *link) 147static void quirk_wakeup_oxsemi(struct pcmcia_device *link)
136{ 148{
137 struct serial_info *info = link->priv; 149 struct serial_info *info = link->priv;
@@ -193,6 +205,11 @@ static const struct serial_quirk quirks[] = {
193 .prodid = PRODID_NATINST_QUAD_RS232, 205 .prodid = PRODID_NATINST_QUAD_RS232,
194 .multi = 4, 206 .multi = 4,
195 }, { 207 }, {
208 .manfid = MANFID_NOKIA,
209 .prodid = ~0,
210 .multi = -1,
211 .config = quirk_config_nokia,
212 }, {
196 .manfid = MANFID_OMEGA, 213 .manfid = MANFID_OMEGA,
197 .prodid = PRODID_OMEGA_QSP_100, 214 .prodid = PRODID_OMEGA_QSP_100,
198 .multi = 4, 215 .multi = 4,
@@ -663,11 +680,6 @@ static int multi_config(struct pcmcia_device * link)
663 } 680 }
664 681
665 setup_serial(link, info, link->io.BasePort1, link->irq.AssignedIRQ); 682 setup_serial(link, info, link->io.BasePort1, link->irq.AssignedIRQ);
666 /* The Nokia cards are not really multiport cards */
667 if (info->manfid == MANFID_NOKIA) {
668 rc = 0;
669 goto free_cfg_mem;
670 }
671 for (i = 0; i < info->multi - 1; i++) 683 for (i = 0; i < info->multi - 1; i++)
672 setup_serial(link, info, base2 + (8 * i), 684 setup_serial(link, info, base2 + (8 * i),
673 link->irq.AssignedIRQ); 685 link->irq.AssignedIRQ);