Lines Matching refs:command
103 #define USBAT_ATA_CMD 0x17 /* device command (W) */
196 * Convenience function to produce an ATA read/write sectors command
287 * Some USBAT-specific commands can only be executed over a command transport
347 unsigned char *command = us->iobuf;
349 command[0] = 0x40;
350 command[1] = USBAT_CMD_SET_FEAT;
356 command[2] = epp_control;
364 command[3] = external_trigger;
371 command[4] = test_pattern;
375 * in the read/write command.
377 command[5] = mask_byte;
385 command[6] = subcountL;
386 command[7] = subcountH;
388 return usbat_execute_command(us, command, 8);
450 unsigned char *command = us->iobuf;
455 command[0] = 0xC0;
456 command[1] = USBAT_ATA | USBAT_CMD_READ_BLOCK;
457 command[2] = USBAT_ATA_DATA;
458 command[3] = 0;
459 command[4] = 0;
460 command[5] = 0;
461 command[6] = LSB_of(len);
462 command[7] = MSB_of(len);
464 result = usbat_execute_command(us, command, 8);
484 unsigned char *command = us->iobuf;
489 command[0] = 0x40;
490 command[1] = access | USBAT_CMD_WRITE_BLOCK;
491 command[2] = USBAT_ATA_DATA;
492 command[3] = 0;
493 command[4] = 0;
494 command[5] = 0;
495 command[6] = LSB_of(len);
496 command[7] = MSB_of(len);
498 result = usbat_execute_command(us, command, 8);
532 unsigned char *command = us->iobuf;
543 * The first time we send the full command, which consists
544 * of downloading the SCSI command followed by downloading
546 * send the command to download the data -- the SCSI command
561 command[0] = 0x40;
562 command[1] = access | USBAT_CMD_WRITE_REGS;
563 command[2] = 0x07;
564 command[3] = 0x17;
565 command[4] = 0xFC;
566 command[5] = 0xE7;
567 command[6] = LSB_of(num_registers*2);
568 command[7] = MSB_of(num_registers*2);
573 command[cmdlen-8] = (direction==DMA_TO_DEVICE ? 0x40 : 0xC0);
574 command[cmdlen-7] = access |
577 command[cmdlen-6] = data_reg;
578 command[cmdlen-5] = status_reg;
579 command[cmdlen-4] = timeout;
580 command[cmdlen-3] = qualifier;
581 command[cmdlen-2] = LSB_of(len);
582 command[cmdlen-1] = MSB_of(len);
584 result = usbat_execute_command(us, command, cmdlen);
607 * the bulk download -- but not the SCSI command because
608 * in some sense the SCSI command is still 'active' and
612 * Note that a stall for the test-and-read/write command means
684 unsigned char *command = us->iobuf;
689 command[0] = 0x40;
690 command[1] = USBAT_ATA | USBAT_CMD_WRITE_REGS;
693 command[2] = 0;
694 command[3] = 0;
695 command[4] = 0;
696 command[5] = 0;
699 command[6] = LSB_of(num_registers*2);
700 command[7] = MSB_of(num_registers*2);
702 /* The setup command */
703 result = usbat_execute_command(us, command, 8);
730 * The read will start when the condition is met, otherwise the command aborts.
742 unsigned char *command = us->iobuf;
744 command[0] = 0xC0;
745 command[1] = USBAT_ATA | USBAT_CMD_COND_READ_BLOCK;
746 command[2] = USBAT_ATA_DATA;
747 command[3] = USBAT_ATA_STATUS;
748 command[4] = 0xFD; /* Timeout (ms); */
749 command[5] = USBAT_QUAL_FCQ;
750 command[6] = LSB_of(len);
751 command[7] = MSB_of(len);
753 /* Multiple block read setup command */
754 result = usbat_execute_command(us, command, 8);
772 * The read will start when the condition is met, otherwise the command aborts.
784 unsigned char *command = us->iobuf;
786 command[0] = 0x40;
787 command[1] = USBAT_ATA | USBAT_CMD_COND_WRITE_BLOCK;
788 command[2] = USBAT_ATA_DATA;
789 command[3] = USBAT_ATA_STATUS;
790 command[4] = 0xFD; /* Timeout (ms) */
791 command[5] = USBAT_QUAL_FCQ;
792 command[6] = LSB_of(len);
793 command[7] = MSB_of(len);
795 /* Multiple block write setup command */
796 result = usbat_execute_command(us, command, 8);
992 * execute the IDENTIFY PACKET DEVICE command. On ATA devices (i.e. flash
993 * readers), this command should fail with error. On ATAPI devices (i.e.
1004 /* Check for error bit, or if the command 'fell through' */
1059 unsigned char command[3] = { 0x01, 0xA0, 0xEC };
1071 /* ATA command : IDENTIFY DEVICE */
1072 rc = usbat_multiple_write(us, registers, command, 3);
1121 unsigned char command[7];
1164 /* ATA command 0x20 (READ SECTORS) */
1165 usbat_pack_ata_sector_cmd(command, thistime, sector, 0x20);
1167 /* Write/execute ATA read command */
1168 result = usbat_multiple_write(us, registers, command, 7);
1212 unsigned char command[7];
1259 /* ATA command 0x30 (WRITE SECTORS) */
1260 usbat_pack_ata_sector_cmd(command, thistime, sector, 0x30);
1262 /* Write/execute ATA write command */
1263 result = usbat_multiple_write(us, registers, command, 7);
1285 * Squeeze a potentially huge (> 65535 byte) read10 command into
1317 * a single read command (max is 64k-1), we will perform
1362 /* Fix up the SCSI command sector and num sectors */
1364 data[7+2] = MSB_of(sector>>16); /* SCSI command sector */
1370 data[7+7] = MSB_of(len / srb->transfersize); /* SCSI command */
1582 data[6] = 0xA0; /* (command) = ATA PACKET COMMAND */
1632 * Write the 12-byte command header.
1634 * If the command is BLANK then set the timer for 75 minutes.
1813 usb_stor_dbg(us, "Gah! Unknown command: %d (0x%x)\n",