Commit b67b6758 authored by Jeff Garzik's avatar Jeff Garzik

[libata] move geometry code to libata-scsi

parent 7f117c41
......@@ -3280,28 +3280,6 @@ int pci_test_config_bits(struct pci_dev *pdev, struct pci_bits *bits)
}
/**
* 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 -
*
......
......@@ -28,10 +28,35 @@
#include <scsi/scsi.h>
#include "scsi.h"
#include "hosts.h"
#include "sd.h"
#include <linux/libata.h>
#include "libata.h"
/**
* 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;
}
struct ata_queued_cmd *ata_scsi_qc_new(struct ata_port *ap,
struct ata_device *dev,
Scsi_Cmnd *cmd,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment