<div dir="ltr"><div>Hi,</div><div><br></div><div>I&#39;m trying to make a special block request at the scsi high-level device driver (scsi_lib.c).</div><div><br></div><div>My target device is SATA block storage, and SATA block stroage typically use scsi_lib.c as a high-level device driver.</div><div><br></div>This block request is simple write request similar to typical block request from file system, but doesn&#39;t pass through VFS and file system layer.<div><br></div><div>From the linux kernel source, I found two keywords to solve this problem, 1) REQ_TYPE_BLOCK_PC, and 2) blk_make_request()</div><div><br></div><div>So, I make a request like this procedure,</div><div><br></div><div>bio malloc -&gt; map data into bio using bio_add_pc_page (more than 2 pages) -&gt; get request structure using blk_make_request(q, bio, GFP_KERNEL) -&gt; setup request-&gt;cmd similar to sd_setup_read_write_cmnd() on sd.c (driver/scsi)</div><div><br></div><div>But am I right?  because I got some error on the SATA like this, </div><div><br></div><div>ata4.00: exception Emask 0x70 SAct 0x1e0 SErr 0x400900 action 0x6 frozen</div><div>ata4.00: irq_stat 0x28000000, host bus error, interface fatal error</div><div>ata4: SError: UnrecovData HostInt Handshk</div><div>ata4.00: failed command: WRITE FPDMA QUEUED</div><div>ata4.00: cmd61/10:28:00:00:c0/00:00:0d:00:00/40 tag 5 ncq 8192 out</div><div>              res 40/00:30:00:00:bf/00:00:0d:00:00/40 Emask 0x70 (host bus error)</div><div>ata4.00: status: {DRDY} ...</div><div><br></div><div>Anyone who has knowledge for make block request inside device driver? or, solution for the error message?</div><div><br></div><div>Thnks,</div><div><br></div><div>-Hyukoong, Kim</div><div><br></div><div><div><div class="gmail_signature"><div dir="ltr"><div><div><u>                                                                                  </u></div><div>김 혁 중</div><div>성균관대학교 IT 융합학과 박사과정</div><div>임베디드 소프트웨어 연구실</div><div><br></div><div> </div><div>Kim, Hyukjoong</div><div>Sungkyunkwan University</div><div>Ph.D Course in Computer Engineering, IT Convergence </div><div>Embedded Software Lab.</div><div> </div><div>e-mail : <a href="mailto:wangmir@skku.edu" target="_blank">wangmir@skku.edu</a> / <a href="mailto:wangmir@gmail.com" target="_blank">wangmir@gmail.com</a> </div><div>phone : +82 10-9489-8974</div><div> </div><div><u>                                                                                  </u></div></div></div></div></div>
</div></div>