Lines Matching refs:arr

1155 static int fill_from_dev_buffer(struct scsi_cmnd *scp, unsigned char *arr,
1167 arr, arr_len);
1178 static int p_fill_from_dev_buffer(struct scsi_cmnd *scp, const void *arr,
1191 arr, arr_len, skip);
1201 * 'arr' or -1 if error.
1203 static int fetch_to_dev_buffer(struct scsi_cmnd *scp, unsigned char *arr,
1211 return scsi_sg_copy_to_buffer(scp, arr, arr_len);
1223 /* Device identification VPD page. Returns number of bytes placed in arr */
1224 static int inquiry_vpd_83(unsigned char *arr, int port_group_id,
1234 arr[0] = 0x2; /* ASCII */
1235 arr[1] = 0x1;
1236 arr[2] = 0x0;
1237 memcpy(&arr[4], sdebug_inq_vendor_id, 8);
1238 memcpy(&arr[12], sdebug_inq_product_id, 16);
1239 memcpy(&arr[28], dev_id_str, dev_id_str_len);
1241 arr[3] = num;
1246 arr[num++] = 0x1; /* binary (not necessarily sas) */
1247 arr[num++] = 0xa; /* PIV=0, lu, naa */
1248 arr[num++] = 0x0;
1249 arr[num++] = 0x12;
1250 arr[num++] = 0x10; /* uuid type=1, locally assigned */
1251 arr[num++] = 0x0;
1252 memcpy(arr + num, lu_name, 16);
1256 arr[num++] = 0x1; /* binary (not necessarily sas) */
1257 arr[num++] = 0x3; /* PIV=0, lu, naa */
1258 arr[num++] = 0x0;
1259 arr[num++] = 0x8;
1260 put_unaligned_be64(naa3_comp_b + dev_id_num, arr + num);
1264 arr[num++] = 0x61; /* proto=sas, binary */
1265 arr[num++] = 0x94; /* PIV=1, target port, rel port */
1266 arr[num++] = 0x0; /* reserved */
1267 arr[num++] = 0x4; /* length */
1268 arr[num++] = 0x0; /* reserved */
1269 arr[num++] = 0x0; /* reserved */
1270 arr[num++] = 0x0;
1271 arr[num++] = 0x1; /* relative port A */
1274 arr[num++] = 0x61; /* proto=sas, binary */
1275 arr[num++] = 0x93; /* piv=1, target port, naa */
1276 arr[num++] = 0x0;
1277 arr[num++] = 0x8;
1278 put_unaligned_be64(naa3_comp_a + port_a, arr + num);
1281 arr[num++] = 0x61; /* proto=sas, binary */
1282 arr[num++] = 0x95; /* piv=1, target port group id */
1283 arr[num++] = 0x0;
1284 arr[num++] = 0x4;
1285 arr[num++] = 0;
1286 arr[num++] = 0;
1287 put_unaligned_be16(port_group_id, arr + num);
1290 arr[num++] = 0x61; /* proto=sas, binary */
1291 arr[num++] = 0xa3; /* piv=1, target device, naa */
1292 arr[num++] = 0x0;
1293 arr[num++] = 0x8;
1294 put_unaligned_be64(naa3_comp_a + target_dev_id, arr + num);
1297 arr[num++] = 0x63; /* proto=sas, UTF-8 */
1298 arr[num++] = 0xa8; /* piv=1, target device, SCSI name string */
1299 arr[num++] = 0x0;
1300 arr[num++] = 24;
1301 memcpy(arr + num, "naa.32222220", 12);
1304 memcpy(arr + num, b, 8);
1306 memset(arr + num, 0, 4);
1318 static int inquiry_vpd_84(unsigned char *arr)
1320 memcpy(arr, vpd84_data, sizeof(vpd84_data));
1325 static int inquiry_vpd_85(unsigned char *arr)
1332 arr[num++] = 0x1; /* lu, storage config */
1333 arr[num++] = 0x0; /* reserved */
1334 arr[num++] = 0x0;
1339 arr[num++] = plen; /* length, null termianted, padded */
1340 memcpy(arr + num, na1, olen);
1341 memset(arr + num + olen, 0, plen - olen);
1344 arr[num++] = 0x4; /* lu, logging */
1345 arr[num++] = 0x0; /* reserved */
1346 arr[num++] = 0x0;
1351 arr[num++] = plen; /* length, null terminated, padded */
1352 memcpy(arr + num, na2, olen);
1353 memset(arr + num + olen, 0, plen - olen);
1360 static int inquiry_vpd_88(unsigned char *arr, int target_dev_id)
1367 arr[num++] = 0x0; /* reserved */
1368 arr[num++] = 0x0; /* reserved */
1369 arr[num++] = 0x0;
1370 arr[num++] = 0x1; /* relative port 1 (primary) */
1371 memset(arr + num, 0, 6);
1373 arr[num++] = 0x0;
1374 arr[num++] = 12; /* length tp descriptor */
1376 arr[num++] = 0x61; /* proto=sas, binary */
1377 arr[num++] = 0x93; /* PIV=1, target port, NAA */
1378 arr[num++] = 0x0; /* reserved */
1379 arr[num++] = 0x8; /* length */
1380 put_unaligned_be64(naa3_comp_a + port_a, arr + num);
1382 arr[num++] = 0x0; /* reserved */
1383 arr[num++] = 0x0; /* reserved */
1384 arr[num++] = 0x0;
1385 arr[num++] = 0x2; /* relative port 2 (secondary) */
1386 memset(arr + num, 0, 6);
1388 arr[num++] = 0x0;
1389 arr[num++] = 12; /* length tp descriptor */
1391 arr[num++] = 0x61; /* proto=sas, binary */
1392 arr[num++] = 0x93; /* PIV=1, target port, NAA */
1393 arr[num++] = 0x0; /* reserved */
1394 arr[num++] = 0x8; /* length */
1395 put_unaligned_be64(naa3_comp_a + port_b, arr + num);
1447 static int inquiry_vpd_89(unsigned char *arr)
1449 memcpy(arr, vpd89_data, sizeof(vpd89_data));
1462 static int inquiry_vpd_b0(unsigned char *arr)
1466 memcpy(arr, vpdb0_data, sizeof(vpdb0_data));
1474 put_unaligned_be16(gran, arr + 2);
1478 put_unaligned_be32(sdebug_store_sectors, arr + 4);
1481 put_unaligned_be32(sdebug_opt_blks, &arr[8]);
1485 put_unaligned_be32(sdebug_unmap_max_blocks, &arr[16]);
1488 put_unaligned_be32(sdebug_unmap_max_desc, &arr[20]);
1493 put_unaligned_be32(sdebug_unmap_alignment, &arr[28]);
1494 arr[28] |= 0x80; /* UGAVALID */
1498 put_unaligned_be32(sdebug_unmap_granularity, &arr[24]);
1501 put_unaligned_be64(sdebug_write_same_length, &arr[32]);
1507 static int inquiry_vpd_b1(struct sdebug_dev_info *devip, unsigned char *arr)
1509 memset(arr, 0, 0x3c);
1510 arr[0] = 0;
1511 arr[1] = 1; /* non rotating medium (e.g. solid state) */
1512 arr[2] = 0;
1513 arr[3] = 5; /* less than 1.8" */
1515 arr[4] = 1 << 4; /* zoned field = 01b */
1521 static int inquiry_vpd_b2(unsigned char *arr)
1523 memset(arr, 0, 0x4);
1524 arr[0] = 0; /* threshold exponent */
1526 arr[1] = 1 << 7;
1528 arr[1] |= 1 << 6;
1530 arr[1] |= 1 << 5;
1532 arr[1] |= (sdebug_lbprz & 0x7) << 2; /* sbc4r07 and later */
1540 static int inquiry_vpd_b6(struct sdebug_dev_info *devip, unsigned char *arr)
1542 memset(arr, 0, 0x3c);
1543 arr[0] = 0x1; /* set URSWRZ (unrestricted read in seq. wr req zone) */
1550 put_unaligned_be32(0xffffffff, &arr[4]);
1551 put_unaligned_be32(0xffffffff, &arr[8]);
1553 put_unaligned_be32(devip->max_open, &arr[12]);
1555 put_unaligned_be32(0xffffffff, &arr[12]);
1557 arr[19] = ZBC_CONSTANT_ZONE_START_OFFSET;
1558 put_unaligned_be64(devip->zsize, &arr[20]);
1560 arr[19] = 0;
1571 unsigned char *arr;
1578 arr = kzalloc(SDEBUG_MAX_INQ_ARR_SZ, GFP_ATOMIC);
1579 if (! arr)
1591 arr[0] = pq_pdt;
1594 kfree(arr);
1612 arr[1] = cmd[2]; /*sanity */
1614 arr[n++] = 0x0; /* this page */
1615 arr[n++] = 0x80; /* unit serial number */
1616 arr[n++] = 0x83; /* device identification */
1617 arr[n++] = 0x84; /* software interface ident. */
1618 arr[n++] = 0x85; /* management network addresses */
1619 arr[n++] = 0x86; /* extended inquiry */
1620 arr[n++] = 0x87; /* mode page policy */
1621 arr[n++] = 0x88; /* SCSI ports */
1623 arr[n++] = 0x89; /* ATA information */
1624 arr[n++] = 0xb0; /* Block limits */
1625 arr[n++] = 0xb1; /* Block characteristics */
1627 arr[n++] = 0xb2; /* LB Provisioning */
1629 arr[n++] = 0xb6; /* ZB dev. char. */
1631 arr[3] = n - 4; /* number of supported VPD pages */
1633 arr[1] = cmd[2]; /*sanity */
1634 arr[3] = len;
1635 memcpy(&arr[4], lu_id_str, len);
1637 arr[1] = cmd[2]; /*sanity */
1638 arr[3] = inquiry_vpd_83(&arr[4], port_group_id,
1643 arr[1] = cmd[2]; /*sanity */
1644 arr[3] = inquiry_vpd_84(&arr[4]);
1646 arr[1] = cmd[2]; /*sanity */
1647 arr[3] = inquiry_vpd_85(&arr[4]);
1649 arr[1] = cmd[2]; /*sanity */
1650 arr[3] = 0x3c; /* number of following entries */
1652 arr[4] = 0x4; /* SPT: GRD_CHK:1 */
1654 arr[4] = 0x5; /* SPT: GRD_CHK:1, REF_CHK:1 */
1656 arr[4] = 0x0; /* no protection stuff */
1657 arr[5] = 0x7; /* head of q, ordered + simple q's */
1659 arr[1] = cmd[2]; /*sanity */
1660 arr[3] = 0x8; /* number of following entries */
1661 arr[4] = 0x2; /* disconnect-reconnect mp */
1662 arr[6] = 0x80; /* mlus, shared */
1663 arr[8] = 0x18; /* protocol specific lu */
1664 arr[10] = 0x82; /* mlus, per initiator port */
1666 arr[1] = cmd[2]; /*sanity */
1667 arr[3] = inquiry_vpd_88(&arr[4], target_dev_id);
1669 arr[1] = cmd[2]; /*sanity */
1670 n = inquiry_vpd_89(&arr[4]);
1671 put_unaligned_be16(n, arr + 2);
1673 arr[1] = cmd[2]; /*sanity */
1674 arr[3] = inquiry_vpd_b0(&arr[4]);
1676 arr[1] = cmd[2]; /*sanity */
1677 arr[3] = inquiry_vpd_b1(devip, &arr[4]);
1679 arr[1] = cmd[2]; /*sanity */
1680 arr[3] = inquiry_vpd_b2(&arr[4]);
1682 arr[1] = cmd[2]; /*sanity */
1683 arr[3] = inquiry_vpd_b6(devip, &arr[4]);
1686 kfree(arr);
1689 len = min_t(u32, get_unaligned_be16(arr + 2) + 4, alloc_len);
1690 ret = fill_from_dev_buffer(scp, arr,
1692 kfree(arr);
1696 arr[1] = sdebug_removable ? 0x80 : 0; /* Removable disk */
1697 arr[2] = sdebug_scsi_level;
1698 arr[3] = 2; /* response_data_format==2 */
1699 arr[4] = SDEBUG_LONG_INQ_SZ - 5;
1700 arr[5] = (int)have_dif_prot; /* PROTECT bit */
1702 arr[5] |= 0x10; /* claim: implicit TPGS */
1703 arr[6] = 0x10; /* claim: MultiP */
1704 /* arr[6] |= 0x40; ... claim: EncServ (enclosure services) */
1705 arr[7] = 0xa; /* claim: LINKED + CMDQUE */
1706 memcpy(&arr[8], sdebug_inq_vendor_id, 8);
1707 memcpy(&arr[16], sdebug_inq_product_id, 16);
1708 memcpy(&arr[32], sdebug_inq_product_rev, 4);
1710 memcpy(&arr[36], sdebug_version_date, 8);
1712 put_unaligned_be16(0xc0, arr + 58); /* SAM-6 no version claimed */
1713 put_unaligned_be16(0x5c0, arr + 60); /* SPC-5 no version claimed */
1716 put_unaligned_be16(0x600, arr + n);
1719 put_unaligned_be16(0x525, arr + n);
1722 put_unaligned_be16(0x624, arr + n);
1725 put_unaligned_be16(0x2100, arr + n); /* SPL-4 no version claimed */
1726 ret = fill_from_dev_buffer(scp, arr,
1728 kfree(arr);
1740 unsigned char arr[SCSI_SENSE_BUFFERSIZE]; /* assume >= 18 bytes */
1746 memset(arr, 0, sizeof(arr));
1749 arr[0] = 0x72;
1750 arr[1] = NOT_READY;
1751 arr[2] = LOGICAL_UNIT_NOT_READY;
1752 arr[3] = (stopped_state == 2) ? 0x1 : 0x2;
1755 arr[0] = 0x70;
1756 arr[2] = NOT_READY; /* NO_SENSE in sense_key */
1757 arr[7] = 0xa; /* 18 byte sense buffer */
1758 arr[12] = LOGICAL_UNIT_NOT_READY;
1759 arr[13] = (stopped_state == 2) ? 0x1 : 0x2;
1764 arr[0] = 0x72;
1765 arr[1] = 0x0; /* NO_SENSE in sense_key */
1766 arr[2] = THRESHOLD_EXCEEDED;
1767 arr[3] = 0xff; /* Failure prediction(false) */
1770 arr[0] = 0x70;
1771 arr[2] = 0x0; /* NO_SENSE in sense_key */
1772 arr[7] = 0xa; /* 18 byte sense buffer */
1773 arr[12] = THRESHOLD_EXCEEDED;
1774 arr[13] = 0xff; /* Failure prediction(false) */
1779 memset(arr, 0, len);
1780 arr[0] = 0x72;
1782 memset(arr, 0, len);
1783 arr[0] = 0x70;
1784 arr[7] = 0xa;
1787 return fill_from_dev_buffer(scp, arr, min_t(u32, len, alloc_len));
1848 unsigned char arr[SDEBUG_READCAP_ARR_SZ];
1853 memset(arr, 0, SDEBUG_READCAP_ARR_SZ);
1856 put_unaligned_be32(capac, arr + 0);
1858 put_unaligned_be32(0xffffffff, arr + 0);
1859 put_unaligned_be16(sdebug_sector_size, arr + 6);
1860 return fill_from_dev_buffer(scp, arr, SDEBUG_READCAP_ARR_SZ);
1868 unsigned char arr[SDEBUG_READCAP16_ARR_SZ];
1874 memset(arr, 0, SDEBUG_READCAP16_ARR_SZ);
1875 put_unaligned_be64((u64)(sdebug_capacity - 1), arr + 0);
1876 put_unaligned_be32(sdebug_sector_size, arr + 8);
1877 arr[13] = sdebug_physblk_exp & 0xf;
1878 arr[14] = (sdebug_lowest_aligned >> 8) & 0x3f;
1881 arr[14] |= 0x80; /* LBPME */
1887 arr[14] |= 0x40;
1895 arr[12] |= 1 << 4;
1897 arr[15] = sdebug_lowest_aligned & 0xff;
1900 arr[12] = (sdebug_dif - 1) << 1; /* P_TYPE */
1901 arr[12] |= 1; /* PROT_EN */
1904 return fill_from_dev_buffer(scp, arr,
1914 unsigned char *arr;
1921 arr = kzalloc(SDEBUG_MAX_TGTPGS_ARR_SZ, GFP_ATOMIC);
1922 if (! arr)
1942 arr[n++] = host_no % 3; /* Asymm access state */
1943 arr[n++] = 0x0F; /* claim: all states are supported */
1945 arr[n++] = 0x0; /* Active/Optimized path */
1946 arr[n++] = 0x01; /* only support active/optimized paths */
1948 put_unaligned_be16(port_group_a, arr + n);
1950 arr[n++] = 0; /* Reserved */
1951 arr[n++] = 0; /* Status code */
1952 arr[n++] = 0; /* Vendor unique */
1953 arr[n++] = 0x1; /* One port per group */
1954 arr[n++] = 0; /* Reserved */
1955 arr[n++] = 0; /* Reserved */
1956 put_unaligned_be16(port_a, arr + n);
1958 arr[n++] = 3; /* Port unavailable */
1959 arr[n++] = 0x08; /* claim: only unavailalbe paths are supported */
1960 put_unaligned_be16(port_group_b, arr + n);
1962 arr[n++] = 0; /* Reserved */
1963 arr[n++] = 0; /* Status code */
1964 arr[n++] = 0; /* Vendor unique */
1965 arr[n++] = 0x1; /* One port per group */
1966 arr[n++] = 0; /* Reserved */
1967 arr[n++] = 0; /* Reserved */
1968 put_unaligned_be16(port_b, arr + n);
1972 put_unaligned_be32(rlen, arr + 0);
1981 ret = fill_from_dev_buffer(scp, arr,
1983 kfree(arr);
1997 u8 *arr;
2013 arr = kzalloc((a_len < 256) ? 320 : a_len + 64, GFP_ATOMIC);
2014 if (NULL == arr) {
2029 put_unaligned_be32(count * bump, arr);
2035 arr[offset] = oip->opcode;
2036 put_unaligned_be16(oip->sa, arr + offset + 2);
2038 arr[offset + 5] |= 0x2;
2040 arr[offset + 5] |= 0x1;
2041 put_unaligned_be16(oip->len_mask[0], arr + offset + 6);
2043 put_unaligned_be16(0xa, arr + offset + 8);
2049 arr[offset] = oip->opcode;
2050 put_unaligned_be16(oip->sa, arr + offset + 2);
2052 arr[offset + 5] |= 0x2;
2054 arr[offset + 5] |= 0x1;
2056 arr + offset + 6);
2059 arr + offset + 8);
2078 kfree(arr);
2085 kfree(arr); /* point at requested sa */
2111 put_unaligned_be16(u, arr + 2);
2112 arr[4] = oip->opcode;
2114 arr[4 + k] = (k < 16) ?
2120 arr[1] = (rctd ? 0x80 : 0) | supp;
2122 put_unaligned_be16(0xa, arr + offset);
2128 kfree(arr);
2133 errsts = fill_from_dev_buffer(scp, arr, len);
2134 kfree(arr);
2143 u8 arr[16];
2146 memset(arr, 0, sizeof(arr));
2153 arr[0] = 0xc8; /* ATS | ATSS | LURS */
2154 arr[1] = 0x1; /* ITNRS */
2156 arr[3] = 0xc;
2162 return fill_from_dev_buffer(scp, arr, len);
2336 unsigned char arr[SDEBUG_MAX_MSENSE_SZ];
2353 memset(arr, 0, SDEBUG_MAX_MSENSE_SZ);
2368 arr[2] = dev_spec;
2369 arr[3] = bd_len;
2372 arr[3] = dev_spec;
2374 arr[4] = 0x1; /* set LONGLBA bit */
2375 arr[7] = bd_len; /* assume 255 or less */
2378 ap = arr + offset;
2389 ap = arr + offset;
2394 ap = arr + offset;
2486 arr[0] = offset - 1;
2488 put_unaligned_be16((offset - 2), arr + 0);
2489 return fill_from_dev_buffer(scp, arr, min_t(u32, alloc_len, offset));
2499 unsigned char arr[SDEBUG_MAX_MSELECT_SZ];
2503 memset(arr, 0, sizeof(arr));
2511 res = fetch_to_dev_buffer(scp, arr, param_len);
2518 md_len = mselect6 ? (arr[0] + 1) : (get_unaligned_be16(arr + 0) + 2);
2519 bd_len = mselect6 ? arr[3] : get_unaligned_be16(arr + 6);
2525 mpage = arr[off] & 0x3f;
2526 ps = !!(arr[off] & 0x80);
2531 spf = !!(arr[off] & 0x40);
2532 pg_len = spf ? (get_unaligned_be16(arr + off + 2) + 4) :
2533 (arr[off + 1] + 2);
2541 if (caching_pg[1] == arr[off + 1]) {
2542 memcpy(caching_pg + 2, arr + off + 2,
2548 if (ctrl_m_pg[1] == arr[off + 1]) {
2549 memcpy(ctrl_m_pg + 2, arr + off + 2,
2560 if (iec_m_pg[1] == arr[off + 1]) {
2561 memcpy(iec_m_pg + 2, arr + off + 2,
2576 static int resp_temp_l_pg(unsigned char *arr)
2582 memcpy(arr, temp_l_pg, sizeof(temp_l_pg));
2586 static int resp_ie_l_pg(unsigned char *arr)
2591 memcpy(arr, ie_l_pg, sizeof(ie_l_pg));
2593 arr[4] = THRESHOLD_EXCEEDED;
2594 arr[5] = 0xff;
2599 static int resp_env_rep_l_spg(unsigned char *arr)
2607 memcpy(arr, env_rep_l_spg, sizeof(env_rep_l_spg));
2618 unsigned char arr[SDEBUG_MAX_LSENSE_SZ];
2621 memset(arr, 0, sizeof(arr));
2631 arr[0] = pcode;
2636 arr[n++] = 0x0; /* this page */
2637 arr[n++] = 0xd; /* Temperature */
2638 arr[n++] = 0x2f; /* Informational exceptions */
2639 arr[3] = n - 4;
2642 arr[3] = resp_temp_l_pg(arr + 4);
2645 arr[3] = resp_ie_l_pg(arr + 4);
2652 arr[0] |= 0x40;
2653 arr[1] = subpcode;
2657 arr[n++] = 0x0;
2658 arr[n++] = 0x0; /* 0,0 page */
2659 arr[n++] = 0x0;
2660 arr[n++] = 0xff; /* this page */
2661 arr[n++] = 0xd;
2662 arr[n++] = 0x0; /* Temperature */
2663 arr[n++] = 0xd;
2664 arr[n++] = 0x1; /* Environment reporting */
2665 arr[n++] = 0xd;
2666 arr[n++] = 0xff; /* all 0xd subpages */
2667 arr[n++] = 0x2f;
2668 arr[n++] = 0x0; /* Informational exceptions */
2669 arr[n++] = 0x2f;
2670 arr[n++] = 0xff; /* all 0x2f subpages */
2671 arr[3] = n - 4;
2675 arr[n++] = 0xd;
2676 arr[n++] = 0x0; /* Temperature */
2677 arr[n++] = 0xd;
2678 arr[n++] = 0x1; /* Environment reporting */
2679 arr[n++] = 0xd;
2680 arr[n++] = 0xff; /* these subpages */
2681 arr[3] = n - 4;
2685 arr[n++] = 0x2f;
2686 arr[n++] = 0x0; /* Informational exceptions */
2687 arr[n++] = 0x2f;
2688 arr[n++] = 0xff; /* these subpages */
2689 arr[3] = n - 4;
2696 arr[0] |= 0x40;
2697 arr[1] = subpcode;
2699 arr[3] = resp_env_rep_l_spg(arr + 4);
2708 len = min_t(u32, get_unaligned_be16(arr + 2) + 4, alloc_len);
2709 return fill_from_dev_buffer(scp, arr,
3060 /* If sip->storep+lba compares equal to arr(num), then copy top half of
3061 * arr into sip->storep+lba and return true. If comparison fails then
3064 const u8 *arr, bool compare_only)
3076 res = !memcmp(fsp + (block * lb_size), arr, (num - rest) * lb_size);
3080 res = memcmp(fsp, arr + ((num - rest) * lb_size),
3086 arr += num * lb_size;
3087 memcpy(fsp + (block * lb_size), arr, (num - rest) * lb_size);
3089 memcpy(fsp, arr + ((num - rest) * lb_size), rest * lb_size);
4045 u8 *arr;
4072 arr = kcalloc(lb_size, dnum, GFP_ATOMIC);
4073 if (NULL == arr) {
4081 ret = do_dout_fetch(scp, dnum, arr);
4089 if (!comp_write_worker(sip, lba, num, arr, false)) {
4098 kfree(arr);
4172 u8 arr[SDEBUG_GET_LBA_STATUS_LEN];
4198 memset(arr, 0, SDEBUG_GET_LBA_STATUS_LEN);
4199 put_unaligned_be32(20, arr); /* Parameter Data Length */
4200 put_unaligned_be64(lba, arr + 8); /* LBA */
4201 put_unaligned_be32(num, arr + 16); /* Number of blocks */
4202 arr[20] = !mapped; /* prov_stat=0: mapped; 1: dealloc */
4204 return fill_from_dev_buffer(scp, arr, SDEBUG_GET_LBA_STATUS_LEN);
4300 u8 arr[RL_BUCKET_ELEMS * sizeof(struct scsi_lun)];
4354 memset(arr, 0, sizeof(arr));
4355 lun_p = (struct scsi_lun *)&arr[0];
4357 put_unaligned_be32(rlen, &arr[0]);
4371 res = p_fill_from_dev_buffer(scp, arr, n, off_rsp);
4381 res = p_fill_from_dev_buffer(scp, arr, j * sz_lun, off_rsp);
4393 u8 *arr;
4427 arr = kcalloc(lb_size, vnum, GFP_ATOMIC | __GFP_NOWARN);
4428 if (!arr) {
4436 ret = do_dout_fetch(scp, a_num, arr);
4447 memcpy(arr + off, arr, lb_size);
4450 if (!comp_write_worker(sip, lba, vnum, arr, true)) {
4457 kfree(arr);
4472 u8 *arr = NULL, *desc;
4495 arr = kzalloc(alloc_len, GFP_ATOMIC | __GFP_NOWARN);
4496 if (!arr) {
4504 desc = arr + 64;
4589 put_unaligned_be32(nrz * RZONES_DESC_HD, arr + 0);
4591 put_unaligned_be64(sdebug_capacity - 1, arr + 8);
4594 put_unaligned_be64(devip->zsize, arr + 16);
4596 rep_len = (unsigned long)desc - (unsigned long)arr;
4597 ret = fill_from_dev_buffer(scp, arr, min_t(u32, alloc_len, rep_len));
4601 kfree(arr);
5870 char arr[16];
5876 memcpy(arr, buffer, minLen);
5877 arr[minLen] = '\0';
5878 if (1 != sscanf(arr, "%d", &opts))