All of lore.kernel.org
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@redhat.com>
To: Pekka Pietikainen <pp@ee.oulu.fi>
Cc: jgarzik@pobox.com, jolt@tuxbox.org, linux-kernel@vger.kernel.org,
	netdev@oss.sgi.com
Subject: Re: [PATCH] b44 1GB DMA workaround (was: b44: add 47xx support)
Date: Tue, 3 Aug 2004 18:39:19 -0700	[thread overview]
Message-ID: <20040803183919.2990d045.davem@redhat.com> (raw)
In-Reply-To: <20040804003108.GA10445@ee.oulu.fi>

On Wed, 4 Aug 2004 03:31:08 +0300
Pekka Pietikainen <pp@ee.oulu.fi> wrote:

> +	if(mapping+len > B44_DMA_MASK) {
> +		/* Chip can't handle DMA to/from >1GB, use bounce buffer */
> +		pci_unmap_single(bp->pdev, mapping, len,PCI_DMA_TODEVICE);
> +		memcpy(bp->tx_bufs+entry*TX_PKT_BUF_SZ,skb->data,skb->len);
> +		skb->data=bp->tx_bufs+entry*TX_PKT_BUF_SZ;
> +		mapping = pci_map_single(bp->pdev, skb->data, len, PCI_DMA_TODEVICE);
> +	}

Changing skb->data is not legal.  Please implement this in
such a way that skb->data does not get modified.  By modifying
skb->data you will break things such as packet sniffers and
netfilter, and that's just the tip of the iceberg. :-)

I would suggest merely freeing up this TX skb, and marking the
entry in the b44 software state with some dummy skb pointer
such as (void *) 0x1UL or something like that to indicate
this case.

  reply	other threads:[~2004-08-04  1:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-23 21:35 b44: add 47xx support Florian Schirmer
2004-07-26 14:11 ` Pekka Pietikainen
2004-08-04  0:31   ` [PATCH] b44 1GB DMA workaround (was: b44: add 47xx support) Pekka Pietikainen
2004-08-04  1:39     ` David S. Miller [this message]
2004-08-07 22:40       ` Pekka Pietikainen
2004-08-08  0:05         ` David S. Miller
2004-08-08  9:31           ` [PATCH] b44 1GB DMA workaround Pekka Pietikainen

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=20040803183919.2990d045.davem@redhat.com \
    --to=davem@redhat.com \
    --cc=jgarzik@pobox.com \
    --cc=jolt@tuxbox.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@oss.sgi.com \
    --cc=pp@ee.oulu.fi \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.