linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: linux--ide-momail.e4ward.com-linux--ide-vger.kernel.org-CCE-pbwz-4@reply.e4ward.com
Cc: linux-ide@vger.kernel.org
Subject: Re: PIONEER DVD-RW DVRTD08 is disabled if there is no disc present at   boot time
Date: Tue, 23 Dec 2008 12:03:28 +0900	[thread overview]
Message-ID: <49505500.8080409@kernel.org> (raw)
In-Reply-To: <1229947998.6045.10.camel@Thutmosis>

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

linux-ide@momail.e4ward.com wrote:
> There's no error in dmesg output. But when I boot with a disk in the
> drive, I get the following errors in the boot screen:
> * Loading hardware devices
> [23.927373] end_request: I/O error, dev sr0, sector 1431744
> [23.927373] Buffer I/O error on device sr0, logical block 178968
> and then several more with just a different number in the square
> brackets. However, that does not seem to affect the operation of the
> drive.

Does the attached patch fix the problem?  Please do some data
integrity checks as it skips setxfermode on the drive.  If it's native
SATA, it probably should be okay but still it's way out of the spec.

Thanks.

-- 
tejun

[-- Attachment #2: nosetxfer.patch --]
[-- Type: text/x-patch, Size: 1518 bytes --]

diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index c71f3ac..d89817a 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -3303,14 +3303,17 @@ static int ata_dev_set_mode(struct ata_device *dev)
 	struct ata_eh_context *ehc = &dev->link->eh_context;
 	const char *dev_err_whine = "";
 	int ign_dev_err = 0;
-	unsigned int err_mask;
+	unsigned int err_mask = 0;
 	int rc;
 
 	dev->flags &= ~ATA_DFLAG_PIO;
 	if (dev->xfer_shift == ATA_SHIFT_PIO)
 		dev->flags |= ATA_DFLAG_PIO;
 
-	err_mask = ata_dev_set_xfermode(dev);
+	if (!(dev->horkage & ATA_HORKAGE_NOSETXFER))
+		err_mask = ata_dev_set_xfermode(dev);
+	else
+		dev_err_whine = " (SET_XFERMODE skipped)";
 
 	if (err_mask & ~AC_ERR_DEV)
 		goto fail;
@@ -4132,6 +4135,8 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
 	/* Devices that do not need bridging limits applied */
 	{ "MTRON MSP-SATA*",		NULL,	ATA_HORKAGE_BRIDGE_OK, },
 
+	{ "PIONEER DVD-RW  DVRTD08",	"1.00",	ATA_HORKAGE_NOSETXFER },
+
 	/* End Marker */
 	{ }
 };
diff --git a/include/linux/libata.h b/include/linux/libata.h
index b79c319..f647d26 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -376,6 +376,7 @@ enum {
 	ATA_HORKAGE_BRIDGE_OK	= (1 << 10),	/* no bridge limits */
 	ATA_HORKAGE_ATAPI_MOD16_DMA = (1 << 11), /* use ATAPI DMA for commands
 						    not multiple of 16 bytes */
+	ATA_HORKAGE_NOSETXFER	= (1 << 12),
 
 	 /* DMA mask for user DMA control: User visible values; DO NOT
 	    renumber */

  reply	other threads:[~2008-12-23  3:03 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-21 21:18 PIONEER DVD-RW DVRTD08 is disabled if there is no disc present at boot time linux-ide
2008-12-22  0:22 ` Robert Hancock
2008-12-22 10:02   ` Tejun Heo
2008-12-22 12:13     ` linux-ide
2008-12-23  3:03       ` Tejun Heo [this message]
2008-12-24 13:40         ` linux-ide
2008-12-29  8:14           ` Tejun Heo
2008-12-29 21:32             ` linux-ide
2009-01-06 22:51               ` linux-ide
2009-01-07  2:01                 ` [PATCH #upstream-fixes] libata: implement and use HORKAGE_NOSETXFER Tejun Heo
2009-01-07  9:40                   ` Alan Cox
2009-01-07 10:27                     ` Tejun Heo
2009-01-07 10:53                       ` Alan Cox
2009-01-07 11:04                         ` Tejun Heo
2009-05-25  3:10                           ` Tejun Heo
2009-05-25  8:11                             ` Alan Cox
2009-07-08  8:00                               ` Tejun Heo
2009-07-08 10:14                                 ` Alan Cox
2009-07-08 11:16                                   ` Tejun Heo
2009-07-08 12:21                                     ` Alan Cox
2009-07-08 23:07                                       ` Tejun Heo
2009-07-08 14:53                                   ` Sergei Shtylyov
2009-07-08 15:06                                     ` Alan Cox
2008-12-29 22:11             ` PIONEER DVD-RW DVRTD08 is disabled if there is no disc present at boot time Peter Klotz
2008-12-22 11:57   ` linux-ide
  -- strict thread matches above, loose matches on Subject: below --
2008-12-21 21:36 linux-ide

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=49505500.8080409@kernel.org \
    --to=tj@kernel.org \
    --cc=linux--ide-momail.e4ward.com-linux--ide-vger.kernel.org-CCE-pbwz-4@reply.e4ward.com \
    --cc=linux-ide@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 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).