From owner-freebsd-hackers@freebsd.org Tue Aug 23 15:45:37 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E353BC3BB7 for ; Tue, 23 Aug 2016 15:45:37 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from mr11p00im-asmtp001.me.com (mr11p00im-asmtp001.me.com [17.110.69.252]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 52F4B1E6E for ; Tue, 23 Aug 2016 15:45:37 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from process-dkim-sign-daemon.mr11p00im-asmtp001.me.com by mr11p00im-asmtp001.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) id <0OCD00300BO9KE00@mr11p00im-asmtp001.me.com> for freebsd-hackers@freebsd.org; Tue, 23 Aug 2016 15:45:34 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mac.com; s=4d515a; t=1471967134; bh=R0VJVzKBIZ+oUmmLn0uFLHaHxsEP850aJ2zuW1rriYo=; h=Date:Subject:From:To:Message-id:MIME-version:Content-type; b=d7WuzM/oDdwfsquBHJdQ/x5K1B2cOHJQ1OHoIaqusi4hEKb9plUpLsjSUacLoboUq j/wn6YbujaQj/qi7ftWdalDhpFZRwiPgVqCAExkw/4mT2OoOdGrGANQQno83hQQz3c 5P7n/+nSm87hIrwLAiyhh4p9Mw4PvpbSC5JzBtSG/ikS4RMh4kKYKe5o41fex6IWd1 aRAufsMtnR1eOKz8t0qOciHrpC41SE2qyn+9arhjaubUTgTOpyb9gzfHr2HWsXHGKu 2Y9yJrcQXC0BveRpb747gV0wnc4YlezdwcfYAnSDDumCREolbb0MpEfcSVIbSUrpT9 X658J6D/ieLew== Received: from [192.168.1.4] (c-67-188-225-23.hsd1.ca.comcast.net [67.188.225.23]) by mr11p00im-asmtp001.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) with ESMTPSA id <0OCD001FVD3XWQ30@mr11p00im-asmtp001.me.com>; Tue, 23 Aug 2016 15:45:34 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-08-23_09:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1015 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1603290000 definitions=main-1608230157 User-Agent: Microsoft-MacOutlook/f.18.0.160709 Date: Tue, 23 Aug 2016 08:45:33 -0700 Subject: Re: problem attaching driver at LPC bus From: Ravi Pokala Sender: "Pokala, Ravi" To: Warner Losh Cc: "freebsd-hackers@freebsd.org" , karu.pruun@gmail.com Message-id: <082EEC89-4BFF-48B9-84DA-C971D396A6CD@panasas.com> Thread-topic: problem attaching driver at LPC bus References: <20A27669-0B16-4199-853F-46D84E876AE9@panasas.com> In-reply-to: MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Aug 2016 15:45:37 -0000 -----Original Message----- From: on behalf of Warner Losh Date: 2016-08-23, Tuesday at 08:20 To: Ravi Pokala Cc: "freebsd-hackers@freebsd.org" , Subject: Re: problem attaching driver at LPC bus On Tue, Aug 23, 2016 at 9:13 AM, Ravi Pokala wrote: >> ... >> >> One thing to note is that I was careful about keeping track of the RIDs. Several of the existing drivers in the tree seem to just use 0 indiscriminately, and it works because they only use one resource. > > For ISA drivers, RID is just a number, best thought of as an index. > So incrementing here like you've done is the right call. > > Warner Right, someone (jhb?) explained that to me at the time. My point is that the common practice of just passing in 0 doesn't always DTRT, especially if you're dealing with multiple resources. -Ravi (rpokala@)