/* ks_write_qmu - write 1 pkt data to the QMU. @ks: The chip information @pdata: buffer address to save 1 pkt @len: Pkt length in byte Here is the sequence to write 1 pkt: */
static void ks_write_qmu(struct ks_net *ks, u8 *pdata, u16 len)
/* ks_write_qmu - write 1 pkt data to the QMU. @ks: The chip information @pdata: buffer address to save 1 pkt @len: Pkt length in byte Here is the sequence to write 1 pkt: */
static void ks_write_qmu(struct ks_net *ks, u8 *pdata, u16 len)
{
	ks->txh.txw[0] = 0;
	ks->txh.txw[1] = cpu_to_le16(len);
	ks_wrreg8(ks, KS_RXQCR, (ks->rc_rxqcr | RXQCR_SDA) & 0xff);
	ks_outblk(ks, ks->txh.txw, 4);
	ks_outblk(ks, (u16 *)pdata, ALIGN(len, 4));
	ks_wrreg8(ks, KS_RXQCR, ks->rc_rxqcr);
	ks_wrreg16(ks, KS_TXQCR, TXQCR_METFE);
	while (ks_rdreg16(ks, KS_TXQCR) & TXQCR_METFE)
		;
}