Lines Matching refs:cmd
381 u32 cmd; in cas_phy_read() local
384 cmd = MIF_FRAME_ST | MIF_FRAME_OP_READ; in cas_phy_read()
385 cmd |= CAS_BASE(MIF_FRAME_PHY_ADDR, cp->phy_addr); in cas_phy_read()
386 cmd |= CAS_BASE(MIF_FRAME_REG_ADDR, reg); in cas_phy_read()
387 cmd |= MIF_FRAME_TURN_AROUND_MSB; in cas_phy_read()
388 writel(cmd, cp->regs + REG_MIF_FRAME); in cas_phy_read()
393 cmd = readl(cp->regs + REG_MIF_FRAME); in cas_phy_read()
394 if (cmd & MIF_FRAME_TURN_AROUND_LSB) in cas_phy_read()
395 return cmd & MIF_FRAME_DATA_MASK; in cas_phy_read()
403 u32 cmd; in cas_phy_write() local
405 cmd = MIF_FRAME_ST | MIF_FRAME_OP_WRITE; in cas_phy_write()
406 cmd |= CAS_BASE(MIF_FRAME_PHY_ADDR, cp->phy_addr); in cas_phy_write()
407 cmd |= CAS_BASE(MIF_FRAME_REG_ADDR, reg); in cas_phy_write()
408 cmd |= MIF_FRAME_TURN_AROUND_MSB; in cas_phy_write()
409 cmd |= val & MIF_FRAME_DATA_MASK; in cas_phy_write()
410 writel(cmd, cp->regs + REG_MIF_FRAME); in cas_phy_write()
415 cmd = readl(cp->regs + REG_MIF_FRAME); in cas_phy_write()
416 if (cmd & MIF_FRAME_TURN_AROUND_LSB) in cas_phy_write()
4471 struct ethtool_link_ksettings *cmd) in cas_get_link_ksettings() argument
4492 cmd->base.port = PORT_MII; in cas_get_link_ksettings()
4493 cmd->base.phy_address = cp->phy_addr; in cas_get_link_ksettings()
4516 cmd->base.port = PORT_FIBRE; in cas_get_link_ksettings()
4517 cmd->base.phy_address = 0; in cas_get_link_ksettings()
4532 cmd->base.autoneg = AUTONEG_ENABLE; in cas_get_link_ksettings()
4533 cmd->base.speed = ((speed == 10) ? in cas_get_link_ksettings()
4537 cmd->base.duplex = full_duplex ? DUPLEX_FULL : DUPLEX_HALF; in cas_get_link_ksettings()
4539 cmd->base.autoneg = AUTONEG_DISABLE; in cas_get_link_ksettings()
4540 cmd->base.speed = ((bmcr & CAS_BMCR_SPEED1000) ? in cas_get_link_ksettings()
4544 cmd->base.duplex = (bmcr & BMCR_FULLDPLX) ? in cas_get_link_ksettings()
4559 cmd->base.speed = 0; in cas_get_link_ksettings()
4560 cmd->base.duplex = 0xff; in cas_get_link_ksettings()
4562 cmd->base.speed = SPEED_10; in cas_get_link_ksettings()
4564 cmd->base.speed = SPEED_100; in cas_get_link_ksettings()
4566 cmd->base.speed = SPEED_1000; in cas_get_link_ksettings()
4568 cmd->base.duplex = (cp->link_cntl & BMCR_FULLDPLX) ? in cas_get_link_ksettings()
4573 ethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.supported, in cas_get_link_ksettings()
4575 ethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.advertising, in cas_get_link_ksettings()
4582 const struct ethtool_link_ksettings *cmd) in cas_set_link_ksettings() argument
4586 u32 speed = cmd->base.speed; in cas_set_link_ksettings()
4589 if (cmd->base.autoneg != AUTONEG_ENABLE && in cas_set_link_ksettings()
4590 cmd->base.autoneg != AUTONEG_DISABLE) in cas_set_link_ksettings()
4593 if (cmd->base.autoneg == AUTONEG_DISABLE && in cas_set_link_ksettings()
4597 (cmd->base.duplex != DUPLEX_HALF && in cas_set_link_ksettings()
4598 cmd->base.duplex != DUPLEX_FULL))) in cas_set_link_ksettings()
4603 cas_begin_auto_negotiation(cp, cmd); in cas_set_link_ksettings()
4713 static int cas_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) in cas_ioctl() argument
4724 switch (cmd) { in cas_ioctl()