Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 19276
b: refs/heads/master
c: 972ec0d
h: refs/heads/master
v: v3
  • Loading branch information
Michael Chan authored and David S. Miller committed Jan 24, 2006
1 parent b8b02db commit c964e65
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 41 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: 1122db717ab5443ca9043fc0d23c1e862cfb3a61
refs/heads/master: 972ec0d4ba67bf0ec7f00cd93fbac47452f80d25
80 changes: 40 additions & 40 deletions trunk/drivers/net/bnx2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1799,7 +1799,7 @@ static irqreturn_t
bnx2_msi(int irq, void *dev_instance, struct pt_regs *regs)
{
struct net_device *dev = dev_instance;
struct bnx2 *bp = dev->priv;
struct bnx2 *bp = netdev_priv(dev);

prefetch(bp->status_blk);
REG_WR(bp, BNX2_PCICFG_INT_ACK_CMD,
Expand All @@ -1819,7 +1819,7 @@ static irqreturn_t
bnx2_interrupt(int irq, void *dev_instance, struct pt_regs *regs)
{
struct net_device *dev = dev_instance;
struct bnx2 *bp = dev->priv;
struct bnx2 *bp = netdev_priv(dev);

/* When using INTx, it is possible for the interrupt to arrive
* at the CPU before the status block posted prior to the
Expand Down Expand Up @@ -1864,7 +1864,7 @@ bnx2_has_work(struct bnx2 *bp)
static int
bnx2_poll(struct net_device *dev, int *budget)
{
struct bnx2 *bp = dev->priv;
struct bnx2 *bp = netdev_priv(dev);

if ((bp->status_blk->status_attn_bits &
STATUS_ATTN_BITS_LINK_STATE) !=
Expand Down Expand Up @@ -1922,7 +1922,7 @@ bnx2_poll(struct net_device *dev, int *budget)
static void
bnx2_set_rx_mode(struct net_device *dev)
{
struct bnx2 *bp = dev->priv;
struct bnx2 *bp = netdev_priv(dev);
u32 rx_mode, sort_mode;
int i;

Expand Down Expand Up @@ -4194,7 +4194,7 @@ bnx2_timer(unsigned long data)
static int
bnx2_open(struct net_device *dev)
{
struct bnx2 *bp = dev->priv;
struct bnx2 *bp = netdev_priv(dev);
int rc;

bnx2_set_power_state(bp, PCI_D0);
Expand Down Expand Up @@ -4307,7 +4307,7 @@ bnx2_reset_task(void *data)
static void
bnx2_tx_timeout(struct net_device *dev)
{
struct bnx2 *bp = dev->priv;
struct bnx2 *bp = netdev_priv(dev);

/* This allows the netif to be shutdown gracefully before resetting */
schedule_work(&bp->reset_task);
Expand All @@ -4318,7 +4318,7 @@ bnx2_tx_timeout(struct net_device *dev)
static void
bnx2_vlan_rx_register(struct net_device *dev, struct vlan_group *vlgrp)
{
struct bnx2 *bp = dev->priv;
struct bnx2 *bp = netdev_priv(dev);

bnx2_netif_stop(bp);

Expand All @@ -4332,7 +4332,7 @@ bnx2_vlan_rx_register(struct net_device *dev, struct vlan_group *vlgrp)
static void
bnx2_vlan_rx_kill_vid(struct net_device *dev, uint16_t vid)
{
struct bnx2 *bp = dev->priv;
struct bnx2 *bp = netdev_priv(dev);

bnx2_netif_stop(bp);

Expand All @@ -4353,7 +4353,7 @@ bnx2_vlan_rx_kill_vid(struct net_device *dev, uint16_t vid)
static int
bnx2_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct bnx2 *bp = dev->priv;
struct bnx2 *bp = netdev_priv(dev);
dma_addr_t mapping;
struct tx_bd *txbd;
struct sw_bd *tx_buf;
Expand Down Expand Up @@ -4482,7 +4482,7 @@ bnx2_start_xmit(struct sk_buff *skb, struct net_device *dev)
static int
bnx2_close(struct net_device *dev)
{
struct bnx2 *bp = dev->priv;
struct bnx2 *bp = netdev_priv(dev);
u32 reset_code;

/* Calling flush_scheduled_work() may deadlock because
Expand Down Expand Up @@ -4530,7 +4530,7 @@ bnx2_close(struct net_device *dev)
static struct net_device_stats *
bnx2_get_stats(struct net_device *dev)
{
struct bnx2 *bp = dev->priv;
struct bnx2 *bp = netdev_priv(dev);
struct statistics_block *stats_blk = bp->stats_blk;
struct net_device_stats *net_stats = &bp->net_stats;

Expand Down Expand Up @@ -4604,7 +4604,7 @@ bnx2_get_stats(struct net_device *dev)
static int
bnx2_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
{
struct bnx2 *bp = dev->priv;
struct bnx2 *bp = netdev_priv(dev);

cmd->supported = SUPPORTED_Autoneg;
if (bp->phy_flags & PHY_SERDES_FLAG) {
Expand Down Expand Up @@ -4651,7 +4651,7 @@ bnx2_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
static int
bnx2_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
{
struct bnx2 *bp = dev->priv;
struct bnx2 *bp = netdev_priv(dev);
u8 autoneg = bp->autoneg;
u8 req_duplex = bp->req_duplex;
u16 req_line_speed = bp->req_line_speed;
Expand Down Expand Up @@ -4723,7 +4723,7 @@ bnx2_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
static void
bnx2_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
{
struct bnx2 *bp = dev->priv;
struct bnx2 *bp = netdev_priv(dev);

strcpy(info->driver, DRV_MODULE_NAME);
strcpy(info->version, DRV_MODULE_VERSION);
Expand All @@ -4739,7 +4739,7 @@ bnx2_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
static void
bnx2_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
{
struct bnx2 *bp = dev->priv;
struct bnx2 *bp = netdev_priv(dev);

if (bp->flags & NO_WOL_FLAG) {
wol->supported = 0;
Expand All @@ -4758,7 +4758,7 @@ bnx2_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
static int
bnx2_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
{
struct bnx2 *bp = dev->priv;
struct bnx2 *bp = netdev_priv(dev);

if (wol->wolopts & ~WAKE_MAGIC)
return -EINVAL;
Expand All @@ -4778,7 +4778,7 @@ bnx2_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
static int
bnx2_nway_reset(struct net_device *dev)
{
struct bnx2 *bp = dev->priv;
struct bnx2 *bp = netdev_priv(dev);
u32 bmcr;

if (!(bp->autoneg & AUTONEG_SPEED)) {
Expand Down Expand Up @@ -4814,7 +4814,7 @@ bnx2_nway_reset(struct net_device *dev)
static int
bnx2_get_eeprom_len(struct net_device *dev)
{
struct bnx2 *bp = dev->priv;
struct bnx2 *bp = netdev_priv(dev);

if (bp->flash_info == NULL)
return 0;
Expand All @@ -4826,7 +4826,7 @@ static int
bnx2_get_eeprom(struct net_device *dev, struct ethtool_eeprom *eeprom,
u8 *eebuf)
{
struct bnx2 *bp = dev->priv;
struct bnx2 *bp = netdev_priv(dev);
int rc;

/* parameters already validated in ethtool_get_eeprom */
Expand All @@ -4840,7 +4840,7 @@ static int
bnx2_set_eeprom(struct net_device *dev, struct ethtool_eeprom *eeprom,
u8 *eebuf)
{
struct bnx2 *bp = dev->priv;
struct bnx2 *bp = netdev_priv(dev);
int rc;

/* parameters already validated in ethtool_set_eeprom */
Expand All @@ -4853,7 +4853,7 @@ bnx2_set_eeprom(struct net_device *dev, struct ethtool_eeprom *eeprom,
static int
bnx2_get_coalesce(struct net_device *dev, struct ethtool_coalesce *coal)
{
struct bnx2 *bp = dev->priv;
struct bnx2 *bp = netdev_priv(dev);

memset(coal, 0, sizeof(struct ethtool_coalesce));

Expand All @@ -4875,7 +4875,7 @@ bnx2_get_coalesce(struct net_device *dev, struct ethtool_coalesce *coal)
static int
bnx2_set_coalesce(struct net_device *dev, struct ethtool_coalesce *coal)
{
struct bnx2 *bp = dev->priv;
struct bnx2 *bp = netdev_priv(dev);

bp->rx_ticks = (u16) coal->rx_coalesce_usecs;
if (bp->rx_ticks > 0x3ff) bp->rx_ticks = 0x3ff;
Expand Down Expand Up @@ -4919,7 +4919,7 @@ bnx2_set_coalesce(struct net_device *dev, struct ethtool_coalesce *coal)
static void
bnx2_get_ringparam(struct net_device *dev, struct ethtool_ringparam *ering)
{
struct bnx2 *bp = dev->priv;
struct bnx2 *bp = netdev_priv(dev);

ering->rx_max_pending = MAX_RX_DESC_CNT;
ering->rx_mini_max_pending = 0;
Expand All @@ -4936,7 +4936,7 @@ bnx2_get_ringparam(struct net_device *dev, struct ethtool_ringparam *ering)
static int
bnx2_set_ringparam(struct net_device *dev, struct ethtool_ringparam *ering)
{
struct bnx2 *bp = dev->priv;
struct bnx2 *bp = netdev_priv(dev);

if ((ering->rx_pending > MAX_RX_DESC_CNT) ||
(ering->tx_pending > MAX_TX_DESC_CNT) ||
Expand All @@ -4959,7 +4959,7 @@ bnx2_set_ringparam(struct net_device *dev, struct ethtool_ringparam *ering)
static void
bnx2_get_pauseparam(struct net_device *dev, struct ethtool_pauseparam *epause)
{
struct bnx2 *bp = dev->priv;
struct bnx2 *bp = netdev_priv(dev);

epause->autoneg = ((bp->autoneg & AUTONEG_FLOW_CTRL) != 0);
epause->rx_pause = ((bp->flow_ctrl & FLOW_CTRL_RX) != 0);
Expand All @@ -4969,7 +4969,7 @@ bnx2_get_pauseparam(struct net_device *dev, struct ethtool_pauseparam *epause)
static int
bnx2_set_pauseparam(struct net_device *dev, struct ethtool_pauseparam *epause)
{
struct bnx2 *bp = dev->priv;
struct bnx2 *bp = netdev_priv(dev);

bp->req_flow_ctrl = 0;
if (epause->rx_pause)
Expand All @@ -4996,15 +4996,15 @@ bnx2_set_pauseparam(struct net_device *dev, struct ethtool_pauseparam *epause)
static u32
bnx2_get_rx_csum(struct net_device *dev)
{
struct bnx2 *bp = dev->priv;
struct bnx2 *bp = netdev_priv(dev);

return bp->rx_csum;
}

static int
bnx2_set_rx_csum(struct net_device *dev, u32 data)
{
struct bnx2 *bp = dev->priv;
struct bnx2 *bp = netdev_priv(dev);

bp->rx_csum = data;
return 0;
Expand Down Expand Up @@ -5153,7 +5153,7 @@ bnx2_self_test_count(struct net_device *dev)
static void
bnx2_self_test(struct net_device *dev, struct ethtool_test *etest, u64 *buf)
{
struct bnx2 *bp = dev->priv;
struct bnx2 *bp = netdev_priv(dev);

memset(buf, 0, sizeof(u64) * BNX2_NUM_TESTS);
if (etest->flags & ETH_TEST_FL_OFFLINE) {
Expand Down Expand Up @@ -5229,7 +5229,7 @@ static void
bnx2_get_ethtool_stats(struct net_device *dev,
struct ethtool_stats *stats, u64 *buf)
{
struct bnx2 *bp = dev->priv;
struct bnx2 *bp = netdev_priv(dev);
int i;
u32 *hw_stats = (u32 *) bp->stats_blk;
u8 *stats_len_arr = NULL;
Expand Down Expand Up @@ -5269,7 +5269,7 @@ bnx2_get_ethtool_stats(struct net_device *dev,
static int
bnx2_phys_id(struct net_device *dev, u32 data)
{
struct bnx2 *bp = dev->priv;
struct bnx2 *bp = netdev_priv(dev);
int i;
u32 save;

Expand Down Expand Up @@ -5341,7 +5341,7 @@ static int
bnx2_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
{
struct mii_ioctl_data *data = if_mii(ifr);
struct bnx2 *bp = dev->priv;
struct bnx2 *bp = netdev_priv(dev);
int err;

switch(cmd) {
Expand Down Expand Up @@ -5383,7 +5383,7 @@ static int
bnx2_change_mac_addr(struct net_device *dev, void *p)
{
struct sockaddr *addr = p;
struct bnx2 *bp = dev->priv;
struct bnx2 *bp = netdev_priv(dev);

if (!is_valid_ether_addr(addr->sa_data))
return -EINVAL;
Expand All @@ -5399,7 +5399,7 @@ bnx2_change_mac_addr(struct net_device *dev, void *p)
static int
bnx2_change_mtu(struct net_device *dev, int new_mtu)
{
struct bnx2 *bp = dev->priv;
struct bnx2 *bp = netdev_priv(dev);

if (((new_mtu + ETH_HLEN) > MAX_ETHERNET_JUMBO_PACKET_SIZE) ||
((new_mtu + ETH_HLEN) < MIN_ETHERNET_PACKET_SIZE))
Expand All @@ -5420,7 +5420,7 @@ bnx2_change_mtu(struct net_device *dev, int new_mtu)
static void
poll_bnx2(struct net_device *dev)
{
struct bnx2 *bp = dev->priv;
struct bnx2 *bp = netdev_priv(dev);

disable_irq(bp->pdev->irq);
bnx2_interrupt(bp->pdev->irq, dev, NULL);
Expand All @@ -5438,7 +5438,7 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)

SET_MODULE_OWNER(dev);
SET_NETDEV_DEV(dev, &pdev->dev);
bp = dev->priv;
bp = netdev_priv(dev);

bp->flags = 0;
bp->phy_flags = 0;
Expand Down Expand Up @@ -5757,7 +5757,7 @@ bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
dev->ethtool_ops = &bnx2_ethtool_ops;
dev->weight = 64;

bp = dev->priv;
bp = netdev_priv(dev);

#if defined(HAVE_POLL_CONTROLLER) || defined(CONFIG_NET_POLL_CONTROLLER)
dev->poll_controller = poll_bnx2;
Expand Down Expand Up @@ -5816,7 +5816,7 @@ static void __devexit
bnx2_remove_one(struct pci_dev *pdev)
{
struct net_device *dev = pci_get_drvdata(pdev);
struct bnx2 *bp = dev->priv;
struct bnx2 *bp = netdev_priv(dev);

flush_scheduled_work();

Expand All @@ -5835,7 +5835,7 @@ static int
bnx2_suspend(struct pci_dev *pdev, pm_message_t state)
{
struct net_device *dev = pci_get_drvdata(pdev);
struct bnx2 *bp = dev->priv;
struct bnx2 *bp = netdev_priv(dev);
u32 reset_code;

if (!netif_running(dev))
Expand All @@ -5860,7 +5860,7 @@ static int
bnx2_resume(struct pci_dev *pdev)
{
struct net_device *dev = pci_get_drvdata(pdev);
struct bnx2 *bp = dev->priv;
struct bnx2 *bp = netdev_priv(dev);

if (!netif_running(dev))
return 0;
Expand Down

0 comments on commit c964e65

Please sign in to comment.