From owner-freebsd-bugs@FreeBSD.ORG Sun Oct 22 13:24:20 2006 Return-Path: X-Original-To: freebsd-bugs@FreeBSD.org Delivered-To: freebsd-bugs@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ED6C416A403; Sun, 22 Oct 2006 13:24:20 +0000 (UTC) (envelope-from bde@zeta.org.au) Received: from mailout2.pacific.net.au (mailout2-3.pacific.net.au [61.8.2.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id DC0E943D8C; Sun, 22 Oct 2006 13:24:13 +0000 (GMT) (envelope-from bde@zeta.org.au) Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.2.163]) by mailout2.pacific.net.au (Postfix) with ESMTP id E3E6E10B0B7; Sun, 22 Oct 2006 23:24:11 +1000 (EST) Received: from katana.zip.com.au (katana.zip.com.au [61.8.7.246]) by mailproxy2.pacific.net.au (Postfix) with ESMTP id 39F4A2740D; Sun, 22 Oct 2006 23:24:11 +1000 (EST) Date: Sun, 22 Oct 2006 23:24:10 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: "Jukka A. Ukkonen" In-Reply-To: <200610221131.k9MBVrKa037929@jau.iki.fi> Message-ID: <20061022231038.Q5790@delplex.bde.org> References: <200610221131.k9MBVrKa037929@jau.iki.fi> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-bugs@FreeBSD.org, FreeBSD-gnats-submit@FreeBSD.org Subject: Re: kern/104675: Apparently there is a clash between two ioctls X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Oct 2006 13:24:21 -0000 On Sun, 22 Oct 2006, Jukka A. Ukkonen wrote: >> Description: > It seems that the bktr driver cannot change the input connector > used when using a card with multiple connectors. > When I used ktrace to see what happens at the kernel API level > I got somewhat disturbing output... > > 56314 try CALL ioctl(0x3,METEORGINPUT,0xbfbfed24) > 56314 try RET ioctl 0 > 56314 try CALL ioctl(0x3,SERIAL_SETINVCLK,0xbfbfed20) > 56314 try RET ioctl 0 > 56314 try CALL ioctl(0x3,METEORGINPUT,0xbfbfed20) > 56314 try RET ioctl 0 > > It seems that METEORGINPUT is recognized properly but its > complement METEORSINPUT is not. Instead METEORSINPUT gets > mapped to something completely unrelated (SERIAL_SETINVCLK). This is probably not the real problem. There are too many ambiguous ioctls for kdump to fix, so kdump carefully avoids seeing the problem by not invoking mkioctls with -s. But this is only a debugging problem. The ioctl numbers are unique for each device, so device drivers have no problems with their ambiguity. To do the same for just the above, kdump would have to determine that fd 0x3 is for bktr and use bktr's ioctl switch statement instead of Cronyx serial's one. It now just uses an elseif ladder that has all the ioctls but only finds the first match. Bruce