提交 26f3ba96 编写于 作者: J John Garry 提交者: Martin K. Petersen

scsi: hisi_sas: support deferred probe for v2 hw

In the hip06 and hip07 SoCs, the interrupt lines from the SAS
controllers are connected to mbigen hw module [1].  The mbigen module is
probed with module_init, and, as such, is not guaranteed to probe before
the SAS driver. So we need to support deferred probe.

We check for probe deferral in the hw layer probe, so we not probe into
the main layer and allocate shost, memories, etc., to later learn that
we need to defer the probe.

[1] ./Documentation/devicetree/bindings/interrupt-controller/hisilicon,mbigen-v2.txt
Signed-off-by: NJohn Garry <john.garry@huawei.com>
Reviewed-by: NZhangfei Gao <zhangfei.gao@linaro.org>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 fad119b7
......@@ -2790,6 +2790,18 @@ static const struct hisi_sas_hw hisi_sas_v2_hw = {
static int hisi_sas_v2_probe(struct platform_device *pdev)
{
/*
* Check if we should defer the probe before we probe the
* upper layer, as it's hard to defer later on.
*/
int ret = platform_get_irq(pdev, 0);
if (ret < 0) {
if (ret != -EPROBE_DEFER)
dev_err(&pdev->dev, "cannot obtain irq\n");
return ret;
}
return hisi_sas_probe(pdev, &hisi_sas_v2_hw);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册