[3.8.y.z extended stable] Patch "ioatdma: channel reset scheme fixup on Intel Atom S1200 platforms" has been added to staging queue
Kamal Mostafa
kamal at canonical.com
Mon Mar 31 20:55:03 UTC 2014
On Thu, 2014-03-27 at 15:12 -0700, Kamal Mostafa wrote:
> This is a note to let you know that I have just added a patch titled
>
> ioatdma: channel reset scheme fixup on Intel Atom S1200 platforms
>
> to the linux-3.8.y-queue branch of the 3.8.y.z extended stable tree
For the record: I have dropped Tim Gardner's backport of this one from
the 3.8-stable queue, and picked up Ben Hutchings' backport of "ioat:
fix tasklet tear down" instead.
-Kamal
> which can be found at:
>
> http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.8.y-queue
>
> This patch is scheduled to be released in version 3.8.13.21.
>
> If you, or anyone else, feels it should not be added to this tree, please
> reply to this email.
>
> For more information about the 3.8.y.z tree, see
> https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
>
> Thanks.
> -Kamal
>
> ------
>
> From 4d61ec9b5c2b41d853f7afae7611acec2e276fc6 Mon Sep 17 00:00:00 2001
> From: Dave Jiang <dave.jiang at intel.com>
> Date: Tue, 26 Mar 2013 15:42:47 -0700
> Subject: ioatdma: channel reset scheme fixup on Intel Atom S1200 platforms
>
> commit 8a52b9ff1154a68b6a2a8da9a31a87e52f5f6418 upstream.
>
> BugLink: http://bugs.launchpad.net/bugs/1291113
>
> The Intel Atom S1200 family ioatdma changed the channel reset behavior.
> It does a reset similar to PCI FLR by resetting all the MSIX
> registers. We have to re-init msix interrupts because of this. This
> workaround is only specific to this platform and is not expected to carry
> over to the later generations.
>
> Signed-off-by: Dave Jiang <dave.jiang at intel.com>
> Acked-by: Dan Williams <djbw at fb.com>
> Signed-off-by: Vinod Koul <vinod.koul at intel.com>
> (back ported from commit 8a52b9ff1154a68b6a2a8da9a31a87e52f5f6418)
>
> [Tim Gardner] Back port notes: I implemented enough of this patch to support
> device->irq_mode storage, upon which da87ca4d4ca101f177fffd84f1f0a5e4c0343557
> (ioat: fix tasklet tear down) is dependent.
>
> Signed-off-by: Tim Gardner <tim.gardner at canonical.com>
> Signed-off-by: Kamal Mostafa <kamal at canonical.com>
> ---
> drivers/dma/ioat/dma.c | 8 +++++++-
> drivers/dma/ioat/dma.h | 10 ++++++++++
> 2 files changed, 17 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/dma/ioat/dma.c b/drivers/dma/ioat/dma.c
> index 1a68a8b..459e2ee 100644
> --- a/drivers/dma/ioat/dma.c
> +++ b/drivers/dma/ioat/dma.c
> @@ -889,7 +889,7 @@ MODULE_PARM_DESC(ioat_interrupt_style,
> * ioat_dma_setup_interrupts - setup interrupt handler
> * @device: ioat device
> */
> -static int ioat_dma_setup_interrupts(struct ioatdma_device *device)
> +int ioat_dma_setup_interrupts(struct ioatdma_device *device)
> {
> struct ioat_chan_common *chan;
> struct pci_dev *pdev = device->pdev;
> @@ -938,6 +938,7 @@ msix:
> }
> }
> intrctrl |= IOAT_INTRCTRL_MSIX_VECTOR_CONTROL;
> + device->irq_mode = IOAT_MSIX;
> goto done;
>
> msix_single_vector:
> @@ -953,6 +954,7 @@ msix_single_vector:
> pci_disable_msix(pdev);
> goto msi;
> }
> + device->irq_mode = IOAT_MSIX_SINGLE;
> goto done;
>
> msi:
> @@ -966,6 +968,7 @@ msi:
> pci_disable_msi(pdev);
> goto intx;
> }
> + device->irq_mode = IOAT_MSIX;
> goto done;
>
> intx:
> @@ -974,6 +977,7 @@ intx:
> if (err)
> goto err_no_irq;
>
> + device->irq_mode = IOAT_INTX;
> done:
> if (device->intr_quirk)
> device->intr_quirk(device);
> @@ -984,9 +988,11 @@ done:
> err_no_irq:
> /* Disable all interrupt generation */
> writeb(0, device->reg_base + IOAT_INTRCTRL_OFFSET);
> + device->irq_mode = IOAT_NOIRQ;
> dev_err(dev, "no usable interrupts\n");
> return err;
> }
> +EXPORT_SYMBOL(ioat_dma_setup_interrupts);
>
> static void ioat_disable_interrupts(struct ioatdma_device *device)
> {
> diff --git a/drivers/dma/ioat/dma.h b/drivers/dma/ioat/dma.h
> index 087935f..84f91ce 100644
> --- a/drivers/dma/ioat/dma.h
> +++ b/drivers/dma/ioat/dma.h
> @@ -48,6 +48,14 @@
> */
> #define NULL_DESC_BUFFER_SIZE 1
>
> +enum ioat_irq_mode {
> + IOAT_NOIRQ = 0,
> + IOAT_MSIX,
> + IOAT_MSIX_SINGLE,
> + IOAT_MSI,
> + IOAT_INTX
> +};
> +
> /**
> * struct ioatdma_device - internal representation of a IOAT device
> * @pdev: PCI-Express device
> @@ -77,6 +85,7 @@ struct ioatdma_device {
> struct msix_entry msix_entries[4];
> struct ioat_chan_common *idx[4];
> struct dca_provider *dca;
> + enum ioat_irq_mode irq_mode;
> void (*intr_quirk)(struct ioatdma_device *device);
> int (*enumerate_channels)(struct ioatdma_device *device);
> int (*reset_hw)(struct ioat_chan_common *chan);
> @@ -320,6 +329,7 @@ bool ioat_cleanup_preamble(struct ioat_chan_common *chan,
> dma_addr_t *phys_complete);
> void ioat_kobject_add(struct ioatdma_device *device, struct kobj_type *type);
> void ioat_kobject_del(struct ioatdma_device *device);
> +int ioat_dma_setup_interrupts(struct ioatdma_device *device);
> extern const struct sysfs_ops ioat_sysfs_ops;
> extern struct ioat_sysfs_entry ioat_version_attr;
> extern struct ioat_sysfs_entry ioat_cap_attr;
> --
> 1.8.3.2
>
More information about the kernel-team
mailing list