Re: [PATCH v2 1/6] mpt3sas: Introduce mpt3sas_base_pci_device_is_available

2018-09-21 Thread Sreekanth Reddy
On Thu, Sep 20, 2018 at 4:37 PM Christoph Hellwig wrote: > > > +u8 > > +mpt3sas_base_pci_device_is_available(struct MPT3SAS_ADAPTER *ioc) > > +{ > > + if (ioc->pci_error_recovery || > > + (!pci_device_is_present(ioc->pdev))) > > + return 0; > > + > > + return 1; >

Re: [PATCH v2 1/6] mpt3sas: Introduce mpt3sas_base_pci_device_is_available

2018-09-20 Thread Christoph Hellwig
> +u8 > +mpt3sas_base_pci_device_is_available(struct MPT3SAS_ADAPTER *ioc) > +{ > + if (ioc->pci_error_recovery || > + (!pci_device_is_present(ioc->pdev))) > + return 0; > + > + return 1; > +} This should simplify be: bool

[PATCH v2 1/6] mpt3sas: Introduce mpt3sas_base_pci_device_is_available

2018-09-20 Thread Suganath Prabu S
* Driver uses "pci_device_is_present" to check whether If Hot unplugged: the outstanding IOs with 'DID_NO_CONNECT' before removing the drives attached to the HBA. "DID_NO_CONNECT" status and free the smid, if driver detects that HBA is hot unplugged. * In the hard reset flush out all the