Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

scsi: core: Introduce the BLIST_SKIP_IO_HINTS flag

Prepare for skipping the IO Advice Hints Grouping mode page for USB storage
devices.

Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Joao Machado <jocrismachado@gmail.com>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Christian Heusel <christian@heusel.eu>
Cc: stable@vger.kernel.org
Fixes: 4f53138fffc2 ("scsi: sd: Translate data lifetime information")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20240613211828.2077477-2-bvanassche@acm.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Bart Van Assche and committed by
Martin K. Petersen
633aeefa 135c6eb2

+7 -1
+4
drivers/scsi/sd.c
··· 63 63 #include <scsi/scsi_cmnd.h> 64 64 #include <scsi/scsi_dbg.h> 65 65 #include <scsi/scsi_device.h> 66 + #include <scsi/scsi_devinfo.h> 66 67 #include <scsi/scsi_driver.h> 67 68 #include <scsi/scsi_eh.h> 68 69 #include <scsi/scsi_host.h> ··· 3118 3117 struct scsi_sense_hdr sshdr; 3119 3118 struct scsi_mode_data data; 3120 3119 int res; 3120 + 3121 + if (sdp->sdev_bflags & BLIST_SKIP_IO_HINTS) 3122 + return; 3121 3123 3122 3124 res = scsi_mode_sense(sdp, /*dbd=*/0x8, /*modepage=*/0x0a, 3123 3125 /*subpage=*/0x05, buffer, SD_BUF_SIZE, SD_TIMEOUT,
+3 -1
include/scsi/scsi_devinfo.h
··· 69 69 #define BLIST_RETRY_ITF ((__force blist_flags_t)(1ULL << 32)) 70 70 /* Always retry ABORTED_COMMAND with ASC 0xc1 */ 71 71 #define BLIST_RETRY_ASC_C1 ((__force blist_flags_t)(1ULL << 33)) 72 + /* Do not query the IO Advice Hints Grouping mode page */ 73 + #define BLIST_SKIP_IO_HINTS ((__force blist_flags_t)(1ULL << 34)) 72 74 73 - #define __BLIST_LAST_USED BLIST_RETRY_ASC_C1 75 + #define __BLIST_LAST_USED BLIST_SKIP_IO_HINTS 74 76 75 77 #define __BLIST_HIGH_UNUSED (~(__BLIST_LAST_USED | \ 76 78 (__force blist_flags_t) \