On Fri, Aug 13, 2004 at 03:08:45PM +0100, Matthew Wilcox wrote: > I think you're mistaken. The known bug in the DV scsi core was fixed > 9 weeks ago (according to Linus' bkweb). There's still at least one > other bug which Dann can replicate at will on one of his machines. > Last I heard, he was working on putting it outside the firewall for > James to look at.
scsi_transport_spi.c diff from 2.6.7 to 2.6.8-rc is below, the period thing did manifest itself as sym2 hang on boot. --- linux-2.6.7/drivers/scsi/scsi_transport_spi.c 2004-07-06 15:24:56.000000000 +0200 +++ linux-2.5/drivers/scsi/scsi_transport_spi.c 2004-06-25 14:23:50.000000000 +0200 @@ -152,7 +152,7 @@ spi_transport_store_function(field, format_string) \ static CLASS_DEVICE_ATTR(field, S_IRUGO | S_IWUSR, \ show_spi_transport_##field, \ - store_spi_transport_##field) + store_spi_transport_##field); /* The Parallel SCSI Tranport Attributes: */ spi_transport_rd_attr(offset, "%d\n"); @@ -173,7 +173,7 @@ spi_dv_device(sdev); return count; } -static CLASS_DEVICE_ATTR(revalidate, S_IWUSR, NULL, store_spi_revalidate) +static CLASS_DEVICE_ATTR(revalidate, S_IWUSR, NULL, store_spi_revalidate); /* Translate the period into ns according to the current spec * for SDTR/PPR messages */ @@ -390,10 +390,11 @@ { struct spi_internal *i = to_spi_internal(sreq->sr_host->transportt); struct scsi_device *sdev = sreq->sr_device; - int period, prevperiod = 0; + int period = 0, prevperiod = 0; for (;;) { + int newperiod; if (compare_fn(sreq, buffer, ptr, DV_LOOPS)) /* Successful DV */ break; @@ -401,7 +402,8 @@ /* OK, retrain, fallback */ if (i->f->get_period) i->f->get_period(sdev); - period = spi_period(sdev); + newperiod = spi_period(sdev); + period = newperiod > period ? newperiod : period; if (period < 0x0d) period++; else