git: 048d6ca31d96 - main - umass: Remove some 20-year-old dead code

From: Warner Losh <imp_at_FreeBSD.org>
Date: Tue, 11 Mar 2025 02:34:51 UTC
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=048d6ca31d968a79cfcde30295eff475582b1915

commit 048d6ca31d968a79cfcde30295eff475582b1915
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2025-03-10 20:46:48 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2025-03-11 02:33:15 +0000

    umass: Remove some 20-year-old dead code
    
    A REQUEST SENSE CDB was just copied into the cmd buffer, so testing for
    INQUIRY will always fail.  Remove the dead code.
    
    This code was added, apparently by mistake in 2003.  8541fbec7900e
    merged changes from NetBSD's umass_scsipi.c 1.8 to address some BBB
    bulk-in clear problems. NetBSD had fixed a problem in the
    FORCE_SHORT_INQUIRY quirk code they had ported from FreeBSD that FreeBSD
    also needed. That merge also included the dead code, which was not in
    NetBSD.
    
    Sponsored by:           Netflix
    Differential Revision:  https://reviews.freebsd.org/D49311
---
 sys/dev/usb/storage/umass.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/sys/dev/usb/storage/umass.c b/sys/dev/usb/storage/umass.c
index 58f36e756dce..3e5cc9a7e084 100644
--- a/sys/dev/usb/storage/umass.c
+++ b/sys/dev/usb/storage/umass.c
@@ -2523,10 +2523,6 @@ umass_cam_cb(struct umass_softc *sc, union ccb *ccb, uint32_t residue,
 
 		if (umass_std_transform(sc, ccb, &sc->cam_scsi_sense.opcode,
 		    sizeof(sc->cam_scsi_sense))) {
-			if ((sc->sc_quirks & FORCE_SHORT_INQUIRY) &&
-			    (sc->sc_transfer.cmd_data[0] == INQUIRY)) {
-				ccb->csio.sense_len = SHORT_INQUIRY_LENGTH;
-			}
 			umass_command_start(sc, DIR_IN, &ccb->csio.sense_data.error_code,
 			    ccb->csio.sense_len, ccb->ccb_h.timeout,
 			    &umass_cam_sense_cb, ccb);