Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755732Ab2FESBa (ORCPT ); Tue, 5 Jun 2012 14:01:30 -0400 Received: from mail-pb0-f46.google.com ([209.85.160.46]:56956 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755665Ab2FESB2 (ORCPT ); Tue, 5 Jun 2012 14:01:28 -0400 MIME-Version: 1.0 In-Reply-To: <20120605062603.GA21952@richard> References: <20120514015536.GA3331@richard> <20120514064615.GB26605@richard> <20120516011833.GA6599@richard> <20120529115900.GA31679@richard> <20120604133457.GA2969@richard> <20120605062603.GA21952@richard> Date: Tue, 5 Jun 2012 11:01:25 -0700 X-Google-Sender-Auth: 8N4IyKHpMsBn36VHmasfRiR7GWE Message-ID: Subject: Re: One problem in reassign pci bus number? From: Yinghai Lu To: Richard Yang , Bjorn Helgaas , Andrew Morton , Linus Torvalds Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: multipart/mixed; boundary=047d7b2ee18b8b4c1804c1bd701f Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 9319 Lines: 143 --047d7b2ee18b8b4c1804c1bd701f Content-Type: text/plain; charset=ISO-8859-1 On Mon, Jun 4, 2012 at 11:26 PM, Richard Yang wrote: > On Mon, Jun 04, 2012 at 04:36:33PM -0700, Yinghai Lu wrote: >> >>kernel will try to probe in [1,15] at first, and could extend B1 range >>to [1, 31] if needed. > Hmm... when do you think this branch will be merged to the mainstream? >> not sure. could be 3.7 Bjorn still think that probe_resource is too complicated. So i still need to find some time to simplify it. or need to route that attached patch through Andrew or get Ack from Andrew or Linus. Thanks Yinghai --047d7b2ee18b8b4c1804c1bd701f Content-Type: application/octet-stream; name="probe_resource_2.patch" Content-Disposition: attachment; filename="probe_resource_2.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_h339ybjz0 U3ViamVjdDogW1BBVENIXSByZXNv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X2xvY2spOworCQkJcmV0dXJuIHJl dDsKKwkJfQorCQlpZiAocGFyZW50X3Jlcy0+ZmxhZ3MgJiBzdG9wX2ZsYWdzKQorCQkJYnJlYWs7 CisJCXBhcmVudF9yZXMgPSBwYXJlbnRfcmVzLT5wYXJlbnQ7CisJfQorCityZWR1Y2VfbmVlZGVk X3NpemU6CisJd3JpdGVfdW5sb2NrKCZyZXNvdXJjZV9sb2NrKTsKKwkvKiByZXQgbXVzdCBub3Qg YmUgMCBoZXJlICovCisJbmVlZGVkX3NpemUtLTsKKwlpZiAobmVlZGVkX3NpemUpCisJCWdvdG8g YWdhaW47CisKKwlyZXR1cm4gcmV0OworfQorCiAvKgogICogTWFuYWdlZCByZWdpb24gcmVzb3Vy Y2UKICAqLwo= --047d7b2ee18b8b4c1804c1bd701f-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/