From 3fb086126462c2de06dddaec58981d8827be100d Mon Sep 17 00:00:00 2001 From: Hannes Reinecke Date: Tue, 24 Jan 2006 10:44:38 +0100 Subject: [SCSI] aic79xx: SLOWCRC fix This patch introduces the SLOWCRC handling for certain buggy chipsets. Signed-off-by: James Bottomley --- drivers/scsi/aic7xxx/aic79xx_core.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'drivers/scsi/aic7xxx/aic79xx_core.c') diff --git a/drivers/scsi/aic7xxx/aic79xx_core.c b/drivers/scsi/aic7xxx/aic79xx_core.c index dfd4cc93c05..6114b3e72ca 100644 --- a/drivers/scsi/aic7xxx/aic79xx_core.c +++ b/drivers/scsi/aic7xxx/aic79xx_core.c @@ -3331,6 +3331,15 @@ ahd_update_neg_table(struct ahd_softc *ahd, struct ahd_devinfo *devinfo, if (tinfo->width == MSG_EXT_WDTR_BUS_16_BIT) con_opts |= WIDEXFER; + /* + * Slow down our CRC interval to be + * compatible with packetized U320 devices + * that can't handle a CRC at full speed + */ + if (ahd->features & AHD_AIC79XXB_SLOWCRC) { + con_opts |= ENSLOWCRC; + } + /* * During packetized transfers, the target will * give us the oportunity to send command packets @@ -6740,6 +6749,18 @@ ahd_chip_init(struct ahd_softc *ahd) ahd_loadseq(ahd); ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI); + + if (ahd->features & AHD_AIC79XXB_SLOWCRC) { + u_int negodat3 = ahd_inb(ahd, NEGCONOPTS); + + negodat3 |= ENSLOWCRC; + ahd_outb(ahd, NEGCONOPTS, negodat3); + negodat3 = ahd_inb(ahd, NEGCONOPTS); + if (!(negodat3 & ENSLOWCRC)) + printf("aic79xx: failed to set the SLOWCRC bit\n"); + else + printf("aic79xx: SLOWCRC bit set\n"); + } } /* -- cgit v1.2.3