Skip to content

Commit d03d418

Browse files
committed
Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI fix from James Bottomley: "Minor core fix to prevent the sd driver printing the stream count every time we rescan and instead print only if it's changed" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: sd: Only print updates to permanent stream count
2 parents a91bae8 + 961990e commit d03d418

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/scsi/sd.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3120,6 +3120,7 @@ static void sd_read_io_hints(struct scsi_disk *sdkp, unsigned char *buffer)
31203120
{
31213121
struct scsi_device *sdp = sdkp->device;
31223122
const struct scsi_io_group_descriptor *desc, *start, *end;
3123+
u16 permanent_stream_count_old;
31233124
struct scsi_sense_hdr sshdr;
31243125
struct scsi_mode_data data;
31253126
int res;
@@ -3140,12 +3141,13 @@ static void sd_read_io_hints(struct scsi_disk *sdkp, unsigned char *buffer)
31403141
for (desc = start; desc < end; desc++)
31413142
if (!desc->st_enble || !sd_is_perm_stream(sdkp, desc - start))
31423143
break;
3144+
permanent_stream_count_old = sdkp->permanent_stream_count;
31433145
sdkp->permanent_stream_count = desc - start;
31443146
if (sdkp->rscs && sdkp->permanent_stream_count < 2)
31453147
sd_printk(KERN_INFO, sdkp,
31463148
"Unexpected: RSCS has been set and the permanent stream count is %u\n",
31473149
sdkp->permanent_stream_count);
3148-
else if (sdkp->permanent_stream_count)
3150+
else if (sdkp->permanent_stream_count != permanent_stream_count_old)
31493151
sd_printk(KERN_INFO, sdkp, "permanent stream count = %d\n",
31503152
sdkp->permanent_stream_count);
31513153
}

0 commit comments

Comments
 (0)