From nobody Mon Feb 24 05:59:53 2025 X-Original-To: scsi@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 4Z1VST2PC9z5pphs for ; Mon, 24 Feb 2025 05:59:53 +0000 (UTC) (envelope-from bugzilla-noreply@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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Z1VST1kg4z40dr for ; Mon, 24 Feb 2025 05:59:53 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1740376793; 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: in-reply-to:in-reply-to:references:references; bh=Ss4YnZmWoKrgOfBpbUv7YQAIOkXDvZtnTIj9vzZ4n4g=; b=LqnkQTppH+ivhi3iYC4kBr6sQrOKiOKyknKEzkL0MVze0uSP6kSJzzpJZMvsBQkVoWt8E8 C7VKJuHvUZmBrD7i4jopEQDyHBVUuPBbuy631gHfLfTFXo82khukktBpL7ZDBXkUNoRbzw ngZ3GhF2CE1qO0Jp5bB40RvBTvlhm119vCPWS+sak7rmCEgkazDHeq8fIA8dbv5OrwNuRu MHBOhVBTSeyCJvTSN0GaNkJpC6uWgXwK5xXrV8seRbIJshePxchpkp506aqJUIU0TJgZ9J GsQnxIEcr45qUgY90mBZDpcZgbAM3Lg1QluNM6nal8YNWF2H4Ayckb26CxONyw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1740376793; a=rsa-sha256; cv=none; b=J+m3J7Ikuj6TD9dQ/cto58u9+WVKXpJglqgzA6aISFJiVd9QG8MYQl4+lTOpyCkBxmGZ2B Ny+0cCe/DnpvChdcNxjg8QUctPtgTqT73lGvYxuIVYGLQNqo4cuAj9j8PdBRtsCh4tH0nx Mcjp9EJvYjDeTkBwNwwBDze67wPch/BIgGZqiYCwZJYdPFhW61ND5Yj4JgH4K3Y5T5nQWk OID+rCn8idjuTh4kW8V+XM95+4+T9sfdT0ycIwu8qXhu2McBpwWiZzgPhPy9z0mxa9iB60 YIyAPq/ObbyD2V8XReH0IF7ZlRs+rWM2v70ZHP0W7ouoZ3qz2DBwbJ7n1x6R8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1740376793; 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: in-reply-to:in-reply-to:references:references; bh=Ss4YnZmWoKrgOfBpbUv7YQAIOkXDvZtnTIj9vzZ4n4g=; b=NGHQ/kI0qyTJ02ibDu8F2/LBn9d6JQYg2zHxzwAcj56kEQUbiUZ5PpiatWxYFqrhQKdXMI NOmmue2GWrZ7J2+Mto8n4nH6p4U8GREI53dJqmzOShv1QXobS7f+VwIUuhW+i2k8fL/bl7 Nok/QqnLWehTKtIrBr7WOIG9E4b0jNRtdX373tzKwwE8CMTefkKZ5AhSyWYlhBdbGDnLMj uQC/cWYrgFtr7xd6NQcP1rrxOvE28TetSWxXfRN75Ts1IvFRh0ef2p/xCR4HpFKvbA/znx roVHxTvElsdHi9KyLzkmp+u5HEMAlhlb8Wz6YHzLUTwHjIVy711wp3Wo+7DeWw== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 4Z1VST12J7zBVq for ; Mon, 24 Feb 2025 05:59:53 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 51O5xqws084511 for ; Mon, 24 Feb 2025 05:59:52 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 51O5xqE8084510 for scsi@FreeBSD.org; Mon, 24 Feb 2025 05:59:52 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: scsi@FreeBSD.org Subject: [Bug 193696] CAM AC_FOUND_DEVICE calls malloc(M_WAITOK) from THREAD_NO_SLEEPING() context Date: Mon, 24 Feb 2025 05:59:53 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: linimon@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: scsi@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.isobsolete attachments.created Message-ID: In-Reply-To: References: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: SCSI subsystem List-Archive: https://lists.freebsd.org/archives/freebsd-scsi List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-scsi@freebsd.org Sender: owner-freebsd-scsi@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D193696 Mark Linimon changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #147387|0 |1 is obsolete| | --- Comment #8 from Mark Linimon --- Created attachment 257799 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D257799&action= =3Dedit malloc M_WAITOK patch to assert THREAD_CAN_SLEEP ^Triage: rebase patch. --=20 You are receiving this mail because: You are the assignee for the bug.= From nobody Mon Feb 24 06:40:49 2025 X-Original-To: scsi@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 4Z1WMj4NYQz5ptWc for ; Mon, 24 Feb 2025 06:40:49 +0000 (UTC) (envelope-from bugzilla-noreply@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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Z1WMj3rRrz3ChY for ; Mon, 24 Feb 2025 06:40:49 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1740379249; 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: in-reply-to:in-reply-to:references:references; bh=I+/2hGBn/nqC8flAsRYccfVXkrjE3McAHcJV0jthgcc=; b=fiVISHhd2mO1So7vjwOn7RGaSSRWDQw0kCbTIq6HJubvCuFqkiSR9D2EfBnCvf/fZ8caO4 EJ0fyABLdP84xgr0tR31pWI9GGIpvIBXdNaNubh9V41JYtLR5wms7z1/yFukisRMuIQmgn PF1N+iHeuDHlIvuvxn/ZSJBQxdmB3Lyy8HkISe7yywJALBdNW2ehSQEihnZzj1JZ9gS+mS gIgTl7yN6YKlJQhtYdJd7R5+IJP8kIljpNHwpRXMXIFoJ+oTGLSCdNuIUkk6RZgbPIgkDo 3H1Tr3v2KZMXrvl9l4zosMe+mnevHoWgqn3UpDU0MUK9fm4Zz598nBCLvljl2g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1740379249; a=rsa-sha256; cv=none; b=Z2VPbXtfgF5oMLhJXYNAJVHwQ8SbVXc5/ayQ7OigSCBCfNmUpPJaBdzaRNI0BhZoHOEEdT 9iWSW3Xdnw8nqxQvUA6VeXqXT0aZBZuefjzh8DEUFcjZEXWEL4R9YLfw1KJcg4dWEcPueM VCeTj1J5WPTnDhbq1V3tLwmHSzUz/22X4XY3GRk4cKnhL21c5FWe6DMKABAC/ikAfzFMcF /eVA8yHqnl0rte7xI4RB0uVxkjqwnTrYRGd6+FStw7qf7DBDXuEYQlc7mVLAy/JHWoibOn 1qq2iVzpnyKO7cHScelvNZqfQ4weo1vQ1+hPtwrPxYOgwtOA/nC0ru2f2hEDYA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1740379249; 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: in-reply-to:in-reply-to:references:references; bh=I+/2hGBn/nqC8flAsRYccfVXkrjE3McAHcJV0jthgcc=; b=UwQpsq4WplbUmWYuNn9L0fNC0sdsI66ukXSl77bk1LEmhJ91pwSwlhC3Ts7l4pvcspXTZ4 gskHnd4tLgTf36o0PFOInypipwn7kV3+kNZ8dURtWo0bxLSh2V6PGiysMlath50fhtzGSf Hz870yLdiDZpmaHslQqe1M70DO2r276QTJTXAF0RLA/1WOnEB6gC55biIl8ekmxT0kOlFe GOvWGAl6kIfGZoIjXd4g1AXxJzCRDkrUXRCF7l5REwK6/BaRPhqk1dur+MQUAL98+wZdUL IuGfB3webPexFVeidr3OBaqyApFPXkwxxGV91ZZB7lpLpvj9Rp1cglXG/EoR/g== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 4Z1WMj3MX3zCyj for ; Mon, 24 Feb 2025 06:40:49 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 51O6enTt069089 for ; Mon, 24 Feb 2025 06:40:49 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 51O6enSE069088 for scsi@FreeBSD.org; Mon, 24 Feb 2025 06:40:49 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: scsi@FreeBSD.org Subject: [Bug 193696] CAM AC_FOUND_DEVICE calls malloc(M_WAITOK) from THREAD_NO_SLEEPING() context Date: Mon, 24 Feb 2025 06:40:49 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: imp@FreeBSD.org X-Bugzilla-Status: Closed X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: scsi@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cc resolution Message-ID: In-Reply-To: References: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: SCSI subsystem List-Archive: https://lists.freebsd.org/archives/freebsd-scsi List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-scsi@freebsd.org Sender: owner-freebsd-scsi@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D193696 Warner Losh changed: What |Removed |Added ---------------------------------------------------------------------------- Status|New |Closed CC| |imp@FreeBSD.org Resolution|--- |FIXED --- Comment #9 from Warner Losh --- I don't think that you rebased correctly. that patch won't apply, and simil= ar code has already been added. Also, I fixed the async events to run in a sleepable context to avoid these (and other) problems. We had a lot of drives that disappeared on us and use= d to panic before these (and other) changes. I think the second traceback is fix= ed by a different set of patches than the first one (since the async commands don't go through adadone). So I think we can close it in a few different ways as fixed. --=20 You are receiving this mail because: You are the assignee for the bug.= From nobody Wed Feb 26 21:17:08 2025 X-Original-To: freebsd-scsi@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 4Z36kD0yxtz5nvqP for ; Wed, 26 Feb 2025 21:17:24 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Z36kB1nMDz3r2N for ; Wed, 26 Feb 2025 21:17:22 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20230601.gappssmtp.com header.s=20230601 header.b=t3s1WEP3; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::1032) smtp.mailfrom=wlosh@bsdimp.com Received: by mail-pj1-x1032.google.com with SMTP id 98e67ed59e1d1-2fe82414cf7so607826a91.0 for ; Wed, 26 Feb 2025 13:17:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1740604640; x=1741209440; darn=freebsd.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=neYFRrLhsNldosyqvqhVGRKM5ZMz4ni8WI7GqaxFdSc=; b=t3s1WEP3FGvWLGl3vGsqFf7uk8nsJTHZyw0y6i8J3hGg8cH0AMMuZWnhUFTVHM0Iq5 n7TUuPXiIHl9NjEP7rcq3derrM1Qmks7emFLWxUC3xpgCphqK7os0wq2KzrBhkUO+LcX srEHZd/FqSn1P8QYoUW0m0bqaqS5d3l5YBep8V5aitQ3jP+3zjhIjnm7OV+o3t9Yiwoi 5MA6p2o6RDvvhW3gEM70rlYsqJvlWd0iWXE+LmIT3aAHb4+mwYtyjidrqjILmanOX/eQ 9Q9O/S3q06ZLoxw1OU8raum8v1uk+cWrH2x0OCjsr0kblP2Q0GeY+xxPG8opwuk/MQZ1 CdSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740604640; x=1741209440; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=neYFRrLhsNldosyqvqhVGRKM5ZMz4ni8WI7GqaxFdSc=; b=tF7SrqasB+pgbKX8pQvYN0u9jKohZN69ZatireRphD6sFKmNjwRZvf2RyG4Fd+WLXT aWHlcdqdGNK26bCX6eh1TGDBiBKYbJoKbA+mc3y0s2FzUnYHaiOrSvtj/NDwBuMXLx7H JM5dordkNQNcQCApBOGrvNNtvFdi3MndEU3DwcniZf5ID8O+XXXytPmDQEYRyhEgrk0w c6z3yAAJG9+NQYClX1Ck8fMC6C3q2Dcfi/LNS0zXm7lW5//BuEBsTxHoS084XaHx+9k3 T/kGrrZdkMVplo0R44PG4Hx57zuYlFOrXCoiiD+EeIAIoPurNxaNrldwQY0ottPKhZNs fjaQ== X-Gm-Message-State: AOJu0YwM5eaoikhq2w1G7F8nztdmvmG0sGbjvrO3ATLdiJXH5SC6KS11 RgYNpJ9ia7GCZEebgsrl06f4aPUbjac5ZTnFFHV7EAMuXiFSvBlhQ6niUTnTT0wwEoomXc0MmBY FP9rYX+samQtJ5Jz4xJ1IVIHByecjIUIrjPpd3ziKZatPKddfxIg= X-Gm-Gg: ASbGncsxfQBC3hISPBE0i9GuYQTJDVhuCLiq5GzeNgHm54diz4DSK8G5oWTf/2hsnPq NjIRi8yEmOCVq3m3jEDwNbqxC/DGG+qbcYQBcqzjCL5kbDFgScO0xXS6aRK3slhjYIseXtwpf9u CGliT2D7A= X-Google-Smtp-Source: AGHT+IHD9SkjTub56K7iUwPe7L8UHljU+4ptUEvPXdG+Z2hhCAVCPDsLqKXFOBLrmgqVS2TtULUyDLxRgAxcQN0TJ0k= X-Received: by 2002:a17:90b:540c:b0:2ea:83a0:47a5 with SMTP id 98e67ed59e1d1-2fe68acd777mr13343718a91.4.1740604640122; Wed, 26 Feb 2025 13:17:20 -0800 (PST) List-Id: SCSI subsystem List-Archive: https://lists.freebsd.org/archives/freebsd-scsi List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-scsi@freebsd.org Sender: owner-freebsd-scsi@FreeBSD.org MIME-Version: 1.0 From: Warner Losh Date: Wed, 26 Feb 2025 14:17:08 -0700 X-Gm-Features: AQ5f1JrLBzdGbLYtz5dugGzna_e3HVHNR-O_VpmVOBoEjXfra2aqxFUOaIvSvC0 Message-ID: Subject: Three proposals To: freebsd-scsi Content-Type: multipart/alternative; boundary="00000000000044f8f3062f12198a" X-Spamd-Result: default: False [-1.80 / 15.00]; NEURAL_HAM_LONG(-1.00)[-0.999]; NEURAL_HAM_SHORT(-0.40)[-0.404]; NEURAL_HAM_MEDIUM(-0.40)[-0.401]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20230601.gappssmtp.com:s=20230601]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_ONE(0.00)[1]; MIME_TRACE(0.00)[0:+,1:+,2:~]; MISSING_XM_UA(0.00)[]; ARC_NA(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; R_SPF_NA(0.00)[no SPF record]; MLMMJ_DEST(0.00)[freebsd-scsi@freebsd.org]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::1032:from]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; FROM_HAS_DN(0.00)[]; RCVD_TLS_LAST(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_ALL(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-scsi@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; DKIM_TRACE(0.00)[bsdimp-com.20230601.gappssmtp.com:+] X-Rspamd-Queue-Id: 4Z36kB1nMDz3r2N X-Spamd-Bar: - --00000000000044f8f3062f12198a Content-Type: text/plain; charset="UTF-8" Greetings, I've been looking at all the quirks and was thinking of doing the following to cope: (1) Do a MODE SENSE for page 8 and only do the SYNCHRONIZE CACHE if the WCE bit is enabled. From my readings and searching of the standard, this is the only time we need it. Most of the drives that have the SYNC CACHE quirk that I have I can't set that to '1' anyway (and it defaults to 0 on them). Also, convert all the SIMs that intercept SYNC CACHE and just have them fail it. da can now cope with the failure and will never send it again once it fails. By avoiding SYNC CACHE here (and maybe other) circumstances, we avoid a huge number of drives that just go out to lunch when it is issued. (2) Stop generating READ(6) and WRITE(6). I'll keep the workaround for that, but also expand it to READ(10) and WRITE(10) since Universal Flash Filesystem apparently doesn't support them. But eliminating generating READ(6) etc will also help us work by default better. The reason to try to minimize CDB length (limited CDB buffer) is long since gone. (3) Add detection for bogus INQUIRY + EVPD replies and auto-quirk not sending them. This likely needs to be in XPT not DA. Maybe with an exception for serial number (since the umass SIM handles this well, maybe we have a similar rule for other SIMs). This may not help a lot, but might also be a good hint for when NOT to send SYNC CACHE. I've noticed several of the da devices that I have that have the NO_SYNC_CACHE quirk also do this and generally only understand a super-duper restricted set of commands (not RBC, something even smaller) and maybe we can gently probe this condition to allow us to avoid trouble on drives that implement too little of the subset... Comments? Warner --00000000000044f8f3062f12198a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Greetings,

I've been looking at all= the quirks and was thinking of doing the following to cope:

=
(1) Do a MODE SENSE for page 8 and only do the SYNCHRONIZE CACHE= if the WCE bit is enabled. From my readings and searching=C2=A0of the stan= dard, this is the only time we need it. Most of the drives that have the SY= NC CACHE quirk that I have I can't set that to '1' anyway (and = it defaults to 0 on them). Also, convert all the SIMs that intercept SYNC C= ACHE and just have them fail it. da can now cope with the failure and will = never send it again once it fails. By avoiding SYNC CACHE here (and maybe o= ther) circumstances, we avoid a huge number of drives that just go out to l= unch when it is issued.

(2) Stop generating READ(6= ) and WRITE(6). I'll keep the workaround for that, but also expand it t= o READ(10) and WRITE(10) since Universal Flash Filesystem apparently doesn&= #39;t support them.=C2=A0 But eliminating generating READ(6) etc will also = help us work by default better. The reason to try to minimize CDB length=C2= =A0(limited CDB buffer) is long since gone.

(3) Ad= d detection for bogus INQUIRY=C2=A0+ EVPD replies and auto-quirk not sendin= g them. This likely needs to be in XPT not DA. Maybe with an exception for = serial number (since the umass SIM handles this well, maybe we have a simil= ar rule for other SIMs). This may not help a lot, but might also be a good = hint for when NOT to send SYNC CACHE. I've noticed several of the da de= vices that I have that have the NO_SYNC_CACHE quirk also do this and genera= lly only understand a super-duper restricted set of commands (not RBC, some= thing even smaller) and maybe we can gently probe this condition to allow u= s to avoid trouble on drives that implement too little of the subset...
=
Comments?

Warner
--00000000000044f8f3062f12198a--