From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752363AbbKJK4L (ORCPT ); Tue, 10 Nov 2015 05:56:11 -0500 Received: from szxga01-in.huawei.com ([58.251.152.64]:14630 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751757AbbKJK4J (ORCPT ); Tue, 10 Nov 2015 05:56:09 -0500 Subject: Re: [PATCH v3 08/32] scsi: hisi_sas: add hisi_sas_remove To: "fangwei (I)" References: <1447086757-147706-1-git-send-email-john.garry@huawei.com> <1447086757-147706-9-git-send-email-john.garry@huawei.com> <5641690E.10303@huawei.com> CC: "JBottomley@odin.com" , "robh+dt@kernel.org" , "pawel.moll@arm.com" , "mark.rutland@arm.com" , "ijc+devicetree@hellion.org.uk" , "galak@codeaurora.org" , "arnd@arndb.de" , "devicetree@vger.kernel.org" , "linux-scsi@vger.kernel.org" , "john.garry2@mail.dcu.ie" , "linux-kernel@vger.kernel.org" , Linuxarm , "hare@suse.de" , "zhangfei.gao@linaro.org" From: John Garry Message-ID: <5641CD06.7030001@huawei.com> Date: Tue, 10 Nov 2015 10:55:02 +0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <5641690E.10303@huawei.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.202.137.251] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090203.5641CD1C.00D1,ss=1,re=0.000,fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2011-05-27 18:58:46 X-Mirapoint-Loop-Id: 04d7f61a9ee1b04415cc7b4344043336 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >> +int hisi_sas_remove(struct platform_device *pdev) >> +{ >> + struct sas_ha_struct *sha = platform_get_drvdata(pdev); >> + struct hisi_hba *hisi_hba = sha->lldd_ha; >> + >> + sas_unregister_ha(sha); >> + sas_remove_host(sha->core.shost); >> + scsi_remove_host(sha->core.shost); > > scsi host should be removed before detaching SAS transport. > > See more information: > http://www.spinics.net/lists/linux-scsi/msg90088.html > > Thanks, > Wei > OK, I can make this minor change. Thanks, John >> + hisi_sas_free(hisi_hba); >> + return 0; >> +} >> +EXPORT_SYMBOL_GPL(hisi_sas_remove); >> + >> static __init int hisi_sas_init(void) >> { >> pr_info("hisi_sas: driver version %s\n", DRV_VERSION); >> > > > . >