Code review request: cdcontrol status label additon

M. Warner Losh imp at bsdimp.com
Wed Jan 28 09:21:23 PST 2009


In message: <87d4e7e4y0.fsf at kobe.laptop>
            Giorgos Keramidas <keramida at ceid.upatras.gr> writes:
: On Wed, 28 Jan 2009 18:29:10 +0200, Giorgos Keramidas <keramida at freebsd.org> wrote:
: > On Wed, 28 Jan 2009 09:20:46 -0700 (MST), "M. Warner Losh" <imp at bsdimp.com> wrote:
: >> Not going to look at glabel for this.  I lifted the code from glable,
: >> but must have done it badly.  I'll grab a core 10 cd and see what's up.
: >
: > It may not be Fedora specific.  I just happened to have it handy...
: >
: > Sorry for creating *more* work for you.  I'll see if I can hack at
: > cdcontrol too, and provide more useful input :)
: 
: If it helps at all, I added this:
: 
:             lseek(fd, ISO9660_OFFSET, SEEK_SET);
:             rc = read (fd, buffer, CD_SECTOR_LEN);
: +           if (rc == -1)
: +               err(1, "read");
:             if (rc == CD_SECTOR_LEN &&
:               memcmp(buffer, ISO9660_MAGIC, sizeof(ISO9660_MAGIC) - 1) == 0) {
: 
: and it seems that read() fails with EIO:
: 
: lseek(3,0x8000,SEEK_SET)                         = 32768 (0x8000)
: read(3,0xbfbfe3a3,2048)                          ERR#5 'Input/output error'

OK.  That's definitely not page aligned.

: My `/var/log/messages' shows at the same time:
: 
: Jan 28 19:01:52 kobe kernel: acd0: FAILURE - non aligned DMA transfer attempted
: Jan 28 19:01:52 kobe kernel: acd0: setting up DMA failed

????  I have no clue what this means.  I'll have to investigate.
Chances are that your hardware has limitations on where DMA can come
from and no provisions in the acd driver to bounce them (likely a
reasonable performance thing).  This likely means that I'll have to
malloc the buffer to get it page aligned...

Warner


More information about the freebsd-hackers mailing list