Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 215369
b: refs/heads/master
c: 5eeaa2d
h: refs/heads/master
i:
  215367: 1d97975
v: v3
  • Loading branch information
David S. Miller committed Oct 20, 2010
1 parent 9d46b8e commit d0e51c8
Show file tree
Hide file tree
Showing 99 changed files with 1,445 additions and 1,194 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: c64557d666eb62eb5f296c6b93bd0a5525ed1e36
refs/heads/master: 5eeaa2db162f1f6d83e988d4d28f4ba7be600e44
1 change: 1 addition & 0 deletions trunk/drivers/infiniband/hw/mlx4/Kconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
config MLX4_INFINIBAND
tristate "Mellanox ConnectX HCA support"
depends on NETDEVICES && NETDEV_10000 && PCI
select MLX4_CORE
---help---
This driver provides low-level InfiniBand support for
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/3c523.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ static int elmc_open(struct net_device *dev)

elmc_id_attn586(); /* disable interrupts */

ret = request_irq(dev->irq, elmc_interrupt, IRQF_SHARED | IRQF_SAMPLE_RANDOM,
ret = request_irq(dev->irq, elmc_interrupt, IRQF_SHARED,
dev->name, dev);
if (ret) {
pr_err("%s: couldn't get irq %d\n", dev->name, dev->irq);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/3c527.c
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ static int __init mc32_probe1(struct net_device *dev, int slot)
* Grab the IRQ
*/

err = request_irq(dev->irq, mc32_interrupt, IRQF_SHARED | IRQF_SAMPLE_RANDOM, DRV_NAME, dev);
err = request_irq(dev->irq, mc32_interrupt, IRQF_SHARED, DRV_NAME, dev);
if (err) {
release_region(dev->base_addr, MC32_IO_EXTENT);
pr_err("%s: unable to get IRQ %d.\n", DRV_NAME, dev->irq);
Expand Down
14 changes: 7 additions & 7 deletions trunk/drivers/net/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,13 @@ config NET_SB1000

source "drivers/net/arcnet/Kconfig"

config MII
tristate "Generic Media Independent Interface device support"
help
Most ethernet controllers have MII transceiver either as an external
or internal device. It is safe to say Y or M here even if your
ethernet card lacks MII.

source "drivers/net/phy/Kconfig"

#
Expand Down Expand Up @@ -212,13 +219,6 @@ menuconfig NET_ETHERNET

if NET_ETHERNET

config MII
tristate "Generic Media Independent Interface device support"
help
Most ethernet controllers have MII transceiver either as an external
or internal device. It is safe to say Y or M here even if your
ethernet card lack MII.

config MACB
tristate "Atmel MACB support"
depends on AVR32 || ARCH_AT91SAM9260 || ARCH_AT91SAM9263 || ARCH_AT91SAM9G20 || ARCH_AT91SAM9G45 || ARCH_AT91CAP9
Expand Down
17 changes: 6 additions & 11 deletions trunk/drivers/net/bnx2x/bnx2x.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
* (you will need to reboot afterwards) */
/* #define BNX2X_STOP_ON_ERROR */

#define DRV_MODULE_VERSION "1.60.00-1"
#define DRV_MODULE_RELDATE "2010/10/06"
#define DRV_MODULE_VERSION "1.60.00-3"
#define DRV_MODULE_RELDATE "2010/10/19"
#define BNX2X_BC_VER 0x040200

#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
Expand Down Expand Up @@ -1180,15 +1180,10 @@ struct bnx2x {
TSTORM_ETH_FUNCTION_COMMON_CONFIG_RSS_IPV6_TCP_CAPABILITY

/* func init flags */
#define FUNC_FLG_RSS 0x0001
#define FUNC_FLG_STATS 0x0002
/* removed FUNC_FLG_UNMATCHED 0x0004 */
#define FUNC_FLG_TPA 0x0008
#define FUNC_FLG_SPQ 0x0010
#define FUNC_FLG_LEADING 0x0020 /* PF only */

#define FUNC_CONFIG(flgs) ((flgs) & (FUNC_FLG_RSS | FUNC_FLG_TPA | \
FUNC_FLG_LEADING))
#define FUNC_FLG_STATS 0x0001
#define FUNC_FLG_TPA 0x0002
#define FUNC_FLG_SPQ 0x0004
#define FUNC_FLG_LEADING 0x0008 /* PF only */

struct rxq_pause_params {
u16 bd_th_lo;
Expand Down
21 changes: 13 additions & 8 deletions trunk/drivers/net/bnx2x/bnx2x_cmn.c
Original file line number Diff line number Diff line change
Expand Up @@ -507,8 +507,11 @@ int bnx2x_rx_int(struct bnx2x_fastpath *fp, int budget)
len = le16_to_cpu(cqe->fast_path_cqe.pkt_len);
pad = cqe->fast_path_cqe.placement_offset;

/* If CQE is marked both TPA_START and TPA_END
it is a non-TPA CQE */
/* - If CQE is marked both TPA_START and TPA_END it is
* a non-TPA CQE.
* - FP CQE will always have either TPA_START or/and
* TPA_STOP flags set.
*/
if ((!fp->disable_tpa) &&
(TPA_TYPE(cqe_fp_flags) !=
(TPA_TYPE_START | TPA_TYPE_END))) {
Expand All @@ -526,9 +529,7 @@ int bnx2x_rx_int(struct bnx2x_fastpath *fp, int budget)
bnx2x_set_skb_rxhash(bp, cqe, skb);

goto next_rx;
}

if (TPA_TYPE(cqe_fp_flags) == TPA_TYPE_END) {
} else { /* TPA_STOP */
DP(NETIF_MSG_RX_STATUS,
"calling tpa_stop on queue %d\n",
queue);
Expand Down Expand Up @@ -830,7 +831,7 @@ void bnx2x_init_rx_rings(struct bnx2x *bp)
int i, j;

bp->rx_buf_size = bp->dev->mtu + ETH_OVREHEAD + BNX2X_RX_ALIGN +
BNX2X_FW_IP_HDR_ALIGN_PAD;
IP_HEADER_ALIGNMENT_PADDING;

DP(NETIF_MSG_IFUP,
"mtu %d rx_buf_size %d\n", bp->dev->mtu, bp->rx_buf_size);
Expand Down Expand Up @@ -1288,8 +1289,6 @@ int bnx2x_nic_load(struct bnx2x *bp, int load_mode)
if (rc) {
BNX2X_ERR("HW init failed, aborting\n");
bnx2x_fw_command(bp, DRV_MSG_CODE_LOAD_DONE, 0);
bnx2x_fw_command(bp, DRV_MSG_CODE_UNLOAD_REQ_WOL_MCP, 0);
bnx2x_fw_command(bp, DRV_MSG_CODE_UNLOAD_DONE, 0);
goto load_error2;
}

Expand Down Expand Up @@ -1522,6 +1521,12 @@ int bnx2x_set_power_state(struct bnx2x *bp, pci_power_t state)
{
u16 pmcsr;

/* If there is no power capability, silently succeed */
if (!bp->pm_cap) {
DP(NETIF_MSG_HW, "No power capability. Breaking.\n");
return 0;
}

pci_read_config_word(bp->pdev, bp->pm_cap + PCI_PM_CTRL, &pmcsr);

switch (state) {
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/net/bnx2x/bnx2x_cmn.h
Original file line number Diff line number Diff line change
Expand Up @@ -1032,6 +1032,4 @@ static inline void storm_memset_cmng(struct bnx2x *bp,
void bnx2x_acquire_phy_lock(struct bnx2x *bp);
void bnx2x_release_phy_lock(struct bnx2x *bp);

#define BNX2X_FW_IP_HDR_ALIGN_PAD 2 /* FW places hdr with this padding */

#endif /* BNX2X_CMN_H */
129 changes: 83 additions & 46 deletions trunk/drivers/net/bnx2x/bnx2x_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1111,14 +1111,19 @@ static void bnx2x_hc_int_enable(struct bnx2x *bp)
HC_CONFIG_0_REG_INT_LINE_EN_0 |
HC_CONFIG_0_REG_ATTN_BIT_EN_0);

DP(NETIF_MSG_INTR, "write %x to HC %d (addr 0x%x)\n",
val, port, addr);
if (!CHIP_IS_E1(bp)) {
DP(NETIF_MSG_INTR, "write %x to HC %d (addr 0x%x)\n",
val, port, addr);

REG_WR(bp, addr, val);
REG_WR(bp, addr, val);

val &= ~HC_CONFIG_0_REG_MSI_MSIX_INT_EN_0;
val &= ~HC_CONFIG_0_REG_MSI_MSIX_INT_EN_0;
}
}

if (CHIP_IS_E1(bp))
REG_WR(bp, HC_REG_INT_MASK + port*4, 0x1FFFF);

DP(NETIF_MSG_INTR, "write %x to HC %d (addr 0x%x) mode %s\n",
val, port, addr, (msix ? "MSI-X" : (msi ? "MSI" : "INTx")));

Expand Down Expand Up @@ -1212,10 +1217,26 @@ static void bnx2x_hc_int_disable(struct bnx2x *bp)
u32 addr = port ? HC_REG_CONFIG_1 : HC_REG_CONFIG_0;
u32 val = REG_RD(bp, addr);

val &= ~(HC_CONFIG_0_REG_SINGLE_ISR_EN_0 |
HC_CONFIG_0_REG_MSI_MSIX_INT_EN_0 |
HC_CONFIG_0_REG_INT_LINE_EN_0 |
HC_CONFIG_0_REG_ATTN_BIT_EN_0);
/*
* in E1 we must use only PCI configuration space to disable
* MSI/MSIX capablility
* It's forbitten to disable IGU_PF_CONF_MSI_MSIX_EN in HC block
*/
if (CHIP_IS_E1(bp)) {
/* Since IGU_PF_CONF_MSI_MSIX_EN still always on
* Use mask register to prevent from HC sending interrupts
* after we exit the function
*/
REG_WR(bp, HC_REG_INT_MASK + port*4, 0);

val &= ~(HC_CONFIG_0_REG_SINGLE_ISR_EN_0 |
HC_CONFIG_0_REG_INT_LINE_EN_0 |
HC_CONFIG_0_REG_ATTN_BIT_EN_0);
} else
val &= ~(HC_CONFIG_0_REG_SINGLE_ISR_EN_0 |
HC_CONFIG_0_REG_MSI_MSIX_INT_EN_0 |
HC_CONFIG_0_REG_INT_LINE_EN_0 |
HC_CONFIG_0_REG_ATTN_BIT_EN_0);

DP(NETIF_MSG_INTR, "write %x to HC %d (addr 0x%x)\n",
val, port, addr);
Expand Down Expand Up @@ -2284,35 +2305,31 @@ void bnx2x_rxq_set_mac_filters(struct bnx2x *bp, u16 cl_id, u32 filters)

void bnx2x_func_init(struct bnx2x *bp, struct bnx2x_func_init_params *p)
{
if (FUNC_CONFIG(p->func_flgs)) {
struct tstorm_eth_function_common_config tcfg = {0};

/* tpa */
if (p->func_flgs & FUNC_FLG_TPA)
tcfg.config_flags |=
TSTORM_ETH_FUNCTION_COMMON_CONFIG_ENABLE_TPA;
struct tstorm_eth_function_common_config tcfg = {0};
u16 rss_flgs;

/* set rss flags */
if (p->func_flgs & FUNC_FLG_RSS) {
u16 rss_flgs = (p->rss->mode <<
TSTORM_ETH_FUNCTION_COMMON_CONFIG_RSS_MODE_SHIFT);
/* tpa */
if (p->func_flgs & FUNC_FLG_TPA)
tcfg.config_flags |=
TSTORM_ETH_FUNCTION_COMMON_CONFIG_ENABLE_TPA;

if (p->rss->cap & RSS_IPV4_CAP)
rss_flgs |= RSS_IPV4_CAP_MASK;
if (p->rss->cap & RSS_IPV4_TCP_CAP)
rss_flgs |= RSS_IPV4_TCP_CAP_MASK;
if (p->rss->cap & RSS_IPV6_CAP)
rss_flgs |= RSS_IPV6_CAP_MASK;
if (p->rss->cap & RSS_IPV6_TCP_CAP)
rss_flgs |= RSS_IPV6_TCP_CAP_MASK;
/* set rss flags */
rss_flgs = (p->rss->mode <<
TSTORM_ETH_FUNCTION_COMMON_CONFIG_RSS_MODE_SHIFT);

tcfg.config_flags |= rss_flgs;
tcfg.rss_result_mask = p->rss->result_mask;
if (p->rss->cap & RSS_IPV4_CAP)
rss_flgs |= RSS_IPV4_CAP_MASK;
if (p->rss->cap & RSS_IPV4_TCP_CAP)
rss_flgs |= RSS_IPV4_TCP_CAP_MASK;
if (p->rss->cap & RSS_IPV6_CAP)
rss_flgs |= RSS_IPV6_CAP_MASK;
if (p->rss->cap & RSS_IPV6_TCP_CAP)
rss_flgs |= RSS_IPV6_TCP_CAP_MASK;

}
tcfg.config_flags |= rss_flgs;
tcfg.rss_result_mask = p->rss->result_mask;

storm_memset_func_cfg(bp, &tcfg, p->func_id);
}
storm_memset_func_cfg(bp, &tcfg, p->func_id);

/* Enable the function in the FW */
storm_memset_vf_to_pf(bp, p->func_id, p->pf_id);
Expand Down Expand Up @@ -2479,23 +2496,17 @@ void bnx2x_pf_init(struct bnx2x *bp)
else
flags |= FUNC_FLG_TPA;

/* function setup */

/**
* Although RSS is meaningless when there is a single HW queue we
* still need it enabled in order to have HW Rx hash generated.
*
* if (is_eth_multi(bp))
* flags |= FUNC_FLG_RSS;
*/
flags |= FUNC_FLG_RSS;

/* function setup */
if (flags & FUNC_FLG_RSS) {
rss.cap = (RSS_IPV4_CAP | RSS_IPV4_TCP_CAP |
RSS_IPV6_CAP | RSS_IPV6_TCP_CAP);
rss.mode = bp->multi_mode;
rss.result_mask = MULTI_MASK;
func_init.rss = &rss;
}
rss.cap = (RSS_IPV4_CAP | RSS_IPV4_TCP_CAP |
RSS_IPV6_CAP | RSS_IPV6_TCP_CAP);
rss.mode = bp->multi_mode;
rss.result_mask = MULTI_MASK;
func_init.rss = &rss;

func_init.func_flgs = flags;
func_init.pf_id = BP_FUNC(bp);
Expand Down Expand Up @@ -5446,7 +5457,8 @@ static int bnx2x_init_hw_func(struct bnx2x *bp)
struct bnx2x_ilt *ilt = BP_ILT(bp);
u16 cdu_ilt_start;
u32 addr, val;
int i;
u32 main_mem_base, main_mem_size, main_mem_prty_clr;
int i, main_mem_width;

DP(BNX2X_MSG_MCP, "starting func init func %d\n", func);

Expand Down Expand Up @@ -5695,6 +5707,31 @@ static int bnx2x_init_hw_func(struct bnx2x *bp)
bnx2x_init_block(bp, MCP_BLOCK, FUNC0_STAGE + func);
bnx2x_init_block(bp, DMAE_BLOCK, FUNC0_STAGE + func);

if (CHIP_IS_E1x(bp)) {
main_mem_size = HC_REG_MAIN_MEMORY_SIZE / 2; /*dwords*/
main_mem_base = HC_REG_MAIN_MEMORY +
BP_PORT(bp) * (main_mem_size * 4);
main_mem_prty_clr = HC_REG_HC_PRTY_STS_CLR;
main_mem_width = 8;

val = REG_RD(bp, main_mem_prty_clr);
if (val)
DP(BNX2X_MSG_MCP, "Hmmm... Parity errors in HC "
"block during "
"function init (0x%x)!\n", val);

/* Clear "false" parity errors in MSI-X table */
for (i = main_mem_base;
i < main_mem_base + main_mem_size * 4;
i += main_mem_width) {
bnx2x_read_dmae(bp, i, main_mem_width / 4);
bnx2x_write_dmae(bp, bnx2x_sp_mapping(bp, wb_data),
i, main_mem_width / 4);
}
/* Clear HC parity attention */
REG_RD(bp, main_mem_prty_clr);
}

bnx2x_phy_probe(&bp->link_params);

return 0;
Expand Down
6 changes: 5 additions & 1 deletion trunk/drivers/net/bnx2x/bnx2x_reg.h
Original file line number Diff line number Diff line change
Expand Up @@ -800,9 +800,13 @@
#define HC_REG_HC_PRTY_MASK 0x1080a0
/* [R 3] Parity register #0 read */
#define HC_REG_HC_PRTY_STS 0x108094
#define HC_REG_INT_MASK 0x108108
/* [RC 3] Parity register #0 read clear */
#define HC_REG_HC_PRTY_STS_CLR 0x108098
#define HC_REG_INT_MASK 0x108108
#define HC_REG_LEADING_EDGE_0 0x108040
#define HC_REG_LEADING_EDGE_1 0x108048
#define HC_REG_MAIN_MEMORY 0x108800
#define HC_REG_MAIN_MEMORY_SIZE 152
#define HC_REG_P0_PROD_CONS 0x108200
#define HC_REG_P1_PROD_CONS 0x108400
#define HC_REG_PBA_COMMAND 0x108140
Expand Down
Loading

0 comments on commit d0e51c8

Please sign in to comment.