All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: Mao Rui <maorui@yuvad.com>
Cc: "'Alan Cox'" <alan@lxorguk.ukuu.org.uk>, linux-kernel@vger.kernel.org
Subject: Re: SATA DOM is not identified by ata_piix module
Date: Sat, 02 Feb 2008 17:41:43 +0900	[thread overview]
Message-ID: <47A42CC7.1080401@gmail.com> (raw)
In-Reply-To: <00da01c85999$0856e540$7740a8c0@cmaorui2>

[-- Attachment #1: Type: text/plain, Size: 814 bytes --]

Mao Rui wrote:
> I tried to nail down when the problem was introduced. I compiled some
> official kernel release. Here is the result.
> 2.6.17.14   IDE -- Failed   SATA -- passed
> 2.6.18   IDE -- Failed   SATA -- failed
> 2.6.18.8   IDE -- Failed   SATA -- failed
> 2.6.24-rc7-git6  IDE -- passed   SATA DOM -- failed
> linux-2.6.24-rc8-git1   IDE -- passed    SATA -- failed
> All IDE failed reason is xfermode error, and all SATA failure is IDENTIFY
> error.
> 
> As you can find out, the failure of SATA DOM was introduced from kernel
> 2.6.18.
> 
> I'm not good at low level driver programming, so I cannot find out the root
> cause by myself. But if Alan or someone else needs more info or wants to
> test the patch, I'm glad to do it in my platform.

Does the attached patch make any difference?

-- 
tejun

[-- Attachment #2: ata_dev_init_params-debug.patch --]
[-- Type: text/x-patch, Size: 997 bytes --]

diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index ce803d1..76d779a 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -1975,17 +1975,21 @@ int ata_dev_read_id(struct ata_device *dev, unsigned int *p_class,
 		 */
 		if (ata_id_major_version(id) < 4 || !ata_id_has_lba(id)) {
 			err_mask = ata_dev_init_params(dev, id[3], id[6]);
-			if (err_mask) {
+			if (err_mask == 0) {
+				/* current CHS translation info (id[53-58])
+				 * might be changed. reread the identify
+				 * device info.
+				 */
+				flags &= ~ATA_READID_POSTRESET;
+				goto retry;
+			} else if (err_mask == AC_ERR_DEV) {
+				ata_dev_printk(dev, KERN_INFO,
+					"INIT_DEV_PARAMS rejected by device\n");
+			} else {
 				rc = -EIO;
 				reason = "INIT_DEV_PARAMS failed";
 				goto err_out;
 			}
-
-			/* current CHS translation info (id[53-58]) might be
-			 * changed. reread the identify device info.
-			 */
-			flags &= ~ATA_READID_POSTRESET;
-			goto retry;
 		}
 	}
 

  parent reply	other threads:[~2008-02-02  8:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-15 10:11 SATA DOM is not identified by ata_piix module Mao Rui
2008-01-15 11:02 ` Alan Cox
2008-01-18  6:11   ` Mao Rui
2008-01-30  2:42     ` Mao Rui
2008-02-04 13:00       ` Alan Cox
2008-02-02  8:41     ` Tejun Heo [this message]
2008-02-02  9:25       ` Mao Rui
2008-02-02 11:20         ` Tejun Heo

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=47A42CC7.1080401@gmail.com \
    --to=htejun@gmail.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maorui@yuvad.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.