···155155#define NUM_RX_SGE_PAGES 2156156#define RX_SGE_CNT (BCM_PAGE_SIZE / sizeof(struct eth_rx_sge))157157#define MAX_RX_SGE_CNT (RX_SGE_CNT - 2)158158-/* RX_SGE_CNT is promissed to be a power of 2 */158158+/* RX_SGE_CNT is promised to be a power of 2 */159159#define RX_SGE_MASK (RX_SGE_CNT - 1)160160#define NUM_RX_SGE (RX_SGE_CNT * NUM_RX_SGE_PAGES)161161#define MAX_RX_SGE (NUM_RX_SGE - 1)···317317#define RCQ_BD(x) ((x) & MAX_RCQ_BD)318318319319320320-/* This is needed for determening of last_max */320320+/* This is needed for determining of last_max */321321#define SUB_S16(a, b) (s16)((s16)(a) - (s16)(b))322322323323#define __SGE_MASK_SET_BIT(el, bit) \···784784 u8 stats_pending;785785 u8 set_mac_pending;786786787787- /* End of fileds used in the performance code paths */787787+ /* End of fields used in the performance code paths */788788789789 int panic;790790 int msglevel;···10241024/* resolution of the rate shaping timer - 100 usec */10251025#define RS_PERIODIC_TIMEOUT_USEC 10010261026/* resolution of fairness algorithm in usecs -10271027- coefficient for clauclating the actuall t fair */10271027+ coefficient for calculating the actual t fair */10281028#define T_FAIR_COEF 1000000010291029/* number of bytes in single QM arbitration cycle -10301030- coeffiecnt for calculating the fairness timer */10301030+ coefficient for calculating the fairness timer */10311031#define QM_ARB_BYTES 4000010321032#define FAIR_MEM 210331033
···208208/*********************************************************209209 There are different blobs for each PRAM section.210210 In addition, each blob write operation is divided into a few operations211211- in order to decrease the amount of phys. contigious buffer needed.211211+ in order to decrease the amount of phys. contiguous buffer needed.212212 Thus, when we select a blob the address may be with some offset213213 from the beginning of PRAM section.214214 The same holds for the INT_TABLE sections.···336336 len = op->str_wr.data_len;337337 data = data_base + op->str_wr.data_off;338338339339- /* carefull! it must be in order */339339+ /* careful! it must be in order */340340 if (unlikely(op_type > OP_WB)) {341341342342 /* If E1 only */···740740 return crc_res;741741}742742743743-/* regiesers addresses are not in order743743+/* registers addresses are not in order744744 so these arrays help simplify the code */745745static const int cm_start[E1H_FUNC_MAX][9] = {746746 {MISC_FUNC0_START, TCM_FUNC0_START, UCM_FUNC0_START, CCM_FUNC0_START,
+2-2
drivers/net/bnx2x_link.h
···143143 u8 phy_addr, u8 devad, u16 reg, u16 val);144144145145/* Reads the link_status from the shmem,146146- and update the link vars accordinaly */146146+ and update the link vars accordingly */147147void bnx2x_link_status_update(struct link_params *input,148148 struct link_vars *output);149149/* returns string representing the fw_version of the external phy */···152152153153/* Set/Unset the led154154 Basically, the CLC takes care of the led for the link, but in case one needs155155- to set/unset the led unnatually, set the "mode" to LED_MODE_OPER to155155+ to set/unset the led unnaturally, set the "mode" to LED_MODE_OPER to156156 blink the led, and LED_MODE_OFF to set the led off.*/157157u8 bnx2x_set_led(struct bnx2x *bp, u8 port, u8 mode, u32 speed,158158 u16 hw_led_mode, u32 chip_id);
+12-12
drivers/net/bnx2x_main.c
···11511151 memset(fp->sge_mask, 0xff,11521152 (NUM_RX_SGE >> RX_SGE_MASK_ELEM_SHIFT)*sizeof(u64));1153115311541154- /* Clear the two last indeces in the page to 1:11551155- these are the indeces that correspond to the "next" element,11541154+ /* Clear the two last indices in the page to 1:11551155+ these are the indices that correspond to the "next" element,11561156 hence will never be indicated and should be removed from11571157 the calculations. */11581158 bnx2x_clear_sge_mask_next_elems(fp);···20112011 sum of vn_min_rates20122012 or20132013 0 - if all the min_rates are 0.20142014- In the later case fainess algorithm should be deactivated.20142014+ In the later case fairness algorithm should be deactivated.20152015 If not all min_rates are zero then those that are zeroes will20162016 be set to 1.20172017 */···21342134 FUNC_MF_CFG_MIN_BW_SHIFT) * 100;21352135 /* If FAIRNESS is enabled (not all min rates are zeroes) and21362136 if current min rate is zero - set it to 1.21372137- This is a requirment of the algorithm. */21372137+ This is a requirement of the algorithm. */21382138 if ((vn_min_rate == 0) && wsum)21392139 vn_min_rate = DEF_MIN_RATE;21402140 vn_max_rate = ((vn_cfg & FUNC_MF_CFG_MAX_BW_MASK) >>···65626562 val = REG_RD(bp, BRB1_REG_PORT_NUM_OCC_BLOCKS_0 + port*4);65636563 if (val)65646564 DP(NETIF_MSG_IFDOWN,65656565- "BRB1 is not empty %d blooks are occupied\n", val);65656565+ "BRB1 is not empty %d blocks are occupied\n", val);6566656665676567 /* TODO: Close Doorbell port? */65686568}···66026602 }66036603}6604660466056605-/* msut be called with rtnl_lock */66056605+/* must be called with rtnl_lock */66066606static int bnx2x_nic_unload(struct bnx2x *bp, int unload_mode)66076607{66086608 int port = BP_PORT(bp);···7455745574567456 if (BP_NOMCP(bp)) {74577457 /* only supposed to happen on emulation/FPGA */74587458- BNX2X_ERR("warning rendom MAC workaround active\n");74587458+ BNX2X_ERR("warning random MAC workaround active\n");74597459 random_ether_addr(bp->dev->dev_addr);74607460 memcpy(bp->dev->perm_addr, bp->dev->dev_addr, ETH_ALEN);74617461 }···89078907 if (!netif_running(dev))89088908 return;8909890989108910- /* offline tests are not suppoerted in MF mode */89108910+ /* offline tests are not supported in MF mode */89118911 if (IS_E1HMF(bp))89128912 etest->flags &= ~ETH_TEST_FL_OFFLINE;89138913···92169216 PCI_PM_CTRL_PME_STATUS));9217921792189218 if (pmcsr & PCI_PM_CTRL_STATE_MASK)92199219- /* delay required during transition out of D3hot */92199219+ /* delay required during transition out of D3hot */92209220 msleep(20);92219221 break;92229222···928992899290929092919291/* we split the first BD into headers and data BDs92929292- * to ease the pain of our fellow micocode engineers92929292+ * to ease the pain of our fellow microcode engineers92939293 * we use one mapping for both BDs92949294 * So far this has only been observed to happen92959295 * in Other Operating Systems(TM)···93969396 /* Check if LSO packet needs to be copied:93979397 3 = 1 (for headers BD) + 2 (for PBD and last BD) */93989398 int wnd_size = MAX_FETCH_BD - 3;93999399- /* Number of widnows to check */93999399+ /* Number of windows to check */94009400 int num_wnds = skb_shinfo(skb)->nr_frags - wnd_size;94019401 int wnd_idx = 0;94029402 int frag_idx = 0;···94989498 skb->ip_summed, skb->protocol, ipv6_hdr(skb)->nexthdr,94999499 ip_hdr(skb)->protocol, skb_shinfo(skb)->gso_type, xmit_type);9500950095019501- /* First, check if we need to linearaize the skb95019501+ /* First, check if we need to linearize the skb95029502 (due to FW restrictions) */95039503 if (bnx2x_pkt_req_lin(bp, skb, xmit_type)) {95049504 /* Statistics of linearization */
+9-9
drivers/net/bnx2x_reg.h
···66 * it under the terms of the GNU General Public License as published by77 * the Free Software Foundation.88 *99- * The registers description starts with the regsister Access type followed99+ * The registers description starts with the register Access type followed1010 * by size in bits. For example [RW 32]. The access types are:1111 * R - Read only1212 * RC - Clear on read···4949/* [RW 10] Write client 0: Assert pause threshold. */5050#define BRB1_REG_PAUSE_LOW_THRESHOLD_0 0x600685151#define BRB1_REG_PAUSE_LOW_THRESHOLD_1 0x6006c5252-/* [R 24] The number of full blocks occpied by port. */5252+/* [R 24] The number of full blocks occupied by port. */5353#define BRB1_REG_PORT_NUM_OCC_BLOCKS_0 0x600945454/* [RW 1] Reset the design by software. */5555#define BRB1_REG_SOFT_RESET 0x600dc···14121412#define MISC_REG_GPIO 0xa49014131413/* [R 28] this field hold the last information that caused reserved14141414 attention. bits [19:0] - address; [22:20] function; [23] reserved;14151415- [27:24] the master thatcaused the attention - according to the following14151415+ [27:24] the master that caused the attention - according to the following14161416 encodeing:1 = pxp; 2 = mcp; 3 = usdm; 4 = tsdm; 5 = xsdm; 6 = csdm; 7 =14171417 dbu; 8 = dmae */14181418#define MISC_REG_GRC_RSV_ATTN 0xa3c014191419/* [R 28] this field hold the last information that caused timeout14201420 attention. bits [19:0] - address; [22:20] function; [23] reserved;14211421- [27:24] the master thatcaused the attention - according to the following14211421+ [27:24] the master that caused the attention - according to the following14221422 encodeing:1 = pxp; 2 = mcp; 3 = usdm; 4 = tsdm; 5 = xsdm; 6 = csdm; 7 =14231423 dbu; 8 = dmae */14241424#define MISC_REG_GRC_TIMEOUT_ATTN 0xa3c4···23202320/* [RW 3] page size in L2P table for QM module; -4k; -8k; -16k; -32k; -64k;23212321 -128k */23222322#define PXP2_REG_RQ_QM_P_SIZE 0x12005023232323-/* [RW 1] 1' indicates that the RBC has finished configurating the PSWRQ */23232323+/* [RW 1] 1' indicates that the RBC has finished configuring the PSWRQ */23242324#define PXP2_REG_RQ_RBC_DONE 0x1201b023252325/* [RW 3] Max burst size filed for read requests port 0; 000 - 128B;23262326 001:256B; 010: 512B; 11:1K:100:2K; 01:4K */···24282428/* [RW 2] 0 - 128B; - 256B; - 512B; - 1024B; when the payload in the24292429 buffer reaches this number has_payload will be asserted */24302430#define PXP2_REG_WR_DMAE_MPS 0x1205ec24312431-/* [RW 10] if Number of entries in dmae fifo will be higer than this24312431+/* [RW 10] if Number of entries in dmae fifo will be higher than this24322432 threshold then has_payload indication will be asserted; the default value24332433 should be equal to > write MBS size! */24342434#define PXP2_REG_WR_DMAE_TH 0x120368···24492449/* [RW 2] 0 - 128B; - 256B; - 512B; - 1024B; when the payload in the24502450 buffer reaches this number has_payload will be asserted */24512451#define PXP2_REG_WR_TSDM_MPS 0x1205d424522452-/* [RW 10] if Number of entries in usdmdp fifo will be higer than this24522452+/* [RW 10] if Number of entries in usdmdp fifo will be higher than this24532453 threshold then has_payload indication will be asserted; the default value24542454 should be equal to > write MBS size! */24552455#define PXP2_REG_WR_USDMDP_TH 0x120348···33163316#define XSEM_XSEM_INT_MASK_0_REG_ADDRESS_ERROR_SIZE 033173317#define CFC_DEBUG1_REG_WRITE_AC (0x1<<4)33183318#define CFC_DEBUG1_REG_WRITE_AC_SIZE 433193319-/* [R 1] debug only: This bit indicates wheter indicates that external33193319+/* [R 1] debug only: This bit indicates whether indicates that external33203320 buffer was wrapped (oldest data was thrown); Relevant only when33213321 ~dbg_registers_debug_target=2 (PCI) & ~dbg_registers_full_mode=1 (wrap); */33223322#define DBG_REG_WRAP_ON_EXT_BUFFER 0xc12433233323#define DBG_REG_WRAP_ON_EXT_BUFFER_SIZE 133243324-/* [R 1] debug only: This bit indicates wheter the internal buffer was33243324+/* [R 1] debug only: This bit indicates whether the internal buffer was33253325 wrapped (oldest data was thrown) Relevant only when33263326 ~dbg_registers_debug_target=0 (internal buffer) */33273327#define DBG_REG_WRAP_ON_INT_BUFFER 0xc128