From nobody Tue Jul 25 04:26:30 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4R93rQ5Txkz4p488; Tue, 25 Jul 2023 04:26:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4R93rQ428qz4P99; Tue, 25 Jul 2023 04:26:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690259190; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5wGHt2IdOQWiCMkEfnbW3hdWzC5nFK5LwmPgjvNwwu4=; b=b9d1Gkqk/v/JZRLKWZ3LCqyFyVxzb+GCXBlOht3eM+th/IXZ2L1N4J53sTJ670E1zDk9Pc I2gdPtsWe1dbKr8wJrlWReAAUnQyd3kjT+xb5qJP6lxRd9hmtE7kI6HamozoemnJSateIo PMQZUKNn/fLzH9ICP0eEmUbfQ7TTQjh+BCNLO6biwfu/CNKxpnYYyinZbYVSwfm45XA/js ei3FDUwkTyKlhdvT0xvQAjCjWTHaM/R0xmypCP5dFRgzgFNNk4pjuvOuktY9DqLcZ5+A3c kB/LA9lEedeacx+cyOhAQCSWYJWYr8MPZrEnvr8coohiTpfGh7Ve+kt/xM0HIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690259190; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5wGHt2IdOQWiCMkEfnbW3hdWzC5nFK5LwmPgjvNwwu4=; b=dIDGEtlwgVB3PhrvZfi6Jebstdtslz3RSo+tM+CM5DH0d+DPndNBTO2k3M/EFt4p7X4aG9 k+37KX5yk/9lhpK8CDuFq6+2C38FrFDg8oUfcYwo8k/1g/HkCFXzgNTpahtjFjnJ+eSLJ7 C2HiyXsNkxQmcNwAiIrjUEF/7bA1YI1mAuDFPKzZyyyVK+/ZVZSrlNPWnflhfc5JX0FkNt AI0ZhQC7CD8yPf8T3mHjDmvdMyJpAsVn5qHPcVKlx6Z/ZH3kxXD0CgaN06WwN/Yx9QoK6T Afesi1pUphEw7o1XLw0hTW9UqGzby1b7VPcFszEahEMxQYqWkoRR0ZqbGw+BRA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690259190; a=rsa-sha256; cv=none; b=juOLjt0hSKiO/66JbmGUFhvYnSy5pzwcRDKXdWUVqSiz2w6rCgbIfAQw8DLw5TBCmWj5in 1sMQdgsnD1rUclyKH0r3D79VNr1CQHVyUJwXQoWAPKZVsqVQlj/4wUQRMTAW3nApzsM7Wk 19OLn3coCdvR+vyDh4uVHh+tGzFFA/jxAAAXVufec/iH8ajMXpWj0mjI9tkgEfHUIixF0r 8JF6V8JJN79xhWlS6t2rn3P25VyEvfzXLS0aJB2oWsJpn9Td4uQ64qH3gDUGu/rlO/b9xG 20p9CeSNNi+eCx49WqNv0GGS0H2rDPwB/9pIyuUDXEWTBHqB3TzthBA0x3hcCg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4R93rQ34FDzm4K; Tue, 25 Jul 2023 04:26:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 36P4QUab039382; Tue, 25 Jul 2023 04:26:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36P4QUmQ039376; Tue, 25 Jul 2023 04:26:30 GMT (envelope-from git) Date: Tue, 25 Jul 2023 04:26:30 GMT Message-Id: <202307250426.36P4QUmQ039376@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 7c5d20a6c213 - main - cam/scsi: Migrate to modern uintXX_t from u_intXX_t List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7c5d20a6c213032941ad57d676419c6fb7d60843 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=7c5d20a6c213032941ad57d676419c6fb7d60843 commit 7c5d20a6c213032941ad57d676419c6fb7d60843 Author: Warner Losh AuthorDate: 2023-07-25 03:17:41 +0000 Commit: Warner Losh CommitDate: 2023-07-25 03:32:56 +0000 cam/scsi: Migrate to modern uintXX_t from u_intXX_t As per https://lists.freebsd.org/archives/freebsd-scsi/2023-July/000257.html move to the modern uintXX_t. MFC After: 3 days Sponsored by: Netflix --- sys/cam/scsi/scsi_all.c | 258 +++++------ sys/cam/scsi/scsi_all.h | 1050 +++++++++++++++++++++---------------------- sys/cam/scsi/scsi_cd.c | 184 ++++---- sys/cam/scsi/scsi_cd.h | 536 +++++++++++----------- sys/cam/scsi/scsi_ch.c | 102 ++--- sys/cam/scsi/scsi_ch.h | 264 +++++------ sys/cam/scsi/scsi_da.c | 70 +-- sys/cam/scsi/scsi_da.h | 300 ++++++------- sys/cam/scsi/scsi_iu.h | 12 +- sys/cam/scsi/scsi_pass.c | 26 +- sys/cam/scsi/scsi_pt.c | 22 +- sys/cam/scsi/scsi_pt.h | 8 +- sys/cam/scsi/scsi_sa.c | 230 +++++----- sys/cam/scsi/scsi_sa.h | 430 +++++++++--------- sys/cam/scsi/scsi_targ_bh.c | 16 +- sys/cam/scsi/scsi_target.c | 4 +- sys/cam/scsi/scsi_xpt.c | 32 +- 17 files changed, 1772 insertions(+), 1772 deletions(-) diff --git a/sys/cam/scsi/scsi_all.c b/sys/cam/scsi/scsi_all.c index 9c408fd85b05..d7b0a208c10d 100644 --- a/sys/cam/scsi/scsi_all.c +++ b/sys/cam/scsi/scsi_all.c @@ -625,12 +625,12 @@ static struct op_table_entry scsi_op_codes[] = { }; const char * -scsi_op_desc(u_int16_t opcode, struct scsi_inquiry_data *inq_data) +scsi_op_desc(uint16_t opcode, struct scsi_inquiry_data *inq_data) { caddr_t match; int i, j; - u_int32_t opmask; - u_int16_t pd_type; + uint32_t opmask; + uint16_t pd_type; int num_ops[2]; struct op_table_entry *table[2]; int num_tables; @@ -707,7 +707,7 @@ scsi_op_desc(u_int16_t opcode, struct scsi_inquiry_data *inq_data) #else /* SCSI_NO_OP_STRINGS */ const char * -scsi_op_desc(u_int16_t opcode, struct scsi_inquiry_data *inq_data) +scsi_op_desc(uint16_t opcode, struct scsi_inquiry_data *inq_data) { return(""); } @@ -3478,7 +3478,7 @@ scsi_sense_desc(int sense_key, int asc, int ascq, */ scsi_sense_action scsi_error_action(struct ccb_scsiio *csio, struct scsi_inquiry_data *inq_data, - u_int32_t sense_flags) + uint32_t sense_flags) { const struct asc_table_entry *asc_entry; const struct sense_key_table_entry *sense_entry; @@ -3571,7 +3571,7 @@ scsi_error_action(struct ccb_scsiio *csio, struct scsi_inquiry_data *inq_data, } char * -scsi_cdb_string(u_int8_t *cdb_ptr, char *cdb_string, size_t len) +scsi_cdb_string(uint8_t *cdb_ptr, char *cdb_string, size_t len) { struct sbuf sb; int error; @@ -3597,9 +3597,9 @@ scsi_cdb_string(u_int8_t *cdb_ptr, char *cdb_string, size_t len) } void -scsi_cdb_sbuf(u_int8_t *cdb_ptr, struct sbuf *sb) +scsi_cdb_sbuf(uint8_t *cdb_ptr, struct sbuf *sb) { - u_int8_t cdb_len; + uint8_t cdb_len; int i; if (cdb_ptr == NULL) @@ -5449,7 +5449,7 @@ scsi_get_ascq(struct scsi_sense_data *sense_data, u_int sense_len, void scsi_print_inquiry_sbuf(struct sbuf *sb, struct scsi_inquiry_data *inq_data) { - u_int8_t type; + uint8_t type; char *dtype, *qtype; type = SID_TYPE(inq_data); @@ -7630,9 +7630,9 @@ bailout: } void -scsi_test_unit_ready(struct ccb_scsiio *csio, u_int32_t retries, +scsi_test_unit_ready(struct ccb_scsiio *csio, uint32_t retries, void (*cbfcnp)(struct cam_periph *, union ccb *), - u_int8_t tag_action, u_int8_t sense_len, u_int32_t timeout) + uint8_t tag_action, uint8_t sense_len, uint32_t timeout) { struct scsi_test_unit_ready *scsi_cmd; @@ -7653,10 +7653,10 @@ scsi_test_unit_ready(struct ccb_scsiio *csio, u_int32_t retries, } void -scsi_request_sense(struct ccb_scsiio *csio, u_int32_t retries, +scsi_request_sense(struct ccb_scsiio *csio, uint32_t retries, void (*cbfcnp)(struct cam_periph *, union ccb *), - void *data_ptr, u_int8_t dxfer_len, u_int8_t tag_action, - u_int8_t sense_len, u_int32_t timeout) + void *data_ptr, uint8_t dxfer_len, uint8_t tag_action, + uint8_t sense_len, uint32_t timeout) { struct scsi_request_sense *scsi_cmd; @@ -7678,11 +7678,11 @@ scsi_request_sense(struct ccb_scsiio *csio, u_int32_t retries, } void -scsi_inquiry(struct ccb_scsiio *csio, u_int32_t retries, +scsi_inquiry(struct ccb_scsiio *csio, uint32_t retries, void (*cbfcnp)(struct cam_periph *, union ccb *), - u_int8_t tag_action, u_int8_t *inq_buf, u_int32_t inq_len, - int evpd, u_int8_t page_code, u_int8_t sense_len, - u_int32_t timeout) + uint8_t tag_action, uint8_t *inq_buf, uint32_t inq_len, + int evpd, uint8_t page_code, uint8_t sense_len, + uint32_t timeout) { struct scsi_inquiry *scsi_cmd; @@ -7737,7 +7737,7 @@ scsi_mode_sense_subpage(struct ccb_scsiio *csio, uint32_t retries, uint32_t param_len, int minimum_cmd_size, uint8_t sense_len, uint32_t timeout) { - u_int8_t cdb_len; + uint8_t cdb_len; /* * Use the smallest possible command to perform the operation. @@ -7787,11 +7787,11 @@ scsi_mode_sense_subpage(struct ccb_scsiio *csio, uint32_t retries, } void -scsi_mode_select(struct ccb_scsiio *csio, u_int32_t retries, +scsi_mode_select(struct ccb_scsiio *csio, uint32_t retries, void (*cbfcnp)(struct cam_periph *, union ccb *), - u_int8_t tag_action, int scsi_page_fmt, int save_pages, - u_int8_t *param_buf, u_int32_t param_len, u_int8_t sense_len, - u_int32_t timeout) + uint8_t tag_action, int scsi_page_fmt, int save_pages, + uint8_t *param_buf, uint32_t param_len, uint8_t sense_len, + uint32_t timeout) { scsi_mode_select_len(csio, retries, cbfcnp, tag_action, scsi_page_fmt, save_pages, param_buf, @@ -7799,14 +7799,14 @@ scsi_mode_select(struct ccb_scsiio *csio, u_int32_t retries, } void -scsi_mode_select_len(struct ccb_scsiio *csio, u_int32_t retries, +scsi_mode_select_len(struct ccb_scsiio *csio, uint32_t retries, void (*cbfcnp)(struct cam_periph *, union ccb *), - u_int8_t tag_action, int scsi_page_fmt, int save_pages, - u_int8_t *param_buf, u_int32_t param_len, - int minimum_cmd_size, u_int8_t sense_len, - u_int32_t timeout) + uint8_t tag_action, int scsi_page_fmt, int save_pages, + uint8_t *param_buf, uint32_t param_len, + int minimum_cmd_size, uint8_t sense_len, + uint32_t timeout) { - u_int8_t cdb_len; + uint8_t cdb_len; /* * Use the smallest possible command to perform the operation. @@ -7857,15 +7857,15 @@ scsi_mode_select_len(struct ccb_scsiio *csio, u_int32_t retries, } void -scsi_log_sense(struct ccb_scsiio *csio, u_int32_t retries, +scsi_log_sense(struct ccb_scsiio *csio, uint32_t retries, void (*cbfcnp)(struct cam_periph *, union ccb *), - u_int8_t tag_action, u_int8_t page_code, u_int8_t page, - int save_pages, int ppc, u_int32_t paramptr, - u_int8_t *param_buf, u_int32_t param_len, u_int8_t sense_len, - u_int32_t timeout) + uint8_t tag_action, uint8_t page_code, uint8_t page, + int save_pages, int ppc, uint32_t paramptr, + uint8_t *param_buf, uint32_t param_len, uint8_t sense_len, + uint32_t timeout) { struct scsi_log_sense *scsi_cmd; - u_int8_t cdb_len; + uint8_t cdb_len; scsi_cmd = (struct scsi_log_sense *)&csio->cdb_io.cdb_bytes; bzero(scsi_cmd, sizeof(*scsi_cmd)); @@ -7892,14 +7892,14 @@ scsi_log_sense(struct ccb_scsiio *csio, u_int32_t retries, } void -scsi_log_select(struct ccb_scsiio *csio, u_int32_t retries, +scsi_log_select(struct ccb_scsiio *csio, uint32_t retries, void (*cbfcnp)(struct cam_periph *, union ccb *), - u_int8_t tag_action, u_int8_t page_code, int save_pages, - int pc_reset, u_int8_t *param_buf, u_int32_t param_len, - u_int8_t sense_len, u_int32_t timeout) + uint8_t tag_action, uint8_t page_code, int save_pages, + int pc_reset, uint8_t *param_buf, uint32_t param_len, + uint8_t sense_len, uint32_t timeout) { struct scsi_log_select *scsi_cmd; - u_int8_t cdb_len; + uint8_t cdb_len; scsi_cmd = (struct scsi_log_select *)&csio->cdb_io.cdb_bytes; bzero(scsi_cmd, sizeof(*scsi_cmd)); @@ -7928,10 +7928,10 @@ scsi_log_select(struct ccb_scsiio *csio, u_int32_t retries, * Prevent or allow the user to remove the media */ void -scsi_prevent(struct ccb_scsiio *csio, u_int32_t retries, +scsi_prevent(struct ccb_scsiio *csio, uint32_t retries, void (*cbfcnp)(struct cam_periph *, union ccb *), - u_int8_t tag_action, u_int8_t action, - u_int8_t sense_len, u_int32_t timeout) + uint8_t tag_action, uint8_t action, + uint8_t sense_len, uint32_t timeout) { struct scsi_prevent *scsi_cmd; @@ -7954,11 +7954,11 @@ scsi_prevent(struct ccb_scsiio *csio, u_int32_t retries, /* XXX allow specification of address and PMI bit and LBA */ void -scsi_read_capacity(struct ccb_scsiio *csio, u_int32_t retries, +scsi_read_capacity(struct ccb_scsiio *csio, uint32_t retries, void (*cbfcnp)(struct cam_periph *, union ccb *), - u_int8_t tag_action, + uint8_t tag_action, struct scsi_read_capacity_data *rcap_buf, - u_int8_t sense_len, u_int32_t timeout) + uint8_t sense_len, uint32_t timeout) { struct scsi_read_capacity *scsi_cmd; @@ -7967,7 +7967,7 @@ scsi_read_capacity(struct ccb_scsiio *csio, u_int32_t retries, cbfcnp, /*flags*/CAM_DIR_IN, tag_action, - /*data_ptr*/(u_int8_t *)rcap_buf, + /*data_ptr*/(uint8_t *)rcap_buf, /*dxfer_len*/sizeof(*rcap_buf), sense_len, sizeof(*scsi_cmd), @@ -7992,7 +7992,7 @@ scsi_read_capacity_16(struct ccb_scsiio *csio, uint32_t retries, cbfcnp, /*flags*/CAM_DIR_IN, tag_action, - /*data_ptr*/(u_int8_t *)rcap_buf, + /*data_ptr*/(uint8_t *)rcap_buf, /*dxfer_len*/rcap_buf_len, sense_len, sizeof(*scsi_cmd), @@ -8010,11 +8010,11 @@ scsi_read_capacity_16(struct ccb_scsiio *csio, uint32_t retries, } void -scsi_report_luns(struct ccb_scsiio *csio, u_int32_t retries, +scsi_report_luns(struct ccb_scsiio *csio, uint32_t retries, void (*cbfcnp)(struct cam_periph *, union ccb *), - u_int8_t tag_action, u_int8_t select_report, - struct scsi_report_luns_data *rpl_buf, u_int32_t alloc_len, - u_int8_t sense_len, u_int32_t timeout) + uint8_t tag_action, uint8_t select_report, + struct scsi_report_luns_data *rpl_buf, uint32_t alloc_len, + uint8_t sense_len, uint32_t timeout) { struct scsi_report_luns *scsi_cmd; @@ -8023,7 +8023,7 @@ scsi_report_luns(struct ccb_scsiio *csio, u_int32_t retries, cbfcnp, /*flags*/CAM_DIR_IN, tag_action, - /*data_ptr*/(u_int8_t *)rpl_buf, + /*data_ptr*/(uint8_t *)rpl_buf, /*dxfer_len*/alloc_len, sense_len, sizeof(*scsi_cmd), @@ -8036,11 +8036,11 @@ scsi_report_luns(struct ccb_scsiio *csio, u_int32_t retries, } void -scsi_report_target_group(struct ccb_scsiio *csio, u_int32_t retries, +scsi_report_target_group(struct ccb_scsiio *csio, uint32_t retries, void (*cbfcnp)(struct cam_periph *, union ccb *), - u_int8_t tag_action, u_int8_t pdf, - void *buf, u_int32_t alloc_len, - u_int8_t sense_len, u_int32_t timeout) + uint8_t tag_action, uint8_t pdf, + void *buf, uint32_t alloc_len, + uint8_t sense_len, uint32_t timeout) { struct scsi_target_group *scsi_cmd; @@ -8049,7 +8049,7 @@ scsi_report_target_group(struct ccb_scsiio *csio, u_int32_t retries, cbfcnp, /*flags*/CAM_DIR_IN, tag_action, - /*data_ptr*/(u_int8_t *)buf, + /*data_ptr*/(uint8_t *)buf, /*dxfer_len*/alloc_len, sense_len, sizeof(*scsi_cmd), @@ -8062,11 +8062,11 @@ scsi_report_target_group(struct ccb_scsiio *csio, u_int32_t retries, } void -scsi_report_timestamp(struct ccb_scsiio *csio, u_int32_t retries, +scsi_report_timestamp(struct ccb_scsiio *csio, uint32_t retries, void (*cbfcnp)(struct cam_periph *, union ccb *), - u_int8_t tag_action, u_int8_t pdf, - void *buf, u_int32_t alloc_len, - u_int8_t sense_len, u_int32_t timeout) + uint8_t tag_action, uint8_t pdf, + void *buf, uint32_t alloc_len, + uint8_t sense_len, uint32_t timeout) { struct scsi_timestamp *scsi_cmd; @@ -8075,7 +8075,7 @@ scsi_report_timestamp(struct ccb_scsiio *csio, u_int32_t retries, cbfcnp, /*flags*/CAM_DIR_IN, tag_action, - /*data_ptr*/(u_int8_t *)buf, + /*data_ptr*/(uint8_t *)buf, /*dxfer_len*/alloc_len, sense_len, sizeof(*scsi_cmd), @@ -8088,10 +8088,10 @@ scsi_report_timestamp(struct ccb_scsiio *csio, u_int32_t retries, } void -scsi_set_target_group(struct ccb_scsiio *csio, u_int32_t retries, +scsi_set_target_group(struct ccb_scsiio *csio, uint32_t retries, void (*cbfcnp)(struct cam_periph *, union ccb *), - u_int8_t tag_action, void *buf, u_int32_t alloc_len, - u_int8_t sense_len, u_int32_t timeout) + uint8_t tag_action, void *buf, uint32_t alloc_len, + uint8_t sense_len, uint32_t timeout) { struct scsi_target_group *scsi_cmd; @@ -8100,7 +8100,7 @@ scsi_set_target_group(struct ccb_scsiio *csio, u_int32_t retries, cbfcnp, /*flags*/CAM_DIR_OUT, tag_action, - /*data_ptr*/(u_int8_t *)buf, + /*data_ptr*/(uint8_t *)buf, /*dxfer_len*/alloc_len, sense_len, sizeof(*scsi_cmd), @@ -8127,10 +8127,10 @@ scsi_create_timestamp(uint8_t *timestamp_6b_buf, } void -scsi_set_timestamp(struct ccb_scsiio *csio, u_int32_t retries, +scsi_set_timestamp(struct ccb_scsiio *csio, uint32_t retries, void (*cbfcnp)(struct cam_periph *, union ccb *), - u_int8_t tag_action, void *buf, u_int32_t alloc_len, - u_int8_t sense_len, u_int32_t timeout) + uint8_t tag_action, void *buf, uint32_t alloc_len, + uint8_t sense_len, uint32_t timeout) { struct scsi_timestamp *scsi_cmd; @@ -8139,7 +8139,7 @@ scsi_set_timestamp(struct ccb_scsiio *csio, u_int32_t retries, cbfcnp, /*flags*/CAM_DIR_OUT, tag_action, - /*data_ptr*/(u_int8_t *) buf, + /*data_ptr*/(uint8_t *) buf, /*dxfer_len*/alloc_len, sense_len, sizeof(*scsi_cmd), @@ -8157,11 +8157,11 @@ scsi_set_timestamp(struct ccb_scsiio *csio, u_int32_t retries, * the whole cache. */ void -scsi_synchronize_cache(struct ccb_scsiio *csio, u_int32_t retries, +scsi_synchronize_cache(struct ccb_scsiio *csio, uint32_t retries, void (*cbfcnp)(struct cam_periph *, union ccb *), - u_int8_t tag_action, u_int32_t begin_lba, - u_int16_t lb_count, u_int8_t sense_len, - u_int32_t timeout) + uint8_t tag_action, uint32_t begin_lba, + uint16_t lb_count, uint8_t sense_len, + uint32_t timeout) { struct scsi_sync_cache *scsi_cmd; @@ -8184,15 +8184,15 @@ scsi_synchronize_cache(struct ccb_scsiio *csio, u_int32_t retries, } void -scsi_read_write(struct ccb_scsiio *csio, u_int32_t retries, +scsi_read_write(struct ccb_scsiio *csio, uint32_t retries, void (*cbfcnp)(struct cam_periph *, union ccb *), - u_int8_t tag_action, int readop, u_int8_t byte2, - int minimum_cmd_size, u_int64_t lba, u_int32_t block_count, - u_int8_t *data_ptr, u_int32_t dxfer_len, u_int8_t sense_len, - u_int32_t timeout) + uint8_t tag_action, int readop, uint8_t byte2, + int minimum_cmd_size, uint64_t lba, uint32_t block_count, + uint8_t *data_ptr, uint32_t dxfer_len, uint8_t sense_len, + uint32_t timeout) { int read; - u_int8_t cdb_len; + uint8_t cdb_len; read = (readop & SCSI_RW_DIRMASK) == SCSI_RW_READ; @@ -8298,14 +8298,14 @@ scsi_read_write(struct ccb_scsiio *csio, u_int32_t retries, } void -scsi_write_same(struct ccb_scsiio *csio, u_int32_t retries, +scsi_write_same(struct ccb_scsiio *csio, uint32_t retries, void (*cbfcnp)(struct cam_periph *, union ccb *), - u_int8_t tag_action, u_int8_t byte2, - int minimum_cmd_size, u_int64_t lba, u_int32_t block_count, - u_int8_t *data_ptr, u_int32_t dxfer_len, u_int8_t sense_len, - u_int32_t timeout) + uint8_t tag_action, uint8_t byte2, + int minimum_cmd_size, uint64_t lba, uint32_t block_count, + uint8_t *data_ptr, uint32_t dxfer_len, uint8_t sense_len, + uint32_t timeout) { - u_int8_t cdb_len; + uint8_t cdb_len; if ((minimum_cmd_size < 16) && ((block_count & 0xffff) == block_count) && ((lba & 0xffffffff) == lba)) { @@ -8367,11 +8367,11 @@ scsi_write_same(struct ccb_scsiio *csio, u_int32_t retries, } void -scsi_ata_identify(struct ccb_scsiio *csio, u_int32_t retries, +scsi_ata_identify(struct ccb_scsiio *csio, uint32_t retries, void (*cbfcnp)(struct cam_periph *, union ccb *), - u_int8_t tag_action, u_int8_t *data_ptr, - u_int16_t dxfer_len, u_int8_t sense_len, - u_int32_t timeout) + uint8_t tag_action, uint8_t *data_ptr, + uint16_t dxfer_len, uint8_t sense_len, + uint32_t timeout) { scsi_ata_pass(csio, retries, @@ -8400,11 +8400,11 @@ scsi_ata_identify(struct ccb_scsiio *csio, u_int32_t retries, } void -scsi_ata_trim(struct ccb_scsiio *csio, u_int32_t retries, +scsi_ata_trim(struct ccb_scsiio *csio, uint32_t retries, void (*cbfcnp)(struct cam_periph *, union ccb *), - u_int8_t tag_action, u_int16_t block_count, - u_int8_t *data_ptr, u_int16_t dxfer_len, u_int8_t sense_len, - u_int32_t timeout) + uint8_t tag_action, uint16_t block_count, + uint8_t *data_ptr, uint16_t dxfer_len, uint8_t sense_len, + uint32_t timeout) { scsi_ata_pass_16(csio, retries, @@ -8533,9 +8533,9 @@ scsi_ata_pass(struct ccb_scsiio *csio, uint32_t retries, uint8_t protocol, uint8_t ata_flags, uint16_t features, uint16_t sector_count, uint64_t lba, uint8_t command, uint8_t device, uint8_t icc, uint32_t auxiliary, - uint8_t control, u_int8_t *data_ptr, uint32_t dxfer_len, + uint8_t control, uint8_t *data_ptr, uint32_t dxfer_len, uint8_t *cdb_storage, size_t cdb_storage_len, - int minimum_cmd_size, u_int8_t sense_len, u_int32_t timeout) + int minimum_cmd_size, uint8_t sense_len, uint32_t timeout) { uint32_t cam_flags; uint8_t *cdb_ptr; @@ -8698,13 +8698,13 @@ bailout: } void -scsi_ata_pass_16(struct ccb_scsiio *csio, u_int32_t retries, +scsi_ata_pass_16(struct ccb_scsiio *csio, uint32_t retries, void (*cbfcnp)(struct cam_periph *, union ccb *), - u_int32_t flags, u_int8_t tag_action, - u_int8_t protocol, u_int8_t ata_flags, u_int16_t features, - u_int16_t sector_count, uint64_t lba, u_int8_t command, - u_int8_t control, u_int8_t *data_ptr, u_int16_t dxfer_len, - u_int8_t sense_len, u_int32_t timeout) + uint32_t flags, uint8_t tag_action, + uint8_t protocol, uint8_t ata_flags, uint16_t features, + uint16_t sector_count, uint64_t lba, uint8_t command, + uint8_t control, uint8_t *data_ptr, uint16_t dxfer_len, + uint8_t sense_len, uint32_t timeout) { struct ata_pass_16 *ata_cmd; @@ -8742,11 +8742,11 @@ scsi_ata_pass_16(struct ccb_scsiio *csio, u_int32_t retries, } void -scsi_unmap(struct ccb_scsiio *csio, u_int32_t retries, +scsi_unmap(struct ccb_scsiio *csio, uint32_t retries, void (*cbfcnp)(struct cam_periph *, union ccb *), - u_int8_t tag_action, u_int8_t byte2, - u_int8_t *data_ptr, u_int16_t dxfer_len, u_int8_t sense_len, - u_int32_t timeout) + uint8_t tag_action, uint8_t byte2, + uint8_t *data_ptr, uint16_t dxfer_len, uint8_t sense_len, + uint32_t timeout) { struct scsi_unmap *scsi_cmd; @@ -8771,7 +8771,7 @@ scsi_unmap(struct ccb_scsiio *csio, u_int32_t retries, } void -scsi_receive_diagnostic_results(struct ccb_scsiio *csio, u_int32_t retries, +scsi_receive_diagnostic_results(struct ccb_scsiio *csio, uint32_t retries, void (*cbfcnp)(struct cam_periph *, union ccb*), uint8_t tag_action, int pcv, uint8_t page_code, uint8_t *data_ptr, uint16_t allocation_length, @@ -8801,7 +8801,7 @@ scsi_receive_diagnostic_results(struct ccb_scsiio *csio, u_int32_t retries, } void -scsi_send_diagnostic(struct ccb_scsiio *csio, u_int32_t retries, +scsi_send_diagnostic(struct ccb_scsiio *csio, uint32_t retries, void (*cbfcnp)(struct cam_periph *, union ccb *), uint8_t tag_action, int unit_offline, int device_offline, int self_test, int page_format, int self_test_code, @@ -8842,7 +8842,7 @@ scsi_send_diagnostic(struct ccb_scsiio *csio, u_int32_t retries, } void -scsi_get_physical_element_status(struct ccb_scsiio *csio, u_int32_t retries, +scsi_get_physical_element_status(struct ccb_scsiio *csio, uint32_t retries, void (*cbfcnp)(struct cam_periph *, union ccb *), uint8_t tag_action, uint8_t *data_ptr, uint16_t allocation_length, uint8_t report_type, @@ -8871,7 +8871,7 @@ scsi_get_physical_element_status(struct ccb_scsiio *csio, u_int32_t retries, } void -scsi_remove_element_and_truncate(struct ccb_scsiio *csio, u_int32_t retries, +scsi_remove_element_and_truncate(struct ccb_scsiio *csio, uint32_t retries, void (*cbfcnp)(struct cam_periph *, union ccb *), uint8_t tag_action, uint64_t requested_capacity, uint32_t element_id, @@ -8899,7 +8899,7 @@ scsi_remove_element_and_truncate(struct ccb_scsiio *csio, u_int32_t retries, } void -scsi_restore_elements_and_rebuild(struct ccb_scsiio *csio, u_int32_t retries, +scsi_restore_elements_and_rebuild(struct ccb_scsiio *csio, uint32_t retries, void (*cbfcnp)(struct cam_periph *, union ccb *), uint8_t tag_action, uint8_t sense_len, uint32_t timeout) @@ -8924,10 +8924,10 @@ scsi_restore_elements_and_rebuild(struct ccb_scsiio *csio, u_int32_t retries, } void -scsi_read_buffer(struct ccb_scsiio *csio, u_int32_t retries, +scsi_read_buffer(struct ccb_scsiio *csio, uint32_t retries, void (*cbfcnp)(struct cam_periph *, union ccb*), uint8_t tag_action, int mode, - uint8_t buffer_id, u_int32_t offset, + uint8_t buffer_id, uint32_t offset, uint8_t *data_ptr, uint32_t allocation_length, uint8_t sense_len, uint32_t timeout) { @@ -8954,10 +8954,10 @@ scsi_read_buffer(struct ccb_scsiio *csio, u_int32_t retries, } void -scsi_write_buffer(struct ccb_scsiio *csio, u_int32_t retries, +scsi_write_buffer(struct ccb_scsiio *csio, uint32_t retries, void (*cbfcnp)(struct cam_periph *, union ccb *), uint8_t tag_action, int mode, - uint8_t buffer_id, u_int32_t offset, + uint8_t buffer_id, uint32_t offset, uint8_t *data_ptr, uint32_t param_list_length, uint8_t sense_len, uint32_t timeout) { @@ -8984,10 +8984,10 @@ scsi_write_buffer(struct ccb_scsiio *csio, u_int32_t retries, } void -scsi_start_stop(struct ccb_scsiio *csio, u_int32_t retries, +scsi_start_stop(struct ccb_scsiio *csio, uint32_t retries, void (*cbfcnp)(struct cam_periph *, union ccb *), - u_int8_t tag_action, int start, int load_eject, - int immediate, u_int8_t sense_len, u_int32_t timeout) + uint8_t tag_action, int start, int load_eject, + int immediate, uint8_t sense_len, uint32_t timeout) { struct scsi_start_stop_unit *scsi_cmd; int extra_flags = 0; @@ -9018,13 +9018,13 @@ scsi_start_stop(struct ccb_scsiio *csio, u_int32_t retries, } void -scsi_read_attribute(struct ccb_scsiio *csio, u_int32_t retries, +scsi_read_attribute(struct ccb_scsiio *csio, uint32_t retries, void (*cbfcnp)(struct cam_periph *, union ccb *), - u_int8_t tag_action, u_int8_t service_action, - uint32_t element, u_int8_t elem_type, int logical_volume, - int partition, u_int32_t first_attribute, int cache, - u_int8_t *data_ptr, u_int32_t length, int sense_len, - u_int32_t timeout) + uint8_t tag_action, uint8_t service_action, + uint32_t element, uint8_t elem_type, int logical_volume, + int partition, uint32_t first_attribute, int cache, + uint8_t *data_ptr, uint32_t length, int sense_len, + uint32_t timeout) { struct scsi_read_attribute *scsi_cmd; @@ -9055,11 +9055,11 @@ scsi_read_attribute(struct ccb_scsiio *csio, u_int32_t retries, } void -scsi_write_attribute(struct ccb_scsiio *csio, u_int32_t retries, +scsi_write_attribute(struct ccb_scsiio *csio, uint32_t retries, void (*cbfcnp)(struct cam_periph *, union ccb *), - u_int8_t tag_action, uint32_t element, int logical_volume, - int partition, int wtc, u_int8_t *data_ptr, - u_int32_t length, int sense_len, u_int32_t timeout) + uint8_t tag_action, uint32_t element, int logical_volume, + int partition, int wtc, uint8_t *data_ptr, + uint32_t length, int sense_len, uint32_t timeout) { struct scsi_write_attribute *scsi_cmd; diff --git a/sys/cam/scsi/scsi_all.h b/sys/cam/scsi/scsi_all.h index 37a58fda433e..2fec4f0b7553 100644 --- a/sys/cam/scsi/scsi_all.h +++ b/sys/cam/scsi/scsi_all.h @@ -117,26 +117,26 @@ typedef enum { struct scsi_generic { - u_int8_t opcode; - u_int8_t bytes[11]; + uint8_t opcode; + uint8_t bytes[11]; }; struct scsi_request_sense { - u_int8_t opcode; - u_int8_t byte2; + uint8_t opcode; + uint8_t byte2; #define SRS_DESC 0x01 - u_int8_t unused[2]; - u_int8_t length; - u_int8_t control; + uint8_t unused[2]; + uint8_t length; + uint8_t control; }; struct scsi_test_unit_ready { - u_int8_t opcode; - u_int8_t byte2; - u_int8_t unused[3]; - u_int8_t control; + uint8_t opcode; + uint8_t byte2; + uint8_t unused[3]; + uint8_t control; }; struct scsi_receive_diag { @@ -170,30 +170,30 @@ struct scsi_send_diag { struct scsi_sense { - u_int8_t opcode; - u_int8_t byte2; - u_int8_t unused[2]; - u_int8_t length; - u_int8_t control; + uint8_t opcode; + uint8_t byte2; + uint8_t unused[2]; + uint8_t length; + uint8_t control; }; struct scsi_inquiry { - u_int8_t opcode; - u_int8_t byte2; + uint8_t opcode; + uint8_t byte2; #define SI_EVPD 0x01 #define SI_CMDDT 0x02 - u_int8_t page_code; - u_int8_t length[2]; - u_int8_t control; + uint8_t page_code; + uint8_t length[2]; + uint8_t control; }; struct scsi_mode_sense_6 { - u_int8_t opcode; - u_int8_t byte2; + uint8_t opcode; + uint8_t byte2; #define SMS_DBD 0x08 - u_int8_t page; + uint8_t page; #define SMS_PAGE_CODE 0x3F #define SMS_VENDOR_SPECIFIC_PAGE 0x00 #define SMS_DISCONNECT_RECONNECT_PAGE 0x02 @@ -210,44 +210,44 @@ struct scsi_mode_sense_6 #define SMS_PAGE_CTRL_CHANGEABLE 0x40 #define SMS_PAGE_CTRL_DEFAULT 0x80 #define SMS_PAGE_CTRL_SAVED 0xC0 - u_int8_t subpage; + uint8_t subpage; #define SMS_SUBPAGE_PAGE_0 0x00 #define SMS_SUBPAGE_ALL 0xff - u_int8_t length; - u_int8_t control; + uint8_t length; + uint8_t control; }; struct scsi_mode_sense_10 { - u_int8_t opcode; - u_int8_t byte2; /* same bits as small version */ + uint8_t opcode; + uint8_t byte2; /* same bits as small version */ #define SMS10_LLBAA 0x10 - u_int8_t page; /* same bits as small version */ - u_int8_t subpage; - u_int8_t unused[3]; - u_int8_t length[2]; - u_int8_t control; + uint8_t page; /* same bits as small version */ + uint8_t subpage; + uint8_t unused[3]; + uint8_t length[2]; + uint8_t control; }; struct scsi_mode_select_6 { - u_int8_t opcode; - u_int8_t byte2; + uint8_t opcode; + uint8_t byte2; #define SMS_SP 0x01 #define SMS_RTD 0x02 #define SMS_PF 0x10 - u_int8_t unused[2]; - u_int8_t length; - u_int8_t control; + uint8_t unused[2]; + uint8_t length; + uint8_t control; }; struct scsi_mode_select_10 { - u_int8_t opcode; - u_int8_t byte2; /* same bits as small version */ - u_int8_t unused[5]; - u_int8_t length[2]; - u_int8_t control; + uint8_t opcode; + uint8_t byte2; /* same bits as small version */ + uint8_t unused[5]; + uint8_t length[2]; + uint8_t control; }; /* @@ -255,68 +255,68 @@ struct scsi_mode_select_10 */ struct scsi_mode_hdr_6 { - u_int8_t datalen; - u_int8_t medium_type; - u_int8_t dev_specific; - u_int8_t block_descr_len; + uint8_t datalen; + uint8_t medium_type; + uint8_t dev_specific; + uint8_t block_descr_len; }; struct scsi_mode_hdr_10 { - u_int8_t datalen[2]; - u_int8_t medium_type; - u_int8_t dev_specific; - u_int8_t flags; + uint8_t datalen[2]; + uint8_t medium_type; + uint8_t dev_specific; + uint8_t flags; #define SMH_LONGLBA 0x01 - u_int8_t reserved; - u_int8_t block_descr_len[2]; + uint8_t reserved; + uint8_t block_descr_len[2]; }; struct scsi_mode_block_descr { - u_int8_t density_code; - u_int8_t num_blocks[3]; - u_int8_t reserved; - u_int8_t block_len[3]; + uint8_t density_code; + uint8_t num_blocks[3]; + uint8_t reserved; + uint8_t block_len[3]; }; struct scsi_mode_block_descr_dshort { - u_int8_t num_blocks[4]; - u_int8_t reserved; - u_int8_t block_len[3]; + uint8_t num_blocks[4]; + uint8_t reserved; + uint8_t block_len[3]; }; struct scsi_mode_block_descr_dlong { - u_int8_t num_blocks[8]; - u_int8_t reserved[4]; - u_int8_t block_len[4]; + uint8_t num_blocks[8]; + uint8_t reserved[4]; + uint8_t block_len[4]; }; struct scsi_per_res_in { - u_int8_t opcode; - u_int8_t action; + uint8_t opcode; + uint8_t action; #define SPRI_RK 0x00 #define SPRI_RR 0x01 #define SPRI_RC 0x02 #define SPRI_RS 0x03 - u_int8_t reserved[5]; - u_int8_t length[2]; + uint8_t reserved[5]; + uint8_t length[2]; #define SPRI_MAX_LEN 0xffff - u_int8_t control; + uint8_t control; }; struct scsi_per_res_in_header { - u_int8_t generation[4]; - u_int8_t length[4]; + uint8_t generation[4]; + uint8_t length[4]; }; struct scsi_per_res_key { - u_int8_t key[8]; + uint8_t key[8]; }; struct scsi_per_res_in_keys @@ -398,8 +398,8 @@ struct scsi_per_res_in_full struct scsi_per_res_out { - u_int8_t opcode; - u_int8_t action; + uint8_t opcode; + uint8_t action; #define SPRO_REGISTER 0x00 #define SPRO_RESERVE 0x01 #define SPRO_RELEASE 0x02 @@ -410,7 +410,7 @@ struct scsi_per_res_out #define SPRO_REG_MOVE 0x07 #define SPRO_REPL_LOST_RES 0x08 #define SPRO_ACTION_MASK 0x1f - u_int8_t scope_type; + uint8_t scope_type; #define SPR_SCOPE_MASK 0xf0 #define SPR_SCOPE_SHIFT 4 #define SPR_LU_SCOPE 0x00 @@ -426,28 +426,28 @@ struct scsi_per_res_out #define SPR_TYPE_EX_AC_RO 0x06 #define SPR_TYPE_WR_EX_AR 0x07 #define SPR_TYPE_EX_AC_AR 0x08 - u_int8_t reserved[2]; - u_int8_t length[4]; - u_int8_t control; + uint8_t reserved[2]; + uint8_t length[4]; + uint8_t control; }; struct scsi_per_res_out_parms { struct scsi_per_res_key res_key; - u_int8_t serv_act_res_key[8]; - u_int8_t scope_spec_address[4]; - u_int8_t flags; + uint8_t serv_act_res_key[8]; + uint8_t scope_spec_address[4]; + uint8_t flags; #define SPR_SPEC_I_PT 0x08 #define SPR_ALL_TG_PT 0x04 #define SPR_APTPL 0x01 - u_int8_t reserved1; - u_int8_t extent_length[2]; - u_int8_t transport_id_list[]; + uint8_t reserved1; + uint8_t extent_length[2]; + uint8_t transport_id_list[]; }; struct scsi_per_res_out_trans_ids { - u_int8_t additional_length[4]; - u_int8_t transport_ids[]; + uint8_t additional_length[4]; + uint8_t transport_ids[]; }; /* @@ -457,14 +457,14 @@ struct scsi_per_res_out_trans_ids { struct scsi_per_res_reg_move { struct scsi_per_res_key res_key; - u_int8_t serv_act_res_key[8]; - u_int8_t reserved; - u_int8_t flags; + uint8_t serv_act_res_key[8]; + uint8_t reserved; + uint8_t flags; #define SPR_REG_MOVE_UNREG 0x02 #define SPR_REG_MOVE_APTPL 0x01 - u_int8_t rel_trgt_port_id[2]; - u_int8_t transport_id_length[4]; - u_int8_t transport_id[]; + uint8_t rel_trgt_port_id[2]; *** 6210 LINES SKIPPED ***