diff options
| author | Jeff Garzik <jgarzik@redhat.com> | 2003-12-16 09:17:46 -0500 |
|---|---|---|
| committer | Jeff Garzik <jgarzik@redhat.com> | 2003-12-16 09:17:46 -0500 |
| commit | b67b6758e0e84e14995f600a7b440dfd9eac58f5 (patch) | |
| tree | 3c0f857b0a37784ff4e6f838eb4899571d0899b8 | |
| parent | 7f117c41a19dbb1cebb617addf30601b4e8d0745 (diff) | |
[libata] move geometry code to libata-scsi
| -rw-r--r-- | drivers/scsi/libata-core.c | 22 | ||||
| -rw-r--r-- | drivers/scsi/libata-scsi.c | 25 |
2 files changed, 25 insertions, 22 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index aaae472d983c..c29c27fd62ec 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c @@ -3281,28 +3281,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 - * * LOCKING: diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c index 8722412f2356..0876dc1c61af 100644 --- a/drivers/scsi/libata-scsi.c +++ b/drivers/scsi/libata-scsi.c @@ -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, |
