pf_to_mgmt 828 drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c err = hinic_msg_to_mgmt(&pfhwdev->pf_to_mgmt, HINIC_MOD_COMM, pf_to_mgmt 120 drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c err = hinic_msg_to_mgmt(&pfhwdev->pf_to_mgmt, HINIC_MOD_CFGM, pf_to_mgmt 239 drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c return hinic_msg_to_mgmt(&pfhwdev->pf_to_mgmt, HINIC_MOD_L2NIC, cmd, pf_to_mgmt 315 drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c return hinic_msg_to_mgmt(&pfhwdev->pf_to_mgmt, HINIC_MOD_COMM, pf_to_mgmt 389 drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c err = hinic_msg_to_mgmt(&pfhwdev->pf_to_mgmt, HINIC_MOD_COMM, pf_to_mgmt 426 drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c return hinic_msg_to_mgmt(&pfhwdev->pf_to_mgmt, pf_to_mgmt 673 drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c err = hinic_pf_to_mgmt_init(&pfhwdev->pf_to_mgmt, hwif); pf_to_mgmt 679 drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c hinic_register_mgmt_msg_cb(&pfhwdev->pf_to_mgmt, HINIC_MOD_L2NIC, pf_to_mgmt 696 drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c hinic_unregister_mgmt_msg_cb(&pfhwdev->pf_to_mgmt, HINIC_MOD_L2NIC); pf_to_mgmt 698 drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c hinic_pf_to_mgmt_free(&pfhwdev->pf_to_mgmt); pf_to_mgmt 956 drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c return hinic_msg_to_mgmt(&pfhwdev->pf_to_mgmt, pf_to_mgmt 244 drivers/net/ethernet/huawei/hinic/hinic_hw_dev.h struct hinic_pf_to_mgmt pf_to_mgmt; pf_to_mgmt 25 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c #define SYNC_MSG_ID(pf_to_mgmt) ((pf_to_mgmt)->sync_msg_id) pf_to_mgmt 27 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c #define SYNC_MSG_ID_INC(pf_to_mgmt) (SYNC_MSG_ID(pf_to_mgmt) = \ pf_to_mgmt 28 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c ((SYNC_MSG_ID(pf_to_mgmt) + 1) & \ pf_to_mgmt 51 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c container_of(pf_mgmt, struct hinic_pfhwdev, pf_to_mgmt) pf_to_mgmt 75 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c void hinic_register_mgmt_msg_cb(struct hinic_pf_to_mgmt *pf_to_mgmt, pf_to_mgmt 83 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c struct hinic_mgmt_cb *mgmt_cb = &pf_to_mgmt->mgmt_cb[mod]; pf_to_mgmt 95 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c void hinic_unregister_mgmt_msg_cb(struct hinic_pf_to_mgmt *pf_to_mgmt, pf_to_mgmt 98 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c struct hinic_mgmt_cb *mgmt_cb = &pf_to_mgmt->mgmt_cb[mod]; pf_to_mgmt 120 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c static u64 prepare_header(struct hinic_pf_to_mgmt *pf_to_mgmt, pf_to_mgmt 126 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c struct hinic_hwif *hwif = pf_to_mgmt->hwif; pf_to_mgmt 194 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c static int send_msg_to_mgmt(struct hinic_pf_to_mgmt *pf_to_mgmt, pf_to_mgmt 205 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c msg_id = SYNC_MSG_ID(pf_to_mgmt); pf_to_mgmt 208 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c header = prepare_header(pf_to_mgmt, data_len, mod, ack_type, pf_to_mgmt 211 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c SYNC_MSG_ID_INC(pf_to_mgmt); pf_to_mgmt 212 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c header = prepare_header(pf_to_mgmt, data_len, mod, ack_type, pf_to_mgmt 216 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c prepare_mgmt_cmd(pf_to_mgmt->sync_msg_buf, &header, data, data_len); pf_to_mgmt 218 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c chain = pf_to_mgmt->cmd_chain[HINIC_API_CMD_WRITE_TO_MGMT_CPU]; pf_to_mgmt 220 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c pf_to_mgmt->sync_msg_buf, pf_to_mgmt 238 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c static int msg_to_mgmt_sync(struct hinic_pf_to_mgmt *pf_to_mgmt, pf_to_mgmt 245 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c struct hinic_hwif *hwif = pf_to_mgmt->hwif; pf_to_mgmt 254 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c down(&pf_to_mgmt->sync_msg_lock); pf_to_mgmt 256 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c recv_msg = &pf_to_mgmt->recv_resp_msg_from_mgmt; pf_to_mgmt 260 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c msg_id = SYNC_MSG_ID(pf_to_mgmt); pf_to_mgmt 266 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c err = send_msg_to_mgmt(pf_to_mgmt, mod, cmd, buf_in, in_size, pf_to_mgmt 295 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c up(&pf_to_mgmt->sync_msg_lock); pf_to_mgmt 311 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c static int msg_to_mgmt_async(struct hinic_pf_to_mgmt *pf_to_mgmt, pf_to_mgmt 320 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c down(&pf_to_mgmt->sync_msg_lock); pf_to_mgmt 322 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c err = send_msg_to_mgmt(pf_to_mgmt, mod, cmd, buf_in, in_size, pf_to_mgmt 325 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c up(&pf_to_mgmt->sync_msg_lock); pf_to_mgmt 342 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c int hinic_msg_to_mgmt(struct hinic_pf_to_mgmt *pf_to_mgmt, pf_to_mgmt 347 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c struct hinic_hwif *hwif = pf_to_mgmt->hwif; pf_to_mgmt 364 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c return msg_to_mgmt_sync(pf_to_mgmt, mod, cmd, buf_in, in_size, pf_to_mgmt 374 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c static void mgmt_recv_msg_handler(struct hinic_pf_to_mgmt *pf_to_mgmt, pf_to_mgmt 377 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c struct hinic_hwif *hwif = pf_to_mgmt->hwif; pf_to_mgmt 390 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c mgmt_cb = &pf_to_mgmt->mgmt_cb[recv_msg->mod]; pf_to_mgmt 408 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c msg_to_mgmt_async(pf_to_mgmt, recv_msg->mod, recv_msg->cmd, pf_to_mgmt 418 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c static void mgmt_resp_msg_handler(struct hinic_pf_to_mgmt *pf_to_mgmt, pf_to_mgmt 432 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c static void recv_mgmt_msg_handler(struct hinic_pf_to_mgmt *pf_to_mgmt, pf_to_mgmt 435 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c struct hinic_hwif *hwif = pf_to_mgmt->hwif; pf_to_mgmt 462 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c mgmt_resp_msg_handler(pf_to_mgmt, recv_msg); pf_to_mgmt 464 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c mgmt_recv_msg_handler(pf_to_mgmt, recv_msg); pf_to_mgmt 475 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c struct hinic_pf_to_mgmt *pf_to_mgmt = handle; pf_to_mgmt 481 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c &pf_to_mgmt->recv_msg_from_mgmt : pf_to_mgmt 482 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c &pf_to_mgmt->recv_resp_msg_from_mgmt; pf_to_mgmt 484 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c recv_mgmt_msg_handler(pf_to_mgmt, header, recv_msg); pf_to_mgmt 494 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c static int alloc_recv_msg(struct hinic_pf_to_mgmt *pf_to_mgmt, pf_to_mgmt 497 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c struct hinic_hwif *hwif = pf_to_mgmt->hwif; pf_to_mgmt 519 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c static int alloc_msg_buf(struct hinic_pf_to_mgmt *pf_to_mgmt) pf_to_mgmt 521 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c struct hinic_hwif *hwif = pf_to_mgmt->hwif; pf_to_mgmt 525 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c err = alloc_recv_msg(pf_to_mgmt, pf_to_mgmt 526 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c &pf_to_mgmt->recv_msg_from_mgmt); pf_to_mgmt 532 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c err = alloc_recv_msg(pf_to_mgmt, pf_to_mgmt 533 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c &pf_to_mgmt->recv_resp_msg_from_mgmt); pf_to_mgmt 539 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c pf_to_mgmt->sync_msg_buf = devm_kzalloc(&pdev->dev, pf_to_mgmt 542 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c if (!pf_to_mgmt->sync_msg_buf) pf_to_mgmt 555 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c int hinic_pf_to_mgmt_init(struct hinic_pf_to_mgmt *pf_to_mgmt, pf_to_mgmt 558 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c struct hinic_pfhwdev *pfhwdev = mgmt_to_pfhwdev(pf_to_mgmt); pf_to_mgmt 563 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c pf_to_mgmt->hwif = hwif; pf_to_mgmt 565 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c sema_init(&pf_to_mgmt->sync_msg_lock, 1); pf_to_mgmt 566 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c pf_to_mgmt->sync_msg_id = 0; pf_to_mgmt 568 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c err = alloc_msg_buf(pf_to_mgmt); pf_to_mgmt 574 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c err = hinic_api_cmd_init(pf_to_mgmt->cmd_chain, hwif); pf_to_mgmt 581 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c pf_to_mgmt, pf_to_mgmt 590 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c void hinic_pf_to_mgmt_free(struct hinic_pf_to_mgmt *pf_to_mgmt) pf_to_mgmt 592 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c struct hinic_pfhwdev *pfhwdev = mgmt_to_pfhwdev(pf_to_mgmt); pf_to_mgmt 596 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c hinic_api_cmd_free(pf_to_mgmt->cmd_chain); pf_to_mgmt 123 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.h void hinic_register_mgmt_msg_cb(struct hinic_pf_to_mgmt *pf_to_mgmt, pf_to_mgmt 131 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.h void hinic_unregister_mgmt_msg_cb(struct hinic_pf_to_mgmt *pf_to_mgmt, pf_to_mgmt 134 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.h int hinic_msg_to_mgmt(struct hinic_pf_to_mgmt *pf_to_mgmt, pf_to_mgmt 139 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.h int hinic_pf_to_mgmt_init(struct hinic_pf_to_mgmt *pf_to_mgmt, pf_to_mgmt 142 drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.h void hinic_pf_to_mgmt_free(struct hinic_pf_to_mgmt *pf_to_mgmt);