Re: Return of PENDING status to SCSI driver

Alan Stern
2009-06-16T15:22:20Z

On Tue, 16 Jun 2009, Ramya Desai wrote:

> static int queuecommand(struct scsi_cmnd *srb,
> void (*done)(struct scsi_cmnd *))
> {
> int res = 0;
> struct uas_task *task;
> struct us_data *us = host_to_us(srb->device->host);
>
> US_DEBUG(usb_stor_show_command(srb));
>
> /* check for state-transition errors */
> if (us->srb != NULL) {

This test is your problem. It will succeed as soon as you have
accepted one command. You need to remove it.

Alan Stern