patch-2.4.25 linux-2.4.25/drivers/ide/raid/pdcraid.c
Next file: linux-2.4.25/drivers/ieee1394/csr.c
Previous file: linux-2.4.25/drivers/ide/raid/hptraid.c
Back to the patch index
Back to the overall index
- Lines: 17
- Date:
2004-02-18 05:36:31.000000000 -0800
- Orig file:
linux-2.4.24/drivers/ide/raid/pdcraid.c
- Orig date:
2003-11-28 10:26:20.000000000 -0800
diff -urN linux-2.4.24/drivers/ide/raid/pdcraid.c linux-2.4.25/drivers/ide/raid/pdcraid.c
@@ -360,9 +360,13 @@
return 0;
if (ideinfo->sect==0)
return 0;
- lba = (ideinfo->capacity / (ideinfo->head*ideinfo->sect));
- lba = lba * (ideinfo->head*ideinfo->sect);
- lba = lba - ideinfo->sect;
+ if (ideinfo->head!=255) {
+ lba = (ideinfo->capacity / (ideinfo->head*ideinfo->sect));
+ lba = lba * (ideinfo->head*ideinfo->sect);
+ lba = lba - ideinfo->sect; }
+ else {
+ lba = ideinfo->capacity - ideinfo->sect;
+ }
return lba;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)