Lines Matching refs:mdio_cmd
45 struct hclge_mdio_cfg_cmd *mdio_cmd; in hclge_mdio_write() local
55 mdio_cmd = (struct hclge_mdio_cfg_cmd *)desc.data; in hclge_mdio_write()
57 hnae3_set_field(mdio_cmd->phyid, HCLGE_MDIO_PHYID_M, in hclge_mdio_write()
59 hnae3_set_field(mdio_cmd->phyad, HCLGE_MDIO_PHYREG_M, in hclge_mdio_write()
62 hnae3_set_bit(mdio_cmd->ctrl_bit, HCLGE_MDIO_CTRL_START_B, 1); in hclge_mdio_write()
63 hnae3_set_field(mdio_cmd->ctrl_bit, HCLGE_MDIO_CTRL_ST_M, in hclge_mdio_write()
65 hnae3_set_field(mdio_cmd->ctrl_bit, HCLGE_MDIO_CTRL_OP_M, in hclge_mdio_write()
68 mdio_cmd->data_wr = cpu_to_le16(data); in hclge_mdio_write()
83 struct hclge_mdio_cfg_cmd *mdio_cmd; in hclge_mdio_read() local
93 mdio_cmd = (struct hclge_mdio_cfg_cmd *)desc.data; in hclge_mdio_read()
95 hnae3_set_field(mdio_cmd->phyid, HCLGE_MDIO_PHYID_M, in hclge_mdio_read()
97 hnae3_set_field(mdio_cmd->phyad, HCLGE_MDIO_PHYREG_M, in hclge_mdio_read()
100 hnae3_set_bit(mdio_cmd->ctrl_bit, HCLGE_MDIO_CTRL_START_B, 1); in hclge_mdio_read()
101 hnae3_set_field(mdio_cmd->ctrl_bit, HCLGE_MDIO_CTRL_ST_M, in hclge_mdio_read()
103 hnae3_set_field(mdio_cmd->ctrl_bit, HCLGE_MDIO_CTRL_OP_M, in hclge_mdio_read()
115 if (hnae3_get_bit(le16_to_cpu(mdio_cmd->sta), HCLGE_MDIO_STA_B)) { in hclge_mdio_read()
120 return le16_to_cpu(mdio_cmd->data_rd); in hclge_mdio_read()