View | Details | Raw Unified | Return to bug 70761 | Differences between
and this patch

Collapse All | Expand All

(-)a/drivers/net/ethernet/atheros/alx/alx.h (+1 lines)
Lines 102-107 struct alx_priv { Link Here
102
102
103
	struct work_struct link_check_wk;
103
	struct work_struct link_check_wk;
104
	struct work_struct reset_wk;
104
	struct work_struct reset_wk;
105
	struct work_struct rx_refill_wk;
105
106
106
	u16 msg_enable;
107
	u16 msg_enable;
107
108
(-)a/drivers/net/ethernet/atheros/alx/main.c (-2 / +25 lines)
Lines 188-193 static void alx_schedule_reset(struct alx_priv *alx) Link Here
188
	schedule_work(&alx->reset_wk);
188
	schedule_work(&alx->reset_wk);
189
}
189
}
190
190
191
static void alx_schedule_rx_uv(struct alx_priv *alx)
192
{
193
	schedule_work(&alx->rx_refill_wk);
194
}
195
191
static int alx_clean_rx_irq(struct alx_priv *alx, int budget)
196
static int alx_clean_rx_irq(struct alx_priv *alx, int budget)
192
{
197
{
193
	struct alx_rx_queue *rxq = &alx->rxq;
198
	struct alx_rx_queue *rxq = &alx->rxq;
Lines 311-318 static irqreturn_t alx_intr_handle(struct alx_priv *alx, u32 intr) Link Here
311
		goto out;
316
		goto out;
312
	}
317
	}
313
318
314
	if (intr & ALX_ISR_ALERT)
319
	if (intr & ALX_ISR_ALERT) {
315
		netdev_warn(alx->dev, "alert interrupt: 0x%x\n", intr);
320
		netdev_warn(alx->dev, "alert interrupt: 0x%x\n", intr);
321
		/* No more RX buffers available. There must be a mechanism
322
		 * to refill them. Otherwise receiver will stop forever.
323
		 */
324
		if(intr & ALX_ISR_RFD_UR)
325
			alx_schedule_rx_uv(alx);
326
	}
316
327
317
	if (intr & ALX_ISR_PHY) {
328
	if (intr & ALX_ISR_PHY) {
318
		/* suppress PHY interrupt, because the source
329
		/* suppress PHY interrupt, because the source
Lines 986-991 static void alx_reset(struct work_struct *work) Link Here
986
	rtnl_unlock();
997
	rtnl_unlock();
987
}
998
}
988
999
1000
static void alx_rx_refill(struct work_struct *work)
1001
{
1002
	struct alx_priv *alx = container_of(work, struct alx_priv, rx_refill_wk);
1003
	int num;
1004
1005
	rtnl_lock();
1006
	num = alx_refill_rx_ring(alx, GFP_ATOMIC, alx->rx_ringsz);
1007
	rtnl_unlock();
1008
	if(!num)
1009
		schedule_work(&alx->rx_refill_wk);
1010
}
1011
989
static int alx_tx_csum(struct sk_buff *skb, struct alx_txd *first)
1012
static int alx_tx_csum(struct sk_buff *skb, struct alx_txd *first)
990
{
1013
{
991
	u8 cso, css;
1014
	u8 cso, css;
Lines 1375-1380 static int alx_probe(struct pci_dev *pdev, const struct pci_device_id *ent) Link Here
1375
1398
1376
	INIT_WORK(&alx->link_check_wk, alx_link_check);
1399
	INIT_WORK(&alx->link_check_wk, alx_link_check);
1377
	INIT_WORK(&alx->reset_wk, alx_reset);
1400
	INIT_WORK(&alx->reset_wk, alx_reset);
1401
	INIT_WORK(&alx->rx_refill_wk, alx_rx_refill);
1378
	netif_carrier_off(netdev);
1402
	netif_carrier_off(netdev);
1379
1403
1380
	err = register_netdev(netdev);
1404
	err = register_netdev(netdev);
1381
- 

Return to bug 70761