OSDN Git Service

scsi: qla2xxx: Fix DMA error when the DIF sg buffer crosses 4GB boundary
authorGiridhar Malavali <gmalavali@marvell.com>
Fri, 21 Dec 2018 17:33:45 +0000 (09:33 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sat, 12 Jan 2019 03:08:15 +0000 (22:08 -0500)
commit50b812755e9766fa0a1a28533f4d11a34a5b813e
tree726439d7b8aad2a7fff5220e995601e946f244c4
parent7855d2ba1172d716d96a628af7c5bafa5725ac57
scsi: qla2xxx: Fix DMA error when the DIF sg buffer crosses 4GB boundary

When SGE buffer containing DIF information crosses 4G boundary, it results
in DMA error. This patch fixes this issue by calculating SGE buffer size
and if it crosses 4G boundary, driver will split it into multiple SGE
buffers to avoid DMA error.

Signed-off-by: Giridhar Malavali <gmalavali@marvell.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qla2xxx/qla_attr.c
drivers/scsi/qla2xxx/qla_def.h
drivers/scsi/qla2xxx/qla_gbl.h
drivers/scsi/qla2xxx/qla_iocb.c
drivers/scsi/qla2xxx/qla_isr.c
drivers/scsi/qla2xxx/qla_os.c
drivers/scsi/qla2xxx/qla_target.c
drivers/scsi/qla2xxx/qla_target.h