From owner-freebsd-hackers@freebsd.org Wed Aug 9 17:20:28 2017 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 3D6A9DD1860 for ; Wed, 9 Aug 2017 17:20:28 +0000 (UTC) (envelope-from datasmurf@mail.ru) Received: from fallback.mail.ru (fallback15.m.smailru.net [94.100.179.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D6DBE7DA45 for ; Wed, 9 Aug 2017 17:20:26 +0000 (UTC) (envelope-from datasmurf@mail.ru) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mail.ru; s=mail2; h=Content-Transfer-Encoding:Content-Type:Mime-Version:References:In-Reply-To:Message-Id:Subject:Cc:To:From:Date; bh=3oHMZoxGUwZCqnHQcvUN33zi2cp6xkKDLgJLyUHpZo8=; b=imDTd0u8aBaCkD9fME8B/BwZIRslXeyFTj+5/Uou48dcy2zLlLE2ZYIR4vuPHR2NOFbg77NYru7DuHRfrjOROeHS4A0kujujFlPy/wexXjo3zkJQPh0x4Sv87l7HpS7vnEvGnMJBrod3nZoIlpUDdCG5VFx6wqIHuRuVWdcUGeo=; Received: from [10.161.64.44] (port=48610 helo=smtp36.i.mail.ru) by fallback15.m.smailru.net with esmtp (envelope-from ) id 1dfUeb-00076m-GT for freebsd-hackers@freebsd.org; Wed, 09 Aug 2017 20:20:21 +0300 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mail.ru; s=mail2; h=Content-Transfer-Encoding:Content-Type:Mime-Version:References:In-Reply-To:Message-Id:Subject:Cc:To:From:Date; bh=3oHMZoxGUwZCqnHQcvUN33zi2cp6xkKDLgJLyUHpZo8=; b=imDTd0u8aBaCkD9fME8B/BwZIRslXeyFTj+5/Uou48dcy2zLlLE2ZYIR4vuPHR2NOFbg77NYru7DuHRfrjOROeHS4A0kujujFlPy/wexXjo3zkJQPh0x4Sv87l7HpS7vnEvGnMJBrod3nZoIlpUDdCG5VFx6wqIHuRuVWdcUGeo=; Received: by smtp36.i.mail.ru with esmtpa (envelope-from ) id 1dfUeS-0000ab-3t; Wed, 09 Aug 2017 20:20:12 +0300 Date: Wed, 9 Aug 2017 19:18:29 +0200 From: Datasmurf To: Farhan Khan Cc: freebsd-hackers@freebsd.org Subject: Re: PCI bus detaching when driver crashing? Message-Id: <20170809191829.4c541da5313af503ef3f470f@mail.ru> In-Reply-To: References: X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; amd64-portbld-freebsd11.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-7FA49CB5: 0D63561A33F958A5379F90975EC21C89CBEF2C082954B51DDE279ACE2C80A6DC725E5C173C3A84C3777F8C72A04D893BF14DAC2CF4D7C772834E4788B0B27831C4224003CC836476C0CAF46E325F83A50BF2EBBBDD9D6B0F2EF91E2201DEA5EC574AF45C6390F7469DAA53EE0834AAEE X-Mailru-Sender: 620CA5946F1319E26837F971D57E01D22E9BE864D95A594542248D9F6949E006F817479B9098B06449070C57D405204EDA8FEABC02D41E1BE882F7789A3AA0D09AFAE9D0B87C27BAB91D000EF664C42CB93E98C39DA16A030DA7A0AF5A3A8387 X-Mras: OK X-7FA49CB5: 0D63561A33F958A51461E51021335F656B6E1F6BE23E281D4549B87D7E2FAE42462275124DF8B9C910FF24F588AC80D2BD9CCCA9EDD067B1EDA766A37F9254B7 X-Mailru-Sender: A5480F10D64C9005E7955441BDF8626595C11B680804F265159231F51B0C43CCC655969879B08F7949070C57D405204EDA8FEABC02D41E1BE882F7789A3AA0D09AFAE9D0B87C27BAB91D000EF664C42CB93E98C39DA16A030DA7A0AF5A3A8387 X-Mras: OK X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Aug 2017 17:20:28 -0000 On Thu, 3 Aug 2017 22:17:17 -0400 Farhan Khan wrote: > Hi all, > > I am trying to write the Realtek 8188e (pci) driver for FreeBSD. I am > making slow incremental progress, and having the driver safely exit > out (as opposed to a segfault). I noticed that when the device > detaches, due to an error in the driver, the entire pci bus will also > detach! For example, here is my kernel output: > > rtwn0: rtwn_load_firmware: failed to upload firmware rtwn-rtl8188eefw > (error 60) > rtwn0: detached > pci2: detached I have/had seen similar errors with my Hardware. T61 with Pro/Wireless 4965AGN and the if_iwn driver. I get Firmware error and then from time to time the pci bus gets detached as well. But i did not think of it as a Problem of the driver or code but of my faulty old Hardware. I have to reboot to get it working. Sorry at the moment i have no log about it. Uptime is 2 days since upgrading to 11.1 Release. > > The first line is where the code crashes: sys/dev/rtwn/if_rtwn_fw.c > line 129 > https://github.com/khanzf/freebsd/blob/103c05369b1ced770a2cadc9468e0134c8d9421b/sys/dev/rtwn/if_rtwn_fw.c#L129 > 404 > Why would this result in the entire pci2 bus detatching? Strangely > enough, I did not have this problem a few months ago, then it > suddenly began. This is significantly slowing down my workflow, and > would be nice to have it resolved. Otherwise, I have to reboot to > bring pci2 back up. > > Any insight? > Thanks! > > Farhan Khan > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to > "freebsd-hackers-unsubscribe@freebsd.org" Greetings Daniel -- #irc - real netizens last resort