static int device_rx_srv(struct vnt_private *pDevice, unsigned int uIdx) { PSRxDesc pRD; int works = 0; for (pRD = pDevice->pCurrRD[uIdx]; pRD->m_rd0RD0.f1Owner == OWNED_BY_HOST; pRD = pRD->next) { if (works++ > 15) break; if (!pRD->pRDInfo->skb) break; if (vnt_receive_frame(pDevice, pRD)) { if (!device_alloc_rx_buf(pDevice, pRD)) { dev_err(&pDevice->pcid->dev, "can not allocate rx buf\n"); break; } } pRD->m_rd0RD0.f1Owner = OWNED_BY_NIC; } pDevice->pCurrRD[uIdx] = pRD; return works; }
static int device_rx_srv(struct vnt_private *priv, unsigned int idx) { struct vnt_rx_desc *rd; int works = 0; for (rd = priv->pCurrRD[idx]; rd->rd0.owner == OWNED_BY_HOST; rd = rd->next) { if (works++ > 15) break; if (!rd->rd_info->skb) break; if (vnt_receive_frame(priv, rd)) { if (!device_alloc_rx_buf(priv, rd)) { dev_err(&priv->pcid->dev, "can not allocate rx buf\n"); break; } } rd->rd0.owner = OWNED_BY_NIC; } priv->pCurrRD[idx] = rd; return works; }