From: Tejun Heo <htejun@gmail.com>
To: Daniel Beichl <daniel_beichl@gmx.net>
Cc: linux-ide@vger.kernel.org
Subject: Re: [PATCH] Re: 2.6.19.1, sata_sil: sata dvd writer doesn't work
Date: Tue, 08 May 2007 16:42:19 +0200 [thread overview]
Message-ID: <46408C4B.8020401@gmail.com> (raw)
In-Reply-To: <463F634E.2070103@gmx.net>
Hello,
Daniel Beichl wrote:
> I gave the whole thing some thought. You suspected the sil dma engine to
> cause the issue, because it might only be usable with a certain command
> packet size.
> If these commands result in packets their size is not zero. Not all
> packet commands transfer
> data sectors, but they themselves have a size.
>
> So i investigated libata and learnt from libata-scsi.c that nbytes is
> set to the size of the scsi
> command corresponding to the atapi command that should be sent to the
> device near the end of atapi_xlat().
>
> I added code to dump the packet size and data direction as set in the
> scsi command and noticed that the
> controller freezes the port if a packet with the direction DMA_TO_DEVICE
> and a length smaller than ~60 bytes is issued, the command type does not
> matter at all.
Hmmmmm.... This is weird. < ~60 bytes? The zero-length protocol thing
is a plain bug but this is something completely different. Can you test
this with a different controller? Is the problem always reproducible?
> I tried this with the cdrecord -atip option which generate packets of
> command cdb[0] = 0x00, length 60 and 16 in said direction.
> The first command succeeds, the second one triggers the dma bug.
>
> The question now is, is the dma engine of the sil chip indeed the
> problem, or did i cover
> another problem located somewhere else by restricting dma to packets not
> smaller than 60 bytes.
> The datasheet of the sil3512 does not specify a lower limit for dma
> transfers.
>
> It does not appear to be a modulo N issue either as i have seen the
> transfer of
> packets of 12 or 16 bytes fail but then again packets of 60 bytes succeeds.
>
> size result
> ==========
> 001100 fail
> 010000 fail
> 111100 succeed
>
> A thing that crossed my mind was a timing issue. Perhaps the dmaing of <
> 60 bytes is that
> fast that the interrupt that causes it is not yet handled correctly. But
> this is just a very wild guess.
I don't think that can happen. Controllers are required to queue
interrupt till FIFO is flushed. Can you post dmesg after such errors?
> I tried your latest patch and the dma bug did show up. I have attached a
> patch to this mail that
> decides based on the dma direction and the command size in the
> sil_check_atapi_dma() routine
> whether to allow dma or not. This fixed the dvd auth issue and the
> cdrecord -atip issue for me,
> but i am pretty sure there is a better solution.
I'm not really sure what we're looking at and where the problem actually
is. We need to find out more about this problem.
--
tejun
next prev parent reply other threads:[~2007-05-08 14:42 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <46362672.7080103@gmx.net>
[not found] ` <4636EA85.40809@t-online.de>
[not found] ` <46371628.9060905@gmail.com>
[not found] ` <46379CA1.601@t-online.de>
[not found] ` <463AEAF9.3000103@gmail.com>
2007-05-04 17:32 ` [PATCH] Re: 2.6.19.1, sata_sil: sata dvd writer doesn't work Harald Dunkel
2007-05-07 10:29 ` Tejun Heo
2007-05-07 18:21 ` Harald Dunkel
2007-05-08 14:27 ` Tejun Heo
2007-05-09 17:37 ` Harald Dunkel
2007-05-10 13:00 ` Tejun Heo
2007-05-10 20:27 ` Harald Dunkel
2007-05-11 8:33 ` Tejun Heo
2007-05-15 17:38 ` Harald Dunkel
2007-06-06 4:38 ` Harald Dunkel
2007-06-19 7:24 ` Tejun Heo
[not found] ` <4636DCA9.9050803@gmail.com>
[not found] ` <4636FBB7.3030605@gmx.net>
[not found] ` <463AE631.9030701@gmail.com>
2007-05-04 18:18 ` Daniel Beichl
2007-05-07 8:24 ` Tejun Heo
[not found] ` <463F634E.2070103@gmx.net>
2007-05-08 14:42 ` Tejun Heo [this message]
2007-05-08 14:51 ` Alan Cox
2007-05-08 14:52 ` Tejun Heo
2007-05-25 3:23 ` Jeff Garzik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46408C4B.8020401@gmail.com \
--to=htejun@gmail.com \
--cc=daniel_beichl@gmx.net \
--cc=linux-ide@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.