From: Pavel Machek <pavel@ucw.cz>
To: Anas Nashif <nashif@linux.intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Intel Management Engine Interface
Date: Fri, 23 May 2008 09:04:52 +0200 [thread overview]
Message-ID: <20080523070452.GA8193@ucw.cz> (raw)
In-Reply-To: <4832174A.20905@linux.intel.com>
Hi!
> The Intel Management Engine Interface (aka HECI: Host Embedded
> Controller Interface ) enables communication between the host OS and
> the Management Engine firmware. MEI is bi-directional, and either the
> host or Intel AMT firmware can initiate transactions.
* uses homebrewn DBG(), could it use dprintk() or something.
* should probably come with Documentation/ file
* defines like H_IE are a bit too terse.
> +extern const struct guid heci_pthi_guid;
> +extern const struct guid heci_wd_guid;
> +extern const __u8 start_wd_params[];
> +extern const __u8 stop_wd_params[];
> +extern const __u8 heci_wd_state_independence_msg[2][4];
Externs should go to header file.
No need to use __u8 in kernel.
Variables need good names. pthi_guid is not one of them.
> +/**
> + * memory IO BAR definition
> + */
> +#define BAR_0 0
> +#define BAR_1 1
> +#define BAR_5 5
Heh. And comments should tell us what it is.
Hmm, is this kerneldoc? Does not seem like one. So don't use /**. Fix
this all over the patch.
> +/**
> + * heci_fe_same_id - tell if file extensions have same id
> + * @fe1 -file extension
> + * @fe2 -file extension
> + *
> + * @return :
> + * 1 - if ids are the same,
> + * 0 - if differ.
> + */
File extensions?!
> +static inline int heci_fe_same_id(struct heci_file_private *fe1,
> + struct heci_file_private *fe2)
> +{
> + if ((fe1->host_client_id == fe2->host_client_id)
> + && (fe1->me_client_id == fe2->me_client_id)) {
> + return 1;
> + } else {
> + return 0;
> + }
> +}
This can be written without the if.
> +#endif /* _HECI_H_ */
> diff --git a/drivers/char/heci/heci_data_structures.h
> b/drivers/char/heci/heci_data_structures.h
> new file mode 100644
> index 0000000..ac0f488
> --- /dev/null
> +++ b/drivers/char/heci/heci_data_structures.h
> @@ -0,0 +1,507 @@
> +/*
> + * Part of Intel(R) Manageability Engine Interface Linux driver
> + *
> + * Copyright (c) 2003 - 2008 Intel Corp.
> + * All rights reserved.
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions
> + * are met:
> + * 1. Redistributions of source code must retain the above copyright
> + * notice, this list of conditions, and the following disclaimer,
> + * without modification.
> + * 2. Redistributions in binary form must reproduce at minimum a disclaimer
> + * substantially similar to the "NO WARRANTY" disclaimer below
> + * ("Disclaimer") and any redistribution must be conditioned upon
> + * including a substantially similar Disclaimer requirement for further
> + * binary redistribution.
> + * 3. Neither the names of the above-listed copyright holders nor the names
> + * of any contributors may be used to endorse or promote products derived
> + * from this software without specific prior written permission.
What kind of ninja mutant license is this?
> +/**
> + * Number of queue lists used by this driver
> + */
> +#define NUMBER_OF_LISTS 7
Yes, how very useful name. Plus, it is too generic and likely to
conflict with someone else.
> +#define IAMTHIF_MTU 4160
And this one seems encrypted.
> +
> +/**
> + * HECI HW Section
> + */
> +
> +/* HECI addresses and defines */
> +#define H_CB_WW 0
> +#define H_CSR 4
> +#define ME_CB_RW 8
> +#define ME_CSR_HA 0xC
As do this and registers below.
> +/**
> + * time to wait event
> + */
> +#define HECI_INTEROP_TIMEOUT (HZ * 7)
Could we get _useful_ comments?
> +/* File state */
> +enum file_state {
> + HECI_FILE_INITIALIZING = 0,
> + HECI_FILE_CONNECTING,
> + HECI_FILE_CONNECTED,
> + HECI_FILE_DISCONNECTING,
> + HECI_FILE_DISCONNECTED
> +};
What kind of files is this handling? Surely this is not a filesystem?
> +/* HECI states */
> +enum heci_states{
Missing space, and evil comment.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
next prev parent reply other threads:[~2008-05-23 7:05 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-20 0:11 [PATCH] Intel Management Engine Interface Anas Nashif
2008-05-20 0:28 ` Andrew Morton
2008-05-20 19:02 ` Gabriel C
2008-05-22 16:51 ` Pavel Machek
2008-05-20 15:42 ` Maxim Levitsky
2008-05-20 20:35 ` Carlos R. Mafra
2008-05-20 22:27 ` Jiri Slaby
2008-05-23 7:04 ` Pavel Machek [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-07-17 18:27 Marcin Obara
2008-07-18 0:00 ` Randy Dunlap
2008-07-18 5:44 ` Marcin Obara
2008-07-18 17:39 ` Marcin Obara
2008-07-18 19:23 ` Marcin Obara
2008-07-18 20:30 ` Marcin Obara
2008-07-23 18:00 ` Marcin Obara
2008-08-11 19:23 ` Marcin Obara
2008-08-12 4:53 ` Andrew Morton
2008-08-12 16:15 ` Jiri Slaby
2008-08-12 19:24 ` Marcin Obara
2008-08-12 19:24 ` Alan Cox
2008-08-12 21:03 ` Arjan van de Ven
2008-08-13 0:58 ` Greg KH
2008-08-13 7:16 ` Marcin Obara
2008-08-13 18:18 ` Greg KH
2008-08-13 19:48 ` Marcin Obara
2008-08-14 0:23 ` Greg KH
2008-07-18 9:27 ` Andi Kleen
2008-07-18 10:51 ` Marcin Obara
2008-07-18 11:02 ` Andi Kleen
2008-07-18 11:33 ` Marcin Obara
2008-08-06 16:56 ` Pavel Machek
2007-12-11 17:32 Anas Nashif
2007-12-11 18:14 ` Andi Kleen
2007-12-11 18:38 ` Anas Nashif
2007-12-11 18:53 ` Andi Kleen
2007-12-11 19:02 ` David Miller
2007-12-11 19:47 ` Andi Kleen
2007-12-11 19:06 ` Anas Nashif
2007-12-11 19:48 ` Andi Kleen
2007-12-12 15:00 ` Mark Lord
2007-12-12 16:17 ` Andi Kleen
2007-12-12 8:48 ` Alexander E. Patrakov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080523070452.GA8193@ucw.cz \
--to=pavel@ucw.cz \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nashif@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.