From 10d2c6b32ad1ecf5e27987d46d46acbd2994a396 Mon Sep 17 00:00:00 2001 From: dlg Date: Wed, 19 Apr 2023 01:46:10 +0000 Subject: [PATCH] dont advertise non-removable sdmmc devices as removable to the scsi layer. this is cosmetic more than anything cos it gets rid of "removable" in dmesg output when sd attaches. --- sys/dev/sdmmc/sdmmc_scsi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/dev/sdmmc/sdmmc_scsi.c b/sys/dev/sdmmc/sdmmc_scsi.c index c3bd7ccbcd1..5a50803b218 100644 --- a/sys/dev/sdmmc/sdmmc_scsi.c +++ b/sys/dev/sdmmc/sdmmc_scsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sdmmc_scsi.c,v 1.62 2023/04/19 01:42:13 dlg Exp $ */ +/* $OpenBSD: sdmmc_scsi.c,v 1.63 2023/04/19 01:46:10 dlg Exp $ */ /* * Copyright (c) 2006 Uwe Stuehler @@ -442,7 +442,8 @@ sdmmc_inquiry(struct scsi_xfer *xs) memset(&inq, 0, sizeof inq); inq.device = T_DIRECT; - inq.dev_qual2 = SID_REMOVABLE; + if (!ISSET(sc->sc_caps, SMC_CAPS_NONREMOVABLE)) + inq.dev_qual2 = SID_REMOVABLE; inq.version = SCSI_REV_2; inq.response_format = SID_SCSI2_RESPONSE; inq.additional_length = SID_SCSI2_ALEN; -- 2.20.1