aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sym53c8xx_2/sym_hipd.c
diff options
context:
space:
mode:
authorLinas Vepstas <linas@austin.ibm.com>2007-10-05 15:55:04 -0400
committerJames Bottomley <jejb@mulgrave.localdomain>2007-10-23 15:10:20 -0400
commitd68cd75992f95d6977956fb227f02e6d532f3d26 (patch)
treeeb28d218817bb9c893220191ad9a7a90ef474861 /drivers/scsi/sym53c8xx_2/sym_hipd.c
parent2ba65367720d871f9d955ca3ef96358999182765 (diff)
[SCSI] sym53c8xx: PCI Error Recovery support
This patch adds the PCI error recovery callbacks to the Symbios SCSI device driver. It includes support for First Failure Data Capture. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Assorted changes to initial patches, including returning IRQ_NONE from the interrupt handler if the device is offline and re-using the eh_done completion in the scsi error handler. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/sym53c8xx_2/sym_hipd.c')
-rw-r--r--drivers/scsi/sym53c8xx_2/sym_hipd.c25
1 files changed, 21 insertions, 4 deletions
diff --git a/drivers/scsi/sym53c8xx_2/sym_hipd.c b/drivers/scsi/sym53c8xx_2/sym_hipd.c
index 21cd4c7f5289..af24c447b195 100644
--- a/drivers/scsi/sym53c8xx_2/sym_hipd.c
+++ b/drivers/scsi/sym53c8xx_2/sym_hipd.c
@@ -1180,10 +1180,10 @@ static void sym_log_hard_error(struct sym_hcb *np, u_short sist, u_char dstat)
1180 scr_to_cpu((int) *(u32 *)(script_base + script_ofs))); 1180 scr_to_cpu((int) *(u32 *)(script_base + script_ofs)));
1181 } 1181 }
1182 1182
1183 printf ("%s: regdump:", sym_name(np)); 1183 printf("%s: regdump:", sym_name(np));
1184 for (i=0; i<24;i++) 1184 for (i = 0; i < 24; i++)
1185 printf (" %02x", (unsigned)INB_OFF(np, i)); 1185 printf(" %02x", (unsigned)INB_OFF(np, i));
1186 printf (".\n"); 1186 printf(".\n");
1187 1187
1188 /* 1188 /*
1189 * PCI BUS error. 1189 * PCI BUS error.
@@ -1192,6 +1192,16 @@ static void sym_log_hard_error(struct sym_hcb *np, u_short sist, u_char dstat)
1192 sym_log_bus_error(np); 1192 sym_log_bus_error(np);
1193} 1193}
1194 1194
1195void sym_dump_registers(struct sym_hcb *np)
1196{
1197 u_short sist;
1198 u_char dstat;
1199
1200 sist = INW(np, nc_sist);
1201 dstat = INB(np, nc_dstat);
1202 sym_log_hard_error(np, sist, dstat);
1203}
1204
1195static struct sym_chip sym_dev_table[] = { 1205static struct sym_chip sym_dev_table[] = {
1196 {PCI_DEVICE_ID_NCR_53C810, 0x0f, "810", 4, 8, 4, 64, 1206 {PCI_DEVICE_ID_NCR_53C810, 0x0f, "810", 4, 8, 4, 64,
1197 FE_ERL} 1207 FE_ERL}
@@ -2809,6 +2819,13 @@ void sym_interrupt (struct sym_hcb *np)
2809 dstat |= INB(np, nc_dstat); 2819 dstat |= INB(np, nc_dstat);
2810 istatc = INB(np, nc_istat); 2820 istatc = INB(np, nc_istat);
2811 istat |= istatc; 2821 istat |= istatc;
2822
2823 /* Prevent deadlock waiting on a condition that may
2824 * never clear. */
2825 if (unlikely(sist == 0xffff && dstat == 0xff)) {
2826 if (pci_channel_offline(np->s.device))
2827 return;
2828 }
2812 } while (istatc & (SIP|DIP)); 2829 } while (istatc & (SIP|DIP));
2813 2830
2814 if (DEBUG_FLAGS & DEBUG_TINY) 2831 if (DEBUG_FLAGS & DEBUG_TINY)