Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Feb 2024 17:29:38 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 277115] sysutils/cdrdao: zero length and odd-sized DMA transfer attempted
Message-ID:  <bug-277115-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D277115

            Bug ID: 277115
           Summary: sysutils/cdrdao: zero length and odd-sized DMA
                    transfer attempted
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: Individual Port(s)
          Assignee: jhale@FreeBSD.org
          Reporter: freebsd@dev.thsi.be
          Assignee: jhale@FreeBSD.org
             Flags: maintainer-feedback?(jhale@FreeBSD.org)

Cdrdao doesn't work on (S)ATA drives anymore:

cdrdao disk-info --device /dev/cd0
/dev/cd0:       Rev:
Using driver: Generic SCSI-3/MMC - Version 2.0 (options 0x0000)

ERROR: Cannot setup device /dev/cd0.

dmesg shows:
ata0: FAILURE - zero length DMA transfer attempted
ata0: setting up DMA failed

This is caused by a bad SCSI CCB having CAM_DIR_IN and a zero length
(presumably FreeBSD started to reject zero-sized DMA SCSI transfer), fixed =
by
using CAM_DIR_NONE in such case.

After this issue is fixed, for any cd with an odd number of tracks there wi=
ll
be the following error (note that read-cd and "slow mode" read-toc will sti=
ll
work):

cdrdao read-toc --device /dev/cd0 --fast-toc -v9999   toc-file
...
Reading toc data...
getTocGeneric: data len 124
Raw toc data len: 191
ERROR: Cannot read disk toc.

And dmesg to show:

ata0: FAILURE - odd-sized DMA transfer attempt 191 % 2
ata0: setting up DMA failed

191 is 11 bytes * 17 tracks + 4, read from the disc, see
dao/GenericMMC.cc:GenericMMC::getRawToc=20=20


The attached patch adds a cdrdao patch that fixes both issues. It also
sets the GNU_CONFIGURE_MANPREFIX according to the new rule, and portrevisio=
n is
incremented.

After patch:
cdrdao read-toc --device /dev/cd0 --fast-toc -v9999   toc-file
/dev/cd0:       Rev:
Reading driver table from file "/usr/local/share/cdrdao/drivers".
Found 316 valid driver table entries.
Using driver: Generic SCSI-3/MMC - Version 2.0 (options 0x0000)

Reading toc data...
getTocGeneric: data len 124
Raw toc data len: 191
Raw toc contains HEX values.
[output truncated]

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-277115-7788>