aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2007-10-09 13:51:57 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-09 15:38:26 -0400
commitbaf14aa14efcfdb5a74d5cf804691086c6bec743 (patch)
tree3c8cb3e429253cea3c5e474892efb722834e9378
parente2a57a815933b2d2e375f9de6be223098024ab90 (diff)
sata_mv: correct S/G table limits
The recent mv_fill_sg() rewrite, to fix a data corruption problem related to IOMMU virtual merging, forgot to account for the potentially-increased size of the scatter/gather table after its run. Additionally, the DMA boundary is reduced from 0xffffffff to 0xffff to more closely match the needs of mv_fill_sg(). Signed-off-by: Jeff Garzik <jgarzik@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--drivers/ata/sata_mv.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index 1a82e22b3efd..cb7dec97fee6 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -313,7 +313,10 @@ enum {
313#define IS_GEN_IIE(hpriv) ((hpriv)->hp_flags & MV_HP_GEN_IIE) 313#define IS_GEN_IIE(hpriv) ((hpriv)->hp_flags & MV_HP_GEN_IIE)
314 314
315enum { 315enum {
316 MV_DMA_BOUNDARY = 0xffffffffU, 316 /* DMA boundary 0xffff is required by the s/g splitting
317 * we need on /length/ in mv_fill-sg().
318 */
319 MV_DMA_BOUNDARY = 0xffffU,
317 320
318 /* mask of register bits containing lower 32 bits 321 /* mask of register bits containing lower 32 bits
319 * of EDMA request queue DMA address 322 * of EDMA request queue DMA address
@@ -448,7 +451,7 @@ static struct scsi_host_template mv5_sht = {
448 .queuecommand = ata_scsi_queuecmd, 451 .queuecommand = ata_scsi_queuecmd,
449 .can_queue = ATA_DEF_QUEUE, 452 .can_queue = ATA_DEF_QUEUE,
450 .this_id = ATA_SHT_THIS_ID, 453 .this_id = ATA_SHT_THIS_ID,
451 .sg_tablesize = MV_MAX_SG_CT, 454 .sg_tablesize = MV_MAX_SG_CT / 2,
452 .cmd_per_lun = ATA_SHT_CMD_PER_LUN, 455 .cmd_per_lun = ATA_SHT_CMD_PER_LUN,
453 .emulated = ATA_SHT_EMULATED, 456 .emulated = ATA_SHT_EMULATED,
454 .use_clustering = 1, 457 .use_clustering = 1,
@@ -466,7 +469,7 @@ static struct scsi_host_template mv6_sht = {
466 .queuecommand = ata_scsi_queuecmd, 469 .queuecommand = ata_scsi_queuecmd,
467 .can_queue = ATA_DEF_QUEUE, 470 .can_queue = ATA_DEF_QUEUE,
468 .this_id = ATA_SHT_THIS_ID, 471 .this_id = ATA_SHT_THIS_ID,
469 .sg_tablesize = MV_MAX_SG_CT, 472 .sg_tablesize = MV_MAX_SG_CT / 2,
470 .cmd_per_lun = ATA_SHT_CMD_PER_LUN, 473 .cmd_per_lun = ATA_SHT_CMD_PER_LUN,
471 .emulated = ATA_SHT_EMULATED, 474 .emulated = ATA_SHT_EMULATED,
472 .use_clustering = 1, 475 .use_clustering = 1,