From: "Alexander V. Lukyanov" <lav@netis.ru>
To: netdev@vger.kernel.org, tori@unhappy.mine.nu
Subject: PATCH: fix hang in dmfe driver on sending of big packet (linux-2.6.35)
Date: Tue, 30 Nov 2010 16:38:04 +0300 [thread overview]
Message-ID: <20101130133804.GA1835@lw.yar.ru> (raw)
[-- Attachment #1: Type: text/plain, Size: 170 bytes --]
Hello!
This patch fixes hang in dmfe driver on attempt of sending a big packet.
Without this patch the code stops the queue and never wakes it again.
--
Alexander.
[-- Attachment #2: dmfe.patch --]
[-- Type: text/plain, Size: 602 bytes --]
--- dmfe.c.1 2010-11-30 16:21:52.758465207 +0300
+++ dmfe.c 2010-11-30 16:24:45.301468601 +0300
@@ -687,18 +687,18 @@
unsigned long flags;
DMFE_DBUG(0, "dmfe_start_xmit", 0);
- /* Resource flag check */
- netif_stop_queue(dev);
-
/* Too large packet check */
if (skb->len > MAX_PACKET_SIZE) {
pr_err("big packet = %d\n", (u16)skb->len);
dev_kfree_skb(skb);
return NETDEV_TX_OK;
}
+ /* Resource flag check */
+ netif_stop_queue(dev);
+
spin_lock_irqsave(&db->lock, flags);
/* No Tx resource check, it never happen nromally */
if (db->tx_queue_cnt >= TX_FREE_DESC_CNT) {
reply other threads:[~2010-11-30 14:21 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101130133804.GA1835@lw.yar.ru \
--to=lav@netis.ru \
--cc=netdev@vger.kernel.org \
--cc=tori@unhappy.mine.nu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox