5484 uint32_t cbps;
5485 #ifdef PCIC_DEBUG
5486 pcic_err(pcic->dip, 8, "New card (0x%x)\n", sockp->pcs_flags);
5487 #endif
5488 cbps = pcic_getcb(pcic, CB_PRESENT_STATE);
5489 #ifdef PCIC_DEBUG
5490 pcic_err(pcic->dip, 8, "CBus PS (0x%x)\n", cbps);
5491 #endif
5492 /*
5493 * Check the CB bits are sane.
5494 */
5495 if ((cbps & pcic_cbps_on) != pcic_cbps_on ||
5496 cbps & pcic_cbps_off) {
5497 cmn_err(CE_WARN,
5498 "%s%d: Odd Cardbus Present State 0x%x\n",
5499 ddi_get_name(pcic->dip),
5500 ddi_get_instance(pcic->dip),
5501 cbps);
5502 pcic_putcb(pcic, CB_EVENT_FORCE, CB_EF_CVTEST);
5503 debounce = 0;
5504 debounce_time = drv_usectohz(1000000);
5505 }
5506 if (debounce) {
5507 sockp->pcs_flags |= PCS_CARD_PRESENT;
5508 if (pcic_do_insertion) {
5509
5510 cbps = pcic_getcb(pcic, CB_PRESENT_STATE);
5511
5512 if (cbps & CB_PS_16BITCARD) {
5513 pcic_err(pcic->dip,
5514 8, "16 bit card inserted\n");
5515 sockp->pcs_flags |= PCS_CARD_IS16BIT;
5516 /* calls pcm_adapter_callback() */
5517 if (pcic->pc_callback) {
5518
5519 (void) ddi_prop_update_string(
5520 DDI_DEV_T_NONE,
5521 pcic->dip, PCM_DEVICETYPE,
5522 "pccard");
5523 PC_CALLBACK(pcic->dip,
5524 pcic->pc_cb_arg,
|
5484 uint32_t cbps;
5485 #ifdef PCIC_DEBUG
5486 pcic_err(pcic->dip, 8, "New card (0x%x)\n", sockp->pcs_flags);
5487 #endif
5488 cbps = pcic_getcb(pcic, CB_PRESENT_STATE);
5489 #ifdef PCIC_DEBUG
5490 pcic_err(pcic->dip, 8, "CBus PS (0x%x)\n", cbps);
5491 #endif
5492 /*
5493 * Check the CB bits are sane.
5494 */
5495 if ((cbps & pcic_cbps_on) != pcic_cbps_on ||
5496 cbps & pcic_cbps_off) {
5497 cmn_err(CE_WARN,
5498 "%s%d: Odd Cardbus Present State 0x%x\n",
5499 ddi_get_name(pcic->dip),
5500 ddi_get_instance(pcic->dip),
5501 cbps);
5502 pcic_putcb(pcic, CB_EVENT_FORCE, CB_EF_CVTEST);
5503 debounce = 0;
5504 debounce_time = drv_sectohz(1);
5505 }
5506 if (debounce) {
5507 sockp->pcs_flags |= PCS_CARD_PRESENT;
5508 if (pcic_do_insertion) {
5509
5510 cbps = pcic_getcb(pcic, CB_PRESENT_STATE);
5511
5512 if (cbps & CB_PS_16BITCARD) {
5513 pcic_err(pcic->dip,
5514 8, "16 bit card inserted\n");
5515 sockp->pcs_flags |= PCS_CARD_IS16BIT;
5516 /* calls pcm_adapter_callback() */
5517 if (pcic->pc_callback) {
5518
5519 (void) ddi_prop_update_string(
5520 DDI_DEV_T_NONE,
5521 pcic->dip, PCM_DEVICETYPE,
5522 "pccard");
5523 PC_CALLBACK(pcic->dip,
5524 pcic->pc_cb_arg,
|