Lines Matching refs:rbuf
1775 unsigned int (*actor)(struct ata_scsi_args *args, u8 *rbuf)) in ata_scsi_rbuf_fill() argument
1806 static unsigned int ata_scsiop_inq_std(struct ata_scsi_args *args, u8 *rbuf) in ata_scsiop_inq_std() argument
1855 memcpy(rbuf, hdr, sizeof(hdr)); in ata_scsiop_inq_std()
1856 memcpy(&rbuf[8], "ATA ", 8); in ata_scsiop_inq_std()
1857 ata_id_string(args->id, &rbuf[16], ATA_ID_PROD, 16); in ata_scsiop_inq_std()
1860 ata_id_string(args->id, &rbuf[32], ATA_ID_FW_REV + 2, 4); in ata_scsiop_inq_std()
1861 if (strncmp(&rbuf[32], " ", 4) == 0) in ata_scsiop_inq_std()
1862 ata_id_string(args->id, &rbuf[32], ATA_ID_FW_REV, 4); in ata_scsiop_inq_std()
1864 if (rbuf[32] == 0 || rbuf[32] == ' ') in ata_scsiop_inq_std()
1865 memcpy(&rbuf[32], "n/a ", 4); in ata_scsiop_inq_std()
1868 memcpy(rbuf + 58, versions_zbc, sizeof(versions_zbc)); in ata_scsiop_inq_std()
1870 memcpy(rbuf + 58, versions, sizeof(versions)); in ata_scsiop_inq_std()
1885 static unsigned int ata_scsiop_inq_00(struct ata_scsi_args *args, u8 *rbuf) in ata_scsiop_inq_00() argument
1904 rbuf[num_pages + 4] = pages[i]; in ata_scsiop_inq_00()
1907 rbuf[3] = num_pages; /* number of supported VPD pages */ in ata_scsiop_inq_00()
1921 static unsigned int ata_scsiop_inq_80(struct ata_scsi_args *args, u8 *rbuf) in ata_scsiop_inq_80() argument
1930 memcpy(rbuf, hdr, sizeof(hdr)); in ata_scsiop_inq_80()
1931 ata_id_string(args->id, (unsigned char *) &rbuf[4], in ata_scsiop_inq_80()
1949 static unsigned int ata_scsiop_inq_83(struct ata_scsi_args *args, u8 *rbuf) in ata_scsiop_inq_83() argument
1954 rbuf[1] = 0x83; /* this page code */ in ata_scsiop_inq_83()
1958 rbuf[num + 0] = 2; in ata_scsiop_inq_83()
1959 rbuf[num + 3] = ATA_ID_SERNO_LEN; in ata_scsiop_inq_83()
1961 ata_id_string(args->id, (unsigned char *) rbuf + num, in ata_scsiop_inq_83()
1967 rbuf[num + 0] = 2; in ata_scsiop_inq_83()
1968 rbuf[num + 1] = 1; in ata_scsiop_inq_83()
1969 rbuf[num + 3] = sat_model_serial_desc_len; in ata_scsiop_inq_83()
1971 memcpy(rbuf + num, "ATA ", 8); in ata_scsiop_inq_83()
1973 ata_id_string(args->id, (unsigned char *) rbuf + num, ATA_ID_PROD, in ata_scsiop_inq_83()
1976 ata_id_string(args->id, (unsigned char *) rbuf + num, ATA_ID_SERNO, in ata_scsiop_inq_83()
1983 rbuf[num + 0] = 1; in ata_scsiop_inq_83()
1984 rbuf[num + 1] = 3; in ata_scsiop_inq_83()
1985 rbuf[num + 3] = ATA_ID_WWN_LEN; in ata_scsiop_inq_83()
1987 ata_id_string(args->id, (unsigned char *) rbuf + num, in ata_scsiop_inq_83()
1991 rbuf[3] = num - 4; /* page len (assume less than 256 bytes) */ in ata_scsiop_inq_83()
2005 static unsigned int ata_scsiop_inq_89(struct ata_scsi_args *args, u8 *rbuf) in ata_scsiop_inq_89() argument
2007 rbuf[1] = 0x89; /* our page code */ in ata_scsiop_inq_89()
2008 rbuf[2] = (0x238 >> 8); /* page size fixed at 238h */ in ata_scsiop_inq_89()
2009 rbuf[3] = (0x238 & 0xff); in ata_scsiop_inq_89()
2011 memcpy(&rbuf[8], "linux ", 8); in ata_scsiop_inq_89()
2012 memcpy(&rbuf[16], "libata ", 16); in ata_scsiop_inq_89()
2013 memcpy(&rbuf[32], DRV_VERSION, 4); in ata_scsiop_inq_89()
2015 rbuf[36] = 0x34; /* force D2H Reg FIS (34h) */ in ata_scsiop_inq_89()
2016 rbuf[37] = (1 << 7); /* bit 7 indicates Command FIS */ in ata_scsiop_inq_89()
2020 rbuf[38] = ATA_DRDY; /* really, this is Status reg */ in ata_scsiop_inq_89()
2021 rbuf[40] = 0x1; in ata_scsiop_inq_89()
2022 rbuf[48] = 0x1; in ata_scsiop_inq_89()
2024 rbuf[56] = ATA_CMD_ID_ATA; in ata_scsiop_inq_89()
2026 memcpy(&rbuf[60], &args->id[0], 512); in ata_scsiop_inq_89()
2030 static unsigned int ata_scsiop_inq_b0(struct ata_scsi_args *args, u8 *rbuf) in ata_scsiop_inq_b0() argument
2035 rbuf[1] = 0xb0; in ata_scsiop_inq_b0()
2036 rbuf[3] = 0x3c; /* required VPD size with unmap support */ in ata_scsiop_inq_b0()
2046 put_unaligned_be16(min_io_sectors, &rbuf[6]); in ata_scsiop_inq_b0()
2063 put_unaligned_be64(max_blocks, &rbuf[36]); in ata_scsiop_inq_b0()
2064 put_unaligned_be32(1, &rbuf[28]); in ata_scsiop_inq_b0()
2070 static unsigned int ata_scsiop_inq_b1(struct ata_scsi_args *args, u8 *rbuf) in ata_scsiop_inq_b1() argument
2076 rbuf[1] = 0xb1; in ata_scsiop_inq_b1()
2077 rbuf[3] = 0x3c; in ata_scsiop_inq_b1()
2078 rbuf[4] = media_rotation_rate >> 8; in ata_scsiop_inq_b1()
2079 rbuf[5] = media_rotation_rate; in ata_scsiop_inq_b1()
2080 rbuf[7] = form_factor; in ata_scsiop_inq_b1()
2082 rbuf[8] = (zoned << 4); in ata_scsiop_inq_b1()
2087 static unsigned int ata_scsiop_inq_b2(struct ata_scsi_args *args, u8 *rbuf) in ata_scsiop_inq_b2() argument
2090 rbuf[1] = 0xb2; in ata_scsiop_inq_b2()
2091 rbuf[3] = 0x4; in ata_scsiop_inq_b2()
2092 rbuf[5] = 1 << 6; /* TPWS */ in ata_scsiop_inq_b2()
2097 static unsigned int ata_scsiop_inq_b6(struct ata_scsi_args *args, u8 *rbuf) in ata_scsiop_inq_b6() argument
2102 rbuf[1] = 0xb6; in ata_scsiop_inq_b6()
2103 rbuf[3] = 0x3C; in ata_scsiop_inq_b6()
2109 rbuf[4] |= 1; in ata_scsiop_inq_b6()
2110 put_unaligned_be32(args->dev->zac_zones_optimal_open, &rbuf[8]); in ata_scsiop_inq_b6()
2111 put_unaligned_be32(args->dev->zac_zones_optimal_nonseq, &rbuf[12]); in ata_scsiop_inq_b6()
2112 put_unaligned_be32(args->dev->zac_zones_max_open, &rbuf[16]); in ata_scsiop_inq_b6()
2117 static unsigned int ata_scsiop_inq_b9(struct ata_scsi_args *args, u8 *rbuf) in ata_scsiop_inq_b9() argument
2120 u8 *desc = &rbuf[64]; in ata_scsiop_inq_b9()
2124 rbuf[1] = 0xb9; in ata_scsiop_inq_b9()
2125 put_unaligned_be16(64 + (int)cpr_log->nr_cpr * 32 - 4, &rbuf[2]); in ata_scsiop_inq_b9()
2263 static unsigned int ata_scsiop_mode_sense(struct ata_scsi_args *args, u8 *rbuf) in ata_scsiop_mode_sense() argument
2266 u8 *scsicmd = args->cmd->cmnd, *p = rbuf; in ata_scsiop_mode_sense()
2343 rbuf[0] = p - rbuf - 1; in ata_scsiop_mode_sense()
2344 rbuf[2] |= dpofua; in ata_scsiop_mode_sense()
2346 rbuf[3] = sizeof(sat_blk_desc); in ata_scsiop_mode_sense()
2347 memcpy(rbuf + 4, sat_blk_desc, sizeof(sat_blk_desc)); in ata_scsiop_mode_sense()
2350 unsigned int output_len = p - rbuf - 2; in ata_scsiop_mode_sense()
2352 rbuf[0] = output_len >> 8; in ata_scsiop_mode_sense()
2353 rbuf[1] = output_len; in ata_scsiop_mode_sense()
2354 rbuf[3] |= dpofua; in ata_scsiop_mode_sense()
2356 rbuf[7] = sizeof(sat_blk_desc); in ata_scsiop_mode_sense()
2357 memcpy(rbuf + 8, sat_blk_desc, sizeof(sat_blk_desc)); in ata_scsiop_mode_sense()
2382 static unsigned int ata_scsiop_read_cap(struct ata_scsi_args *args, u8 *rbuf) in ata_scsiop_read_cap() argument
2399 rbuf[0] = last_lba >> (8 * 3); in ata_scsiop_read_cap()
2400 rbuf[1] = last_lba >> (8 * 2); in ata_scsiop_read_cap()
2401 rbuf[2] = last_lba >> (8 * 1); in ata_scsiop_read_cap()
2402 rbuf[3] = last_lba; in ata_scsiop_read_cap()
2405 rbuf[4] = sector_size >> (8 * 3); in ata_scsiop_read_cap()
2406 rbuf[5] = sector_size >> (8 * 2); in ata_scsiop_read_cap()
2407 rbuf[6] = sector_size >> (8 * 1); in ata_scsiop_read_cap()
2408 rbuf[7] = sector_size; in ata_scsiop_read_cap()
2411 rbuf[0] = last_lba >> (8 * 7); in ata_scsiop_read_cap()
2412 rbuf[1] = last_lba >> (8 * 6); in ata_scsiop_read_cap()
2413 rbuf[2] = last_lba >> (8 * 5); in ata_scsiop_read_cap()
2414 rbuf[3] = last_lba >> (8 * 4); in ata_scsiop_read_cap()
2415 rbuf[4] = last_lba >> (8 * 3); in ata_scsiop_read_cap()
2416 rbuf[5] = last_lba >> (8 * 2); in ata_scsiop_read_cap()
2417 rbuf[6] = last_lba >> (8 * 1); in ata_scsiop_read_cap()
2418 rbuf[7] = last_lba; in ata_scsiop_read_cap()
2421 rbuf[ 8] = sector_size >> (8 * 3); in ata_scsiop_read_cap()
2422 rbuf[ 9] = sector_size >> (8 * 2); in ata_scsiop_read_cap()
2423 rbuf[10] = sector_size >> (8 * 1); in ata_scsiop_read_cap()
2424 rbuf[11] = sector_size; in ata_scsiop_read_cap()
2426 rbuf[12] = 0; in ata_scsiop_read_cap()
2427 rbuf[13] = log2_per_phys; in ata_scsiop_read_cap()
2428 rbuf[14] = (lowest_aligned >> 8) & 0x3f; in ata_scsiop_read_cap()
2429 rbuf[15] = lowest_aligned; in ata_scsiop_read_cap()
2433 rbuf[14] |= 0x80; /* LBPME */ in ata_scsiop_read_cap()
2438 rbuf[14] |= 0x40; /* LBPRZ */ in ata_scsiop_read_cap()
2443 rbuf[12] = (1 << 4); /* RC_BASIS */ in ata_scsiop_read_cap()
2458 static unsigned int ata_scsiop_report_luns(struct ata_scsi_args *args, u8 *rbuf) in ata_scsiop_report_luns() argument
2460 rbuf[3] = 8; /* just one lun, LUN 0, size 8 bytes */ in ata_scsiop_report_luns()
3246 static unsigned int ata_scsiop_maint_in(struct ata_scsi_args *args, u8 *rbuf) in ata_scsiop_maint_in() argument
3304 rbuf[1] = supported; /* supported */ in ata_scsiop_maint_in()