Skip to content

Commit 50b3ef1

Browse files
committed
Merge branch 'pci/misc'
- Prevent xHCI driver from claiming AMD VanGogh USB3 DRD device so dwc3 can claim it instead (Vicki Pfau) - Make pci_assign_unassigned_resources() non-init because sparc uses it after init-time (Randy Dunlap) - Remove logic_outb(), _outw(), outl() duplicate declarations (John Sanpe) - Remove unnecessary UTF-8 in Kconfig help text that confuses menuconfig (Liu Song) - Fix double free in __pci_epc_create() (Dan Carpenter) - Simplify pcie_capability_clear_and_set_word() cases that could be pcie_capability_clear_word() (Ilpo Järvinen) * pci/misc: PCI: Simplify pcie_capability_clear_and_set_word() to ..._clear_word() PCI: endpoint: Fix double free in __pci_epc_create() PCI: Replace unnecessary UTF-8 in Kconfig logic_pio: Remove logic_outb(), _outw(), outl() duplicate declarations PCI: Make pci_assign_unassigned_resources() non-init PCI: Prevent xHCI driver from claiming AMD VanGogh USB3 DRD device
2 parents 5897c17 + 0fce6e5 commit 50b3ef1

File tree

7 files changed

+15
-16
lines changed

7 files changed

+15
-16
lines changed

drivers/pci/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ config PCI_P2PDMA
170170
select GENERIC_ALLOCATOR
171171
select NEED_SG_DMA_FLAGS
172172
help
173-
Enableѕ drivers to do PCI peer-to-peer transactions to and from
173+
Enables drivers to do PCI peer-to-peer transactions to and from
174174
BARs that are exposed in other devices that are the part of
175175
the hierarchy where peer-to-peer DMA is guaranteed by the PCI
176176
specification to work (ie. anything below a single PCI bridge).

drivers/pci/endpoint/pci-epc-core.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -869,7 +869,6 @@ __pci_epc_create(struct device *dev, const struct pci_epc_ops *ops,
869869

870870
put_dev:
871871
put_device(&epc->dev);
872-
kfree(epc);
873872

874873
err_ret:
875874
return ERR_PTR(ret);

drivers/pci/pcie/aspm.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -696,10 +696,10 @@ static void pcie_config_aspm_l1ss(struct pcie_link_state *link, u32 state)
696696
* in pcie_config_aspm_link().
697697
*/
698698
if (enable_req & (ASPM_STATE_L1_1 | ASPM_STATE_L1_2)) {
699-
pcie_capability_clear_and_set_word(child, PCI_EXP_LNKCTL,
700-
PCI_EXP_LNKCTL_ASPM_L1, 0);
701-
pcie_capability_clear_and_set_word(parent, PCI_EXP_LNKCTL,
702-
PCI_EXP_LNKCTL_ASPM_L1, 0);
699+
pcie_capability_clear_word(child, PCI_EXP_LNKCTL,
700+
PCI_EXP_LNKCTL_ASPM_L1);
701+
pcie_capability_clear_word(parent, PCI_EXP_LNKCTL,
702+
PCI_EXP_LNKCTL_ASPM_L1);
703703
}
704704

705705
val = 0;

drivers/pci/quirks.c

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -690,15 +690,15 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS100, quirk_ati_
690690
/*
691691
* In the AMD NL platform, this device ([1022:7912]) has a class code of
692692
* PCI_CLASS_SERIAL_USB_XHCI (0x0c0330), which means the xhci driver will
693-
* claim it.
693+
* claim it. The same applies on the VanGogh platform device ([1022:163a]).
694694
*
695695
* But the dwc3 driver is a more specific driver for this device, and we'd
696696
* prefer to use it instead of xhci. To prevent xhci from claiming the
697697
* device, change the class code to 0x0c03fe, which the PCI r3.0 spec
698698
* defines as "USB device (not host controller)". The dwc3 driver can then
699699
* claim it based on its Vendor and Device ID.
700700
*/
701-
static void quirk_amd_nl_class(struct pci_dev *pdev)
701+
static void quirk_amd_dwc_class(struct pci_dev *pdev)
702702
{
703703
u32 class = pdev->class;
704704

@@ -708,7 +708,9 @@ static void quirk_amd_nl_class(struct pci_dev *pdev)
708708
class, pdev->class);
709709
}
710710
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_NL_USB,
711-
quirk_amd_nl_class);
711+
quirk_amd_dwc_class);
712+
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_VANGOGH_USB,
713+
quirk_amd_dwc_class);
712714

713715
/*
714716
* Synopsys USB 3.x host HAPS platform has a class code of
@@ -4553,9 +4555,9 @@ static void quirk_disable_root_port_attributes(struct pci_dev *pdev)
45534555

45544556
pci_info(root_port, "Disabling No Snoop/Relaxed Ordering Attributes to avoid PCIe Completion erratum in %s\n",
45554557
dev_name(&pdev->dev));
4556-
pcie_capability_clear_and_set_word(root_port, PCI_EXP_DEVCTL,
4557-
PCI_EXP_DEVCTL_RELAX_EN |
4558-
PCI_EXP_DEVCTL_NOSNOOP_EN, 0);
4558+
pcie_capability_clear_word(root_port, PCI_EXP_DEVCTL,
4559+
PCI_EXP_DEVCTL_RELAX_EN |
4560+
PCI_EXP_DEVCTL_NOSNOOP_EN);
45594561
}
45604562

45614563
/*

drivers/pci/setup-bus.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2129,7 +2129,7 @@ void pci_assign_unassigned_root_bus_resources(struct pci_bus *bus)
21292129
pci_bus_dump_resources(bus);
21302130
}
21312131

2132-
void __init pci_assign_unassigned_resources(void)
2132+
void pci_assign_unassigned_resources(void)
21332133
{
21342134
struct pci_bus *root_bus;
21352135

include/linux/logic_pio.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@ struct logic_pio_host_ops {
3939

4040
#ifdef CONFIG_INDIRECT_PIO
4141
u8 logic_inb(unsigned long addr);
42-
void logic_outb(u8 value, unsigned long addr);
43-
void logic_outw(u16 value, unsigned long addr);
44-
void logic_outl(u32 value, unsigned long addr);
4542
u16 logic_inw(unsigned long addr);
4643
u32 logic_inl(unsigned long addr);
4744
void logic_outb(u8 value, unsigned long addr);

include/linux/pci_ids.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -579,6 +579,7 @@
579579
#define PCI_DEVICE_ID_AMD_1AH_M00H_DF_F3 0x12c3
580580
#define PCI_DEVICE_ID_AMD_1AH_M20H_DF_F3 0x16fb
581581
#define PCI_DEVICE_ID_AMD_MI200_DF_F3 0x14d3
582+
#define PCI_DEVICE_ID_AMD_VANGOGH_USB 0x163a
582583
#define PCI_DEVICE_ID_AMD_CNB17H_F3 0x1703
583584
#define PCI_DEVICE_ID_AMD_LANCE 0x2000
584585
#define PCI_DEVICE_ID_AMD_LANCE_HOME 0x2001

0 commit comments

Comments
 (0)