SCSI fixes on 20240429
Minor core fix to prevent the sd driver printing the stream count every time we rescan and instead print only if it's changed Signed-off-by: James E.J. Bottomley <James.Bottomley@HansenPartnership.com> -----BEGIN PGP SIGNATURE----- iJwEABMIAEQWIQTnYEDbdso9F2cI+arnQslM7pishQUCZi/ypCYcamFtZXMuYm90 dG9tbGV5QGhhbnNlbnBhcnRuZXJzaGlwLmNvbQAKCRDnQslM7pishWRsAP4wUPHc jOATpEUQL4gcGqj7dfHxux7GeAfiDQRWNyYG5gD+K6RRHDosQO7pqrzjPpGjsq+6 ewco3E8ZQRYkHtm+hhg= =xWOD -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
d03d418890
@ -3120,6 +3120,7 @@ static void sd_read_io_hints(struct scsi_disk *sdkp, unsigned char *buffer)
|
||||
{
|
||||
struct scsi_device *sdp = sdkp->device;
|
||||
const struct scsi_io_group_descriptor *desc, *start, *end;
|
||||
u16 permanent_stream_count_old;
|
||||
struct scsi_sense_hdr sshdr;
|
||||
struct scsi_mode_data data;
|
||||
int res;
|
||||
@ -3140,12 +3141,13 @@ static void sd_read_io_hints(struct scsi_disk *sdkp, unsigned char *buffer)
|
||||
for (desc = start; desc < end; desc++)
|
||||
if (!desc->st_enble || !sd_is_perm_stream(sdkp, desc - start))
|
||||
break;
|
||||
permanent_stream_count_old = sdkp->permanent_stream_count;
|
||||
sdkp->permanent_stream_count = desc - start;
|
||||
if (sdkp->rscs && sdkp->permanent_stream_count < 2)
|
||||
sd_printk(KERN_INFO, sdkp,
|
||||
"Unexpected: RSCS has been set and the permanent stream count is %u\n",
|
||||
sdkp->permanent_stream_count);
|
||||
else if (sdkp->permanent_stream_count)
|
||||
else if (sdkp->permanent_stream_count != permanent_stream_count_old)
|
||||
sd_printk(KERN_INFO, sdkp, "permanent stream count = %d\n",
|
||||
sdkp->permanent_stream_count);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user