diff mbox

Errors on ICH10R with Seagate HDDs

Message ID 4A48CB10.5020409@kernel.org
State Not Applicable
Delegated to: David Miller
Headers show

Commit Message

Tejun Heo June 29, 2009, 2:09 p.m. UTC
Thomas Jackowski wrote:
> there is no relevant output in this loop (running about 6 hours).

Hmm... can you please try the attached patch?  It should show us who's
issuing the CPM.

Thanks.
diff mbox

Patch

diff --git a/block/elevator.c b/block/elevator.c
index 7073a90..93e6575 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -618,6 +618,16 @@  void elv_insert(struct request_queue *q, struct request *rq, int where)
 	unsigned ordseq;
 	int unplug_it = 1;
 
+	if (rq->cmd[0] == 0xa1 || rq->cmd[0] == 0x85) {
+		u8 cmd = rq->cmd[0] == 0xa1 ? rq->cmd[9] : rq->cmd[14];
+
+		if (cmd == 0xe5) {
+			printk("XXX %s: elv_insert(ATA_CHK_POWER)\n",
+			       rq->rq_disk ? rq->rq_disk->disk_name : "?");
+			dump_stack();
+		}
+	}
+
 	trace_block_rq_insert(q, rq);
 
 	rq->q = q;
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 94919ad..a56c53d 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -2722,6 +2722,7 @@  static void ata_eh_park_issue_cmd(struct ata_device *dev, int park)
 		tf.lbah = 0x55;
 	} else {
 		ehc->unloaded_mask &= ~(1 << dev->devno);
+		ata_dev_printk(dev, KERN_INFO, "XXX issuing CHK_POWER for unparking\n");
 		tf.command = ATA_CMD_CHK_POWER;
 	}