Bug#391929: can you test a couple kernels?
hey Martin,
Can you verify that this problem is reproducible with:
http://kernel-archive.buildserver.net/debian-kernel/pool/main/l/linux-2.6/linux-image-2.6.18-4-amd64_2.6.18-9~snapshot.8189_amd64.deb
And that it is not reproducible with:
http://www.dannf.org/bugs/391929/linux-image-2.6.18-4-amd64_2.6.18-9~snapshot.8189+wcache_amd64.deb
The only difference between the two is the addition of the following
patch, which is a fairly simple backport of the changeset identified
by Tejun.
From: Tejun Heo <htejun@gmail.com>
Date: Wed, 22 Nov 2006 03:39:43 +0000 (+0900)
Subject: [PATCH] libata: don't schedule EH on wcache on/off if old EH
X-Git-Tag: v2.6.19^0~5^2~2
X-Git-Url: http://www.kernel.org/git/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=c31f571d9f42fa2e89148811730fe3dc64943a6e
[PATCH] libata: don't schedule EH on wcache on/off if old EH
Do not schedule EH for revalidation on wcache on/off if old EH. Old
EH cannot handle it and will result in WARN_ON()'s and oops.
This closes bug #7412.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
---
Backported to Debian's 2.6.18 by dann frazier <dannf@hp.com>
diff -urpN linux-source-2.6.18.orig/drivers/scsi/libata-scsi.c linux-source-2.6.18/drivers/scsi/libata-scsi.c
--- linux-source-2.6.18.orig/drivers/scsi/libata-scsi.c 2006-09-19 21:42:06.000000000 -0600
+++ linux-source-2.6.18/drivers/scsi/libata-scsi.c 2007-01-16 08:42:06.000000000 -0700
@@ -1409,6 +1409,7 @@ nothing_to_do:
static void ata_scsi_qc_complete(struct ata_queued_cmd *qc)
{
+ struct ata_port *ap = qc->ap;
struct scsi_cmnd *cmd = qc->scsicmd;
u8 *cdb = cmd->cmnd;
int need_sense = (qc->err_mask != 0);
@@ -1417,11 +1418,12 @@ static void ata_scsi_qc_complete(struct
* schedule EH_REVALIDATE operation to update the IDENTIFY DEVICE
* cache
*/
- if (!need_sense && (qc->tf.command == ATA_CMD_SET_FEATURES) &&
+ if (ap->ops->error_handler &&
+ !need_sense && (qc->tf.command == ATA_CMD_SET_FEATURES) &&
((qc->tf.feature == SETFEATURES_WC_ON) ||
(qc->tf.feature == SETFEATURES_WC_OFF))) {
- qc->ap->eh_info.action |= ATA_EH_REVALIDATE;
- ata_port_schedule_eh(qc->ap);
+ ap->eh_info.action |= ATA_EH_REVALIDATE;
+ ata_port_schedule_eh(ap);
}
/* For ATA pass thru (SAT) commands, generate a sense block if
@@ -1448,8 +1450,8 @@ static void ata_scsi_qc_complete(struct
}
}
- if (need_sense && !qc->ap->ops->error_handler)
- ata_dump_status(qc->ap->id, &qc->result_tf);
+ if (need_sense && !ap->ops->error_handler)
+ ata_dump_status(ap->id, &qc->result_tf);
qc->scsidone(cmd);
--
dann frazier
Reply to: