提交 208a9933 编写于 作者: T Tejun Heo 提交者: Jeff Garzik

[PATCH] libata: re-initialize parameters before configuring

In ata_dev_configure(), reinitialize parameters before configuring.
This change is for revalidation and hotplug.  As ata_dev_configure()
can be entered multiple times, parameters need to be reinitialized.
Signed-off-by: NTejun Heo <htejun@gmail.com>
Signed-off-by: NJeff Garzik <jeff@garzik.org>
上级 e653a1e6
......@@ -1086,6 +1086,15 @@ static int ata_dev_configure(struct ata_port *ap, struct ata_device *dev)
DPRINTK("ENTER, host %u, dev %u\n", ap->id, dev->devno);
/* initialize to-be-configured parameters */
dev->flags = 0;
dev->max_sectors = 0;
dev->cdb_len = 0;
dev->n_sectors = 0;
dev->cylinders = 0;
dev->heads = 0;
dev->sectors = 0;
/*
* common ATA, ATAPI feature tests
*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册