Add changes from the Linux-2.6 tree.
[linux-2.6.git] / drivers / scsi / scsicam.c
index f7630f8..cd68a66 100644 (file)
@@ -41,6 +41,7 @@ unsigned char *scsi_bios_ptable(struct block_device *dev)
        }
        return res;
 }
+EXPORT_SYMBOL(scsi_bios_ptable);
 
 /*
  * Function : int scsicam_bios_param (struct block_device *bdev, ector_t capacity, int *ip)
@@ -56,6 +57,7 @@ unsigned char *scsi_bios_ptable(struct block_device *dev)
 int scsicam_bios_param(struct block_device *bdev, sector_t capacity, int *ip)
 {
        unsigned char *p;
+       u64 capacity64 = capacity;      /* Suppress gcc warning */
        int ret;
 
        p = scsi_bios_ptable(bdev);
@@ -67,7 +69,7 @@ int scsicam_bios_param(struct block_device *bdev, sector_t capacity, int *ip)
                               (unsigned int *)ip + 0, (unsigned int *)ip + 1);
        kfree(p);
 
-       if (ret == -1) {
+       if (ret == -1 && capacity64 < (1ULL << 32)) {
                /* pick some standard mapping with at most 1024 cylinders,
                   and at most 62 sectors per track - this works up to
                   7905 MB */
@@ -94,6 +96,7 @@ int scsicam_bios_param(struct block_device *bdev, sector_t capacity, int *ip)
 
        return 0;
 }
+EXPORT_SYMBOL(scsicam_bios_param);
 
 /*
  * Function : static int scsi_partsize(unsigned char *buf, unsigned long 
@@ -175,6 +178,7 @@ int scsi_partsize(unsigned char *buf, unsigned long capacity,
        }
        return -1;
 }
+EXPORT_SYMBOL(scsi_partsize);
 
 /*
  * Function : static int setsize(unsigned long capacity,unsigned int *cyls,