Sfoglia il codice sorgente

[dm][pci] fixup the shift of class in probe

Signed-off-by: GuEe-GUI <2991707448@qq.com>
GuEe-GUI 1 giorno fa
parent
commit
566e74af83
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  1. 2 0
      components/drivers/pci/probe.c

+ 2 - 0
components/drivers/pci/probe.c

@@ -342,6 +342,8 @@ rt_err_t rt_pci_setup_device(struct rt_pci_device *pdev)
     rt_dm_dev_set_name(&pdev->parent, "%04x:%02x:%02x.%u", rt_pci_domain(pdev),
             pdev->bus->number, RT_PCI_SLOT(pdev->devfn), RT_PCI_FUNC(pdev->devfn));
 
+    class = pdev->class >> 8;
+
     switch (pdev->hdr_type)
     {
     case PCIM_HDRTYPE_NORMAL: