Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 48831
b: refs/heads/master
c: ccf3528
h: refs/heads/master
i:
  48829: a42e3e2
  48827: 1718eee
  48823: 1a5a1f9
  48815: 7563824
  48799: 01b9c05
  48767: fd03d1e
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Feb 17, 2007
1 parent 8c382e0 commit 132044f
Show file tree
Hide file tree
Showing 11 changed files with 29 additions and 39 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7469aaf6a30f4187ed6de7c0aed5c2dd2d1c2d31
refs/heads/master: ccf352894ceef79d40d015e1deee4c46c3aa42ed
8 changes: 4 additions & 4 deletions trunk/drivers/ide/arm/icside.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,15 +316,15 @@ static void icside_dma_off_quietly(ide_drive_t *drive)
drive->using_dma = 0;
}

static int icside_dma_host_on(ide_drive_t *drive)
static void icside_dma_host_on(ide_drive_t *drive)
{
return 0;
}

static int icside_dma_on(ide_drive_t *drive)
{
drive->using_dma = 1;
return icside_dma_host_on(drive);

return 0;
}

static int icside_dma_check(ide_drive_t *drive)
Expand Down Expand Up @@ -494,7 +494,7 @@ static void icside_dma_init(ide_hwif_t *hwif)
hwif->ide_dma_check = icside_dma_check;
hwif->dma_host_off = icside_dma_host_off;
hwif->dma_off_quietly = icside_dma_off_quietly;
hwif->ide_dma_host_on = icside_dma_host_on;
hwif->dma_host_on = icside_dma_host_on;
hwif->ide_dma_on = icside_dma_on;
hwif->dma_setup = icside_dma_setup;
hwif->dma_exec_cmd = icside_dma_exec_cmd;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/ide/cris/ide-cris.c
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,7 @@ init_e100_ide (void)
hwif->INB = &cris_ide_inb;
hwif->INW = &cris_ide_inw;
hwif->dma_host_off = &cris_dma_off;
hwif->ide_dma_host_on = &cris_dma_on;
hwif->dma_host_on = &cris_dma_on;
hwif->dma_off_quietly = &cris_dma_off;
hwif->udma_four = 0;
hwif->ultra_mask = cris_ultra_mask;
Expand Down
17 changes: 7 additions & 10 deletions trunk/drivers/ide/ide-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -468,27 +468,25 @@ EXPORT_SYMBOL(ide_dma_off);

#ifdef CONFIG_BLK_DEV_IDEDMA_PCI
/**
* __ide_dma_host_on - Enable DMA on a host
* ide_dma_host_on - Enable DMA on a host
* @drive: drive to enable for DMA
*
* Enable DMA on an IDE controller following generic bus mastering
* IDE controller behaviour
*/
int __ide_dma_host_on (ide_drive_t *drive)

void ide_dma_host_on(ide_drive_t *drive)
{
if (drive->using_dma) {
ide_hwif_t *hwif = HWIF(drive);
u8 unit = (drive->select.b.unit & 0x01);
u8 dma_stat = hwif->INB(hwif->dma_status);

hwif->OUTB((dma_stat|(1<<(5+unit))), hwif->dma_status);
return 0;
}
return 1;
}

EXPORT_SYMBOL(__ide_dma_host_on);
EXPORT_SYMBOL(ide_dma_host_on);

