Skip to content

Bitte ein Happy Meal mit Pommes

Ich finde ja, dass jeder ein paar ausgedruckte Kernelquellen zur Abendlektüre mit ins Bett nehmen sollte. Falls man kein C kann, so finden sich in den Kommentaren immer wieder sehr interessante Sachen. Derartiges hat auch Jörn aufgetrieben:

static void happy_meal_tcvr_write(struct happy_meal *hp,
                                  void __iomem *tregs, int reg,
                                  unsigned short value)
{
        int tries = TCVR_WRITE_TRIES;
        ASD((“happy_meal_tcvr_write: reg=0x%02x value=%04x\n”, reg, value));
        /* Welcome to Sun Microsystems, can I take your order please? */
        if (!(hp->happy_flags & HFLAG_FENABLE)) {
                happy_meal_bb_write(hp, tregs, reg, value);
                return;
        }
        /* Would you like fries with that? */
        hme_write32(hp, tregs + TCVR_FRAME,
                    (FRAME_WRITE | (hp->paddr << 23) |
                     ((reg & 0xff) << 18) | (value & 0xffff)));
        while (!(hme_read32(hp, tregs + TCVR_FRAME) & 0x10000) && --tries)
                udelay(20);
        /* Anything else? */
        if (!tries)
                printk(KERN_ERR "happy meal: Aieee, transceiver MIF write bolixed\n");
        /* Fifty-two cents is your change, have a nice day. */
}

Trackbacks

No Trackbacks

Comments

Display comments as Linear | Threaded

No comments

Add Comment

Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
Standard emoticons like :-) and ;-) are converted to images.
BBCode format allowed
E-Mail addresses will not be displayed and will only be used for E-Mail notifications.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA

Form options
tweetbackcheck