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: Wed, 04 Jan 2012 17:21:59 +0400	[thread overview]
Message-ID: <4F045277.1080009@mvista.com> (raw)
In-Reply-To: <DB904C5425BA6F4E8424B3B51A1414D16D76860EA1@NWD2CMBX1.ad.analog.com>

Hello.

On 04-01-2012 10:04, Zhang, Sonic wrote:

> Hi Serge,

> The MULTI_DONE_INT, UDMAIN_DONE_INT and UDMAOUT_DONE_INT are triggered independent
> of the ATAPI_DEV_INT, although they bind to the same IRQ on bf548. With your patch,
 > these interrupts are ignored and results in kernel error "unhandled IRQ".

    Ah, indeed...

> If you insist the BMDMA emulation on bf548 should comply with INF-8038i.

    It's not that I insist. It clearly follows from libata implemeting 
bmdma_status() method.

> I would propose the following patch to disable all BF548 ATAPI specific interrupts.

    Yes, I agree -- they don't seem needed. And that will simplify the driver 
too. I'll recast the patch and add your signoff if you agree.

> Sonic

> ---
>   drivers/ata/pata_bf54x.c |   19 ++-----------------
>   1 files changed, 2 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/ata/pata_bf54x.c b/drivers/ata/pata_bf54x.c
> index bd987bb..9711c2a 100644
> --- a/drivers/ata/pata_bf54x.c
> +++ b/drivers/ata/pata_bf54x.c
> @@ -418,14 +418,6 @@ static void bfin_set_dmamode(struct ata_port *ap, struct ata_device *adev)
>                                          (tcyc_tdvs<<8 | tdvs));
>                                  ATAPI_SET_ULTRA_TIM_2(base, (tmli<<8 | tss));
>                                  ATAPI_SET_ULTRA_TIM_3(base, (trp<<8 | tzah));
> -
> -                               /* Enable host ATAPI Untra DMA interrupts */
> -                               ATAPI_SET_INT_MASK(base,
> -                                       ATAPI_GET_INT_MASK(base)
> -                                       | UDMAIN_DONE_MASK
> -                                       | UDMAOUT_DONE_MASK
> -                                       | UDMAIN_TERM_MASK
> -                                       | UDMAOUT_TERM_MASK);
>                          }
>                  }
>          }
> @@ -470,10 +462,6 @@ static void bfin_set_dmamode(struct ata_port *ap, struct ata_device *adev)
>                          ATAPI_SET_MULTI_TIM_0(base, (tm<<8 | td));
>                          ATAPI_SET_MULTI_TIM_1(base, (tkr<<8 | tkw));
>                          ATAPI_SET_MULTI_TIM_2(base, (teoc<<8 | th));
> -
> -                       /* Enable host ATAPI Multi DMA interrupts */
> -                       ATAPI_SET_INT_MASK(base, ATAPI_GET_INT_MASK(base)
> -                               | MULTI_DONE_MASK | MULTI_TERM_MASK);
>                          SSYNC();
>                  }
>          }
> @@ -1155,13 +1143,10 @@ static unsigned char bfin_bmdma_status(struct ata_port *ap)
>          void __iomem *base = (void __iomem *)ap->ioaddr.ctl_addr;
>          unsigned short int_status = ATAPI_GET_INT_STATUS(base);
>
> -       if (ATAPI_GET_STATUS(base)&  (MULTI_XFER_ON|ULTRA_XFER_ON))
> +       if (ATAPI_GET_STATUS(base)&  (MULTI_XFER_ON | ULTRA_XFER_ON))
>                  host_stat |= ATA_DMA_ACTIVE;
> -       if (int_status&  (MULTI_DONE_INT|UDMAIN_DONE_INT|UDMAOUT_DONE_INT|
> -               ATAPI_DEV_INT))
> +       if (ATAPI_GET_INT_STATUS(base)&  ATAPI_DEV_INT)
>                  host_stat |= ATA_DMA_INTR;
> -       if (int_status&  (MULTI_TERM_INT|UDMAIN_TERM_INT|UDMAOUT_TERM_INT))
> -               host_stat |= ATA_DMA_ERR|ATA_DMA_INTR;
>
>          dev_dbg(ap->dev, "ATAPI: host_stat=0x%x\n", host_stat);
>
> --
> 1.7.0.4

WBR, Sergei

  reply	other threads:[~2012-01-04 13:23 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
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 [this message]
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=4F045277.1080009@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.