From owner-freebsd-bugs@FreeBSD.ORG Sat Oct 22 15:50:17 2005 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 67D1E16A41F for ; Sat, 22 Oct 2005 15:50:17 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id C475A43D49 for ; Sat, 22 Oct 2005 15:50:16 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j9MFoGea064304 for ; Sat, 22 Oct 2005 15:50:16 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j9MFoG3X064303; Sat, 22 Oct 2005 15:50:16 GMT (envelope-from gnats) Resent-Date: Sat, 22 Oct 2005 15:50:16 GMT Resent-Message-Id: <200510221550.j9MFoG3X064303@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Frank Behrens Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7830A16A41F for ; Sat, 22 Oct 2005 15:43:36 +0000 (GMT) (envelope-from frank@pinky.sax.de) Received: from pinky.frank-behrens.de (pinky.frank-behrens.de [82.139.199.24]) by mx1.FreeBSD.org (Postfix) with ESMTP id 42B7B43D68 for ; Sat, 22 Oct 2005 15:43:31 +0000 (GMT) (envelope-from frank@pinky.sax.de) Received: from moon.behrens (localhost [127.0.0.1]) by pinky.frank-behrens.de (8.13.4/8.13.4) with ESMTP/MSA id j9MFhT3h027157 for ; Sat, 22 Oct 2005 17:43:29 +0200 (CEST) (envelope-from frank@moon.behrens) Received: (from frank@localhost) by moon.behrens (8.13.4/8.13.4/Submit) id j9MFhTCt027156; Sat, 22 Oct 2005 17:43:29 +0200 (CEST) (envelope-from frank) Message-Id: <200510221543.j9MFhTCt027156@moon.behrens> Date: Sat, 22 Oct 2005 17:43:29 +0200 (CEST) From: Frank Behrens To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: kern/87845: sio(4) should on probe return BUS_PROBE_GENERIC to allow other drivers to attach [fix] X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Frank Behrens List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Oct 2005 15:50:17 -0000 >Number: 87845 >Category: kern >Synopsis: sio(4) should on probe return BUS_PROBE_GENERIC to allow other drivers to attach [fix] >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Oct 22 15:50:16 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Frank Behrens >Release: FreeBSD 6.0-BETA3-200508221325 i386 >Organization: >Environment: all FreeBSD 5.x/6.x/7.x >Description: For special communication protocols it is necessary to replace the sio(4) driver. But the sio driver returns on bus probe always BUS_PROBE_SPECIFIC, what indicates the highest priority and prohibits the attachment of other drivers. sio(4) should return BUS_PROBE_GENERIC on successful bus probe. This allows an attachment of a more specific driver. Other drivers (e.g. puc(4)i) do this already. The proposed behavior conforms to DEVICE_PROBE(9) and the comments in /usr/include/sys/bus.h: #define BUS_PROBE_SPECIFIC 0 /* Only I can use this device */ #define BUS_PROBE_GENERIC (-100) /* generic driver for dev */ The changed driver should be MFCed to RELENG_6. >How-To-Repeat: >Fix: --- sioprobe6_050828.patch begins here --- --- sys/dev/sio/sio.c.orig Thu Jul 21 15:21:20 2005 +++ sys/dev/sio/sio.c Tue Aug 23 17:38:58 2005 @@ -700,7 +700,7 @@ device_set_softc(dev, NULL); free(com, M_DEVBUF); } - return (result); + return (result==0? BUS_PROBE_DEFAULT : result); } /* @@ -777,7 +777,7 @@ device_set_softc(dev, NULL); free(com, M_DEVBUF); } - return (result); + return (result==0? BUS_PROBE_DEFAULT : result); } #ifdef COM_ESP --- sioprobe6_050828.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: