- char *p=buf;
- unsigned int sock=(unsigned int)data;
-
- p+=sprintf(p, "k_flags : %s%s%s%s%s%s%s\n",
- pcmcia_socket[sock].k_state.detect?"detect ":"",
- pcmcia_socket[sock].k_state.ready?"ready ":"",
- pcmcia_socket[sock].k_state.bvd1?"bvd1 ":"",
- pcmcia_socket[sock].k_state.bvd2?"bvd2 ":"",
- pcmcia_socket[sock].k_state.wrprot?"wrprot ":"",
- pcmcia_socket[sock].k_state.vs_3v?"vs_3v ":"",
- pcmcia_socket[sock].k_state.vs_Xv?"vs_Xv ":"");
-
- p+=sprintf(p, "status : %s%s%s%s%s%s%s%s%s\n",
- pcmcia_socket[sock].k_state.detect?"SS_DETECT ":"",
- pcmcia_socket[sock].k_state.ready?"SS_READY ":"",
- pcmcia_socket[sock].cs_state.Vcc?"SS_POWERON ":"",
- pcmcia_socket[sock].cs_state.flags&SS_IOCARD?\
- "SS_IOCARD ":"",
- (pcmcia_socket[sock].cs_state.flags&SS_IOCARD &&
- pcmcia_socket[sock].k_state.bvd1)?"SS_STSCHG ":"",
- ((pcmcia_socket[sock].cs_state.flags&SS_IOCARD)==0 &&
- (pcmcia_socket[sock].k_state.bvd1==0))?"SS_BATDEAD ":"",
- ((pcmcia_socket[sock].cs_state.flags&SS_IOCARD)==0 &&
- (pcmcia_socket[sock].k_state.bvd2==0))?"SS_BATWARN ":"",
- pcmcia_socket[sock].k_state.vs_3v?"SS_3VCARD ":"",
- pcmcia_socket[sock].k_state.vs_Xv?"SS_XVCARD ":"");
-
- p+=sprintf(p, "mask : %s%s%s%s%s\n",
- pcmcia_socket[sock].cs_state.csc_mask&SS_DETECT?\
- "SS_DETECT ":"",
- pcmcia_socket[sock].cs_state.csc_mask&SS_READY?\
- "SS_READY ":"",
- pcmcia_socket[sock].cs_state.csc_mask&SS_BATDEAD?\
- "SS_BATDEAD ":"",
- pcmcia_socket[sock].cs_state.csc_mask&SS_BATWARN?\
- "SS_BATWARN ":"",
- pcmcia_socket[sock].cs_state.csc_mask&SS_STSCHG?\
- "SS_STSCHG ":"");
-
- p+=sprintf(p, "cs_flags : %s%s%s%s%s\n",
- pcmcia_socket[sock].cs_state.flags&SS_PWR_AUTO?\
- "SS_PWR_AUTO ":"",
- pcmcia_socket[sock].cs_state.flags&SS_IOCARD?\
- "SS_IOCARD ":"",
- pcmcia_socket[sock].cs_state.flags&SS_RESET?\
- "SS_RESET ":"",
- pcmcia_socket[sock].cs_state.flags&SS_SPKR_ENA?\
- "SS_SPKR_ENA ":"",
- pcmcia_socket[sock].cs_state.flags&SS_OUTPUT_ENA?\
- "SS_OUTPUT_ENA ":"");
-
- p+=sprintf(p, "Vcc : %d\n", pcmcia_socket[sock].cs_state.Vcc);
- p+=sprintf(p, "Vpp : %d\n", pcmcia_socket[sock].cs_state.Vpp);
- p+=sprintf(p, "irq : %d\n", pcmcia_socket[sock].cs_state.io_irq);
- p+=sprintf(p, "I/O : %u\n", pcmcia_socket[sock].speed_io);
- p+=sprintf(p, "attribute: %u\n", pcmcia_socket[sock].speed_attr);
- p+=sprintf(p, "common : %u\n", pcmcia_socket[sock].speed_mem);
- return p-buf;