Commit 71e05593 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] isd200 bugfix for 64bit boxen

unsigned long is not a good type to use in declaration of structure we feed
to hardware...
Signed-off-by: default avatarAl Viro <viro@parcelfarce.linux.org.uk>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 590ed6b2
...@@ -295,8 +295,8 @@ struct isd200_info { ...@@ -295,8 +295,8 @@ struct isd200_info {
*/ */
struct read_capacity_data { struct read_capacity_data {
unsigned long LogicalBlockAddress; __u32 LogicalBlockAddress;
unsigned long BytesPerBlock; __u32 BytesPerBlock;
}; };
/* /*
...@@ -1221,8 +1221,7 @@ static int isd200_scsi_to_ata(struct scsi_cmnd *srb, struct us_data *us, ...@@ -1221,8 +1221,7 @@ static int isd200_scsi_to_ata(struct scsi_cmnd *srb, struct us_data *us,
case READ_10: case READ_10:
US_DEBUGP(" ATA OUT - SCSIOP_READ\n"); US_DEBUGP(" ATA OUT - SCSIOP_READ\n");
lba = *(unsigned long *)&srb->cmnd[2]; lba = be32_to_cpu(*(__be32 *)&srb->cmnd[2]);
lba = cpu_to_be32(lba);
blockCount = (unsigned long)srb->cmnd[7]<<8 | (unsigned long)srb->cmnd[8]; blockCount = (unsigned long)srb->cmnd[7]<<8 | (unsigned long)srb->cmnd[8];
if (id->capability & CAPABILITY_LBA) { if (id->capability & CAPABILITY_LBA) {
...@@ -1254,8 +1253,7 @@ static int isd200_scsi_to_ata(struct scsi_cmnd *srb, struct us_data *us, ...@@ -1254,8 +1253,7 @@ static int isd200_scsi_to_ata(struct scsi_cmnd *srb, struct us_data *us,
case WRITE_10: case WRITE_10:
US_DEBUGP(" ATA OUT - SCSIOP_WRITE\n"); US_DEBUGP(" ATA OUT - SCSIOP_WRITE\n");
lba = *(unsigned long *)&srb->cmnd[2]; lba = be32_to_cpu(*(__be32 *)&srb->cmnd[2]);
lba = cpu_to_be32(lba);
blockCount = (unsigned long)srb->cmnd[7]<<8 | (unsigned long)srb->cmnd[8]; blockCount = (unsigned long)srb->cmnd[7]<<8 | (unsigned long)srb->cmnd[8];
if (id->capability & CAPABILITY_LBA) { if (id->capability & CAPABILITY_LBA) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment