mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Roger Luethi <rl@hellgate.ch>
To: linux-kernel@vger.kernel.org
Cc: pin xue <pinxue@gmail.com>, Jeff Garzik <jgarzik@pobox.com>
Subject: [PATCH] via-rhine: execute bounce buffers code on Rhine-I only
Date: Tue, 4 Apr 2006 20:49:16 +0200	[thread overview]
Message-ID: <20060404184916.GD13676@k3.hellgate.ch> (raw)
In-Reply-To: <61291d840604040739m69642b26x4b24615112e37ce@mail.gmail.com>

Patch suggested by Yang Wu (pin xue <pinxue@gmail.com>).

Signed-off-by: Roger Luethi <rl@hellgate.ch>

--- linux-2.6.16/drivers/net/via-rhine.c.orig	2006-04-04 13:52:29.000000000 +0200
+++ linux-2.6.16/drivers/net/via-rhine.c	2006-04-04 20:40:08.000000000 +0200
@@ -475,7 +475,7 @@ struct rhine_private {
 	struct sk_buff *tx_skbuff[TX_RING_SIZE];
 	dma_addr_t tx_skbuff_dma[TX_RING_SIZE];
 
-	/* Tx bounce buffers */
+	/* Tx bounce buffers (Rhine-I only) */
 	unsigned char *tx_buf[TX_RING_SIZE];
 	unsigned char *tx_bufs;
 	dma_addr_t tx_bufs_dma;
@@ -1052,7 +1052,8 @@ static void alloc_tbufs(struct net_devic
 		rp->tx_ring[i].desc_length = cpu_to_le32(TXDESC);
 		next += sizeof(struct tx_desc);
 		rp->tx_ring[i].next_desc = cpu_to_le32(next);
-		rp->tx_buf[i] = &rp->tx_bufs[i * PKT_BUF_SZ];
+		if (rp->quirks & rqRhineI)
+			rp->tx_buf[i] = &rp->tx_bufs[i * PKT_BUF_SZ];
 	}
 	rp->tx_ring[i-1].next_desc = cpu_to_le32(rp->tx_ring_dma);
 

      reply	other threads:[~2006-04-04 18:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <61291d840604040738k1477cf72w7aadbc1e83d67bba@mail.gmail.com>
2006-04-04 14:39 ` a minor bug in via-rhine driver for linux pin xue
2006-04-04 18:49   ` Roger Luethi [this message]

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=20060404184916.GD13676@k3.hellgate.ch \
    --to=rl@hellgate.ch \
    --cc=jgarzik@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pinxue@gmail.com \
    /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

Powered by JetHome