lkml.org 
[lkml]   [2006]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 11/12] IPMI: Fix BT long busy
On Fri, 1 Dec 2006 22:39:21 -0600
Corey Minyard <minyard@acm.org> wrote:

>
> The IPMI BT subdriver has been patched to survive "long busy"
> timeouts seen during firmware upgrades and resets. The patch
> never returns the HOSED state, synthesizes response messages with
> meaningful completion codes, and recovers gracefully when the
> hardware finishes the long busy. The subdriver now issues a "Get BT
> Capabilities" command and properly uses those results.
> More informative completion codes are returned on error from
> transaction starts; this logic was propogated to the KCS and
> SMIC subdrivers. Finally, indent and other style quirks were
> normalized.
>
> ...
>
> + BT_CONTROL(BT_CLR_WR_PTR); /* always reset */

argh.

#define BT_STATUS bt->io->inputb(bt->io, 0)
#define BT_CONTROL(x) bt->io->outputb(bt->io, 0, x)

#define BMC2HOST bt->io->inputb(bt->io, 1)
#define HOST2BMC(x) bt->io->outputb(bt->io, 1, x)

#define BT_INTMASK_R bt->io->inputb(bt->io, 2)
#define BT_INTMASK_W(x) bt->io->outputb(bt->io, 2, x)

Please don't write macros which require that the caller have a particular
local variable of a particular name.

In fact, please don't write macros.

All the above would be perfectly nice as

static inline void bt_control(struct si_sm_data *bt, int val)
{
bt->io->outputb(bt->io, val);
}


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-12-03 22:31    [W:0.031 / U:2.444 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site