aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/serial')
-rw-r--r--drivers/serial/serial_cs.c30
1 files changed, 14 insertions, 16 deletions
diff --git a/drivers/serial/serial_cs.c b/drivers/serial/serial_cs.c
index 783b0c5f8870..7aa2820e35bd 100644
--- a/drivers/serial/serial_cs.c
+++ b/drivers/serial/serial_cs.c
@@ -757,27 +757,25 @@ static int serial_config(struct pcmcia_device * link)
757 757
758 /* Is this a multiport card? */ 758 /* Is this a multiport card? */
759 tuple->DesiredTuple = CISTPL_MANFID; 759 tuple->DesiredTuple = CISTPL_MANFID;
760 if (first_tuple(link, tuple, parse) == CS_SUCCESS) { 760 info->manfid = link->manf_id;
761 info->manfid = parse->manfid.manf; 761 info->prodid = link->card_id;
762 info->prodid = parse->manfid.card; 762
763 763 for (i = 0; i < ARRAY_SIZE(quirks); i++)
764 for (i = 0; i < ARRAY_SIZE(quirks); i++) 764 if ((quirks[i].manfid == ~0 ||
765 if ((quirks[i].manfid == ~0 || 765 quirks[i].manfid == info->manfid) &&
766 quirks[i].manfid == info->manfid) && 766 (quirks[i].prodid == ~0 ||
767 (quirks[i].prodid == ~0 || 767 quirks[i].prodid == info->prodid)) {
768 quirks[i].prodid == info->prodid)) { 768 info->quirk = &quirks[i];
769 info->quirk = &quirks[i]; 769 break;
770 break; 770 }
771 }
772 }
773 771
774 /* Another check for dual-serial cards: look for either serial or 772 /* Another check for dual-serial cards: look for either serial or
775 multifunction cards that ask for appropriate IO port ranges */ 773 multifunction cards that ask for appropriate IO port ranges */
776 tuple->DesiredTuple = CISTPL_FUNCID; 774 tuple->DesiredTuple = CISTPL_FUNCID;
777 if ((info->multi == 0) && 775 if ((info->multi == 0) &&
778 ((first_tuple(link, tuple, parse) != CS_SUCCESS) || 776 (link->has_func_id) &&
779 (parse->funcid.func == CISTPL_FUNCID_MULTI) || 777 ((link->func_id == CISTPL_FUNCID_MULTI) ||
780 (parse->funcid.func == CISTPL_FUNCID_SERIAL))) { 778 (link->func_id == CISTPL_FUNCID_SERIAL))) {
781 tuple->DesiredTuple = CISTPL_CFTABLE_ENTRY; 779 tuple->DesiredTuple = CISTPL_CFTABLE_ENTRY;
782 if (first_tuple(link, tuple, parse) == CS_SUCCESS) { 780 if (first_tuple(link, tuple, parse) == CS_SUCCESS) {
783 if ((cf->io.nwin == 1) && (cf->io.win[0].len % 8 == 0)) 781 if ((cf->io.nwin == 1) && (cf->io.win[0].len % 8 == 0))