aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla4xxx/ql4_def.h
diff options
context:
space:
mode:
authorLalit Chandivade <lalit.chandivade@qlogic.com>2010-07-30 05:08:47 -0400
committerJames Bottomley <James.Bottomley@suse.de>2010-08-06 13:00:40 -0400
commit2232be0d5707cd331b92027c0fd7ea5e843c2121 (patch)
treeb391f987edc2ede2924bf2963beab4bc9f2eff26 /drivers/scsi/qla4xxx/ql4_def.h
parent21033639699d883668f6937b03e7b710771ad37e (diff)
[SCSI] qla4xxx: Added AER support for ISP82xx
Added support for PCI error handling Signed-off-by: Lalit Chandivade <lalit.chandivade@qlogic.com> Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: Poornima Vonti <poornima.vonti@qlogic.com> Signed-off-by: Ravi Anand <ravi.anand@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/qla4xxx/ql4_def.h')
-rw-r--r--drivers/scsi/qla4xxx/ql4_def.h30
1 files changed, 29 insertions, 1 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_def.h b/drivers/scsi/qla4xxx/ql4_def.h
index 6c9262753243..9dc0a6616edd 100644
--- a/drivers/scsi/qla4xxx/ql4_def.h
+++ b/drivers/scsi/qla4xxx/ql4_def.h
@@ -36,6 +36,24 @@
36#include "ql4_dbg.h" 36#include "ql4_dbg.h"
37#include "ql4_nx.h" 37#include "ql4_nx.h"
38 38
39#if defined(CONFIG_PCIEAER)
40#include <linux/aer.h>
41#else
42/* AER releated */
43static inline int pci_enable_pcie_error_reporting(struct pci_dev *dev)
44{
45 return -EINVAL;
46}
47static inline int pci_disable_pcie_error_reporting(struct pci_dev *dev)
48{
49 return -EINVAL;
50}
51static inline int pci_cleanup_aer_uncorrect_error_status(struct pci_dev *dev)
52{
53 return -EINVAL;
54}
55#endif
56
39#ifndef PCI_DEVICE_ID_QLOGIC_ISP4010 57#ifndef PCI_DEVICE_ID_QLOGIC_ISP4010
40#define PCI_DEVICE_ID_QLOGIC_ISP4010 0x4010 58#define PCI_DEVICE_ID_QLOGIC_ISP4010 0x4010
41#endif 59#endif
@@ -381,7 +399,8 @@ struct scsi_qla_host {
381#define AF_MSIX_ENABLED 17 /* 0x00020000 */ 399#define AF_MSIX_ENABLED 17 /* 0x00020000 */
382#define AF_MBOX_COMMAND_NOPOLL 18 /* 0x00040000 */ 400#define AF_MBOX_COMMAND_NOPOLL 18 /* 0x00040000 */
383#define AF_FW_RECOVERY 19 /* 0x00080000 */ 401#define AF_FW_RECOVERY 19 /* 0x00080000 */
384 402#define AF_EEH_BUSY 20 /* 0x00100000 */
403#define AF_PCI_CHANNEL_IO_PERM_FAILURE 21 /* 0x00200000 */
385 404
386 unsigned long dpc_flags; 405 unsigned long dpc_flags;
387 406
@@ -617,6 +636,15 @@ static inline int is_qla8022(struct scsi_qla_host *ha)
617 return ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP8022; 636 return ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP8022;
618} 637}
619 638
639/* Note: Currently AER/EEH is now supported only for 8022 cards
640 * This function needs to be updated when AER/EEH is enabled
641 * for other cards.
642 */
643static inline int is_aer_supported(struct scsi_qla_host *ha)
644{
645 return ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP8022;
646}
647
620static inline int adapter_up(struct scsi_qla_host *ha) 648static inline int adapter_up(struct scsi_qla_host *ha)
621{ 649{
622 return (test_bit(AF_ONLINE, &ha->flags) != 0) && 650 return (test_bit(AF_ONLINE, &ha->flags) != 0) &&