From nobody Thu Jan 8 06:24:36 2026 X-Original-To: dev-commits-src-all@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 4dmvyF6GhJz5hsfW for ; Thu, 08 Jan 2026 06:24:37 +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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dmvyF0NScz3SBX for ; Thu, 08 Jan 2026 06:24:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767853477; 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=SHtjX05Mgin1bg7VmlENpy3lCiWnUxzeroKglIsTals=; b=Dpf+Pn3+e/ftSpayw3i3vcxg1ezKWh7LSsBV5IltojZY/HOrhPamSW48NDgjDuDJFaqFnJ yW4owPDRUbfngldf+uoYr9864eFCA18Oy1wDu4blccBbsUTYATqxvrQPBXX7R+QiAGZr4j Q+pf4HIGdIcuIOUQVKZjFOVGFZaFnHCgwPFn8nZoKg4Ho7V55L0V2zDxA/2G0VwpsTrKhv D4iuvYgCTFv0hDgo6p6J948eylsoPItqnL0opYlwIVHP1afgx0BtuzJQnbTXrvT25F5Qax sJYSQPDe3hhtF1rL56t/0SKslh698BMM5FasF0aFp3F//A7HJX2PWUHJmn54RQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767853477; 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=SHtjX05Mgin1bg7VmlENpy3lCiWnUxzeroKglIsTals=; b=hUjWFP1U/jG6SVph1NZquhNPfSg0+jf0OUM8h1A538X7FuULGoMlQA78aO2EaoydKMCW0B FGkgIHAaHp6zRoCSq5v4U/LKwC7bQVznOWLB1OPkGZDlDz06xC40U6JGo88pqZa6BMi/U6 oFxoeb4VyBmHnrykYuB/MVFbpXtc2JRF/s6zHkXXTRwuL+njG7+4U663o1h8uPq7y7TNcp NOeUsI3SlFkjNFuVhypwwFe4md/a9oh1sB5RefhE03oEVHK+bPxeUcFdOggMSjiCCgl3sf G5M9D8vXPg7LyeDP3dUFp2nDbVrcNlgt+sWKpgWR4ehHZE/+NOkbJ0iUTMlWXg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767853477; a=rsa-sha256; cv=none; b=NEZsQElSFS5DiffrzbLNSHnUOlE5z7AOtemNPE2zZOj9ipL6QcnUS+sZRWycQWmOfDsAXp mdnQoDjKLO2LFvXxqy6mmKLVWx4cb0LF0RH4I0IhDnNsvVxZIoZqDLLk/jboJNVsbZIQ0K IuOQ0wXuHkBRJcLRPb4SAWd7o63QS6rpMV5TK5KeYVPB6wIFs3kZ+PRDD3fxhh0TAXlY5a RKK+Z3f/2J49CEjTDZqdQcCKNQ0auTQtPFtlG6gKvGOlijqLXpmYmwFkmYMwuc74rH5qzg uJbPx2oOaubZX2H7jQbkIqSkwyoUA4lgaDmTf3BJ+r7wjCNVyeGcmRrui2q6Zw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dmvyD36hrzBpP for ; Thu, 08 Jan 2026 06:24:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38be1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 08 Jan 2026 06:24:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: aaec2a90b5ce - main - cam: When inq data isn't valid, pass NULL List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: aaec2a90b5cecd38520ecb0ffa23f116d36933f3 Auto-Submitted: auto-generated Date: Thu, 08 Jan 2026 06:24:36 +0000 Message-Id: <695f4da4.38be1.3f82b91@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=aaec2a90b5cecd38520ecb0ffa23f116d36933f3 commit aaec2a90b5cecd38520ecb0ffa23f116d36933f3 Author: Warner Losh AuthorDate: 2026-01-08 06:19:21 +0000 Commit: Warner Losh CommitDate: 2026-01-08 06:19:21 +0000 cam: When inq data isn't valid, pass NULL When the device isn't there, we don't have valid inq data. Pass NULL in this case. All the routines that receive this test against NULL already. Sponsored by: Netflix Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D54470 --- sys/cam/scsi/scsi_all.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/sys/cam/scsi/scsi_all.c b/sys/cam/scsi/scsi_all.c index 4ea2ab7d4acd..d8bba97e79bc 100644 --- a/sys/cam/scsi/scsi_all.c +++ b/sys/cam/scsi/scsi_all.c @@ -3711,13 +3711,12 @@ scsi_command_string(struct cam_device *device, struct ccb_scsiio *csio, xpt_gdev_type(cgd, csio->ccb_h.path); /* - * If the device is unconfigured, just pretend that it is a hard - * drive. scsi_op_desc() needs this. + * If the device is unconfigured, the inq data is invalid. */ if (cgd->ccb_h.status == CAM_DEV_NOT_THERE) - cgd->inq_data.device = T_DIRECT; - - inq_data = &cgd->inq_data; + inq_data = NULL; + else + inq_data = &cgd->inq_data; #else /* !_KERNEL */ @@ -5170,13 +5169,12 @@ scsi_sense_sbuf(struct cam_device *device, struct ccb_scsiio *csio, xpt_gdev_type(cgd, csio->ccb_h.path); /* - * If the device is unconfigured, just pretend that it is a hard - * drive. scsi_op_desc() needs this. + * If the device is unconfigured, the inq data is invalid. */ if (cgd->ccb_h.status == CAM_DEV_NOT_THERE) - cgd->inq_data.device = T_DIRECT; - - inq_data = &cgd->inq_data; + inq_data = NULL; + else + inq_data = &cgd->inq_data; #else /* !_KERNEL */