/**
* __ide_dma_on - Enable DMA on a device
Expand All @@ -506,8 +504,7 @@ int __ide_dma_on (ide_drive_t *drive)
drive->using_dma = 1;
ide_toggle_bounce(drive, 1);

if (HWIF(drive)->ide_dma_host_on(drive))
return 1;
drive->hwif->dma_host_on(drive);

return 0;
}
Expand Down Expand Up @@ -940,8 +937,8 @@ void ide_setup_dma (ide_hwif_t *hwif, unsigned long dma_base, unsigned int num_p
hwif->dma_host_off = &ide_dma_host_off;
if (!hwif->ide_dma_on)
hwif->ide_dma_on = &__ide_dma_on;
if (!hwif->ide_dma_host_on)
hwif->ide_dma_host_on = &__ide_dma_host_on;
if (!hwif->dma_host_on)
hwif->dma_host_on = &ide_dma_host_on;
if (!hwif->ide_dma_check)
hwif->ide_dma_check = &__ide_dma_check;
if (!hwif->dma_setup)
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/ide/ide-iops.c
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,7 @@ int ide_config_drive_speed (ide_drive_t *drive, u8 speed)

#ifdef CONFIG_BLK_DEV_IDEDMA
if (speed >= XFER_SW_DMA_0)
hwif->ide_dma_host_on(drive);
hwif->dma_host_on(drive);
else if (hwif->ide_dma_check) /* check if host supports DMA */
hwif->dma_off_quietly(drive);
#endif
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/ide/ide.c
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ static void ide_hwif_restore(ide_hwif_t *hwif, ide_hwif_t *tmp_hwif)
hwif->dma_off_quietly = tmp_hwif->dma_off_quietly;
hwif->ide_dma_test_irq = tmp_hwif->ide_dma_test_irq;
hwif->ide_dma_clear_irq = tmp_hwif->ide_dma_clear_irq;
hwif->ide_dma_host_on = tmp_hwif->ide_dma_host_on;
hwif->dma_host_on = tmp_hwif->dma_host_on;
hwif->dma_host_off = tmp_hwif->dma_host_off;
hwif->ide_dma_lostirq = tmp_hwif->ide_dma_lostirq;
hwif->ide_dma_timeout = tmp_hwif->ide_dma_timeout;
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/ide/mips/au1xxx-ide.c
Original file line number Diff line number Diff line change
Expand Up @@ -438,15 +438,15 @@ static int auide_dma_test_irq(ide_drive_t *drive)
return 0;
}

static int auide_dma_host_on(ide_drive_t *drive)
static void auide_dma_host_on(ide_drive_t *drive)
{
return 0;
}

static int auide_dma_on(ide_drive_t *drive)
{
drive->using_dma = 1;
return auide_dma_host_on(drive);

return 0;
}

static void auide_dma_host_off(ide_drive_t *drive)
Expand Down Expand Up @@ -731,7 +731,7 @@ static int au_ide_probe(struct device *dev)
hwif->dma_setup = &auide_dma_setup;
hwif->ide_dma_test_irq = &auide_dma_test_irq;
hwif->dma_host_off = &auide_dma_host_off;
hwif->ide_dma_host_on = &auide_dma_host_on;
hwif->dma_host_on = &auide_dma_host_on;
hwif->ide_dma_lostirq = &auide_dma_lostirq;
hwif->ide_dma_on = &auide_dma_on;

Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/ide/pci/atiixp.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ static u8 atiixp_dma_2_pio(u8 xfer_rate) {
}
}

static int atiixp_ide_dma_host_on(ide_drive_t *drive)
static void atiixp_dma_host_on(ide_drive_t *drive)
{
struct pci_dev *dev = drive->hwif->pci_dev;
unsigned long flags;
Expand All @@ -118,7 +118,7 @@ static int atiixp_ide_dma_host_on(ide_drive_t *drive)

spin_unlock_irqrestore(&atiixp_lock, flags);

return __ide_dma_host_on(drive);
ide_dma_host_on(drive);
}

static void atiixp_dma_host_off(ide_drive_t *drive)
Expand Down Expand Up @@ -305,7 +305,7 @@ static void __devinit init_hwif_atiixp(ide_hwif_t *hwif)
else
hwif->udma_four = 0;

