Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 256117
b: refs/heads/master
c: 994635a
h: refs/heads/master
i:
  256115: 9cb5939
v: v3
  • Loading branch information
David S. Miller committed Jul 6, 2011
1 parent 832a378 commit 8b74847
Show file tree
Hide file tree
Showing 95 changed files with 3,222 additions and 2,597 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: df2cbe40753dc36af294c30209ed909869aca6cf
refs/heads/master: 994635a137f637466d36a7c6272dae014a46a11c
19 changes: 13 additions & 6 deletions trunk/Documentation/networking/ip-sysctl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ tcp_rmem - vector of 3 INTEGERs: min, default, max
min: Minimal size of receive buffer used by TCP sockets.
It is guaranteed to each TCP socket, even under moderate memory
pressure.
Default: 8K
Default: 1 page

default: initial size of receive buffer used by TCP sockets.
This value overrides net.core.rmem_default used by other protocols.
Expand Down Expand Up @@ -473,7 +473,7 @@ tcp_window_scaling - BOOLEAN
tcp_wmem - vector of 3 INTEGERs: min, default, max
min: Amount of memory reserved for send buffers for TCP sockets.
Each TCP socket has rights to use it due to fact of its birth.
Default: 4K
Default: 1 page

default: initial size of send buffer used by TCP sockets. This
value overrides net.core.wmem_default used by other protocols.
Expand Down Expand Up @@ -543,13 +543,13 @@ udp_rmem_min - INTEGER
Minimal size of receive buffer used by UDP sockets in moderation.
Each UDP socket is able to use the size for receiving data, even if
total pages of UDP sockets exceed udp_mem pressure. The unit is byte.
Default: 4096
Default: 1 page

udp_wmem_min - INTEGER
Minimal size of send buffer used by UDP sockets in moderation.
Each UDP socket is able to use the size for sending data, even if
total pages of UDP sockets exceed udp_mem pressure. The unit is byte.
Default: 4096
Default: 1 page

CIPSOv4 Variables:

Expand Down Expand Up @@ -1455,10 +1455,17 @@ sctp_mem - vector of 3 INTEGERs: min, pressure, max
Default is calculated at boot time from amount of available memory.

sctp_rmem - vector of 3 INTEGERs: min, default, max
See tcp_rmem for a description.
Only the first value ("min") is used, "default" and "max" are
ignored.

min: Minimal size of receive buffer used by SCTP socket.
It is guaranteed to each SCTP socket (but not association) even
under moderate memory pressure.

Default: 1 page

sctp_wmem - vector of 3 INTEGERs: min, default, max
See tcp_wmem for a description.
Currently this tunable has no effect.

addr_scope_policy - INTEGER
Control IPv4 address scoping - draft-stewart-tsvwg-sctp-ipv4-00
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/ieee802154/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
obj-$(CONFIG_IEEE802154_FAKEHARD) += fakehard.o

ccflags-y := -DDEBUG -DCONFIG_FFD
2 changes: 0 additions & 2 deletions trunk/drivers/ieee802154/fakehard.c
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,6 @@ static int __devinit ieee802154fake_probe(struct platform_device *pdev)
return -ENOMEM;
}

phy->dev.platform_data = dev;

memcpy(dev->dev_addr, "\xba\xbe\xca\xfe\xde\xad\xbe\xef",
dev->addr_len);
memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
Expand Down
14 changes: 6 additions & 8 deletions trunk/drivers/net/arm/am79c961a.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,17 +199,15 @@ am79c961_ramtest(struct net_device *dev, unsigned int val)

static void am79c961_mc_hash(char *addr, u16 *hash)
{
if (addr[0] & 0x01) {
int idx, bit;
u32 crc;
int idx, bit;
u32 crc;

crc = ether_crc_le(ETH_ALEN, addr);
crc = ether_crc_le(ETH_ALEN, addr);

idx = crc >> 30;
bit = (crc >> 26) & 15;
idx = crc >> 30;
bit = (crc >> 26) & 15;

hash[idx] |= 1 << bit;
}
hash[idx] |= 1 << bit;
}

static unsigned int am79c961_get_rx_mode(struct net_device *dev, u16 *hash)
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/b44.c
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ static void b44_tx(struct b44 *bp)
skb->len,
DMA_TO_DEVICE);
rp->skb = NULL;
dev_kfree_skb_irq(skb);
dev_kfree_skb(skb);
}

bp->tx_cons = cons;
Expand Down
72 changes: 58 additions & 14 deletions trunk/drivers/net/benet/be_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,24 @@ static int be_mcc_compl_process(struct be_adapter *adapter,
netdev_stats_update(adapter);
adapter->stats_cmd_sent = false;
}
} else if ((compl_status != MCC_STATUS_NOT_SUPPORTED) &&
(compl->tag0 != OPCODE_COMMON_NTWK_MAC_QUERY)) {
extd_status = (compl->status >> CQE_STATUS_EXTD_SHIFT) &
CQE_STATUS_EXTD_MASK;
dev_warn(&adapter->pdev->dev,
"Error in cmd completion - opcode %d, compl %d, extd %d\n",
compl->tag0, compl_status, extd_status);
} else {
if (compl_status == MCC_STATUS_NOT_SUPPORTED ||
compl_status == MCC_STATUS_ILLEGAL_REQUEST)
goto done;

if (compl_status == MCC_STATUS_UNAUTHORIZED_REQUEST) {
dev_warn(&adapter->pdev->dev, "This domain(VM) is not "
"permitted to execute this cmd (opcode %d)\n",
compl->tag0);
} else {
extd_status = (compl->status >> CQE_STATUS_EXTD_SHIFT) &
CQE_STATUS_EXTD_MASK;
dev_err(&adapter->pdev->dev, "Cmd (opcode %d) failed:"
"status %d, extd-status %d\n",
compl->tag0, compl_status, extd_status);
}
}
done:
return compl_status;
}

Expand Down Expand Up @@ -974,7 +984,7 @@ int be_cmd_txq_create(struct be_adapter *adapter,
return status;
}

/* Uses mbox */
/* Uses MCC */
int be_cmd_rxq_create(struct be_adapter *adapter,
struct be_queue_info *rxq, u16 cq_id, u16 frag_size,
u16 max_frame_size, u32 if_id, u32 rss, u8 *rss_id)
Expand All @@ -984,10 +994,13 @@ int be_cmd_rxq_create(struct be_adapter *adapter,
struct be_dma_mem *q_mem = &rxq->dma_mem;
int status;

if (mutex_lock_interruptible(&adapter->mbox_lock))
return -1;
spin_lock_bh(&adapter->mcc_lock);

wrb = wrb_from_mbox(adapter);
wrb = wrb_from_mccq(adapter);
if (!wrb) {
status = -EBUSY;
goto err;
}
req = embedded_payload(wrb);

be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0,
Expand All @@ -1004,16 +1017,16 @@ int be_cmd_rxq_create(struct be_adapter *adapter,
req->max_frame_size = cpu_to_le16(max_frame_size);
req->rss_queue = cpu_to_le32(rss);

status = be_mbox_notify_wait(adapter);
status = be_mcc_notify_wait(adapter);
if (!status) {
struct be_cmd_resp_eth_rx_create *resp = embedded_payload(wrb);
rxq->id = le16_to_cpu(resp->id);
rxq->created = true;
*rss_id = resp->rss_id;
}

mutex_unlock(&adapter->mbox_lock);

err:
spin_unlock_bh(&adapter->mcc_lock);
return status;
}

Expand Down Expand Up @@ -1068,9 +1081,40 @@ int be_cmd_q_destroy(struct be_adapter *adapter, struct be_queue_info *q,
req->id = cpu_to_le16(q->id);

status = be_mbox_notify_wait(adapter);
if (!status)
q->created = false;

mutex_unlock(&adapter->mbox_lock);
return status;
}

/* Uses MCC */
int be_cmd_rxq_destroy(struct be_adapter *adapter, struct be_queue_info *q)
{
struct be_mcc_wrb *wrb;
struct be_cmd_req_q_destroy *req;
int status;

spin_lock_bh(&adapter->mcc_lock);

wrb = wrb_from_mccq(adapter);
if (!wrb) {
status = -EBUSY;
goto err;
}
req = embedded_payload(wrb);

be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0, OPCODE_ETH_RX_DESTROY);
be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_ETH, OPCODE_ETH_RX_DESTROY,
sizeof(*req));
req->id = cpu_to_le16(q->id);

status = be_mcc_notify_wait(adapter);
if (!status)
q->created = false;

err:
spin_unlock_bh(&adapter->mcc_lock);
return status;
}

Expand Down
19 changes: 8 additions & 11 deletions trunk/drivers/net/benet/be_cmds.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,12 @@ struct be_mcc_wrb {

/* Completion Status */
enum {
MCC_STATUS_SUCCESS = 0x0,
/* The client does not have sufficient privileges to execute the command */
MCC_STATUS_INSUFFICIENT_PRIVILEGES = 0x1,
/* A parameter in the command was invalid. */
MCC_STATUS_INVALID_PARAMETER = 0x2,
/* There are insufficient chip resources to execute the command */
MCC_STATUS_INSUFFICIENT_RESOURCES = 0x3,
/* The command is completing because the queue was getting flushed */
MCC_STATUS_QUEUE_FLUSHING = 0x4,
/* The command is completing with a DMA error */
MCC_STATUS_DMA_FAILED = 0x5,
MCC_STATUS_SUCCESS = 0,
MCC_STATUS_FAILED = 1,
MCC_STATUS_ILLEGAL_REQUEST = 2,
MCC_STATUS_ILLEGAL_FIELD = 3,
MCC_STATUS_INSUFFICIENT_BUFFER = 4,
MCC_STATUS_UNAUTHORIZED_REQUEST = 5,
MCC_STATUS_NOT_SUPPORTED = 66
};

Expand Down Expand Up @@ -1487,6 +1482,8 @@ extern int be_cmd_rxq_create(struct be_adapter *adapter,
u32 rss, u8 *rss_id);
extern int be_cmd_q_destroy(struct be_adapter *adapter, struct be_queue_info *q,
int type);
extern int be_cmd_rxq_destroy(struct be_adapter *adapter,
struct be_queue_info *q);
extern int be_cmd_link_status_query(struct be_adapter *adapter,
bool *link_up, u8 *mac_speed, u16 *link_speed, u32 dom);
extern int be_cmd_reset(struct be_adapter *adapter);
Expand Down
Loading

0 comments on commit 8b74847

Please sign in to comment.