p_spq 586 drivers/net/ethernet/qlogic/qed/qed.h struct qed_spq *p_spq; p_spq 2270 drivers/net/ethernet/qlogic/qed/qed_dev.c n_eqes = qed_chain_get_capacity(&p_hwfn->p_spq->chain); p_spq 57 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c if (p_ent->queue == &p_hwfn->p_spq->unlimited_pending) p_spq 212 drivers/net/ethernet/qlogic/qed/qed_spq.c struct qed_spq *p_spq) p_spq 219 drivers/net/ethernet/qlogic/qed/qed_spq.c cxt_info.iid = p_spq->cid; p_spq 225 drivers/net/ethernet/qlogic/qed/qed_spq.c p_spq->cid); p_spq 243 drivers/net/ethernet/qlogic/qed/qed_spq.c DMA_LO_LE(p_spq->chain.p_phys_addr); p_spq 245 drivers/net/ethernet/qlogic/qed/qed_spq.c DMA_HI_LE(p_spq->chain.p_phys_addr); p_spq 252 drivers/net/ethernet/qlogic/qed/qed_spq.c struct qed_spq *p_spq, struct qed_spq_entry *p_ent) p_spq 254 drivers/net/ethernet/qlogic/qed/qed_spq.c struct qed_chain *p_chain = &p_hwfn->p_spq->chain; p_spq 255 drivers/net/ethernet/qlogic/qed/qed_spq.c struct core_db_data *p_db_data = &p_spq->db_data; p_spq 274 drivers/net/ethernet/qlogic/qed/qed_spq.c DOORBELL(p_hwfn, p_spq->db_addr_offset, *(u32 *)p_db_data); p_spq 281 drivers/net/ethernet/qlogic/qed/qed_spq.c p_spq->db_addr_offset, p_spq 282 drivers/net/ethernet/qlogic/qed/qed_spq.c p_spq->cid, p_spq 298 drivers/net/ethernet/qlogic/qed/qed_spq.c if (!p_hwfn->p_spq || (p_eqe->protocol_id >= MAX_PROTOCOL_TYPE)) p_spq 301 drivers/net/ethernet/qlogic/qed/qed_spq.c cb = p_hwfn->p_spq->async_comp_cb[p_eqe->protocol_id]; p_spq 318 drivers/net/ethernet/qlogic/qed/qed_spq.c if (!p_hwfn->p_spq || (protocol_id >= MAX_PROTOCOL_TYPE)) p_spq 321 drivers/net/ethernet/qlogic/qed/qed_spq.c p_hwfn->p_spq->async_comp_cb[protocol_id] = cb; p_spq 329 drivers/net/ethernet/qlogic/qed/qed_spq.c if (!p_hwfn->p_spq || (protocol_id >= MAX_PROTOCOL_TYPE)) p_spq 332 drivers/net/ethernet/qlogic/qed/qed_spq.c p_hwfn->p_spq->async_comp_cb[protocol_id] = NULL; p_spq 398 drivers/net/ethernet/qlogic/qed/qed_spq.c spin_lock_bh(&p_hwfn->p_spq->lock); p_spq 400 drivers/net/ethernet/qlogic/qed/qed_spq.c spin_unlock_bh(&p_hwfn->p_spq->lock); p_spq 488 drivers/net/ethernet/qlogic/qed/qed_spq.c struct qed_spq *p_spq = p_hwfn->p_spq; p_spq 496 drivers/net/ethernet/qlogic/qed/qed_spq.c INIT_LIST_HEAD(&p_spq->pending); p_spq 497 drivers/net/ethernet/qlogic/qed/qed_spq.c INIT_LIST_HEAD(&p_spq->completion_pending); p_spq 498 drivers/net/ethernet/qlogic/qed/qed_spq.c INIT_LIST_HEAD(&p_spq->free_pool); p_spq 499 drivers/net/ethernet/qlogic/qed/qed_spq.c INIT_LIST_HEAD(&p_spq->unlimited_pending); p_spq 500 drivers/net/ethernet/qlogic/qed/qed_spq.c spin_lock_init(&p_spq->lock); p_spq 503 drivers/net/ethernet/qlogic/qed/qed_spq.c p_phys = p_spq->p_phys + offsetof(struct qed_spq_entry, ramrod); p_spq 504 drivers/net/ethernet/qlogic/qed/qed_spq.c p_virt = p_spq->p_virt; p_spq 506 drivers/net/ethernet/qlogic/qed/qed_spq.c capacity = qed_chain_get_capacity(&p_spq->chain); p_spq 510 drivers/net/ethernet/qlogic/qed/qed_spq.c list_add_tail(&p_virt->list, &p_spq->free_pool); p_spq 517 drivers/net/ethernet/qlogic/qed/qed_spq.c p_spq->normal_count = 0; p_spq 518 drivers/net/ethernet/qlogic/qed/qed_spq.c p_spq->comp_count = 0; p_spq 519 drivers/net/ethernet/qlogic/qed/qed_spq.c p_spq->comp_sent_count = 0; p_spq 520 drivers/net/ethernet/qlogic/qed/qed_spq.c p_spq->unlimited_pending_count = 0; p_spq 522 drivers/net/ethernet/qlogic/qed/qed_spq.c bitmap_zero(p_spq->p_comp_bitmap, SPQ_RING_SIZE); p_spq 523 drivers/net/ethernet/qlogic/qed/qed_spq.c p_spq->comp_bitmap_idx = 0; p_spq 526 drivers/net/ethernet/qlogic/qed/qed_spq.c qed_cxt_acquire_cid(p_hwfn, PROTOCOLID_CORE, &p_spq->cid); p_spq 527 drivers/net/ethernet/qlogic/qed/qed_spq.c qed_spq_hw_initialize(p_hwfn, p_spq); p_spq 530 drivers/net/ethernet/qlogic/qed/qed_spq.c qed_chain_reset(&p_spq->chain); p_spq 533 drivers/net/ethernet/qlogic/qed/qed_spq.c p_spq->db_addr_offset = qed_db_addr(p_spq->cid, DQ_DEMS_LEGACY); p_spq 534 drivers/net/ethernet/qlogic/qed/qed_spq.c p_db_data = &p_spq->db_data; p_spq 544 drivers/net/ethernet/qlogic/qed/qed_spq.c p_spq->db_addr_offset); p_spq 545 drivers/net/ethernet/qlogic/qed/qed_spq.c rc = qed_db_recovery_add(p_hwfn->cdev, db_addr, &p_spq->db_data, p_spq 555 drivers/net/ethernet/qlogic/qed/qed_spq.c struct qed_spq *p_spq = NULL; p_spq 560 drivers/net/ethernet/qlogic/qed/qed_spq.c p_spq = kzalloc(sizeof(struct qed_spq), GFP_KERNEL); p_spq 561 drivers/net/ethernet/qlogic/qed/qed_spq.c if (!p_spq) p_spq 571 drivers/net/ethernet/qlogic/qed/qed_spq.c &p_spq->chain, NULL)) p_spq 575 drivers/net/ethernet/qlogic/qed/qed_spq.c capacity = qed_chain_get_capacity(&p_spq->chain); p_spq 582 drivers/net/ethernet/qlogic/qed/qed_spq.c p_spq->p_virt = p_virt; p_spq 583 drivers/net/ethernet/qlogic/qed/qed_spq.c p_spq->p_phys = p_phys; p_spq 584 drivers/net/ethernet/qlogic/qed/qed_spq.c p_hwfn->p_spq = p_spq; p_spq 589 drivers/net/ethernet/qlogic/qed/qed_spq.c qed_chain_free(p_hwfn->cdev, &p_spq->chain); p_spq 590 drivers/net/ethernet/qlogic/qed/qed_spq.c kfree(p_spq); p_spq 596 drivers/net/ethernet/qlogic/qed/qed_spq.c struct qed_spq *p_spq = p_hwfn->p_spq; p_spq 600 drivers/net/ethernet/qlogic/qed/qed_spq.c if (!p_spq) p_spq 605 drivers/net/ethernet/qlogic/qed/qed_spq.c p_spq->db_addr_offset); p_spq 606 drivers/net/ethernet/qlogic/qed/qed_spq.c qed_db_recovery_del(p_hwfn->cdev, db_addr, &p_spq->db_data); p_spq 608 drivers/net/ethernet/qlogic/qed/qed_spq.c if (p_spq->p_virt) { p_spq 609 drivers/net/ethernet/qlogic/qed/qed_spq.c capacity = qed_chain_get_capacity(&p_spq->chain); p_spq 613 drivers/net/ethernet/qlogic/qed/qed_spq.c p_spq->p_virt, p_spq->p_phys); p_spq 616 drivers/net/ethernet/qlogic/qed/qed_spq.c qed_chain_free(p_hwfn->cdev, &p_spq->chain); p_spq 617 drivers/net/ethernet/qlogic/qed/qed_spq.c kfree(p_spq); p_spq 618 drivers/net/ethernet/qlogic/qed/qed_spq.c p_hwfn->p_spq = NULL; p_spq 623 drivers/net/ethernet/qlogic/qed/qed_spq.c struct qed_spq *p_spq = p_hwfn->p_spq; p_spq 627 drivers/net/ethernet/qlogic/qed/qed_spq.c spin_lock_bh(&p_spq->lock); p_spq 629 drivers/net/ethernet/qlogic/qed/qed_spq.c if (list_empty(&p_spq->free_pool)) { p_spq 637 drivers/net/ethernet/qlogic/qed/qed_spq.c p_ent->queue = &p_spq->unlimited_pending; p_spq 639 drivers/net/ethernet/qlogic/qed/qed_spq.c p_ent = list_first_entry(&p_spq->free_pool, p_spq 642 drivers/net/ethernet/qlogic/qed/qed_spq.c p_ent->queue = &p_spq->pending; p_spq 648 drivers/net/ethernet/qlogic/qed/qed_spq.c spin_unlock_bh(&p_spq->lock); p_spq 656 drivers/net/ethernet/qlogic/qed/qed_spq.c list_add_tail(&p_ent->list, &p_hwfn->p_spq->free_pool); p_spq 661 drivers/net/ethernet/qlogic/qed/qed_spq.c spin_lock_bh(&p_hwfn->p_spq->lock); p_spq 663 drivers/net/ethernet/qlogic/qed/qed_spq.c spin_unlock_bh(&p_hwfn->p_spq->lock); p_spq 684 drivers/net/ethernet/qlogic/qed/qed_spq.c struct qed_spq *p_spq = p_hwfn->p_spq; p_spq 686 drivers/net/ethernet/qlogic/qed/qed_spq.c if (p_ent->queue == &p_spq->unlimited_pending) { p_spq 688 drivers/net/ethernet/qlogic/qed/qed_spq.c if (list_empty(&p_spq->free_pool)) { p_spq 689 drivers/net/ethernet/qlogic/qed/qed_spq.c list_add_tail(&p_ent->list, &p_spq->unlimited_pending); p_spq 690 drivers/net/ethernet/qlogic/qed/qed_spq.c p_spq->unlimited_pending_count++; p_spq 696 drivers/net/ethernet/qlogic/qed/qed_spq.c p_en2 = list_first_entry(&p_spq->free_pool, p_spq 721 drivers/net/ethernet/qlogic/qed/qed_spq.c list_add_tail(&p_ent->list, &p_spq->pending); p_spq 722 drivers/net/ethernet/qlogic/qed/qed_spq.c p_spq->normal_count++; p_spq 725 drivers/net/ethernet/qlogic/qed/qed_spq.c list_add(&p_ent->list, &p_spq->pending); p_spq 726 drivers/net/ethernet/qlogic/qed/qed_spq.c p_spq->high_count++; p_spq 740 drivers/net/ethernet/qlogic/qed/qed_spq.c if (!p_hwfn->p_spq) p_spq 742 drivers/net/ethernet/qlogic/qed/qed_spq.c return p_hwfn->p_spq->cid; p_spq 751 drivers/net/ethernet/qlogic/qed/qed_spq.c struct qed_spq *p_spq = p_hwfn->p_spq; p_spq 754 drivers/net/ethernet/qlogic/qed/qed_spq.c while (qed_chain_get_elem_left(&p_spq->chain) > keep_reserve && p_spq 758 drivers/net/ethernet/qlogic/qed/qed_spq.c list_move_tail(&p_ent->list, &p_spq->completion_pending); p_spq 759 drivers/net/ethernet/qlogic/qed/qed_spq.c p_spq->comp_sent_count++; p_spq 761 drivers/net/ethernet/qlogic/qed/qed_spq.c rc = qed_spq_hw_post(p_hwfn, p_spq, p_ent); p_spq 774 drivers/net/ethernet/qlogic/qed/qed_spq.c struct qed_spq *p_spq = p_hwfn->p_spq; p_spq 777 drivers/net/ethernet/qlogic/qed/qed_spq.c while (!list_empty(&p_spq->free_pool)) { p_spq 778 drivers/net/ethernet/qlogic/qed/qed_spq.c if (list_empty(&p_spq->unlimited_pending)) p_spq 781 drivers/net/ethernet/qlogic/qed/qed_spq.c p_ent = list_first_entry(&p_spq->unlimited_pending, p_spq 791 drivers/net/ethernet/qlogic/qed/qed_spq.c return qed_spq_post_list(p_hwfn, &p_spq->pending, p_spq 813 drivers/net/ethernet/qlogic/qed/qed_spq.c struct qed_spq *p_spq = p_hwfn->p_spq; p_spq 815 drivers/net/ethernet/qlogic/qed/qed_spq.c __set_bit(pos, p_spq->p_comp_bitmap); p_spq 816 drivers/net/ethernet/qlogic/qed/qed_spq.c while (test_bit(p_spq->comp_bitmap_idx, p_spq 817 drivers/net/ethernet/qlogic/qed/qed_spq.c p_spq->p_comp_bitmap)) { p_spq 818 drivers/net/ethernet/qlogic/qed/qed_spq.c __clear_bit(p_spq->comp_bitmap_idx, p_spq 819 drivers/net/ethernet/qlogic/qed/qed_spq.c p_spq->p_comp_bitmap); p_spq 820 drivers/net/ethernet/qlogic/qed/qed_spq.c p_spq->comp_bitmap_idx++; p_spq 821 drivers/net/ethernet/qlogic/qed/qed_spq.c qed_chain_return_produced(&p_spq->chain); p_spq 829 drivers/net/ethernet/qlogic/qed/qed_spq.c struct qed_spq *p_spq = p_hwfn ? p_hwfn->p_spq : NULL; p_spq 855 drivers/net/ethernet/qlogic/qed/qed_spq.c spin_lock_bh(&p_spq->lock); p_spq 881 drivers/net/ethernet/qlogic/qed/qed_spq.c spin_unlock_bh(&p_spq->lock); p_spq 890 drivers/net/ethernet/qlogic/qed/qed_spq.c p_ent->queue == &p_spq->unlimited_pending); p_spq 892 drivers/net/ethernet/qlogic/qed/qed_spq.c if (p_ent->queue == &p_spq->unlimited_pending) { p_spq 910 drivers/net/ethernet/qlogic/qed/qed_spq.c spin_lock_bh(&p_spq->lock); p_spq 918 drivers/net/ethernet/qlogic/qed/qed_spq.c spin_unlock_bh(&p_spq->lock); p_spq 928 drivers/net/ethernet/qlogic/qed/qed_spq.c struct qed_spq *p_spq; p_spq 936 drivers/net/ethernet/qlogic/qed/qed_spq.c p_spq = p_hwfn->p_spq; p_spq 937 drivers/net/ethernet/qlogic/qed/qed_spq.c if (!p_spq) p_spq 940 drivers/net/ethernet/qlogic/qed/qed_spq.c spin_lock_bh(&p_spq->lock); p_spq 941 drivers/net/ethernet/qlogic/qed/qed_spq.c list_for_each_entry_safe(p_ent, tmp, &p_spq->completion_pending, list) { p_spq 945 drivers/net/ethernet/qlogic/qed/qed_spq.c p_spq->comp_count++; p_spq 962 drivers/net/ethernet/qlogic/qed/qed_spq.c spin_unlock_bh(&p_spq->lock);