Re: [PATCH v4 31/43] hpsa: call pci_release_regions after pci_disable_device

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

 



On 04/16/2015 03:49 PM, Don Brace wrote:
> From: Robert Elliott <elliott@xxxxxx>
> 
> Despite the fact that PCI devices are enabled in this order:
>     1. pci_enable_device
>     2. pci_request_regions
> 
>     Documentation/PCI/pci.txt specifies that they be undone
>     in this order
>     1. pci_disable_device
>     2. pci_release_regions
> 
>     Tested by injecting error in the call to pci_enable_device
>     in hpsa_init_one -> hpsa_pci_init:
>     [    9.095001] hpsa 0000:04:00.0: failed to enable PCI device
>     [    9.095005] hpsa: probe of 0000:04:00.0 failed with error -22
>     (-22 is -EINVAL)
>     and then in the call pci_request_regions:
>     [    9.178623] hpsa 0000:04:00.0: failed to obtain PCI resources
>     [    9.178671] hpsa: probe of 0000:04:00.0 failed with error -16
>     (-16 is -EBUSY)
> 
>     and then by adding
>         reset_devices
>     to the kernel command line and inject errors into the two
>     calls to pci_enable_device and the call to pci_request_regions
>     in hpsa_init_one -> hpsa_init_reset_devices.
> 
>     (inject on 6th call, 1st to hpsa2)
>     [   62.413750] hpsa 0000:04:00.0: Failed to enable PCI device
> 
>     (inject on 7th call, 2nd to hpsa2)
>     [   62.807571] hpsa 0000:04:00.0: failed to enable device.
> 
>     (inject on 8th call, 3rd to hpsa2)
>     [   62.697198] hpsa 0000:04:00.0: failed to obtain PCI resources
>     [   62.697234] hpsa: probe of 0000:04:00.0 failed with error -16
> 
>     The reset_devices path calls return -ENODEV on failure
>     rather than passing the result, which apparently doesn't
>     cause the pci driver to print anything.
> 
> Reviewed-by: Scott Teel <scott.teel@xxxxxxxx>
> Reviewed-by: Kevin Barnett <kevin.barnett@xxxxxxxx>
> Signed-off-by: Robert Elliott <elliott@xxxxxx>
> Signed-off-by: Don Brace < don.brace@xxxxxxxx>
> ---
Reviewed-by: Hannes Reinecke <hare@xxxxxxx>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		               zSeries & Storage
hare@xxxxxxx			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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