[SCSI] sg: fix device number in blktrace data
[SCSI] sg: fix device number in blktrace data

Hi,

we have run into an issue with blktrace being started for sg devices.
Please apply.

Thanks,
Martin

From: Martin Peschke <4c516a35580133f593dfe866810ac6bfbd5b0dba@linux.vnet.ibm.com>

The device number denoting a generic SCSI devices (sg) in a blktrace
trace is broken; major and minor are always 0. It looks like
sdp->device->sdev_gendev.devt is not initialized properly.
The fix below uses other data to make up a valid device number,
similar to the way an sg device number is generated for sysfs output.

Reported-by: Stefan Raspl <ae896fd762beb84d26b0dfbb5506e2724a27b6b9@linux.vnet.ibm.com>
Signed-off-by: Martin Peschke <4c516a35580133f593dfe866810ac6bfbd5b0dba@linux.vnet.ibm.com>
Acked-by: Douglas Gilbert <54dff2264884c355ed5584a3b7f1530b4b26921e@interlog.com>
Signed-off-by: James Bottomley <407b36959ca09543ccda8f8e06721c791bc53435@HansenPartnership.com>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs