/* Invoked by the network core when it requests for new packets from the driver  */
static int ks8695_poll(struct napi_struct *napi, int budget)
/* Invoked by the network core when it requests for new packets from the driver  */
static int ks8695_poll(struct napi_struct *napi, int budget)
{
	struct ks8695_priv *ksp = container_of(napi, struct ks8695_priv, napi);
	unsigned long  work_done;
	unsigned long isr = readl(KS8695_IRQ_VA + KS8695_INTEN);
	unsigned long mask_bit = 1 << ks8695_get_rx_enable_bit(ksp);
	work_done = ks8695_rx(ksp, budget);
	if (work_done < budget) {
		unsigned long flags;
		spin_lock_irqsave(&ksp->rx_lock, flags);
		writel(isr | mask_bit, KS8695_IRQ_VA + KS8695_INTEN);
		__napi_complete(napi);
		spin_unlock_irqrestore(&ksp->rx_lock, flags);
	}
	return work_done;
}