Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ide-cris: fix ->speedproc and wrong ->swdma_mask

* fix ->speedproc to set the drive speed

* this driver doesn't support SWDMA so use the correct ->swdma_mask

* BUG() if an unsupported mode is passed to ->speedproc

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

+4 -5
+4 -5
drivers/ide/cris/ide-cris.c
··· 730 730 731 731 if (speed >= XFER_PIO_0 && speed <= XFER_PIO_4) { 732 732 tune_cris_ide(drive, speed - XFER_PIO_0); 733 - return 0; 733 + return ide_config_drive_speed(drive, speed); 734 734 } 735 735 736 736 switch(speed) ··· 760 760 hold = ATA_DMA2_HOLD; 761 761 break; 762 762 default: 763 - return 0; 763 + BUG(); 764 + break; 764 765 } 765 766 766 767 if (speed >= XFER_UDMA_0) ··· 769 768 else 770 769 cris_ide_set_speed(TYPE_DMA, 0, strobe, hold); 771 770 772 - return 0; 771 + return ide_config_drive_speed(drive, speed); 773 772 } 774 773 775 774 void __init ··· 822 821 hwif->udma_four = 0; 823 822 hwif->ultra_mask = cris_ultra_mask; 824 823 hwif->mwdma_mask = 0x07; /* Multiword DMA 0-2 */ 825 - hwif->swdma_mask = 0x07; /* Singleword DMA 0-2 */ 826 824 hwif->autodma = 1; 827 825 hwif->drives[0].autodma = 1; 828 826 hwif->drives[1].autodma = 1; ··· 1010 1010 return 0; 1011 1011 1012 1012 speed_cris_ide(drive, speed); 1013 - ide_config_drive_speed(drive, speed); 1014 1013 1015 1014 return ide_dma_enable(drive); 1016 1015 }