Lines Matching refs:sc_buf_pool
745 INIT_LIST_HEAD(&oct->sc_buf_pool.head); in octeon_setup_sc_buffer_pool()
746 spin_lock_init(&oct->sc_buf_pool.lock); in octeon_setup_sc_buffer_pool()
747 atomic_set(&oct->sc_buf_pool.alloc_buf_count, 0); in octeon_setup_sc_buffer_pool()
762 list_add_tail(&sc->node, &oct->sc_buf_pool.head); in octeon_setup_sc_buffer_pool()
838 spin_lock_bh(&oct->sc_buf_pool.lock); in octeon_free_sc_buffer_pool()
840 list_for_each_safe(tmp, tmp2, &oct->sc_buf_pool.head) { in octeon_free_sc_buffer_pool()
848 INIT_LIST_HEAD(&oct->sc_buf_pool.head); in octeon_free_sc_buffer_pool()
850 spin_unlock_bh(&oct->sc_buf_pool.lock); in octeon_free_sc_buffer_pool()
872 spin_lock_bh(&oct->sc_buf_pool.lock); in octeon_alloc_soft_command()
874 if (list_empty(&oct->sc_buf_pool.head)) { in octeon_alloc_soft_command()
875 spin_unlock_bh(&oct->sc_buf_pool.lock); in octeon_alloc_soft_command()
879 list_for_each(tmp, &oct->sc_buf_pool.head) in octeon_alloc_soft_command()
884 atomic_inc(&oct->sc_buf_pool.alloc_buf_count); in octeon_alloc_soft_command()
886 spin_unlock_bh(&oct->sc_buf_pool.lock); in octeon_alloc_soft_command()
929 spin_lock_bh(&oct->sc_buf_pool.lock); in octeon_free_soft_command()
931 list_add_tail(&sc->node, &oct->sc_buf_pool.head); in octeon_free_soft_command()
933 atomic_dec(&oct->sc_buf_pool.alloc_buf_count); in octeon_free_soft_command()
935 spin_unlock_bh(&oct->sc_buf_pool.lock); in octeon_free_soft_command()