• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/ata/

Lines Matching refs:rbuf

1871  *	Returns rbuf buffer.  The result is copied to @cmd's buffer if
1902 unsigned int (*actor)(struct ata_scsi_args *args, u8 *rbuf))
1904 u8 *rbuf;
1909 rbuf = ata_scsi_rbuf_get(cmd, false, &flags);
1910 rc = actor(args, rbuf);
1921 * @rbuf: Response buffer, to which simulated SCSI cmd output is sent.
1929 static unsigned int ata_scsiop_inq_std(struct ata_scsi_args *args, u8 *rbuf)
1954 memcpy(rbuf, hdr, sizeof(hdr));
1955 memcpy(&rbuf[8], "ATA ", 8);
1956 ata_id_string(args->id, &rbuf[16], ATA_ID_PROD, 16);
1957 ata_id_string(args->id, &rbuf[32], ATA_ID_FW_REV, 4);
1959 if (rbuf[32] == 0 || rbuf[32] == ' ')
1960 memcpy(&rbuf[32], "n/a ", 4);
1962 memcpy(rbuf + 59, versions, sizeof(versions));
1970 * @rbuf: Response buffer, to which simulated SCSI cmd output is sent.
1977 static unsigned int ata_scsiop_inq_00(struct ata_scsi_args *args, u8 *rbuf)
1988 rbuf[3] = sizeof(pages); /* number of supported VPD pages */
1989 memcpy(rbuf + 4, pages, sizeof(pages));
1996 * @rbuf: Response buffer, to which simulated SCSI cmd output is sent.
2003 static unsigned int ata_scsiop_inq_80(struct ata_scsi_args *args, u8 *rbuf)
2012 memcpy(rbuf, hdr, sizeof(hdr));
2013 ata_id_string(args->id, (unsigned char *) &rbuf[4],
2021 * @rbuf: Response buffer, to which simulated SCSI cmd output is sent.
2031 static unsigned int ata_scsiop_inq_83(struct ata_scsi_args *args, u8 *rbuf)
2036 rbuf[1] = 0x83; /* this page code */
2040 rbuf[num + 0] = 2;
2041 rbuf[num + 3] = ATA_ID_SERNO_LEN;
2043 ata_id_string(args->id, (unsigned char *) rbuf + num,
2049 rbuf[num + 0] = 2;
2050 rbuf[num + 1] = 1;
2051 rbuf[num + 3] = sat_model_serial_desc_len;
2053 memcpy(rbuf + num, "ATA ", 8);
2055 ata_id_string(args->id, (unsigned char *) rbuf + num, ATA_ID_PROD,
2058 ata_id_string(args->id, (unsigned char *) rbuf + num, ATA_ID_SERNO,
2062 rbuf[3] = num - 4; /* page len (assume less than 256 bytes) */
2069 * @rbuf: Response buffer, to which simulated SCSI cmd output is sent.
2076 static unsigned int ata_scsiop_inq_89(struct ata_scsi_args *args, u8 *rbuf)
2082 rbuf[1] = 0x89; /* our page code */
2083 rbuf[2] = (0x238 >> 8); /* page size fixed at 238h */
2084 rbuf[3] = (0x238 & 0xff);
2086 memcpy(&rbuf[8], "linux ", 8);
2087 memcpy(&rbuf[16], "libata ", 16);
2088 memcpy(&rbuf[32], DRV_VERSION, 4);
2089 ata_id_string(args->id, &rbuf[32], ATA_ID_FW_REV, 4);
2097 ata_tf_to_fis(&tf, 0, 1, &rbuf[36]); /* TODO: PMP? */
2098 rbuf[36] = 0x34; /* force D2H Reg FIS (34h) */
2100 rbuf[56] = ATA_CMD_ID_ATA;
2102 memcpy(&rbuf[60], &args->id[0], 512);
2106 static unsigned int ata_scsiop_inq_b0(struct ata_scsi_args *args, u8 *rbuf)
2110 rbuf[1] = 0xb0;
2111 rbuf[3] = 0x3c; /* required VPD size with unmap support */
2124 put_unaligned_be16(min_io_sectors, &rbuf[6]);
2136 put_unaligned_be32(65535 * 512 / 8, &rbuf[20]);
2137 put_unaligned_be32(1, &rbuf[28]);
2143 static unsigned int ata_scsiop_inq_b1(struct ata_scsi_args *args, u8 *rbuf)
2148 rbuf[1] = 0xb1;
2149 rbuf[3] = 0x3c;
2150 rbuf[4] = media_rotation_rate >> 8;
2151 rbuf[5] = media_rotation_rate;
2152 rbuf[7] = form_factor;
2160 * @rbuf: Response buffer, to which simulated SCSI cmd output is sent.
2168 static unsigned int ata_scsiop_noop(struct ata_scsi_args *args, u8 *rbuf)
2253 * @rbuf: Response buffer, to which simulated SCSI cmd output is sent.
2262 static unsigned int ata_scsiop_mode_sense(struct ata_scsi_args *args, u8 *rbuf)
2265 u8 *scsicmd = args->cmd->cmnd, *p = rbuf;
2338 rbuf[0] = p - rbuf - 1;
2339 rbuf[2] |= dpofua;
2341 rbuf[3] = sizeof(sat_blk_desc);
2342 memcpy(rbuf + 4, sat_blk_desc, sizeof(sat_blk_desc));
2345 unsigned int output_len = p - rbuf - 2;
2347 rbuf[0] = output_len >> 8;
2348 rbuf[1] = output_len;
2349 rbuf[3] |= dpofua;
2351 rbuf[7] = sizeof(sat_blk_desc);
2352 memcpy(rbuf + 8, sat_blk_desc, sizeof(sat_blk_desc));
2371 * @rbuf: Response buffer, to which simulated SCSI cmd output is sent.
2378 static unsigned int ata_scsiop_read_cap(struct ata_scsi_args *args, u8 *rbuf)
2405 rbuf[0] = last_lba >> (8 * 3);
2406 rbuf[1] = last_lba >> (8 * 2);
2407 rbuf[2] = last_lba >> (8 * 1);
2408 rbuf[3] = last_lba;
2411 rbuf[6] = ATA_SECT_SIZE >> 8;
2412 rbuf[7] = ATA_SECT_SIZE & 0xff;
2415 rbuf[0] = last_lba >> (8 * 7);
2416 rbuf[1] = last_lba >> (8 * 6);
2417 rbuf[2] = last_lba >> (8 * 5);
2418 rbuf[3] = last_lba >> (8 * 4);
2419 rbuf[4] = last_lba >> (8 * 3);
2420 rbuf[5] = last_lba >> (8 * 2);
2421 rbuf[6] = last_lba >> (8 * 1);
2422 rbuf[7] = last_lba;
2425 rbuf[10] = ATA_SECT_SIZE >> 8;
2426 rbuf[11] = ATA_SECT_SIZE & 0xff;
2428 rbuf[12] = 0;
2429 rbuf[13] = log_per_phys;
2430 rbuf[14] = (lowest_aligned >> 8) & 0x3f;
2431 rbuf[15] = lowest_aligned;
2434 rbuf[14] |= 0x80; /* TPE */
2437 rbuf[14] |= 0x40; /* TPRZ */
2447 * @rbuf: Response buffer, to which simulated SCSI cmd output is sent.
2454 static unsigned int ata_scsiop_report_luns(struct ata_scsi_args *args, u8 *rbuf)
2457 rbuf[3] = 8; /* just one lun, LUN 0, size 8 bytes */