diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2013-08-26 09:08:40 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2013-09-03 10:28:08 -0400 |
commit | 150c3544b1d317fe32b1f279917c08638dad363f (patch) | |
tree | 296daa77f647b056d3227c5909cbc4d179671292 /drivers/scsi | |
parent | e03d1b21d1f8482072ff3a9db12197b401b3bc56 (diff) |
[SCSI] scsi_debug: fix endianness bug in sdebug_build_parts()
With module parameter num_parts > 0, partition table is built on the
ramdisk storage when loading the driver. Unfortunately, there is an
endianness bug in sdebug_build_parts(). So the partition table is not
correctly initialized on big-endian systems.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Tested-by: Martin Peschke <mpeschke@linux.vnet.ibm.com>
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/scsi_debug.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index cb4fefa1bfba..2f39b13c7130 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c | |||
@@ -2659,8 +2659,8 @@ static void __init sdebug_build_parts(unsigned char *ramp, | |||
2659 | / sdebug_sectors_per; | 2659 | / sdebug_sectors_per; |
2660 | pp->end_sector = (end_sec % sdebug_sectors_per) + 1; | 2660 | pp->end_sector = (end_sec % sdebug_sectors_per) + 1; |
2661 | 2661 | ||
2662 | pp->start_sect = start_sec; | 2662 | pp->start_sect = cpu_to_le32(start_sec); |
2663 | pp->nr_sects = end_sec - start_sec + 1; | 2663 | pp->nr_sects = cpu_to_le32(end_sec - start_sec + 1); |
2664 | pp->sys_ind = 0x83; /* plain Linux partition */ | 2664 | pp->sys_ind = 0x83; /* plain Linux partition */ |
2665 | } | 2665 | } |
2666 | } | 2666 | } |