Re: [PATCH] dc395x: dynamically map scatter-gather for PIO (take 2)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

You could add a new function line unmap_flush() or an extra parameter, but 
that would just obfuscate things?

Thanks
Guennadi
---
Guennadi Liakhovetski
-
: 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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux