Date: Mon, 17 May 2004 13:36:32 +0200 From: "Carlos Velasco" <freebsd@newipnet.com> To: "M. Warner Losh" <imp@bsdimp.com> Cc: freebsd-mobile@freebsd.org Subject: Re[2]: Modem + Network in Xircom cards, and maybe others Message-ID: <200405171336320804.080CD05E@192.168.128.16> In-Reply-To: <20040505.155926.128442915.imp@bsdimp.com> References: <200405051311330554.1F584985@192.168.128.16> <20040505233435.B15444@gamplex.bde.org> <200405051746300245.2039F9A4@192.168.128.16> <20040505.155926.128442915.imp@bsdimp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--=====_108479379229275=_ Content-Type: text/plain; charset="us-ascii" On 05/05/2004 at 15:59 M. Warner Losh wrote: >In message: <200405051746300245.2039F9A4@192.168.128.16> > "Carlos Velasco" <freebsd@newipnet.com> writes: >: I'm patching it to activate both functions (usually modem/serial and >: network). >: Network is in xe driver, however I'm passing modem to sio. >: It works, however sio reports interrupt-level buffer overflows when I'm >: above 2400bps, losing characters, and here is where I'm lost. > >I don't think you are getting interrupts like you should. Warner, I think my patch is ok, problem is related to sio in normal mode (i think). Aplying a last patch into sio.c makes my xircom modem work perfectly. Have you tested other 16 bits cards? I'm attaching my last complete patch. Regards, Carlos Velasco --=====_108479379229275=_ Content-Type: application/octet-stream; name="xircom_2.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="xircom_2.patch" ZGlmZiAtcnUgc3lzL2Rldi9wY2NhcmQvcGNjYXJkLmMgc3lzbmV3L2Rldi9w Y2NhcmQvcGNjYXJkLmMKLS0tIHN5cy9kZXYvcGNjYXJkL3BjY2FyZC5jCVdl ZCBNYXIgMTcgMTc6NTA6MzggMjAwNAorKysgc3lzbmV3L2Rldi9wY2NhcmQv cGNjYXJkLmMJU2F0IE1heSAgMSAwOTo0Nzo1NyAyMDA0CkBAIC05NTUsOCAr OTU1LDggQEAKIAlzdHJ1Y3QgcGNjYXJkX3NvZnRjICpzYyA9IFBDQ0FSRF9T T0ZUQyhidXMpOwogCiAJZGV2a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VTEwpCiAJCXJldHVybiAoMCk7Ci0KIAlyZXR1 cm4gKEVJTyk7CiB9CiAK --=====_108479379229275=_--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200405171336320804.080CD05E>