Frustrating few days here, unfortunately. I've been busily trying to get an SMC91111 Ethernet chip to emit a frame on to the network when I poke it, which is to all accounts much harder than it should be. At the moment, the Memory Management Unit and I are not on good terms.
Lemme asplain. If I want to send a frame, I have to ask the chip to allocate enough memory to hold it, transfer the data into the allocated memory, then set the transmit flag for that frame. The chip takes care of the rest. However, at the moment, conversations between the two of us look more like this (with apologies to Aquarion)
Me: OK, time to go. Initialise, please. Chip: Alright, hang on... ok, done. Gimme sommat to do. Me: Allocate a page of memory, please. Big enough to hold this frame. Chip: Uh... right. Done. Me: Can I have a pointer to that page, please? Chip: Here you go. It's a nice pointer. Got nice angles and a pretty paint-job. Me: ...right. Anyway, please put this frame in the page pointed to by the aforementioned lovely pointer. Chip: HAHAHAHAHAHAHAHAHA no. Me: But... you gave me that perfectly happily a minute ago. Chip: Dunno what you're talking about, guv'nor. Nothing there. Doesn't exist.
Repeat until bored. I've yet to figure out what's causing it: in the words of Thomas Edison, I've found more ways that don't work. I just wish I could pop non-solutions off the stack more quickly.