login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
October
»
17
Re: [PATCH 5/5] I/OAT: Add completion callback for async_tx interface use
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Andrew Morton
Subject:
Re: [PATCH 5/5] I/OAT: Add completion callback for async_tx interface use
Date: Wednesday, October 17, 2007 - 5:37 pm
On Wed, 17 Oct 2007 17:14:39 -0700 Shannon Nelson <shannon.nelson@intel.com> wrote:
quoted text
> The async_tx interface includes a completion callback. This adds support > for using that callback, including using interrupts on completion. > > Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> > --- > > drivers/dma/ioat_dma.c | 26 ++++++++++++++++++++++++++ > 1 files changed, 26 insertions(+), 0 deletions(-) > > diff --git a/drivers/dma/ioat_dma.c b/drivers/dma/ioat_dma.c > index 117ac38..f560527 100644 > --- a/drivers/dma/ioat_dma.c > +++ b/drivers/dma/ioat_dma.c > @@ -212,6 +212,18 @@ static dma_cookie_t ioat_tx_submit(struct dma_async_tx_descriptor *tx) > } while (len && (new = ioat_dma_get_next_descriptor(ioat_chan))); > > hw->ctl = IOAT_DMA_DESCRIPTOR_CTL_CP_STS; > + if (new->async_tx.callback) { > + hw->ctl |= IOAT_DMA_DESCRIPTOR_CTL_INT_GN; > + if (first != new) { > + /* move callback into to last desc */ > + new->async_tx.callback = first->async_tx.callback; > + new->async_tx.callback_param > + = first->async_tx.callback_param; > + first->async_tx.callback = NULL; > + first->async_tx.callback_param = NULL; > + } > + } > + > new->tx_cnt = desc_count; > new->async_tx.ack = orig_ack; /* client is in control of this ack */ > > @@ -516,6 +528,11 @@ static void ioat_dma_memcpy_cleanup(struct ioat_dma_chan *ioat_chan) > pci_unmap_addr(desc, src), > pci_unmap_len(desc, len), > PCI_DMA_TODEVICE); > + if (desc->async_tx.callback) { > + desc->async_tx.callback( > + desc->async_tx.callback_param); > + desc->async_tx.callback = NULL; > + } > } > > if (desc->async_tx.phys != phys_complete) { > @@ -637,6 +654,13 @@ static void ioat_dma_start_null_desc(struct ioat_dma_chan *ioat_chan) > */ > #define IOAT_TEST_SIZE 2000 > > +static dma_async_tx_callback ioat_dma_test_callback(void *dma_async_param) > +{ > + printk(KERN_ERR "ioatdma: ioat_dma_test_callback(0x%04llx)\n", > + (u64)dma_async_param); > + return 0; > +}
This wanted to be `return NULL'. I'll fix.
quoted text
> /** > * ioat_dma_self_test - Perform a IOAT transaction to verify the HW works. > * @device: device to be tested > @@ -691,6 +715,8 @@ static int ioat_dma_self_test(struct ioatdma_device *device) > addr = dma_map_single(dma_chan->device->dev, dest, IOAT_TEST_SIZE, > DMA_FROM_DEVICE); > ioat_set_dest(addr, tx, 0); > + tx->callback = (void *)ioat_dma_test_callback;
This cast is unneeded, surely? It had better be..
quoted text
> + tx->callback_param = (void *)0x8086;
eh?
quoted text
> cookie = ioat_tx_submit(tx); > if (cookie < 0) { > dev_err(&device->pdev->dev,
-
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH 1/5] I/OAT: cleanup pci issues
, Shannon Nelson
, (Wed Oct 17, 5:14 pm)
[PATCH 2/5] I/OAT: clean up of dca provider start and stop
, Shannon Nelson
, (Wed Oct 17, 5:14 pm)
[PATCH 3/5] I/OAT: clean up error handling and some print ...
, Shannon Nelson
, (Wed Oct 17, 5:14 pm)
[PATCH 4/5] I/OAT: Tighten descriptor setup performance
, Shannon Nelson
, (Wed Oct 17, 5:14 pm)
[PATCH 5/5] I/OAT: Add completion callback for async_tx in ...
, Shannon Nelson
, (Wed Oct 17, 5:14 pm)
Re: [PATCH 4/5] I/OAT: Tighten descriptor setup performance
, Andrew Morton
, (Wed Oct 17, 5:34 pm)
Re: [PATCH 5/5] I/OAT: Add completion callback for async_t ...
, Andrew Morton
, (Wed Oct 17, 5:37 pm)
RE: [PATCH 4/5] I/OAT: Tighten descriptor setup performance
, Nelson, Shannon
, (Wed Oct 17, 5:41 pm)
Re: [PATCH 5/5] I/OAT: Add completion callback for async_t ...
, Andrew Morton
, (Wed Oct 17, 5:44 pm)
RE: [PATCH 5/5] I/OAT: Add completion callback for async_t ...
, Nelson, Shannon
, (Wed Oct 17, 5:46 pm)
Re: [PATCH 5/5] I/OAT: Add completion callback for async_t ...
, David Miller
, (Wed Oct 17, 5:47 pm)
RE: [PATCH 5/5] I/OAT: Add completion callback for async_t ...
, Nelson, Shannon
, (Wed Oct 17, 5:53 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Trent Waddington
Re: Gaming Interface
Takashi Iwai
Re: [PATCH] usb: usbmixer error path fix
Jeremy Fitzhardinge
Re: [patch 1/6] Re-enable VDSO by default with PARAVIRT
Paul E. McKenney
Re: [PATCH, RFC] v4 scalable classic RCU implementation
Greg Kroah-Hartman
[PATCH 20/36] Driver core: Call device_pm_add() after bus_add_device() in device_a...
git
:
Stephen R. van den Berg
Re: [RFC] origin link for cherry-pick and revert
Christian Stimming
git-gui: Fix broken revert confirmation.
Junio C Hamano
Re: git-svnimport
Mark Burton
Re: [PATCH] builtin-branch: highlight current remote branches with an asterisk
Johannes Schindelin
Re: [PATCH] Fix approxidate("never") to always return 0
git-commits-head
:
Linux Kernel Mailing List
ath9k_htc: Allocate URBs properly
Linux Kernel Mailing List
bnx2x: Fan failure mechanism on additional design
Linux Kernel Mailing List
cpumask: make irq_set_affinity() take a const struct cpumask
Linux Kernel Mailing List
ARM: 5670/1: bcmring: add default configuration for bcmring arch
Linux Kernel Mailing List
ahci: Workaround HW bug for SB600/700 SATA controller PMP support
linux-netdev
:
Nick Piggin
Re: Kernel WARNING: at net/core/dev.c:1330 __netif_schedule+0x2c/0x98()
Daniel Lezcano
getsockopt(TCP_DEFER_ACCEPT) value change
David Miller
Re: 2.6.27.18: bnx2/tg3: BUG: "scheduling while atomic" trying to ifenslave a seco...
Amit Kumar Salecha
[PATCH NEXT 10/10] qlcnic: add cksum flag
Patrick McHardy
Re: [PATCH RESEND 1/3] netfilter: xtables: inclusion of xt_condition
openbsd-misc
:
James Hozier
Re: DVD burn error: No space left on device
Christophe Rioux
Implementation example of snmp
Ryan McBride
Re: Packets Per Second Limit?
Nick Holland
Re: booting openbsd on eee without cd-rom
Very Fashion.com
Very-fashion.com -Novo! Brendirana garderoba po najpovoljnijim cenama.Bisou Bisou ...
Colocation donated by:
Syndicate