linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Luiz Fernando N. Capitulino" <lcapitulino@mandriva.com.br>
To: Tejun Heo <htejun@gmail.com>
Cc: Jeff Garzik <jeff@garzik.org>,
	linux-ide@vger.kernel.org, stable@kernel.org, kelk1@comcast.net
Subject: Re: [PATCH] libata: implement BROKEN_HPA horkage and apply it to HDS724040KLSA80
Date: Tue, 7 Aug 2007 11:51:05 -0300	[thread overview]
Message-ID: <20070807115105.4f5cbc66@localhost> (raw)
In-Reply-To: <20070807054250.GQ13674@htj.dyndns.org>

Em Tue, 7 Aug 2007 14:42:50 +0900
Tejun Heo <htejun@gmail.com> escreveu:

| HDS724040KLSA80 reports that it supports HPA && LBA48 but craps itself
| on READ_NATIVE_MAX_EXT.  Implement BROKEN_HPA horkage and apply it to
| the drive.  If the horkage is set, all HPA operations are skipped.
| 
| While at it, make HPA test a bit more reliable by also checking
| ata_id_has_hpa().

 Tejun, is the following patch ok for 2.6.22.1?

--- linux-2.6.22.orig/drivers/ata/libata-core.c
+++ linux-2.6.22/drivers/ata/libata-core.c
@@ -1939,7 +1939,8 @@ int ata_dev_configure(struct ata_device 
 					dev->flags |= ATA_DFLAG_FLUSH_EXT;
 			}
 
-			if (ata_id_hpa_enabled(dev->id))
+			if (!(dev->horkage & ATA_HORKAGE_BROKEN_HPA) &&
+			    ata_id_has_hpa(id) && ata_id_hpa_enabled(dev->id))
 				dev->n_sectors = ata_hpa_resize(dev);
 
 			/* config NCQ */
@@ -3800,6 +3801,7 @@ static const struct ata_blacklist_entry 
 	{ "HTS541612J9SA00",	"SBDIC7JP",	ATA_HORKAGE_NONCQ, },
 	{ "Hitachi HTS541616J9SA00", "SB4OC70P", ATA_HORKAGE_NONCQ, },
 	{ "WDC WD740ADFD-00NLR1", NULL,		ATA_HORKAGE_NONCQ, },
+	{ "HDS724040KLSA80",    "KFAOA20N",     ATA_HORKAGE_BROKEN_HPA, },
 
 	/* Devices with NCQ limits */
 
--- linux-2.6.22.orig/include/linux/libata.h
+++ linux-2.6.22/include/linux/libata.h
@@ -298,6 +298,7 @@ enum {
 	ATA_HORKAGE_NODMA	= (1 << 1),	/* DMA problems */
 	ATA_HORKAGE_NONCQ	= (1 << 2),	/* Don't use NCQ */
 	ATA_HORKAGE_MAX_SEC_128	= (1 << 3),	/* Limit max sects to 128 */
+	ATA_HORKAGE_BROKEN_HPA	= (1 << 4),	/* Broken HPA */
 };
 
 enum hsm_task_states {


-- 
Luiz Fernando N. Capitulino

  reply	other threads:[~2007-08-07 14:51 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-07  5:42 [PATCH] libata: implement BROKEN_HPA horkage and apply it to HDS724040KLSA80 Tejun Heo
2007-08-07 14:51 ` Luiz Fernando N. Capitulino [this message]
2007-08-07 15:00   ` Tejun Heo
2007-08-07 15:04     ` Luiz Fernando N. Capitulino
2007-08-07 15:25 ` Alan Cox
2007-08-07 15:36   ` Tejun Heo
2007-08-07 15:47     ` Jeff Garzik
2007-08-07 16:57       ` Alan Cox
2007-08-07 16:52         ` Jeff Garzik
2007-08-07 16:53     ` Alan Cox
2007-08-07 16:53       ` Tejun Heo
2007-08-07 16:58     ` Alan Cox
2007-08-08  2:21       ` Tejun Heo
2007-08-08  9:35         ` Alan Cox
2007-08-08 13:23         ` Luiz Fernando N. Capitulino
2007-08-08 13:40           ` Tejun Heo
2007-08-07 18:46     ` Chuck Ebbert
2007-08-07 19:41       ` Alan Cox
2007-08-07 22:12     ` Alan Cox
  -- strict thread matches above, loose matches on Subject: below --
2007-08-08 16:50 Quel Qun
2007-08-08 16:54 ` Luiz Fernando N. Capitulino

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=20070807115105.4f5cbc66@localhost \
    --to=lcapitulino@mandriva.com.br \
    --cc=htejun@gmail.com \
    --cc=jeff@garzik.org \
    --cc=kelk1@comcast.net \
    --cc=linux-ide@vger.kernel.org \
    --cc=stable@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;
as well as URLs for NNTP newsgroup(s).