From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Egger Subject: [PATCH] ioemu stubdom: fix scsi dma buffer size Date: Mon, 6 Jul 2009 14:41:57 +0200 Message-ID: <200907061441.57968.Christoph.Egger@amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Boundary-00=_VEfUKi2DgJzocrr" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com, Ian Jackson List-Id: xen-devel@lists.xenproject.org --Boundary-00=_VEfUKi2DgJzocrr Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi! Attached patch fixes calculation of scsi dma buffer size. Found by build error on NetBSD. Signed-off-by: Christoph Egger -- ---to satisfy European Law for business letters: Advanced Micro Devices GmbH Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen Geschaeftsfuehrer: Thomas M. McCoy, Giuliano Meroni Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632 --Boundary-00=_VEfUKi2DgJzocrr Content-Type: text/x-diff; charset="us-ascii"; name="xen_ioemu_scsi.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xen_ioemu_scsi.diff" diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index 9745ca3..4fc18f0 100644 --- a/hw/scsi-disk.c +++ b/hw/scsi-disk.c @@ -41,7 +41,7 @@ do { fprintf(stderr, "scsi-disk: " fmt , ##args); } while (0) #ifdef CONFIG_STUBDOM #include -#define SCSI_DMA_BUF_SIZE ((BLKIF_MAX_SEGMENTS_PER_REQUEST - 1) * PAGE_SIZE) +#define SCSI_DMA_BUF_SIZE ((BLKIF_MAX_SEGMENTS_PER_REQUEST - 1) * TARGET_PAGE_SIZE) #else #define SCSI_DMA_BUF_SIZE 131072 #endif --Boundary-00=_VEfUKi2DgJzocrr Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --Boundary-00=_VEfUKi2DgJzocrr--