Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 256511
b: refs/heads/master
c: 1687b56
h: refs/heads/master
i:
  256509: a32ff93
  256507: 8570b51
  256503: 4074acd
  256495: ab526d2
  256479: 5d24490
  256447: 73f7a8b
  256383: 635bb61
  256255: 2ecb7d6
  255999: 8b6a99d
v: v3
  • Loading branch information
Francois Romieu committed Jul 19, 2011
1 parent 63d7298 commit 910d986
Show file tree
Hide file tree
Showing 11 changed files with 151 additions and 371 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 928ad22a3b033a994081dbf49f3c046195dd2349
refs/heads/master: 1687b56679880a47164ae149530abee543f9d6b1
9 changes: 6 additions & 3 deletions trunk/drivers/net/bnx2x/bnx2x.h
Original file line number Diff line number Diff line change
Expand Up @@ -966,8 +966,6 @@ struct bnx2x_slowpath {

union {
struct function_start_data func_start;
/* pfc configuration for DCBX ramrod */
struct flow_control_configuration pfc_config;
} func_rdata;

/* used by dmae command executer */
Expand All @@ -982,6 +980,8 @@ struct bnx2x_slowpath {

u32 wb_comp;
u32 wb_data[4];
/* pfc configuration for DCBX ramrod */
struct flow_control_configuration pfc_config;
};

#define bnx2x_sp(bp, var) (&bp->slowpath->var)
Expand Down Expand Up @@ -1104,7 +1104,7 @@ struct bnx2x {
#define BP_VN(bp) (BP_E1HVN(bp)) /*remove when approved*/
#define BP_L_ID(bp) (BP_E1HVN(bp) << 2)
#define BP_FW_MB_IDX(bp) (BP_PORT(bp) +\
BP_VN(bp) * ((CHIP_IS_E1x(bp) || (CHIP_MODE_IS_4_PORT(bp))) ? 2 : 1))
BP_VN(bp) * (CHIP_IS_E1x(bp) ? 2 : 1))

struct net_device *dev;
struct pci_dev *pdev;
Expand Down Expand Up @@ -1417,6 +1417,9 @@ struct bnx2x {
char fw_ver[32];
const struct firmware *firmware;

/* LLDP params */
struct bnx2x_config_lldp_params lldp_config_params;

/* DCB support on/off */
u16 dcb_state;
#define BNX2X_DCB_STATE_OFF 0
Expand Down
9 changes: 4 additions & 5 deletions trunk/drivers/net/bnx2x/bnx2x_cmn.c
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@ int bnx2x_rx_int(struct bnx2x_fastpath *fp, int budget)
/* non TPA */
len = le16_to_cpu(cqe_fp->pkt_len);
pad = cqe_fp->placement_offset;
dma_sync_single_for_cpu(&bp->pdev->dev,
dma_sync_single_for_device(&bp->pdev->dev,
dma_unmap_addr(rx_buf, mapping),
pad + RX_COPY_THRESH,
DMA_FROM_DEVICE);
Expand Down Expand Up @@ -1828,7 +1828,6 @@ int bnx2x_nic_load(struct bnx2x *bp, int load_mode)
rc = bnx2x_func_start(bp);
if (rc) {
BNX2X_ERR("Function start failed!\n");
bnx2x_fw_command(bp, DRV_MSG_CODE_LOAD_DONE, 0);
LOAD_ERROR_EXIT(bp, load_error3);
}

Expand Down Expand Up @@ -1989,9 +1988,6 @@ int bnx2x_nic_unload(struct bnx2x *bp, int unload_mode)
return -EINVAL;
}

/* Stop Tx */
bnx2x_tx_disable(bp);

#ifdef BCM_CNIC
bnx2x_cnic_notify(bp, CNIC_CTL_STOP_CMD);
#endif
Expand All @@ -2000,6 +1996,9 @@ int bnx2x_nic_unload(struct bnx2x *bp, int unload_mode)

bp->rx_mode = BNX2X_RX_MODE_NONE;

/* Stop Tx */
bnx2x_tx_disable(bp);

del_timer_sync(&bp->timer);

/* Set ALWAYS_ALIVE bit in shmem */
Expand Down
5 changes: 5 additions & 0 deletions trunk/drivers/net/bnx2x/bnx2x_cmn.h
Original file line number Diff line number Diff line change
Expand Up @@ -936,11 +936,16 @@ static inline int bnx2x_alloc_rx_skb(struct bnx2x *bp,
static inline void bnx2x_reuse_rx_skb(struct bnx2x_fastpath *fp,
u16 cons, u16 prod)
{
struct bnx2x *bp = fp->bp;
struct sw_rx_bd *cons_rx_buf = &fp->rx_buf_ring[cons];
struct sw_rx_bd *prod_rx_buf = &fp->rx_buf_ring[prod];
struct eth_rx_bd *cons_bd = &fp->rx_desc_ring[cons];
struct eth_rx_bd *prod_bd = &fp->rx_desc_ring[prod];

dma_sync_single_for_device(&bp->pdev->dev,
dma_unmap_addr(cons_rx_buf, mapping),
RX_COPY_THRESH, DMA_FROM_DEVICE);

dma_unmap_addr_set(prod_rx_buf, mapping,
dma_unmap_addr(cons_rx_buf, mapping));
prod_rx_buf->skb = cons_rx_buf->skb;
Expand Down
Loading

0 comments on commit 910d986

Please sign in to comment.