/* ks_read_qmu - read 1 pkt data from the QMU. @ks: The chip information @buf: buffer address to save 1 pkt @len: Pkt length Here is the sequence to read 1 pkt: */
static void ks_read_qmu(struct ks_net *ks, u16 *buf, u32 len)
/* ks_read_qmu - read 1 pkt data from the QMU. @ks: The chip information @buf: buffer address to save 1 pkt @len: Pkt length Here is the sequence to read 1 pkt: */
static void ks_read_qmu(struct ks_net *ks, u16 *buf, u32 len)
{
	u32 r =  ks->extra_byte & 0x1 ;
	u32 w = ks->extra_byte - r;
	ks_wrreg16(ks, KS_RXFDPR, RXFDPR_RXFPAI);
	ks_wrreg8(ks, KS_RXQCR, (ks->rc_rxqcr | RXQCR_SDA) & 0xff);
	if (unlikely(r))
		ioread8(ks->hw_addr);
	ks_inblk(ks, buf, w + 2 + 2);
	ks_inblk(ks, buf, ALIGN(len, 4));
	ks_wrreg8(ks, KS_RXQCR, ks->rc_rxqcr);
}