Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 224171
b: refs/heads/master
c: 6c1b6c6
h: refs/heads/master
i:
  224169: 3080bd4
  224167: 8b750d3
v: v3
  • Loading branch information
David S. Miller committed Nov 15, 2010
1 parent 399f532 commit 033b37a
Show file tree
Hide file tree
Showing 18 changed files with 260 additions and 302 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: 7e87fe84303cc54ecf3c7b688cb08ca24322a41d
refs/heads/master: 6c1b6c6b873d66d353ef47a054156dfde3f4c075
2 changes: 1 addition & 1 deletion trunk/drivers/net/cxgb4vf/adapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ enum {
* MSI-X interrupt index usage.
*/
MSIX_FW = 0, /* MSI-X index for firmware Q */
MSIX_NIQFLINT = 1, /* MSI-X index base for Ingress Qs */
MSIX_IQFLINT = 1, /* MSI-X index base for Ingress Qs */
MSIX_EXTRAS = 1,
MSIX_ENTRIES = MAX_ETH_QSETS + MSIX_EXTRAS,

Expand Down
32 changes: 20 additions & 12 deletions trunk/drivers/net/cxgb4vf/cxgb4vf_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,7 @@ static void name_msix_vecs(struct adapter *adapter)
const struct port_info *pi = netdev_priv(dev);
int qs, msi;

for (qs = 0, msi = MSIX_NIQFLINT;
qs < pi->nqsets;
qs++, msi++) {
for (qs = 0, msi = MSIX_IQFLINT; qs < pi->nqsets; qs++, msi++) {
snprintf(adapter->msix_info[msi].desc, namelen,
"%s-%d", dev->name, qs);
adapter->msix_info[msi].desc[namelen] = 0;
Expand All @@ -309,7 +307,7 @@ static int request_msix_queue_irqs(struct adapter *adapter)
/*
* Ethernet queues.
*/
msi = MSIX_NIQFLINT;
msi = MSIX_IQFLINT;
for_each_ethrxq(s, rxq) {
err = request_irq(adapter->msix_info[msi].vec,
t4vf_sge_intr_msix, 0,
Expand Down Expand Up @@ -337,7 +335,7 @@ static void free_msix_queue_irqs(struct adapter *adapter)
int rxq, msi;

free_irq(adapter->msix_info[MSIX_FW].vec, &s->fw_evtq);
msi = MSIX_NIQFLINT;
msi = MSIX_IQFLINT;
for_each_ethrxq(s, rxq)
free_irq(adapter->msix_info[msi++].vec,
&s->ethrxq[rxq].rspq);
Expand Down Expand Up @@ -527,7 +525,7 @@ static int setup_sge_queues(struct adapter *adapter)
* brought up at which point lots of things get nailed down
* permanently ...
*/
msix = MSIX_NIQFLINT;
msix = MSIX_IQFLINT;
for_each_port(adapter, pidx) {
struct net_device *dev = adapter->port[pidx];
struct port_info *pi = netdev_priv(dev);
Expand Down Expand Up @@ -1348,6 +1346,8 @@ struct queue_port_stats {
u64 rx_csum;
u64 vlan_ex;
u64 vlan_ins;
u64 lro_pkts;
u64 lro_merged;
};

/*
Expand Down Expand Up @@ -1385,6 +1385,8 @@ static const char stats_strings[][ETH_GSTRING_LEN] = {
"RxCsumGood ",
"VLANextractions ",
"VLANinsertions ",
"GROPackets ",
"GROMerged ",
};

/*
Expand Down Expand Up @@ -1434,6 +1436,8 @@ static void collect_sge_port_stats(const struct adapter *adapter,
stats->rx_csum += rxq->stats.rx_cso;
stats->vlan_ex += rxq->stats.vlan_ex;
stats->vlan_ins += txq->vlan_ins;
stats->lro_pkts += rxq->stats.lro_pkts;
stats->lro_merged += rxq->stats.lro_merged;
}
}

Expand Down Expand Up @@ -1529,15 +1533,20 @@ static void cxgb4vf_get_wol(struct net_device *dev,
memset(&wol->sopass, 0, sizeof(wol->sopass));
}

/*
* TCP Segmentation Offload flags which we support.
*/
#define TSO_FLAGS (NETIF_F_TSO | NETIF_F_TSO6 | NETIF_F_TSO_ECN)

/*
* Set TCP Segmentation Offloading feature capabilities.
*/
static int cxgb4vf_set_tso(struct net_device *dev, u32 tso)
{
if (tso)
dev->features |= NETIF_F_TSO | NETIF_F_TSO6;
dev->features |= TSO_FLAGS;
else
dev->features &= ~(NETIF_F_TSO | NETIF_F_TSO6);
dev->features &= ~TSO_FLAGS;
return 0;
}

Expand Down Expand Up @@ -2028,7 +2037,7 @@ static int __devinit setup_debugfs(struct adapter *adapter)
* Tear down the /sys/kernel/debug/cxgb4vf sub-nodes created above. We leave
* it to our caller to tear down the directory (debugfs_root).
*/
static void __devexit cleanup_debugfs(struct adapter *adapter)
static void cleanup_debugfs(struct adapter *adapter)
{
BUG_ON(adapter->debugfs_root == NULL);

Expand All @@ -2046,7 +2055,7 @@ static void __devexit cleanup_debugfs(struct adapter *adapter)
* adapter parameters we're going to be using and initialize basic adapter
* hardware support.
*/
static int adap_init0(struct adapter *adapter)
static int __devinit adap_init0(struct adapter *adapter)
{
struct vf_resources *vfres = &adapter->params.vfres;
struct sge_params *sge_params = &adapter->params.sge;
Expand Down Expand Up @@ -2470,7 +2479,6 @@ static int __devinit cxgb4vf_pci_probe(struct pci_dev *pdev,
version_printed = 1;
}


/*
* Initialize generic PCI device state.
*/
Expand Down Expand Up @@ -2607,7 +2615,7 @@ static int __devinit cxgb4vf_pci_probe(struct pci_dev *pdev,
netif_carrier_off(netdev);
netdev->irq = pdev->irq;

netdev->features = (NETIF_F_SG | NETIF_F_TSO | NETIF_F_TSO6 |
netdev->features = (NETIF_F_SG | TSO_FLAGS |
NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |
NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX |
NETIF_F_GRO);
Expand Down
9 changes: 6 additions & 3 deletions trunk/drivers/net/cxgb4vf/sge.c
Original file line number Diff line number Diff line change
Expand Up @@ -1568,6 +1568,9 @@ int t4vf_ethrx_handler(struct sge_rspq *rspq, const __be64 *rsp,
} else
skb_checksum_none_assert(skb);

/*
* Deliver the packet to the stack.
*/
if (unlikely(pkt->vlan_ex)) {
struct vlan_group *grp = pi->vlan_grp;

Expand Down Expand Up @@ -2143,7 +2146,7 @@ int t4vf_sge_alloc_rxq(struct adapter *adapter, struct sge_rspq *rspq,

/*
* Calculate the size of the hardware free list ring plus
* status page (which the SGE will place at the end of the
* Status Page (which the SGE will place after the end of the
* free list ring) in Egress Queue Units.
*/
flsz = (fl->size / FL_PER_EQ_UNIT +
Expand Down Expand Up @@ -2240,8 +2243,8 @@ int t4vf_sge_alloc_eth_txq(struct adapter *adapter, struct sge_eth_txq *txq,
struct port_info *pi = netdev_priv(dev);

/*
* Calculate the size of the hardware TX Queue (including the
* status age on the end) in units of TX Descriptors.
* Calculate the size of the hardware TX Queue (including the Status
* Page on the end of the TX Queue) in units of TX Descriptors.
*/
nentries = txq->q.size + STAT_LEN / sizeof(struct tx_desc);

Expand Down
5 changes: 3 additions & 2 deletions trunk/drivers/net/cxgb4vf/t4vf_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1276,15 +1276,16 @@ int t4vf_eth_eq_free(struct adapter *adapter, unsigned int eqid)
*/
int t4vf_handle_fw_rpl(struct adapter *adapter, const __be64 *rpl)
{
struct fw_cmd_hdr *cmd_hdr = (struct fw_cmd_hdr *)rpl;
const struct fw_cmd_hdr *cmd_hdr = (const struct fw_cmd_hdr *)rpl;
u8 opcode = FW_CMD_OP_GET(be32_to_cpu(cmd_hdr->hi));

switch (opcode) {
case FW_PORT_CMD: {
/*
* Link/module state change message.
*/
const struct fw_port_cmd *port_cmd = (void *)rpl;
const struct fw_port_cmd *port_cmd =
(const struct fw_port_cmd *)rpl;
u32 word;
int action, port_id, link_ok, speed, fc, pidx;

Expand Down
Loading

0 comments on commit 033b37a

Please sign in to comment.