.proc_name = DRV_NAME,
.dma_boundary = ATA_DMA_BOUNDARY,
.slave_configure = ata_scsi_slave_config,
+ .bios_param = ata_std_bios_param,
};
static struct ata_port_operations piix_pata_ops = {
return (tmp == bits->val) ? 1 : 0;
}
+
+/**
+ * ata_std_bios_param - generic bios head/sector/cylinder calculator
+ * used by sd. Most BIOSes nowadays expect a XXX/255/16 (CHS)
+ * mapping. Some situations may arise where the disk is not
+ * bootable if this is not used.
+ *
+ * LOCKING:
+ *
+ * RETURNS:
+ *
+ */
+int ata_std_bios_param(Disk * disk, /* SCSI disk */
+ kdev_t dev, /* Device major, minor */
+ int *ip /* Heads, sectors, cylinders in that order */ )
+{
+ ip[0] = 255;
+ ip[1] = 63;
+ ip[2] = disk->capacity / (ip[0] * ip[1]);
+
+ return 0;
+}
+
/**
* ata_init -
*
*/
EXPORT_SYMBOL_GPL(pci_test_config_bits);
+EXPORT_SYMBOL_GPL(ata_std_bios_param);
EXPORT_SYMBOL_GPL(ata_std_ports);
EXPORT_SYMBOL_GPL(ata_device_add);
EXPORT_SYMBOL_GPL(ata_qc_complete);
.proc_name = DRV_NAME,
.dma_boundary = ATA_DMA_BOUNDARY,
.slave_configure = ata_scsi_slave_config,
+ .bios_param = ata_std_bios_param,
};
static struct ata_port_operations pdc_sata_ops = {
.proc_name = DRV_NAME,
.dma_boundary = ATA_DMA_BOUNDARY,
.slave_configure = ata_scsi_slave_config,
+ .bios_param = ata_std_bios_param,
};
static struct ata_port_operations sil_ops = {
#ifdef CONFIG_ALL_PPC
.proc_info = k2_sata_proc_info
#endif
+ .bios_param = ata_std_bios_param,
};
.proc_name = DRV_NAME,
.dma_boundary = ATA_DMA_BOUNDARY,
.slave_configure = ata_scsi_slave_config,
+ .bios_param = ata_std_bios_param,
};
static struct ata_port_operations svia_sata_ops = {
extern int pci_test_config_bits(struct pci_dev *pdev, struct pci_bits *bits);
extern void ata_qc_complete(struct ata_queued_cmd *qc, u8 drv_stat, unsigned int done_late);
extern void ata_eng_timeout(struct ata_port *ap);
+extern int ata_std_bios_param(Disk * disk, kdev_t dev, int *ip);
static inline unsigned long msecs_to_jiffies(unsigned long msecs)