| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-or-later */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * c 2001 PPC 64 Team, IBM Corp |
|---|
| 3 | | - * |
|---|
| 4 | | - * This program is free software; you can redistribute it and/or |
|---|
| 5 | | - * modify it under the terms of the GNU General Public License |
|---|
| 6 | | - * as published by the Free Software Foundation; either version |
|---|
| 7 | | - * 2 of the License, or (at your option) any later version. |
|---|
| 8 | 4 | */ |
|---|
| 9 | 5 | #ifndef _ASM_POWERPC_PPC_PCI_H |
|---|
| 10 | 6 | #define _ASM_POWERPC_PPC_PCI_H |
|---|
| .. | .. |
|---|
| 53 | 49 | struct eeh_dev *eeh_addr_cache_get_dev(unsigned long addr); |
|---|
| 54 | 50 | void eeh_slot_error_detail(struct eeh_pe *pe, int severity); |
|---|
| 55 | 51 | int eeh_pci_enable(struct eeh_pe *pe, int function); |
|---|
| 56 | | -int eeh_pe_reset_full(struct eeh_pe *pe); |
|---|
| 52 | +int eeh_pe_reset_full(struct eeh_pe *pe, bool include_passed); |
|---|
| 57 | 53 | void eeh_save_bars(struct eeh_dev *edev); |
|---|
| 58 | 54 | int rtas_write_config(struct pci_dn *, int where, int size, u32 val); |
|---|
| 59 | 55 | int rtas_read_config(struct pci_dn *, int where, int size, u32 *val); |
|---|
| 60 | 56 | void eeh_pe_state_mark(struct eeh_pe *pe, int state); |
|---|
| 61 | | -void eeh_pe_state_clear(struct eeh_pe *pe, int state); |
|---|
| 57 | +void eeh_pe_mark_isolated(struct eeh_pe *pe); |
|---|
| 58 | +void eeh_pe_state_clear(struct eeh_pe *pe, int state, bool include_passed); |
|---|
| 62 | 59 | void eeh_pe_state_mark_with_cfg(struct eeh_pe *pe, int state); |
|---|
| 63 | 60 | void eeh_pe_dev_mode_mark(struct eeh_pe *pe, int mode); |
|---|
| 64 | 61 | |
|---|
| 65 | 62 | void eeh_sysfs_add_device(struct pci_dev *pdev); |
|---|
| 66 | 63 | void eeh_sysfs_remove_device(struct pci_dev *pdev); |
|---|
| 67 | | - |
|---|
| 68 | | -static inline const char *eeh_pci_name(struct pci_dev *pdev) |
|---|
| 69 | | -{ |
|---|
| 70 | | - return pdev ? pci_name(pdev) : "<null>"; |
|---|
| 71 | | -} |
|---|
| 72 | 64 | |
|---|
| 73 | 65 | static inline const char *eeh_driver_name(struct pci_dev *pdev) |
|---|
| 74 | 66 | { |
|---|
| .. | .. |
|---|
| 77 | 69 | |
|---|
| 78 | 70 | #endif /* CONFIG_EEH */ |
|---|
| 79 | 71 | |
|---|
| 72 | +#define PCI_BUSNO(bdfn) ((bdfn >> 8) & 0xff) |
|---|
| 73 | + |
|---|
| 80 | 74 | #else /* CONFIG_PCI */ |
|---|
| 81 | 75 | static inline void init_pci_config_tokens(void) { } |
|---|
| 82 | 76 | #endif /* !CONFIG_PCI */ |
|---|