.. | .. |
---|
562 | 562 | dev_err(c->dev, "request_irq() failed\n"); |
---|
563 | 563 | goto fail_irq; |
---|
564 | 564 | } |
---|
565 | | - if (c->cpu != -1 && irq_can_set_affinity(c->irq) && |
---|
566 | | - irq_set_affinity(c->irq, cpumask_of(c->cpu))) { |
---|
567 | | - dev_err(c->dev, "irq_set_affinity() failed\n"); |
---|
| 565 | + |
---|
| 566 | + if (dpaa_set_portal_irq_affinity(c->dev, c->irq, c->cpu)) |
---|
568 | 567 | goto fail_affinity; |
---|
569 | | - } |
---|
570 | 568 | |
---|
571 | 569 | /* Need RCR to be empty before continuing */ |
---|
572 | 570 | ret = bm_rcr_get_fill(p); |
---|
.. | .. |
---|
637 | 635 | return 0; |
---|
638 | 636 | } |
---|
639 | 637 | |
---|
640 | | -static int bm_shutdown_pool(u32 bpid) |
---|
| 638 | +int bm_shutdown_pool(u32 bpid) |
---|
641 | 639 | { |
---|
| 640 | + int err = 0; |
---|
642 | 641 | struct bm_mc_command *bm_cmd; |
---|
643 | 642 | union bm_mc_result *bm_res; |
---|
644 | 643 | |
---|
| 644 | + |
---|
| 645 | + struct bman_portal *p = get_affine_portal(); |
---|
645 | 646 | while (1) { |
---|
646 | | - struct bman_portal *p = get_affine_portal(); |
---|
647 | 647 | /* Acquire buffers until empty */ |
---|
648 | 648 | bm_cmd = bm_mc_start(&p->p); |
---|
649 | 649 | bm_cmd->bpid = bpid; |
---|
650 | 650 | bm_mc_commit(&p->p, BM_MCC_VERB_CMD_ACQUIRE | 1); |
---|
651 | 651 | if (!bm_mc_result_timeout(&p->p, &bm_res)) { |
---|
652 | | - put_affine_portal(); |
---|
653 | 652 | pr_crit("BMan Acquire Command timedout\n"); |
---|
654 | | - return -ETIMEDOUT; |
---|
| 653 | + err = -ETIMEDOUT; |
---|
| 654 | + goto done; |
---|
655 | 655 | } |
---|
656 | 656 | if (!(bm_res->verb & BM_MCR_VERB_ACQUIRE_BUFCOUNT)) { |
---|
657 | | - put_affine_portal(); |
---|
658 | 657 | /* Pool is empty */ |
---|
659 | | - return 0; |
---|
| 658 | + goto done; |
---|
660 | 659 | } |
---|
661 | | - put_affine_portal(); |
---|
662 | 660 | } |
---|
663 | | - |
---|
664 | | - return 0; |
---|
| 661 | +done: |
---|
| 662 | + put_affine_portal(); |
---|
| 663 | + return err; |
---|
665 | 664 | } |
---|
666 | 665 | |
---|
667 | 666 | struct gen_pool *bm_bpalloc; |
---|