All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jeff@garzik.org>
To: Uwe Koziolek <uwe.koziolek@gmx.net>
Cc: htejun@gmail.com, alan@lxorguk.ukuu.org.uk, linux-ide@vger.kernel.org
Subject: Re: [PATCH 2.6.22-rc2] libata: sata_sis fixes
Date: Fri, 25 May 2007 04:23:31 -0400	[thread overview]
Message-ID: <46569D03.7030503@garzik.org> (raw)
In-Reply-To: <200705250948.52588.uwe.koziolek@gmx.net>

Uwe Koziolek wrote:
> --- a/drivers/ata/sata_sis.c	2007-05-22 11:05:38.000000000 +0200
> +++ b/drivers/ata/sata_sis.c	2007-05-23 00:24:28.000000000 +0200
> @@ -255,7 +255,7 @@
>  {
>  	static int printed_version;
>  	struct ata_port_info pi = sis_port_info;
> -	const struct ata_port_info *ppi[] = { &pi, NULL };
> +	const struct ata_port_info *ppi[] = { &pi, &pi };
>  	struct ata_host *host;
>  	u32 genctl, val;
>  	u8 pmr;

applied this part


> --- a/drivers/ata/pata_sis.c	2007-05-22 11:05:38.000000000 +0200
> +++ b/drivers/ata/pata_sis.c	2007-05-25 07:50:50.000000000 +0200
> @@ -146,7 +146,8 @@
>  
>  	struct pci_dev *pdev = to_pci_dev(ap->host->dev);
>  
> -	if (!pci_test_config_bits(pdev, &sis_enable_bits[ap->port_no]))
> +	if ((pdev->device != 0x0180) && (pdev->device != 0x0181) &&
> +	    !pci_test_config_bits(pdev, &sis_enable_bits[ap->port_no]))
>  		return -ENOENT;
>  
>  	return ata_std_prereset(ap, deadline);

I think you misunderstood what Alan and I were saying.

If you remove the enable-bits check, then logically, all the function 
does is call ata_std_prereset.  Thus, your error handler only needs to 
the standard function for 0x180 and 0x181, ata_std_prereset() rather 
than sis_pre_reset().

Further, once your ata_bmdma_drive_eh() has been reduced entirely to 
calling standard functions, you need not use sis_error_handler() at all, 
because _that_ has been reduced to ata_bmdma_error_handler().

As a result, the following line

	.error_handler		= ata_bmdma_error_handler,

is functionally equivalent to your patch, but without custom code to 
produce that effect.

	Jeff



  reply	other threads:[~2007-05-25  8:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-25  7:48 [PATCH 2.6.22-rc2] libata: sata_sis fixes Uwe Koziolek
2007-05-25  8:23 ` Jeff Garzik [this message]
2007-05-25 14:32 ` Alan Cox
2007-05-30  8:20   ` Uwe Koziolek
2007-06-04 15:30     ` Alan Cox
2007-06-04 20:24       ` Uwe Koziolek
  -- strict thread matches above, loose matches on Subject: below --
2007-05-23 23:31 Uwe Koziolek
2007-05-24  0:22 ` Alan Cox
2007-05-24  6:09 ` 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=46569D03.7030503@garzik.org \
    --to=jeff@garzik.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=htejun@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=uwe.koziolek@gmx.net \
    /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.