提交 48a8a14f 编写于 作者: T Tejun Heo 提交者: Jeff Garzik

[PATCH] libata: revalidate after transfer mode configuration

Revalidate device after transfer mode configuration.  This also makes
dev->id up-to-date.
Signed-off-by: NTejun Heo <htejun@gmail.com>
Signed-off-by: NJeff Garzik <jeff@garzik.org>
上级 623a3128
......@@ -1625,6 +1625,12 @@ static void ata_dev_set_mode(struct ata_port *ap, struct ata_device *dev)
idx = ofs + dev->xfer_shift;
WARN_ON(idx >= ARRAY_SIZE(xfer_mode_str));
if (ata_dev_revalidate(ap, dev, 0)) {
printk(KERN_ERR "ata%u: failed to revalidate after set "
"xfermode, disabled\n", ap->id);
ata_port_disable(ap);
}
DPRINTK("idx=%d xfer_shift=%u, xfer_mode=0x%x, base=0x%x, offset=%d\n",
idx, dev->xfer_shift, (int)dev->xfer_mode, (int)base, ofs);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册