Date: Wed, 12 Dec 2007 00:20:02 GMT From: Goran <goran.tal@gmail.com> To: freebsd-bugs@FreeBSD.org Subject: Re: kern/115623: [dc] Xircom CardBus Ethernet II 10/100 Adapter (CBE2-100) doesn't work Message-ID: <200712120020.lBC0K26r082208@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/115623; it has been noted by GNATS. From: Goran <goran.tal@gmail.com> To: bug-followup@FreeBSD.org Cc: Subject: Re: kern/115623: [dc] Xircom CardBus Ethernet II 10/100 Adapter (CBE2-100) doesn't work Date: Tue, 11 Dec 2007 18:39:12 -0500 ------=_Part_24357_11727423.1197416352633 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline The same problem is with 7.0-Beta4. It fails to read CIS from option ROM. I was able to fix it by reverting to the code from 6.3-RC1 that checks the size before allocating the memory. This is the minimal set of changes that makes it work again. ------=_Part_24357_11727423.1197416352633 Content-Type: text/x-diff; name=cardbus_cis.c.diff Content-Transfer-Encoding: base64 X-Attachment-Id: file0 Content-Disposition: attachment; filename=cardbus_cis.c.diff LS0tIHNyYy9zeXMvZGV2L2NhcmRidXMvY2FyZGJ1c19jaXMuY34JMjAwNy0wNi0wOCAwMDowMzo1 Ny4wMDAwMDAwMDAgLTA0MDAKKysrIHNyYy9zeXMvZGV2L2NhcmRidXMvY2FyZGJ1c19jaXMuYwky MDA3LTEyLTA5IDE2OjIwOjI2LjAwMDAwMDAwMCAtMDUwMApAQCAtNDM1LDEwICs0MzUsMTEgQEAK ICAgICBzdHJ1Y3QgcmVzb3VyY2UgKnJlcykKIHsKIAlpZiAocmVzICE9IENJU19DT05GSUdfU1BB Q0UpIHsKLQkJYnVzX3JlbGVhc2VfcmVzb3VyY2UoY2hpbGQsIFNZU19SRVNfTUVNT1JZLCByaWQs IHJlcyk7CisJCWJ1c19yZWxlYXNlX3Jlc291cmNlKGNiZGV2LCBTWVNfUkVTX01FTU9SWSwgcmlk LCByZXMpOwogCQlpZi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8IFJGX0FDVElWRSk7CiAJaWYgKHJlcyA9PSBOVUxMKSB7CiAJCWRl dmljZV9wcmludGYoY2JkZXYsICJVbmFibGUgdG8gYWxsb2NhdGUgcmVzb3VyY2UgIgogCQkgICAg InRvIHJlYWQgQ0lTLlxuIik7CkBAIC00ODgsNiArNDk0LDcgQEAKIAlpZiAoKnJpZCA9PSBQQ0lS X0JJT1MpCiAJCXBjaV93cml0ZV9jb25maWcoY2hpbGQsICpyaWQsCiAJCSAgICBybWFuX2dldF9z dGFydChyZXMpIHwgUENJTV9CSU9TX0VOQUJMRSwgNCk7CisJUENJX0VOQUJMRV9JTyhjYmRldiwg Y2hpbGQsIFNZU19SRVNfTUVNT1JZKTsKIAogCS8qIEZsaXAgdG8gdGhlIHJpZ2h0IFJPTSBpbWFn ZSBpZiBDSVMgaXMgaW4gUk9NICovCiAJaWYgKHNwYWNlID09IFBDSU1fQ0lTX0FTSV9ST00pIHsK ------=_Part_24357_11727423.1197416352633--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200712120020.lBC0K26r082208>