avoid warning messages from ahci and other controllers when turning dma on by selecting only ide controllers from #S/sdctl. Reference: /n/sources/patch/maybe/dmaon Date: Mon Aug 3 15:06:05 CES 2009 Signed-off-by: quanstro@quanstro.net --- /rc/bin/dmaon Mon Aug 3 15:05:20 2009 +++ /rc/bin/dmaon Mon Aug 3 15:05:18 2009 @@ -1,7 +1,12 @@ #!/bin/rc # dmaon - turn on ide dma, if possible rfork e -for (ctl in /dev/sd[C-H]?/ctl) - if (test -e $ctl && grep -s '^config .* dma ' $ctl && - ! grep -s '^config (848A|.* dma 00000000 )' $ctl) - echo 'dma on' >$ctl +if(! test -f '#S/sdctl') + exit '' +ctlrs=`{sed -n 's/(^sd.) ata .*/\1/p' <'#S/sdctl'} +if(~ $#ctlrs 0) + exit '' +for(ctl in '#S/'$ctlrs^?/ctl) + if (! grep -s '^config .* dma 00000000 ' $ctl) + echo dma on >$ctl [2]>/dev/null || echo dmaon: $ctlr failed +