• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/char/

Lines Matching refs:op

298 /* Allocate an op structure from our pool */
317 /* Return an op structure to our pool */
352 struct op_struct *op = get_op_struct();
354 if (op == NULL)
374 op->dev = tape_device[devi.devno];
375 op->buffer = dma_alloc_coherent(op->dev, count, &op->dmaaddr,
378 if (op->buffer == NULL) {
387 if (copy_from_user(op->buffer, buf, count)) {
393 op->non_blocking = noblock;
394 init_completion(&op->com);
395 op->count = count;
403 (u64)(unsigned long)op, VIOVERSION << 16,
404 ((u64)devi.devno << 48) | op->dmaaddr, count, 0, 0);
406 printk(VIOTAPE_KERN_WARN "hv error on op %d\n",
415 wait_for_completion(&op->com);
417 if (op->rc)
418 ret = tape_rc_to_errno(op->rc, "write", devi.devno);
421 ret = op->count;
425 dma_free_coherent(op->dev, count, op->buffer, op->dmaaddr);
429 free_op_struct(op);
439 struct op_struct *op = get_op_struct();
444 if (op == NULL)
466 op->dev = tape_device[devi.devno];
467 op->buffer = dma_alloc_coherent(op->dev, count, &op->dmaaddr,
469 if (op->buffer == NULL) {
474 op->count = count;
475 init_completion(&op->com);
483 (u64)(unsigned long)op, VIOVERSION << 16,
484 ((u64)devi.devno << 48) | op->dmaaddr, count, 0, 0);
486 printk(VIOTAPE_KERN_WARN "tape hv error on op %d\n",
492 wait_for_completion(&op->com);
494 if (op->rc)
495 ret = tape_rc_to_errno(op->rc, "read", devi.devno);
497 ret = op->count;
498 if (ret && copy_to_user(buf, op->buffer, ret)) {
505 dma_free_coherent(op->dev, count, op->buffer, op->dmaaddr);
509 free_op_struct(op);
522 struct op_struct *op = get_op_struct();
524 if (op == NULL)
598 "with invalid op 0x%x\n", mtc.mt_op);
617 init_completion(&op->com);
625 (u64)(unsigned long)op,
630 printk(VIOTAPE_KERN_WARN "hv error on op %d\n",
634 wait_for_completion(&op->com);
635 ret = tape_rc_to_errno(op->rc, "tape operation", devi.devno);
640 init_completion(&op->com);
648 (u64)(unsigned long)op, VIOVERSION << 16,
651 printk(VIOTAPE_KERN_WARN "hv error on op %d\n",
655 wait_for_completion(&op->com);
658 ret = tape_rc_to_errno(op->rc, "get status", devi.devno);
659 free_op_struct(op);
677 free_op_struct(op);
698 struct op_struct *op = get_op_struct();
700 if (op == NULL)
712 init_completion(&op->com);
720 (u64)(unsigned long)op, VIOVERSION << 16,
729 wait_for_completion(&op->com);
730 ret = tape_rc_to_errno(op->rc, "open", devi.devno);
733 free_op_struct(op);
744 struct op_struct *op = get_op_struct();
746 if (op == NULL)
748 init_completion(&op->com);
767 (u64)(unsigned long)op, VIOVERSION << 16,
770 wait_for_completion(&op->com);
772 tape_rc_to_errno(op->rc, "rewind", devi.devno);
781 (u64)(unsigned long)op, VIOVERSION << 16,
790 wait_for_completion(&op->com);
792 if (op->rc)
796 free_op_struct(op);
813 struct op_struct *op;
825 op = (struct op_struct *)event->xCorrelationToken;
829 op->rc = tevent->sub_type_result;
830 complete(&op->com);
833 op->rc = tevent->sub_type_result;
834 op->count = tevent->len;
835 complete(&op->com);
838 if (op->non_blocking) {
839 dma_free_coherent(op->dev, op->count,
840 op->buffer, op->dmaaddr);
841 free_op_struct(op);
844 op->rc = tevent->sub_type_result;
845 op->count = tevent->len;
846 complete(&op->com);
853 if (op) {
854 op->count = tevent->u.op.count;
855 op->rc = tevent->sub_type_result;
856 if (!op->non_blocking)
857 complete(&op->com);
940 printk(VIOTAPE_KERN_WARN "couldn't allocate op structs\n");