Re: [PATCH] vmw_pvscsi: Don't call free_irq twice on remove adapter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Correction.

On Oct 5, 2017, at 1:55 PM, Kyle Fortin <kyle.fortin@xxxxxxxxxx> wrote:
> 
> Hi Jim,
> 
> On Oct 4, 2017, at 3:03 PM, Jim Gill <jgill@xxxxxxxxxx> wrote:
>> 
>> Remove redundant call to pvscsi_shutdown_intr from
>> pvscsi_remove_resources.  Add calls to pvscsi_shutdown_intr
>> in the failure cases for pvscsi_probe.
>> 
>> Signed-off-by: Jim Gill <jgill@xxxxxxxxxx>
>> ---
>> drivers/scsi/vmw_pvscsi.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>> 
>> diff --git a/drivers/scsi/vmw_pvscsi.c b/drivers/scsi/vmw_pvscsi.c
>> index c374e3b..c7e74ac 100644
>> --- a/drivers/scsi/vmw_pvscsi.c
>> +++ b/drivers/scsi/vmw_pvscsi.c
>> @@ -1197,8 +1197,6 @@ static void pvscsi_shutdown_intr(struct pvscsi_adapter *adapter)
>> 
>> static void pvscsi_release_resources(struct pvscsi_adapter *adapter)
>> {
>> -	pvscsi_shutdown_intr(adapter);
>> -
>> 	if (adapter->workqueue)
>> 		destroy_workqueue(adapter->workqueue);
>> 
>> @@ -1530,6 +1528,7 @@ static int pvscsi_probe(struct pci_dev *pdev, const struct pci_device_id *id)
>> out_reset_adapter:
> 
> From what I understand the irq(s) are not allocated until the pci_alloc_irq_vectors call.  After, all breakout jumps are to out_reset_adapter.
> 
> Could it be simplified to just adding pvscsi_shutdown_intr before ll_adapter_reset() here?  Then you don’t need the other two pvscsi_shutdown_intr() calls below.

Add pvscsi_shutdown_intr after adapter reset instead.

>> 	ll_adapter_reset(adapter);
>> out_release_resources:
>> +	pvscsi_shutdown_intr(adapter);
>> 	pvscsi_release_resources(adapter);
>> 	scsi_host_put(host);
>> out_disable_device:
>> @@ -1538,6 +1537,7 @@ static int pvscsi_probe(struct pci_dev *pdev, const struct pci_device_id *id)
>> 	return error;
>> 
>> out_release_resources_and_disable:
>> +	pvscsi_shutdown_intr(adapter);
>> 	pvscsi_release_resources(adapter);
>> 	goto out_disable_device;
>> }
>> -- 
>> 2.7.4
> 
> --
> Kyle Fortin - Oracle Linux Engineering





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux