from scsi_ioctl_send_command() for default case... */ scsi_wait_req(sreq, scsi_cmd, NULL, 0, (10*HZ), 5);  if (sreq->sr_result) { 
from scsi_ioctl_send_command() for default case... */ if (scsi_execute_req(scsidev, scsi_cmd, DMA_NONE, NULL, 0, &sshdr, (10*HZ), 5)) 
int ata_task_ioctl(struct scsi_device *scsidev, void __user *arg){	int rc = 0;	u8 scsi_cmd[MAX_COMMAND_SIZE];	u8 args[7];	struct scsi_request *sreq;	if (NULL == (void *)arg)		return -EINVAL;	if (copy_from_user(args, arg, sizeof(args)))		return -EFAULT;	memset(scsi_cmd, 0, sizeof(scsi_cmd));	scsi_cmd[0]  = ATA_16;	scsi_cmd[1]  = (3 << 1); /* Non-data */	/* scsi_cmd[2] is already 0 -- no off.line, cc, or data xfer */	scsi_cmd[4]  = args[1];	scsi_cmd[6]  = args[2];	scsi_cmd[8]  = args[3];	scsi_cmd[10] = args[4];	scsi_cmd[12] = args[5];	scsi_cmd[14] = args[0];	sreq = scsi_allocate_request(scsidev, GFP_KERNEL);	if (!sreq) {		rc = -EINTR;		goto error;	}	sreq->sr_data_direction = DMA_NONE;	/* Good values for timeout and retries?  Values below	   from scsi_ioctl_send_command() for default case... */	scsi_wait_req(sreq, scsi_cmd, NULL, 0, (10*HZ), 5);	if (sreq->sr_result) {		rc = -EIO;		goto error;	}	/* Need code to retrieve data from check condition? */error:	scsi_release_request(sreq);	return rc;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/85837ebdd7bb3e96a60e9b4c6af6c60d1273bc67/libata-scsi.c/buggy/drivers/scsi/libata-scsi.c