I wanted to add a file to an already written DVD+RW (written a day before on the same system) with # growisofs -M /dev/cd0 -r -T -J -joliet-long -v directory This produced tons of error messages via syslog as Jul 11 13:45:30 rebelion kernel: ata0: FAILURE - non aligned DMA transfer attempted Jul 11 13:45:30 rebelion kernel: acd0: setting up DMA failed and the only way to get the system back to a usable state was rebooting it;
Author: mav Date: Sun Sep 6 14:23:26 2009 New Revision: 196893 URL: http://svn.freebsd.org/changeset/base/196893 Log: 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/127316 Reviewed by: current@ Tested by: Ryan Rogers Modified: head/sys/dev/ata/ata-dma.c Modified: head/sys/dev/ata/ata-dma.c ============================================================================== --- head/sys/dev/ata/ata-dma.c Sun Sep 6 14:05:01 2009 (r196892) +++ head/sys/dev/ata/ata-dma.c Sun Sep 6 14:23:26 2009 (r196893) @@ -272,10 +272,10 @@ ata_dmaload(struct ata_request *request, "FAILURE - zero length DMA transfer attempted\n"); return EIO; } - if (((uintptr_t)(request->data) & (ch->dma.alignment - 1)) || - (request->bytecount & (ch->dma.alignment - 1))) { + if (request->bytecount & (ch->dma.alignment - 1)) { device_printf(request->dev, - "FAILURE - non aligned DMA transfer attempted\n"); + "FAILURE - odd-sized DMA transfer attempt %d %% %d\n", + request->bytecount, ch->dma.alignment); return EIO; } if (request->bytecount > ch->dma.max_iosize) { _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
State Changed From-To: open->patched Patch committed to 9-CURRENT.
Author: mav Date: Fri Sep 25 18:07:23 2009 New Revision: 197495 URL: http://svn.freebsd.org/changeset/base/197495 Log: 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/127316 Reviewed by: current@ Tested by: Ryan Rogers Approved by: re (kib) Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/ata/ata-dma.c stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ata/ata-dma.c ============================================================================== --- stable/8/sys/dev/ata/ata-dma.c Fri Sep 25 18:04:55 2009 (r197494) +++ stable/8/sys/dev/ata/ata-dma.c Fri Sep 25 18:07:23 2009 (r197495) @@ -272,10 +272,10 @@ ata_dmaload(struct ata_request *request, "FAILURE - zero length DMA transfer attempted\n"); return EIO; } - if (((uintptr_t)(request->data) & (ch->dma.alignment - 1)) || - (request->bytecount & (ch->dma.alignment - 1))) { + if (request->bytecount & (ch->dma.alignment - 1)) { device_printf(request->dev, - "FAILURE - non aligned DMA transfer attempted\n"); + "FAILURE - odd-sized DMA transfer attempt %d %% %d\n", + request->bytecount, ch->dma.alignment); return EIO; } if (request->bytecount > ch->dma.max_iosize) { _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
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) { _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
State Changed From-To: patched->closed Patch merged to 7-STABLE,