eeh_event.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * eeh_event.h
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation; either version 2 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program; if not, write to the Free Software
  16. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  17. *
  18. * Copyright (c) 2005 Linas Vepstas <linas@linas.org>
  19. */
  20. #ifndef ASM_POWERPC_EEH_EVENT_H
  21. #define ASM_POWERPC_EEH_EVENT_H
  22. #ifdef __KERNEL__
  23. /** EEH event -- structure holding pci controller data that describes
  24. * a change in the isolation status of a PCI slot. A pointer
  25. * to this struct is passed as the data pointer in a notify callback.
  26. */
  27. struct eeh_event {
  28. struct list_head list;
  29. struct device_node *dn; /* struct device node */
  30. struct pci_dev *dev; /* affected device */
  31. };
  32. /**
  33. * eeh_send_failure_event - generate a PCI error event
  34. * @dev pci device
  35. *
  36. * This routine builds a PCI error event which will be delivered
  37. * to all listeners on the eeh_notifier_chain.
  38. *
  39. * This routine can be called within an interrupt context;
  40. * the actual event will be delivered in a normal context
  41. * (from a workqueue).
  42. */
  43. int eeh_send_failure_event (struct device_node *dn,
  44. struct pci_dev *dev);
  45. /* Main recovery function */
  46. struct pci_dn * handle_eeh_events (struct eeh_event *);
  47. #endif /* __KERNEL__ */
  48. #endif /* ASM_POWERPC_EEH_EVENT_H */