ata: panic with new sysctl variable
Hi, just noticed the new sysctl variable for ata. I just wanted to use the new way for disabling DMA on my disk (has some strange problems, even under windows). Previously I just commented out the ata_dmainit() lines in ata_disk.c, now I wanted to set it with sysctl: sysctl -w hw.atamodes="pio,dma,dma,dma" but this paniced my machine. I later discovered that there is no sanity check during setting the new modes: The machine in question didn't have a secondary IDE controller, but the variables were set without a range check. My solution was simple. Just use sysctl -w hw.atamodes="pio,dma" but I think, the ata driver should range check the settings. Daniel To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: ata: panic with new sysctl variable
It seems D. Rock wrote: Hi, just noticed the new sysctl variable for ata. I just wanted to use the new way for disabling DMA on my disk (has some strange problems, even under windows). Previously I just commented out the ata_dmainit() lines in ata_disk.c, now I wanted to set it with sysctl: sysctl -w hw.atamodes="pio,dma,dma,dma" but this paniced my machine. I later discovered that there is no sanity check during setting the new modes: The machine in question didn't have a secondary IDE controller, but the variables were set without a range check. My solution was simple. Just use sysctl -w hw.atamodes="pio,dma" but I think, the ata driver should range check the settings. It does but not for the first two devices as the are kindof magic in some sense. I'll commit the fix asap.. -Søren To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message