Changeset 629 for GPL/branches/uniaud32-next/lib32/pci.c
- Timestamp:
- Jan 4, 2021, 10:15:17 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/branches/uniaud32-next/lib32/pci.c
r621 r629 1133 1133 #endif 1134 1134 1135 /** 1136 * pci_status_get_and_clear_errors - return and clear error bits in PCI_STATUS 1137 * @pdev: the PCI device 1138 * 1139 * Returns error bits set in PCI_STATUS and clears them. 1140 */ 1141 int pci_status_get_and_clear_errors(struct pci_dev *pdev) 1142 { 1143 u16 status; 1144 int ret; 1145 1146 ret = pci_read_config_word(pdev, PCI_STATUS, &status); 1147 if (ret != PCIBIOS_SUCCESSFUL) 1148 return -EIO; 1149 1150 status &= PCI_STATUS_ERROR_BITS; 1151 if (status) 1152 pci_write_config_word(pdev, PCI_STATUS, status); 1153 1154 return status; 1155 } 1156
Note:
See TracChangeset
for help on using the changeset viewer.