Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 165770
b: refs/heads/master
c: bb32078
h: refs/heads/master
v: v3
  • Loading branch information
Dan Williams committed Sep 9, 2009
1 parent c027f87 commit 25e1d8e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4fb9b9e8d55880523db550043dfb204696dd0422
refs/heads/master: bb3207863014c7310593146f11fbc6573eab43c8
7 changes: 7 additions & 0 deletions trunk/drivers/dma/ioat/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,14 @@ static int ioat1_enumerate_channels(struct ioatdma_device *device)

INIT_LIST_HEAD(&dma->channels);
dma->chancnt = readb(device->reg_base + IOAT_CHANCNT_OFFSET);
dma->chancnt &= 0x1f; /* bits [4:0] valid */
if (dma->chancnt > ARRAY_SIZE(device->idx)) {
dev_warn(dev, "(%d) exceeds max supported channels (%zu)\n",
dma->chancnt, ARRAY_SIZE(device->idx));
dma->chancnt = ARRAY_SIZE(device->idx);
}
xfercap_scale = readb(device->reg_base + IOAT_XFERCAP_OFFSET);
xfercap_scale &= 0x1f; /* bits [4:0] valid */
xfercap = (xfercap_scale == 0 ? -1 : (1UL << xfercap_scale));
dev_dbg(dev, "%s: xfercap = %d\n", __func__, xfercap);

Expand Down
7 changes: 7 additions & 0 deletions trunk/drivers/dma/ioat/dma_v2.c
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,14 @@ static int ioat2_enumerate_channels(struct ioatdma_device *device)

INIT_LIST_HEAD(&dma->channels);
dma->chancnt = readb(device->reg_base + IOAT_CHANCNT_OFFSET);
dma->chancnt &= 0x1f; /* bits [4:0] valid */
if (dma->chancnt > ARRAY_SIZE(device->idx)) {
dev_warn(dev, "(%d) exceeds max supported channels (%zu)\n",
dma->chancnt, ARRAY_SIZE(device->idx));
dma->chancnt = ARRAY_SIZE(device->idx);
}
xfercap_log = readb(device->reg_base + IOAT_XFERCAP_OFFSET);
xfercap_log &= 0x1f; /* bits [4:0] valid */
if (xfercap_log == 0)
return 0;
dev_dbg(dev, "%s: xfercap = %d\n", __func__, 1 << xfercap_log);
Expand Down

0 comments on commit 25e1d8e

Please sign in to comment.