Older blog entries for dwmw2 (starting at number 29)

Advogato is useful, as ever - prumpf helped me answer yesterday's conundrum, and I'm now fairly settled on the locking setup that I'm going to use for flash chip access.

I even managed to locate some hardware so I can test my code a little more easily than it's set up at the moment, where I have to download a new kernel by xmodem, flash it and reboot, every time I want to change a line of code. Hopefully it'll arrive quite soon and I can be a little more productive.

Citroën don't want to pay for the hire car. What a surprise. Oh well, as long as I get my own back by the end of the week, and I don't have to pay anything for repairing the damage caused by the flaw it was shipped with, I can live with that.

Hmmm. Handling aliases of flash chips is far more of a pain in the arse than I'd expected, but I think it should be more or less working now.

Asynchronous operations on the flash chips are going to be interesting. The erase function is called with the address of a callback routine to be called when the requested erase is complete. The erase gets started, then a timer is scheduled to check whether it's finished or not at around the time we expect it to be done. The erase function returns immediately - most users of flash chips don't need to wait around for erases to happen.

We need a mutex of some kind to prevent that timer from trying to talk to the chip while other code is in the middle of writing data to somewhere else in the chip. (Also to prevent concurrent access on SMP systems)

A spinlock would mean I need spin_lock_bh() in the write() code, which doesn't actually exist in 2.2, and would disable bottom halves for quite a long time.

A semaphore is a possibility, obviously with down_trylock() in the timer code - but if the timer code fails to get the semaphore, what happens? Reschedule itself every jiffie until it _does_ succeed?

Alternatively, I could start a kernel thread for each chip to handle pending operations, and use either a spinlock or semaphore without trouble. But is that too much overhead?

I suspect I'll end up using timers and semaphores, if I can work out a race-free way for the timer to set a flag when it's failed to obtain the lock, so that the write() function can do the timer's job immediately after dropping the semaphore. That shouldn't be too difficult, as long as there's only one pending operation per chip, which for now should be a reasonable assumption to make.

Hmmm. Today has been a high-caffeine intake day.

Cool. Looks like Citroën will pay for the work on my car.

Amusingly, now that Citroën are meeting the bill, it's only going to be the cylinder head that's replaced - not the whole engine, which is what Marshalls previously wanted me to pay for :)

Do we smell a rat here?

I think I should be taking my car elsewhere in future.

What kind of fuckwit puts an automatic gearbox on a 1.0 litre engine?

If anyone reading this knows a Datsun engineer of the early eighties, preferably one to which you're not too emotionally attached, please could you send it to me? Me and my Mulgrips want a quiet word with it.

Urgh. Well the bad news is that my cam belt snapped and Marshalls reckon it'll cost about two grand to replace the engine. Upon prodding that it should only be a few bent valves and the engine shouldn't need replacing, they claimed that the value guides are likely to have cracked and it's as cheap to replace the engine as the cylinder head.

Strange, and not particularly believable, coming from them. Other estimates come in well below half that price.

The good news, however, is that while I was arranging to hire a van to take it elsewhere, Marshalls found out that it was in fact supposed to have been recalled because of a faulty cam belt - but never was. So Citroën may well pay for the fix, in which case I don't care how much Marshalls want to do it.

I also did a little bit of work today. Got the Common Flash Interface code working with multiple chips - although it doesn't yet notice when said 'multiple' chips are in fact just lots of aliases of the _same_ chip just at different addresses. I'll sort that one out tomorrow.

Urgh. While I'm waiting for my car to get better, I seem to have hired the worst car I've ever had the misfortune to have to drive - a vomit green automatic Nissan Micra, circa 1984. I've _bought_ better cars for half what it's costing me to hire this per week. Oh well, at least it goes, which is more than can be said for the Xantia at the moment.

Urgh. Connectivity from Spain is shite as ever. Tile factories aren't much fun either.

I've come down here to finish the on-site handover of the project I was managing for Axiom, and I've done the 2 hours that was required - now I have to sit about for another day before I'm allowed to fly home again - they were insistent that it'd take me two days - three with travelling.

Grrr.

OLS hotel booking appears to have worked. This is good.

It occurs to me that it's going to cost me about a grand, all told, for travel and hotel expenses - I definitely should have made it a condition of my employment. Oh well, as I'm still technically employed by Axiom until about the 23rd, I get paid twice this month, so fuck it.

Must get on with tidying up the chapter on device drivers which I'm writing for a Linux programming book. It was supposed to be in on Thursday, so I spent all Wednesday night finishing it and emailed it in around 9am, only to get a response saying "I'm not in the office till Monday". I was not a happy bunny, but at least it means I get to spend a little more time making some poor guinea pigs proofread it.

Still no word from BT on the HomeHighway installation which I requested last weekend. As I haven't heard from them, should I assume that they're actually going to turn up on Thursday morning, which is the appointment I requested? Surely any company with any clue or any respect for its customers would have called by now if they weren't going to make it?

Oh yeah - this it BT. Of course they won't be here.

Cool. Booked OLS and flights to it. Also attempted to book hotel. Hopefully it's not full.

Documentation is pissing me off.

Not that I have a problem with documentation per se, but I keep finding bugs and having to fix them before I can actually write the docs. Which slows me down somewhat.

Maybe I should just document it as "2.4 will be broken in this way, and this way, and that way" but I suppose I shouldn't :)

Yippee! I found the other flash chip on this board I'm playing with. Obviously it wasn't where the documentation said it would be - that would be too boring.

Now I can stop fucking up the firmware on the main chip - which was helpfully aliased at the location where the docs said the spare chip would be :)

Sent new SCSI card for ZenII off in a jiffy bag. Hopefully it will help it stop falling over.

20 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!