* RE:cciss patches for 2.4.21-rc1, 3 of 4
@ 2003-04-24 22:12 mikem
0 siblings, 0 replies; only message in thread
From: mikem @ 2003-04-24 22:12 UTC (permalink / raw)
To: axboe; +Cc: linux-kernel, mike.miller, steve.cameron
2003/04/24
Changes:
1: Replaces the bit shifting in cciss_get_geometry() &
register_new_disk() with be32_to_cpu() to ensure correct
endian-ness across platforms.
diff -urN lx2421p7-1/drivers/block/cciss.c lx2421p7-1.1/drivers/block/cciss.c
--- lx2421p7-1/drivers/block/cciss.c Mon Apr 7 13:11:04 2003
+++ lx2421p7-1.1/drivers/block/cciss.c Mon Apr 7 13:12:28 2003
@@ -1348,15 +1348,7 @@
sizeof(ReportLunData_struct), 0, 0, 0 );
if (return_code == IO_OK) {
- /* printk("LUN Data\n--------------------------\n"); */
- listlength |= (0xff &
- (unsigned int)(ld_buff->LUNListLength[0])) << 24;
- listlength |= (0xff &
- (unsigned int)(ld_buff->LUNListLength[1])) << 16;
- listlength |= (0xff &
- (unsigned int)(ld_buff->LUNListLength[2])) << 8;
- listlength |= 0xff &
- (unsigned int)(ld_buff->LUNListLength[3]);
+ listlength = be32_to_cpu(*((__u32 *) &ld_buff->LUNListLength[0]));
} else {
/* reading number of logical volumes failed */
printk(KERN_WARNING "cciss: report logical volume"
@@ -2699,10 +2691,7 @@
printk("LUN Data\n--------------------------\n");
#endif /* CCISS_DEBUG */
- listlength |= (0xff & (unsigned int)(ld_buff->LUNListLength[0])) << 24;
- listlength |= (0xff & (unsigned int)(ld_buff->LUNListLength[1])) << 16;
- listlength |= (0xff & (unsigned int)(ld_buff->LUNListLength[2])) << 8;
- listlength |= 0xff & (unsigned int)(ld_buff->LUNListLength[3]);
+ listlength = be32_to_cpu(*((__u32 *) &ld_buff->LUNListLength[0]));
} else { /* reading number of logical volumes failed */
printk(KERN_WARNING "cciss: report logical volume"
" command failed\n");
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-04-24 22:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-24 22:12 RE:cciss patches for 2.4.21-rc1, 3 of 4 mikem
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).