diff options
author | Dan Williams <dan.j.williams@intel.com> | 2009-07-28 17:44:04 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2009-09-08 20:29:54 -0400 |
commit | 77867fff033ea549096c49d863c564ad7d8be36f (patch) | |
tree | d39bce48f29aa9ce6f23f15e73fab8333d91bc75 /drivers/dma/ioat | |
parent | f2427e276ffec5ce599c6bc116e0927269a360ef (diff) |
ioat: fix type mismatch for ->dmacount
->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>
Diffstat (limited to 'drivers/dma/ioat')
-rw-r--r-- | drivers/dma/ioat/dma.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/dma/ioat/dma.h b/drivers/dma/ioat/dma.h index 1226e35f2709..9f0c853b6a77 100644 --- a/drivers/dma/ioat/dma.h +++ b/drivers/dma/ioat/dma.h | |||
@@ -102,8 +102,8 @@ struct ioat_dma_chan { | |||
102 | struct delayed_work work; | 102 | struct delayed_work work; |
103 | 103 | ||
104 | int pending; | 104 | int pending; |
105 | int dmacount; | 105 | u16 dmacount; |
106 | int desccount; | 106 | u16 desccount; |
107 | 107 | ||
108 | struct ioatdma_device *device; | 108 | struct ioatdma_device *device; |
109 | struct dma_chan common; | 109 | struct dma_chan common; |