/* Bits are shifted out in MSB to LSB order.  */
static void e1000_shift_out_mdi_bits(struct e1000_hw *hw, u32 data, u16 count)
/* Bits are shifted out in MSB to LSB order.  */
static void e1000_shift_out_mdi_bits(struct e1000_hw *hw, u32 data, u16 count)
{
	u32 ctrl;
	u32 mask;
	mask = 0x01;
	mask <<= (count - 1);
	ctrl = er32(CTRL);
	ctrl |= (E1000_CTRL_MDIO_DIR | E1000_CTRL_MDC_DIR);
	while (mask) {
		if (data & mask)
			ctrl |= E1000_CTRL_MDIO;
		else
			ctrl &= ~E1000_CTRL_MDIO;
		ew32(CTRL, ctrl);
		E1000_WRITE_FLUSH();
		udelay(10);
		e1000_raise_mdi_clk(hw, &ctrl);
		e1000_lower_mdi_clk(hw, &ctrl);
		mask = mask >> 1;
	}
}