All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: linux-ide@vger.kernel.org
Subject: Re: [PATCH 3/3] icside: remove superfluous ->maskproc method
Date: Tue, 02 Jun 2009 02:48:49 +0400	[thread overview]
Message-ID: <4A245AD1.10108@ru.mvista.com> (raw)
In-Reply-To: <200906012353.41504.bzolnier@gmail.com>

Hello.

Bartlomiej Zolnierkiewicz wrote:

> [inspired by pata_icside]
>   

   I'm not sure you've got it right... These comments about "routing" 
are confusing...

> Enabling/disabling of card IRQs is handled fine by IRQ and IDE
> subsystems so there is no need for custom ->maskproc method.
>
> Moreover icside_maskproc() would enable IRQ only if it was already
> enabled [because of 'if (state->enabled && !mask)' check].
>
> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> ---
>  drivers/ide/icside.c |   64 +++------------------------------------------------
>  1 file changed, 4 insertions(+), 60 deletions(-)
>
> Index: b/drivers/ide/icside.c
> ===================================================================
> --- a/drivers/ide/icside.c
> +++ b/drivers/ide/icside.c
> @@ -65,8 +65,6 @@ static struct cardinfo icside_cardinfo_v
>  };
>  
>  struct icside_state {
> -	unsigned int channel;
> -	unsigned int enabled;
>  	void __iomem *irq_port;
>  	void __iomem *ioc_base;
>  	unsigned int sel;
> @@ -116,18 +114,11 @@ static void icside_irqenable_arcin_v6 (s
>  	struct icside_state *state = ec->irq_data;
>  	void __iomem *base = state->irq_port;
>  
> -	state->enabled = 1;
> +	writeb(0, base + ICS_ARCIN_V6_INTROFFSET_1);
> +	readb(base + ICS_ARCIN_V6_INTROFFSET_2);
>   
>  
> -	switch (state->channel) {
> -	case 0:
> -		writeb(0, base + ICS_ARCIN_V6_INTROFFSET_1);
> -		readb(base + ICS_ARCIN_V6_INTROFFSET_2);
> -		break;
> -	case 1:
> -		writeb(0, base + ICS_ARCIN_V6_INTROFFSET_2);
> -		readb(base + ICS_ARCIN_V6_INTROFFSET_1);
> -		break;
> -	}
> +	writeb(0, base + ICS_ARCIN_V6_INTROFFSET_2);
> +	readb(base + ICS_ARCIN_V6_INTROFFSET_1);
>   

   Aren't this read supposed to disable channel 1 interrupt again?

MBR, Sergei



      reply	other threads:[~2009-06-01 22:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-01 21:53 [PATCH 3/3] icside: remove superfluous ->maskproc method Bartlomiej Zolnierkiewicz
2009-06-01 22:48 ` Sergei Shtylyov [this message]

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=4A245AD1.10108@ru.mvista.com \
    --to=sshtylyov@ru.mvista.com \
    --cc=bzolnier@gmail.com \
    --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.