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

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)