Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Jeff Garzik and committed by
Linus Torvalds
baf14aa1 e2a57a81

+6 -3
+6 -3
drivers/ata/sata_mv.c
··· 313 313 #define IS_GEN_IIE(hpriv) ((hpriv)->hp_flags & MV_HP_GEN_IIE) 314 314 315 315 enum { 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 321 /* mask of register bits containing lower 32 bits 319 322 * of EDMA request queue DMA address ··· 451 448 .queuecommand = ata_scsi_queuecmd, 452 449 .can_queue = ATA_DEF_QUEUE, 453 450 .this_id = ATA_SHT_THIS_ID, 454 - .sg_tablesize = MV_MAX_SG_CT, 451 + .sg_tablesize = MV_MAX_SG_CT / 2, 455 452 .cmd_per_lun = ATA_SHT_CMD_PER_LUN, 456 453 .emulated = ATA_SHT_EMULATED, 457 454 .use_clustering = 1, ··· 469 466 .queuecommand = ata_scsi_queuecmd, 470 467 .can_queue = ATA_DEF_QUEUE, 471 468 .this_id = ATA_SHT_THIS_ID, 472 - .sg_tablesize = MV_MAX_SG_CT, 469 + .sg_tablesize = MV_MAX_SG_CT / 2, 473 470 .cmd_per_lun = ATA_SHT_CMD_PER_LUN, 474 471 .emulated = ATA_SHT_EMULATED, 475 472 .use_clustering = 1,