diff options
Diffstat (limited to 'drivers/ide/ide-dma.c')
-rw-r--r-- | drivers/ide/ide-dma.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c index 8757e5ef6c95..dc4bc06f9871 100644 --- a/drivers/ide/ide-dma.c +++ b/drivers/ide/ide-dma.c | |||
@@ -574,6 +574,7 @@ static unsigned int ide_get_mode_mask(ide_drive_t *drive, u8 base, u8 req_mode) | |||
574 | { | 574 | { |
575 | struct hd_driveid *id = drive->id; | 575 | struct hd_driveid *id = drive->id; |
576 | ide_hwif_t *hwif = drive->hwif; | 576 | ide_hwif_t *hwif = drive->hwif; |
577 | const struct ide_port_ops *port_ops = hwif->port_ops; | ||
577 | unsigned int mask = 0; | 578 | unsigned int mask = 0; |
578 | 579 | ||
579 | switch(base) { | 580 | switch(base) { |
@@ -581,8 +582,8 @@ static unsigned int ide_get_mode_mask(ide_drive_t *drive, u8 base, u8 req_mode) | |||
581 | if ((id->field_valid & 4) == 0) | 582 | if ((id->field_valid & 4) == 0) |
582 | break; | 583 | break; |
583 | 584 | ||
584 | if (hwif->udma_filter) | 585 | if (port_ops && port_ops->udma_filter) |
585 | mask = hwif->udma_filter(drive); | 586 | mask = port_ops->udma_filter(drive); |
586 | else | 587 | else |
587 | mask = hwif->ultra_mask; | 588 | mask = hwif->ultra_mask; |
588 | mask &= id->dma_ultra; | 589 | mask &= id->dma_ultra; |
@@ -598,8 +599,8 @@ static unsigned int ide_get_mode_mask(ide_drive_t *drive, u8 base, u8 req_mode) | |||
598 | case XFER_MW_DMA_0: | 599 | case XFER_MW_DMA_0: |
599 | if ((id->field_valid & 2) == 0) | 600 | if ((id->field_valid & 2) == 0) |
600 | break; | 601 | break; |
601 | if (hwif->mdma_filter) | 602 | if (port_ops && port_ops->mdma_filter) |
602 | mask = hwif->mdma_filter(drive); | 603 | mask = port_ops->mdma_filter(drive); |
603 | else | 604 | else |
604 | mask = hwif->mwdma_mask; | 605 | mask = hwif->mwdma_mask; |
605 | mask &= id->dma_mword; | 606 | mask &= id->dma_mword; |