All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@mvista.com>
To: "Zhang, Sonic" <Sonic.Zhang@analog.com>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>,
	"linux-ide@vger.kernel.org" <linux-ide@vger.kernel.org>,
	"jgarzik@pobox.com" <jgarzik@pobox.com>
Subject: Re: [PATCH] pata_bf54x: fix BMIDE status register emulation
Date: Thu, 29 Dec 2011 17:10:08 +0300	[thread overview]
Message-ID: <4EFC74C0.5030802@mvista.com> (raw)
In-Reply-To: <DB904C5425BA6F4E8424B3B51A1414D16D768609F8@NWD2CMBX1.ad.analog.com>

Hello.

On 12/29/2011 02:31 PM, Zhang, Sonic wrote:

> Acked-by: Sonic Zhang<sonic.zhang@analog.com>


> SG list was not implemented in pata_bf54x driver from the beginning, because ATAPI controller on BF54x support maximum 131070 bytes in one BMDMA transfer.

    So what? You can chain transfers in software, using "done" interrupts I think...

> The size in sg list buffers may exceeds this limitation easily. Do you know a way to set the maximum total buffer size in a sg list?

    Maybe thru 'max_sectors' field in scsi_host_template? Though sectors can be 
of different size...

> Static struct scsi_host_template bfin_sht = {
>          ATA_BASE_SHT(DRV_NAME),
>          .sg_tablesize                   = SG_NONE,
>          .dma_boundary           = ATA_DMA_BOUNDARY,
> };

    Ah, I have overlooked this. Anyway 'dma_boundary' should be twice more than 
ATA_DMA_BOUNDARY.

> Sonic

> -----Original Message-----
> From: Sergei Shtylyov [mailto:sshtylyov@ru.mvista.com]
> Sent: Wednesday, December 28, 2011 11:37 PM
> To: linux-ide@vger.kernel.org; jgarzik@pobox.com; Zhang, Sonic
> Subject: [PATCH] pata_bf54x: fix BMIDE status register emulation

> The author of this driver clearly wasn't familiar with the BMIDE specification
> (also known as SFF-8038i) when he implemented the bmdma_status() method: first,
> the interrupt bit of the BMIDE status register corresponds to nothing else but
> INTRQ signal (ATAPI_DEV_INT here); second, the error bit is only set if the
> controller encounters issue doing the bus master transfers, not on the DMA burst
> termination interrupts like here (moreover, setting the error bit doesn't cause
> an interrupt).

> (The only thing I couldn't figure out is how to flush the FIFO to memory once
> the interrupt happens as required by the mentioned spec.)

> Signed-off-by: Sergei Shtylyov<sshtylyov@ru.mvista.com>

> ---
> The patch is against the current Linus' tree.
> Sonic, if you still work in Analog Devices, please give this a try.
>
> I looked over the driver, and it left pretty bad impression. In particular,
> I highly doubt that the transfers with more than one S/G item can work. And
> this is after the driver has been in the kernel for 4 years already...
> Unfortunately, I have neither hardware nor much time to work on improving it...

WBR, Sergei

  reply	other threads:[~2011-12-29 13:11 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-28 15:36 [PATCH] pata_bf54x: fix BMIDE status register emulation Sergei Shtylyov
2011-12-28 17:56 ` Sergei Shtylyov
2011-12-29 11:31 ` Zhang, Sonic
2011-12-29 14:10   ` Sergei Shtylyov [this message]
2011-12-30  6:07     ` Zhang, Sonic
2011-12-30  9:59       ` Sergei Shtylyov
2011-12-30 10:27         ` Zhang, Sonic
2011-12-31  3:22 ` Zhang, Sonic
2011-12-31 15:05   ` Sergei Shtylyov
2012-01-04  6:04     ` Zhang, Sonic
2012-01-04 13:21       ` Sergei Shtylyov
2012-01-05  2:45         ` Sonic Zhang
2012-01-06 17:14       ` Sergei Shtylyov
2012-01-06 17:45 ` [PATCH v2] " Sergei Shtylyov

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=4EFC74C0.5030802@mvista.com \
    --to=sshtylyov@mvista.com \
    --cc=Sonic.Zhang@analog.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=sshtylyov@ru.mvista.com \
    /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.