02.03.2014 Views

BSP Developer's Guide

BSP Developer's Guide

BSP Developer's Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

I<br />

Writing a SCSI-2 Device Driver<br />

For a better understanding, look at the advanced SCSI controller driver<br />

template and also examine an actual driver.<br />

scsiMsgOutComplete( )<br />

This routine performs post-processing after a SCSI message out has been sent.<br />

It is also invoked from the driver thread management routines.<br />

scsiMsgInComplete( )<br />

This routine performs post-processing after a SCSI message in is received. It is<br />

invoked from the driver thread management routines.<br />

scsiMsgOutReject( )<br />

This routine performs post-processing when an outgoing message has been<br />

rejected.<br />

scsiIdentMsgParse( )<br />

This routine parses an incoming identify message when VxWorks has been<br />

selected or reselected.<br />

scsiIdentMsgBuild( )<br />

This routine builds an identify message in the caller’s buffer.<br />

scsiCacheSnoopEnable( )<br />

This routine informs the library that hardware cache snooping is enabled and<br />

that it is unnecessary to call cache-specific routines.<br />

scsiCacheSnoopDisable( )<br />

This routine informs the library that hardware snooping has been disabled or<br />

does not exist and that the library must perform cache coherency.<br />

scsiCacheSynchronize( )<br />

This routine is called by the driver for all cache-coherency needs.<br />

scsiThreadInit( )<br />

This routine performs general thread initialization; it is invoked by the driver<br />

xxxThreadInit( ) routine.<br />

Example I-2 provides an advanced SCSI controller driver template and<br />

Example I-3 shows a SCSI I/O processor assembly language template. These<br />

examples show how such drivers may be structured. Many details are not<br />

included in the templates; these templates simply serve to provide a high-level<br />

picture of what is involved. Once the basic structure of the template is understood,<br />

examining an actual advanced controller driver will clarify the issues involved,<br />

especially thread management.<br />

I<br />

337

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!