Unix Technical Forum

Re: attaching PCMCIA cards

This is a discussion on Re: attaching PCMCIA cards within the mailing.openbsd.tech forums, part of the OpenBSD category; --> Marc Balmer wrote: > Marc Winiger wrote: >> com_pcmcia matches devices where pa->card->cis1_info[] values are NULL >> >> What ...


Go Back   Unix Technical Forum > Unix Operating Systems > OpenBSD > mailing.openbsd.tech

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-18-2008, 09:31 AM
Marc Balmer
 
Posts: n/a
Default Re: attaching PCMCIA cards

Marc Balmer wrote:
> Marc Winiger wrote:
>> com_pcmcia matches devices where pa->card->cis1_info[] values are NULL
>>
>> What do you think about that?

>
> The only PCMCIA card I have is a Premier GPS Card that still works find
> after I applied your patch.


works fine, not find...
>
>>
>>
>> Index: com_pcmcia.c
>> ================================================== =================
>> RCS file: /var/cvs/src/sys/dev/pcmcia/com_pcmcia.c,v
>> retrieving revision 1.46
>> diff -u -r1.46 com_pcmcia.c
>> --- com_pcmcia.c 28 May 2006 16:49:46 -0000 1.46
>> +++ com_pcmcia.c 28 Jul 2007 10:03:47 -0000
>> @@ -183,7 +183,7 @@
>> {
>> struct pcmcia_attach_args *pa = aux;
>> struct pcmcia_config_entry *cfe;
>> - int i, j, comportmask;
>> + int i, comportmask;
>>
>> /* 1. Does it claim to be a serial device? */
>> if (pa->pf->function == PCMCIA_FUNCTION_SERIAL)
>> @@ -214,13 +214,12 @@
>> /* 3. Is this a card we know about? */
>> for (i = 0; i < sizeof(com_pcmcia_prod)/sizeof(com_pcmcia_prod[0]);
>> i++) {
>> - for (j = 0; j < 4; j++)
>> - if (com_pcmcia_prod[i].cis1_info[j] &&
>> - pa->card->cis1_info[j] &&
>> - strcmp(pa->card->cis1_info[j],
>> - com_pcmcia_prod[i].cis1_info[j]))
>> - break;
>> - if (j == 4)
>> + if (com_pcmcia_prod[i].cis1_info[0] && pa->card->cis1_info[0] &&
>> + com_pcmcia_prod[i].cis1_info[1] && pa->card->cis1_info[1] &&
>> + (strcmp(pa->card->cis1_info[0],
>> + com_pcmcia_prod[i].cis1_info[0]) == 0) &&
>> + (strcmp(pa->card->cis1_info[1],
>> + com_pcmcia_prod[i].cis1_info[1]) == 0))
>> return 1;
>> }
>>
>>
>>
>> I have a Dual-UART 16c95x card, that is not yet supported because the
>> CISTPL 3 (INDIRECT) is not handled. I think it is wrong to attach this
>> card as pccom. See dmesg before and after my patch:
>>
>>
>> cardslot_event_throw: an event 16-bit Card inserted comes
>> cis mem map de972000
>> pcmcia0: CIS tuple chain:
>> CISTPL_DEVICE type=null speed=null
>> 01 02 00 ff
>> unhandled CISTPL 3
>> 03 00
>> CISTPL_END
>> ff
>> cis mem map de972000
>> CISTPL_LINKTARGET expected, code ff observed
>> pccom3 at pcmcia0 function 0: can't allocate i/o space
>>
>>
>> cardslot_event_throw: an event 16-bit Card inserted comes
>> cis mem map de946000
>> pcmcia0: CIS tuple chain:
>> CISTPL_DEVICE type=null speed=null
>> 01 02 00 ff
>> CISTPL_INDIRECT
>> 03 00
>> CISTPL_END
>> ff
>> cis mem map de946000
>> CISTPL_LINKTARGET expected, code ff observed
>> at pcmcia0 function 0 not configured


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:34 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com