From owner-freebsd-hackers@freebsd.org Tue Aug 23 15:48:50 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 A779ABC3DC0 for ; Tue, 23 Aug 2016 15:48:50 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x232.google.com (mail-it0-x232.google.com [IPv6:2607:f8b0:4001:c0b::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6F097146F for ; Tue, 23 Aug 2016 15:48:50 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x232.google.com with SMTP id x131so155337535ite.0 for ; Tue, 23 Aug 2016 08:48:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=5pgHbxhsV4ZXXqTCiSJwbdhyE64dHBNSZpggq+y4uRk=; b=VNz+sK6l1vati6sHxUr8N9nTIgssGuo5ksB4L5/DcI19tJNP+wEZb+4O3iuMD+5XJk XmZDfk7e1Ak4DjrrqrZIe1apv3oUuEruSMjyaQYPuxm3m7bXCPH5I7X36z999iP0p+OP 1aFgKFuHsK5dutXeljpdXqZZx3lMBQyU/rkRMOO1hSspce5roTxsFOJfZctVbonaJkaI nwfBZH5cIQj67J8Xbwf+kInirvhbVhy21G7DnpoYy+5MRAqzhN9wtwJLKv9PkRLzPbQA 1M5BYFFYsyqSpSEs7dqaMZStpdDpjcSHV+cjN1Psfg619hS8bU8wMhhqcNoGGxnYdjkG 280Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=5pgHbxhsV4ZXXqTCiSJwbdhyE64dHBNSZpggq+y4uRk=; b=EcXnuo2lL8z/wnjH7IHi4f4OSR36hXF6HJ9Osx1n0YulFg2iYNIHoeZ7+42MVsqP92 7AB+Q2IHPRT4WMYxkCDZtEJFdxC/9bOeTkYrxK9t+IhxUHZp9AfHIS+QosBBKyNUb67V FCRxH8h6mCCGaSj6HazbztZJbpixmpuK0i0jcc1Jw1jbxrV1r3Vy8B0v3c1PDR/S4t9y dJz9o2epsh65+L0Kr7swOJVUpaCL8Z5B71EbSvMrpElbFozgTYpOoEyHtzTraDzlJMi5 cjutRrIkJnWNVrS+FlVk6ILodyRp8T+iM8H3+W7K17XKdUkOczeAK+5EM8hjVCjwcL4t ZJLQ== X-Gm-Message-State: AEkoouuJRMoYspSBuIoDGhBOm9ojZFvRrtSx1I/sAC1QVk7wzC5pROemvHI270bbdQrFBk825YMTEn1YiXO6HQ== X-Received: by 10.107.21.134 with SMTP id 128mr29206185iov.59.1471967329875; Tue, 23 Aug 2016 08:48:49 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.36.65.7 with HTTP; Tue, 23 Aug 2016 08:48:49 -0700 (PDT) X-Originating-IP: [69.53.245.200] In-Reply-To: <082EEC89-4BFF-48B9-84DA-C971D396A6CD@panasas.com> References: <20A27669-0B16-4199-853F-46D84E876AE9@panasas.com> <082EEC89-4BFF-48B9-84DA-C971D396A6CD@panasas.com> From: Warner Losh Date: Tue, 23 Aug 2016 09:48:49 -0600 X-Google-Sender-Auth: e-gvmPwdYwfLAXc5LUQDG3WhNeU Message-ID: Subject: Re: problem attaching driver at LPC bus To: Ravi Pokala Cc: "freebsd-hackers@freebsd.org" , karu.pruun@gmail.com Content-Type: text/plain; charset=UTF-8 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:48:50 -0000 On Tue, Aug 23, 2016 at 9:45 AM, Ravi Pokala wrote: > -----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. And in PCI drivers :) But yes, you're correct. I just wanted to state simply the ISA policy: They are numbered 0 to N-1. Warner