| To: | "David S. Miller" <davem@xxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH] b44 1GB DMA workaround (was: b44: add 47xx support) |
| From: | Pekka Pietikainen <pp@xxxxxxxxxx> |
| Date: | Sun, 8 Aug 2004 01:40:19 +0300 |
| Cc: | jgarzik@xxxxxxxxx, jolt@xxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxx |
| In-reply-to: | <20040803183919.2990d045.davem@xxxxxxxxxx> |
| References: | <200407232335.37809.jolt@xxxxxxxxxx> <20040726141128.GA5435@xxxxxxxxxx> <20040804003108.GA10445@xxxxxxxxxx> <20040803183919.2990d045.davem@xxxxxxxxxx> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
| User-agent: | Mutt/1.4.2i |
On Tue, Aug 03, 2004 at 06:39:19PM -0700, David S. Miller wrote:
> 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. :-)
>
Haven't noticed any breakage (tm) but I'm just a x86 weenie :-)
Current approach is:
if(1 (just for testing ;) ) || 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);
mapping =
pci_map_single(bp->pdev,bp->tx_bufs+entry*TX_PKT_BUF_SZ, len, PCI_DMA_TODEVICE);
}
Which also works (tm). Setting the skb to a special value seems a bit tricky
as skb->len is used in b44_tx for that nop^H^H^Hpci_unmap_single. It looks
to me as the right things when the code gets changed as above (even for
archs where the unmapping is not a nop) get done, but I could easily be
missing something.
--
Pekka Pietikainen
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH 2.6] vlan ioctl propagation (rev.2), bert hubert |
|---|---|
| Next by Date: | Re: [PATCH] b44 1GB DMA workaround (was: b44: add 47xx support), David S. Miller |
| Previous by Thread: | Re: [PATCH] b44 1GB DMA workaround (was: b44: add 47xx support), David S. Miller |
| Next by Thread: | Re: [PATCH] b44 1GB DMA workaround (was: b44: add 47xx support), David S. Miller |
| Indexes: | [Date] [Thread] [Top] [All Lists] |