Commit 37cf9516 authored by Linus Torvalds's avatar Linus Torvalds

Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
  mscan: too much data copied to CAN frame due to 16 bit accesses
  gro: refetch inet6_protos[] after pulling ext headers
  bnx2x: fix cl_id allocation for non-eth clients for NPAR mode
  mlx4_en: fix endianness with blue frame support
parents 1d113601 a3a4bfde
...@@ -239,13 +239,19 @@ void bnx2x_int_disable(struct bnx2x *bp); ...@@ -239,13 +239,19 @@ void bnx2x_int_disable(struct bnx2x *bp);
* FUNC_N_CLID_X = N * NUM_SPECIAL_CLIENTS + FUNC_0_CLID_X * FUNC_N_CLID_X = N * NUM_SPECIAL_CLIENTS + FUNC_0_CLID_X
* *
*/ */
/* iSCSI L2 */ enum {
#define BNX2X_ISCSI_ETH_CL_ID_IDX 1 BNX2X_ISCSI_ETH_CL_ID_IDX,
#define BNX2X_ISCSI_ETH_CID 49 BNX2X_FCOE_ETH_CL_ID_IDX,
BNX2X_MAX_CNIC_ETH_CL_ID_IDX,
};
/* FCoE L2 */ #define BNX2X_CNIC_START_ETH_CID 48
#define BNX2X_FCOE_ETH_CL_ID_IDX 2 enum {
#define BNX2X_FCOE_ETH_CID 50 /* iSCSI L2 */
BNX2X_ISCSI_ETH_CID = BNX2X_CNIC_START_ETH_CID,
/* FCoE L2 */
BNX2X_FCOE_ETH_CID,
};
/** Additional rings budgeting */ /** Additional rings budgeting */
#ifdef BCM_CNIC #ifdef BCM_CNIC
......
...@@ -1297,7 +1297,7 @@ static inline void bnx2x_init_txdata(struct bnx2x *bp, ...@@ -1297,7 +1297,7 @@ static inline void bnx2x_init_txdata(struct bnx2x *bp,
static inline u8 bnx2x_cnic_eth_cl_id(struct bnx2x *bp, u8 cl_idx) static inline u8 bnx2x_cnic_eth_cl_id(struct bnx2x *bp, u8 cl_idx)
{ {
return bp->cnic_base_cl_id + cl_idx + return bp->cnic_base_cl_id + cl_idx +
(bp->pf_num >> 1) * NON_ETH_CONTEXT_USE; (bp->pf_num >> 1) * BNX2X_MAX_CNIC_ETH_CL_ID_IDX;
} }
static inline u8 bnx2x_cnic_fw_sb_id(struct bnx2x *bp) static inline u8 bnx2x_cnic_fw_sb_id(struct bnx2x *bp)
......
...@@ -261,11 +261,13 @@ static netdev_tx_t mscan_start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -261,11 +261,13 @@ static netdev_tx_t mscan_start_xmit(struct sk_buff *skb, struct net_device *dev)
void __iomem *data = &regs->tx.dsr1_0; void __iomem *data = &regs->tx.dsr1_0;
u16 *payload = (u16 *)frame->data; u16 *payload = (u16 *)frame->data;
/* It is safe to write into dsr[dlc+1] */ for (i = 0; i < frame->can_dlc / 2; i++) {
for (i = 0; i < (frame->can_dlc + 1) / 2; i++) {
out_be16(data, *payload++); out_be16(data, *payload++);
data += 2 + _MSCAN_RESERVED_DSR_SIZE; data += 2 + _MSCAN_RESERVED_DSR_SIZE;
} }
/* write remaining byte if necessary */
if (frame->can_dlc & 1)
out_8(data, frame->data[frame->can_dlc - 1]);
} }
out_8(&regs->tx.dlr, frame->can_dlc); out_8(&regs->tx.dlr, frame->can_dlc);
...@@ -330,10 +332,13 @@ static void mscan_get_rx_frame(struct net_device *dev, struct can_frame *frame) ...@@ -330,10 +332,13 @@ static void mscan_get_rx_frame(struct net_device *dev, struct can_frame *frame)
void __iomem *data = &regs->rx.dsr1_0; void __iomem *data = &regs->rx.dsr1_0;
u16 *payload = (u16 *)frame->data; u16 *payload = (u16 *)frame->data;
for (i = 0; i < (frame->can_dlc + 1) / 2; i++) { for (i = 0; i < frame->can_dlc / 2; i++) {
*payload++ = in_be16(data); *payload++ = in_be16(data);
data += 2 + _MSCAN_RESERVED_DSR_SIZE; data += 2 + _MSCAN_RESERVED_DSR_SIZE;
} }
/* read remaining byte if necessary */
if (frame->can_dlc & 1)
frame->data[frame->can_dlc - 1] = in_8(data);
} }
out_8(&regs->canrflg, MSCAN_RXF); out_8(&regs->canrflg, MSCAN_RXF);
......
...@@ -172,7 +172,7 @@ int mlx4_en_activate_tx_ring(struct mlx4_en_priv *priv, ...@@ -172,7 +172,7 @@ int mlx4_en_activate_tx_ring(struct mlx4_en_priv *priv,
memset(ring->buf, 0, ring->buf_size); memset(ring->buf, 0, ring->buf_size);
ring->qp_state = MLX4_QP_STATE_RST; ring->qp_state = MLX4_QP_STATE_RST;
ring->doorbell_qpn = swab32(ring->qp.qpn << 8); ring->doorbell_qpn = ring->qp.qpn << 8;
mlx4_en_fill_qp_context(priv, ring->size, ring->stride, 1, 0, ring->qpn, mlx4_en_fill_qp_context(priv, ring->size, ring->stride, 1, 0, ring->qpn,
ring->cqn, &ring->context); ring->cqn, &ring->context);
...@@ -791,7 +791,7 @@ netdev_tx_t mlx4_en_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -791,7 +791,7 @@ netdev_tx_t mlx4_en_xmit(struct sk_buff *skb, struct net_device *dev)
skb_orphan(skb); skb_orphan(skb);
if (ring->bf_enabled && desc_size <= MAX_BF && !bounce && !vlan_tag) { if (ring->bf_enabled && desc_size <= MAX_BF && !bounce && !vlan_tag) {
*(u32 *) (&tx_desc->ctrl.vlan_tag) |= ring->doorbell_qpn; *(__be32 *) (&tx_desc->ctrl.vlan_tag) |= cpu_to_be32(ring->doorbell_qpn);
op_own |= htonl((bf_index & 0xffff) << 8); op_own |= htonl((bf_index & 0xffff) << 8);
/* Ensure new descirptor hits memory /* Ensure new descirptor hits memory
* before setting ownership of this descriptor to HW */ * before setting ownership of this descriptor to HW */
...@@ -812,7 +812,7 @@ netdev_tx_t mlx4_en_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -812,7 +812,7 @@ netdev_tx_t mlx4_en_xmit(struct sk_buff *skb, struct net_device *dev)
wmb(); wmb();
tx_desc->ctrl.owner_opcode = op_own; tx_desc->ctrl.owner_opcode = op_own;
wmb(); wmb();
writel(ring->doorbell_qpn, ring->bf.uar->map + MLX4_SEND_DOORBELL); iowrite32be(ring->doorbell_qpn, ring->bf.uar->map + MLX4_SEND_DOORBELL);
} }
/* Poll CQ here */ /* Poll CQ here */
......
...@@ -875,6 +875,7 @@ static struct sk_buff **ipv6_gro_receive(struct sk_buff **head, ...@@ -875,6 +875,7 @@ static struct sk_buff **ipv6_gro_receive(struct sk_buff **head,
skb_reset_transport_header(skb); skb_reset_transport_header(skb);
__skb_push(skb, skb_gro_offset(skb)); __skb_push(skb, skb_gro_offset(skb));
ops = rcu_dereference(inet6_protos[proto]);
if (!ops || !ops->gro_receive) if (!ops || !ops->gro_receive)
goto out_unlock; goto out_unlock;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment