Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 133573
b: refs/heads/master
c: 32cd11a
h: refs/heads/master
i:
  133571: 1b1209f
v: v3
  • Loading branch information
Mark Lord authored and Jeff Garzik committed Mar 25, 2009
1 parent 1484067 commit e6650ca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 95db505125fb7bc624b7c3b6747bbeaebbffc2e4
refs/heads/master: 32cd11a61007511ddb38783deec8bb1aa6735789
4 changes: 3 additions & 1 deletion trunk/drivers/ata/sata_mv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1364,12 +1364,13 @@ static void mv_fill_sg(struct ata_queued_cmd *qc)
u32 offset = addr & 0xffff;
u32 len = sg_len;

if ((offset + sg_len > 0x10000))
if (offset + len > 0x10000)
len = 0x10000 - offset;

mv_sg->addr = cpu_to_le32(addr & 0xffffffff);
mv_sg->addr_hi = cpu_to_le32((addr >> 16) >> 16);
mv_sg->flags_size = cpu_to_le32(len & 0xffff);
mv_sg->reserved = 0;

sg_len -= len;
addr += len;
Expand All @@ -1381,6 +1382,7 @@ static void mv_fill_sg(struct ata_queued_cmd *qc)

if (likely(last_sg))
last_sg->flags_size |= cpu_to_le32(EPRD_FLAG_END_OF_TBL);
mb(); /* ensure data structure is visible to the chipset */
}

static void mv_crqb_pack_cmd(__le16 *cmdw, u8 data, u8 addr, unsigned last)
Expand Down

0 comments on commit e6650ca

Please sign in to comment.