On Thursday, July 26, 2007 11:09 AM, FUJITA Tomonori wrote: > For smp request/response, we use: > > request -> not used > response -> not used > dout_xferp -> pointer to a smp request frame > din_xferp -> pointer to a smp response frame > > > So we could use response field to send vendor's unique response to > user space. > > bsg wrongly assues the response field is used for sense buffer so the > maxium length is SCSI_SENSE_BUFFERSIZE, 96 bytes. I think that it's a > bit small for mpt's unique response. But, I'll fix the length > limitation bug soon. Well that's cool. It would be better the application had a description of failures, rather than returning a vague ENXIO. Looks like 7 bytes covers ioc_status(2 bytes), log_info (4 bytes), and sas_status(1 byte), or better yet, lets return the entire mf reply, which looks to be 28 bytes. It doesn't matter. However, I'm not sure how to copy smprep into sg_io_v4->response..I noticed that request frame is obtained from rsp->bio, and the reply frame is returned via rsp->bio. Any suggestions? Here is the reply message frame format, Let me know if you need any details on the those three fields. /* Serial Management Protocol Passthrough Reply */ typedef struct _MSG_SMP_PASSTHROUGH_REPLY { U8 PassthroughFlags; /* 00h */ U8 PhysicalPort; /* 01h */ U8 MsgLength; /* 02h */ U8 Function; /* 03h */ U16 ResponseDataLength; /* 04h */ U8 Reserved1; /* 06h */ U8 MsgFlags; /* 07h */ U32 MsgContext; /* 08h */ U8 Reserved2; /* 0Ch */ U8 SASStatus; /* 0Dh */ U16 IOCStatus; /* 0Eh */ U32 IOCLogInfo; /* 10h */ U32 Reserved3; /* 14h */ U8 ResponseData[4]; /* 18h */ } - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html