]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
ioat: fix type mismatch for ->dmacount
authorDan Williams <dan.j.williams@intel.com>
Tue, 28 Jul 2009 21:44:04 +0000 (14:44 -0700)
committerDan Williams <dan.j.williams@intel.com>
Wed, 9 Sep 2009 00:29:54 +0000 (17:29 -0700)
->dmacount tracks the sequence number of active descriptors.  It is
written to the DMACOUNT register to update the channel's view of pending
descriptors in the chain.  The register is 16-bits so ->dmacount should
be unsigned and 16-bit as well.  Also modify ->desccount to maintain
alignment.

This was never a problem in practice because we never compared dmacount
values, but this is a bug waiting to happen.

Signed-off-by: Maciej Sosnowski <maciej.sosnowski@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/dma/ioat/dma.h

index 1226e35f2709e73516547751a2502360b9c50566..9f0c853b6a77ea9e6394cd8919d3b8e3ed2cbac0 100644 (file)
@@ -102,8 +102,8 @@ struct ioat_dma_chan {
        struct delayed_work work;
 
        int pending;
-       int dmacount;
-       int desccount;
+       u16 dmacount;
+       u16 desccount;
 
        struct ioatdma_device *device;
        struct dma_chan common;