Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Jan 2009 10:19:00 -0700 (MST)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        keramida@ceid.upatras.gr
Cc:        hackers@freebsd.org
Subject:   Re: Code review request: cdcontrol status label additon
Message-ID:  <20090128.101900.1355775961.imp@bsdimp.com>
In-Reply-To: <87d4e7e4y0.fsf@kobe.laptop>
References:  <20090128.092046.84362525.imp@bsdimp.com> <87mydbiecp.fsf@kobe.laptop> <87d4e7e4y0.fsf@kobe.laptop>

next in thread | previous in thread | raw e-mail | index | archive | help
In message: <87d4e7e4y0.fsf@kobe.laptop>
            Giorgos Keramidas <keramida@ceid.upatras.gr> writes:
: On Wed, 28 Jan 2009 18:29:10 +0200, Giorgos Keramidas <keramida@freebsd.org> wrote:
: > On Wed, 28 Jan 2009 09:20:46 -0700 (MST), "M. Warner Losh" <imp@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



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