summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Dalecki <dalecki@evision.ag>2002-07-26 01:16:19 -0700
committerLinus Torvalds <torvalds@penguin.transmeta.com>2002-07-26 01:16:19 -0700
commite7a6bdfdb183ba2e3985fe874eef3992505ad0d2 (patch)
tree9529ffc6e57665e82b9f8ff4957130dd76d3b510
parent81fed994891521cc72808f48845077a6cb1365a9 (diff)
[PATCH] IDE 105
- Rename ata-timings.h to timings.h. Same arguments as for agp. - Always include hdparm.h just before ide.h. Include them last where used. This is preparing to split out the IDE register declarations out of this file, since many other files in the kernel include it, which don't have anything to do with IDE. - Don't use the "IDE special" data type "byte". Just use the u8 data type for consistency with the rest of the kernel where applicable.
-rw-r--r--drivers/ide/aec62xx.c5
-rw-r--r--drivers/ide/ali14xx.c5
-rw-r--r--drivers/ide/alim15x3.c34
-rw-r--r--drivers/ide/amd74xx.c5
-rw-r--r--drivers/ide/ata-timing.c5
-rw-r--r--drivers/ide/cmd640.c10
-rw-r--r--drivers/ide/cmd64x.c34
-rw-r--r--drivers/ide/cs5530.c14
-rw-r--r--drivers/ide/cy82c693.c13
-rw-r--r--drivers/ide/dtc2278.c6
-rw-r--r--drivers/ide/hpt34x.c4
-rw-r--r--drivers/ide/hpt366.c5
-rw-r--r--drivers/ide/hptraid.c4
-rw-r--r--drivers/ide/ht6560b.c20
-rw-r--r--drivers/ide/icside.c2
-rw-r--r--drivers/ide/ide-cd.c4
-rw-r--r--drivers/ide/ide-cd.h26
-rw-r--r--drivers/ide/ide-disk.c3
-rw-r--r--drivers/ide/ide-floppy.c4
-rw-r--r--drivers/ide/ide-m8xx.c9
-rw-r--r--drivers/ide/ide-pci.c3
-rw-r--r--drivers/ide/ide-pmac.c28
-rw-r--r--drivers/ide/ide-tape.c6
-rw-r--r--drivers/ide/ide.c7
-rw-r--r--drivers/ide/ioctl.c16
-rw-r--r--drivers/ide/it8172.c5
-rw-r--r--drivers/ide/main.c5
-rw-r--r--drivers/ide/ns87415.c2
-rw-r--r--drivers/ide/opti621.c16
-rw-r--r--drivers/ide/pcidma.c5
-rw-r--r--drivers/ide/pdc202xx.c14
-rw-r--r--drivers/ide/pdc4030.c4
-rw-r--r--drivers/ide/pdcraid.c4
-rw-r--r--drivers/ide/piix.c5
-rw-r--r--drivers/ide/probe.c11
-rw-r--r--drivers/ide/qd65xx.c47
-rw-r--r--drivers/ide/qd65xx.h4
-rw-r--r--drivers/ide/quirks.c7
-rw-r--r--drivers/ide/serverworks.c4
-rw-r--r--drivers/ide/sis5513.c34
-rw-r--r--drivers/ide/sl82c105.c10
-rw-r--r--drivers/ide/tcq.c1
-rw-r--r--drivers/ide/timing.h (renamed from drivers/ide/ata-timing.h)14
-rw-r--r--drivers/ide/trm290.c2
-rw-r--r--drivers/ide/umc8672.c18
-rw-r--r--drivers/ide/via82cxxx.c5
-rw-r--r--fs/partitions/msdos.c1
-rw-r--r--include/linux/ide.h61
48 files changed, 277 insertions, 274 deletions
diff --git a/drivers/ide/aec62xx.c b/drivers/ide/aec62xx.c
index d2dca5e1a1a4..468a4b788644 100644
--- a/drivers/ide/aec62xx.c
+++ b/drivers/ide/aec62xx.c
@@ -42,10 +42,11 @@
#include <linux/blkdev.h>
#include <linux/pci.h>
#include <linux/init.h>
+#include <linux/hdreg.h>
#include <linux/ide.h>
#include <asm/io.h>
-#include "ata-timing.h"
+#include "timing.h"
#include "pcihost.h"
#define AEC_DRIVE_TIMING 0x40
@@ -167,7 +168,7 @@ static void aec62xx_tune_drive(struct ata_device *drive, unsigned char pio)
return;
}
- aec_set_drive(drive, XFER_PIO_0 + min_t(byte, pio, 5));
+ aec_set_drive(drive, XFER_PIO_0 + min_t(u8, pio, 5));
}
#ifdef CONFIG_BLK_DEV_IDEDMA
diff --git a/drivers/ide/ali14xx.c b/drivers/ide/ali14xx.c
index 33f175c92e0b..9d2e97c47d36 100644
--- a/drivers/ide/ali14xx.c
+++ b/drivers/ide/ali14xx.c
@@ -37,12 +37,13 @@
#include <linux/types.h>
#include <linux/kernel.h>
-#include <linux/ide.h>
#include <linux/init.h>
+#include <linux/hdreg.h>
+#include <linux/ide.h>
#include <asm/io.h>
-#include "ata-timing.h"
+#include "timing.h"
/* port addresses for auto-detection */
#define ALI_NUM_PORTS 4
diff --git a/drivers/ide/alim15x3.c b/drivers/ide/alim15x3.c
index f8422ad5e897..e862b5c98dfd 100644
--- a/drivers/ide/alim15x3.c
+++ b/drivers/ide/alim15x3.c
@@ -26,30 +26,30 @@
#include <asm/io.h>
-#include "ata-timing.h"
+#include "timing.h"
#include "pcihost.h"
-static byte m5229_revision;
-static byte chip_is_1543c_e;
+static u8 m5229_revision;
+static int chip_is_1543c_e;
static struct pci_dev *isa_dev;
-static void ali15x3_tune_drive(struct ata_device *drive, byte pio)
+static void ali15x3_tune_drive(struct ata_device *drive, u8 pio)
{
struct ata_timing *t;
struct ata_channel *hwif = drive->channel;
struct pci_dev *dev = hwif->pci_dev;
int s_time, a_time, c_time;
- byte s_clc, a_clc, r_clc;
+ u8 s_clc, a_clc, r_clc;
unsigned long flags;
int port = hwif->unit ? 0x5c : 0x58;
int portFIFO = hwif->unit ? 0x55 : 0x54;
- byte cd_dma_fifo = 0;
+ u8 cd_dma_fifo = 0;
if (pio == 255)
pio = ata_timing_mode(drive, XFER_PIO | XFER_EPIO);
else
- pio = XFER_PIO_0 + min_t(byte, pio, 4);
+ pio = XFER_PIO_0 + min_t(u8, pio, 4);
t = ata_timing_data(pio);
@@ -100,15 +100,15 @@ static void ali15x3_tune_drive(struct ata_device *drive, byte pio)
local_irq_restore(flags);
}
-static int ali15x3_tune_chipset(struct ata_device *drive, byte speed)
+static int ali15x3_tune_chipset(struct ata_device *drive, u8 speed)
{
struct pci_dev *dev = drive->channel->pci_dev;
- byte unit = (drive->select.b.unit & 0x01);
- byte tmpbyte = 0x00;
- int m5229_udma = drive->channel->unit ? 0x57 : 0x56;
+ u8 unit = (drive->select.b.unit & 0x01);
+ u8 tmpbyte = 0x00;
+ int m5229_udma = drive->channel->unit ? 0x57 : 0x56;
if (speed < XFER_UDMA_0) {
- byte ultra_enable = (unit) ? 0x7f : 0xf7;
+ u8 ultra_enable = unit ? 0x7f : 0xf7;
/*
* clear "ultra enable" bit
*/
@@ -135,7 +135,7 @@ static int ali15x3_tune_chipset(struct ata_device *drive, byte speed)
pci_write_config_byte(dev, 0x4b, tmpbyte);
}
}
-#endif /* CONFIG_BLK_DEV_IDEDMA */
+#endif
return ide_config_drive_speed(drive, speed);
}
@@ -212,10 +212,10 @@ static unsigned int __init ali15x3_ata66_check(struct ata_channel *hwif)
{
struct pci_dev *dev = hwif->pci_dev;
unsigned int ata66 = 0;
- byte cable_80_pin[2] = { 0, 0 };
+ u8 cable_80_pin[2] = { 0, 0 };
unsigned long flags;
- byte tmpbyte;
+ u8 tmpbyte;
local_irq_save(flags);
@@ -305,8 +305,8 @@ static unsigned int __init ali15x3_ata66_check(struct ata_channel *hwif)
static void __init ali15x3_init_channel(struct ata_channel *hwif)
{
#ifndef CONFIG_SPARC64
- byte ideic, inmir;
- byte irq_routing_table[] = { -1, 9, 3, 10, 4, 5, 7, 6,
+ u8 ideic, inmir;
+ u8 irq_routing_table[] = { -1, 9, 3, 10, 4, 5, 7, 6,
1, 11, 0, 12, 0, 14, 0, 15 };
hwif->irq = hwif->unit ? 15 : 14;
diff --git a/drivers/ide/amd74xx.c b/drivers/ide/amd74xx.c
index 485f31e3f4cb..5e2e1e27e850 100644
--- a/drivers/ide/amd74xx.c
+++ b/drivers/ide/amd74xx.c
@@ -42,11 +42,12 @@
#include <linux/blkdev.h>
#include <linux/pci.h>
#include <linux/init.h>
+#include <linux/hdreg.h>
#include <linux/ide.h>
#include <asm/io.h>
-#include "ata-timing.h"
+#include "timing.h"
#include "pcihost.h"
#define AMD_IDE_ENABLE (0x00 + amd_config->base)
@@ -171,7 +172,7 @@ static void amd74xx_tune_drive(struct ata_device *drive, u8 pio)
return;
}
- amd_set_drive(drive, XFER_PIO_0 + min_t(byte, pio, 5));
+ amd_set_drive(drive, XFER_PIO_0 + min_t(u8, pio, 5));
}
#ifdef CONFIG_BLK_DEV_IDEDMA
diff --git a/drivers/ide/ata-timing.c b/drivers/ide/ata-timing.c
index 01a312044242..f713a15b047a 100644
--- a/drivers/ide/ata-timing.c
+++ b/drivers/ide/ata-timing.c
@@ -23,7 +23,10 @@
*/
#include <linux/kernel.h>
-#include "ata-timing.h"
+#include <linux/hdreg.h>
+#include <linux/ide.h>
+
+#include "timing.h"
/*
* PIO 0-5, MWDMA 0-2 and UDMA 0-6 timings (in nanoseconds). These were taken
diff --git a/drivers/ide/cmd640.c b/drivers/ide/cmd640.c
index 742f8c7a54f3..e8325b9e7690 100644
--- a/drivers/ide/cmd640.c
+++ b/drivers/ide/cmd640.c
@@ -106,13 +106,13 @@
#include <linux/mm.h>
#include <linux/ioport.h>
#include <linux/blkdev.h>
+#include <linux/init.h>
#include <linux/hdreg.h>
#include <linux/ide.h>
-#include <linux/init.h>
#include <asm/io.h>
-#include "ata-timing.h"
+#include "timing.h"
/*
* This flag is set in ide.c by the parameter: ide0=cmd640_vlb
@@ -200,7 +200,7 @@ static struct ata_device *cmd_drives[4];
* Interface to access cmd640x registers
*/
static unsigned int cmd640_key;
-static void (*put_cmd640_reg)(unsigned short reg, byte val);
+static void (*put_cmd640_reg)(unsigned short reg, u8 val);
static u8 (*get_cmd640_reg)(unsigned short reg);
/*
@@ -219,7 +219,7 @@ static spinlock_t cmd640_lock = SPIN_LOCK_UNLOCKED;
/* PCI method 1 access */
-static void put_cmd640_reg_pci1 (unsigned short reg, byte val)
+static void put_cmd640_reg_pci1 (unsigned short reg, u8 val)
{
unsigned long flags;
@@ -641,7 +641,7 @@ static void cmd640_set_mode (unsigned int index, u8 pio_mode, unsigned int cycle
/*
* Drive PIO mode selection:
*/
-static void cmd640_tune_drive(struct ata_device *drive, byte mode_wanted)
+static void cmd640_tune_drive(struct ata_device *drive, u8 mode_wanted)
{
u8 b;
struct ata_timing *t;
diff --git a/drivers/ide/cmd64x.c b/drivers/ide/cmd64x.c
index 188aeac9074c..0d6c087b361f 100644
--- a/drivers/ide/cmd64x.c
+++ b/drivers/ide/cmd64x.c
@@ -18,13 +18,13 @@
#include <linux/types.h>
#include <linux/pci.h>
#include <linux/delay.h>
-#include <linux/hdreg.h>
#include <linux/init.h>
+#include <linux/hdreg.h>
#include <linux/ide.h>
#include <asm/io.h>
-#include "ata-timing.h"
+#include "timing.h"
#include "pcihost.h"
#define CMD_DEBUG 0
@@ -81,8 +81,8 @@
* Registers and masks for easy access by drive index:
*/
#if 0
-static byte prefetch_regs[4] = {CNTRL, CNTRL, ARTTIM23, ARTTIM23};
-static byte prefetch_masks[4] = {CNTRL_DIS_RA0, CNTRL_DIS_RA1, ARTTIM23_DIS_RA2, ARTTIM23_DIS_RA3};
+static u8 prefetch_regs[4] = {CNTRL, CNTRL, ARTTIM23, ARTTIM23};
+static u8 prefetch_masks[4] = {CNTRL_DIS_RA0, CNTRL_DIS_RA1, ARTTIM23_DIS_RA2, ARTTIM23_DIS_RA3};
#endif
/*
@@ -93,15 +93,15 @@ static void program_drive_counts(struct ata_device *drive, int setup_count, int
{
unsigned long flags;
struct ata_device *drives = drive->channel->drives;
- byte temp_b;
- static const byte setup_counts[] = {0x40, 0x40, 0x40, 0x80, 0, 0xc0};
- static const byte recovery_counts[] =
+ u8 temp_b;
+ static const u8 setup_counts[] = {0x40, 0x40, 0x40, 0x80, 0, 0xc0};
+ static const u8 recovery_counts[] =
{15, 15, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 0};
- static const byte arttim_regs[2][2] = {
+ static const u8 arttim_regs[2][2] = {
{ ARTTIM0, ARTTIM1 },
{ ARTTIM23, ARTTIM23 }
};
- static const byte drwtim_regs[2][2] = {
+ static const u8 drwtim_regs[2][2] = {
{ DRWTIM0, DRWTIM1 },
{ DRWTIM2, DRWTIM3 }
};
@@ -142,11 +142,11 @@ static void program_drive_counts(struct ata_device *drive, int setup_count, int
*/
(void) pci_read_config_byte(drive->channel->pci_dev, arttim_regs[channel][slave], &temp_b);
(void) pci_write_config_byte(drive->channel->pci_dev, arttim_regs[channel][slave],
- ((byte) setup_count) | (temp_b & 0x3f));
+ ((u8) setup_count) | (temp_b & 0x3f));
(void) pci_write_config_byte(drive->channel->pci_dev, drwtim_regs[channel][slave],
- (byte) ((active_count << 4) | recovery_count));
- cmdprintk ("Write %x to %x\n", ((byte) setup_count) | (temp_b & 0x3f), arttim_regs[channel][slave]);
- cmdprintk ("Write %x to %x\n", (byte) ((active_count << 4) | recovery_count), drwtim_regs[channel][slave]);
+ (u8) ((active_count << 4) | recovery_count));
+ cmdprintk ("Write %x to %x\n", ((u8) setup_count) | (temp_b & 0x3f), arttim_regs[channel][slave]);
+ cmdprintk ("Write %x to %x\n", (u8) ((active_count << 4) | recovery_count), drwtim_regs[channel][slave]);
local_irq_restore(flags);
}
@@ -405,7 +405,7 @@ static int cmd64x_tune_chipset(struct ata_device *drive, u8 speed)
return ide_config_drive_speed(drive, speed);
}
-static int cmd680_tune_chipset(struct ata_device *drive, byte speed)
+static int cmd680_tune_chipset(struct ata_device *drive, u8 speed)
{
struct ata_channel *hwif = drive->channel;
struct pci_dev *dev = hwif->pci_dev;
@@ -520,9 +520,9 @@ static int cmd64x_udma_stop(struct ata_device *drive)
dma_stat = inb(dma_base+2); /* get DMA status */
outb(dma_stat|6, dma_base+2); /* clear the INTR & ERROR bits */
if (jack_slap) {
- byte dma_intr = 0;
- byte dma_mask = (ch->unit) ? ARTTIM23_INTR_CH1 : CFR_INTR_CH0;
- byte dma_reg = (ch->unit) ? ARTTIM2 : CFR;
+ u8 dma_intr = 0;
+ u8 dma_mask = (ch->unit) ? ARTTIM23_INTR_CH1 : CFR_INTR_CH0;
+ u8 dma_reg = (ch->unit) ? ARTTIM2 : CFR;
(void) pci_read_config_byte(dev, dma_reg, &dma_intr);
/*
* DAMN BMIDE is not connected to PCI space!
diff --git a/drivers/ide/cs5530.c b/drivers/ide/cs5530.c
index b761e7896385..89ee79cfcda3 100644
--- a/drivers/ide/cs5530.c
+++ b/drivers/ide/cs5530.c
@@ -20,22 +20,22 @@
#include <linux/mm.h>
#include <linux/ioport.h>
#include <linux/blkdev.h>
-#include <linux/hdreg.h>
#include <linux/interrupt.h>
#include <linux/pci.h>
#include <linux/init.h>
+#include <linux/hdreg.h>
#include <linux/ide.h>
#include <asm/io.h>
#include <asm/irq.h>
-#include "ata-timing.h"
+#include "timing.h"
#include "pcihost.h"
/*
* Set a new transfer mode at the drive
*/
-int cs5530_set_xfer_mode(struct ata_device *drive, byte mode)
+int cs5530_set_xfer_mode(struct ata_device *drive, u8 mode)
{
int error = 0;
@@ -67,7 +67,7 @@ static unsigned int cs5530_pio_timings[2][5] =
* The ide_init_cs5530() routine guarantees that all drives
* will have valid default PIO timings set up before we get here.
*/
-static void cs5530_tuneproc(struct ata_device *drive, byte pio) /* pio=255 means "autotune" */
+static void cs5530_tuneproc(struct ata_device *drive, u8 pio)
{
struct ata_channel *hwif = drive->channel;
unsigned int format, basereg = CS5530_BASEREG(hwif);
@@ -75,7 +75,7 @@ static void cs5530_tuneproc(struct ata_device *drive, byte pio) /* pio=255 means
if (pio == 255)
pio = ata_timing_mode(drive, XFER_PIO | XFER_EPIO);
else
- pio = XFER_PIO_0 + min_t(byte, pio, 4);
+ pio = XFER_PIO_0 + min_t(u8, pio, 4);
if (!cs5530_set_xfer_mode(drive, pio)) {
format = (inl(basereg+4) >> 31) & 1;
@@ -206,7 +206,7 @@ static unsigned int __init pci_init_cs5530(struct pci_dev *dev)
unsigned short pcicmd = 0;
unsigned long flags;
- pci_for_each_dev (dev) {
+ pci_for_each_dev(dev) {
if (dev->vendor == PCI_VENDOR_ID_CYRIX) {
switch (dev->device) {
case PCI_DEVICE_ID_CYRIX_PCI_MASTER:
@@ -256,7 +256,7 @@ static unsigned int __init pci_init_cs5530(struct pci_dev *dev)
*/
pci_write_config_byte(master_0, 0x40, 0x1e);
- /*
+ /*
* Set max PCI burst size (16-bytes seems to work best):
* 16bytes: set bit-1 at 0x41 (reg value of 0x16)
* all others: clear bit-1 at 0x41, and do:
diff --git a/drivers/ide/cy82c693.c b/drivers/ide/cy82c693.c
index 297b55d18ce2..acf889aad4dd 100644
--- a/drivers/ide/cy82c693.c
+++ b/drivers/ide/cy82c693.c
@@ -47,11 +47,12 @@
#include <linux/pci.h>
#include <linux/delay.h>
#include <linux/init.h>
+#include <linux/hdreg.h>
#include <linux/ide.h>
#include <asm/io.h>
-#include "ata-timing.h"
+#include "timing.h"
#include "pcihost.h"
/* the current version */
@@ -141,7 +142,7 @@ static u8 calc_clk(int time, int bus_speed)
* for mode 3 and 4 drives 8 and 16-bit timings are the same
*
*/
-/* FIXME: use generic ata-timings library --bkz */
+/* FIXME: use generic timings library --bkz */
static void compute_clocks(u8 pio, pio_clocks_t *p_pclk)
{
struct ata_timing *t;
@@ -186,8 +187,8 @@ static void compute_clocks(u8 pio, pio_clocks_t *p_pclk)
*/
static void cy82c693_dma_enable(struct ata_device *drive, int mode, int single)
{
- byte index;
- byte data;
+ u8 index;
+ u8 data;
if (mode>2) /* make sure we set a valid mode */
mode = 2;
@@ -206,7 +207,7 @@ static void cy82c693_dma_enable(struct ata_device *drive, int mode, int single)
printk (KERN_INFO "%s (ch=%d, dev=%d): DMA mode is %d (single=%d)\n", drive->name, drive->channel->unit, drive->select.b.unit, (data&0x3), ((data>>2)&1));
#endif
- data = (byte)mode|(byte)(single<<2);
+ data = (u8) mode | (u8) (single << 2);
OUT_BYTE(index, CY82_INDEX_PORT);
OUT_BYTE(data, CY82_DATA_PORT);
@@ -271,7 +272,7 @@ static int cy82c693_udma_setup(struct ata_device *drive, int map)
/*
* tune ide drive - set PIO mode
*/
-static void cy82c693_tune_drive(struct ata_device *drive, byte pio)
+static void cy82c693_tune_drive(struct ata_device *drive, u8 pio)
{
struct ata_channel *hwif = drive->channel;
struct pci_dev *dev = hwif->pci_dev;
diff --git a/drivers/ide/dtc2278.c b/drivers/ide/dtc2278.c
index 45cd4d9c7f81..8d947231d2ab 100644
--- a/drivers/ide/dtc2278.c
+++ b/drivers/ide/dtc2278.c
@@ -9,13 +9,13 @@
#include <linux/mm.h>
#include <linux/ioport.h>
#include <linux/blkdev.h>
+#include <linux/init.h>
#include <linux/hdreg.h>
#include <linux/ide.h>
-#include <linux/init.h>
#include <asm/io.h>
-#include "ata-timing.h"
+#include "timing.h"
/*
* Changing this #undef to #define may solve start up problems in some systems.
@@ -66,7 +66,7 @@ static void sub22 (char b, char c)
}
}
-static void tune_dtc2278(struct ata_device *drive, byte pio)
+static void tune_dtc2278(struct ata_device *drive, u8 pio)
{
unsigned long flags;
diff --git a/drivers/ide/hpt34x.c b/drivers/ide/hpt34x.c
index 9f5d08d42f2c..8fb181800602 100644
--- a/drivers/ide/hpt34x.c
+++ b/drivers/ide/hpt34x.c
@@ -21,16 +21,16 @@
#include <linux/mm.h>
#include <linux/ioport.h>
#include <linux/blkdev.h>
-#include <linux/hdreg.h>
#include <linux/interrupt.h>
#include <linux/pci.h>
#include <linux/init.h>
+#include <linux/hdreg.h>
#include <linux/ide.h>
#include <asm/io.h>
#include <asm/irq.h>
-#include "ata-timing.h"
+#include "timing.h"
#include "pcihost.h"
#define HPT343_DEBUG_DRIVE_INFO 0
diff --git a/drivers/ide/hpt366.c b/drivers/ide/hpt366.c
index a24e170bee2e..c2204b5b7ef4 100644
--- a/drivers/ide/hpt366.c
+++ b/drivers/ide/hpt366.c
@@ -53,18 +53,17 @@
#include <linux/mm.h>
#include <linux/ioport.h>
#include <linux/blkdev.h>
-#include <linux/hdreg.h>
-
#include <linux/interrupt.h>
#include <linux/pci.h>
#include <linux/init.h>
+#include <linux/hdreg.h>
#include <linux/ide.h>
#include <asm/uaccess.h>
#include <asm/io.h>
#include <asm/irq.h>
-#include "ata-timing.h"
+#include "timing.h"
#include "pcihost.h"
diff --git a/drivers/ide/hptraid.c b/drivers/ide/hptraid.c
index 43b45c6e06eb..d4742834b864 100644
--- a/drivers/ide/hptraid.c
+++ b/drivers/ide/hptraid.c
@@ -105,10 +105,10 @@ static int hptraid_ioctl(struct inode *inode, struct file *file,
if (!loc)
return -EINVAL;
val = 255;
- if (put_user(val, (byte *) & loc->heads))
+ if (put_user(val, (u8 *) & loc->heads))
return -EFAULT;
val = 63;
- if (put_user(val, (byte *) & loc->sectors))
+ if (put_user(val, (u8 *) & loc->sectors))
return -EFAULT;
bios_cyl = raid[minor].sectors / 63 / 255;
if (put_user
diff --git a/drivers/ide/ht6560b.c b/drivers/ide/ht6560b.c
index 55f39b8c506e..34207cd5d911 100644
--- a/drivers/ide/ht6560b.c
+++ b/drivers/ide/ht6560b.c
@@ -38,13 +38,13 @@
#include <linux/mm.h>
#include <linux/ioport.h>
#include <linux/blkdev.h>
+#include <linux/init.h>
#include <linux/hdreg.h>
#include <linux/ide.h>
-#include <linux/init.h>
#include <asm/io.h>
-#include "ata-timing.h"
+#include "timing.h"
/* #define DEBUG */ /* remove comments for DEBUG messages */
@@ -61,7 +61,7 @@
* bit3 (0x08): "1" 3 cycle time, "0" 2 cycle time (?)
*/
#define HT_CONFIG_PORT 0x3e6
-#define HT_CONFIG(drivea) (byte)(((drivea)->drive_data & 0xff00) >> 8)
+#define HT_CONFIG(drivea) (u8)(((drivea)->drive_data & 0xff00) >> 8)
/*
* FIFO + PREFETCH (both a/b-model)
*/
@@ -107,7 +107,7 @@
* Active Time for each drive. Smaller value gives higher speed.
* In case of failures you should probably fall back to a higher value.
*/
-#define HT_TIMING(drivea) (byte)((drivea)->drive_data & 0x00ff)
+#define HT_TIMING(drivea) (u8)((drivea)->drive_data & 0x00ff)
#define HT_TIMING_DEFAULT 0xff
/*
@@ -194,7 +194,7 @@ static int __init try_to_init_ht6560b(void)
return 1;
}
-static byte ht_pio2timings(struct ata_device *drive, byte pio)
+static u8 ht_pio2timings(struct ata_device *drive, u8 pio)
{
int active_time, recovery_time;
int active_cycles, recovery_cycles;
@@ -204,7 +204,7 @@ static byte ht_pio2timings(struct ata_device *drive, byte pio)
if (pio == 255)
pio = ata_timing_mode(drive, XFER_PIO | XFER_EPIO);
else
- pio = XFER_PIO_0 + min_t(byte, pio, 4);
+ pio = XFER_PIO_0 + min_t(u8, pio, 4);
t = ata_timing_data(pio);
@@ -233,7 +233,7 @@ static byte ht_pio2timings(struct ata_device *drive, byte pio)
drive->name, pio - XFER_PIO_0, recovery_cycles, recovery_time, active_cycles, active_time);
#endif
- return (byte)((recovery_cycles << 4) | active_cycles);
+ return (u8)((recovery_cycles << 4) | active_cycles);
} else {
#ifdef DEBUG
@@ -247,7 +247,7 @@ static byte ht_pio2timings(struct ata_device *drive, byte pio)
/*
* Enable/Disable so called prefetch mode
*/
-static void ht_set_prefetch(struct ata_device *drive, byte state)
+static void ht_set_prefetch(struct ata_device *drive, u8 state)
{
unsigned long flags;
int t = HT_PREFETCH_MODE << 8;
@@ -274,10 +274,10 @@ static void ht_set_prefetch(struct ata_device *drive, byte state)
#endif
}
-static void tune_ht6560b(struct ata_device *drive, byte pio)
+static void tune_ht6560b(struct ata_device *drive, u8 pio)
{
unsigned long flags;
- byte timing;
+ u8 timing;
switch (pio) {
case 8: /* set prefetch off */
diff --git a/drivers/ide/icside.c b/drivers/ide/icside.c
index cd2af4ca8faa..a93846b806a6 100644
--- a/drivers/ide/icside.c
+++ b/drivers/ide/icside.c
@@ -377,7 +377,7 @@ icside_config_if(struct ata_device *drive, int xfer_mode)
return on;
}
-static int icside_set_speed(struct ata_device *drive, byte speed)
+static int icside_set_speed(struct ata_device *drive, u8 speed)
{
return icside_config_if(drive, speed);
}
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 166971c7307d..1e4dbbebcec7 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -1716,7 +1716,7 @@ void msf_from_bcd (struct atapi_msf *msf)
static inline
-void lba_to_msf (int lba, byte *m, byte *s, byte *f)
+void lba_to_msf(int lba, u8 *m, u8 *s, u8 *f)
{
lba += CD_MSF_OFFSET;
lba &= 0xffffff; /* negative lbas use only 24 bits */
@@ -1728,7 +1728,7 @@ void lba_to_msf (int lba, byte *m, byte *s, byte *f)
static inline
-int msf_to_lba (byte m, byte s, byte f)
+int msf_to_lba(u8 m, u8 s, u8 f)
{
return (((m * CD_SECS) + s) * CD_FRAMES + f) - CD_MSF_OFFSET;
}
diff --git a/drivers/ide/ide-cd.h b/drivers/ide/ide-cd.h
index dcd660ce6ce1..7f4ac20a5b5a 100644
--- a/drivers/ide/ide-cd.h
+++ b/drivers/ide/ide-cd.h
@@ -80,7 +80,7 @@ struct ide_cd_config_flags {
__u8 close_tray : 1; /* can close the tray */
__u8 writing : 1; /* pseudo write in progress */
__u8 reserved : 3;
- byte max_speed; /* Max speed of the drive */
+ u8 max_speed; /* Max speed of the drive */
};
#define CDROM_CONFIG_FLAGS(drive) (&(((struct cdrom_info *)(drive->driver_data))->config_flags))
@@ -92,7 +92,7 @@ struct ide_cd_state_flags {
__u8 door_locked : 1; /* We think that the drive door is locked. */
__u8 writing : 1; /* the drive is currently writing */
__u8 reserved : 4;
- byte current_speed; /* Current speed of the drive */
+ u8 current_speed; /* Current speed of the drive */
};
#define CDROM_STATE_FLAGS(drive) (&(((struct cdrom_info *)(drive->driver_data))->state_flags))
@@ -132,7 +132,7 @@ struct atapi_toc_header {
} __attribute__((packed));
struct atapi_toc_entry {
- byte reserved1;
+ u8 reserved1;
#if defined(__BIG_ENDIAN_BITFIELD)
__u8 adr : 4;
__u8 control : 4;
@@ -142,8 +142,8 @@ struct atapi_toc_entry {
#else
#error "Please fix <asm/byteorder.h>"
#endif
- byte track;
- byte reserved2;
+ u8 track;
+ u8 reserved2;
union {
unsigned lba;
struct atapi_msf msf;
@@ -176,8 +176,8 @@ struct atapi_cdrom_subchnl {
#else
#error "Please fix <asm/byteorder.h>"
#endif
- u_char acdsc_trk;
- u_char acdsc_ind;
+ u8 acdsc_trk;
+ u8 acdsc_ind;
union {
struct atapi_msf msf;
int lba;
@@ -207,7 +207,7 @@ struct atapi_capabilities_page {
#error "Please fix <asm/byteorder.h>"
#endif
- byte page_length;
+ u8 page_length;
#if defined(__BIG_ENDIAN_BITFIELD)
__u8 reserved2 : 2;
@@ -435,8 +435,8 @@ struct atapi_mechstat_header {
#error "Please fix <asm/byteorder.h>"
#endif
- byte curlba[3];
- byte nslots;
+ u8 curlba[3];
+ u8 nslots;
__u16 slot_tablelen;
};
@@ -454,7 +454,7 @@ struct atapi_slot {
#error "Please fix <asm/byteorder.h>"
#endif
- byte reserved2[3];
+ u8 reserved2[3];
};
struct atapi_changer_info {
@@ -514,13 +514,11 @@ struct cdrom_info {
#define ABORTED_COMMAND 0x0b
#define MISCOMPARE 0x0e
-
-
/* This stuff should be in cdrom.h, since it is now generic... */
#if VERBOSE_IDE_CD_ERRORS
/* The generic packet command opcodes for CD/DVD Logical Units,
- * From Table 57 of the SFF8090 Ver. 3 (Mt. Fuji) draft standard. */
+ * From Table 57 of the SFF8090 Ver. 3 (Mt. Fuji) draft standard. */
const struct {
unsigned short packet_command;
const char * const text;
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c
index cd3fd43b4b23..4070de3d2832 100644
--- a/drivers/ide/ide-disk.c
+++ b/drivers/ide/ide-disk.c
@@ -24,8 +24,9 @@
#include <linux/genhd.h>
#include <linux/slab.h>
#include <linux/delay.h>
-#include <linux/ide.h>
#include <linux/buffer_head.h> /* for invalidate_bdev() */
+#include <linux/hdreg.h>
+#include <linux/ide.h>
#include <asm/byteorder.h>
#include <asm/irq.h>
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c
index a05c8b00c9ce..e346d1d12b58 100644
--- a/drivers/ide/ide-floppy.c
+++ b/drivers/ide/ide-floppy.c
@@ -245,8 +245,8 @@ typedef struct {
/*
* Last error information
*/
- byte sense_key, asc, ascq;
- byte ticks; /* delay this long before sending packet command */
+ u8 sense_key, asc, ascq;
+ u8 ticks; /* delay this long before sending packet command */
int progress_indication;
/*
diff --git a/drivers/ide/ide-m8xx.c b/drivers/ide/ide-m8xx.c
index a04398c9e12c..c842699af329 100644
--- a/drivers/ide/ide-m8xx.c
+++ b/drivers/ide/ide-m8xx.c
@@ -29,8 +29,9 @@
#include <linux/init.h>
#include <linux/blk.h>
#include <linux/ioport.h>
-#include <linux/ide.h>
#include <linux/bootmem.h>
+#include <linux/hdreg.h>
+#include <linux/ide.h>
#include <asm/mpc8xx.h>
#include <asm/mmu.h>
@@ -43,7 +44,7 @@
#include <asm/machdep.h>
#include <asm/irq.h>
-#include "ata-timing.h"
+#include "timing.h"
static int identify (volatile unsigned char *p);
static void print_fixed (volatile unsigned char *p);
@@ -51,7 +52,7 @@ static void print_funcid (int func);
static int check_ide_device (unsigned long base);
static int ide_interrupt_ack(struct ata_channel *);
-static void m8xx_ide_tuneproc(struct ata_device *drive, byte pio);
+static void m8xx_ide_tuneproc(struct ata_device *drive, u8 pio);
typedef struct ide_ioport_desc {
unsigned long base_off; /* Offset to PCMCIA memory */
@@ -437,7 +438,7 @@ void m8xx_ide_init_hwif_ports (hw_regs_t *hw,
/* Calculate PIO timings */
static void
-m8xx_ide_tuneproc(struct ata_device *drive, byte pio)
+m8xx_ide_tuneproc(struct ata_device *drive, u8 pio)
{
#if defined(CONFIG_IDE_8xx_PCCARD) || defined(CONFIG_IDE_8xx_DIRECT)
volatile pcmconf8xx_t *pcmp;
diff --git a/drivers/ide/ide-pci.c b/drivers/ide/ide-pci.c
index e9076cb4869c..a9173ffad2dd 100644
--- a/drivers/ide/ide-pci.c
+++ b/drivers/ide/ide-pci.c
@@ -20,6 +20,7 @@
#include <linux/interrupt.h>
#include <linux/pci.h>
#include <linux/init.h>
+#include <linux/hdreg.h>
#include <linux/ide.h>
#include <asm/io.h>
@@ -30,7 +31,7 @@
/*
* This is the list of registered PCI chipset driver data structures.
*/
-static struct ata_pci_device *ata_pci_device_list = NULL;
+static struct ata_pci_device *ata_pci_device_list; /* = NULL */
/*
* This function supplies the data necessary to detect the particular chipset.
diff --git a/drivers/ide/ide-pmac.c b/drivers/ide/ide-pmac.c
index 5a52c4fa4169..4630dbc4fe5d 100644
--- a/drivers/ide/ide-pmac.c
+++ b/drivers/ide/ide-pmac.c
@@ -34,8 +34,9 @@
#include <linux/jiffies.h>
#include <linux/init.h>
#include <linux/delay.h>
-#include <linux/ide.h>
#include <linux/pci.h>
+#include <linux/hdreg.h>
+#include <linux/ide.h>
#include <asm/prom.h>
#include <asm/io.h>
@@ -51,7 +52,7 @@
#include <linux/adb.h>
#include <linux/pmu.h>
#endif
-#include "ata-timing.h"
+#include "timing.h"
#undef IDE_PMAC_DEBUG
@@ -262,8 +263,8 @@ static int pmac_udma_init(struct ata_device *drive, struct request *rq);
static int pmac_udma_irq_status(struct ata_device *drive);
static int pmac_udma_setup(struct ata_device *drive, int map);
static int pmac_ide_build_dmatable(struct ata_device *drive, struct request *rq, int ix, int wr);
-static int pmac_ide_tune_chipset(struct ata_device *drive, byte speed);
-static void pmac_ide_tuneproc(struct ata_device *drive, byte pio);
+static int pmac_ide_tune_chipset(struct ata_device *drive, u8 speed);
+static void pmac_ide_tuneproc(struct ata_device *drive, u8 pio);
static void pmac_ide_selectproc(struct ata_device *drive);
#endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */
@@ -457,7 +458,7 @@ out:
/* Calculate PIO timings */
static void __pmac
-pmac_ide_tuneproc(struct ata_device *drive, byte pio)
+pmac_ide_tuneproc(struct ata_device *drive, u8 pio)
{
struct ata_timing *t;
int i;
@@ -472,7 +473,7 @@ pmac_ide_tuneproc(struct ata_device *drive, byte pio)
if (pio == 255)
pio = ata_timing_mode(drive, XFER_PIO | XFER_EPIO);
else
- pio = XFER_PIO_0 + min_t(byte, pio, 4);
+ pio = XFER_PIO_0 + min_t(u8, pio, 4);
t = ata_timing_data(pio);
@@ -523,8 +524,7 @@ pmac_ide_tuneproc(struct ata_device *drive, byte pio)
}
#ifdef CONFIG_BLK_DEV_IDEDMA_PMAC
-static int __pmac
-set_timings_udma(u32 *timings, byte speed)
+static int __pmac set_timings_udma(u32 *timings, u8 speed)
{
unsigned rdyToPauseTicks, wrDataSetupTicks, addrTicks;
@@ -546,7 +546,7 @@ set_timings_udma(u32 *timings, byte speed)
}
static int __pmac
-set_timings_mdma(int intf_type, u32 *timings, byte speed, int drive_cycle_time)
+set_timings_mdma(int intf_type, u32 *timings, u8 speed, int drive_cycle_time)
{
int cycleTime, accessTime, recTime;
unsigned accessTicks, recTicks;
@@ -659,7 +659,7 @@ set_timings_mdma(int intf_type, u32 *timings, byte speed, int drive_cycle_time)
* our, normal mdma function is supposed to be more precise
*/
static int __pmac
-pmac_ide_tune_chipset (struct ata_device *drive, byte speed)
+pmac_ide_tune_chipset (struct ata_device *drive, u8 speed)
{
int intf = pmac_ide_find(drive);
int unit = (drive->select.b.unit & 0x01);
@@ -1211,8 +1211,8 @@ udma_bits_to_command(unsigned char bits, int high_speed)
static int __pmac
pmac_ide_mdma_enable(struct ata_device *drive, int idx)
{
- byte bits = drive->id->dma_mword & 0x07;
- byte feature = dma_bits_to_command(bits);
+ u8 bits = drive->id->dma_mword & 0x07;
+ u8 feature = dma_bits_to_command(bits);
u32 *timings;
int drive_cycle_time;
struct hd_driveid *id = drive->id;
@@ -1249,8 +1249,8 @@ pmac_ide_mdma_enable(struct ata_device *drive, int idx)
static int __pmac
pmac_ide_udma_enable(struct ata_device *drive, int idx, int high_speed)
{
- byte bits = drive->id->dma_ultra & 0x1f;
- byte feature = udma_bits_to_command(bits, high_speed);
+ u8 bits = drive->id->dma_ultra & 0x1f;
+ u8 feature = udma_bits_to_command(bits, high_speed);
u32 *timings;
int ret;
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index 2c1fe77c4cb2..4dc463ba33fa 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -827,7 +827,7 @@ typedef struct {
/*
* Read position information
*/
- byte partition;
+ u8 partition;
unsigned int first_frame_position; /* Current block */
unsigned int last_frame_position;
unsigned int blocks_in_buffer;
@@ -835,7 +835,7 @@ typedef struct {
/*
* Last error information
*/
- byte sense_key, asc, ascq;
+ u8 sense_key, asc, ascq;
/*
* Character device operation
@@ -1237,7 +1237,7 @@ static int idetape_chrdev_present = 0;
* DO NOT REMOVE, BUILDING A VERBOSE DEBUG SCHEME FOR ATAPI
*/
-char *idetape_sense_key_verbose (byte idetape_sense_key)
+char *idetape_sense_key_verbose(u8 idetape_sense_key)
{
switch (idetape_sense_key) {
default: {
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index 230bad45d91d..3b776c4dae02 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -49,12 +49,13 @@
#endif
#include <linux/pci.h>
#include <linux/delay.h>
-#include <linux/ide.h>
#include <linux/devfs_fs_kernel.h>
#include <linux/reboot.h>
#include <linux/cdrom.h>
#include <linux/device.h>
#include <linux/kmod.h>
+#include <linux/hdreg.h>
+#include <linux/ide.h>
#include <asm/byteorder.h>
#include <asm/irq.h>
@@ -62,7 +63,7 @@
#include <asm/io.h>
#include <asm/bitops.h>
-#include "ata-timing.h"
+#include "timing.h"
#include "pcihost.h"
#include "ioctl.h"
@@ -258,7 +259,7 @@ static struct ata_bit_messages ata_error_msgs[] = {
{ MARK_ERR, MARK_ERR, "addr mark not found" }
};
-static void dump_bits(struct ata_bit_messages *msgs, int nr, byte bits)
+static void dump_bits(struct ata_bit_messages *msgs, int nr, u8 bits)
{
int i;
int first = 1;
diff --git a/drivers/ide/ioctl.c b/drivers/ide/ioctl.c
index 003b743b4772..d1b5f6f8d4ad 100644
--- a/drivers/ide/ioctl.c
+++ b/drivers/ide/ioctl.c
@@ -26,7 +26,7 @@
#include <linux/delay.h>
#include <linux/cdrom.h>
#include <linux/device.h>
-
+#include <linux/hdreg.h>
#include <linux/ide.h>
#include <asm/uaccess.h>
@@ -230,13 +230,13 @@ int ata_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned
if (!loc || (drive->type != ATA_DISK && drive->type != ATA_FLOPPY))
return -EINVAL;
- if (put_user(drive->bios_head, (byte *) &loc->heads))
+ if (put_user(drive->bios_head, (u8 *) &loc->heads))
return -EFAULT;
- if (put_user(drive->bios_sect, (byte *) &loc->sectors))
+ if (put_user(drive->bios_sect, (u8 *) &loc->sectors))
return -EFAULT;
- if (put_user(bios_cyl, (unsigned short *) &loc->cylinders))
+ if (put_user(bios_cyl, (u16 *) &loc->cylinders))
return -EFAULT;
if (put_user((unsigned)drive->part[minor(inode->i_rdev)&PARTN_MASK].start_sect,
@@ -283,18 +283,18 @@ int ata_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned
case HDIO_GET_NICE:
- return put_user(drive->dsc_overlap << IDE_NICE_DSC_OVERLAP |
- drive->atapi_overlap << IDE_NICE_ATAPI_OVERLAP,
+ return put_user(drive->dsc_overlap | drive->atapi_overlap << 1,
(long *) arg);
case HDIO_SET_NICE:
if (!capable(CAP_SYS_ADMIN))
return -EACCES;
- if (arg != (arg & ((1 << IDE_NICE_DSC_OVERLAP))))
+ if (arg != (arg & 1))
return -EPERM;
- drive->dsc_overlap = (arg >> IDE_NICE_DSC_OVERLAP) & 1;
+ drive->dsc_overlap = arg & 1;
+
/* Only CD-ROM's and tapes support DSC overlap. */
if (drive->dsc_overlap && !(drive->type == ATA_ROM || drive->type == ATA_TAPE)) {
drive->dsc_overlap = 0;
diff --git a/drivers/ide/it8172.c b/drivers/ide/it8172.c
index 002dc1766fd0..838718764c4f 100644
--- a/drivers/ide/it8172.c
+++ b/drivers/ide/it8172.c
@@ -33,16 +33,15 @@
#include <linux/kernel.h>
#include <linux/ioport.h>
#include <linux/pci.h>
-#include <linux/hdreg.h>
-#include <linux/ide.h>
#include <linux/delay.h>
#include <linux/init.h>
+#include <linux/hdreg.h>
#include <linux/ide.h>
#include <asm/io.h>
#include <asm/it8172/it8172_int.h>
-#include "ata-timing.h"
+#include "timing.h"
#include "pcihost.h"
diff --git a/drivers/ide/main.c b/drivers/ide/main.c
index a3e134deef6b..c59fe6307400 100644
--- a/drivers/ide/main.c
+++ b/drivers/ide/main.c
@@ -35,12 +35,13 @@
#endif
#include <linux/pci.h>
#include <linux/delay.h>
-#include <linux/ide.h>
#include <linux/devfs_fs_kernel.h>
#include <linux/reboot.h>
#include <linux/cdrom.h>
#include <linux/device.h>
#include <linux/kmod.h>
+#include <linux/hdreg.h>
+#include <linux/ide.h>
#include <asm/byteorder.h>
#include <asm/irq.h>
@@ -48,7 +49,7 @@
#include <asm/io.h>
#include <asm/bitops.h>
-#include "ata-timing.h"
+#include "timing.h"
#include "pcihost.h"
#include "ioctl.h"
diff --git a/drivers/ide/ns87415.c b/drivers/ide/ns87415.c
index 379bde73032d..61f9b75eef67 100644
--- a/drivers/ide/ns87415.c
+++ b/drivers/ide/ns87415.c
@@ -126,7 +126,7 @@ static void __init ide_init_ns87415(struct ata_channel *hwif)
{
struct pci_dev *dev = hwif->pci_dev;
unsigned int ctrl, using_inta;
- byte progif;
+ u8 progif;
/* Set a good latency timer and cache line size value. */
(void) pci_write_config_byte(dev, PCI_LATENCY_TIMER, 64);
diff --git a/drivers/ide/opti621.c b/drivers/ide/opti621.c
index 6b025f3e93ce..c141def6663d 100644
--- a/drivers/ide/opti621.c
+++ b/drivers/ide/opti621.c
@@ -99,7 +99,7 @@
#include <asm/io.h>
-#include "ata-timing.h"
+#include "timing.h"
#include "pcihost.h"
#define OPTI621_MAX_PIO 3
@@ -137,7 +137,7 @@ int reg_base;
/* there are stored pio numbers from other calls of opti621_tune_drive */
-static void compute_pios(struct ata_device *drive, byte pio)
+static void compute_pios(struct ata_device *drive, u8 pio)
/* Store values into drive->drive_data
* second_contr - 0 for primary controller, 1 for secondary
* slave_drive - 0 -> pio is for master, 1 -> pio is for slave
@@ -178,7 +178,7 @@ static int cmpt_clk(int time, int bus_speed)
return ((time*bus_speed+999999)/1000000);
}
-static void write_reg(byte value, int reg)
+static void write_reg(u8 value, int reg)
/* Write value to register reg, base of register
* is at reg_base (0x1f0 primary, 0x170 secondary,
* if not changed by PCI configuration).
@@ -192,14 +192,14 @@ static void write_reg(byte value, int reg)
outb(0x83, reg_base+2);
}
-static byte read_reg(int reg)
+static u8 read_reg(int reg)
/* Read value from register reg, base of register
* is at reg_base (0x1f0 primary, 0x170 secondary,
* if not changed by PCI configuration).
* This is from setupvic.exe program.
*/
{
- byte ret;
+ u8 ret;
inw(reg_base+1);
inw(reg_base+1);
outb(3, reg_base+2);
@@ -245,16 +245,16 @@ static void compute_clocks(int pio, pio_clocks_t *clks)
}
/* Main tune procedure, called from tuneproc. */
-static void opti621_tune_drive(struct ata_device *drive, byte pio)
+static void opti621_tune_drive(struct ata_device *drive, u8 pio)
{
/* primary and secondary drives share some registers,
* so we have to program both drives
*/
unsigned long flags;
- byte pio1, pio2;
+ u8 pio1, pio2;
pio_clocks_t first, second;
int ax, drdy;
- byte cycle1, cycle2, misc;
+ u8 cycle1, cycle2, misc;
struct ata_channel *hwif = drive->channel;
/* sets drive->drive_data for both drives */
diff --git a/drivers/ide/pcidma.c b/drivers/ide/pcidma.c
index a476693a3820..2674e69327dc 100644
--- a/drivers/ide/pcidma.c
+++ b/drivers/ide/pcidma.c
@@ -24,10 +24,11 @@
#include <linux/interrupt.h>
#include <linux/pci.h>
#include <linux/init.h>
-#include <linux/ide.h>
#include <linux/delay.h>
+#include <linux/hdreg.h>
+#include <linux/ide.h>
-#include "ata-timing.h"
+#include "timing.h"
#include <asm/io.h>
#include <asm/irq.h>
diff --git a/drivers/ide/pdc202xx.c b/drivers/ide/pdc202xx.c
index 28f888d4a9c4..1d871fdcc1d2 100644
--- a/drivers/ide/pdc202xx.c
+++ b/drivers/ide/pdc202xx.c
@@ -48,16 +48,16 @@
#include <linux/mm.h>
#include <linux/ioport.h>
#include <linux/blkdev.h>
-#include <linux/hdreg.h>
#include <linux/interrupt.h>
#include <linux/pci.h>
#include <linux/init.h>
+#include <linux/hdreg.h>
#include <linux/ide.h>
#include <asm/io.h>
#include <asm/irq.h>
-#include "ata-timing.h"
+#include "timing.h"
#include "pcihost.h"
#define PDC202XX_DEBUG_DRIVE_INFO 0
@@ -105,7 +105,7 @@ static struct pdc_bit_messages pdc_reg_C[] = {
/* MC3-MC0 - DMA "C" timing */
};
-static void pdc_dump_bits(struct pdc_bit_messages *msgs, byte bits)
+static void pdc_dump_bits(struct pdc_bit_messages *msgs, u8 bits)
{
int i;
@@ -174,7 +174,7 @@ static int __init pdc202xx_modes_map(struct ata_channel *ch)
return map;
}
-static int pdc202xx_tune_chipset(struct ata_device *drive, byte speed)
+static int pdc202xx_tune_chipset(struct ata_device *drive, u8 speed)
{
struct pci_dev *dev = drive->channel->pci_dev;
u32 drive_conf;
@@ -315,7 +315,7 @@ static int pdc202xx_tune_chipset(struct ata_device *drive, byte speed)
OUT_BYTE(value, reg); \
mdelay(delay);
-static int pdc202xx_new_tune_chipset(struct ata_device *drive, byte speed)
+static int pdc202xx_new_tune_chipset(struct ata_device *drive, u8 speed)
{
struct ata_channel *hwif = drive->channel;
u32 high_16 = pci_resource_start(hwif->pci_dev, 4);
@@ -453,7 +453,7 @@ static void pdc202xx_tune_drive(struct ata_device *drive, u8 pio)
if (pio == 255)
speed = ata_best_pio_mode(drive);
else
- speed = XFER_PIO_0 + min_t(byte, pio, 4);
+ speed = XFER_PIO_0 + min_t(u8, pio, 4);
pdc202xx_tune_chipset(drive, speed);
}
@@ -695,7 +695,7 @@ static unsigned int __init pdc202xx_init_chipset(struct pci_dev *dev)
break;
default:
if ((dev->class >> 8) != PCI_CLASS_STORAGE_IDE) {
- byte irq = 0, irq2 = 0;
+ u8 irq = 0, irq2 = 0;
pci_read_config_byte(dev, PCI_INTERRUPT_LINE,
&irq);
pci_read_config_byte(dev, (PCI_INTERRUPT_LINE) | 0x80, &irq2); /* 0xbc */
diff --git a/drivers/ide/pdc4030.c b/drivers/ide/pdc4030.c
index 323be48b0e30..c08a6914c7ff 100644
--- a/drivers/ide/pdc4030.c
+++ b/drivers/ide/pdc4030.c
@@ -175,10 +175,10 @@ static void promise_selectproc(struct ata_device *drive)
* by command F0. They all have the same success/failure notification -
* 'P' (=0x50) on success, 'p' (=0x70) on failure.
*/
-int pdc4030_cmd(struct ata_device *drive, byte cmd)
+int pdc4030_cmd(struct ata_device *drive, u8 cmd)
{
unsigned long timeout, timer;
- byte status_val;
+ u8 status_val;
promise_selectproc(drive); /* redundant? */
outb(0xF3, IDE_SECTOR_REG);
diff --git a/drivers/ide/pdcraid.c b/drivers/ide/pdcraid.c
index d1bd67ba7f45..f4b7fc0f82e1 100644
--- a/drivers/ide/pdcraid.c
+++ b/drivers/ide/pdcraid.c
@@ -135,11 +135,11 @@ static int pdcraid_ioctl(struct inode *inode, struct file *file,
return -EINVAL;
if (put_user
(raid[minor].geom.heads,
- (byte *) & loc->heads))
+ (u8 *) & loc->heads))
return -EFAULT;
if (put_user
(raid[minor].geom.sectors,
- (byte *) & loc->sectors))
+ (u8 *) & loc->sectors))
return -EFAULT;
if (put_user
(bios_cyl, (unsigned short *) &loc->cylinders))
diff --git a/drivers/ide/piix.c b/drivers/ide/piix.c
index a5fb9998bf56..b56759830069 100644
--- a/drivers/ide/piix.c
+++ b/drivers/ide/piix.c
@@ -45,11 +45,12 @@
#include <linux/blkdev.h>
#include <linux/pci.h>
#include <linux/init.h>
+#include <linux/hdreg.h>
#include <linux/ide.h>
#include <asm/io.h>
-#include "ata-timing.h"
+#include "timing.h"
#include "pcihost.h"
#define PIIX_IDETIM0 0x40
@@ -240,7 +241,7 @@ static void piix_tune_drive(struct ata_device *drive, unsigned char pio)
return;
}
- piix_set_drive(drive, XFER_PIO_0 + min_t(byte, pio, 5));
+ piix_set_drive(drive, XFER_PIO_0 + min_t(u8, pio, 5));
}
#ifdef CONFIG_BLK_DEV_IDEDMA
diff --git a/drivers/ide/probe.c b/drivers/ide/probe.c
index abe93fece6cf..3766b7531c78 100644
--- a/drivers/ide/probe.c
+++ b/drivers/ide/probe.c
@@ -28,9 +28,10 @@
#include <linux/genhd.h>
#include <linux/slab.h>
#include <linux/delay.h>
-#include <linux/ide.h>
#include <linux/spinlock.h>
#include <linux/pci.h>
+#include <linux/hdreg.h>
+#include <linux/ide.h>
#include <asm/byteorder.h>
#include <asm/irq.h>
@@ -302,18 +303,18 @@ void ide_fixstring(char *s, const int bytecount, const int byteswap)
/*
* All hosts that use the 80c ribbon must use this!
*/
-byte eighty_ninty_three(struct ata_device *drive)
+int eighty_ninty_three(struct ata_device *drive)
{
- return ((u8) ((drive->channel->udma_four) &&
+ return ((drive->channel->udma_four) &&
#ifndef CONFIG_IDEDMA_IVB
(drive->id->hw_config & 0x4000) &&
#endif
- (drive->id->hw_config & 0x6000)) ? 1 : 0);
+ (drive->id->hw_config & 0x6000)) ? 1 : 0;
}
/* FIXME: Channel lock should be held.
*/
-int ide_config_drive_speed(struct ata_device *drive, byte speed)
+int ide_config_drive_speed(struct ata_device *drive, u8 speed)
{
struct ata_channel *ch = drive->channel;
int ret;
diff --git a/drivers/ide/qd65xx.c b/drivers/ide/qd65xx.c
index 6fce3b4bf491..633a75950d60 100644
--- a/drivers/ide/qd65xx.c
+++ b/drivers/ide/qd65xx.c
@@ -29,12 +29,13 @@
#include <linux/mm.h>
#include <linux/ioport.h>
#include <linux/blkdev.h>
+#include <linux/init.h>
#include <linux/hdreg.h>
#include <linux/ide.h>
-#include <linux/init.h>
+
#include <asm/io.h>
-#include "ata-timing.h"
+#include "timing.h"
#include "qd65xx.h"
/*
@@ -85,7 +86,7 @@
static int timings[4]={-1,-1,-1,-1}; /* stores current timing for each timer */
-static void qd_write_reg(byte content, byte reg)
+static void qd_write_reg(u8 content, unsigned int reg)
{
unsigned long flags;
@@ -95,10 +96,10 @@ static void qd_write_reg(byte content, byte reg)
restore_flags(flags); /* all CPUs */
}
-byte __init qd_read_reg(byte reg)
+static u8 __init qd_read_reg(unsigned int reg)
{
unsigned long flags;
- byte read;
+ u8 read;
save_flags(flags); /* all CPUs */
cli(); /* all CPUs */
@@ -115,8 +116,8 @@ byte __init qd_read_reg(byte reg)
static void qd_select(struct ata_device *drive)
{
- byte index = (( (QD_TIMREG(drive)) & 0x80 ) >> 7) |
- (QD_TIMREG(drive) & 0x02);
+ u8 index = (((QD_TIMREG(drive)) & 0x80 ) >> 7) |
+ (QD_TIMREG(drive) & 0x02);
if (timings[index] != QD_TIMING(drive))
qd_write_reg(timings[index] = QD_TIMING(drive), QD_TIMREG(drive));
@@ -130,9 +131,9 @@ static void qd_select(struct ata_device *drive)
* upper nibble represents recovery time, in count of VLB clocks
*/
-static byte qd6500_compute_timing(struct ata_channel *hwif, int active_time, int recovery_time)
+static u8 qd6500_compute_timing(struct ata_channel *hwif, int active_time, int recovery_time)
{
- byte active_cycle,recovery_cycle;
+ u8 active_cycle,recovery_cycle;
if (system_bus_speed <= 33333) {
active_cycle = 9 - IDE_IN(active_time * system_bus_speed / 1000000 + 1, 2, 9);
@@ -151,12 +152,12 @@ static byte qd6500_compute_timing(struct ata_channel *hwif, int active_time, int
* idem for qd6580
*/
-static byte qd6580_compute_timing(int active_time, int recovery_time)
+static u8 qd6580_compute_timing(int active_time, int recovery_time)
{
- byte active_cycle = 17 - IDE_IN(active_time * system_bus_speed / 1000000 + 1, 2, 17);
- byte recovery_cycle = 15 - IDE_IN(recovery_time * system_bus_speed / 1000000 + 1, 2, 15);
+ u8 active_cycle = 17 - IDE_IN(active_time * system_bus_speed / 1000000 + 1, 2, 17);
+ u8 recovery_cycle = 15 - IDE_IN(recovery_time * system_bus_speed / 1000000 + 1, 2, 15);
- return((recovery_cycle<<4) | active_cycle);
+ return (recovery_cycle<<4) | active_cycle;
}
/*
@@ -205,7 +206,7 @@ static int qd_timing_ok(struct ata_device drives[])
* records the timing, and enables selectproc as needed
*/
-static void qd_set_timing(struct ata_device *drive, byte timing)
+static void qd_set_timing(struct ata_device *drive, u8 timing)
{
struct ata_channel *hwif = drive->channel;
@@ -224,7 +225,7 @@ static void qd_set_timing(struct ata_device *drive, byte timing)
* qd6500_tune_drive
*/
-static void qd6500_tune_drive(struct ata_device *drive, byte pio)
+static void qd6500_tune_drive(struct ata_device *drive, u8 pio)
{
int active_time = 175;
int recovery_time = 415; /* worst case values from the dos driver */
@@ -245,7 +246,7 @@ static void qd6500_tune_drive(struct ata_device *drive, byte pio)
* qd6580_tune_drive
*/
-static void qd6580_tune_drive(struct ata_device *drive, byte pio)
+static void qd6580_tune_drive(struct ata_device *drive, u8 pio)
{
struct ata_timing *t;
int base = drive->channel->select_data;
@@ -257,7 +258,7 @@ static void qd6580_tune_drive(struct ata_device *drive, byte pio)
if (pio == 255)
pio = ata_timing_mode(drive, XFER_PIO | XFER_EPIO);
else
- pio = XFER_PIO_0 + min_t(byte, pio, 4);
+ pio = XFER_PIO_0 + min_t(u8, pio, 4);
t = ata_timing_data(pio);
@@ -305,8 +306,8 @@ static void qd6580_tune_drive(struct ata_device *drive, byte pio)
static int __init qd_testreg(int port)
{
- byte savereg;
- byte readreg;
+ u8 savereg;
+ u8 readreg;
unsigned long flags;
save_flags(flags); /* all CPUs */
@@ -333,7 +334,7 @@ static int __init qd_testreg(int port)
* called to setup an ata channel : adjusts attributes & links for tuning
*/
-void __init qd_setup(int unit, int base, int config, unsigned int data0, unsigned int data1, void (*tuneproc) (struct ata_device *, byte pio))
+void __init qd_setup(int unit, int base, int config, unsigned int data0, unsigned int data1, void (*tuneproc) (struct ata_device *, u8 pio))
{
struct ata_channel *hwif = &ide_hwifs[unit];
@@ -354,7 +355,7 @@ void __init qd_setup(int unit, int base, int config, unsigned int data0, unsigne
*/
void __init qd_unsetup(int unit) {
struct ata_channel *hwif = &ide_hwifs[unit];
- byte config = hwif->config_data;
+ u8 config = hwif->config_data;
int base = hwif->select_data;
void *tuneproc = (void *) hwif->tuneproc;
@@ -390,7 +391,7 @@ void __init qd_unsetup(int unit) {
int __init qd_probe(int base)
{
- byte config;
+ u8 config;
int unit;
config = qd_read_reg(QD_CONFIG_PORT);
@@ -417,7 +418,7 @@ int __init qd_probe(int base)
}
if (((config & 0xf0) == QD_CONFIG_QD6580_A) || ((config & 0xf0) == QD_CONFIG_QD6580_B)) {
- byte control;
+ u8 control;
if (qd_testreg(base) || qd_testreg(base+0x02)) return 1;
/* bad registers */
diff --git a/drivers/ide/qd65xx.h b/drivers/ide/qd65xx.h
index 73a7d76bbf6e..e0136907954c 100644
--- a/drivers/ide/qd65xx.h
+++ b/drivers/ide/qd65xx.h
@@ -34,8 +34,8 @@
#define QD_CONFIG(hwif) ((hwif)->config_data & 0x00ff)
#define QD_CONTROL(hwif) (((hwif)->config_data & 0xff00) >> 8)
-#define QD_TIMING(drive) (byte)(((drive)->drive_data) & 0x00ff)
-#define QD_TIMREG(drive) (byte)((((drive)->drive_data) & 0xff00) >> 8)
+#define QD_TIMING(drive) (u8)(((drive)->drive_data) & 0x00ff)
+#define QD_TIMREG(drive) (u8)((((drive)->drive_data) & 0xff00) >> 8)
#define QD6500_DEF_DATA ((QD_TIM1_PORT<<8) | (QD_ID3 ? 0x0c : 0x08))
#define QD6580_DEF_DATA ((QD_TIM1_PORT<<8) | (QD_ID3 ? 0x0a : 0x00))
diff --git a/drivers/ide/quirks.c b/drivers/ide/quirks.c
index d4cd05578193..740cfe5632fe 100644
--- a/drivers/ide/quirks.c
+++ b/drivers/ide/quirks.c
@@ -24,8 +24,9 @@
#include <linux/interrupt.h>
#include <linux/pci.h>
#include <linux/init.h>
-#include <linux/ide.h>
#include <linux/delay.h>
+#include <linux/hdreg.h>
+#include <linux/ide.h>
#include <asm/io.h>
#include <asm/irq.h>
@@ -153,14 +154,14 @@ int check_drive_lists(struct ata_device *drive, int good_bad)
/* Consult the list of known "good" drives */
list = good_dma_drives;
while (*list) {
- if (!strcmp(*list++,id->model))
+ if (!strcmp(*list++, id->model))
return 1;
}
} else {
/* Consult the list of known "bad" drives */
list = bad_dma_drives;
while (*list) {
- if (!strcmp(*list++,id->model)) {
+ if (!strcmp(*list++, id->model)) {
printk("%s: Disabling (U)DMA for %s\n",
drive->name, id->model);
return 1;
diff --git a/drivers/ide/serverworks.c b/drivers/ide/serverworks.c
index ff8e39ef3b9f..1aa9c7199d71 100644
--- a/drivers/ide/serverworks.c
+++ b/drivers/ide/serverworks.c
@@ -85,14 +85,14 @@
#include <linux/kernel.h>
#include <linux/ioport.h>
#include <linux/pci.h>
-#include <linux/hdreg.h>
#include <linux/init.h>
#include <linux/delay.h>
+#include <linux/hdreg.h>
#include <linux/ide.h>
#include <asm/io.h>
-#include "ata-timing.h"
+#include "timing.h"
#include "pcihost.h"
#undef SVWKS_DEBUG_DRIVE_INFO
diff --git a/drivers/ide/sis5513.c b/drivers/ide/sis5513.c
index fb1a56cd0140..efe3d4a882ad 100644
--- a/drivers/ide/sis5513.c
+++ b/drivers/ide/sis5513.c
@@ -44,13 +44,13 @@
#include <linux/interrupt.h>
#include <linux/pci.h>
#include <linux/init.h>
-#include <linux/ide.h>
#include <linux/hdreg.h>
+#include <linux/ide.h>
#include <asm/io.h>
#include <asm/irq.h>
-#include "ata-timing.h"
+#include "timing.h"
#include "pcihost.h"
/* When DEBUG is defined it outputs initial PCI config register
@@ -84,7 +84,7 @@ static unsigned char chipset_family;
Fewer might be used depending on the actual chipset */
static unsigned char ide_regs_copy[0x58];
-static byte sis5513_max_config_register(void) {
+static u8 sis5513_max_config_register(void) {
switch(chipset_family) {
case ATA_00:
case ATA_16: return 0x4f;
@@ -100,9 +100,9 @@ static byte sis5513_max_config_register(void) {
/* Read config registers, print differences from previous read */
static void sis5513_load_verify_registers(struct pci_dev* dev, char* info) {
int i;
- byte reg_val;
- byte changed=0;
- byte max = sis5513_max_config_register();
+ u8 reg_val;
+ u8 changed = 0;
+ u8 max = sis5513_max_config_register();
printk("SIS5513: %s, changed registers:\n", info);
for(i=0; i<=max; i++) {
@@ -121,9 +121,10 @@ static void sis5513_load_verify_registers(struct pci_dev* dev, char* info) {
}
/* Load config registers, no printing */
-static void sis5513_load_registers(struct pci_dev* dev) {
+static void sis5513_load_registers(struct pci_dev* dev)
+{
int i;
- byte max = sis5513_max_config_register();
+ u8 max = sis5513_max_config_register();
for(i=0; i<=max; i++) {
pci_read_config_byte(dev, i, &(ide_regs_copy[i]));
@@ -131,14 +132,15 @@ static void sis5513_load_registers(struct pci_dev* dev) {
}
/* Print a register */
-static void sis5513_print_register(int reg) {
+static void sis5513_print_register(int reg)
+{
printk(" %0#x:%0#x", reg, ide_regs_copy[reg]);
}
/* Print valuable registers */
static void sis5513_print_registers(struct pci_dev* dev, char* marker) {
int i;
- byte max = sis5513_max_config_register();
+ u8 max = sis5513_max_config_register();
sis5513_load_registers(dev);
printk("SIS5513 %s\n", marker);
@@ -193,9 +195,9 @@ static const struct {
/* Cycle time bits and values vary accross chip dma capabilities
These three arrays hold the register layout and the values to set.
Indexed by chipset_family and (dma_mode - XFER_UDMA_0) */
-static byte cycle_time_offset[] = {0,0,5,4,4,0,0};
-static byte cycle_time_range[] = {0,0,2,3,3,4,4};
-static byte cycle_time_value[][XFER_UDMA_5 - XFER_UDMA_0 + 1] = {
+static u8 cycle_time_offset[] = {0,0,5,4,4,0,0};
+static u8 cycle_time_range[] = {0,0,2,3,3,4,4};
+static u8 cycle_time_value[][XFER_UDMA_5 - XFER_UDMA_0 + 1] = {
{0,0,0,0,0,0}, /* no udma */
{0,0,0,0,0,0}, /* no udma */
{3,2,1,0,0,0},
@@ -317,7 +319,7 @@ static int sis5513_tune_chipset(struct ata_device *drive, u8 speed)
struct ata_channel *hwif = drive->channel;
struct pci_dev *dev = hwif->pci_dev;
- byte drive_pci, reg;
+ u8 drive_pci, reg;
#ifdef DEBUG
sis5513_load_verify_registers(dev, "sis5513_tune_chipset start");
@@ -418,7 +420,7 @@ static unsigned int __init pci_init_sis5513(struct pci_dev *dev)
#endif
if (SiSHostChipInfo[i].flags & SIS5513_LATENCY) {
- byte latency = (chipset_family == ATA_100)? 0x80 : 0x10; /* Lacking specs */
+ u8 latency = (chipset_family == ATA_100)? 0x80 : 0x10; /* Lacking specs */
pci_write_config_byte(dev, PCI_LATENCY_TIMER, latency);
}
}
@@ -427,7 +429,7 @@ static unsigned int __init pci_init_sis5513(struct pci_dev *dev)
1/ tell IDE channels to operate in Compabitility mode only
2/ tell old chips to allow per drive IDE timings */
if (host_dev) {
- byte reg;
+ u8 reg;
switch(chipset_family) {
case ATA_133:
case ATA_100:
diff --git a/drivers/ide/sl82c105.c b/drivers/ide/sl82c105.c
index 488b0018bb43..d348331d2006 100644
--- a/drivers/ide/sl82c105.c
+++ b/drivers/ide/sl82c105.c
@@ -19,14 +19,14 @@
#include <linux/ioport.h>
#include <linux/interrupt.h>
#include <linux/blkdev.h>
-#include <linux/hdreg.h>
#include <linux/pci.h>
+#include <linux/hdreg.h>
#include <linux/ide.h>
#include <asm/io.h>
#include <asm/dma.h>
-#include "ata-timing.h"
+#include "timing.h"
#include "pcihost.h"
/*
@@ -82,7 +82,7 @@ static void config_for_pio(struct ata_device *drive, int pio, int report)
if (pio == 255)
xfer_mode = ata_timing_mode(drive, XFER_PIO | XFER_EPIO);
else
- xfer_mode = XFER_PIO_0 + min_t(byte, pio, 4);
+ xfer_mode = XFER_PIO_0 + min_t(u8, pio, 4);
t = ata_timing_data(xfer_mode);
@@ -258,7 +258,7 @@ static void sl82c105_lostirq(struct ata_device *drive)
* We only deal with PIO mode here - DMA mode 'using_dma' is not
* initialised at the point that this function is called.
*/
-static void tune_sl82c105(struct ata_device *drive, byte pio)
+static void tune_sl82c105(struct ata_device *drive, u8 pio)
{
config_for_pio(drive, pio, 1);
@@ -320,7 +320,7 @@ static unsigned int __init sl82c105_init_chipset(struct pci_dev *dev)
static void __init sl82c105_init_dma(struct ata_channel *ch, unsigned long dma_base)
{
unsigned int bridge_rev;
- byte dma_state;
+ u8 dma_state;
dma_state = inb(dma_base + 2);
bridge_rev = sl82c105_bridge_revision(ch->pci_dev);
diff --git a/drivers/ide/tcq.c b/drivers/ide/tcq.c
index 83c63ff13f7d..f6ce02e194e2 100644
--- a/drivers/ide/tcq.c
+++ b/drivers/ide/tcq.c
@@ -25,6 +25,7 @@
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/interrupt.h>
+#include <linux/hdreg.h>
#include <linux/ide.h>
#include <asm/delay.h>
diff --git a/drivers/ide/ata-timing.h b/drivers/ide/timing.h
index 9f01f07e8329..f413a85723d0 100644
--- a/drivers/ide/ata-timing.h
+++ b/drivers/ide/timing.h
@@ -1,14 +1,7 @@
-#ifndef _ATA_TIMING_H
-#define _ATA_TIMING_H
-
/*
- * $Id: ata-timing.h,v 2.0 2002/03/12 13:02:22 vojtech Exp $
- *
* Copyright (C) 1996 Linus Torvalds, Igor Abramov, and Mark Lord
* Copyright (C) 1999-2001 Vojtech Pavlik
- */
-
-/*
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -24,9 +17,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <linux/hdreg.h>
-#include <linux/ide.h>
-
#define XFER_PIO_5 0x0d
#define XFER_UDMA_SLOW 0x4f
@@ -91,5 +81,3 @@ extern struct ata_timing* ata_timing_data(short speed);
extern int ata_timing_compute(struct ata_device *drive,
short speed, struct ata_timing *t, int T, int UT);
extern u8 ata_best_pio_mode(struct ata_device *drive);
-
-#endif
diff --git a/drivers/ide/trm290.c b/drivers/ide/trm290.c
index 4e1995b62a47..d37b405e4759 100644
--- a/drivers/ide/trm290.c
+++ b/drivers/ide/trm290.c
@@ -251,7 +251,7 @@ static void __init trm290_init_channel(struct ata_channel *hwif)
{
unsigned int cfgbase = 0;
unsigned long flags;
- byte reg;
+ u8 reg;
struct pci_dev *dev = hwif->pci_dev;
hwif->chipset = ide_trm290;
diff --git a/drivers/ide/umc8672.c b/drivers/ide/umc8672.c
index fb7f1a6116b9..61c986d226b3 100644
--- a/drivers/ide/umc8672.c
+++ b/drivers/ide/umc8672.c
@@ -46,13 +46,13 @@
#include <linux/mm.h>
#include <linux/ioport.h>
#include <linux/blkdev.h>
+#include <linux/init.h>
#include <linux/hdreg.h>
#include <linux/ide.h>
-#include <linux/init.h>
#include <asm/io.h>
-#include "ata-timing.h"
+#include "timing.h"
/*
* Default speeds. These can be changed with "auto-tune" and/or hdparm.
@@ -62,11 +62,11 @@
#define UMC_DRIVE2 1 /* 11 = Fastest Speed */
#define UMC_DRIVE3 1 /* In case of crash reduce speed */
-static byte current_speeds[4] = {UMC_DRIVE0, UMC_DRIVE1, UMC_DRIVE2, UMC_DRIVE3};
-static const byte pio_to_umc [5] = {0,3,7,10,11}; /* rough guesses */
+static u8 current_speeds[4] = {UMC_DRIVE0, UMC_DRIVE1, UMC_DRIVE2, UMC_DRIVE3};
+static const u8 pio_to_umc[5] = {0,3,7,10,11}; /* rough guesses */
/* 0 1 2 3 4 5 6 7 8 9 10 11 */
-static const byte speedtab [3][12] = {
+static const u8 speedtab[3][12] = {
{0xf, 0xb, 0x2, 0x2, 0x2, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1 },
{0x3, 0x2, 0x2, 0x2, 0x2, 0x2, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1 },
{0xff,0xcb,0xc0,0x58,0x36,0x33,0x23,0x22,0x21,0x11,0x10,0x0}};
@@ -77,13 +77,13 @@ static void out_umc (char port,char wert)
outb_p (wert,0x109);
}
-static inline byte in_umc (char port)
+static inline u8 in_umc (char port)
{
outb_p (port,0x108);
return inb_p (0x109);
}
-static void umc_set_speeds (byte speeds[])
+static void umc_set_speeds(u8 speeds[])
{
int i, tmp;
@@ -106,14 +106,14 @@ static void umc_set_speeds (byte speeds[])
speeds[0], speeds[1], speeds[2], speeds[3]);
}
-static void tune_umc(struct ata_device *drive, byte pio)
+static void tune_umc(struct ata_device *drive, u8 pio)
{
unsigned long flags;
if (pio == 255)
pio = ata_timing_mode(drive, XFER_PIO | XFER_EPIO) - XFER_PIO_0;
else
- pio = min_t(byte, pio, 4);
+ pio = min_t(u8, pio, 4);
printk("%s: setting umc8672 to PIO mode%d (speed %d)\n", drive->name, pio, pio_to_umc[pio]);
save_flags(flags); /* all CPUs */
diff --git a/drivers/ide/via82cxxx.c b/drivers/ide/via82cxxx.c
index 54838f9a8975..45cc8fd3fa80 100644
--- a/drivers/ide/via82cxxx.c
+++ b/drivers/ide/via82cxxx.c
@@ -65,11 +65,12 @@
#include <linux/blkdev.h>
#include <linux/pci.h>
#include <linux/init.h>
+#include <linux/hdreg.h>
#include <linux/ide.h>
#include <asm/io.h>
-#include "ata-timing.h"
+#include "timing.h"
#include "pcihost.h"
#define VIA_IDE_ENABLE 0x40
@@ -217,7 +218,7 @@ static void via82cxxx_tune_drive(struct ata_device *drive, unsigned char pio)
return;
}
- via_set_drive(drive, XFER_PIO_0 + min_t(byte, pio, 5));
+ via_set_drive(drive, XFER_PIO_0 + min_t(u8, pio, 5));
}
#ifdef CONFIG_BLK_DEV_IDEDMA
diff --git a/fs/partitions/msdos.c b/fs/partitions/msdos.c
index f06e68e07cce..5d0bb6074fe4 100644
--- a/fs/partitions/msdos.c
+++ b/fs/partitions/msdos.c
@@ -23,6 +23,7 @@
#include <linux/buffer_head.h> /* for invalidate_bdev() */
#ifdef CONFIG_BLK_DEV_IDE
+#include <linux/hdreg.h>
#include <linux/ide.h> /* IDE xlate */
#elif defined(CONFIG_BLK_DEV_IDE_MODULE)
#include <linux/module.h>
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 7b9c5cce01cf..8a41b3b2e74a 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -285,8 +285,8 @@ struct ata_device {
unsigned long sleep; /* sleep until this time */
- byte retry_pio; /* retrying dma capable host in pio */
- byte state; /* retry state */
+ u8 retry_pio; /* retrying dma capable host in pio */
+ u8 state; /* retry state */
unsigned using_dma : 1; /* disk is using dma for read/write */
unsigned using_tcq : 1; /* disk is using queueing */
@@ -307,20 +307,20 @@ struct ata_device {
unsigned remap_0_to_1 : 2; /* 0=remap if ezdrive, 1=remap, 2=noremap */
unsigned ata_flash : 1; /* 1=present, 0=default */
unsigned addressing; /* : 2; 0=28-bit, 1=48-bit, 2=64-bit */
- byte scsi; /* 0=default, 1=skip current ide-subdriver for ide-scsi emulation */
+ u8 scsi; /* 0=default, 1=skip current ide-subdriver for ide-scsi emulation */
select_t select; /* basic drive/head select reg value */
u8 status; /* last retrived status value for device */
- byte ready_stat; /* min status value for drive ready */
- byte mult_count; /* current multiple sector setting */
- byte bad_wstat; /* used for ignoring WRERR_STAT */
- byte nowerr; /* used for ignoring WRERR_STAT */
- byte sect0; /* offset of first sector for DM6:DDO */
- byte head; /* "real" number of heads */
- byte sect; /* "real" sectors per track */
- byte bios_head; /* BIOS/fdisk/LILO number of heads */
- byte bios_sect; /* BIOS/fdisk/LILO sectors per track */
+ u8 ready_stat; /* min status value for drive ready */
+ u8 mult_count; /* current multiple sector setting */
+ u8 bad_wstat; /* used for ignoring WRERR_STAT */
+ u8 nowerr; /* used for ignoring WRERR_STAT */
+ u8 sect0; /* offset of first sector for DM6:DDO */
+ u8 head; /* "real" number of heads */
+ u8 sect; /* "real" sectors per track */
+ u8 bios_head; /* BIOS/fdisk/LILO number of heads */
+ u8 bios_sect; /* BIOS/fdisk/LILO sectors per track */
unsigned int bios_cyl; /* BIOS/fdisk/LILO number of cyls */
unsigned int cyl; /* "real" number of cyls */
u64 capacity; /* total number of sectors */
@@ -343,13 +343,12 @@ struct ata_device {
int lun; /* logical unit */
int crc_count; /* crc counter to reduce drive speed */
- byte quirk_list; /* drive is considered quirky if set for a specific host */
- byte suspend_reset; /* drive suspend mode flag, soft-reset recovers */
- byte current_speed; /* current transfer rate set */
- byte dn; /* now wide spread use */
- byte wcache; /* status of write cache */
- byte acoustic; /* acoustic management */
- byte queue_depth; /* max queue depth */
+ int quirk_list; /* drive is considered quirky if set for a specific host */
+ u8 current_speed; /* current transfer rate set */
+ u8 dn; /* now wide spread use */
+ u8 wcache; /* status of write cache */
+ u8 acoustic; /* acoustic management */
+ unsigned int queue_depth; /* max queue depth */
unsigned int failures; /* current failure count */
unsigned int max_failures; /* maximum allowed failure count */
struct device dev; /* global device tree handle */
@@ -370,7 +369,7 @@ typedef enum {
ATA_OP_FINISHED, /* no drive operation was started */
ATA_OP_CONTINUES, /* a drive operation was started, and a handler was set */
ATA_OP_RELEASED, /* started and released bus */
- ATA_OP_READY, /* indicate status poll finished fine */
+ ATA_OP_READY /* indicate status poll finished fine */
} ide_startstop_t;
/*
@@ -428,10 +427,10 @@ struct ata_channel {
*/
/* setup disk on a channel for a particular PIO transfer mode */
- void (*tuneproc) (struct ata_device *, byte pio);
+ void (*tuneproc) (struct ata_device *, u8 pio);
/* setup the chipset timing for a particular transfer mode */
- int (*speedproc) (struct ata_device *, byte pio);
+ int (*speedproc) (struct ata_device *, u8 pio);
/* tweaks hardware to select drive */
void (*selectproc) (struct ata_device *);
@@ -640,10 +639,8 @@ extern void ata_read(struct ata_device *, void *, unsigned int);
extern void ata_write(struct ata_device *, void *, unsigned int);
extern int ide_raw_taskfile(struct ata_device *, struct ata_taskfile *, char *);
-extern int ide_config_drive_speed(struct ata_device *, byte);
-extern byte eighty_ninty_three(struct ata_device *);
-
-extern void ide_stall_queue(struct ata_device *, unsigned long);
+extern int ide_config_drive_speed(struct ata_device *, u8);
+extern int eighty_ninty_three(struct ata_device *);
extern int system_bus_speed;
@@ -656,11 +653,11 @@ extern int system_bus_speed;
extern int drive_is_flashcard(struct ata_device *);
-int ide_spin_wait_hwgroup(struct ata_device *);
-void ide_timer_expiry (unsigned long data);
+extern int ide_spin_wait_hwgroup(struct ata_device *);
+extern void ide_timer_expiry(unsigned long data);
extern void ata_irq_request(int irq, void *data, struct pt_regs *regs);
-void do_ide_request (request_queue_t * q);
-void ide_init_subdrivers (void);
+extern void do_ide_request(request_queue_t * q);
+extern void ide_init_subdrivers(void);
extern struct block_device_operations ide_fops[];
@@ -742,12 +739,12 @@ static inline int udma_irq_status(struct ata_device *drive)
static inline void udma_timeout(struct ata_device *drive)
{
- return drive->channel->udma_timeout(drive);
+ drive->channel->udma_timeout(drive);
}
static inline void udma_irq_lost(struct ata_device *drive)
{
- return drive->channel->udma_irq_lost(drive);
+ drive->channel->udma_irq_lost(drive);
}
#ifdef CONFIG_BLK_DEV_IDEDMA