Lines Matching refs:cmnd
257 u8 cmnd[MAX_COMMAND_SIZE]; member
621 if (common->cmnd[0] == READ_6) in do_read()
622 lba = get_unaligned_be24(&common->cmnd[1]); in do_read()
624 if (common->cmnd[0] == READ_16) in do_read()
625 lba = get_unaligned_be64(&common->cmnd[2]); in do_read()
627 lba = get_unaligned_be32(&common->cmnd[2]); in do_read()
634 if ((common->cmnd[1] & ~0x18) != 0) { in do_read()
761 if (common->cmnd[0] == WRITE_6) in do_write()
762 lba = get_unaligned_be24(&common->cmnd[1]); in do_write()
764 if (common->cmnd[0] == WRITE_16) in do_write()
765 lba = get_unaligned_be64(&common->cmnd[2]); in do_write()
767 lba = get_unaligned_be32(&common->cmnd[2]); in do_write()
775 if (common->cmnd[1] & ~0x18) { in do_write()
779 if (!curlun->nofua && (common->cmnd[1] & 0x08)) { /* FUA */ in do_write()
967 lba = get_unaligned_be32(&common->cmnd[2]); in do_verify()
977 if (common->cmnd[1] & ~0x10) { in do_verify()
982 verification_length = get_unaligned_be16(&common->cmnd[7]); in do_verify()
1139 u32 lba = get_unaligned_be32(&common->cmnd[2]); in do_read_capacity()
1140 int pmi = common->cmnd[8]; in do_read_capacity()
1162 u64 lba = get_unaligned_be64(&common->cmnd[2]); in do_read_capacity_16()
1163 int pmi = common->cmnd[14]; in do_read_capacity_16()
1184 int msf = common->cmnd[1] & 0x02; in do_read_header()
1185 u32 lba = get_unaligned_be32(&common->cmnd[2]); in do_read_header()
1188 if (common->cmnd[1] & ~0x02) { /* Mask away MSF */ in do_read_header()
1206 int msf = common->cmnd[1] & 0x02; in do_read_toc()
1207 int start_track = common->cmnd[6]; in do_read_toc()
1212 format = common->cmnd[2] & 0xf; in do_read_toc()
1214 if ((common->cmnd[1] & ~0x02) != 0 || /* Mask away MSF */ in do_read_toc()
1226 format = (common->cmnd[9] >> 6) & 0x3; in do_read_toc()
1280 int mscmnd = common->cmnd[0]; in do_mode_sense()
1288 if ((common->cmnd[1] & ~0x08) != 0) { /* Mask away DBD */ in do_mode_sense()
1292 pc = common->cmnd[2] >> 6; in do_mode_sense()
1293 page_code = common->cmnd[2] & 0x3f; in do_mode_sense()
1373 } else if ((common->cmnd[1] & ~0x01) != 0 || /* Mask away Immed */ in do_start_stop()
1374 (common->cmnd[4] & ~0x03) != 0) { /* Mask LoEj, Start */ in do_start_stop()
1379 loej = common->cmnd[4] & 0x02; in do_start_stop()
1380 start = common->cmnd[4] & 0x01; in do_start_stop()
1425 prevent = common->cmnd[4] & 0x01; in do_prevent_allow()
1426 if ((common->cmnd[4] & ~0x01) != 0) { /* Mask away Prevent */ in do_prevent_allow()
1728 unsigned int lun = common->cmnd[1] >> 5; in check_command()
1800 if (common->cmnd[0] != REQUEST_SENSE) { in check_command()
1812 if (common->cmnd[0] != INQUIRY && in check_command()
1813 common->cmnd[0] != REQUEST_SENSE) { in check_command()
1824 common->cmnd[0] != INQUIRY && in check_command()
1825 common->cmnd[0] != REQUEST_SENSE) { in check_command()
1832 common->cmnd[1] &= 0x1f; /* Mask away the LUN */ in check_command()
1834 if (common->cmnd[i] && !(mask & (1 << i))) { in check_command()
1883 switch (common->cmnd[0]) { in do_scsi_command()
1886 common->data_size_from_cmnd = common->cmnd[4]; in do_scsi_command()
1895 common->data_size_from_cmnd = common->cmnd[4]; in do_scsi_command()
1905 get_unaligned_be16(&common->cmnd[7]); in do_scsi_command()
1914 common->data_size_from_cmnd = common->cmnd[4]; in do_scsi_command()
1924 get_unaligned_be16(&common->cmnd[7]); in do_scsi_command()
1942 i = common->cmnd[4]; in do_scsi_command()
1954 get_unaligned_be16(&common->cmnd[7]); in do_scsi_command()
1965 get_unaligned_be32(&common->cmnd[6]); in do_scsi_command()
1976 get_unaligned_be32(&common->cmnd[10]); in do_scsi_command()
1998 get_unaligned_be16(&common->cmnd[7]); in do_scsi_command()
2010 get_unaligned_be16(&common->cmnd[7]); in do_scsi_command()
2020 get_unaligned_be16(&common->cmnd[7]); in do_scsi_command()
2029 common->data_size_from_cmnd = common->cmnd[4]; in do_scsi_command()
2038 switch (common->cmnd[1] & 0x1f) { in do_scsi_command()
2042 get_unaligned_be32(&common->cmnd[10]); in do_scsi_command()
2095 i = common->cmnd[4]; in do_scsi_command()
2107 get_unaligned_be16(&common->cmnd[7]); in do_scsi_command()
2118 get_unaligned_be32(&common->cmnd[6]); in do_scsi_command()
2129 get_unaligned_be32(&common->cmnd[10]); in do_scsi_command()
2152 sprintf(unknown, "Unknown x%02x", common->cmnd[0]); in do_scsi_command()
2237 memcpy(common->cmnd, cbw->CDB, common->cmnd_size); in received_cbw()