Lines Matching refs:ccard

22 eicon_io_rcv_dispatch(eicon_card *ccard) {  in eicon_io_rcv_dispatch()  argument
28 if (!ccard) { in eicon_io_rcv_dispatch()
29 eicon_log(ccard, 1, "eicon_err: NULL card in rcv_dispatch !\n"); in eicon_io_rcv_dispatch()
33 while((skb = skb_dequeue(&ccard->rcvq))) { in eicon_io_rcv_dispatch()
37 if ((chan = ccard->IdTable[ind->IndId]) == NULL) { in eicon_io_rcv_dispatch()
45 … eicon_log(ccard, 1, "idi: Indication for unknown channel Ind=%d Id=%x\n", ind->Ind, ind->IndId); in eicon_io_rcv_dispatch()
46 eicon_log(ccard, 1, "idi_hdl: Ch??: Ind=%d Id=%x Ch=%d MInd=%d MLen=%d Len=%d\n", in eicon_io_rcv_dispatch()
58 idi_handle_ind(ccard, skb); in eicon_io_rcv_dispatch()
71 eicon_log(ccard, 1, "eicon: buffer incomplete, but 0 in queue\n"); in eicon_io_rcv_dispatch()
79 eicon_log(ccard, 1, "eicon_io: skb_alloc failed in rcv_dispatch()\n"); in eicon_io_rcv_dispatch()
98 idi_handle_ind(ccard, skb_new); in eicon_io_rcv_dispatch()
111 eicon_io_ack_dispatch(eicon_card *ccard) { in eicon_io_ack_dispatch() argument
114 if (!ccard) { in eicon_io_ack_dispatch()
115 eicon_log(ccard, 1, "eicon_err: NULL card in ack_dispatch!\n"); in eicon_io_ack_dispatch()
118 while((skb = skb_dequeue(&ccard->rackq))) { in eicon_io_ack_dispatch()
119 idi_handle_ack(ccard, skb); in eicon_io_ack_dispatch()
168 eicon_card *ccard = (eicon_card *)de->R; in eicon_idi_callback() local
178 eicon_log(ccard, 1, "eicon_io: skb_alloc failed in _idi_callback()\n"); in eicon_idi_callback()
190 skb_queue_tail(&ccard->rackq, skb); in eicon_idi_callback()
191 eicon_schedule_ack(ccard); in eicon_idi_callback()
192 eicon_log(ccard, 128, "idi_cbk: Ch%d: Rc=%x Id=%x RLen=%x compl=%x\n", in eicon_idi_callback()
202 eicon_log(ccard, 1, "eicon_cbk: ind not complete but <= 270\n"); in eicon_idi_callback()
206 eicon_log(ccard, 1, "eicon_io: skb_alloc failed in _idi_callback()\n"); in eicon_idi_callback()
216 skb_queue_tail(&ccard->rcvq, skb); in eicon_idi_callback()
217 eicon_schedule_rx(ccard); in eicon_idi_callback()
218 eicon_log(ccard, 128, "idi_cbk: Ch%d: Ind=%x Id=%x RLen=%x compl=%x\n", in eicon_idi_callback()
234 eicon_io_transmit(eicon_card *ccard) { in eicon_io_transmit() argument
253 isa_card = &ccard->hwif.isa; in eicon_io_transmit()
255 if (!ccard) { in eicon_io_transmit()
256 eicon_log(ccard, 1, "eicon_transmit: NULL card!\n"); in eicon_io_transmit()
260 switch(ccard->type) { in eicon_io_transmit()
286 eicon_log(ccard, 1, "eicon_transmit: unsupported card-type!\n"); in eicon_io_transmit()
291 if (!(skb2 = skb_dequeue(&ccard->sndq))) in eicon_io_transmit()
297 if ((ram_inb(ccard, &com->Req)) || (ccard->ReadyInt)) { in eicon_io_transmit()
298 if (!ccard->ReadyInt) { in eicon_io_transmit()
299 tmp = ram_inb(ccard, &com->ReadyInt) + 1; in eicon_io_transmit()
300 ram_outb(ccard, &com->ReadyInt, tmp); in eicon_io_transmit()
301 ccard->ReadyInt++; in eicon_io_transmit()
304 skb_queue_head(&ccard->sndq, skb2); in eicon_io_transmit()
305 eicon_log(ccard, 32, "eicon: transmit: Card not ready\n"); in eicon_io_transmit()
310 if (!(ram_inb(ccard, &prram->ReqOutput) - ram_inb(ccard, &prram->ReqInput))) { in eicon_io_transmit()
312 skb_queue_head(&ccard->sndq, skb2); in eicon_io_transmit()
313 eicon_log(ccard, 32, "eicon: transmit: Card not ready\n"); in eicon_io_transmit()
327 eicon_log(ccard, 16, "eicon: transmit: error Id=0 on %d (Net)\n", chan->No); in eicon_io_transmit()
333 ram_outw(ccard, &com->XBuffer.length, reqbuf->XBuffer.length); in eicon_io_transmit()
334 ram_copytocard(ccard, &com->XBuffer.P, &reqbuf->XBuffer.P, reqbuf->XBuffer.length); in eicon_io_transmit()
335 ram_outb(ccard, &com->ReqCh, reqbuf->ReqCh); in eicon_io_transmit()
339 ReqOut = (eicon_REQ *)&prram->B[ram_inw(ccard, &prram->NextReq)]; in eicon_io_transmit()
340 ram_outw(ccard, &ReqOut->XBuffer.length, reqbuf->XBuffer.length); in eicon_io_transmit()
341 ram_copytocard(ccard, &ReqOut->XBuffer.P, &reqbuf->XBuffer.P, reqbuf->XBuffer.length); in eicon_io_transmit()
342 ram_outb(ccard, &ReqOut->ReqCh, reqbuf->ReqCh); in eicon_io_transmit()
343 ram_outb(ccard, &ReqOut->Req, reqbuf->Req); in eicon_io_transmit()
354 ram_outb(ccard, &com->ReqId, chan->e.D3Id); in eicon_io_transmit()
357 ram_outb(ccard, &ReqOut->ReqId, chan->e.D3Id); in eicon_io_transmit()
369 ram_outb(ccard, &com->ReqId, chan->e.B2Id); in eicon_io_transmit()
372 ram_outb(ccard, &ReqOut->ReqId, chan->e.B2Id); in eicon_io_transmit()
392 ram_outb(ccard, &com->ReqId, reqbuf->ReqId); in eicon_io_transmit()
395 ram_outb(ccard, &ReqOut->ReqId, reqbuf->ReqId); in eicon_io_transmit()
415 chan->e.ref = ccard->ref_out++; in eicon_io_transmit()
418 chan->e.ref = ram_inw(ccard, &ReqOut->Reference); in eicon_io_transmit()
430 ram_outb(ccard, &com->Req, reqbuf->Req); in eicon_io_transmit()
433 ram_outw(ccard, &prram->NextReq, ram_inw(ccard, &ReqOut->next)); in eicon_io_transmit()
439 ep->R = (BUFFERS *)ccard; in eicon_io_transmit()
457 eicon_log(ccard, dlev, "eicon: Req=%d Id=%x Ch=%d Len=%d Ref=%d\n", in eicon_io_transmit()
464 ccard->d->request(ep); in eicon_io_transmit()
476 skb_queue_tail(&ccard->sackq, skb2); in eicon_io_transmit()
477 eicon_log(ccard, 128, "eicon: transmit: busy chan %d\n", chan->No); in eicon_io_transmit()
486 if (!(skb2 = skb_dequeue(&ccard->sndq))) in eicon_io_transmit()
493 ram_outb(ccard, &prram->ReqInput, (__u8)(ram_inb(ccard, &prram->ReqInput) + ReqCount)); in eicon_io_transmit()
495 while((skb = skb_dequeue(&ccard->sackq))) { in eicon_io_transmit()
496 skb_queue_tail(&ccard->sndq, skb); in eicon_io_transmit()
506 eicon_card *ccard = (eicon_card *)dev_id; in eicon_irq() local
522 if (!ccard) { in eicon_irq()
523 eicon_log(ccard, 1, "eicon_irq: spurious interrupt %d\n", irq); in eicon_irq()
527 if (ccard->type == EICON_CTYPE_QUADRO) { in eicon_irq()
530 com = (eicon_isa_com *)ccard->hwif.isa.shmem; in eicon_irq()
531 if ((readb(ccard->hwif.isa.intack))) { /* quadro found */ in eicon_irq()
534 ccard = ccard->qnext; in eicon_irq()
539 isa_card = &ccard->hwif.isa; in eicon_irq()
541 switch(ccard->type) { in eicon_irq()
556 eicon_log(ccard, 1, "eicon_irq: unsupported card-type!\n"); in eicon_irq()
561 switch(ccard->type) { in eicon_irq()
583 switch(ccard->type) { in eicon_irq()
590 eicon_log(ccard, 1, "eicon: IRQ: card reports no interrupt!\n"); in eicon_irq()
599 if ((tmp = ram_inb(ccard, &com->Rc))) { in eicon_irq()
602 eicon_log(ccard, 64, "eicon: IRQ Rc=READY_INT\n"); in eicon_irq()
603 if (ccard->ReadyInt) { in eicon_irq()
604 ccard->ReadyInt--; in eicon_irq()
605 ram_outb(ccard, &com->Rc, 0); in eicon_irq()
606 eicon_schedule_tx(ccard); in eicon_irq()
611 eicon_log(ccard, 1, "eicon_io: skb_alloc failed in _irq()\n"); in eicon_irq()
615 ack->RcId = ram_inb(ccard, &com->RcId); in eicon_irq()
616 ack->RcCh = ram_inb(ccard, &com->RcCh); in eicon_irq()
617 ack->Reference = ccard->ref_in++; in eicon_irq()
618 eicon_log(ccard, 128, "eicon: IRQ Rc=%d Id=%x Ch=%d Ref=%d\n", in eicon_irq()
620 skb_queue_tail(&ccard->rackq, skb); in eicon_irq()
621 eicon_schedule_ack(ccard); in eicon_irq()
623 ram_outb(ccard, &com->Req, 0); in eicon_irq()
624 ram_outb(ccard, &com->Rc, 0); in eicon_irq()
630 if ((tmp = ram_inb(ccard, &com->Ind))) { in eicon_irq()
632 int len = ram_inw(ccard, &com->RBuffer.length); in eicon_irq()
635 eicon_log(ccard, 1, "eicon_io: skb_alloc failed in _irq()\n"); in eicon_irq()
639 ind->IndId = ram_inb(ccard, &com->IndId); in eicon_irq()
640 ind->IndCh = ram_inb(ccard, &com->IndCh); in eicon_irq()
641 ind->MInd = ram_inb(ccard, &com->MInd); in eicon_irq()
642 ind->MLength = ram_inw(ccard, &com->MLength); in eicon_irq()
648 … eicon_log(ccard, dlev, "eicon: IRQ Ind=%d Id=%x Ch=%d MInd=%d MLen=%d Len=%d\n", in eicon_irq()
650 ram_copyfromcard(ccard, &ind->RBuffer.P, &com->RBuffer.P, len); in eicon_irq()
651 skb_queue_tail(&ccard->rcvq, skb); in eicon_irq()
652 eicon_schedule_rx(ccard); in eicon_irq()
654 ram_outb(ccard, &com->Ind, 0); in eicon_irq()
661 if((Count = ram_inb(ccard, &prram->RcOutput))) { in eicon_irq()
664 RcIn = (eicon_RC *)&prram->B[ram_inw(ccard, &prram->NextRc)]; in eicon_irq()
668 if((Rc=ram_inb(ccard, &RcIn->Rc))) { in eicon_irq()
671 eicon_log(ccard, 1, "eicon_io: skb_alloc failed in _irq()\n"); in eicon_irq()
675 ack->RcId = ram_inb(ccard, &RcIn->RcId); in eicon_irq()
676 ack->RcCh = ram_inb(ccard, &RcIn->RcCh); in eicon_irq()
677 ack->Reference = ram_inw(ccard, &RcIn->Reference); in eicon_irq()
678 eicon_log(ccard, 128, "eicon: IRQ Rc=%d Id=%x Ch=%d Ref=%d\n", in eicon_irq()
680 skb_queue_tail(&ccard->rackq, skb); in eicon_irq()
681 eicon_schedule_ack(ccard); in eicon_irq()
683 ram_outb(ccard, &RcIn->Rc, 0); in eicon_irq()
686 RcIn = (eicon_RC *)&prram->B[ram_inw(ccard, &RcIn->next)]; in eicon_irq()
689 ram_outb(ccard, &prram->RcOutput, 0); in eicon_irq()
693 if((Count = ram_inb(ccard, &prram->IndOutput))) { in eicon_irq()
696 IndIn = (eicon_IND *)&prram->B[ram_inw(ccard, &prram->NextInd)]; in eicon_irq()
699 Ind = ram_inb(ccard, &IndIn->Ind); in eicon_irq()
701 int len = ram_inw(ccard, &IndIn->RBuffer.length); in eicon_irq()
704 eicon_log(ccard, 1, "eicon_io: skb_alloc failed in _irq()\n"); in eicon_irq()
708 ind->IndId = ram_inb(ccard, &IndIn->IndId); in eicon_irq()
709 ind->IndCh = ram_inb(ccard, &IndIn->IndCh); in eicon_irq()
710 ind->MInd = ram_inb(ccard, &IndIn->MInd); in eicon_irq()
711 ind->MLength = ram_inw(ccard, &IndIn->MLength); in eicon_irq()
717 … eicon_log(ccard, dlev, "eicon: IRQ Ind=%d Id=%x Ch=%d MInd=%d MLen=%d Len=%d\n", in eicon_irq()
719 ram_copyfromcard(ccard, &ind->RBuffer.P, &IndIn->RBuffer.P, len); in eicon_irq()
720 skb_queue_tail(&ccard->rcvq, skb); in eicon_irq()
721 eicon_schedule_rx(ccard); in eicon_irq()
723 ram_outb(ccard, &IndIn->Ind, 0); in eicon_irq()
726 IndIn = (eicon_IND *)&prram->B[ram_inw(ccard, &IndIn->next)]; in eicon_irq()
728 ram_outb(ccard, &prram->IndOutput, 0); in eicon_irq()
734 switch(ccard->type) { in eicon_irq()