hwif->ide_dma_host_on = &atiixp_ide_dma_host_on;
hwif->dma_host_on = &atiixp_dma_host_on;
hwif->dma_host_off = &atiixp_dma_host_off;
hwif->ide_dma_check = &atiixp_dma_check;
if (!noautodma)
Expand Down
11 changes: 3 additions & 8 deletions trunk/drivers/ide/pci/sgiioc4.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ sgiioc4_ide_dma_on(ide_drive_t * drive)
{
drive->using_dma = 1;

return HWIF(drive)->ide_dma_host_on(drive);
return 0;
}

static void sgiioc4_dma_off_quietly(ide_drive_t *drive)
Expand Down Expand Up @@ -307,13 +307,8 @@ sgiioc4_ide_dma_test_irq(ide_drive_t * drive)
return sgiioc4_checkirq(HWIF(drive));
}

static int
sgiioc4_ide_dma_host_on(ide_drive_t * drive)
static void sgiioc4_dma_host_on(ide_drive_t * drive)
{
if (drive->using_dma)
return 0;

return 1;
}

static void sgiioc4_dma_host_off(ide_drive_t * drive)
Expand Down Expand Up @@ -610,7 +605,7 @@ ide_init_sgiioc4(ide_hwif_t * hwif)
hwif->ide_dma_on = &sgiioc4_ide_dma_on;
hwif->dma_off_quietly = &sgiioc4_dma_off_quietly;
hwif->ide_dma_test_irq = &sgiioc4_ide_dma_test_irq;
hwif->ide_dma_host_on = &sgiioc4_ide_dma_host_on;
hwif->dma_host_on = &sgiioc4_dma_host_on;
hwif->dma_host_off = &sgiioc4_dma_host_off;
hwif->ide_dma_lostirq = &sgiioc4_ide_dma_lostirq;
hwif->ide_dma_timeout = &__ide_dma_timeout;
Expand Down
6 changes: 2 additions & 4 deletions trunk/drivers/ide/ppc/pmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1983,10 +1983,8 @@ static void pmac_ide_dma_host_off(ide_drive_t *drive)
{
}

static int
pmac_ide_dma_host_on (ide_drive_t *drive)
static int pmac_ide_dma_host_on(ide_drive_t *drive)
{
return 0;
}

static int
Expand Down Expand Up @@ -2041,7 +2039,7 @@ pmac_ide_setup_dma(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif)
hwif->ide_dma_end = &pmac_ide_dma_end;
hwif->ide_dma_test_irq = &pmac_ide_dma_test_irq;
hwif->dma_host_off = &pmac_ide_dma_host_off;
hwif->ide_dma_host_on = &pmac_ide_dma_host_on;
hwif->dma_host_on = &pmac_ide_dma_host_on;
hwif->ide_dma_timeout = &__ide_dma_timeout;
hwif->ide_dma_lostirq = &pmac_ide_dma_lostirq;

Expand Down
4 changes: 2 additions & 2 deletions trunk/include/linux/ide.h
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,7 @@ typedef struct hwif_s {
void (*dma_off_quietly)(ide_drive_t *drive);
int (*ide_dma_test_irq)(ide_drive_t *drive);
void (*ide_dma_clear_irq)(ide_drive_t *drive);
int (*ide_dma_host_on)(ide_drive_t *drive);
void (*dma_host_on)(ide_drive_t *drive);
void (*dma_host_off)(ide_drive_t *drive);
int (*ide_dma_lostirq)(ide_drive_t *drive);
int (*ide_dma_timeout)(ide_drive_t *drive);
Expand Down Expand Up @@ -1290,7 +1290,7 @@ extern void ide_setup_dma(ide_hwif_t *, unsigned long, unsigned int);

void ide_dma_host_off(ide_drive_t *);
void ide_dma_off_quietly(ide_drive_t *);
extern int __ide_dma_host_on(ide_drive_t *);
void ide_dma_host_on(ide_drive_t *);
extern int __ide_dma_on(ide_drive_t *);
extern int __ide_dma_check(ide_drive_t *);
extern int ide_dma_setup(ide_drive_t *);
Expand Down

0 comments on commit 132044f

Please sign in to comment.