All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: linux-ide@vger.kernel.org
Cc: Ricky Beam <jfbeam@bluetronic.net>,
	Linux Kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH] fix sata_sil quirk
Date: Tue, 22 Jun 2004 16:22:33 -0400	[thread overview]
Message-ID: <40D89509.6010502@pobox.com> (raw)

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

Here's my suggested fix...  good catch Ricky.

Yes, unfortunately performance will be dog slow.

Silicon Image 311x is fully SATA compliant -- but it's the only 
controller that sends odd-sized packets to the SATA device.  That causes 
no end of problems, including the thing that SIL_QUIRK_MOD15WRITE 
attempts to work around.

I've got contacts at Silicon Image, and have been meaning to bug them 
for a "real fix" for a while.  It is rumored that there is a much better 
fix, which allows full performance while at the same time not killing 
your SATA drive due to odd-sized SATA frames on the wire.

Unfortunately, at this point in time, we must err on the side of caution 
and cripple performance, for stability.

	Jeff



[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 1365 bytes --]

===== drivers/scsi/libata-scsi.c 1.39 vs edited =====
--- 1.39/drivers/scsi/libata-scsi.c	2004-05-12 11:46:21 -04:00
+++ edited/drivers/scsi/libata-scsi.c	2004-06-22 16:18:57 -04:00
@@ -182,7 +182,8 @@
 		 * 65534 when Jens Axboe's patch for dynamically
 		 * determining max_sectors is merged.
 		 */
-		if (dev->flags & ATA_DFLAG_LBA48) {
+		if ((dev->flags & ATA_DFLAG_LBA48) &&
+		    ((dev->flags & ATA_DFLAG_LOCK_SECTORS) == 0)) {
 			sdev->host->max_sectors = 2048;
 			blk_queue_max_sectors(sdev->request_queue, 2048);
 		}
===== drivers/scsi/sata_sil.c 1.26 vs edited =====
--- 1.26/drivers/scsi/sata_sil.c	2004-06-15 00:29:32 -04:00
+++ edited/drivers/scsi/sata_sil.c	2004-06-22 16:18:21 -04:00
@@ -302,6 +302,7 @@
 		       ap->id, dev->devno);
 		ap->host->max_sectors = 15;
 		ap->host->hostt->max_sectors = 15;
+		dev->flags |= ATA_DFLAG_LOCK_SECTORS;
 		return;
 	}
 
===== include/linux/libata.h 1.38 vs edited =====
--- 1.38/include/linux/libata.h	2004-06-22 00:54:44 -04:00
+++ edited/include/linux/libata.h	2004-06-22 16:17:44 -04:00
@@ -91,6 +91,7 @@
 	ATA_DFLAG_MASTER	= (1 << 2), /* is device 0? */
 	ATA_DFLAG_WCACHE	= (1 << 3), /* has write cache we can
 					     * (hopefully) flush? */
+	ATA_DFLAG_LOCK_SECTORS	= (1 << 4), /* don't adjust max_sectors */
 
 	ATA_DEV_UNKNOWN		= 0,	/* unknown device */
 	ATA_DEV_ATA		= 1,	/* ATA device */

             reply	other threads:[~2004-06-22 20:22 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-22 20:22 Jeff Garzik [this message]
2004-06-22 20:29 ` [PATCH] fix sata_sil quirk Ricky Beam
2004-06-22 20:29   ` Ricky Beam
2004-06-22 20:41   ` Jeff Garzik
2004-06-22 22:12   ` Jeff Garzik
2004-06-23  0:34     ` Ricky Beam
2004-06-23  0:34       ` Ricky Beam
2004-06-23  3:24 ` Paul Jakma
2004-06-23  3:39   ` Jeff Garzik
2004-06-23  3:46     ` Paul Jakma
2004-06-23  3:51       ` Jeff Garzik
2004-06-23  6:34         ` Ricky Beam
2004-06-23  6:34           ` Ricky Beam
2004-06-28  1:54           ` George Georgalis
2004-09-27  3:40             ` George Georgalis

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=40D89509.6010502@pobox.com \
    --to=jgarzik@pobox.com \
    --cc=jfbeam@bluetronic.net \
    --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 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.