[Skiboot] [PATCH] hw/bt: allow BT driver to use different buffer size

Stewart Smith stewart at linux.vnet.ibm.com
Tue Mar 8 19:14:57 AEDT 2016


Cédric Le Goater <clg at fr.ibm.com> writes:
> The buffer size used by the BT driver defaults to 64bytes even when
> the BMC reports a different size. This patch removes the restriction
> as there is no apparent reason for it.
>
> The extra byte added on the input and output buffer size in the test
> also seems superfluous. The buffer lengths used later in the code are
> correct as they take into account the extra byte needed for the
> message size :
>
> 	bt.caps.input_buf_len = msg->data[1] + 1;
> 	bt.caps.output_buf_len = msg->data[2] + 1;
>
>
> From IPMI Specs:
>
>     22.10 Get BT Interface Capabilities Command
>
>     For Bytes 3 and 4 (Input and Output Buffer size), the buffer
>     message size is the largest value allowed in first byte (length
>     field) of any BT request or response message. For a send, this
>     means if Get BT Interface Capabilities returns 255 in byte 3
>     (input buffer size) the driver can actually write 256 bytes to the
>     input buffer (adding one for the length byte (byte 1) that is sent
>     in with the request.)
>
>
> Signed-off-by: Cédric Le Goater <clg at fr.ibm.com>
> ---
>
>  Tested on palmetto which uses a 64bytes fifo and qemu which uses
>  255bytes.
>
>  hw/bt.c |    6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)

After having read even more of the IPMI spec than I ever thought I'd be
doing, and testing on habanero, looks good and merged to master as of 4eb9807.

-- 
Stewart Smith
OPAL Architect, IBM.



More information about the Skiboot mailing list