hello,
I've just hacked a new ioctl into the ATAPI cdrom driver, which
lets the user to specify (pronounce: ``slow down'' :) the speed
of todays' extremely high speed drives.
It's a documented ATAPI feature, and is very easy to implement,
and I've found it very useful :)
first, you need to add the ioctl into sys/cdio.h:
struct ioc_spdsel
{
int rate;
}
#define CDIOCSPDSEL _IOW('c',32,struct ioc_spdsel)
second, need to add this into i386/isa/atapi.h
#define ATAPI_SPEED_SELECT 0xbb
and finally need to add this case into the function ``acdioctl'' in
i386/isa/atapi-cd.c
case CDIOCSPDSEL:
{
struct ioc_spdsel *arg = (struct ioc_spdsel *)addr;
return acd_request_wait(cdp, ATAPI_SPEED_SELECT, 0,
arg->rate>>8 & 0xff,
arg->rate & 0xff,
0, 0, 0, 0, 0, 0, 0, 0);
}
of course unified diff's are available. i'm not an experienced
kernel hacker, please feel free to correct me and drop me
a mail about this thingy...
thanks in advance
-- mauzi
Gergely EGERVARY
[EMAIL PROTECTED]
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message