[sane-devel] How to log transferred scsi data?

abel deuring a.deuring@satzbau-gmbh.de
Thu, 10 Oct 2002 23:52:53 +0200


Karsten Festag wrote:
> Hi everybody (especially the scsi-specialists),
> 
> I have the following problem: A user has an (so far unsupported) scsi-scanner. 
> He also has vmware running the original windows driver. So we want to log the 
> commands and data during a scan. We managed logging the commands with
> echo "scsi log mlqueue 5" > /proc/scsi/scsi. Now the question is: What to do 
> to get also the data that is transfered between scanner and computer?
> 
> Thanks for your ideas!

Well, I don't have real experience with kernel hacking -- but I'd start 
to add printk's in sg.c near the the calls to __copy_to_user and
__copy_from_user. As the names suggest, these function copy CDBs and 
data to / from user memory.

Abel