aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc/mcdi_pcol.h
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2012-09-18 21:46:37 -0400
committerBen Hutchings <bhutchings@solarflare.com>2012-09-18 21:54:11 -0400
commit576eda8b08e00cbb0cf29ba777c2cb461c98cbbc (patch)
tree673c305d7ec548cfa4bd06dd64a83f41c09404fe /drivers/net/ethernet/sfc/mcdi_pcol.h
parentc3cba721f1b761ca96f6fe437dec738db1069909 (diff)
sfc: Fix maximum array sizes for various MCDI commands
The maximum array sizes have been calculated on the basis of a maximum SDU size of 255 bytes, whereas the actual maximum is 252 bytes. Constructing a larger SDU will result in a BUG_ON in efx_mcdi_copyin. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'drivers/net/ethernet/sfc/mcdi_pcol.h')
-rw-r--r--drivers/net/ethernet/sfc/mcdi_pcol.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/net/ethernet/sfc/mcdi_pcol.h b/drivers/net/ethernet/sfc/mcdi_pcol.h
index db4beed97669..50389326bec8 100644
--- a/drivers/net/ethernet/sfc/mcdi_pcol.h
+++ b/drivers/net/ethernet/sfc/mcdi_pcol.h
@@ -491,12 +491,12 @@
491 491
492/* MC_CMD_GET_FPGAREG_OUT msgresponse */ 492/* MC_CMD_GET_FPGAREG_OUT msgresponse */
493#define MC_CMD_GET_FPGAREG_OUT_LENMIN 1 493#define MC_CMD_GET_FPGAREG_OUT_LENMIN 1
494#define MC_CMD_GET_FPGAREG_OUT_LENMAX 255 494#define MC_CMD_GET_FPGAREG_OUT_LENMAX 252
495#define MC_CMD_GET_FPGAREG_OUT_LEN(num) (0+1*(num)) 495#define MC_CMD_GET_FPGAREG_OUT_LEN(num) (0+1*(num))
496#define MC_CMD_GET_FPGAREG_OUT_BUFFER_OFST 0 496#define MC_CMD_GET_FPGAREG_OUT_BUFFER_OFST 0
497#define MC_CMD_GET_FPGAREG_OUT_BUFFER_LEN 1 497#define MC_CMD_GET_FPGAREG_OUT_BUFFER_LEN 1
498#define MC_CMD_GET_FPGAREG_OUT_BUFFER_MINNUM 1 498#define MC_CMD_GET_FPGAREG_OUT_BUFFER_MINNUM 1
499#define MC_CMD_GET_FPGAREG_OUT_BUFFER_MAXNUM 255 499#define MC_CMD_GET_FPGAREG_OUT_BUFFER_MAXNUM 252
500 500
501 501
502/***********************************/ 502/***********************************/
@@ -507,13 +507,13 @@
507 507
508/* MC_CMD_PUT_FPGAREG_IN msgrequest */ 508/* MC_CMD_PUT_FPGAREG_IN msgrequest */
509#define MC_CMD_PUT_FPGAREG_IN_LENMIN 5 509#define MC_CMD_PUT_FPGAREG_IN_LENMIN 5
510#define MC_CMD_PUT_FPGAREG_IN_LENMAX 255 510#define MC_CMD_PUT_FPGAREG_IN_LENMAX 252
511#define MC_CMD_PUT_FPGAREG_IN_LEN(num) (4+1*(num)) 511#define MC_CMD_PUT_FPGAREG_IN_LEN(num) (4+1*(num))
512#define MC_CMD_PUT_FPGAREG_IN_ADDR_OFST 0 512#define MC_CMD_PUT_FPGAREG_IN_ADDR_OFST 0
513#define MC_CMD_PUT_FPGAREG_IN_BUFFER_OFST 4 513#define MC_CMD_PUT_FPGAREG_IN_BUFFER_OFST 4
514#define MC_CMD_PUT_FPGAREG_IN_BUFFER_LEN 1 514#define MC_CMD_PUT_FPGAREG_IN_BUFFER_LEN 1
515#define MC_CMD_PUT_FPGAREG_IN_BUFFER_MINNUM 1 515#define MC_CMD_PUT_FPGAREG_IN_BUFFER_MINNUM 1
516#define MC_CMD_PUT_FPGAREG_IN_BUFFER_MAXNUM 251 516#define MC_CMD_PUT_FPGAREG_IN_BUFFER_MAXNUM 248
517 517
518/* MC_CMD_PUT_FPGAREG_OUT msgresponse */ 518/* MC_CMD_PUT_FPGAREG_OUT msgresponse */
519#define MC_CMD_PUT_FPGAREG_OUT_LEN 0 519#define MC_CMD_PUT_FPGAREG_OUT_LEN 0
@@ -560,7 +560,7 @@
560 560
561/* MC_CMD_PTP_IN_TRANSMIT msgrequest */ 561/* MC_CMD_PTP_IN_TRANSMIT msgrequest */
562#define MC_CMD_PTP_IN_TRANSMIT_LENMIN 13 562#define MC_CMD_PTP_IN_TRANSMIT_LENMIN 13
563#define MC_CMD_PTP_IN_TRANSMIT_LENMAX 255 563#define MC_CMD_PTP_IN_TRANSMIT_LENMAX 252
564#define MC_CMD_PTP_IN_TRANSMIT_LEN(num) (12+1*(num)) 564#define MC_CMD_PTP_IN_TRANSMIT_LEN(num) (12+1*(num))
565/* MC_CMD_PTP_IN_CMD_OFST 0 */ 565/* MC_CMD_PTP_IN_CMD_OFST 0 */
566/* MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */ 566/* MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
@@ -568,7 +568,7 @@
568#define MC_CMD_PTP_IN_TRANSMIT_PACKET_OFST 12 568#define MC_CMD_PTP_IN_TRANSMIT_PACKET_OFST 12
569#define MC_CMD_PTP_IN_TRANSMIT_PACKET_LEN 1 569#define MC_CMD_PTP_IN_TRANSMIT_PACKET_LEN 1
570#define MC_CMD_PTP_IN_TRANSMIT_PACKET_MINNUM 1 570#define MC_CMD_PTP_IN_TRANSMIT_PACKET_MINNUM 1
571#define MC_CMD_PTP_IN_TRANSMIT_PACKET_MAXNUM 243 571#define MC_CMD_PTP_IN_TRANSMIT_PACKET_MAXNUM 240
572 572
573/* MC_CMD_PTP_IN_READ_NIC_TIME msgrequest */ 573/* MC_CMD_PTP_IN_READ_NIC_TIME msgrequest */
574#define MC_CMD_PTP_IN_READ_NIC_TIME_LEN 8 574#define MC_CMD_PTP_IN_READ_NIC_TIME_LEN 8
@@ -1145,7 +1145,7 @@
1145 1145
1146/* MC_CMD_PUTS_IN msgrequest */ 1146/* MC_CMD_PUTS_IN msgrequest */
1147#define MC_CMD_PUTS_IN_LENMIN 13 1147#define MC_CMD_PUTS_IN_LENMIN 13
1148#define MC_CMD_PUTS_IN_LENMAX 255 1148#define MC_CMD_PUTS_IN_LENMAX 252
1149#define MC_CMD_PUTS_IN_LEN(num) (12+1*(num)) 1149#define MC_CMD_PUTS_IN_LEN(num) (12+1*(num))
1150#define MC_CMD_PUTS_IN_DEST_OFST 0 1150#define MC_CMD_PUTS_IN_DEST_OFST 0
1151#define MC_CMD_PUTS_IN_UART_LBN 0 1151#define MC_CMD_PUTS_IN_UART_LBN 0
@@ -1157,7 +1157,7 @@
1157#define MC_CMD_PUTS_IN_STRING_OFST 12 1157#define MC_CMD_PUTS_IN_STRING_OFST 12
1158#define MC_CMD_PUTS_IN_STRING_LEN 1 1158#define MC_CMD_PUTS_IN_STRING_LEN 1
1159#define MC_CMD_PUTS_IN_STRING_MINNUM 1 1159#define MC_CMD_PUTS_IN_STRING_MINNUM 1
1160#define MC_CMD_PUTS_IN_STRING_MAXNUM 243 1160#define MC_CMD_PUTS_IN_STRING_MAXNUM 240
1161 1161
1162/* MC_CMD_PUTS_OUT msgresponse */ 1162/* MC_CMD_PUTS_OUT msgresponse */
1163#define MC_CMD_PUTS_OUT_LEN 0 1163#define MC_CMD_PUTS_OUT_LEN 0
@@ -1947,12 +1947,12 @@
1947 1947
1948/* MC_CMD_NVRAM_READ_OUT msgresponse */ 1948/* MC_CMD_NVRAM_READ_OUT msgresponse */
1949#define MC_CMD_NVRAM_READ_OUT_LENMIN 1 1949#define MC_CMD_NVRAM_READ_OUT_LENMIN 1
1950#define MC_CMD_NVRAM_READ_OUT_LENMAX 255 1950#define MC_CMD_NVRAM_READ_OUT_LENMAX 252
1951#define MC_CMD_NVRAM_READ_OUT_LEN(num) (0+1*(num)) 1951#define MC_CMD_NVRAM_READ_OUT_LEN(num) (0+1*(num))
1952#define MC_CMD_NVRAM_READ_OUT_READ_BUFFER_OFST 0 1952#define MC_CMD_NVRAM_READ_OUT_READ_BUFFER_OFST 0
1953#define MC_CMD_NVRAM_READ_OUT_READ_BUFFER_LEN 1 1953#define MC_CMD_NVRAM_READ_OUT_READ_BUFFER_LEN 1
1954#define MC_CMD_NVRAM_READ_OUT_READ_BUFFER_MINNUM 1 1954#define MC_CMD_NVRAM_READ_OUT_READ_BUFFER_MINNUM 1
1955#define MC_CMD_NVRAM_READ_OUT_READ_BUFFER_MAXNUM 255 1955#define MC_CMD_NVRAM_READ_OUT_READ_BUFFER_MAXNUM 252
1956 1956
1957 1957
1958/***********************************/ 1958/***********************************/
@@ -1963,7 +1963,7 @@
1963 1963
1964/* MC_CMD_NVRAM_WRITE_IN msgrequest */ 1964/* MC_CMD_NVRAM_WRITE_IN msgrequest */
1965#define MC_CMD_NVRAM_WRITE_IN_LENMIN 13 1965#define MC_CMD_NVRAM_WRITE_IN_LENMIN 13
1966#define MC_CMD_NVRAM_WRITE_IN_LENMAX 255 1966#define MC_CMD_NVRAM_WRITE_IN_LENMAX 252
1967#define MC_CMD_NVRAM_WRITE_IN_LEN(num) (12+1*(num)) 1967#define MC_CMD_NVRAM_WRITE_IN_LEN(num) (12+1*(num))
1968#define MC_CMD_NVRAM_WRITE_IN_TYPE_OFST 0 1968#define MC_CMD_NVRAM_WRITE_IN_TYPE_OFST 0
1969/* Enum values, see field(s): */ 1969/* Enum values, see field(s): */
@@ -1973,7 +1973,7 @@
1973#define MC_CMD_NVRAM_WRITE_IN_WRITE_BUFFER_OFST 12 1973#define MC_CMD_NVRAM_WRITE_IN_WRITE_BUFFER_OFST 12
1974#define MC_CMD_NVRAM_WRITE_IN_WRITE_BUFFER_LEN 1 1974#define MC_CMD_NVRAM_WRITE_IN_WRITE_BUFFER_LEN 1
1975#define MC_CMD_NVRAM_WRITE_IN_WRITE_BUFFER_MINNUM 1 1975#define MC_CMD_NVRAM_WRITE_IN_WRITE_BUFFER_MINNUM 1
1976#define MC_CMD_NVRAM_WRITE_IN_WRITE_BUFFER_MAXNUM 243 1976#define MC_CMD_NVRAM_WRITE_IN_WRITE_BUFFER_MAXNUM 240
1977 1977
1978/* MC_CMD_NVRAM_WRITE_OUT msgresponse */ 1978/* MC_CMD_NVRAM_WRITE_OUT msgresponse */
1979#define MC_CMD_NVRAM_WRITE_OUT_LEN 0 1979#define MC_CMD_NVRAM_WRITE_OUT_LEN 0
@@ -2305,13 +2305,13 @@
2305 2305
2306/* MC_CMD_GET_PHY_MEDIA_INFO_OUT msgresponse */ 2306/* MC_CMD_GET_PHY_MEDIA_INFO_OUT msgresponse */
2307#define MC_CMD_GET_PHY_MEDIA_INFO_OUT_LENMIN 5 2307#define MC_CMD_GET_PHY_MEDIA_INFO_OUT_LENMIN 5
2308#define MC_CMD_GET_PHY_MEDIA_INFO_OUT_LENMAX 255 2308#define MC_CMD_GET_PHY_MEDIA_INFO_OUT_LENMAX 252
2309#define MC_CMD_GET_PHY_MEDIA_INFO_OUT_LEN(num) (4+1*(num)) 2309#define MC_CMD_GET_PHY_MEDIA_INFO_OUT_LEN(num) (4+1*(num))
2310#define MC_CMD_GET_PHY_MEDIA_INFO_OUT_DATALEN_OFST 0 2310#define MC_CMD_GET_PHY_MEDIA_INFO_OUT_DATALEN_OFST 0
2311#define MC_CMD_GET_PHY_MEDIA_INFO_OUT_DATA_OFST 4 2311#define MC_CMD_GET_PHY_MEDIA_INFO_OUT_DATA_OFST 4
2312#define MC_CMD_GET_PHY_MEDIA_INFO_OUT_DATA_LEN 1 2312#define MC_CMD_GET_PHY_MEDIA_INFO_OUT_DATA_LEN 1
2313#define MC_CMD_GET_PHY_MEDIA_INFO_OUT_DATA_MINNUM 1 2313#define MC_CMD_GET_PHY_MEDIA_INFO_OUT_DATA_MINNUM 1
2314#define MC_CMD_GET_PHY_MEDIA_INFO_OUT_DATA_MAXNUM 251 2314#define MC_CMD_GET_PHY_MEDIA_INFO_OUT_DATA_MAXNUM 248
2315 2315
2316 2316
2317/***********************************/ 2317/***********************************/