On 11/21/2014 11:10 AM, Paolo Bonzini wrote: > > > On 21/11/2014 10:27, Hannes Reinecke wrote: >> The am53c974 has an design issue where a single byte might be >> left in the SCSI FIFO after a DMA transfer. >> As the handling code is currently untested add a WARN_ON() >> statement here. >> >> Signed-off-by: Hannes Reinecke <hare@xxxxxxx> >> --- >> drivers/scsi/am53c974.c | 6 ++++++ >> drivers/scsi/esp_scsi.c | 29 +++++++++++++++++++++++++++++ >> drivers/scsi/esp_scsi.h | 1 + >> 3 files changed, 36 insertions(+) >> >> diff --git a/drivers/scsi/am53c974.c b/drivers/scsi/am53c974.c >> index 652762e..0b7643e 100644 >> --- a/drivers/scsi/am53c974.c >> +++ b/drivers/scsi/am53c974.c >> @@ -195,6 +195,12 @@ static void pci_esp_dma_drain(struct esp *esp) >> shost_printk(KERN_INFO, esp->host, >> "DMA blast done (%d tries, %d bytes left)\n", lim, resid); >> #endif >> + /* BLAST residual handling is currently untested */ >> + if (WARN_ON(resid == 1)) { > > WARN_ON_ONCE? > I have not seen it once so far, so I doubt it's a common case. But yeah, WARN_ON_ONCE is probably better. Cheers, Hannes -- Dr. Hannes Reinecke zSeries & Storage hare@xxxxxxx +49 911 74053 688 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: J. Hawn, J. Guild, F. Imendörffer, HRB 21284 (AG Nürnberg) -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html