LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] sata_nv: complain on spurious completion notifiers
@ 2007-02-22 5:53 Robert Hancock
2007-02-22 7:09 ` Tejun Heo
2007-02-23 10:37 ` Jeff Garzik
0 siblings, 2 replies; 3+ messages in thread
From: Robert Hancock @ 2007-02-22 5:53 UTC (permalink / raw)
To: linux-kernel, linux-ide, Jeff Garzik, Andrew Morton, Tejun Heo
Recently Tejun wrote a patch to ahci.c to make it raise a HSM violation
if the drive attempted to complete a tag that wasn't outstanding. We could
run into the same problem with sata_nv ADMA. This adds code to raise a HSM
violation error if the controller gives us a notifier tag that isn't
outstanding, since the drive may be issuing spurious completions.
Signed-off-by: Robert Hancock <hancockr@shaw.ca>
--- linux-2.6.21-rc1edit/drivers/ata/sata_nv.c.prev 2007-02-21 22:17:31.000000000 -0600
+++ linux-2.6.21-rc1edit/drivers/ata/sata_nv.c 2007-02-21 22:22:14.000000000 -0600
@@ -740,6 +740,17 @@ static int nv_adma_check_cpb(struct ata_
DPRINTK("Completing qc from tag %d with err_mask %u\n",cpb_num,
qc->err_mask);
ata_qc_complete(qc);
+ } else {
+ struct ata_eh_info *ehi = &ap->eh_info;
+ /* Notifier bits set without a command may indicate the drive
+ is misbehaving. Raise host state machine violation on this
+ condition. */
+ ata_port_printk(ap, KERN_ERR, "notifier for tag %d with no command?\n",
+ cpb_num);
+ ehi->err_mask |= AC_ERR_HSM;
+ ehi->action |= ATA_EH_SOFTRESET;
+ ata_port_freeze(ap);
+ return 1;
}
}
return 0;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] sata_nv: complain on spurious completion notifiers
2007-02-22 5:53 [PATCH] sata_nv: complain on spurious completion notifiers Robert Hancock
@ 2007-02-22 7:09 ` Tejun Heo
2007-02-23 10:37 ` Jeff Garzik
1 sibling, 0 replies; 3+ messages in thread
From: Tejun Heo @ 2007-02-22 7:09 UTC (permalink / raw)
To: Robert Hancock; +Cc: linux-kernel, linux-ide, Jeff Garzik, Andrew Morton
Robert Hancock wrote:
> Recently Tejun wrote a patch to ahci.c to make it raise a HSM violation
> if the drive attempted to complete a tag that wasn't outstanding. We could
> run into the same problem with sata_nv ADMA. This adds code to raise a HSM
> violation error if the controller gives us a notifier tag that isn't
> outstanding, since the drive may be issuing spurious completions.
>
> Signed-off-by: Robert Hancock <hancockr@shaw.ca>
Acked-by: Tejun Heo <htejun@gmail.com>
--
tejun
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] sata_nv: complain on spurious completion notifiers
2007-02-22 5:53 [PATCH] sata_nv: complain on spurious completion notifiers Robert Hancock
2007-02-22 7:09 ` Tejun Heo
@ 2007-02-23 10:37 ` Jeff Garzik
1 sibling, 0 replies; 3+ messages in thread
From: Jeff Garzik @ 2007-02-23 10:37 UTC (permalink / raw)
To: Robert Hancock; +Cc: linux-kernel, linux-ide, Andrew Morton, Tejun Heo
Robert Hancock wrote:
> Recently Tejun wrote a patch to ahci.c to make it raise a HSM violation
> if the drive attempted to complete a tag that wasn't outstanding. We could
> run into the same problem with sata_nv ADMA. This adds code to raise a HSM
> violation error if the controller gives us a notifier tag that isn't
> outstanding, since the drive may be issuing spurious completions.
>
> Signed-off-by: Robert Hancock <hancockr@shaw.ca>
applied
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-02-23 10:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-22 5:53 [PATCH] sata_nv: complain on spurious completion notifiers Robert Hancock
2007-02-22 7:09 ` Tejun Heo
2007-02-23 10:37 ` Jeff Garzik
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).