Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Jan 2003 10:57:00 -0800 (PST)
From:      Nate Lawson <nate@root.org>
To:        current@freebsd.org
Cc:        ryan beasley <ryanb@goddamnbastard.org>, rwatson@freebsd.org
Subject:   if_dc attach patch
Message-ID:  <Pine.BSF.4.21.0301081025220.18125-200000@root.org>
In-Reply-To: <20030104074914.GS311@goddamnbastard.org>

next in thread | previous in thread | raw e-mail | index | archive | help
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime@docserver.cac.washington.edu for more info.

--0-1499452765-1042052220=:18125
Content-Type: TEXT/PLAIN; charset=US-ASCII

Here is an updated patch for dc.  Can you try it?
* Remove bogus locking
* Move intr setup, ether_ifattach to end
* add proper resource freeing to a case that missed it (!mac)
* update resource freeing for error cases after intr move

-Nate

--0-1499452765-1042052220=:18125
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="dc_attach.diff"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.BSF.4.21.0301081057000.18125@root.org>
Content-Description: 
Content-Disposition: attachment; filename="dc_attach.diff"

SW5kZXg6IGlmX2RjLmMNCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NClJDUyBm
aWxlOiAvaG9tZS9uY3ZzL3NyYy9zeXMvcGNpL2lmX2RjLmMsdg0KcmV0cmll
dmluZyByZXZpc2lvbiAxLjg1DQpkaWZmIC11IC1yMS44NSBpZl9kYy5jDQot
LS0gaWZfZGMuYwkyNyBOb3YgMjAwMiAwNzowNDoxMCAtMDAwMAkxLjg1DQor
KysgaWZfZGMuYwk4IEphbiAyMDAzIDE4OjQ5OjIyIC0wMDAwDQpAQCAtMTky
NywxMyArMTkyNywxMyBAQA0KIAlpZiAoIShjb21tYW5kICYgUENJTV9DTURf
UE9SVEVOKSkgew0KIAkJcHJpbnRmKCJkYyVkOiBmYWlsZWQgdG8gZW5hYmx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wkJYnVzX3JlbGVhc2VfcmVzb3VyY2UoZGV2LCBT
WVNfUkVTX0lSUSwgMCwgc2MtPmRjX2lycSk7DQorCQlidXNfcmVsZWFzZV9y
ZXNvdXJjZShkZXYsIERDX1JFUywgRENfUklELCBzYy0+ZGNfcmVzKTsNCisJ
CXByaW50ZigiZGMlZDogY291bGRuJ3Qgc2V0IHVwIGlycVxuIiwgdW5pdCk7
DQorCX0NCiANCiBmYWlsOg0KLQlEQ19VTkxPQ0soc2MpOw0KLWZhaWxfbm9s
b2NrOg0KLQltdHhfZGVzdHJveSgmc2MtPmRjX210eCk7DQotCXJldHVybihl
cnJvcik7DQorCWlmIChlcnJvciAhPSAwKQ0KKwkJbXR4X2Rlc3Ryb3koJnNj
LT5kY19tdHgpOw0KKwlyZXR1cm4gKGVycm9yKTsNCiB9DQogDQogc3RhdGlj
IGludA0K
--0-1499452765-1042052220=:18125--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0301081025220.18125-200000>