/* Apparently the disk->capacity attribute is off by 1 sector for all disk drives. We add the one here, but it should really be done in sd.c. Even if it gets fixed there, this will still work.  */
static int imm_biosparam(struct scsi_device *sdev, struct block_device *dev, sector_t capacity, int ip[])
/* Apparently the disk->capacity attribute is off by 1 sector for all disk drives. We add the one here, but it should really be done in sd.c. Even if it gets fixed there, this will still work.  */
static int imm_biosparam(struct scsi_device *sdev, struct block_device *dev, sector_t capacity, int ip[])
{
	ip[0] = 0x40;
	ip[1] = 0x20;
	ip[2] = ((unsigned long) capacity + 1) / (ip[0] * ip[1]);
	if (ip[2] > 1024) {
		ip[0] = 0xff;
		ip[1] = 0x3f;
		ip[2] = ((unsigned long) capacity + 1) / (ip[0] * ip[1]);
	}
	return 0;
}