Commit 35124441 authored by Jeff Garzik's avatar Jeff Garzik

[libata] update new geometry code for 2.6.x specifics not present in 2.4

parent b67b6758
......@@ -28,7 +28,6 @@
#include <scsi/scsi.h>
#include "scsi.h"
#include "hosts.h"
#include "sd.h"
#include <linux/libata.h>
#include "libata.h"
......@@ -45,13 +44,12 @@
* RETURNS:
*
*/
int ata_std_bios_param(Disk * disk, /* SCSI disk */
kdev_t dev, /* Device major, minor */
int *ip /* Heads, sectors, cylinders in that order */ )
int ata_std_bios_param(struct scsi_device *sdev, struct block_device *bdev,
sector_t capacity, int geom[])
{
ip[0] = 255;
ip[1] = 63;
ip[2] = disk->capacity / (ip[0] * ip[1]);
geom[0] = 255;
geom[1] = 63;
geom[2] = capacity / (geom[0] * geom[1]);
return 0;
}
......
......@@ -28,6 +28,7 @@
#include <asm/io.h>
#include <linux/ata.h>
/*
* compile-time options
*/
......@@ -171,6 +172,7 @@ enum {
};
/* forward declarations */
struct scsi_device;
struct ata_port_operations;
struct ata_port;
struct ata_queued_cmd;
......@@ -427,7 +429,9 @@ extern void ata_bmdma_start_pio (struct ata_queued_cmd *qc);
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);
extern int ata_std_bios_param(struct scsi_device *sdev,
struct block_device *bdev,
sector_t capacity, int geom[]);
static inline unsigned long msecs_to_jiffies(unsigned long msecs)
......
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