Commit 84f4a1c4 authored by Martin Dalecki's avatar Martin Dalecki Committed by Trond Myklebust

[PATCH] IDE 100

  Trivia time:

  - C99 conforming initializations by Rusty.

  - ide__sti() -> local_irq_enable() and its friends.
parent e9356da8
...@@ -61,15 +61,18 @@ ...@@ -61,15 +61,18 @@
#define AEC_CABLEPINS_INPUT 0x10 #define AEC_CABLEPINS_INPUT 0x10
static unsigned char aec_cyc2udma[9] = { 5, 5, 5, 4, 3, 2, 2, 1, 1 }; static unsigned char aec_cyc2udma[9] = { 5, 5, 5, 4, 3, 2, 2, 1, 1 };
static unsigned char aec_cyc2act[16] = { 1, 1, 2, 3, 4, 5, 6, 0, 0, 7, 7, 7, 7, 7, 7, 7 }; static unsigned char aec_cyc2act[16] =
static unsigned char aec_cyc2rec[16] = { 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 0, 12, 13, 14 }; { 1, 1, 2, 3, 4, 5, 6, 0, 0, 7, 7, 7, 7, 7, 7, 7 };
static unsigned char aec_cyc2rec[16] =
{ 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 0, 12, 13, 14 };
/* /*
* aec_set_speed_old() writes timing values to * aec_set_speed_old() writes timing values to
* the chipset registers for ATP850UF * the chipset registers for ATP850UF
*/ */
static void aec_set_speed_old(struct pci_dev *dev, unsigned char dn, struct ata_timing *timing) static void aec_set_speed_old(struct pci_dev *dev, unsigned char dn,
struct ata_timing *timing)
{ {
unsigned char t; unsigned char t;
...@@ -90,19 +93,22 @@ static void aec_set_speed_old(struct pci_dev *dev, unsigned char dn, struct ata_ ...@@ -90,19 +93,22 @@ static void aec_set_speed_old(struct pci_dev *dev, unsigned char dn, struct ata_
* other Artop chips * other Artop chips
*/ */
static void aec_set_speed_new(struct pci_dev *dev, unsigned char dn, struct ata_timing *timing) static void aec_set_speed_new(struct pci_dev *dev, unsigned char dn,
struct ata_timing *timing)
{ {
unsigned char t; unsigned char t;
pci_write_config_byte(dev, AEC_DRIVE_TIMING + dn, pci_write_config_byte(dev, AEC_DRIVE_TIMING + dn,
(aec_cyc2act[FIT(timing->active, 0, 15)] << 4) (aec_cyc2act[FIT(timing->active, 0, 15)] <<
4)
| aec_cyc2rec[FIT(timing->recover, 0, 15)]); | aec_cyc2rec[FIT(timing->recover, 0, 15)]);
pci_read_config_byte(dev, AEC_UDMA_NEW + (dn >> 1), &t); pci_read_config_byte(dev, AEC_UDMA_NEW + (dn >> 1), &t);
t &= ~(0xf << ((dn & 1) << 2)); t &= ~(0xf << ((dn & 1) << 2));
if (timing->udma) { if (timing->udma) {
if (timing->udma >= 2) if (timing->udma >= 2)
t |= aec_cyc2udma[FIT(timing->udma, 2, 8)] << ((dn & 1) << 2); t |= aec_cyc2udma[FIT(timing->udma, 2, 8)] <<
((dn & 1) << 2);
if (timing->mode == XFER_UDMA_5) if (timing->mode == XFER_UDMA_5)
t |= 6; t |= 6;
if (timing->mode == XFER_UDMA_6) if (timing->mode == XFER_UDMA_6)
...@@ -123,11 +129,14 @@ static int aec_set_drive(struct ata_device *drive, unsigned char speed) ...@@ -123,11 +129,14 @@ static int aec_set_drive(struct ata_device *drive, unsigned char speed)
int T, UT; int T, UT;
int aec_old; int aec_old;
aec_old = (drive->channel->pci_dev->device == PCI_DEVICE_ID_ARTOP_ATP850UF); aec_old =
(drive->channel->pci_dev->device ==
PCI_DEVICE_ID_ARTOP_ATP850UF);
if (speed != XFER_PIO_SLOW && speed != drive->current_speed) if (speed != XFER_PIO_SLOW && speed != drive->current_speed)
if (ide_config_drive_speed(drive, speed)) if (ide_config_drive_speed(drive, speed))
printk(KERN_WARNING "ide%d: Drive %d didn't accept speed setting. Oh, well.\n", printk(KERN_WARNING
"ide%d: Drive %d didn't accept speed setting. Oh, well.\n",
drive->dn >> 1, drive->dn & 1); drive->dn >> 1, drive->dn & 1);
T = 1000000000 / system_bus_speed; T = 1000000000 / system_bus_speed;
...@@ -152,7 +161,9 @@ static int aec_set_drive(struct ata_device *drive, unsigned char speed) ...@@ -152,7 +161,9 @@ static int aec_set_drive(struct ata_device *drive, unsigned char speed)
static void aec62xx_tune_drive(struct ata_device *drive, unsigned char pio) static void aec62xx_tune_drive(struct ata_device *drive, unsigned char pio)
{ {
if (pio == 255) { if (pio == 255) {
aec_set_drive(drive, ata_timing_mode(drive, XFER_PIO | XFER_EPIO)); aec_set_drive(drive,
ata_timing_mode(drive,
XFER_PIO | XFER_EPIO));
return; return;
} }
...@@ -173,7 +184,10 @@ static int __init aec62xx_modes_map(struct ata_channel *ch) ...@@ -173,7 +184,10 @@ static int __init aec62xx_modes_map(struct ata_channel *ch)
case PCI_DEVICE_ID_ARTOP_ATP865: case PCI_DEVICE_ID_ARTOP_ATP865:
/* Can't use these modes simultaneously, /* Can't use these modes simultaneously,
based on which PLL clock was chosen. */ based on which PLL clock was chosen. */
map |= inb (bmide + AEC_BM_STAT_PCH) & AEC_PLLCLK_ATA133 ? XFER_UDMA_133 : XFER_UDMA_100; map |=
inb(bmide +
AEC_BM_STAT_PCH) & AEC_PLLCLK_ATA133 ?
XFER_UDMA_133 : XFER_UDMA_100;
case PCI_DEVICE_ID_ARTOP_ATP860R: case PCI_DEVICE_ID_ARTOP_ATP860R:
case PCI_DEVICE_ID_ARTOP_ATP860: case PCI_DEVICE_ID_ARTOP_ATP860:
map |= XFER_UDMA_66; map |= XFER_UDMA_66;
...@@ -220,7 +234,8 @@ static unsigned int __init aec62xx_init_chipset(struct pci_dev *dev) ...@@ -220,7 +234,8 @@ static unsigned int __init aec62xx_init_chipset(struct pci_dev *dev)
pci_write_config_byte(dev, AEC_IDE_ENABLE, t | 0x80); pci_write_config_byte(dev, AEC_IDE_ENABLE, t | 0x80);
#endif #endif
/* switch cable detection pins to input-only. */ /* switch cable detection pins to input-only. */
outb (inb (bmide + AEC_BM_STAT_SCH) | AEC_CABLEPINS_INPUT, bmide + AEC_BM_STAT_SCH); outb(inb(bmide + AEC_BM_STAT_SCH) | AEC_CABLEPINS_INPUT,
bmide + AEC_BM_STAT_SCH);
} }
/* /*
...@@ -274,7 +289,8 @@ static void __init aec62xx_init_channel(struct ata_channel *ch) ...@@ -274,7 +289,8 @@ static void __init aec62xx_init_channel(struct ata_channel *ch)
/* /*
* We allow the BM-DMA driver only work on enabled interfaces. * We allow the BM-DMA driver only work on enabled interfaces.
*/ */
static void __init aec62xx_init_dma(struct ata_channel *ch, unsigned long dmabase) static void __init aec62xx_init_dma(struct ata_channel *ch,
unsigned long dmabase)
{ {
unsigned char t; unsigned char t;
...@@ -286,50 +302,49 @@ static void __init aec62xx_init_dma(struct ata_channel *ch, unsigned long dmabas ...@@ -286,50 +302,49 @@ static void __init aec62xx_init_dma(struct ata_channel *ch, unsigned long dmabas
/* module data table */ /* module data table */
static struct ata_pci_device chipsets[] __initdata = { static struct ata_pci_device chipsets[] __initdata = {
{ {
vendor: PCI_VENDOR_ID_ARTOP, .vendor = PCI_VENDOR_ID_ARTOP,
device: PCI_DEVICE_ID_ARTOP_ATP850UF, .device = PCI_DEVICE_ID_ARTOP_ATP850UF,
init_chipset: aec62xx_init_chipset, .init_chipset = aec62xx_init_chipset,
init_channel: aec62xx_init_channel, .init_channel = aec62xx_init_channel,
init_dma: aec62xx_init_dma, .init_dma = aec62xx_init_dma,
enablebits: { {0x4a,0x02,0x02}, {0x4a,0x04,0x04} }, .enablebits = {{0x4a, 0x02, 0x02}, {0x4a, 0x04, 0x04}},
bootable: OFF_BOARD, .bootable = OFF_BOARD,
flags: ATA_F_SER | ATA_F_IRQ | ATA_F_DMA .flags = ATA_F_SER | ATA_F_IRQ | ATA_F_DMA
}, },
{ {
vendor: PCI_VENDOR_ID_ARTOP, .vendor = PCI_VENDOR_ID_ARTOP,
device: PCI_DEVICE_ID_ARTOP_ATP860, .device = PCI_DEVICE_ID_ARTOP_ATP860,
init_chipset: aec62xx_init_chipset, .init_chipset = aec62xx_init_chipset,
init_channel: aec62xx_init_channel, .init_channel = aec62xx_init_channel,
enablebits: { {0x4a,0x02,0x02}, {0x4a,0x04,0x04} }, .enablebits = {{0x4a, 0x02, 0x02}, {0x4a, 0x04, 0x04}},
bootable: NEVER_BOARD, .bootable = NEVER_BOARD,
flags: ATA_F_IRQ | ATA_F_DMA .flags = ATA_F_IRQ | ATA_F_DMA
}, },
{ {
vendor: PCI_VENDOR_ID_ARTOP, .vendor = PCI_VENDOR_ID_ARTOP,
device: PCI_DEVICE_ID_ARTOP_ATP860R, .device = PCI_DEVICE_ID_ARTOP_ATP860R,
init_chipset: aec62xx_init_chipset, .init_chipset = aec62xx_init_chipset,
init_channel: aec62xx_init_channel, .init_channel = aec62xx_init_channel,
enablebits: { {0x4a,0x02,0x02}, {0x4a,0x04,0x04} }, .enablebits = {{0x4a, 0x02, 0x02}, {0x4a, 0x04, 0x04}},
bootable: OFF_BOARD, .bootable = OFF_BOARD,
flags: ATA_F_IRQ | ATA_F_DMA .flags = ATA_F_IRQ | ATA_F_DMA},
},
{ {
vendor: PCI_VENDOR_ID_ARTOP, .vendor = PCI_VENDOR_ID_ARTOP,
device: PCI_DEVICE_ID_ARTOP_ATP865, .device = PCI_DEVICE_ID_ARTOP_ATP865,
init_chipset: aec62xx_init_chipset, .init_chipset = aec62xx_init_chipset,
init_channel: aec62xx_init_channel, .init_channel = aec62xx_init_channel,
enablebits: { {0x4a,0x02,0x02}, {0x4a,0x04,0x04} }, .enablebits = {{0x4a, 0x02, 0x02}, {0x4a, 0x04, 0x04}},
bootable: NEVER_BOARD, .bootable = NEVER_BOARD,
flags: ATA_F_IRQ | ATA_F_DMA .flags = ATA_F_IRQ | ATA_F_DMA
}, },
{ {
vendor: PCI_VENDOR_ID_ARTOP, .vendor = PCI_VENDOR_ID_ARTOP,
device: PCI_DEVICE_ID_ARTOP_ATP865R, .device = PCI_DEVICE_ID_ARTOP_ATP865R,
init_chipset: aec62xx_init_chipset, .init_chipset = aec62xx_init_chipset,
init_channel: aec62xx_init_channel, .init_channel = aec62xx_init_channel,
enablebits: { {0x4a,0x02,0x02}, {0x4a,0x04,0x04} }, .enablebits = {{0x4a, 0x02, 0x02}, {0x4a, 0x04, 0x04}},
bootable: OFF_BOARD, .bootable = OFF_BOARD,
flags: ATA_F_IRQ | ATA_F_DMA .flags = ATA_F_IRQ | ATA_F_DMA
} }
}; };
......
...@@ -46,7 +46,8 @@ ...@@ -46,7 +46,8 @@
/* port addresses for auto-detection */ /* port addresses for auto-detection */
#define ALI_NUM_PORTS 4 #define ALI_NUM_PORTS 4
static int ports[ALI_NUM_PORTS] __initdata = { 0x074, 0x0f4, 0x034, 0x0e4 }; static int ports[ALI_NUM_PORTS] __initdata =
{ 0x074, 0x0f4, 0x034, 0x0e4 };
/* register initialization data */ /* register initialization data */
struct reg_initializer { struct reg_initializer {
...@@ -67,10 +68,14 @@ static struct reg_initializer init_data[] __initdata = { ...@@ -67,10 +68,14 @@ static struct reg_initializer init_data[] __initdata = {
static struct { static struct {
u8 reg1, reg2, reg3, reg4; u8 reg1, reg2, reg3, reg4;
} reg_tab[4] = { } reg_tab[4] = {
{ 0x03, 0x26, 0x04, 0x27 }, /* drive 0 */ {
{ 0x05, 0x28, 0x06, 0x29 }, /* drive 1 */ 0x03, 0x26, 0x04, 0x27}, /* drive 0 */
{ 0x2b, 0x30, 0x2c, 0x31 }, /* drive 2 */ {
{ 0x2d, 0x32, 0x2e, 0x33 }, /* drive 3 */ 0x05, 0x28, 0x06, 0x29}, /* drive 1 */
{
0x2b, 0x30, 0x2c, 0x31}, /* drive 2 */
{
0x2d, 0x32, 0x2e, 0x33}, /* drive 3 */
}; };
static int base_port; /* base port address */ static int base_port; /* base port address */
...@@ -121,13 +126,16 @@ static void ali14xx_tune_drive(struct ata_device *drive, u8 pio) ...@@ -121,13 +126,16 @@ static void ali14xx_tune_drive(struct ata_device *drive, u8 pio)
time1 = t->cycle; time1 = t->cycle;
time2 = t->active; time2 = t->active;
param3 = param1 = (time2 * system_bus_speed + 999999) / 1000000; param3 = param1 = (time2 * system_bus_speed + 999999) / 1000000;
param4 = param2 = (time1 * system_bus_speed + 999999) / 1000000 - param1; param4 = param2 =
(time1 * system_bus_speed + 999999) / 1000000 - param1;
if (pio < XFER_PIO_3) { if (pio < XFER_PIO_3) {
param3 += 8; param3 += 8;
param4 += 8; param4 += 8;
} }
printk(KERN_DEBUG "%s: PIO mode%d, t1=%dns, t2=%dns, cycles = %d+%d, %d+%d\n", printk(KERN_DEBUG
drive->name, pio - XFER_PIO_0, time1, time2, param1, param2, param3, param4); "%s: PIO mode%d, t1=%dns, t2=%dns, cycles = %d+%d, %d+%d\n",
drive->name, pio - XFER_PIO_0, time1, time2, param1, param2,
param3, param4);
/* stuff timing parameters into controller registers */ /* stuff timing parameters into controller registers */
drive_num = (drive->channel->index << 1) + drive->select.b.unit; drive_num = (drive->channel->index << 1) + drive->select.b.unit;
...@@ -150,8 +158,7 @@ static int __init find_port(void) ...@@ -150,8 +158,7 @@ static int __init find_port(void)
int i; int i;
unsigned long flags; unsigned long flags;
__save_flags(flags); /* local CPU only */ local_irq_save(flags);
__cli(); /* local CPU only */
for (i = 0; i < ALI_NUM_PORTS; i++) { for (i = 0; i < ALI_NUM_PORTS; i++) {
base_port = ports[i]; base_port = ports[i];
reg_off = inb(base_port); reg_off = inb(base_port);
...@@ -163,7 +170,7 @@ static int __init find_port(void) ...@@ -163,7 +170,7 @@ static int __init find_port(void)
data_port = base_port + 8; data_port = base_port + 8;
t = in_reg(0) & 0xf0; t = in_reg(0) & 0xf0;
outb_p(reg_off, base_port); outb_p(reg_off, base_port);
__restore_flags(flags); /* local CPU only */ local_irq_restore(flags);
if (t != 0x50) if (t != 0x50)
return 0; return 0;
return 1; /* success */ return 1; /* success */
...@@ -171,7 +178,8 @@ static int __init find_port(void) ...@@ -171,7 +178,8 @@ static int __init find_port(void)
} }
outb_p(reg_off, base_port); outb_p(reg_off, base_port);
} }
__restore_flags(flags); /* local CPU only */ local_irq_restore(flags);
return 0; return 0;
} }
...@@ -184,15 +192,15 @@ static int __init init_registers(void) ...@@ -184,15 +192,15 @@ static int __init init_registers(void)
unsigned long flags; unsigned long flags;
u8 t; u8 t;
__save_flags(flags); /* local CPU only */ local_irq_save(flags);
__cli(); /* local CPU only */
outb_p(reg_on, base_port); outb_p(reg_on, base_port);
for (p = init_data; p->reg != 0; ++p) for (p = init_data; p->reg != 0; ++p)
out_reg(p->data, p->reg); out_reg(p->data, p->reg);
outb_p(0x01, reg_port); outb_p(0x01, reg_port);
t = inb(reg_port) & 0x01; t = inb(reg_port) & 0x01;
outb_p(reg_off, base_port); outb_p(reg_off, base_port);
__restore_flags(flags); /* local CPU only */ local_irq_restore(flags);
return t; return t;
} }
......
...@@ -73,8 +73,8 @@ static void ali15x3_tune_drive(struct ata_device *drive, byte pio) ...@@ -73,8 +73,8 @@ static void ali15x3_tune_drive(struct ata_device *drive, byte pio)
if (r_clc >= 16) if (r_clc >= 16)
r_clc = 0; r_clc = 0;
} }
__save_flags(flags);
__cli(); local_irq_save(flags);
/* /*
* PIO mode => ATA FIFO on, ATAPI FIFO off * PIO mode => ATA FIFO on, ATAPI FIFO off
...@@ -96,7 +96,8 @@ static void ali15x3_tune_drive(struct ata_device *drive, byte pio) ...@@ -96,7 +96,8 @@ static void ali15x3_tune_drive(struct ata_device *drive, byte pio)
pci_write_config_byte(dev, port, s_clc); pci_write_config_byte(dev, port, s_clc);
pci_write_config_byte(dev, port+drive->select.b.unit+2, (a_clc << 4) | r_clc); pci_write_config_byte(dev, port+drive->select.b.unit+2, (a_clc << 4) | r_clc);
__restore_flags(flags);
local_irq_restore(flags);
} }
static int ali15x3_tune_chipset(struct ata_device *drive, byte speed) static int ali15x3_tune_chipset(struct ata_device *drive, byte speed)
...@@ -216,8 +217,7 @@ static unsigned int __init ali15x3_ata66_check(struct ata_channel *hwif) ...@@ -216,8 +217,7 @@ static unsigned int __init ali15x3_ata66_check(struct ata_channel *hwif)
unsigned long flags; unsigned long flags;
byte tmpbyte; byte tmpbyte;
__save_flags(flags); local_irq_save(flags);
__cli();
if (m5229_revision >= 0xC2) { if (m5229_revision >= 0xC2) {
/* /*
...@@ -297,9 +297,9 @@ static unsigned int __init ali15x3_ata66_check(struct ata_channel *hwif) ...@@ -297,9 +297,9 @@ static unsigned int __init ali15x3_ata66_check(struct ata_channel *hwif)
pci_write_config_byte(dev, 0x53, tmpbyte); pci_write_config_byte(dev, 0x53, tmpbyte);
__restore_flags(flags); local_irq_restore(flags);
return(ata66); return (ata66);
} }
static void __init ali15x3_init_channel(struct ata_channel *hwif) static void __init ali15x3_init_channel(struct ata_channel *hwif)
...@@ -374,22 +374,22 @@ static void __init ali15x3_init_dma(struct ata_channel *ch, unsigned long dmabas ...@@ -374,22 +374,22 @@ static void __init ali15x3_init_dma(struct ata_channel *ch, unsigned long dmabas
/* module data table */ /* module data table */
static struct ata_pci_device chipsets[] __initdata = { static struct ata_pci_device chipsets[] __initdata = {
{ {
vendor: PCI_VENDOR_ID_AL, .vendor = PCI_VENDOR_ID_AL,
device: PCI_DEVICE_ID_AL_M5219, .device = PCI_DEVICE_ID_AL_M5219,
/* FIXME: Perhaps we should use the same init routines /* FIXME: Perhaps we should use the same init routines
* as below here. */ * as below here. */
enablebits: { {0x00,0x00,0x00}, {0x00,0x00,0x00} }, .enablebits = { {0x00,0x00,0x00}, {0x00,0x00,0x00} },
bootable: ON_BOARD, .bootable = ON_BOARD,
flags: ATA_F_SIMPLEX .flags = ATA_F_SIMPLEX
}, },
{ {
vendor: PCI_VENDOR_ID_AL, .vendor = PCI_VENDOR_ID_AL,
device: PCI_DEVICE_ID_AL_M5229, .device = PCI_DEVICE_ID_AL_M5229,
init_chipset: ali15x3_init_chipset, .init_chipset = ali15x3_init_chipset,
init_channel: ali15x3_init_channel, .init_channel = ali15x3_init_channel,
init_dma: ali15x3_init_dma, .init_dma = ali15x3_init_dma,
enablebits: { {0x00,0x00,0x00}, {0x00,0x00,0x00} }, .enablebits = { {0x00,0x00,0x00}, {0x00,0x00,0x00} },
bootable: ON_BOARD .bootable = ON_BOARD
} }
}; };
...@@ -397,9 +397,8 @@ int __init init_ali15x3(void) ...@@ -397,9 +397,8 @@ int __init init_ali15x3(void)
{ {
int i; int i;
for (i = 0; i < ARRAY_SIZE(chipsets); ++i) { for (i = 0; i < ARRAY_SIZE(chipsets); ++i)
ata_register_chipset(&chipsets[i]); ata_register_chipset(&chipsets[i]);
}
return 0; return 0;
} }
...@@ -303,59 +303,59 @@ static void __init amd74xx_init_dma(struct ata_channel *ch, unsigned long dmabas ...@@ -303,59 +303,59 @@ static void __init amd74xx_init_dma(struct ata_channel *ch, unsigned long dmabas
/* module data table */ /* module data table */
static struct ata_pci_device chipsets[] __initdata = { static struct ata_pci_device chipsets[] __initdata = {
{ {
vendor: PCI_VENDOR_ID_AMD, .vendor = PCI_VENDOR_ID_AMD,
device: PCI_DEVICE_ID_AMD_COBRA_7401, .device = PCI_DEVICE_ID_AMD_COBRA_7401,
init_chipset: amd74xx_init_chipset, .init_chipset = amd74xx_init_chipset,
init_channel: amd74xx_init_channel, .init_channel = amd74xx_init_channel,
init_dma: amd74xx_init_dma, .init_dma = amd74xx_init_dma,
enablebits: {{0x40,0x01,0x01}, {0x40,0x02,0x02}}, .enablebits = {{0x40,0x01,0x01}, {0x40,0x02,0x02}},
bootable: ON_BOARD .bootable = ON_BOARD
}, },
{ {
vendor: PCI_VENDOR_ID_AMD, .vendor = PCI_VENDOR_ID_AMD,
device: PCI_DEVICE_ID_AMD_VIPER_7409, .device = PCI_DEVICE_ID_AMD_VIPER_7409,
init_chipset: amd74xx_init_chipset, .init_chipset = amd74xx_init_chipset,
init_channel: amd74xx_init_channel, .init_channel = amd74xx_init_channel,
init_dma: amd74xx_init_dma, .init_dma = amd74xx_init_dma,
enablebits: {{0x40,0x01,0x01}, {0x40,0x02,0x02}}, .enablebits = {{0x40,0x01,0x01}, {0x40,0x02,0x02}},
bootable: ON_BOARD, .bootable = ON_BOARD,
flags: ATA_F_SIMPLEX .flags = ATA_F_SIMPLEX
}, },
{ {
vendor: PCI_VENDOR_ID_AMD, .vendor = PCI_VENDOR_ID_AMD,
device: PCI_DEVICE_ID_AMD_VIPER_7411, .device = PCI_DEVICE_ID_AMD_VIPER_7411,
init_chipset: amd74xx_init_chipset, .init_chipset = amd74xx_init_chipset,
init_channel: amd74xx_init_channel, .init_channel = amd74xx_init_channel,
init_dma: amd74xx_init_dma, .init_dma = amd74xx_init_dma,
enablebits: {{0x40,0x01,0x01}, {0x40,0x02,0x02}}, .enablebits = {{0x40,0x01,0x01}, {0x40,0x02,0x02}},
bootable: ON_BOARD .bootable = ON_BOARD
}, },
{ {
vendor: PCI_VENDOR_ID_AMD, .vendor = PCI_VENDOR_ID_AMD,
device: PCI_DEVICE_ID_AMD_OPUS_7441, .device = PCI_DEVICE_ID_AMD_OPUS_7441,
init_chipset: amd74xx_init_chipset, .init_chipset = amd74xx_init_chipset,
init_channel: amd74xx_init_channel, .init_channel = amd74xx_init_channel,
init_dma: amd74xx_init_dma, .init_dma = amd74xx_init_dma,
enablebits: {{0x40,0x01,0x01}, {0x40,0x02,0x02}}, .enablebits = {{0x40,0x01,0x01}, {0x40,0x02,0x02}},
bootable: ON_BOARD .bootable = ON_BOARD
}, },
{ {
vendor: PCI_VENDOR_ID_AMD, .vendor = PCI_VENDOR_ID_AMD,
device: PCI_DEVICE_ID_AMD_8111_IDE, .device = PCI_DEVICE_ID_AMD_8111_IDE,
init_chipset: amd74xx_init_chipset, .init_chipset = amd74xx_init_chipset,
init_channel: amd74xx_init_channel, .init_channel = amd74xx_init_channel,
init_dma: amd74xx_init_dma, .init_dma = amd74xx_init_dma,
enablebits: {{0x40,0x01,0x01}, {0x40,0x02,0x02}}, .enablebits = {{0x40,0x01,0x01}, {0x40,0x02,0x02}},
bootable: ON_BOARD .bootable = ON_BOARD
}, },
{ {
vendor: PCI_VENDOR_ID_NVIDIA, .vendor = PCI_VENDOR_ID_NVIDIA,
device: PCI_DEVICE_ID_NVIDIA_NFORCE_IDE, .device = PCI_DEVICE_ID_NVIDIA_NFORCE_IDE,
init_chipset: amd74xx_init_chipset, .init_chipset = amd74xx_init_chipset,
init_channel: amd74xx_init_channel, .init_channel = amd74xx_init_channel,
init_dma: amd74xx_init_dma, .init_dma = amd74xx_init_dma,
enablebits: {{0x50,0x01,0x01}, {0x50,0x02,0x02}}, .enablebits = {{0x50,0x01,0x01}, {0x50,0x02,0x02}},
bootable: ON_BOARD .bootable = ON_BOARD
}, },
}; };
...@@ -363,9 +363,8 @@ int __init init_amd74xx(void) ...@@ -363,9 +363,8 @@ int __init init_amd74xx(void)
{ {
int i; int i;
for (i = 0; i < ARRAY_SIZE(chipsets); ++i) { for (i = 0; i < ARRAY_SIZE(chipsets); ++i)
ata_register_chipset(&chipsets[i]); ata_register_chipset(&chipsets[i]);
}
return 0; return 0;
} }
...@@ -34,12 +34,14 @@ ...@@ -34,12 +34,14 @@
#include "ataraid.h" #include "ataraid.h"
static struct raid_device_operations* ataraid_ops[16]; static struct raid_device_operations *ataraid_ops[16];
static int ataraid_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg); static int ataraid_ioctl(struct inode *inode, struct file *file,
static int ataraid_open(struct inode * inode, struct file * filp); unsigned int cmd, unsigned long arg);
static int ataraid_release(struct inode * inode, struct file * filp); static int ataraid_open(struct inode *inode, struct file *filp);
static void ataraid_split_request(request_queue_t *q, int rw, struct buffer_head * bh); static int ataraid_release(struct inode *inode, struct file *filp);
static void ataraid_split_request(request_queue_t * q, int rw,
struct buffer_head *bh);
struct gendisk ataraid_gendisk; struct gendisk ataraid_gendisk;
...@@ -47,10 +49,10 @@ static int ataraid_gendisk_sizes[256]; ...@@ -47,10 +49,10 @@ static int ataraid_gendisk_sizes[256];
static int ataraid_readahead[256]; static int ataraid_readahead[256];
static struct block_device_operations ataraid_fops = { static struct block_device_operations ataraid_fops = {
owner: THIS_MODULE, .owner = THIS_MODULE,
open: ataraid_open, .open = ataraid_open,
release: ataraid_release, .release = ataraid_release,
ioctl: ataraid_ioctl, .ioctl = ataraid_ioctl,
}; };
...@@ -63,48 +65,50 @@ static unsigned int ataraiduse; ...@@ -63,48 +65,50 @@ static unsigned int ataraiduse;
/* stub fops functions */ /* stub fops functions */
static int ataraid_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) static int ataraid_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg)
{ {
int minor; int minor;
minor = minor(inode->i_rdev)>>SHIFT; minor = minor(inode->i_rdev) >> SHIFT;
if ((ataraid_ops[minor])&&(ataraid_ops[minor]->ioctl)) if ((ataraid_ops[minor]) && (ataraid_ops[minor]->ioctl))
return (ataraid_ops[minor]->ioctl)(inode,file,cmd,arg); return (ataraid_ops[minor]->ioctl) (inode, file, cmd, arg);
return -EINVAL; return -EINVAL;
} }
static int ataraid_open(struct inode * inode, struct file * filp) static int ataraid_open(struct inode *inode, struct file *filp)
{ {
int minor; int minor;
minor = minor(inode->i_rdev)>>SHIFT; minor = minor(inode->i_rdev) >> SHIFT;
if ((ataraid_ops[minor])&&(ataraid_ops[minor]->open)) if ((ataraid_ops[minor]) && (ataraid_ops[minor]->open))
return (ataraid_ops[minor]->open)(inode,filp); return (ataraid_ops[minor]->open) (inode, filp);
return -EINVAL; return -EINVAL;
} }
static int ataraid_release(struct inode * inode, struct file * filp) static int ataraid_release(struct inode *inode, struct file *filp)
{ {
int minor; int minor;
minor = minor(inode->i_rdev)>>SHIFT; minor = minor(inode->i_rdev) >> SHIFT;
if ((ataraid_ops[minor])&&(ataraid_ops[minor]->release)) if ((ataraid_ops[minor]) && (ataraid_ops[minor]->release))
return (ataraid_ops[minor]->release)(inode,filp); return (ataraid_ops[minor]->release) (inode, filp);
return -EINVAL; return -EINVAL;
} }
static int ataraid_make_request (request_queue_t *q, int rw, struct buffer_head * bh) static int ataraid_make_request(request_queue_t * q, int rw,
struct buffer_head *bh)
{ {
int minor; int minor;
int retval; int retval;
minor = minor(bh->b_rdev)>>SHIFT; minor = minor(bh->b_rdev) >> SHIFT;
if ((ataraid_ops[minor])&&(ataraid_ops[minor]->make_request)) { if ((ataraid_ops[minor]) && (ataraid_ops[minor]->make_request)) {
retval= (ataraid_ops[minor]->make_request)(q,rw,bh); retval = (ataraid_ops[minor]->make_request) (q, rw, bh);
if (retval == -1) { if (retval == -1) {
ataraid_split_request(q,rw,bh); ataraid_split_request(q, rw, bh);
return 0; return 0;
} else } else
return retval; return retval;
...@@ -116,7 +120,7 @@ struct buffer_head *ataraid_get_bhead(void) ...@@ -116,7 +120,7 @@ struct buffer_head *ataraid_get_bhead(void)
{ {
void *ptr = NULL; void *ptr = NULL;
while (!ptr) { while (!ptr) {
ptr=kmalloc(sizeof(struct buffer_head),GFP_NOIO); ptr = kmalloc(sizeof(struct buffer_head), GFP_NOIO);
if (!ptr) if (!ptr)
yield(); yield();
} }
...@@ -129,7 +133,7 @@ struct ataraid_bh_private *ataraid_get_private(void) ...@@ -129,7 +133,7 @@ struct ataraid_bh_private *ataraid_get_private(void)
{ {
void *ptr = NULL; void *ptr = NULL;
while (!ptr) { while (!ptr) {
ptr=kmalloc(sizeof(struct ataraid_bh_private),GFP_NOIO); ptr = kmalloc(sizeof(struct ataraid_bh_private), GFP_NOIO);
if (!ptr) if (!ptr)
yield(); yield();
} }
...@@ -142,11 +146,11 @@ void ataraid_end_request(struct buffer_head *bh, int uptodate) ...@@ -142,11 +146,11 @@ void ataraid_end_request(struct buffer_head *bh, int uptodate)
{ {
struct ataraid_bh_private *private = bh->b_private; struct ataraid_bh_private *private = bh->b_private;
if (private==NULL) if (private == NULL)
BUG(); BUG();
if (atomic_dec_and_test(&private->count)) { if (atomic_dec_and_test(&private->count)) {
private->parent->b_end_io(private->parent,uptodate); private->parent->b_end_io(private->parent, uptodate);
private->parent = NULL; private->parent = NULL;
kfree(private); kfree(private);
} }
...@@ -155,18 +159,19 @@ void ataraid_end_request(struct buffer_head *bh, int uptodate) ...@@ -155,18 +159,19 @@ void ataraid_end_request(struct buffer_head *bh, int uptodate)
EXPORT_SYMBOL(ataraid_end_request); EXPORT_SYMBOL(ataraid_end_request);
static void ataraid_split_request(request_queue_t *q, int rw, struct buffer_head * bh) static void ataraid_split_request(request_queue_t * q, int rw,
struct buffer_head *bh)
{ {
struct buffer_head *bh1,*bh2; struct buffer_head *bh1, *bh2;
struct ataraid_bh_private *private; struct ataraid_bh_private *private;
bh1=ataraid_get_bhead(); bh1 = ataraid_get_bhead();
bh2=ataraid_get_bhead(); bh2 = ataraid_get_bhead();
/* If either of those ever fails we're doomed */ /* If either of those ever fails we're doomed */
if ((!bh1)||(!bh2)) if ((!bh1) || (!bh2))
BUG(); BUG();
private = ataraid_get_private(); private = ataraid_get_private();
if (private==NULL) if (private == NULL)
BUG(); BUG();
memcpy(bh1, bh, sizeof(*bh)); memcpy(bh1, bh, sizeof(*bh));
...@@ -182,12 +187,12 @@ static void ataraid_split_request(request_queue_t *q, int rw, struct buffer_head ...@@ -182,12 +187,12 @@ static void ataraid_split_request(request_queue_t *q, int rw, struct buffer_head
bh1->b_private = private; bh1->b_private = private;
bh2->b_private = private; bh2->b_private = private;
atomic_set(&private->count,2); atomic_set(&private->count, 2);
bh2->b_data += bh->b_size/2; bh2->b_data += bh->b_size / 2;
generic_make_request(rw,bh1); generic_make_request(rw, bh1);
generic_make_request(rw,bh2); generic_make_request(rw, bh2);
} }
...@@ -200,12 +205,12 @@ int ataraid_get_device(struct raid_device_operations *fops) ...@@ -200,12 +205,12 @@ int ataraid_get_device(struct raid_device_operations *fops)
{ {
int bit; int bit;
down(&ataraid_sem); down(&ataraid_sem);
if (ataraiduse==~0U) { if (ataraiduse == ~0U) {
up(&ataraid_sem); up(&ataraid_sem);
return -ENODEV; return -ENODEV;
} }
bit=ffz(ataraiduse); bit = ffz(ataraiduse);
ataraiduse |= 1<<bit; ataraiduse |= 1 << bit;
ataraid_ops[bit] = fops; ataraid_ops[bit] = fops;
up(&ataraid_sem); up(&ataraid_sem);
return bit; return bit;
...@@ -215,35 +220,38 @@ void ataraid_release_device(int device) ...@@ -215,35 +220,38 @@ void ataraid_release_device(int device)
{ {
down(&ataraid_sem); down(&ataraid_sem);
if ((ataraiduse & (1<<device))==0) if ((ataraiduse & (1 << device)) == 0)
BUG(); /* device wasn't registered at all */ BUG(); /* device wasn't registered at all */
ataraiduse &= ~(1<<device); ataraiduse &= ~(1 << device);
ataraid_ops[device] = NULL; ataraid_ops[device] = NULL;
up(&ataraid_sem); up(&ataraid_sem);
} }
void ataraid_register_disk(int device,long size) void ataraid_register_disk(int device, long size)
{ {
register_disk(&ataraid_gendisk, mk_kdev(ATAMAJOR,16*device),16, register_disk(&ataraid_gendisk, mk_kdev(ATAMAJOR, 16 * device), 16,
&ataraid_fops,size); &ataraid_fops, size);
} }
static __init int ataraid_init(void) static __init int ataraid_init(void)
{ {
int i; int i;
for(i=0;i<256;i++) for (i = 0; i < 256; i++)
ataraid_readahead[i] = 1023; ataraid_readahead[i] = 1023;
/* setup the gendisk structure */ /* setup the gendisk structure */
ataraid_gendisk.part = kmalloc(256 * sizeof(struct hd_struct),GFP_KERNEL); ataraid_gendisk.part =
if (ataraid_gendisk.part==NULL) { kmalloc(256 * sizeof(struct hd_struct), GFP_KERNEL);
printk(KERN_ERR "ataraid: Couldn't allocate memory, aborting \n"); if (ataraid_gendisk.part == NULL) {
printk(KERN_ERR
"ataraid: Couldn't allocate memory, aborting \n");
return -1; return -1;
} }
memset(&ataraid_gendisk.part[0],0,256*sizeof(struct hd_struct)); memset(&ataraid_gendisk.part[0], 0,
256 * sizeof(struct hd_struct));
ataraid_gendisk.major = ATAMAJOR; ataraid_gendisk.major = ATAMAJOR;
...@@ -257,13 +265,15 @@ static __init int ataraid_init(void) ...@@ -257,13 +265,15 @@ static __init int ataraid_init(void)
add_gendisk(&ataraid_gendisk); add_gendisk(&ataraid_gendisk);
if (register_blkdev(ATAMAJOR, "ataraid", &ataraid_fops)) { if (register_blkdev(ATAMAJOR, "ataraid", &ataraid_fops)) {
printk(KERN_ERR "ataraid: Could not get major %d \n",ATAMAJOR); printk(KERN_ERR "ataraid: Could not get major %d \n",
ATAMAJOR);
return -1; return -1;
} }
blk_queue_make_request(BLK_DEFAULT_QUEUE(ATAMAJOR),ataraid_make_request); blk_queue_make_request(BLK_DEFAULT_QUEUE(ATAMAJOR),
ataraid_make_request);
return 0; return 0;
} }
...@@ -292,4 +302,3 @@ EXPORT_SYMBOL(ataraid_release_device); ...@@ -292,4 +302,3 @@ EXPORT_SYMBOL(ataraid_release_device);
EXPORT_SYMBOL(ataraid_gendisk); EXPORT_SYMBOL(ataraid_gendisk);
EXPORT_SYMBOL(ataraid_register_disk); EXPORT_SYMBOL(ataraid_register_disk);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
...@@ -135,8 +135,7 @@ static void program_drive_counts(struct ata_device *drive, int setup_count, int ...@@ -135,8 +135,7 @@ static void program_drive_counts(struct ata_device *drive, int setup_count, int
/* /*
* Now that everything is ready, program the new timings * Now that everything is ready, program the new timings
*/ */
__save_flags (flags); local_irq_save(flags);
__cli();
/* /*
* Program the address_setup clocks into ARTTIM reg, * Program the address_setup clocks into ARTTIM reg,
* and then the active/recovery counts into the DRWTIM reg * and then the active/recovery counts into the DRWTIM reg
...@@ -148,7 +147,7 @@ static void program_drive_counts(struct ata_device *drive, int setup_count, int ...@@ -148,7 +147,7 @@ static void program_drive_counts(struct ata_device *drive, int setup_count, int
(byte) ((active_count << 4) | recovery_count)); (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) 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]); cmdprintk ("Write %x to %x\n", (byte) ((active_count << 4) | recovery_count), drwtim_regs[channel][slave]);
__restore_flags(flags); local_irq_restore(flags);
} }
/* /*
...@@ -808,45 +807,45 @@ static void __init cmd64x_init_channel(struct ata_channel *hwif) ...@@ -808,45 +807,45 @@ static void __init cmd64x_init_channel(struct ata_channel *hwif)
/* module data table */ /* module data table */
static struct ata_pci_device chipsets[] __initdata = { static struct ata_pci_device chipsets[] __initdata = {
{ {
vendor: PCI_VENDOR_ID_CMD, .vendor = PCI_VENDOR_ID_CMD,
device: PCI_DEVICE_ID_CMD_643, .device = PCI_DEVICE_ID_CMD_643,
init_chipset: cmd64x_init_chipset, .init_chipset = cmd64x_init_chipset,
init_channel: cmd64x_init_channel, .init_channel = cmd64x_init_channel,
bootable: ON_BOARD, .bootable = ON_BOARD,
flags: ATA_F_SIMPLEX, .flags = ATA_F_SIMPLEX,
}, },
{ {
vendor: PCI_VENDOR_ID_CMD, .vendor = PCI_VENDOR_ID_CMD,
device: PCI_DEVICE_ID_CMD_646, .device = PCI_DEVICE_ID_CMD_646,
init_chipset: cmd64x_init_chipset, .init_chipset = cmd64x_init_chipset,
init_channel: cmd64x_init_channel, .init_channel = cmd64x_init_channel,
enablebits: {{0x00,0x00,0x00}, {0x51,0x80,0x80}}, .enablebits = {{0x00,0x00,0x00}, {0x51,0x80,0x80}},
bootable: ON_BOARD, .bootable = ON_BOARD,
flags: ATA_F_DMA .flags = ATA_F_DMA
}, },
{ {
vendor: PCI_VENDOR_ID_CMD, .vendor = PCI_VENDOR_ID_CMD,
device: PCI_DEVICE_ID_CMD_648, .device = PCI_DEVICE_ID_CMD_648,
init_chipset: cmd64x_init_chipset, .init_chipset = cmd64x_init_chipset,
init_channel: cmd64x_init_channel, .init_channel = cmd64x_init_channel,
bootable: ON_BOARD, .bootable = ON_BOARD,
flags: ATA_F_DMA .flags = ATA_F_DMA
}, },
{ {
vendor: PCI_VENDOR_ID_CMD, .vendor = PCI_VENDOR_ID_CMD,
device: PCI_DEVICE_ID_CMD_649, .device = PCI_DEVICE_ID_CMD_649,
init_chipset: cmd64x_init_chipset, .init_chipset = cmd64x_init_chipset,
init_channel: cmd64x_init_channel, .init_channel = cmd64x_init_channel,
bootable: ON_BOARD, .bootable = ON_BOARD,
flags: ATA_F_DMA .flags = ATA_F_DMA
}, },
{ {
vendor: PCI_VENDOR_ID_CMD, .vendor = PCI_VENDOR_ID_CMD,
device: PCI_DEVICE_ID_CMD_680, .device = PCI_DEVICE_ID_CMD_680,
init_chipset: cmd64x_init_chipset, .init_chipset = cmd64x_init_chipset,
init_channel: cmd64x_init_channel, .init_channel = cmd64x_init_channel,
bootable: ON_BOARD, .bootable = ON_BOARD,
flags: ATA_F_DMA .flags = ATA_F_DMA
}, },
}; };
......
...@@ -314,12 +314,12 @@ static void __init ide_init_cs5530(struct ata_channel *hwif) ...@@ -314,12 +314,12 @@ static void __init ide_init_cs5530(struct ata_channel *hwif)
/* module data table */ /* module data table */
static struct ata_pci_device chipset __initdata = { static struct ata_pci_device chipset __initdata = {
vendor: PCI_VENDOR_ID_CYRIX, .vendor = PCI_VENDOR_ID_CYRIX,
device: PCI_DEVICE_ID_CYRIX_5530_IDE, .device = PCI_DEVICE_ID_CYRIX_5530_IDE,
init_chipset: pci_init_cs5530, .init_chipset = pci_init_cs5530,
init_channel: ide_init_cs5530, .init_channel = ide_init_cs5530,
bootable: ON_BOARD, .bootable = ON_BOARD,
flags: ATA_F_DMA .flags = ATA_F_DMA
}; };
int __init init_cs5530(void) int __init init_cs5530(void)
......
...@@ -426,12 +426,12 @@ static void __init ide_init_cy82c693(struct ata_channel *hwif) ...@@ -426,12 +426,12 @@ static void __init ide_init_cy82c693(struct ata_channel *hwif)
/* module data table */ /* module data table */
static struct ata_pci_device chipset __initdata = { static struct ata_pci_device chipset __initdata = {
vendor: PCI_VENDOR_ID_CONTAQ, .vendor = PCI_VENDOR_ID_CONTAQ,
device: PCI_DEVICE_ID_CONTAQ_82C693, .device = PCI_DEVICE_ID_CONTAQ_82C693,
init_chipset: pci_init_cy82c693, .init_chipset = pci_init_cy82c693,
init_channel: ide_init_cy82c693, .init_channel = ide_init_cy82c693,
bootable: ON_BOARD, .bootable = ON_BOARD,
flags: ATA_F_DMA .flags = ATA_F_DMA
}; };
int __init init_cy82c693(void) int __init init_cy82c693(void)
......
...@@ -151,7 +151,7 @@ int ata_status_poll(struct ata_device *drive, u8 good, u8 bad, ...@@ -151,7 +151,7 @@ int ata_status_poll(struct ata_device *drive, u8 good, u8 bad,
unsigned long flags; unsigned long flags;
__save_flags(flags); __save_flags(flags);
ide__sti(); local_irq_enable();
timeout += jiffies; timeout += jiffies;
while (!ata_status(drive, 0, BUSY_STAT)) { while (!ata_status(drive, 0, BUSY_STAT)) {
if (time_after(jiffies, timeout)) { if (time_after(jiffies, timeout)) {
......
...@@ -95,8 +95,7 @@ void __init init_dtc2278 (void) ...@@ -95,8 +95,7 @@ void __init init_dtc2278 (void)
{ {
unsigned long flags; unsigned long flags;
__save_flags(flags); /* local CPU only */ local_irq_save(flags);
__cli(); /* local CPU only */
/* /*
* This enables the second interface * This enables the second interface
*/ */
...@@ -112,7 +111,7 @@ void __init init_dtc2278 (void) ...@@ -112,7 +111,7 @@ void __init init_dtc2278 (void)
sub22(1,0xc3); sub22(1,0xc3);
sub22(0,0xa0); sub22(0,0xa0);
#endif #endif
__restore_flags(flags); /* local CPU only */ local_irq_restore(flags);
ide_hwifs[0].serialized = 1; ide_hwifs[0].serialized = 1;
ide_hwifs[1].serialized = 1; ide_hwifs[1].serialized = 1;
......
...@@ -693,12 +693,12 @@ static int hd_release(struct inode * inode, struct file * file) ...@@ -693,12 +693,12 @@ static int hd_release(struct inode * inode, struct file * file)
extern struct block_device_operations hd_fops; extern struct block_device_operations hd_fops;
static struct gendisk hd_gendisk = { static struct gendisk hd_gendisk = {
major: MAJOR_NR, .major = MAJOR_NR,
major_name: "hd", .major_name = "hd",
minor_shift: 6, .minor_shift = 6,
part: hd, .part = hd,
sizes: hd_sizes, .sizes = hd_sizes,
fops: &hd_fops, .fops = &hd_fops,
}; };
static void hd_interrupt(int irq, void *dev_id, struct pt_regs *regs) static void hd_interrupt(int irq, void *dev_id, struct pt_regs *regs)
...@@ -714,9 +714,9 @@ static void hd_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -714,9 +714,9 @@ static void hd_interrupt(int irq, void *dev_id, struct pt_regs *regs)
} }
static struct block_device_operations hd_fops = { static struct block_device_operations hd_fops = {
open: hd_open, .open = hd_open,
release: hd_release, .release = hd_release,
ioctl: hd_ioctl, .ioctl = hd_ioctl,
}; };
/* /*
......
...@@ -135,8 +135,7 @@ static unsigned int __init pci_init_hpt34x(struct pci_dev *dev) ...@@ -135,8 +135,7 @@ static unsigned int __init pci_init_hpt34x(struct pci_dev *dev)
unsigned short cmd; unsigned short cmd;
unsigned long flags; unsigned long flags;
__save_flags(flags); /* local CPU only */ local_irq_save(flags);
__cli(); /* local CPU only */
pci_write_config_byte(dev, HPT34X_PCI_INIT_REG, 0x00); pci_write_config_byte(dev, HPT34X_PCI_INIT_REG, 0x00);
pci_read_config_word(dev, PCI_COMMAND, &cmd); pci_read_config_word(dev, PCI_COMMAND, &cmd);
...@@ -167,7 +166,7 @@ static unsigned int __init pci_init_hpt34x(struct pci_dev *dev) ...@@ -167,7 +166,7 @@ static unsigned int __init pci_init_hpt34x(struct pci_dev *dev)
pci_write_config_dword(dev, PCI_BASE_ADDRESS_3, dev->resource[3].start); pci_write_config_dword(dev, PCI_BASE_ADDRESS_3, dev->resource[3].start);
pci_write_config_word(dev, PCI_COMMAND, cmd); pci_write_config_word(dev, PCI_COMMAND, cmd);
__restore_flags(flags); /* local CPU only */ local_irq_restore(flags);
return dev->irq; return dev->irq;
} }
...@@ -202,13 +201,13 @@ static void __init ide_init_hpt34x(struct ata_channel *hwif) ...@@ -202,13 +201,13 @@ static void __init ide_init_hpt34x(struct ata_channel *hwif)
/* module data table */ /* module data table */
static struct ata_pci_device chipset __initdata = { static struct ata_pci_device chipset __initdata = {
vendor: PCI_VENDOR_ID_TTI, .vendor = PCI_VENDOR_ID_TTI,
device: PCI_DEVICE_ID_TTI_HPT343, .device = PCI_DEVICE_ID_TTI_HPT343,
init_chipset: pci_init_hpt34x, .init_chipset = pci_init_hpt34x,
init_channel: ide_init_hpt34x, .init_channel = ide_init_hpt34x,
bootable: NEVER_BOARD, .bootable = NEVER_BOARD,
extra: 16, .extra = 16,
flags: ATA_F_DMA .flags = ATA_F_DMA
}; };
int __init init_hpt34x(void) int __init init_hpt34x(void)
......
...@@ -1222,34 +1222,34 @@ static void __init hpt366_init_dma(struct ata_channel *ch, unsigned long dmabase ...@@ -1222,34 +1222,34 @@ static void __init hpt366_init_dma(struct ata_channel *ch, unsigned long dmabase
/* module data table */ /* module data table */
static struct ata_pci_device chipsets[] __initdata = { static struct ata_pci_device chipsets[] __initdata = {
{ {
vendor: PCI_VENDOR_ID_TTI, .vendor = PCI_VENDOR_ID_TTI,
device: PCI_DEVICE_ID_TTI_HPT366, .device = PCI_DEVICE_ID_TTI_HPT366,
init_chipset: hpt366_init_chipset, .init_chipset = hpt366_init_chipset,
init_channel: hpt366_init_channel, .init_channel = hpt366_init_channel,
init_dma: hpt366_init_dma, .init_dma = hpt366_init_dma,
bootable: OFF_BOARD, .bootable = OFF_BOARD,
extra: 240, .extra = 240,
flags: ATA_F_IRQ | ATA_F_HPTHACK | ATA_F_DMA .flags = ATA_F_IRQ | ATA_F_HPTHACK | ATA_F_DMA
}, },
{ {
vendor: PCI_VENDOR_ID_TTI, .vendor = PCI_VENDOR_ID_TTI,
device: PCI_DEVICE_ID_TTI_HPT372, .device = PCI_DEVICE_ID_TTI_HPT372,
init_chipset: hpt366_init_chipset, .init_chipset = hpt366_init_chipset,
init_channel: hpt366_init_channel, .init_channel = hpt366_init_channel,
init_dma: hpt366_init_dma, .init_dma = hpt366_init_dma,
bootable: OFF_BOARD, .bootable = OFF_BOARD,
extra: 0, .extra = 0,
flags: ATA_F_IRQ | ATA_F_HPTHACK | ATA_F_DMA .flags = ATA_F_IRQ | ATA_F_HPTHACK | ATA_F_DMA
}, },
{ {
vendor: PCI_VENDOR_ID_TTI, .vendor = PCI_VENDOR_ID_TTI,
device: PCI_DEVICE_ID_TTI_HPT374, .device = PCI_DEVICE_ID_TTI_HPT374,
init_chipset: hpt366_init_chipset, .init_chipset = hpt366_init_chipset,
init_channel: hpt366_init_channel, .init_channel = hpt366_init_channel,
init_dma: hpt366_init_dma, .init_dma = hpt366_init_dma,
bootable: OFF_BOARD, .bootable = OFF_BOARD,
extra: 0, .extra = 0,
flags: ATA_F_IRQ | ATA_F_HPTHACK | ATA_F_DMA .flags = ATA_F_IRQ | ATA_F_HPTHACK | ATA_F_DMA
}, },
}; };
......
This diff is collapsed.
...@@ -127,8 +127,7 @@ static void ht6560b_selectproc(struct ata_device *drive) ...@@ -127,8 +127,7 @@ static void ht6560b_selectproc(struct ata_device *drive)
static u8 current_timing = 0; static u8 current_timing = 0;
u8 select, timing; u8 select, timing;
__save_flags (flags); /* local CPU only */ local_irq_save(flags);
__cli(); /* local CPU only */
select = HT_CONFIG(drive); select = HT_CONFIG(drive);
timing = HT_TIMING(drive); timing = HT_TIMING(drive);
...@@ -152,7 +151,7 @@ static void ht6560b_selectproc(struct ata_device *drive) ...@@ -152,7 +151,7 @@ static void ht6560b_selectproc(struct ata_device *drive)
printk("ht6560b: %s: select=%#x timing=%#x\n", drive->name, select, timing); printk("ht6560b: %s: select=%#x timing=%#x\n", drive->name, select, timing);
#endif #endif
} }
__restore_flags (flags); /* local CPU only */ local_irq_restore(flags);
} }
/* /*
......
...@@ -2453,26 +2453,26 @@ void ide_cdrom_release_real (struct cdrom_device_info *cdi) ...@@ -2453,26 +2453,26 @@ void ide_cdrom_release_real (struct cdrom_device_info *cdi)
* Device initialization. * Device initialization.
*/ */
static struct cdrom_device_ops ide_cdrom_dops = { static struct cdrom_device_ops ide_cdrom_dops = {
open: ide_cdrom_open_real, .open = ide_cdrom_open_real,
release: ide_cdrom_release_real, .release = ide_cdrom_release_real,
drive_status: ide_cdrom_drive_status, .drive_status = ide_cdrom_drive_status,
media_changed: ide_cdrom_check_media_change_real, .media_changed = ide_cdrom_check_media_change_real,
tray_move: ide_cdrom_tray_move, .tray_move = ide_cdrom_tray_move,
lock_door: ide_cdrom_lock_door, .lock_door = ide_cdrom_lock_door,
select_speed: ide_cdrom_select_speed, .select_speed = ide_cdrom_select_speed,
get_last_session: ide_cdrom_get_last_session, .get_last_session = ide_cdrom_get_last_session,
get_mcn: ide_cdrom_get_mcn, .get_mcn = ide_cdrom_get_mcn,
reset: ide_cdrom_reset, .reset = ide_cdrom_reset,
audio_ioctl: ide_cdrom_audio_ioctl, .audio_ioctl = ide_cdrom_audio_ioctl,
dev_ioctl: ide_cdrom_dev_ioctl, .dev_ioctl = ide_cdrom_dev_ioctl,
capability: CDC_CLOSE_TRAY | CDC_OPEN_TRAY | CDC_LOCK | .capability = CDC_CLOSE_TRAY | CDC_OPEN_TRAY | CDC_LOCK |
CDC_SELECT_SPEED | CDC_SELECT_DISC | CDC_SELECT_SPEED | CDC_SELECT_DISC |
CDC_MULTI_SESSION | CDC_MCN | CDC_MULTI_SESSION | CDC_MCN |
CDC_MEDIA_CHANGED | CDC_PLAY_AUDIO | CDC_RESET | CDC_MEDIA_CHANGED | CDC_PLAY_AUDIO | CDC_RESET |
CDC_IOCTLS | CDC_DRIVE_STATUS | CDC_CD_R | CDC_IOCTLS | CDC_DRIVE_STATUS | CDC_CD_R |
CDC_CD_RW | CDC_DVD | CDC_DVD_R| CDC_DVD_RAM | CDC_CD_RW | CDC_DVD | CDC_DVD_R| CDC_DVD_RAM |
CDC_GENERIC_PACKET, CDC_GENERIC_PACKET,
generic_packet: ide_cdrom_packet, .generic_packet = ide_cdrom_packet,
}; };
static int ide_cdrom_register(struct ata_device *drive, int nslots) static int ide_cdrom_register(struct ata_device *drive, int nslots)
...@@ -2932,18 +2932,18 @@ int ide_cdrom_cleanup(struct ata_device *drive) ...@@ -2932,18 +2932,18 @@ int ide_cdrom_cleanup(struct ata_device *drive)
static void ide_cdrom_attach(struct ata_device *drive); static void ide_cdrom_attach(struct ata_device *drive);
static struct ata_operations ide_cdrom_driver = { static struct ata_operations ide_cdrom_driver = {
owner: THIS_MODULE, .owner = THIS_MODULE,
attach: ide_cdrom_attach, .attach = ide_cdrom_attach,
cleanup: ide_cdrom_cleanup, .cleanup = ide_cdrom_cleanup,
standby: NULL, .standby = NULL,
do_request: ide_cdrom_do_request, .do_request = ide_cdrom_do_request,
end_request: NULL, .end_request = NULL,
ioctl: ide_cdrom_ioctl, .ioctl = ide_cdrom_ioctl,
open: ide_cdrom_open, .open = ide_cdrom_open,
release: ide_cdrom_release, .release = ide_cdrom_release,
check_media_change: ide_cdrom_check_media_change, .check_media_change = ide_cdrom_check_media_change,
revalidate: ide_cdrom_revalidate, .revalidate = ide_cdrom_revalidate,
capacity: ide_cdrom_capacity, .capacity = ide_cdrom_capacity,
}; };
/* options */ /* options */
......
...@@ -1443,18 +1443,18 @@ static void idedisk_attach(struct ata_device *drive); ...@@ -1443,18 +1443,18 @@ static void idedisk_attach(struct ata_device *drive);
* Subdriver functions. * Subdriver functions.
*/ */
static struct ata_operations idedisk_driver = { static struct ata_operations idedisk_driver = {
owner: THIS_MODULE, .owner = THIS_MODULE,
attach: idedisk_attach, .attach = idedisk_attach,
cleanup: idedisk_cleanup, .cleanup = idedisk_cleanup,
standby: idedisk_standby, .standby = idedisk_standby,
do_request: idedisk_do_request, .do_request = idedisk_do_request,
end_request: NULL, .end_request = NULL,
ioctl: idedisk_ioctl, .ioctl = idedisk_ioctl,
open: idedisk_open, .open = idedisk_open,
release: idedisk_release, .release = idedisk_release,
check_media_change: idedisk_check_media_change, .check_media_change = idedisk_check_media_change,
revalidate: NULL, /* use default method */ .revalidate = NULL, /* use default method */
capacity: idedisk_capacity, .capacity = idedisk_capacity,
}; };
static void idedisk_attach(struct ata_device *drive) static void idedisk_attach(struct ata_device *drive)
......
...@@ -593,9 +593,9 @@ static ide_startstop_t idefloppy_pc_intr(struct ata_device *drive, struct reques ...@@ -593,9 +593,9 @@ static ide_startstop_t idefloppy_pc_intr(struct ata_device *drive, struct reques
#if IDEFLOPPY_DEBUG_LOG #if IDEFLOPPY_DEBUG_LOG
printk (KERN_INFO "Packet command completed, %d bytes transferred\n", pc->actually_transferred); printk (KERN_INFO "Packet command completed, %d bytes transferred\n", pc->actually_transferred);
#endif /* IDEFLOPPY_DEBUG_LOG */ #endif /* IDEFLOPPY_DEBUG_LOG */
clear_bit (PC_DMA_IN_PROGRESS, &pc->flags); clear_bit(PC_DMA_IN_PROGRESS, &pc->flags);
ide__sti(); /* local CPU only */ local_irq_enable();
if (status.b.check || test_bit(PC_DMA_ERROR, &pc->flags)) { /* Error detected */ if (status.b.check || test_bit(PC_DMA_ERROR, &pc->flags)) { /* Error detected */
#if IDEFLOPPY_DEBUG_LOG #if IDEFLOPPY_DEBUG_LOG
...@@ -1345,18 +1345,18 @@ static int idefloppy_get_format_progress(struct ata_device *drive, ...@@ -1345,18 +1345,18 @@ static int idefloppy_get_format_progress(struct ata_device *drive,
progress_indication=floppy->progress_indication; progress_indication=floppy->progress_indication;
} }
/* Else assume format_unit has finished, and we're /* Else assume format_unit has finished, and we're
** at 0x10000 */ * at 0x10000
*/
} }
else else
{ {
atapi_status_reg_t status; atapi_status_reg_t status;
unsigned long flags; unsigned long flags;
__save_flags(flags); local_irq_save(flags);
__cli();
ata_status(drive, 0, 0); ata_status(drive, 0, 0);
status.all = drive->status; status.all = drive->status;
__restore_flags(flags); local_irq_restore(flags);
progress_indication= !status.b.dsc ? 0:0x10000; progress_indication= !status.b.dsc ? 0:0x10000;
} }
...@@ -1735,18 +1735,18 @@ static void idefloppy_attach(struct ata_device *drive); ...@@ -1735,18 +1735,18 @@ static void idefloppy_attach(struct ata_device *drive);
* IDE subdriver functions, registered with ide.c * IDE subdriver functions, registered with ide.c
*/ */
static struct ata_operations idefloppy_driver = { static struct ata_operations idefloppy_driver = {
owner: THIS_MODULE, .owner = THIS_MODULE,
attach: idefloppy_attach, .attach = idefloppy_attach,
cleanup: idefloppy_cleanup, .cleanup = idefloppy_cleanup,
standby: NULL, .standby = NULL,
do_request: idefloppy_do_request, .do_request = idefloppy_do_request,
end_request: idefloppy_end_request, .end_request = idefloppy_end_request,
ioctl: idefloppy_ioctl, .ioctl = idefloppy_ioctl,
open: idefloppy_open, .open = idefloppy_open,
release: idefloppy_release, .release = idefloppy_release,
check_media_change: idefloppy_check_media_change, .check_media_change = idefloppy_check_media_change,
revalidate: NULL, /* use default method */ .revalidate = NULL, /* use default method */
capacity: idefloppy_capacity, .capacity = idefloppy_capacity,
}; };
static void idefloppy_attach(struct ata_device *drive) static void idefloppy_attach(struct ata_device *drive)
......
...@@ -697,75 +697,75 @@ void __init ide_scan_pcibus(int scan_direction) ...@@ -697,75 +697,75 @@ void __init ide_scan_pcibus(int scan_direction)
*/ */
static struct ata_pci_device chipsets[] __initdata = { static struct ata_pci_device chipsets[] __initdata = {
{ {
vendor: PCI_VENDOR_ID_PCTECH, .vendor = PCI_VENDOR_ID_PCTECH,
device: PCI_DEVICE_ID_PCTECH_SAMURAI_IDE, .device = PCI_DEVICE_ID_PCTECH_SAMURAI_IDE,
bootable: ON_BOARD .bootable = ON_BOARD
}, },
{ {
vendor: PCI_VENDOR_ID_CMD, .vendor = PCI_VENDOR_ID_CMD,
device: PCI_DEVICE_ID_CMD_640, .device = PCI_DEVICE_ID_CMD_640,
init_channel: ATA_PCI_IGNORE, .init_channel = ATA_PCI_IGNORE,
bootable: ON_BOARD .bootable = ON_BOARD
}, },
{ {
vendor: PCI_VENDOR_ID_NS, .vendor = PCI_VENDOR_ID_NS,
device: PCI_DEVICE_ID_NS_87410, .device = PCI_DEVICE_ID_NS_87410,
enablebits: {{0x43,0x08,0x08}, {0x47,0x08,0x08}}, .enablebits = {{0x43,0x08,0x08}, {0x47,0x08,0x08}},
bootable: ON_BOARD .bootable = ON_BOARD
}, },
{ {
vendor: PCI_VENDOR_ID_HINT, .vendor = PCI_VENDOR_ID_HINT,
device: PCI_DEVICE_ID_HINT_VXPROII_IDE, .device = PCI_DEVICE_ID_HINT_VXPROII_IDE,
bootable: ON_BOARD .bootable = ON_BOARD
}, },
{ {
vendor: PCI_VENDOR_ID_HOLTEK, .vendor = PCI_VENDOR_ID_HOLTEK,
device: PCI_DEVICE_ID_HOLTEK_6565, .device = PCI_DEVICE_ID_HOLTEK_6565,
bootable: ON_BOARD .bootable = ON_BOARD
}, },
{ {
vendor: PCI_VENDOR_ID_INTEL, .vendor = PCI_VENDOR_ID_INTEL,
device: PCI_DEVICE_ID_INTEL_82371MX, .device = PCI_DEVICE_ID_INTEL_82371MX,
enablebits: {{0x6D,0x80,0x80}, {0x00,0x00,0x00}}, .enablebits = {{0x6D,0x80,0x80}, {0x00,0x00,0x00}},
bootable: ON_BOARD, .bootable = ON_BOARD,
flags: ATA_F_NODMA .flags = ATA_F_NODMA
}, },
{ {
vendor: PCI_VENDOR_ID_UMC, .vendor = PCI_VENDOR_ID_UMC,
device: PCI_DEVICE_ID_UMC_UM8673F, .device = PCI_DEVICE_ID_UMC_UM8673F,
bootable: ON_BOARD, .bootable = ON_BOARD,
flags: ATA_F_FIXIRQ .flags = ATA_F_FIXIRQ
}, },
{ {
vendor: PCI_VENDOR_ID_UMC, .vendor = PCI_VENDOR_ID_UMC,
device: PCI_DEVICE_ID_UMC_UM8886A, .device = PCI_DEVICE_ID_UMC_UM8886A,
bootable: ON_BOARD, .bootable = ON_BOARD,
flags: ATA_F_FIXIRQ .flags = ATA_F_FIXIRQ
}, },
{ {
vendor: PCI_VENDOR_ID_UMC, .vendor = PCI_VENDOR_ID_UMC,
device: PCI_DEVICE_ID_UMC_UM8886BF, .device = PCI_DEVICE_ID_UMC_UM8886BF,
bootable: ON_BOARD, .bootable = ON_BOARD,
flags: ATA_F_FIXIRQ .flags = ATA_F_FIXIRQ
}, },
{ {
vendor: PCI_VENDOR_ID_VIA, .vendor = PCI_VENDOR_ID_VIA,
device: PCI_DEVICE_ID_VIA_82C561, .device = PCI_DEVICE_ID_VIA_82C561,
bootable: ON_BOARD, .bootable = ON_BOARD,
flags: ATA_F_NOADMA .flags = ATA_F_NOADMA
}, },
{ {
vendor: PCI_VENDOR_ID_VIA, .vendor = PCI_VENDOR_ID_VIA,
device: PCI_DEVICE_ID_VIA_82C586_1, .device = PCI_DEVICE_ID_VIA_82C586_1,
bootable: ON_BOARD, .bootable = ON_BOARD,
flags: ATA_F_NOADMA .flags = ATA_F_NOADMA
}, },
{ {
vendor: PCI_VENDOR_ID_TTI, .vendor = PCI_VENDOR_ID_TTI,
device: PCI_DEVICE_ID_TTI_HPT366, .device = PCI_DEVICE_ID_TTI_HPT366,
bootable: OFF_BOARD, .bootable = OFF_BOARD,
extra: 240, .extra = 240,
flags: ATA_F_IRQ | ATA_F_HPTHACK .flags = ATA_F_IRQ | ATA_F_HPTHACK
} }
}; };
......
...@@ -419,10 +419,10 @@ pmac_ide_do_setfeature(struct ata_device *drive, u8 command) ...@@ -419,10 +419,10 @@ pmac_ide_do_setfeature(struct ata_device *drive, u8 command)
OUT_BYTE(SETFEATURES_XFER, IDE_FEATURE_REG); OUT_BYTE(SETFEATURES_XFER, IDE_FEATURE_REG);
OUT_BYTE(WIN_SETFEATURES, IDE_COMMAND_REG); OUT_BYTE(WIN_SETFEATURES, IDE_COMMAND_REG);
udelay(1); udelay(1);
__save_flags(flags); /* local CPU only */ __save_flags(flags);
ide__sti(); /* local CPU only -- for jiffies */ local_irq_enable();
result = wait_for_ready(drive); result = wait_for_ready(drive);
__restore_flags(flags); /* local CPU only */ __restore_flags(flags);
ata_irq_enable(drive, 1); ata_irq_enable(drive, 1);
if (result) if (result)
printk(KERN_ERR "pmac_ide_do_setfeature disk not ready after SET_FEATURE !\n"); printk(KERN_ERR "pmac_ide_do_setfeature disk not ready after SET_FEATURE !\n");
......
...@@ -1881,9 +1881,9 @@ static ide_startstop_t idetape_pc_intr(struct ata_device *drive, struct request ...@@ -1881,9 +1881,9 @@ static ide_startstop_t idetape_pc_intr(struct ata_device *drive, struct request
if (tape->debug_level >= 2) if (tape->debug_level >= 2)
printk (KERN_INFO "ide-tape: Packet command completed, %d bytes transferred\n", pc->actually_transferred); printk (KERN_INFO "ide-tape: Packet command completed, %d bytes transferred\n", pc->actually_transferred);
#endif #endif
clear_bit (PC_DMA_IN_PROGRESS, &pc->flags); clear_bit(PC_DMA_IN_PROGRESS, &pc->flags);
ide__sti(); /* local CPU only */ local_irq_enable();
#if SIMULATE_ERRORS #if SIMULATE_ERRORS
if ((pc->c[0] == IDETAPE_WRITE_CMD || pc->c[0] == IDETAPE_READ_CMD) && (++error_sim_count % 100) == 0) { if ((pc->c[0] == IDETAPE_WRITE_CMD || pc->c[0] == IDETAPE_READ_CMD) && (++error_sim_count % 100) == 0) {
...@@ -5926,17 +5926,17 @@ static void idetape_revalidate(struct ata_device *_dummy) ...@@ -5926,17 +5926,17 @@ static void idetape_revalidate(struct ata_device *_dummy)
static void idetape_attach(struct ata_device *); static void idetape_attach(struct ata_device *);
static struct ata_operations idetape_driver = { static struct ata_operations idetape_driver = {
owner: THIS_MODULE, .owner = THIS_MODULE,
attach: idetape_attach, .attach = idetape_attach,
cleanup: idetape_cleanup, .cleanup = idetape_cleanup,
standby: NULL, .standby = NULL,
do_request: idetape_do_request, .do_request = idetape_do_request,
end_request: idetape_end_request, .end_request = idetape_end_request,
ioctl: idetape_blkdev_ioctl, .ioctl = idetape_blkdev_ioctl,
open: idetape_blkdev_open, .open = idetape_blkdev_open,
release: idetape_blkdev_release, .release = idetape_blkdev_release,
check_media_change: NULL, .check_media_change = NULL,
revalidate: idetape_revalidate, .revalidate = idetape_revalidate,
}; };
...@@ -5945,12 +5945,12 @@ static struct ata_operations idetape_driver = { ...@@ -5945,12 +5945,12 @@ static struct ata_operations idetape_driver = {
* Our character device supporting functions, passed to register_chrdev. * Our character device supporting functions, passed to register_chrdev.
*/ */
static struct file_operations idetape_fops = { static struct file_operations idetape_fops = {
owner: THIS_MODULE, .owner = THIS_MODULE,
read: idetape_chrdev_read, .read = idetape_chrdev_read,
write: idetape_chrdev_write, .write = idetape_chrdev_write,
ioctl: idetape_chrdev_ioctl, .ioctl = idetape_chrdev_ioctl,
open: idetape_chrdev_open, .open = idetape_chrdev_open,
release: idetape_chrdev_release, .release = idetape_chrdev_release,
}; };
static void idetape_attach(struct ata_device *drive) static void idetape_attach(struct ata_device *drive)
......
...@@ -143,7 +143,7 @@ static ide_startstop_t special_intr(struct ata_device *drive, struct request *rq ...@@ -143,7 +143,7 @@ static ide_startstop_t special_intr(struct ata_device *drive, struct request *rq
struct ata_taskfile *ar = rq->special; struct ata_taskfile *ar = rq->special;
ide_startstop_t ret = ATA_OP_FINISHED; ide_startstop_t ret = ATA_OP_FINISHED;
ide__sti(); local_irq_enable();
if (rq->buffer && ar->taskfile.sector_number) { if (rq->buffer && ar->taskfile.sector_number) {
if (!ata_status(drive, 0, DRQ_STAT) && ar->taskfile.sector_number) { if (!ata_status(drive, 0, DRQ_STAT) && ar->taskfile.sector_number) {
......
...@@ -288,8 +288,8 @@ u8 ata_dump(struct ata_device *drive, struct request * rq, const char *msg) ...@@ -288,8 +288,8 @@ u8 ata_dump(struct ata_device *drive, struct request * rq, const char *msg)
u8 err = 0; u8 err = 0;
/* FIXME: --bzolnier */ /* FIXME: --bzolnier */
__save_flags (flags); /* local CPU only */ __save_flags(flags);
ide__sti(); /* local CPU only */ local_irq_enable();
printk("%s: %s: status=0x%02x", drive->name, msg, drive->status); printk("%s: %s: status=0x%02x", drive->name, msg, drive->status);
dump_bits(ata_status_msgs, ARRAY_SIZE(ata_status_msgs), drive->status); dump_bits(ata_status_msgs, ARRAY_SIZE(ata_status_msgs), drive->status);
...@@ -337,7 +337,8 @@ u8 ata_dump(struct ata_device *drive, struct request * rq, const char *msg) ...@@ -337,7 +337,8 @@ u8 ata_dump(struct ata_device *drive, struct request * rq, const char *msg)
#endif #endif
printk("\n"); printk("\n");
} }
__restore_flags (flags); /* local CPU only */ __restore_flags (flags);
return err; return err;
} }
...@@ -522,7 +523,7 @@ static void do_request(struct ata_channel *channel) ...@@ -522,7 +523,7 @@ static void do_request(struct ata_channel *channel)
unsigned int unit; unsigned int unit;
ide_startstop_t ret; ide_startstop_t ret;
__cli(); /* necessary paranoia: ensure IRQs are masked on local CPU */ local_irq_disable(); /* necessary paranoia */
/* /*
* Select the next device which will be serviced. This selects * Select the next device which will be serviced. This selects
...@@ -683,7 +684,8 @@ static void do_request(struct ata_channel *channel) ...@@ -683,7 +684,8 @@ static void do_request(struct ata_channel *channel)
drive->rq = rq; drive->rq = rq;
spin_unlock(ch->lock); spin_unlock(ch->lock);
ide__sti(); /* allow other IRQs while we start this request */ /* allow other IRQs while we start this request */
local_irq_enable();
/* /*
* This initiates handling of a new I/O request. * This initiates handling of a new I/O request.
...@@ -837,8 +839,8 @@ void ide_timer_expiry(unsigned long data) ...@@ -837,8 +839,8 @@ void ide_timer_expiry(unsigned long data)
#else #else
disable_irq(ch->irq); /* disable_irq_nosync ?? */ disable_irq(ch->irq); /* disable_irq_nosync ?? */
#endif #endif
/* FIXME: IRQs are already disabled by spin_lock_irqsave() --bzolnier */
__cli(); /* local CPU only, as if we were handling an interrupt */ local_irq_disable();
if (ch->poll_timeout) { if (ch->poll_timeout) {
ret = handler(drive, drive->rq); ret = handler(drive, drive->rq);
} else if (ata_status_irq(drive)) { } else if (ata_status_irq(drive)) {
...@@ -906,7 +908,7 @@ void ide_timer_expiry(unsigned long data) ...@@ -906,7 +908,7 @@ void ide_timer_expiry(unsigned long data)
* drive enters "idle", "standby", or "sleep" mode, so if the status looks * drive enters "idle", "standby", or "sleep" mode, so if the status looks
* "good", we just ignore the interrupt completely. * "good", we just ignore the interrupt completely.
* *
* This routine assumes __cli() is in effect when called. * This routine assumes IRQ are disabled on entry.
* *
* If an unexpected interrupt happens on irq15 while we are handling irq14 * If an unexpected interrupt happens on irq15 while we are handling irq14
* and if the two interfaces are "serialized" (CMD640), then it looks like * and if the two interfaces are "serialized" (CMD640), then it looks like
...@@ -955,7 +957,7 @@ static void unexpected_irq(int irq) ...@@ -955,7 +957,7 @@ static void unexpected_irq(int irq)
} }
/* /*
* Entry point for all interrupts, caller does __cli() for us. * Entry point for all interrupts. Aussumes disabled IRQs.
*/ */
void ata_irq_request(int irq, void *data, struct pt_regs *regs) void ata_irq_request(int irq, void *data, struct pt_regs *regs)
{ {
...@@ -1024,7 +1026,7 @@ void ata_irq_request(int irq, void *data, struct pt_regs *regs) ...@@ -1024,7 +1026,7 @@ void ata_irq_request(int irq, void *data, struct pt_regs *regs)
spin_unlock(ch->lock); spin_unlock(ch->lock);
if (ch->unmask) if (ch->unmask)
ide__sti(); local_irq_enable();
/* /*
* Service this interrupt, this may setup handler for next interrupt. * Service this interrupt, this may setup handler for next interrupt.
...@@ -1185,12 +1187,12 @@ static int ide_check_media_change(kdev_t i_rdev) ...@@ -1185,12 +1187,12 @@ static int ide_check_media_change(kdev_t i_rdev)
} }
struct block_device_operations ide_fops[] = {{ struct block_device_operations ide_fops[] = {{
owner: THIS_MODULE, .owner = THIS_MODULE,
open: ide_open, .open = ide_open,
release: ide_release, .release = ide_release,
ioctl: ata_ioctl, .ioctl = ata_ioctl,
check_media_change: ide_check_media_change, .check_media_change = ide_check_media_change,
revalidate: ata_revalidate .revalidate = ata_revalidate
}}; }};
EXPORT_SYMBOL(ide_fops); EXPORT_SYMBOL(ide_fops);
......
...@@ -225,12 +225,12 @@ static void __init ide_init_it8172(struct ata_channel *hwif) ...@@ -225,12 +225,12 @@ static void __init ide_init_it8172(struct ata_channel *hwif)
/* module data table */ /* module data table */
static struct ata_pci_device chipset __initdata = { static struct ata_pci_device chipset __initdata = {
vendor: PCI_VENDOR_ID_ITE, .vendor = PCI_VENDOR_ID_ITE,
device: PCI_DEVICE_ID_ITE_IT8172G, .device = PCI_DEVICE_ID_ITE_IT8172G,
init_chipset: pci_init_it8172, .init_chipset = pci_init_it8172,
init_channel: ide_init_it8172, .init_channel = ide_init_it8172,
exnablebits: {{0x00,0x00,0x00}, {0x40,0x00,0x01} }, .exnablebits = {{0x00,0x00,0x00}, {0x40,0x00,0x01} },
bootable: ON_BOARD .bootable = ON_BOARD
}; };
int __init init_it8172(void) int __init init_it8172(void)
......
...@@ -40,8 +40,7 @@ static void ns87415_prepare_drive(struct ata_device *drive, unsigned int use_dma ...@@ -40,8 +40,7 @@ static void ns87415_prepare_drive(struct ata_device *drive, unsigned int use_dma
struct pci_dev *dev = hwif->pci_dev; struct pci_dev *dev = hwif->pci_dev;
unsigned long flags; unsigned long flags;
__save_flags(flags); /* local CPU only */ local_irq_save(flags);
__cli(); /* local CPU only */
new = *old; new = *old;
/* Adjust IRQ enable bit */ /* Adjust IRQ enable bit */
...@@ -75,7 +74,7 @@ static void ns87415_prepare_drive(struct ata_device *drive, unsigned int use_dma ...@@ -75,7 +74,7 @@ static void ns87415_prepare_drive(struct ata_device *drive, unsigned int use_dma
udelay(10); udelay(10);
} }
__restore_flags(flags); /* local CPU only */ local_irq_restore(flags);
} }
static void ns87415_selectproc(struct ata_device *drive) static void ns87415_selectproc(struct ata_device *drive)
...@@ -215,10 +214,10 @@ static void __init ide_init_ns87415(struct ata_channel *hwif) ...@@ -215,10 +214,10 @@ static void __init ide_init_ns87415(struct ata_channel *hwif)
/* module data table */ /* module data table */
static struct ata_pci_device chipset __initdata = { static struct ata_pci_device chipset __initdata = {
vendor: PCI_VENDOR_ID_NS, .vendor = PCI_VENDOR_ID_NS,
device: PCI_DEVICE_ID_NS_87415, .device = PCI_DEVICE_ID_NS_87415,
init_channel: ide_init_ns87415, .init_channel = ide_init_ns87415,
bootable: ON_BOARD, .bootable = ON_BOARD,
}; };
int __init init_ns87415(void) int __init init_ns87415(void)
......
...@@ -323,18 +323,18 @@ static void __init ide_init_opti621(struct ata_channel *hwif) ...@@ -323,18 +323,18 @@ static void __init ide_init_opti621(struct ata_channel *hwif)
/* module data table */ /* module data table */
static struct ata_pci_device chipsets[] __initdata = { static struct ata_pci_device chipsets[] __initdata = {
{ {
vendor: PCI_VENDOR_ID_OPTI, .vendor = PCI_VENDOR_ID_OPTI,
device: PCI_DEVICE_ID_OPTI_82C621, .device = PCI_DEVICE_ID_OPTI_82C621,
init_channel: ide_init_opti621, .init_channel = ide_init_opti621,
enablebits: {{0x45,0x80,0x00}, {0x40,0x08,0x00}}, .enablebits = {{0x45,0x80,0x00}, {0x40,0x08,0x00}},
bootable: ON_BOARD .bootable = ON_BOARD
}, },
{ {
vendor: PCI_VENDOR_ID_OPTI, .vendor = PCI_VENDOR_ID_OPTI,
device: PCI_DEVICE_ID_OPTI_82C825, .device = PCI_DEVICE_ID_OPTI_82C825,
init_channel: ide_init_opti621, .init_channel = ide_init_opti621,
enablebits: {{0x45,0x80,0x00}, {0x40,0x08,0x00}}, .enablebits = {{0x45,0x80,0x00}, {0x40,0x08,0x00}},
bootable: ON_BOARD .bootable = ON_BOARD
}, },
}; };
......
This diff is collapsed.
...@@ -106,26 +106,24 @@ static void read_vlb(struct ata_device *drive, void *buffer, unsigned int wcount ...@@ -106,26 +106,24 @@ static void read_vlb(struct ata_device *drive, void *buffer, unsigned int wcount
{ {
unsigned long flags; unsigned long flags;
__save_flags(flags); /* local CPU only */ local_irq_save(flags);
__cli(); /* local CPU only */
inb(IDE_NSECTOR_REG); inb(IDE_NSECTOR_REG);
inb(IDE_NSECTOR_REG); inb(IDE_NSECTOR_REG);
inb(IDE_NSECTOR_REG); inb(IDE_NSECTOR_REG);
insl(IDE_DATA_REG, buffer, wcount); insl(IDE_DATA_REG, buffer, wcount);
__restore_flags(flags); /* local CPU only */ local_irq_restore(flags);
} }
static void write_vlb(struct ata_device *drive, void *buffer, unsigned int wcount) static void write_vlb(struct ata_device *drive, void *buffer, unsigned int wcount)
{ {
unsigned long flags; unsigned long flags;
__save_flags(flags); /* local CPU only */ local_irq_save(flags);
__cli(); /* local CPU only */
inb(IDE_NSECTOR_REG); inb(IDE_NSECTOR_REG);
inb(IDE_NSECTOR_REG); inb(IDE_NSECTOR_REG);
inb(IDE_NSECTOR_REG); inb(IDE_NSECTOR_REG);
outsl(IDE_DATA_REG, buffer, wcount); outsl(IDE_DATA_REG, buffer, wcount);
__restore_flags(flags); /* local CPU only */ local_irq_restore(flags);
} }
static void read_16(struct ata_device *drive, void *buffer, unsigned int wcount) static void read_16(struct ata_device *drive, void *buffer, unsigned int wcount)
...@@ -701,7 +699,7 @@ ide_startstop_t do_pdc4030_io(struct ata_device *drive, struct ata_taskfile *arg ...@@ -701,7 +699,7 @@ ide_startstop_t do_pdc4030_io(struct ata_device *drive, struct ata_taskfile *arg
return ret; return ret;
} }
if (!drive->channel->unmask) if (!drive->channel->unmask)
__cli(); /* local CPU only */ local_irq_disable();
return promise_do_write(drive, rq); return promise_do_write(drive, rq);
} }
......
This diff is collapsed.
...@@ -388,130 +388,130 @@ static void __init piix_init_dma(struct ata_channel *ch, unsigned long dmabase) ...@@ -388,130 +388,130 @@ static void __init piix_init_dma(struct ata_channel *ch, unsigned long dmabase)
/* module data table */ /* module data table */
static struct ata_pci_device chipsets[] __initdata = { static struct ata_pci_device chipsets[] __initdata = {
{ {
vendor: PCI_VENDOR_ID_INTEL, .vendor = PCI_VENDOR_ID_INTEL,
device: PCI_DEVICE_ID_INTEL_82371FB_1, .device = PCI_DEVICE_ID_INTEL_82371FB_1,
init_chipset: piix_init_chipset, .init_chipset = piix_init_chipset,
init_channel: piix_init_channel, .init_channel = piix_init_channel,
init_dma: piix_init_dma, .init_dma = piix_init_dma,
enablebits: {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, .enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
bootable: ON_BOARD .bootable = ON_BOARD
}, },
{ {
vendor: PCI_VENDOR_ID_INTEL, .vendor = PCI_VENDOR_ID_INTEL,
device: PCI_DEVICE_ID_INTEL_82371SB_1, .device = PCI_DEVICE_ID_INTEL_82371SB_1,
init_chipset: piix_init_chipset, .init_chipset = piix_init_chipset,
init_channel: piix_init_channel, .init_channel = piix_init_channel,
init_dma: piix_init_dma, .init_dma = piix_init_dma,
enablebits: {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, .enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
bootable: ON_BOARD .bootable = ON_BOARD
}, },
{ {
vendor: PCI_VENDOR_ID_INTEL, .vendor = PCI_VENDOR_ID_INTEL,
device: PCI_DEVICE_ID_INTEL_82371AB, .device = PCI_DEVICE_ID_INTEL_82371AB,
init_chipset: piix_init_chipset, .init_chipset = piix_init_chipset,
init_channel: piix_init_channel, .init_channel = piix_init_channel,
init_dma: piix_init_dma, .init_dma = piix_init_dma,
enablebits: {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, .enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
bootable: ON_BOARD .bootable = ON_BOARD
}, },
{ {
vendor: PCI_VENDOR_ID_INTEL, .vendor = PCI_VENDOR_ID_INTEL,
device: PCI_DEVICE_ID_INTEL_82443MX_1, .device = PCI_DEVICE_ID_INTEL_82443MX_1,
init_chipset: piix_init_chipset, .init_chipset = piix_init_chipset,
init_channel: piix_init_channel, .init_channel = piix_init_channel,
init_dma: piix_init_dma, .init_dma = piix_init_dma,
enablebits: {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, .enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
bootable: ON_BOARD .bootable = ON_BOARD
}, },
{ {
vendor: PCI_VENDOR_ID_INTEL, .vendor = PCI_VENDOR_ID_INTEL,
device: PCI_DEVICE_ID_INTEL_82372FB_1, .device = PCI_DEVICE_ID_INTEL_82372FB_1,
init_chipset: piix_init_chipset, .init_chipset = piix_init_chipset,
init_channel: piix_init_channel, .init_channel = piix_init_channel,
init_dma: piix_init_dma, .init_dma = piix_init_dma,
enablebits: {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, .enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
bootable: ON_BOARD .bootable = ON_BOARD
}, },
{ {
vendor: PCI_VENDOR_ID_INTEL, .vendor = PCI_VENDOR_ID_INTEL,
device: PCI_DEVICE_ID_INTEL_82801AA_1, .device = PCI_DEVICE_ID_INTEL_82801AA_1,
init_chipset: piix_init_chipset, .init_chipset = piix_init_chipset,
init_channel: piix_init_channel, .init_channel = piix_init_channel,
init_dma: piix_init_dma, .init_dma = piix_init_dma,
enablebits: {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, .enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
bootable: ON_BOARD .bootable = ON_BOARD
}, },
{ {
vendor: PCI_VENDOR_ID_INTEL, .vendor = PCI_VENDOR_ID_INTEL,
device: PCI_DEVICE_ID_INTEL_82801AB_1, .device = PCI_DEVICE_ID_INTEL_82801AB_1,
init_chipset: piix_init_chipset, .init_chipset = piix_init_chipset,
init_channel: piix_init_channel, .init_channel = piix_init_channel,
init_dma: piix_init_dma, .init_dma = piix_init_dma,
enablebits: {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, .enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
bootable: ON_BOARD .bootable = ON_BOARD
}, },
{ {
vendor: PCI_VENDOR_ID_INTEL, .vendor = PCI_VENDOR_ID_INTEL,
device: PCI_DEVICE_ID_INTEL_82801BA_9, .device = PCI_DEVICE_ID_INTEL_82801BA_9,
init_chipset: piix_init_chipset, .init_chipset = piix_init_chipset,
init_channel: piix_init_channel, .init_channel = piix_init_channel,
init_dma: piix_init_dma, .init_dma = piix_init_dma,
enablebits: {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, .enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
bootable: ON_BOARD .bootable = ON_BOARD
}, },
{ {
vendor: PCI_VENDOR_ID_INTEL, .vendor = PCI_VENDOR_ID_INTEL,
device: PCI_DEVICE_ID_INTEL_82801BA_8, .device = PCI_DEVICE_ID_INTEL_82801BA_8,
init_chipset: piix_init_chipset, .init_chipset = piix_init_chipset,
init_channel: piix_init_channel, .init_channel = piix_init_channel,
init_dma: piix_init_dma, .init_dma = piix_init_dma,
enablebits: {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, .enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
bootable: ON_BOARD .bootable = ON_BOARD
}, },
{ {
vendor: PCI_VENDOR_ID_INTEL, .vendor = PCI_VENDOR_ID_INTEL,
device: PCI_DEVICE_ID_INTEL_82801E_9, .device = PCI_DEVICE_ID_INTEL_82801E_9,
init_chipset: piix_init_chipset, .init_chipset = piix_init_chipset,
init_channel: piix_init_channel, .init_channel = piix_init_channel,
init_dma: piix_init_dma, .init_dma = piix_init_dma,
enablebits: {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, .enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
bootable: ON_BOARD .bootable = ON_BOARD
}, },
{ {
vendor: PCI_VENDOR_ID_INTEL, .vendor = PCI_VENDOR_ID_INTEL,
device: PCI_DEVICE_ID_INTEL_82801CA_10, .device = PCI_DEVICE_ID_INTEL_82801CA_10,
init_chipset: piix_init_chipset, .init_chipset = piix_init_chipset,
init_channel: piix_init_channel, .init_channel = piix_init_channel,
init_dma: piix_init_dma, .init_dma = piix_init_dma,
enablebits: {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, .enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
bootable: ON_BOARD .bootable = ON_BOARD
}, },
{ {
vendor: PCI_VENDOR_ID_INTEL, .vendor = PCI_VENDOR_ID_INTEL,
device: PCI_DEVICE_ID_INTEL_82801CA_11, .device = PCI_DEVICE_ID_INTEL_82801CA_11,
init_chipset: piix_init_chipset, .init_chipset = piix_init_chipset,
init_channel: piix_init_channel, .init_channel = piix_init_channel,
init_dma: piix_init_dma, .init_dma = piix_init_dma,
enablebits: {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, .enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
bootable: ON_BOARD .bootable = ON_BOARD
}, },
{ {
vendor: PCI_VENDOR_ID_INTEL, .vendor = PCI_VENDOR_ID_INTEL,
device: PCI_DEVICE_ID_INTEL_82801DB_9, .device = PCI_DEVICE_ID_INTEL_82801DB_9,
init_chipset: piix_init_chipset, .init_chipset = piix_init_chipset,
init_channel: piix_init_channel, .init_channel = piix_init_channel,
init_dma: piix_init_dma, .init_dma = piix_init_dma,
enablebits: {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, .enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
bootable: ON_BOARD .bootable = ON_BOARD
}, },
{ {
vendor: PCI_VENDOR_ID_EFAR, .vendor = PCI_VENDOR_ID_EFAR,
device: PCI_DEVICE_ID_EFAR_SLC90E66_1, .device = PCI_DEVICE_ID_EFAR_SLC90E66_1,
init_chipset: piix_init_chipset, .init_chipset = piix_init_chipset,
init_channel: piix_init_channel, .init_channel = piix_init_channel,
init_dma: piix_init_dma, .init_dma = piix_init_dma,
enablebits: {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, .enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
bootable: ON_BOARD .bootable = ON_BOARD
}, },
}; };
...@@ -519,9 +519,8 @@ int __init init_piix(void) ...@@ -519,9 +519,8 @@ int __init init_piix(void)
{ {
int i; int i;
for (i = 0; i < ARRAY_SIZE(chipsets); ++i) { for (i = 0; i < ARRAY_SIZE(chipsets); ++i)
ata_register_chipset(&chipsets[i]); ata_register_chipset(&chipsets[i]);
}
return 0; return 0;
} }
...@@ -403,7 +403,7 @@ static inline void do_identify(struct ata_device *drive, u8 cmd) ...@@ -403,7 +403,7 @@ static inline void do_identify(struct ata_device *drive, u8 cmd)
*/ */
ata_read(drive, id, SECTOR_WORDS); ata_read(drive, id, SECTOR_WORDS);
ide__sti(); /* local CPU only */ local_irq_enable();
ata_fix_driveid(id); ata_fix_driveid(id);
if (id->word156 == 0x4d42) { if (id->word156 == 0x4d42) {
...@@ -616,12 +616,12 @@ static int identify(struct ata_device *drive, u8 cmd) ...@@ -616,12 +616,12 @@ static int identify(struct ata_device *drive, u8 cmd)
if (ata_status(drive, DRQ_STAT, BAD_R_STAT)) { if (ata_status(drive, DRQ_STAT, BAD_R_STAT)) {
unsigned long flags; unsigned long flags;
__save_flags(flags); /* local CPU only */
__cli(); /* local CPU only; some systems need this */ local_irq_save(flags); /* some systems need this */
do_identify(drive, cmd); /* drive returned ID */ do_identify(drive, cmd); /* drive returned ID */
rc = 0; /* drive responded with ID */ rc = 0; /* drive responded with ID */
ata_status(drive, 0, 0); /* clear drive IRQ */ ata_status(drive, 0, 0); /* clear drive IRQ */
__restore_flags(flags); /* local CPU only */ local_irq_restore(flags); /* local CPU only */
} else } else
rc = 2; /* drive refused ID */ rc = 2; /* drive refused ID */
...@@ -733,8 +733,8 @@ static void channel_probe(struct ata_channel *ch) ...@@ -733,8 +733,8 @@ static void channel_probe(struct ata_channel *ch)
ch->straight8 = 0; ch->straight8 = 0;
__save_flags(flags); /* local CPU only */ __save_flags(flags);
__sti(); /* local CPU only; needed for jiffies and irq probing */ local_irq_enable(); /* needed for jiffies and irq probing */
/* /*
* Check for the presence of a channel by probing for drives on it. * Check for the presence of a channel by probing for drives on it.
...@@ -852,7 +852,7 @@ static void channel_probe(struct ata_channel *ch) ...@@ -852,7 +852,7 @@ static void channel_probe(struct ata_channel *ch)
if (ch->reset) if (ch->reset)
ata_reset(ch); ata_reset(ch);
__restore_flags(flags); /* local CPU only */ __restore_flags(flags);
/* /*
* Now setup the PIO transfer modes of the drives on this channel. * Now setup the PIO transfer modes of the drives on this channel.
......
...@@ -66,12 +66,9 @@ static int q40ide_default_irq(q40ide_ioreg_t base) ...@@ -66,12 +66,9 @@ static int q40ide_default_irq(q40ide_ioreg_t base)
} }
} }
/*
/*
* Probe for Q40 IDE interfaces * Probe for Q40 IDE interfaces
*/ */
void q40ide_init(void) void q40ide_init(void)
{ {
int i; int i;
......
...@@ -51,16 +51,16 @@ static void __init rz1000_init_channel(struct ata_channel *hwif) ...@@ -51,16 +51,16 @@ static void __init rz1000_init_channel(struct ata_channel *hwif)
/* module data table */ /* module data table */
static struct ata_pci_device chipsets[] __initdata = { static struct ata_pci_device chipsets[] __initdata = {
{ {
vendor: PCI_VENDOR_ID_PCTECH, .vendor = PCI_VENDOR_ID_PCTECH,
device: PCI_DEVICE_ID_PCTECH_RZ1000, .device = PCI_DEVICE_ID_PCTECH_RZ1000,
init_channel: rz1000_init_channel, .init_channel = rz1000_init_channel,
bootable: ON_BOARD .bootable = ON_BOARD
}, },
{ {
vendor: PCI_VENDOR_ID_PCTECH, .vendor = PCI_VENDOR_ID_PCTECH,
device: PCI_DEVICE_ID_PCTECH_RZ1001, .device = PCI_DEVICE_ID_PCTECH_RZ1001,
init_channel: rz1000_init_channel, .init_channel = rz1000_init_channel,
bootable: ON_BOARD .bootable = ON_BOARD
}, },
}; };
...@@ -68,9 +68,8 @@ int __init init_rz1000(void) ...@@ -68,9 +68,8 @@ int __init init_rz1000(void)
{ {
int i; int i;
for (i = 0; i < ARRAY_SIZE(chipsets); ++i) { for (i = 0; i < ARRAY_SIZE(chipsets); ++i)
ata_register_chipset(&chipsets[i]); ata_register_chipset(&chipsets[i]);
}
return 0; return 0;
} }
......
...@@ -394,20 +394,20 @@ static void __init ide_init_svwks(struct ata_channel *hwif) ...@@ -394,20 +394,20 @@ static void __init ide_init_svwks(struct ata_channel *hwif)
/* module data table */ /* module data table */
static struct ata_pci_device chipsets[] __initdata = { static struct ata_pci_device chipsets[] __initdata = {
{ {
vendor: PCI_VENDOR_ID_SERVERWORKS, .vendor = PCI_VENDOR_ID_SERVERWORKS,
device: PCI_DEVICE_ID_SERVERWORKS_OSB4IDE, .device = PCI_DEVICE_ID_SERVERWORKS_OSB4IDE,
init_chipset: svwks_init_chipset, .init_chipset = svwks_init_chipset,
init_channel: ide_init_svwks, .init_channel = ide_init_svwks,
bootable: ON_BOARD, .bootable = ON_BOARD,
flags: ATA_F_DMA .flags = ATA_F_DMA
}, },
{ {
vendor: PCI_VENDOR_ID_SERVERWORKS, .vendor = PCI_VENDOR_ID_SERVERWORKS,
device: PCI_DEVICE_ID_SERVERWORKS_CSB5IDE, .device = PCI_DEVICE_ID_SERVERWORKS_CSB5IDE,
init_chipset: svwks_init_chipset, .init_chipset = svwks_init_chipset,
init_channel: ide_init_svwks, .init_channel = ide_init_svwks,
bootable: ON_BOARD, .bootable = ON_BOARD,
flags: ATA_F_SIMPLEX .flags = ATA_F_SIMPLEX
}, },
}; };
......
...@@ -505,12 +505,12 @@ static void __init ide_init_sis5513(struct ata_channel *hwif) ...@@ -505,12 +505,12 @@ static void __init ide_init_sis5513(struct ata_channel *hwif)
/* module data table */ /* module data table */
static struct ata_pci_device chipset __initdata = { static struct ata_pci_device chipset __initdata = {
vendor: PCI_VENDOR_ID_SI, .vendor = PCI_VENDOR_ID_SI,
device: PCI_DEVICE_ID_SI_5513, .device = PCI_DEVICE_ID_SI_5513,
init_chipset: pci_init_sis5513, .init_chipset = pci_init_sis5513,
init_channel: ide_init_sis5513, .init_channel = ide_init_sis5513,
enablebits: {{0x4a,0x02,0x02}, {0x4a,0x04,0x04} }, .enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04} },
bootable: ON_BOARD, .bootable = ON_BOARD,
}; };
int __init init_sis5513(void) int __init init_sis5513(void)
......
...@@ -360,13 +360,13 @@ static void __init sl82c105_init_channel(struct ata_channel *ch) ...@@ -360,13 +360,13 @@ static void __init sl82c105_init_channel(struct ata_channel *ch)
/* module data table */ /* module data table */
static struct ata_pci_device chipset __initdata = { static struct ata_pci_device chipset __initdata = {
vendor: PCI_VENDOR_ID_WINBOND, .vendor = PCI_VENDOR_ID_WINBOND,
device: PCI_DEVICE_ID_WINBOND_82C105, .device = PCI_DEVICE_ID_WINBOND_82C105,
init_chipset: sl82c105_init_chipset, .init_chipset = sl82c105_init_chipset,
init_channel: sl82c105_init_channel, .init_channel = sl82c105_init_channel,
init_dma: sl82c105_init_dma, .init_dma = sl82c105_init_dma,
enablebits: { {0x40,0x01,0x01}, {0x40,0x10,0x10} }, .enablebits = { {0x40,0x01,0x01}, {0x40,0x10,0x10} },
bootable: ON_BOARD .bootable = ON_BOARD
}; };
int __init init_sl82c105(void) int __init init_sl82c105(void)
......
...@@ -61,7 +61,7 @@ static ide_startstop_t tcq_nop_handler(struct ata_device *drive, struct request ...@@ -61,7 +61,7 @@ static ide_startstop_t tcq_nop_handler(struct ata_device *drive, struct request
struct ata_taskfile *args = rq->special; struct ata_taskfile *args = rq->special;
struct ata_channel *ch = drive->channel; struct ata_channel *ch = drive->channel;
ide__sti(); local_irq_enable();
spin_lock_irqsave(ch->lock, flags); spin_lock_irqsave(ch->lock, flags);
......
...@@ -151,8 +151,7 @@ static void trm290_prepare_drive(struct ata_device *drive, unsigned int use_dma) ...@@ -151,8 +151,7 @@ static void trm290_prepare_drive(struct ata_device *drive, unsigned int use_dma)
/* select PIO or DMA */ /* select PIO or DMA */
reg = use_dma ? (0x21 | 0x82) : (0x21 & ~0x82); reg = use_dma ? (0x21 | 0x82) : (0x21 & ~0x82);
__save_flags(flags); /* local CPU only */ local_irq_save(flags);
__cli(); /* local CPU only */
if (reg != hwif->select_data) { if (reg != hwif->select_data) {
hwif->select_data = reg; hwif->select_data = reg;
...@@ -167,7 +166,7 @@ static void trm290_prepare_drive(struct ata_device *drive, unsigned int use_dma) ...@@ -167,7 +166,7 @@ static void trm290_prepare_drive(struct ata_device *drive, unsigned int use_dma)
outw(reg, hwif->config_data+3); outw(reg, hwif->config_data+3);
} }
__restore_flags(flags); /* local CPU only */ local_irq_restore(flags);
} }
static void trm290_selectproc(struct ata_device *drive) static void trm290_selectproc(struct ata_device *drive)
...@@ -266,8 +265,7 @@ static void __init trm290_init_channel(struct ata_channel *hwif) ...@@ -266,8 +265,7 @@ static void __init trm290_init_channel(struct ata_channel *hwif)
printk("TRM290: using default config base at 0x%04lx\n", hwif->config_data); printk("TRM290: using default config base at 0x%04lx\n", hwif->config_data);
} }
__save_flags(flags); /* local CPU only */ local_irq_save(flags);
__cli(); /* local CPU only */
/* put config reg into first byte of hwif->select_data */ /* put config reg into first byte of hwif->select_data */
outb(0x51|(hwif->unit<<3), hwif->config_data+1); outb(0x51|(hwif->unit<<3), hwif->config_data+1);
hwif->select_data = 0x21; /* select PIO as default */ hwif->select_data = 0x21; /* select PIO as default */
...@@ -275,7 +273,7 @@ static void __init trm290_init_channel(struct ata_channel *hwif) ...@@ -275,7 +273,7 @@ static void __init trm290_init_channel(struct ata_channel *hwif)
reg = inb(hwif->config_data+3); /* get IRQ info */ reg = inb(hwif->config_data+3); /* get IRQ info */
reg = (reg & 0x10) | 0x03; /* mask IRQs for both ports */ reg = (reg & 0x10) | 0x03; /* mask IRQs for both ports */
outb(reg, hwif->config_data+3); outb(reg, hwif->config_data+3);
__restore_flags(flags); /* local CPU only */ local_irq_restore(flags);
if ((reg & 0x10)) if ((reg & 0x10))
hwif->irq = hwif->unit ? 15 : 14; /* legacy mode */ hwif->irq = hwif->unit ? 15 : 14; /* legacy mode */
...@@ -327,10 +325,10 @@ static void __init trm290_init_channel(struct ata_channel *hwif) ...@@ -327,10 +325,10 @@ static void __init trm290_init_channel(struct ata_channel *hwif)
/* module data table */ /* module data table */
static struct ata_pci_device chipset __initdata = { static struct ata_pci_device chipset __initdata = {
vendor: PCI_VENDOR_ID_TEKRAM, .vendor = PCI_VENDOR_ID_TEKRAM,
device: PCI_DEVICE_ID_TEKRAM_DC290, .device = PCI_DEVICE_ID_TEKRAM_DC290,
init_channel: trm290_init_channel, .init_channel = trm290_init_channel,
bootable: ON_BOARD .bootable = ON_BOARD
}; };
int __init init_trm290(void) int __init init_trm290(void)
......
...@@ -127,30 +127,29 @@ void __init init_umc8672(void) /* called from ide.c */ ...@@ -127,30 +127,29 @@ void __init init_umc8672(void) /* called from ide.c */
{ {
unsigned long flags; unsigned long flags;
__save_flags(flags); /* local CPU only */ local_irq_save(flags);
__cli(); /* local CPU only */
if (!request_region(0x108, 2, "umc8672")) { if (!request_region(0x108, 2, "umc8672")) {
__restore_flags(flags); local_irq_restore(flags);
printk("\numc8672: PORTS 0x108-0x109 ALREADY IN USE\n"); printk("\numc8672: PORTS 0x108-0x109 ALREADY IN USE\n");
return; return;
} }
outb_p (0x5A,0x108); /* enable umc */ outb_p (0x5A,0x108); /* enable umc */
if (in_umc (0xd5) != 0xa0) if (in_umc (0xd5) != 0xa0)
{ {
__restore_flags(flags); /* local CPU only */ local_irq_restore(flags);
release_region(0x108, 2); release_region(0x108, 2);
printk ("umc8672: not found\n"); printk ("umc8672: not found\n");
return; return;
} }
outb_p (0xa5,0x108); /* disable umc */ outb_p (0xa5,0x108); /* disable umc */
umc_set_speeds (current_speeds); umc_set_speeds(current_speeds);
__restore_flags(flags); /* local CPU only */ local_irq_restore(flags);
ide_hwifs[0].chipset = ide_umc8672; ide_hwifs[0].chipset = ide_umc8672;
ide_hwifs[1].chipset = ide_umc8672; ide_hwifs[1].chipset = ide_umc8672;
ide_hwifs[0].tuneproc = &tune_umc; ide_hwifs[0].tuneproc = tune_umc;
ide_hwifs[1].tuneproc = &tune_umc; ide_hwifs[1].tuneproc = tune_umc;
ide_hwifs[0].unit = ATA_PRIMARY; ide_hwifs[0].unit = ATA_PRIMARY;
ide_hwifs[1].unit = ATA_SECONDARY; ide_hwifs[1].unit = ATA_SECONDARY;
} }
...@@ -380,22 +380,22 @@ static void __init via82cxxx_init_dma(struct ata_channel *hwif, unsigned long dm ...@@ -380,22 +380,22 @@ static void __init via82cxxx_init_dma(struct ata_channel *hwif, unsigned long dm
/* module data table */ /* module data table */
static struct ata_pci_device chipsets[] __initdata = { static struct ata_pci_device chipsets[] __initdata = {
{ {
vendor: PCI_VENDOR_ID_VIA, .vendor = PCI_VENDOR_ID_VIA,
device: PCI_DEVICE_ID_VIA_82C576_1, .device = PCI_DEVICE_ID_VIA_82C576_1,
init_chipset: via82cxxx_init_chipset, .init_chipset = via82cxxx_init_chipset,
init_channel: via82cxxx_init_channel, .init_channel = via82cxxx_init_channel,
init_dma: via82cxxx_init_dma, .init_dma = via82cxxx_init_dma,
enablebits: {{0x40,0x02,0x02}, {0x40,0x01,0x01}}, .enablebits = {{0x40,0x02,0x02}, {0x40,0x01,0x01}},
bootable: ON_BOARD, .bootable = ON_BOARD,
}, },
{ {
vendor: PCI_VENDOR_ID_VIA, .vendor = PCI_VENDOR_ID_VIA,
device: PCI_DEVICE_ID_VIA_82C586_1, .device = PCI_DEVICE_ID_VIA_82C586_1,
init_chipset: via82cxxx_init_chipset, .init_chipset = via82cxxx_init_chipset,
init_channel: via82cxxx_init_channel, .init_channel = via82cxxx_init_channel,
init_dma: via82cxxx_init_dma, .init_dma = via82cxxx_init_dma,
enablebits: {{0x40,0x02,0x02}, {0x40,0x01,0x01}}, .enablebits = {{0x40,0x02,0x02}, {0x40,0x01,0x01}},
bootable: ON_BOARD, .bootable = ON_BOARD,
}, },
}; };
...@@ -403,9 +403,8 @@ int __init init_via82cxxx(void) ...@@ -403,9 +403,8 @@ int __init init_via82cxxx(void)
{ {
int i; int i;
for (i = 0; i < ARRAY_SIZE(chipsets); ++i) { for (i = 0; i < ARRAY_SIZE(chipsets); ++i)
ata_register_chipset(&chipsets[i]); ata_register_chipset(&chipsets[i]);
}
return 0; return 0;
} }
...@@ -318,10 +318,11 @@ static ide_startstop_t idescsi_pc_intr(struct ata_device *drive, struct request ...@@ -318,10 +318,11 @@ static ide_startstop_t idescsi_pc_intr(struct ata_device *drive, struct request
if (ata_status(drive, 0, DRQ_STAT)) { /* No more interrupts */ if (ata_status(drive, 0, DRQ_STAT)) { /* No more interrupts */
if (test_bit(IDESCSI_LOG_CMD, &scsi->log)) if (test_bit(IDESCSI_LOG_CMD, &scsi->log))
printk (KERN_INFO "Packet command completed, %d bytes transferred\n", pc->actually_transferred); printk (KERN_INFO "Packet command completed, %d bytes transferred\n", pc->actually_transferred);
ide__sti(); local_irq_enable();
if (drive->status & ERR_STAT) if (drive->status & ERR_STAT)
rq->errors++; rq->errors++;
idescsi_end_request(drive, rq, 1); idescsi_end_request(drive, rq, 1);
return ATA_OP_FINISHED; return ATA_OP_FINISHED;
} }
bcount = IN_BYTE (IDE_BCOUNTH_REG) << 8 | IN_BYTE (IDE_BCOUNTL_REG); bcount = IN_BYTE (IDE_BCOUNTH_REG) << 8 | IN_BYTE (IDE_BCOUNTL_REG);
......
...@@ -19,8 +19,6 @@ ...@@ -19,8 +19,6 @@
#define MAX_HWIFS 4 #define MAX_HWIFS 4
#endif #endif
#define ide__sti() __sti()
static __inline__ int ide_default_irq(ide_ioreg_t base) static __inline__ int ide_default_irq(ide_ioreg_t base)
{ {
switch (base) { switch (base) {
......
...@@ -17,8 +17,6 @@ ...@@ -17,8 +17,6 @@
#define MAX_HWIFS 4 #define MAX_HWIFS 4
#endif #endif
#define ide__sti() __sti()
#include <asm/arch/ide.h> #include <asm/arch/ide.h>
/* /*
......
...@@ -22,8 +22,6 @@ ...@@ -22,8 +22,6 @@
#define MAX_HWIFS 4 #define MAX_HWIFS 4
#define ide__sti() __sti()
static __inline__ int ide_default_irq(ide_ioreg_t base) static __inline__ int ide_default_irq(ide_ioreg_t base)
{ {
/* all IDE busses share the same IRQ, number 4. /* all IDE busses share the same IRQ, number 4.
......
...@@ -23,8 +23,6 @@ ...@@ -23,8 +23,6 @@
# endif # endif
#endif #endif
#define ide__sti() __sti()
static __inline__ int ide_default_irq(ide_ioreg_t base) static __inline__ int ide_default_irq(ide_ioreg_t base)
{ {
switch (base) { switch (base) {
......
...@@ -25,8 +25,6 @@ ...@@ -25,8 +25,6 @@
# endif # endif
#endif #endif
#define ide__sti() __sti()
static __inline__ int static __inline__ int
ide_default_irq (ide_ioreg_t base) ide_default_irq (ide_ioreg_t base)
{ {
......
...@@ -171,36 +171,5 @@ static __inline__ void ide_get_lock (int *ide_lock, void (*handler)(int, void *, ...@@ -171,36 +171,5 @@ static __inline__ void ide_get_lock (int *ide_lock, void (*handler)(int, void *,
} }
} }
#endif /* CONFIG_ATARI */ #endif /* CONFIG_ATARI */
/*
* On the Atari, we sometimes can't enable interrupts:
*/
/* MSch: changed sti() to STI() wherever possible in ide.c; moved STI() def.
* to asm/ide.h
*/
/* The Atari interrupt structure strictly requires that the IPL isn't lowered
* uncontrolled in an interrupt handler. In the concrete case, the IDE
* interrupt is already a slow int, so the irq is already disabled at the time
* the handler is called, and the IPL has been lowered to the minimum value
* possible. To avoid going below that, STI() checks for being called inside
* an interrupt, and in that case it does nothing. Hope that is reasonable and
* works. (Roman)
*/
#ifdef MACH_ATARI_ONLY
#define ide__sti() \
do { \
if (!in_interrupt()) __sti(); \
} while(0)
#elif defined(CONFIG_ATARI)
#define ide__sti() \
do { \
if (!MACH_IS_ATARI || !in_interrupt()) sti(); \
} while(0)
#else /* !defined(CONFIG_ATARI) */
#define ide__sti() __sti()
#endif
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
#endif /* _M68K_IDE_H */ #endif /* _M68K_IDE_H */
...@@ -24,8 +24,6 @@ ...@@ -24,8 +24,6 @@
# endif # endif
#endif #endif
#define ide__sti() __sti()
struct ide_ops { struct ide_ops {
int (*ide_default_irq)(ide_ioreg_t base); int (*ide_default_irq)(ide_ioreg_t base);
ide_ioreg_t (*ide_default_io_base)(int index); ide_ioreg_t (*ide_default_io_base)(int index);
......
...@@ -27,8 +27,6 @@ ...@@ -27,8 +27,6 @@
# endif # endif
#endif #endif
#define ide__sti() __sti()
struct ide_ops { struct ide_ops {
int (*ide_default_irq)(ide_ioreg_t base); int (*ide_default_irq)(ide_ioreg_t base);
ide_ioreg_t (*ide_default_io_base)(int index); ide_ioreg_t (*ide_default_io_base)(int index);
......
...@@ -19,8 +19,6 @@ ...@@ -19,8 +19,6 @@
#define MAX_HWIFS 10 #define MAX_HWIFS 10
#endif #endif
#define ide__sti() __sti()
static __inline__ int ide_default_irq(ide_ioreg_t base) static __inline__ int ide_default_irq(ide_ioreg_t base)
{ {
switch (base) { switch (base) {
......
...@@ -44,8 +44,6 @@ extern struct ide_machdep_calls ppc_ide_md; ...@@ -44,8 +44,6 @@ extern struct ide_machdep_calls ppc_ide_md;
#undef SUPPORT_SLOW_DATA_PORTS #undef SUPPORT_SLOW_DATA_PORTS
#define SUPPORT_SLOW_DATA_PORTS 0 #define SUPPORT_SLOW_DATA_PORTS 0
#define ide__sti() __sti()
static __inline__ int ide_default_irq(ide_ioreg_t base) static __inline__ int ide_default_irq(ide_ioreg_t base)
{ {
if (ppc_ide_md.default_irq) if (ppc_ide_md.default_irq)
......
...@@ -19,11 +19,9 @@ ...@@ -19,11 +19,9 @@
#ifdef __KERNEL__ #ifdef __KERNEL__
#ifndef MAX_HWIFS #ifndef MAX_HWIFS
#define MAX_HWIFS 4 # define MAX_HWIFS 4
#endif #endif
#define ide__sti() __sti()
static __inline__ int ide_default_irq(ide_ioreg_t base) { return 0; } static __inline__ int ide_default_irq(ide_ioreg_t base) { return 0; }
static __inline__ ide_ioreg_t ide_default_io_base(int index) { return 0; } static __inline__ ide_ioreg_t ide_default_io_base(int index) { return 0; }
......
...@@ -15,8 +15,6 @@ ...@@ -15,8 +15,6 @@
#define MAX_HWIFS 0 #define MAX_HWIFS 0
#endif #endif
#define ide__sti() do {} while (0)
/* /*
* We always use the new IDE port registering, * We always use the new IDE port registering,
* so these are fixed here. * so these are fixed here.
......
/*
* linux/include/asm-s390/ide.h
*
* Copyright (C) 1994-1996 Linus Torvalds & authors
*/
/* s390 does not have IDE */
#ifndef __ASMS390_IDE_H
#define __ASMS390_IDE_H
#ifdef __KERNEL__
#ifndef MAX_HWIFS
#define MAX_HWIFS 0
#endif
#define ide__sti() do {} while (0)
/*
* We always use the new IDE port registering,
* so these are fixed here.
*/
#define ide_default_io_base(i) ((ide_ioreg_t)0)
#define ide_default_irq(b) (0)
#endif /* __KERNEL__ */
#endif /* __ASMS390_IDE_H */
...@@ -22,8 +22,6 @@ ...@@ -22,8 +22,6 @@
#define MAX_HWIFS 2 #define MAX_HWIFS 2
#endif #endif
#define ide__sti() __sti()
static __inline__ int ide_default_irq_hp600(ide_ioreg_t base) static __inline__ int ide_default_irq_hp600(ide_ioreg_t base)
{ {
switch (base) { switch (base) {
......
...@@ -20,8 +20,6 @@ ...@@ -20,8 +20,6 @@
#undef MAX_HWIFS #undef MAX_HWIFS
#define MAX_HWIFS 2 #define MAX_HWIFS 2
#define ide__sti() __sti()
static __inline__ int ide_default_irq(ide_ioreg_t base) static __inline__ int ide_default_irq(ide_ioreg_t base)
{ {
return 0; return 0;
......
...@@ -20,8 +20,6 @@ ...@@ -20,8 +20,6 @@
#undef MAX_HWIFS #undef MAX_HWIFS
#define MAX_HWIFS 2 #define MAX_HWIFS 2
#define ide__sti() __sti()
static __inline__ int ide_default_irq(ide_ioreg_t base) static __inline__ int ide_default_irq(ide_ioreg_t base)
{ {
return 0; return 0;
......
...@@ -23,8 +23,6 @@ ...@@ -23,8 +23,6 @@
# endif # endif
#endif #endif
#define ide__sti() __sti()
static __inline__ int ide_default_irq(ide_ioreg_t base) static __inline__ int ide_default_irq(ide_ioreg_t base)
{ {
switch (base) { switch (base) {
......
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