linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Albert Lee <albertcc@tw.ibm.com>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: Tejun Heo <htejun@gmail.com>, Doug Maxey <dwm@bebe.enoyolf.org>,
	Linux IDE <linux-ide@vger.kernel.org>,
	Unicorn Chang <uchang@tw.ibm.com>
Subject: [PATCH 1/1] libata: minor patch for ATA_DFLAG_PIO
Date: Tue, 20 Jun 2006 20:35:20 +0800	[thread overview]
Message-ID: <4497EB88.8030903@tw.ibm.com> (raw)

Problem:
 - With 2.6.17, some PIO-only devices are given DMA commands.

Changes:
 - Do not clear the ATA_DFLAG_PIO flag in ata_dev_configure().

Original patch by Tejun.
Signed-off-by: Albert Lee <albertcc@tw.ibm.com>

--
The patch is done by Tejun and already in libata-dev upstream.
Maybe we also need this for 2.6.17.

For your review, thanks.

albert

diff -Nrup linux-2.6.17-0/drivers/scsi/libata-core.c linux-2.6.17-1/drivers/scsi/libata-core.c
--- linux-2.6.17-0/drivers/scsi/libata-core.c	2006-06-18 09:49:35.000000000 +0800
+++ linux-2.6.17-1/drivers/scsi/libata-core.c	2006-06-20 16:56:14.000000000 +0800
@@ -1229,7 +1229,7 @@ static int ata_dev_configure(struct ata_
 		       id[84], id[85], id[86], id[87], id[88]);
 
 	/* initialize to-be-configured parameters */
-	dev->flags = 0;
+	dev->flags &= ~ATA_DFLAG_CFG_MASK;
 	dev->max_sectors = 0;
 	dev->cdb_len = 0;
 	dev->n_sectors = 0;
diff -Nrup linux-2.6.17-0/include/linux/libata.h linux-2.6.17-1/include/linux/libata.h
--- linux-2.6.17-0/include/linux/libata.h	2006-06-18 09:49:35.000000000 +0800
+++ linux-2.6.17-1/include/linux/libata.h	2006-06-20 16:55:41.000000000 +0800
@@ -120,9 +120,12 @@ enum {
 	ATA_SHT_USE_CLUSTERING	= 1,
 
 	/* struct ata_device stuff */
-	ATA_DFLAG_LBA48		= (1 << 0), /* device supports LBA48 */
-	ATA_DFLAG_PIO		= (1 << 1), /* device currently in PIO mode */
-	ATA_DFLAG_LBA		= (1 << 2), /* device supports LBA */
+	ATA_DFLAG_LBA		= (1 << 0), /* device supports LBA */
+	ATA_DFLAG_LBA48		= (1 << 1), /* device supports LBA48 */
+
+	ATA_DFLAG_CFG_MASK	= (1 << 8) - 1,
+
+	ATA_DFLAG_PIO		= (1 << 8), /* device currently in PIO mode */
 
 	ATA_DEV_UNKNOWN		= 0,	/* unknown device */
 	ATA_DEV_ATA		= 1,	/* ATA device */



             reply	other threads:[~2006-06-20 12:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-20 12:35 Albert Lee [this message]
2006-06-23  3:14 ` [PATCH 1/1] libata: minor patch for ATA_DFLAG_PIO 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=4497EB88.8030903@tw.ibm.com \
    --to=albertcc@tw.ibm.com \
    --cc=albertl@mail.com \
    --cc=dwm@bebe.enoyolf.org \
    --cc=htejun@gmail.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=uchang@tw.ibm.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 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).