From: Francois Romieu <romieu@cogenit.fr>
To: Jeff Garzik <jgarzik@mandrakesoft.com>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] 2.5.24 - drivers/net/tlan.c dma mapping 2/10
Date: Sun, 30 Jun 2002 17:19:02 +0200 [thread overview]
Message-ID: <20020630171902.D19347@fafner.intra.cogenit.fr> (raw)
In-Reply-To: <3D17743E.8060905@mandrakesoft.com>; from jgarzik@mandrakesoft.com on Mon, Jun 24, 2002 at 03:34:22PM -0400
- TLAN pad buffer virt_to_bus -> pci_map_single conversion.
--- linux-2.5.24/drivers/net/tlan.c Sat Jun 29 22:06:32 2002
+++ linux-2.5.24/drivers/net/tlan.c Sat Jun 29 22:12:10 2002
@@ -215,6 +215,7 @@ MODULE_PARM_DESC(bbuf, "ThunderLAN use b
static int debug;
static int bbuf;
+static dma_addr_t TLanPadBuffer_dma;
static u8 *TLanPadBuffer;
static char TLanSignature[] = "TLAN";
static const char tlan_banner[] = "ThunderLAN driver v1.15\n";
@@ -441,6 +442,9 @@ static int __init tlan_probe(void)
printk(KERN_ERR "TLAN: Could not allocate memory for pad buffer.\n");
return -ENOMEM;
}
+ TLanPadBuffer_dma = pci_map_single(NULL, TLanPadBuffer,
+ TLAN_MIN_FRAME_SIZE, PCI_DMA_TODEVICE);
+
memset(TLanPadBuffer, 0, TLAN_MIN_FRAME_SIZE);
pad_allocated = 1;
@@ -647,6 +651,8 @@ static void __exit tlan_exit(void)
if (tlan_have_eisa)
TLan_Eisa_Cleanup();
+ pci_unmap_single(NULL, TLanPadBuffer_dma, TLAN_MIN_FRAME_SIZE,
+ PCI_DMA_TODEVICE);
kfree( TLanPadBuffer );
@@ -1026,7 +1032,7 @@ static int TLan_StartTx( struct sk_buff
tail_list->frameSize = (u16) skb->len + pad;
tail_list->buffer[0].count = (u32) skb->len;
tail_list->buffer[1].count = TLAN_LAST_BUFFER | (u32) pad;
- tail_list->buffer[1].address = virt_to_bus( TLanPadBuffer );
+ tail_list->buffer[1].address = TLanPadBuffer_dma;
} else {
tail_list->frameSize = (u16) skb->len;
tail_list->buffer[0].count = TLAN_LAST_BUFFER | (u32) skb->len;
next prev parent reply other threads:[~2002-06-30 15:23 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-24 2:34 [PATCH] 2.5.24 : drivers/net/tlan.c Frank Davis
2002-06-24 6:43 ` Francois Romieu
2002-06-24 19:14 ` [PATCH] 2.5.24 : drivers/net/tlan.c; drivers/net/rrunner.c Francois Romieu
2002-06-24 19:34 ` Jeff Garzik
2002-06-24 20:59 ` Dave Jones
2002-06-30 15:18 ` [PATCH] 2.5.24 - drivers/net/tlan.c dma mapping 0/10 Francois Romieu
2002-06-30 15:18 ` [PATCH] 2.5.24 - drivers/net/tlan.c dma mapping 1/10 Francois Romieu
2002-06-30 15:19 ` Francois Romieu [this message]
2002-06-30 15:19 ` [PATCH] 2.5.24 - drivers/net/tlan.c dma mapping 3/10 Francois Romieu
2002-06-30 15:19 ` [PATCH] 2.5.24 - drivers/net/tlan.c dma mapping 4/10 Francois Romieu
2002-06-30 15:19 ` [PATCH] 2.5.24 - drivers/net/tlan.c dma mapping 5/10 Francois Romieu
2002-06-30 15:19 ` [PATCH] 2.5.24 - drivers/net/tlan.c dma mapping 6/10 Francois Romieu
2002-06-30 15:19 ` [PATCH] 2.5.24 - drivers/net/tlan.c dma mapping 7/10 Francois Romieu
2002-06-30 15:19 ` [PATCH] 2.5.24 - drivers/net/tlan.c dma mapping 8/10 Francois Romieu
2002-06-30 15:20 ` [PATCH] 2.5.24 - drivers/net/tlan.c dma mapping 9/10 Francois Romieu
2002-06-30 15:20 ` [PATCH] 2.5.24 - drivers/net/tlan.c dma mapping 10/10 Francois Romieu
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=20020630171902.D19347@fafner.intra.cogenit.fr \
--to=romieu@cogenit.fr \
--cc=jgarzik@mandrakesoft.com \
--cc=linux-kernel@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).