On Sat, 22 Apr 2006 21:41:53 +0200 (CEST) Guennadi Liakhovetski wrote: > On Fri, 21 Apr 2006, Randy.Dunlap wrote: > > > On Fri, 21 Apr 2006 23:00:14 +0200 (CEST) Guennadi Liakhovetski wrote: > > > > > diff -ur a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c > > > --- a/drivers/scsi/dc395x.c 2006-04-20 00:42:12.000000000 +0200 > > > +++ b/drivers/scsi/dc395x.c 2006-04-20 00:41:58.000000000 +0200 > > > @@ -2343,6 +2343,7 @@ > > > } > > > > > > if (srb->cmd->use_sg) { > > > + flush_kernel_dcache_page(kmap_atomic_to_page(base)); > > > scsi_kunmap_atomic_sg(base); > > > local_irq_restore(flags); > > > } > > > - > > > > Looks right to me, but why not have scsi_kunmap_atomic_sg() do that > > instead of every caller having to do it? Is there some good reason > > not to do that? > > I wouldn't do it for a couple of reasons: > > 1. kmap_atomic / kunmap_atomic pair doesn't do that > > 2. You only need it if you write to the newly-mapped page. Not if you read > from it. That's a very good reason. > You could add a new function line unmap_flush() or an extra parameter, but > that would just obfuscate things? Yes. --- ~Randy - : 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