forked from luck/tmp_suning_uos_patched
[PATCH] chelsio: whitespace cleanup
Whitespace cleanups. Replace leading spaces with tabs and fix indentation Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
This commit is contained in:
parent
9300abd4c6
commit
205781510d
@ -120,7 +120,7 @@ static void t1_set_rxmode(struct net_device *dev)
|
|||||||
static void link_report(struct port_info *p)
|
static void link_report(struct port_info *p)
|
||||||
{
|
{
|
||||||
if (!netif_carrier_ok(p->dev))
|
if (!netif_carrier_ok(p->dev))
|
||||||
printk(KERN_INFO "%s: link down\n", p->dev->name);
|
printk(KERN_INFO "%s: link down\n", p->dev->name);
|
||||||
else {
|
else {
|
||||||
const char *s = "10Mbps";
|
const char *s = "10Mbps";
|
||||||
|
|
||||||
@ -130,7 +130,7 @@ static void link_report(struct port_info *p)
|
|||||||
case SPEED_100: s = "100Mbps"; break;
|
case SPEED_100: s = "100Mbps"; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
printk(KERN_INFO "%s: link up, %s, %s-duplex\n",
|
printk(KERN_INFO "%s: link up, %s, %s-duplex\n",
|
||||||
p->dev->name, s,
|
p->dev->name, s,
|
||||||
p->link_config.duplex == DUPLEX_FULL ? "full" : "half");
|
p->link_config.duplex == DUPLEX_FULL ? "full" : "half");
|
||||||
}
|
}
|
||||||
@ -261,7 +261,7 @@ static struct net_device_stats *t1_get_stats(struct net_device *dev)
|
|||||||
|
|
||||||
/* Do a full update of the MAC stats */
|
/* Do a full update of the MAC stats */
|
||||||
pstats = p->mac->ops->statistics_update(p->mac,
|
pstats = p->mac->ops->statistics_update(p->mac,
|
||||||
MAC_STATS_UPDATE_FULL);
|
MAC_STATS_UPDATE_FULL);
|
||||||
|
|
||||||
ns->tx_packets = pstats->TxUnicastFramesOK +
|
ns->tx_packets = pstats->TxUnicastFramesOK +
|
||||||
pstats->TxMulticastFramesOK + pstats->TxBroadcastFramesOK;
|
pstats->TxMulticastFramesOK + pstats->TxBroadcastFramesOK;
|
||||||
@ -315,39 +315,39 @@ static void set_msglevel(struct net_device *dev, u32 val)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static char stats_strings[][ETH_GSTRING_LEN] = {
|
static char stats_strings[][ETH_GSTRING_LEN] = {
|
||||||
"TxOctetsOK",
|
"TxOctetsOK",
|
||||||
"TxOctetsBad",
|
"TxOctetsBad",
|
||||||
"TxUnicastFramesOK",
|
"TxUnicastFramesOK",
|
||||||
"TxMulticastFramesOK",
|
"TxMulticastFramesOK",
|
||||||
"TxBroadcastFramesOK",
|
"TxBroadcastFramesOK",
|
||||||
"TxPauseFrames",
|
"TxPauseFrames",
|
||||||
"TxFramesWithDeferredXmissions",
|
"TxFramesWithDeferredXmissions",
|
||||||
"TxLateCollisions",
|
"TxLateCollisions",
|
||||||
"TxTotalCollisions",
|
"TxTotalCollisions",
|
||||||
"TxFramesAbortedDueToXSCollisions",
|
"TxFramesAbortedDueToXSCollisions",
|
||||||
"TxUnderrun",
|
"TxUnderrun",
|
||||||
"TxLengthErrors",
|
"TxLengthErrors",
|
||||||
"TxInternalMACXmitError",
|
"TxInternalMACXmitError",
|
||||||
"TxFramesWithExcessiveDeferral",
|
"TxFramesWithExcessiveDeferral",
|
||||||
"TxFCSErrors",
|
"TxFCSErrors",
|
||||||
|
|
||||||
"RxOctetsOK",
|
"RxOctetsOK",
|
||||||
"RxOctetsBad",
|
"RxOctetsBad",
|
||||||
"RxUnicastFramesOK",
|
"RxUnicastFramesOK",
|
||||||
"RxMulticastFramesOK",
|
"RxMulticastFramesOK",
|
||||||
"RxBroadcastFramesOK",
|
"RxBroadcastFramesOK",
|
||||||
"RxPauseFrames",
|
"RxPauseFrames",
|
||||||
"RxFCSErrors",
|
"RxFCSErrors",
|
||||||
"RxAlignErrors",
|
"RxAlignErrors",
|
||||||
"RxSymbolErrors",
|
"RxSymbolErrors",
|
||||||
"RxDataErrors",
|
"RxDataErrors",
|
||||||
"RxSequenceErrors",
|
"RxSequenceErrors",
|
||||||
"RxRuntErrors",
|
"RxRuntErrors",
|
||||||
"RxJabberErrors",
|
"RxJabberErrors",
|
||||||
"RxInternalMACRcvError",
|
"RxInternalMACRcvError",
|
||||||
"RxInRangeLengthErrors",
|
"RxInRangeLengthErrors",
|
||||||
"RxOutOfRangeLengthField",
|
"RxOutOfRangeLengthField",
|
||||||
"RxFrameTooLongErrors",
|
"RxFrameTooLongErrors",
|
||||||
|
|
||||||
"TSO",
|
"TSO",
|
||||||
"VLANextractions",
|
"VLANextractions",
|
||||||
@ -367,7 +367,7 @@ static char stats_strings[][ETH_GSTRING_LEN] = {
|
|||||||
"tx_reg_pkts",
|
"tx_reg_pkts",
|
||||||
"tx_lso_pkts",
|
"tx_lso_pkts",
|
||||||
"tx_do_cksum",
|
"tx_do_cksum",
|
||||||
|
|
||||||
"espi_DIP2ParityErr",
|
"espi_DIP2ParityErr",
|
||||||
"espi_DIP4Err",
|
"espi_DIP4Err",
|
||||||
"espi_RxDrops",
|
"espi_RxDrops",
|
||||||
@ -375,7 +375,7 @@ static char stats_strings[][ETH_GSTRING_LEN] = {
|
|||||||
"espi_RxOvfl",
|
"espi_RxOvfl",
|
||||||
"espi_ParityErr"
|
"espi_ParityErr"
|
||||||
};
|
};
|
||||||
|
|
||||||
#define T2_REGMAP_SIZE (3 * 1024)
|
#define T2_REGMAP_SIZE (3 * 1024)
|
||||||
|
|
||||||
static int get_regs_len(struct net_device *dev)
|
static int get_regs_len(struct net_device *dev)
|
||||||
@ -417,39 +417,39 @@ static void get_stats(struct net_device *dev, struct ethtool_stats *stats,
|
|||||||
ss = t1_sge_get_port_stats(adapter->sge, dev->if_port);
|
ss = t1_sge_get_port_stats(adapter->sge, dev->if_port);
|
||||||
t = t1_sge_get_intr_counts(adapter->sge);
|
t = t1_sge_get_intr_counts(adapter->sge);
|
||||||
|
|
||||||
*data++ = s->TxOctetsOK;
|
*data++ = s->TxOctetsOK;
|
||||||
*data++ = s->TxOctetsBad;
|
*data++ = s->TxOctetsBad;
|
||||||
*data++ = s->TxUnicastFramesOK;
|
*data++ = s->TxUnicastFramesOK;
|
||||||
*data++ = s->TxMulticastFramesOK;
|
*data++ = s->TxMulticastFramesOK;
|
||||||
*data++ = s->TxBroadcastFramesOK;
|
*data++ = s->TxBroadcastFramesOK;
|
||||||
*data++ = s->TxPauseFrames;
|
*data++ = s->TxPauseFrames;
|
||||||
*data++ = s->TxFramesWithDeferredXmissions;
|
*data++ = s->TxFramesWithDeferredXmissions;
|
||||||
*data++ = s->TxLateCollisions;
|
*data++ = s->TxLateCollisions;
|
||||||
*data++ = s->TxTotalCollisions;
|
*data++ = s->TxTotalCollisions;
|
||||||
*data++ = s->TxFramesAbortedDueToXSCollisions;
|
*data++ = s->TxFramesAbortedDueToXSCollisions;
|
||||||
*data++ = s->TxUnderrun;
|
*data++ = s->TxUnderrun;
|
||||||
*data++ = s->TxLengthErrors;
|
*data++ = s->TxLengthErrors;
|
||||||
*data++ = s->TxInternalMACXmitError;
|
*data++ = s->TxInternalMACXmitError;
|
||||||
*data++ = s->TxFramesWithExcessiveDeferral;
|
*data++ = s->TxFramesWithExcessiveDeferral;
|
||||||
*data++ = s->TxFCSErrors;
|
*data++ = s->TxFCSErrors;
|
||||||
|
|
||||||
*data++ = s->RxOctetsOK;
|
*data++ = s->RxOctetsOK;
|
||||||
*data++ = s->RxOctetsBad;
|
*data++ = s->RxOctetsBad;
|
||||||
*data++ = s->RxUnicastFramesOK;
|
*data++ = s->RxUnicastFramesOK;
|
||||||
*data++ = s->RxMulticastFramesOK;
|
*data++ = s->RxMulticastFramesOK;
|
||||||
*data++ = s->RxBroadcastFramesOK;
|
*data++ = s->RxBroadcastFramesOK;
|
||||||
*data++ = s->RxPauseFrames;
|
*data++ = s->RxPauseFrames;
|
||||||
*data++ = s->RxFCSErrors;
|
*data++ = s->RxFCSErrors;
|
||||||
*data++ = s->RxAlignErrors;
|
*data++ = s->RxAlignErrors;
|
||||||
*data++ = s->RxSymbolErrors;
|
*data++ = s->RxSymbolErrors;
|
||||||
*data++ = s->RxDataErrors;
|
*data++ = s->RxDataErrors;
|
||||||
*data++ = s->RxSequenceErrors;
|
*data++ = s->RxSequenceErrors;
|
||||||
*data++ = s->RxRuntErrors;
|
*data++ = s->RxRuntErrors;
|
||||||
*data++ = s->RxJabberErrors;
|
*data++ = s->RxJabberErrors;
|
||||||
*data++ = s->RxInternalMACRcvError;
|
*data++ = s->RxInternalMACRcvError;
|
||||||
*data++ = s->RxInRangeLengthErrors;
|
*data++ = s->RxInRangeLengthErrors;
|
||||||
*data++ = s->RxOutOfRangeLengthField;
|
*data++ = s->RxOutOfRangeLengthField;
|
||||||
*data++ = s->RxFrameTooLongErrors;
|
*data++ = s->RxFrameTooLongErrors;
|
||||||
|
|
||||||
*data++ = ss->tso;
|
*data++ = ss->tso;
|
||||||
*data++ = ss->vlan_xtract;
|
*data++ = ss->vlan_xtract;
|
||||||
@ -510,12 +510,12 @@ static int get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
|
|||||||
cmd->duplex = -1;
|
cmd->duplex = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd->port = (cmd->supported & SUPPORTED_TP) ? PORT_TP : PORT_FIBRE;
|
cmd->port = (cmd->supported & SUPPORTED_TP) ? PORT_TP : PORT_FIBRE;
|
||||||
cmd->phy_address = p->phy->addr;
|
cmd->phy_address = p->phy->addr;
|
||||||
cmd->transceiver = XCVR_EXTERNAL;
|
cmd->transceiver = XCVR_EXTERNAL;
|
||||||
cmd->autoneg = p->link_config.autoneg;
|
cmd->autoneg = p->link_config.autoneg;
|
||||||
cmd->maxtxpkt = 0;
|
cmd->maxtxpkt = 0;
|
||||||
cmd->maxrxpkt = 0;
|
cmd->maxrxpkt = 0;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -686,7 +686,7 @@ static int set_sge_param(struct net_device *dev, struct ethtool_ringparam *e)
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
if (adapter->flags & FULL_INIT_DONE)
|
if (adapter->flags & FULL_INIT_DONE)
|
||||||
return -EBUSY;
|
return -EBUSY;
|
||||||
|
|
||||||
adapter->params.sge.freelQ_size[!jumbo_fl] = e->rx_pending;
|
adapter->params.sge.freelQ_size[!jumbo_fl] = e->rx_pending;
|
||||||
adapter->params.sge.freelQ_size[jumbo_fl] = e->rx_jumbo_pending;
|
adapter->params.sge.freelQ_size[jumbo_fl] = e->rx_jumbo_pending;
|
||||||
@ -793,34 +793,34 @@ static void cxgb_proc_cleanup(struct adapter *adapter,
|
|||||||
|
|
||||||
static int t1_ioctl(struct net_device *dev, struct ifreq *req, int cmd)
|
static int t1_ioctl(struct net_device *dev, struct ifreq *req, int cmd)
|
||||||
{
|
{
|
||||||
struct adapter *adapter = dev->priv;
|
struct adapter *adapter = dev->priv;
|
||||||
struct mii_ioctl_data *data = if_mii(req);
|
struct mii_ioctl_data *data = if_mii(req);
|
||||||
|
|
||||||
switch (cmd) {
|
switch (cmd) {
|
||||||
case SIOCGMIIPHY:
|
case SIOCGMIIPHY:
|
||||||
data->phy_id = adapter->port[dev->if_port].phy->addr;
|
data->phy_id = adapter->port[dev->if_port].phy->addr;
|
||||||
/* FALLTHRU */
|
/* FALLTHRU */
|
||||||
case SIOCGMIIREG: {
|
case SIOCGMIIREG: {
|
||||||
struct cphy *phy = adapter->port[dev->if_port].phy;
|
struct cphy *phy = adapter->port[dev->if_port].phy;
|
||||||
u32 val;
|
u32 val;
|
||||||
|
|
||||||
if (!phy->mdio_read)
|
if (!phy->mdio_read)
|
||||||
return -EOPNOTSUPP;
|
return -EOPNOTSUPP;
|
||||||
phy->mdio_read(adapter, data->phy_id, 0, data->reg_num & 0x1f,
|
phy->mdio_read(adapter, data->phy_id, 0, data->reg_num & 0x1f,
|
||||||
&val);
|
&val);
|
||||||
data->val_out = val;
|
data->val_out = val;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SIOCSMIIREG: {
|
case SIOCSMIIREG: {
|
||||||
struct cphy *phy = adapter->port[dev->if_port].phy;
|
struct cphy *phy = adapter->port[dev->if_port].phy;
|
||||||
|
|
||||||
if (!capable(CAP_NET_ADMIN))
|
if (!capable(CAP_NET_ADMIN))
|
||||||
return -EPERM;
|
return -EPERM;
|
||||||
if (!phy->mdio_write)
|
if (!phy->mdio_write)
|
||||||
return -EOPNOTSUPP;
|
return -EOPNOTSUPP;
|
||||||
phy->mdio_write(adapter, data->phy_id, 0, data->reg_num & 0x1f,
|
phy->mdio_write(adapter, data->phy_id, 0, data->reg_num & 0x1f,
|
||||||
data->val_in);
|
data->val_in);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -836,9 +836,9 @@ static int t1_change_mtu(struct net_device *dev, int new_mtu)
|
|||||||
struct cmac *mac = adapter->port[dev->if_port].mac;
|
struct cmac *mac = adapter->port[dev->if_port].mac;
|
||||||
|
|
||||||
if (!mac->ops->set_mtu)
|
if (!mac->ops->set_mtu)
|
||||||
return -EOPNOTSUPP;
|
return -EOPNOTSUPP;
|
||||||
if (new_mtu < 68)
|
if (new_mtu < 68)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
if ((ret = mac->ops->set_mtu(mac, new_mtu)))
|
if ((ret = mac->ops->set_mtu(mac, new_mtu)))
|
||||||
return ret;
|
return ret;
|
||||||
dev->mtu = new_mtu;
|
dev->mtu = new_mtu;
|
||||||
@ -889,7 +889,7 @@ static void t1_netpoll(struct net_device *dev)
|
|||||||
struct adapter *adapter = dev->priv;
|
struct adapter *adapter = dev->priv;
|
||||||
|
|
||||||
local_irq_save(flags);
|
local_irq_save(flags);
|
||||||
t1_select_intr_handler(adapter)(adapter->pdev->irq, adapter);
|
t1_select_intr_handler(adapter)(adapter->pdev->irq, adapter);
|
||||||
local_irq_restore(flags);
|
local_irq_restore(flags);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -933,7 +933,7 @@ static void ext_intr_task(void *data)
|
|||||||
adapter->slow_intr_mask |= F_PL_INTR_EXT;
|
adapter->slow_intr_mask |= F_PL_INTR_EXT;
|
||||||
writel(F_PL_INTR_EXT, adapter->regs + A_PL_CAUSE);
|
writel(F_PL_INTR_EXT, adapter->regs + A_PL_CAUSE);
|
||||||
writel(adapter->slow_intr_mask | F_PL_INTR_SGE_DATA,
|
writel(adapter->slow_intr_mask | F_PL_INTR_SGE_DATA,
|
||||||
adapter->regs + A_PL_ENABLE);
|
adapter->regs + A_PL_ENABLE);
|
||||||
spin_unlock_irq(&adapter->async_lock);
|
spin_unlock_irq(&adapter->async_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -949,7 +949,7 @@ void t1_elmer0_ext_intr(struct adapter *adapter)
|
|||||||
*/
|
*/
|
||||||
adapter->slow_intr_mask &= ~F_PL_INTR_EXT;
|
adapter->slow_intr_mask &= ~F_PL_INTR_EXT;
|
||||||
writel(adapter->slow_intr_mask | F_PL_INTR_SGE_DATA,
|
writel(adapter->slow_intr_mask | F_PL_INTR_SGE_DATA,
|
||||||
adapter->regs + A_PL_ENABLE);
|
adapter->regs + A_PL_ENABLE);
|
||||||
schedule_work(&adapter->ext_intr_handler_task);
|
schedule_work(&adapter->ext_intr_handler_task);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -982,7 +982,7 @@ static int __devinit init_one(struct pci_dev *pdev,
|
|||||||
|
|
||||||
err = pci_enable_device(pdev);
|
err = pci_enable_device(pdev);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
if (!(pci_resource_flags(pdev, 0) & IORESOURCE_MEM)) {
|
if (!(pci_resource_flags(pdev, 0) & IORESOURCE_MEM)) {
|
||||||
CH_ERR("%s: cannot find PCI device memory base address\n",
|
CH_ERR("%s: cannot find PCI device memory base address\n",
|
||||||
@ -1014,7 +1014,7 @@ static int __devinit init_one(struct pci_dev *pdev,
|
|||||||
|
|
||||||
pci_set_master(pdev);
|
pci_set_master(pdev);
|
||||||
|
|
||||||
mmio_start = pci_resource_start(pdev, 0);
|
mmio_start = pci_resource_start(pdev, 0);
|
||||||
mmio_len = pci_resource_len(pdev, 0);
|
mmio_len = pci_resource_len(pdev, 0);
|
||||||
bi = t1_get_board_info(ent->driver_data);
|
bi = t1_get_board_info(ent->driver_data);
|
||||||
|
|
||||||
@ -1107,7 +1107,7 @@ static int __devinit init_one(struct pci_dev *pdev,
|
|||||||
#endif
|
#endif
|
||||||
netdev->weight = 64;
|
netdev->weight = 64;
|
||||||
|
|
||||||
SET_ETHTOOL_OPS(netdev, &t1_ethtool_ops);
|
SET_ETHTOOL_OPS(netdev, &t1_ethtool_ops);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (t1_init_sw_modules(adapter, bi) < 0) {
|
if (t1_init_sw_modules(adapter, bi) < 0) {
|
||||||
@ -1134,7 +1134,7 @@ static int __devinit init_one(struct pci_dev *pdev,
|
|||||||
if (!adapter->registered_device_map)
|
if (!adapter->registered_device_map)
|
||||||
adapter->name = adapter->port[i].dev->name;
|
adapter->name = adapter->port[i].dev->name;
|
||||||
|
|
||||||
__set_bit(i, &adapter->registered_device_map);
|
__set_bit(i, &adapter->registered_device_map);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!adapter->registered_device_map) {
|
if (!adapter->registered_device_map) {
|
||||||
|
Loading…
Reference in New Issue
Block a user