public inbox for linux-kernel@vger.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, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] hpt366: add hpt3xx_disable_fast_irq() helper
Date: Wed, 15 Oct 2008 00:51:21 +0400	[thread overview]
Message-ID: <48F50649.9080507@ru.mvista.com> (raw)
In-Reply-To: <200808021915.03424.bzolnier@gmail.com>

Hello.

Bartlomiej Zolnierkiewicz wrote:

> * Factor out disabling of "fast interrupt" prediction from
>   init_hwif_hpt366() to hpt3xx_disable_fast_irq() helper.

> * Use hpt3xx_disable_fast_irq() in ->init_chipset instead of
>   ->init_hwif method.

>   This is a preparation for adding proper PCI PM support.

> While at it:

> * Cache chip type in chip_type variable in hpt3xx_disable_fast_irq().

> There should be no functional changes caused by this patch.

    Except a warning. ;-)

> Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

> Index: b/drivers/ide/pci/hpt366.c
> ===================================================================
> --- a/drivers/ide/pci/hpt366.c
> +++ b/drivers/ide/pci/hpt366.c
> @@ -1265,7 +1297,6 @@ static void __devinit init_hwif_hpt366(i
>  	struct hpt_info *info	= host->host_priv + (hwif->dev == host->dev[1]);
>  	int serialize		= HPT_SERIALIZE_IO;
>  	u8  chip_type		= info->chip_type;
> -	u8  new_mcr, old_mcr	= 0;
>  
>  	/* Cache the channel's MISC. control registers' offset */
>  	hwif->select_data	= hwif->channel ? 0x54 : 0x50;
> @@ -1288,29 +1319,6 @@ static void __devinit init_hwif_hpt366(i
>  	/* Serialize access to this device if needed */
>  	if (serialize && hwif->mate)
>  		hwif->serialized = hwif->mate->serialized = 1;
> -
> -	/*
> -	 * Disable the "fast interrupt" prediction.  Don't hold off
> -	 * on interrupts. (== 0x01 despite what the docs say)
> -	 */
> -	pci_read_config_byte(dev, hwif->select_data + 1, &old_mcr);
> -
> -	if (info->chip_type >= HPT374)
> -		new_mcr = old_mcr & ~0x07;
> -	else if (info->chip_type >= HPT370) {
> -		new_mcr = old_mcr;
> -		new_mcr &= ~0x02;
> -
> -#ifdef HPT_DELAY_INTERRUPT
> -		new_mcr &= ~0x01;
> -#else
> -		new_mcr |=  0x01;
> -#endif
> -	} else					/* HPT366 and HPT368  */
> -		new_mcr = old_mcr & ~0x80;
> -
> -	if (new_mcr != old_mcr)
> -		pci_write_config_byte(dev, hwif->select_data + 1, new_mcr);
>  }

   CC      drivers/ide/pci/hpt366.o
drivers/ide/pci/hpt366.c: In function `init_hwif_hpt366':
drivers/ide/pci/hpt366.c:1290: warning: unused variable `dev'

    You've removed the users of that variable but left the variable itself... 
alas, it's too late to fix the patch. :-/

MBR, Sergei

  reply	other threads:[~2008-10-14 20:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-02 17:15 [PATCH 1/2] hpt366: add hpt3xx_disable_fast_irq() helper Bartlomiej Zolnierkiewicz
2008-10-14 20:51 ` Sergei Shtylyov [this message]
2008-10-15 18:11   ` Bartlomiej Zolnierkiewicz
2008-10-15 21:19     ` Sergei Shtylyov
2008-10-15 21:55       ` 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=48F50649.9080507@ru.mvista.com \
    --to=sshtylyov@ru.mvista.com \
    --cc=bzolnier@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox