From owner-freebsd-hackers Sun Nov 28 12: 8:32 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from eth0-gw.poli.hu (eth0-gw.poli.hu [195.199.8.27]) by hub.freebsd.org (Postfix) with ESMTP id 7B78014C88 for ; Sun, 28 Nov 1999 12:08:27 -0800 (PST) (envelope-from mauzi@faber.poli.hu) Received: from faber.poli.hu ([195.199.8.29]) by eth0-gw.poli.hu with esmtp (Exim 3.03 #1 (Debian)) id 11sAcX-0003fU-00 for ; Sun, 28 Nov 1999 21:08:29 +0100 Received: from mauzi (helo=localhost) by faber.poli.hu with local-esmtp (Exim 3.03 #1 (Debian)) id 11sAcO-0001Xj-00 for ; Sun, 28 Nov 1999 21:08:20 +0100 Date: Sun, 28 Nov 1999 21:08:20 +0100 (CET) From: Egervary Gergely To: freebsd-hackers@freebsd.org Subject: cdrom speed adjustment ioctl Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 mauzi@lkg.rulez.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message