On Sun, 2005-06-05 at 00:15 -0700, Mike Christie wrote: > +int scsi_execute_req(struct scsi_device *sdev, unsigned char *cmd, > + int data_direction, void *buffer, unsigned > bufflen, > + unsigned char *sense, int timeout, int retries) Actually, not quite; there are two problems with this 1. We may not be able to compute the command length for vendor specific commands and the group 3 (variable length command 0x7f). 2. some requests want to set other flags (REQ_FAILFAST mostly). However, extra arguments should accommodate these. This: > + if (!req) Should be if (IS_ERR(req)) Also, you can't do this (use after free): > + blk_put_request(req); > + return req->errors; Finally, there's coming up with a replacement API for scsi_do_req that returns via the end_io callback ... since that doesn't do a wait/wake, perhaps this should be the core API upon which the others are built? James - : 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