Date: Sat, 31 Oct 2009 17:28:08 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r198720 - in stable/7/sys: . contrib/pf dev/ata Message-ID: <200910311728.n9VHS865097273@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Sat Oct 31 17:28:08 2009 New Revision: 198720 URL: http://svn.freebsd.org/changeset/base/198720 Log: MFC rev. 196893: Remove constraint, requiring request data to fulfill controller's alignment requirements. It is busdma task, to manage proper alignment by loading data to bounce buffers. PR: kern/120787, kern/127316 Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ata/ata-dma.c Modified: stable/7/sys/dev/ata/ata-dma.c ============================================================================== --- stable/7/sys/dev/ata/ata-dma.c Sat Oct 31 17:06:36 2009 (r198719) +++ stable/7/sys/dev/ata/ata-dma.c Sat Oct 31 17:28:08 2009 (r198720) @@ -233,9 +233,9 @@ ata_dmaload(device_t dev, caddr_t data, device_printf(dev, "FAILURE - zero length DMA transfer attempted\n"); return EIO; } - if (((uintptr_t)data & (ch->dma->alignment - 1)) || - (count & (ch->dma->alignment - 1))) { - device_printf(dev, "FAILURE - non aligned DMA transfer attempted\n"); + if (count & (ch->dma->alignment - 1)) { + device_printf(dev, "FAILURE - odd-sized DMA transfer attempt %d %% %d\n", + count, ch->dma->alignment); return EIO; } if (count > ch->dma->max_iosize) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200910311728.n9VHS865097273>