aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsicam.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/scsicam.c')
-rw-r--r--drivers/scsi/scsicam.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/scsicam.c b/drivers/scsi/scsicam.c
index b78354fc4b17..cd68a66c7bb3 100644
--- a/drivers/scsi/scsicam.c
+++ b/drivers/scsi/scsicam.c
@@ -57,6 +57,7 @@ EXPORT_SYMBOL(scsi_bios_ptable);
57int scsicam_bios_param(struct block_device *bdev, sector_t capacity, int *ip) 57int scsicam_bios_param(struct block_device *bdev, sector_t capacity, int *ip)
58{ 58{
59 unsigned char *p; 59 unsigned char *p;
60 u64 capacity64 = capacity; /* Suppress gcc warning */
60 int ret; 61 int ret;
61 62
62 p = scsi_bios_ptable(bdev); 63 p = scsi_bios_ptable(bdev);
@@ -68,7 +69,7 @@ int scsicam_bios_param(struct block_device *bdev, sector_t capacity, int *ip)
68 (unsigned int *)ip + 0, (unsigned int *)ip + 1); 69 (unsigned int *)ip + 0, (unsigned int *)ip + 1);
69 kfree(p); 70 kfree(p);
70 71
71 if (ret == -1) { 72 if (ret == -1 && capacity64 < (1ULL << 32)) {
72 /* pick some standard mapping with at most 1024 cylinders, 73 /* pick some standard mapping with at most 1024 cylinders,
73 and at most 62 sectors per track - this works up to 74 and at most 62 sectors per track - this works up to
74 7905 MB */ 75 7905 MB */