Subject: How to enable direct IO of sg driver? To: yocto@lists.yoctoproject.org From: zackjtl@gmail.com X-Originating-Location: Hsinchu, TW (125.227.176.110) X-Originating-Platform: Windows Chrome 83 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Sun, 28 Jun 2020 20:15:51 -0700 Message-ID: Content-Type: multipart/alternative; boundary="kqrtFQY5llLc8Jadxg8C" --kqrtFQY5llLc8Jadxg8C Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable I'm using a Yocto image (a branch of 2.0 Jethro) on my wandboard (an ev-boa= rd of an iMX6 SoC) and I would like to write a C code to access the USB sto= rage device via sg driver. Since I need to access the logical blocks of the storage directly instead = of transferring through kernel buffer, I attempted to change the */proc/scs= i/sg/allow_dio* flag (which is on the pseudo file system) introduced by the= document Linux Version 3 SCSI Generic Driver ( http://sg.danny.cz/sg/s_pac= ket.html ) , but I can't find the folder */proc/scsi/sg* in the file system= . I think the *sg* module has been loaded on the running system because I ca= n operate to the USB storage with the indirect method (but that's not appro= priate to my demand). Is there a alternate way to enable the direct IO or could make /proc/scsi/= sg appears? Sincerely --kqrtFQY5llLc8Jadxg8C Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable

I'm using a Yocto image (a branch of 2.0 Jethro) on= my wandboard (an ev-board of an iMX6 SoC) and I would like to write a C co= de to access the USB storage device via sg driver.

Since I need to access the logical blocks of the s= torage directly instead of transferring through kernel buffer, I attempted = to change the /p= roc/scsi/sg/allow_dio flag (which is on the pseudo file = system) introduced by the document Linux Version 3 SCSI Generic Driver, but I can't find the folder /proc/scsi/sg in the file system.

I think the sg module has been loaded on the ru= nning system because I can operate to the USB storage with the indirect met= hod (but that's not appropriate to my demand).

Is there a alternate= way to enable the direct IO or could make /proc/scsi/sg appears?

Sincerely<= /span>

--kqrtFQY5llLc8Jadxg8C--