forked from Minki/linux
PCI/DPC: Make RP PIO log size check more generic
In dpc_probe(), we set dpc->rp_log_size to zero if we think the hardware reports an invalid size. In this case, we could have dpc->rp_extensions set but dpc->rp_log_size == 0, and we should print the basic RP PIO registers but not the variable-size portion. We already checked for dpc->rp_log_size < 4 above, so this patch is just for consistency of style. No functional change intended. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Keith Busch <keith.busch@intel.com> Reviewed-by: Sinan Kaya <okaya@codeaurora.org>
This commit is contained in:
parent
a596a7bece
commit
64c3394efd
@ -212,11 +212,12 @@ static void dpc_rp_pio_get_info(struct dpc_dev *dpc,
|
|||||||
&rp_pio->header_log.dw2);
|
&rp_pio->header_log.dw2);
|
||||||
pci_read_config_dword(pdev, cap + PCI_EXP_DPC_RP_PIO_HEADER_LOG + 12,
|
pci_read_config_dword(pdev, cap + PCI_EXP_DPC_RP_PIO_HEADER_LOG + 12,
|
||||||
&rp_pio->header_log.dw3);
|
&rp_pio->header_log.dw3);
|
||||||
if (dpc->rp_log_size == 4)
|
|
||||||
return;
|
|
||||||
|
|
||||||
|
if (dpc->rp_log_size < 5)
|
||||||
|
return;
|
||||||
pci_read_config_dword(pdev, cap + PCI_EXP_DPC_RP_PIO_IMPSPEC_LOG,
|
pci_read_config_dword(pdev, cap + PCI_EXP_DPC_RP_PIO_IMPSPEC_LOG,
|
||||||
&rp_pio->impspec_log);
|
&rp_pio->impspec_log);
|
||||||
|
|
||||||
for (i = 0; i < dpc->rp_log_size - 5; i++)
|
for (i = 0; i < dpc->rp_log_size - 5; i++)
|
||||||
pci_read_config_dword(pdev,
|
pci_read_config_dword(pdev,
|
||||||
cap + PCI_EXP_DPC_RP_PIO_TLPPREFIX_LOG,
|
cap + PCI_EXP_DPC_RP_PIO_TLPPREFIX_LOG,
|
||||||
|
Loading…
Reference in New Issue
Block a user