Commit c2b08fea authored by Krzysztof Halasa's avatar Krzysztof Halasa Committed by Jeff Garzik

[PATCH] Re: [Fwd: [PATCH] Stop queue on close in hdlcdrv]

> From: Ralf Baechle <ralf@linux-mips.org>
> Subject: [PATCH] Stop queue on close in hdlcdrv
> To: Jeff Garzik <garzik@gtf.org>
> Date: Tue, 4 May 2004 13:59:15 +0200
>
> The stop method of a driver should ensure queueing is stopped ...
>
> diff -u -r1.19 hdlcdrv.c
> --- suckage/drivers/net/hamradio/hdlcdrv.c 12 Apr 2004 20:23:32 -0000

the above means the following is needed for my drivers - please apply to 2.6:
parent 2c151d83
......@@ -610,7 +610,6 @@ static void sca_close(struct net_device *dev)
card_t* card = port_to_card(port);
/* reset channel */
netif_stop_queue(dev);
sca_out(CMD_RESET, get_msci(port) + CMD, port_to_card(port));
#ifdef __HD64570_H
/* disable MSCI interrupts */
......@@ -624,6 +623,7 @@ static void sca_close(struct net_device *dev)
sca_outl(sca_inl(IER0, card) &
(phy_node(port) ? 0x00FF00FF : 0xFF00FF00), IER0, card);
#endif
netif_stop_queue(dev);
}
......
......@@ -418,8 +418,10 @@ static int wanxl_open(struct net_device *dev)
timeout = jiffies + HZ;
do
if (get_status(port)->open)
if (get_status(port)->open) {
netif_start_queue(dev);
return 0;
}
while (time_after(timeout, jiffies));
printk(KERN_ERR "%s: unable to open port\n", dev->name);
......@@ -450,6 +452,8 @@ static int wanxl_close(struct net_device *dev)
if (get_status(port)->open)
printk(KERN_ERR "%s: unable to close port\n", dev->name);
netif_stop_queue(dev);
for (i = 0; i < TX_BUFFERS; i++) {
desc_t *desc = &get_status(port)->tx_descs[i];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment