X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fbus%2Ffslmc%2Fmc%2Fdpci.c;h=2874a6196dc7bb7545e5b015574dbec109351f99;hb=e0857044ddf10e5b3c10c9f9c1446136c5247f75;hp=95edae9d9d3efd4a0c5544b9a7f9ee03d7f23e19;hpb=b4a63e605df40be963e11f1c2f23dfca4c5c4929;p=dpdk.git diff --git a/drivers/bus/fslmc/mc/dpci.c b/drivers/bus/fslmc/mc/dpci.c index 95edae9d9d..2874a6196d 100644 --- a/drivers/bus/fslmc/mc/dpci.c +++ b/drivers/bus/fslmc/mc/dpci.c @@ -301,81 +301,6 @@ int dpci_get_attributes(struct fsl_mc_io *mc_io, return 0; } -/** - * dpci_get_peer_attributes() - Retrieve peer DPCI attributes. - * @mc_io: Pointer to MC portal's I/O object - * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' - * @token: Token of DPCI object - * @attr: Returned peer attributes - * - * Return: '0' on Success; Error code otherwise. - */ -int dpci_get_peer_attributes(struct fsl_mc_io *mc_io, - uint32_t cmd_flags, - uint16_t token, - struct dpci_peer_attr *attr) -{ - struct dpci_rsp_get_peer_attr *rsp_params; - struct mc_command cmd = { 0 }; - int err; - - /* prepare command */ - cmd.header = mc_encode_cmd_header(DPCI_CMDID_GET_PEER_ATTR, - cmd_flags, - token); - - /* send command to mc*/ - err = mc_send_command(mc_io, &cmd); - if (err) - return err; - - /* retrieve response parameters */ - rsp_params = (struct dpci_rsp_get_peer_attr *)cmd.params; - attr->peer_id = le32_to_cpu(rsp_params->id); - attr->num_of_priorities = rsp_params->num_of_priorities; - - return 0; -} - -/** - * dpci_get_link_state() - Retrieve the DPCI link state. - * @mc_io: Pointer to MC portal's I/O object - * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' - * @token: Token of DPCI object - * @up: Returned link state; returns '1' if link is up, '0' otherwise - * - * DPCI can be connected to another DPCI, together they - * create a 'link'. In order to use the DPCI Tx and Rx queues, - * both objects must be enabled. - * - * Return: '0' on Success; Error code otherwise. - */ -int dpci_get_link_state(struct fsl_mc_io *mc_io, - uint32_t cmd_flags, - uint16_t token, - int *up) -{ - struct dpci_rsp_get_link_state *rsp_params; - struct mc_command cmd = { 0 }; - int err; - - /* prepare command */ - cmd.header = mc_encode_cmd_header(DPCI_CMDID_GET_LINK_STATE, - cmd_flags, - token); - - /* send command to mc*/ - err = mc_send_command(mc_io, &cmd); - if (err) - return err; - - /* retrieve response parameters */ - rsp_params = (struct dpci_rsp_get_link_state *)cmd.params; - *up = dpci_get_field(rsp_params->up, UP); - - return 0; -} - /** * dpci_set_rx_queue() - Set Rx queue configuration * @mc_io: Pointer to MC portal's I/O object