pc_nic_drv: implement pcie utility dummies

This commit is contained in:
Christian Helmuth 2023-10-12 12:06:35 +02:00
parent 3f80249204
commit eb2843de33
3 changed files with 26 additions and 51 deletions

View File

@ -151,13 +151,36 @@ int pci_read_config_word(const struct pci_dev *dev, int where, u16 *val)
}; };
printk("%s: unexpected read at %x\n", __func__, where); printk("%s: unexpected read at %x\n", __func__, where);
return -1; PCI_SET_ERROR_RESPONSE(val);;
return PCIBIOS_FUNC_NOT_SUPPORTED;
} }
int pcie_capability_read_word(struct pci_dev *dev, int pos, u16 *val) int pcie_capability_read_word(struct pci_dev *dev, int pos, u16 *val)
{ {
printk("%s: unexpected read at %x\n", __func__, pos); printk("%s: unsupported pos=%x\n", __func__, pos);
return -1; PCI_SET_ERROR_RESPONSE(val);;
return PCIBIOS_FUNC_NOT_SUPPORTED;
}
int pcie_capability_write_word(struct pci_dev * dev, int pos, u16 val)
{
printk("%s: unsupported pos=%x\n", __func__, pos);
return PCIBIOS_FUNC_NOT_SUPPORTED;
}
int pcie_capability_clear_and_set_word(struct pci_dev *dev, int pos, u16 clear, u16 set)
{
printk("%s: unsupported pos=%x\n", __func__, pos);
return PCIBIOS_FUNC_NOT_SUPPORTED;
}
int pcie_set_readrq(struct pci_dev * dev, int rq)
{
printk("%s: unsupported rq=%d\n", __func__, rq);
return pcibios_err_to_errno(PCIBIOS_FUNC_NOT_SUPPORTED);
} }

View File

@ -656,30 +656,6 @@ int pci_write_config_byte(const struct pci_dev * dev,int where,u8 val)
} }
#include <linux/pci.h>
int pcie_capability_clear_and_set_word(struct pci_dev * dev,int pos,u16 clear,u16 set)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/pci.h>
int pcie_capability_write_word(struct pci_dev * dev,int pos,u16 val)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/pci.h>
int pcie_set_readrq(struct pci_dev * dev,int rq)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/pci.h> #include <linux/pci.h>
int pcix_get_mmrbc(struct pci_dev * dev) int pcix_get_mmrbc(struct pci_dev * dev)

View File

@ -659,30 +659,6 @@ int pci_write_config_byte(const struct pci_dev * dev,int where,u8 val)
} }
#include <linux/pci.h>
int pcie_capability_clear_and_set_word(struct pci_dev * dev,int pos,u16 clear,u16 set)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/pci.h>
int pcie_capability_write_word(struct pci_dev * dev,int pos,u16 val)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/pci.h>
int pcie_set_readrq(struct pci_dev * dev,int rq)
{
lx_emul_trace_and_stop(__func__);
}
#include <linux/pci.h> #include <linux/pci.h>
int pcix_get_mmrbc(struct pci_dev * dev) int pcix_get_mmrbc(struct pci_dev * dev)