Messages in this thread | | | Date | Mon, 14 Feb 2000 10:18:46 -0500 (EST) | From | William Stearns <> | Subject | Re: Linux kernel 2.3.34+ patch: serious bug in cs.c breaks pcnet_cs, etc. |
| |
Good morning, Matt, Bingo! I had been seeing the "Bad Handle" messages from the kernel pcmcia implementation for a number of kernels now. Even when I could get the kernel to compile at all, I'd insert the pcmcia card, ifconfig up the ne2000 interface, and as soon as I tried to send the first packet the entire system froze - even keyboard and mouse hung. But it came back to life immediately when I ejected the card. Your fix, whether it's the "right" one or not, lets me use 2.3.45 with that card successfully, no complaints from dmesg about Bad Handle anymore. One more note - I also needed to use Jan Kasprzak's "Patch: drivers/pcmcia/cs.c w/o CONFIG_CARDBUS" patch to get it to compile with my non-cardbus system. Many thanks to you both! Cheers, - Bill
On Sun, 13 Feb 2000, Matt Yourst wrote:
> I've been trying out recent 2.3.x kernel builds and have found a serious but > subtle bug in the PCMCIA code. Between 2.3.33 and 2.3.34, a couple of changes > were made to the CardServices() function in drivers/pcmcia/cs.c to interface > differently with other functions (in particular, pcmcia_request_window, etc.) > However, it appears that a syntax typo didn't preserve the original interface, > so drivers like pcnet_cs (in my case, possibly others) started to malfunction in > very strange ways (i.e., pcnet_cs read from a bad packet window in random cases > since it didn't get the window handle from CardServices that it should have.) > Here's a patch that fixes this problem (which has remained since 2.3.34): > > From the old cs.c to the fixed cs.c (patch was on 2.3.43): > > 2191c2191 > < (memory_handle_t *)a1 = m; > --- > > *((memory_handle_t *)a1) = m; > 2205c2205 > < (eraseq_handle_t *)a1 = w; > --- > > *((eraseq_handle_t *)a1) = w; > 2230c2230 > < (window_handle_t *)a1 = w; > --- > > *((window_handle_t *)a1) = w; > > This problem appeared in a number of places in CardServices(), so other > less-tested drivers may also malfunction under certain circumstances. If this > does indeed fix the problem as it appears to, I'm glad I could contribute it > (and good luck merging it into the kernel source.)
--------------------------------------------------------------------------- "Eagles may soar, high and proud, but weasels don't get sucked into jet engines." (Courtesy of Mike Andrews <mandrews@termfrost.org>) -------------------------------------------------------------------------- William Stearns (wstearns@pobox.com). Mason, Buildkernel, named2hosts, and ipfwadm2ipchains are at: http://www.pobox.com/~wstearns/ --------------------------------------------------------------------------
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |