Skip to content

Commit

Permalink
ioat: fix type mismatch for ->dmacount
Browse files Browse the repository at this point in the history
->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>
  • Loading branch information
Dan Williams committed Sep 9, 2009
1 parent f2427e2 commit 77867ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/dma/ioat/dma.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 77867ff

Please sign in to comment.