Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 215238
b: refs/heads/master
c: 8f1e174
h: refs/heads/master
v: v3
  • Loading branch information
David Vrabel authored and Gustavo F. Padovan committed Oct 12, 2010
1 parent 1907e3f commit fe81d50
Show file tree
Hide file tree
Showing 127 changed files with 2,573 additions and 2,156 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: c5e90f562047ff9713183cf5e18f5e8997bc7373
refs/heads/master: 8f1e1742233cd1c3444dfc6c945a2efb2814e157
32 changes: 18 additions & 14 deletions trunk/Documentation/networking/phonet.txt
Original file line number Diff line number Diff line change
Expand Up @@ -199,29 +199,33 @@ between itself and a remote pipe-end point (e.g. modem).

The implementation adds socket options at SOL_PNPIPE level:

PNPIPE_PIPE_HANDLE
It accepts an integer argument for setting value of pipe handle.
PNPIPE_CREATE
It accepts an integer argument where-in
lower order 16 bits: pn_dev and pn_port pair for remote pep.
higher order 16 bits: 8 bit pipe-handle

It sends a PNS_PEP_CONNECT_REQ on sequenced socket itself. On getting
PNS_PEP_CONNECT_RESP, it sends PNS_PEP_CONNECT_REQ to remote pep. On
getting response from remote pep, it selects the best possible Flow
control mechanism supported by remote-pep (modem) and then it sends
PNS_PEP_CREATED_IND to the sequenced socket and to the remote pep.

It then updates the pipe state associated with the sequenced socket to
be PIPE_DISABLED.

PNPIPE_ENABLE accepts one integer value (int). If set to zero, the pipe
is disabled. If the value is non-zero, the pipe is enabled. If the pipe
is not (yet) connected, ENOTCONN is error is returned.

The implementation also adds socket 'connect'. On calling the 'connect', pipe
will be created between the source socket and the destination, and the pipe
state will be set to PIPE_DISABLED.
PNPIPE_DESTROY
This will send out PNS_PEP_DISCONNECT_REQ on the sequenced socket and
the remote pep.
It will also update the pipe state associated with the sequenced socket
to PIPE_IDLE

After a pipe has been created and enabled successfully, the Pipe data can be
exchanged between the host-pep and remote-pep (modem).

User-space would typically follow below sequence with Pipe controller:-
-socket
-bind
-setsockopt for PNPIPE_PIPE_HANDLE
-connect
-setsockopt for PNPIPE_ENCAP_IP
-setsockopt for PNPIPE_ENABLE


Authors
-------

Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/bluetooth/btmrvl_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ int btmrvl_process_event(struct btmrvl_private *priv, struct sk_buff *skb)
(event->data[2] == MODULE_ALREADY_UP)) ?
"Bring-up succeed" : "Bring-up failed");

if (event->length > 3)
priv->btmrvl_dev.dev_type = event->data[3];
if (event->length > 3 && event->data[3])
priv->btmrvl_dev.dev_type = HCI_AMP;
else
priv->btmrvl_dev.dev_type = HCI_BREDR;

Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/infiniband/hw/mlx4/Kconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
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,
ret = request_irq(dev->irq, elmc_interrupt, IRQF_SHARED | IRQF_SAMPLE_RANDOM,
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, DRV_NAME, dev);
err = request_irq(dev->irq, mc32_interrupt, IRQF_SHARED | IRQF_SAMPLE_RANDOM, 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,13 +177,6 @@ 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 @@ -219,6 +212,13 @@ 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: 11 additions & 6 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-3"
#define DRV_MODULE_RELDATE "2010/10/19"
#define DRV_MODULE_VERSION "1.60.00-1"
#define DRV_MODULE_RELDATE "2010/10/06"
#define BNX2X_BC_VER 0x040200

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

/* func init flags */
#define FUNC_FLG_STATS 0x0001
#define FUNC_FLG_TPA 0x0002
#define FUNC_FLG_SPQ 0x0004
#define FUNC_FLG_LEADING 0x0008 /* PF only */
#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))

struct rxq_pause_params {
u16 bd_th_lo;
Expand Down
21 changes: 8 additions & 13 deletions trunk/drivers/net/bnx2x/bnx2x_cmn.c
Original file line number Diff line number Diff line change
Expand Up @@ -507,11 +507,8 @@ 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.
* - FP CQE will always have either TPA_START or/and
* TPA_STOP flags set.
*/
/* If CQE is marked both TPA_START and TPA_END
it is a non-TPA CQE */
if ((!fp->disable_tpa) &&
(TPA_TYPE(cqe_fp_flags) !=
(TPA_TYPE_START | TPA_TYPE_END))) {
Expand All @@ -529,7 +526,9 @@ int bnx2x_rx_int(struct bnx2x_fastpath *fp, int budget)
bnx2x_set_skb_rxhash(bp, cqe, skb);

goto next_rx;
} else { /* TPA_STOP */
}

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

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

DP(NETIF_MSG_IFUP,
"mtu %d rx_buf_size %d\n", bp->dev->mtu, bp->rx_buf_size);
Expand Down Expand Up @@ -1289,6 +1288,8 @@ 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 @@ -1521,12 +1522,6 @@ 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: 2 additions & 0 deletions trunk/drivers/net/bnx2x/bnx2x_cmn.h
Original file line number Diff line number Diff line change
Expand Up @@ -1032,4 +1032,6 @@ 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: 46 additions & 83 deletions trunk/drivers/net/bnx2x/bnx2x_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1111,19 +1111,14 @@ 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);

if (!CHIP_IS_E1(bp)) {
DP(NETIF_MSG_INTR, "write %x to HC %d (addr 0x%x)\n",
val, port, addr);
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 @@ -1217,26 +1212,10 @@ 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);

/*
* 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);
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 @@ -2305,31 +2284,35 @@ 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)
{
struct tstorm_eth_function_common_config tcfg = {0};
u16 rss_flgs;
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;

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

/* set rss flags */
rss_flgs = (p->rss->mode <<
TSTORM_ETH_FUNCTION_COMMON_CONFIG_RSS_MODE_SHIFT);
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;

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;

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 @@ -2496,17 +2479,23 @@ 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;
*/
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;
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;
}

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

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

Expand Down Expand Up @@ -5707,31 +5695,6 @@ 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
Loading

0 comments on commit fe81d50

Please sign in to comment.