« Technically Speaking | Main | Morality »

January 04, 2005

Happy Meal Ethernet

Over at Read My Lips, Tig wants to know:

Here's a question for which no amount of Google searchin' could disclose an answer: Can a McDonald's "Happy Meal" really make ya happy?

Short answer - No. Although I note that someone suggested that it works if you are between 3 and 6 years old :-)

In the process it made me remember the infamous story about the Sun hme interface. I'll try and avoid too much technical detail while still getting the story right. In a Unix system (like Sun's Solaris boxes), all the physical devices have short names in the kernel and the device tree. The oldest Sun ethernet interface that I can remember is the Lance Ethernet (short name: "le"). This was later replaced pretty much everywhere with the "hme" interface which was rumoured to be 'Happy Meal Ethernet'. One theory is that this stemmed from the dual scsi/ethernet controllers (i.e. you get 'free' ethernet with your scsi or vice versa) but I seem to remember it appearing as an onboard interface before it was on expansion cards. According to a series of posts (to identify weird kernel code) over at the joke is also extended to the relevant kernel code:

How about drivers/net/sunhme.c ?

It's not scary, but it is absolutely hilarious, even to people who don't even know C.

static void happy_meal_tcvr_write(struct happy_meal *hp, unsigned long ...) { int tries = TCVR_WRITE_TRIES; ASD(("happy_meal_tcvr_write: reg=0x%02x value=%04xn", reg, value)); /* Welcome to Sun Microsystems, can I take your order please? */ if (!hp->happy_flags & HFLAG_FENABLE) return happy_meal_bb_write(hp, tregs, reg, value); /* Would you like fries with that? */ hme_write32(hp, tregs + TCVR_FRAME, (FRAME_WRITE | (hp->paddr ...

It is possible that the code came after the funny name - you never know with code...

Posted by Ozguru at January 4, 2005 06:00 AM