On Wed, 13 May 2009, Madhukar G wrote: > Hi All, > > I'm developing a usb storage driver for a custom device which is under > production. As the device is yet to be ready I thought of writing a > simulator which acts a device. Your description has too few details and is too unclear to be understandable. > I'm using drivers/usb/storage as the driver, but inorder to initiate > SCSI commands i plugged in a Mass Storage Device (some other > manufacturer). The storage driver gets the command and i'm submitting > this URB What URB? A command isn't the same thing as an URB. > to simulator instead of usbcore by modifying the storage > driver. The simulator does not process anything but assign srb->result > with SAM_STAT_GOOD If the simulator gets nothing but an URB, how does it manage to change srb->result? Does your URB somehow include a pointer to srb? > and returns back to storage driver. At this point i > get command_abort status. What does that mean? You just said the status was set to SAM_STAT_GOOD. > My question is what would I need to do in simulator so that SCSI layer > starts sending SCSI commands one after the other. Do i need to fill > any of other members of scsi_cmnd structure in simulator so that it > can send next command. Your questions are still unclear. Have you looked at drivers/usb/gadget/file_storage.c? It seems like a much better place to start writing a device simulator. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html