lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-id: <52936.12.35.250.145.1236690677.squirrel@www.rottinger.net>
Date:	Tue, 10 Mar 2009 09:11:17 -0400 (EDT)
From:	Steve Rottinger <steve@...tinger.net>
To:	Jiri Slaby <jirislaby@...il.com>
Cc:	Steve Rottinger <steve@....rottinger.net>,
	linux-kernel@...r.kernel.org
Subject: Re: Direct transfer between SCSI and PCI

The SCSI device would use it's DMA controller to copy the data, just as it
would if the buffer was in the processor's RAM.  If I understand
correctly, if I open up the SCSI device using the O_DIRECT option, the
driver will DMA directly to/from the user buffer specified by the
write()/read() functions. Instead, of that buffer being an address
pointing to the processors RAM, I would like that buffer to point to the
PCI address of the buffer on my PCI device. Currently, when I try this on
an mmapped buffer to my PCI device, the write() routine returns a "Bad
address" error.

-Steve


> On 9.3.2009 14:29, Steve Rottinger wrote:
>>As part
>> of my project, I need to be able to directly transfer data from a large
>> buffer that resides on
>> a custom PCI communications device to a SCSI disk without going through
>> the CPU's main
>> memory.  Initially, it seemed like opening up the raw SCSI device in
>> O_DIRECT mode would
>> be the perfect solution.  However, through some experimentation, and
>> reading some posts from
>> a few years back, it appears that O_DIRECT only works on buffer's that
>> reside in processor's
>> main memory.   Does anyone have any suggestions as to how to get this to
>> work?
>
> How would you want your scsi device to get the data? I suppose they are
> stored somewhere on the PCI device memory connected to its local bus or
> alike. At best it can be visible as a PCI bar but I doubt it is. As you
> described it here, there is no way, how would the SCSI device see the
> data.
>
> Or do you want to move the data from the PCI device via DMA implemented
> in it directly to the SCSI device? How would you do this? I guess SCSI
> devices do standard S/G DMA so that they read data from host memory by
> themselves.
>
> Maybe if you elaborate on what exactly do you mean by the idea?
>


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