Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Browse files Browse the repository at this point in the history
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (95 commits)
  b44: GFP_DMA skb should not escape from driver
  korina: do not use IRQF_SHARED with IRQF_DISABLED
  korina: do not stop queue here
  korina: fix handling tx_chain_tail
  korina: do tx at the right position
  korina: do schedule napi after testing for it
  korina: rework korina_rx() for use with napi
  korina: disable napi on close and restart
  korina: reset resource buffer size to 1536
  korina: fix usage of driver_data
  bnx2x: First slow path interrupt race
  bnx2x: MTU Filter
  bnx2x: Indirection table initialization index
  bnx2x: Missing brackets
  bnx2x: Fixing the doorbell size
  bnx2x: Endianness issues
  bnx2x: VLAN tagged packets without VLAN offload
  bnx2x: Protecting the link change indication
  bnx2x: Flow control updated before reporting the link
  bnx2x: Missing mask when calculating flow control
  ...
  • Loading branch information
Linus Torvalds committed Jan 16, 2009
2 parents 7e92214 + a58c891 commit 3feeba1
Show file tree
Hide file tree
Showing 76 changed files with 942 additions and 658 deletions.
9 changes: 3 additions & 6 deletions drivers/isdn/i4l/isdn_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,9 @@ isdn_net_unbind_channel(isdn_net_local * lp)
lp->dialstate = 0;
dev->rx_netdev[isdn_dc2minor(lp->isdn_device, lp->isdn_channel)] = NULL;
dev->st_netdev[isdn_dc2minor(lp->isdn_device, lp->isdn_channel)] = NULL;
isdn_free_channel(lp->isdn_device, lp->isdn_channel, ISDN_USAGE_NET);
if (lp->isdn_device != -1 && lp->isdn_channel != -1)
isdn_free_channel(lp->isdn_device, lp->isdn_channel,
ISDN_USAGE_NET);
lp->flags &= ~ISDN_NET_CONNECTED;
lp->isdn_device = -1;
lp->isdn_channel = -1;
Expand Down Expand Up @@ -2513,7 +2515,6 @@ static const struct net_device_ops isdn_netdev_ops = {
.ndo_stop = isdn_net_close,
.ndo_do_ioctl = isdn_net_ioctl,

.ndo_validate_addr = NULL,
.ndo_start_xmit = isdn_net_start_xmit,
.ndo_get_stats = isdn_net_get_stats,
.ndo_tx_timeout = isdn_net_tx_timeout,
Expand All @@ -2528,12 +2529,8 @@ static void _isdn_setup(struct net_device *dev)

ether_setup(dev);

dev->flags = IFF_NOARP | IFF_POINTOPOINT;
/* Setup the generic properties */
dev->mtu = 1500;
dev->flags = IFF_NOARP|IFF_POINTOPOINT;
dev->type = ARPHRD_ETHER;
dev->addr_len = ETH_ALEN;
dev->header_ops = NULL;
dev->netdev_ops = &isdn_netdev_ops;

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/arm/etherh.c
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ static const struct net_device_ops etherh_netdev_ops = {
.ndo_get_stats = ei_get_stats,
.ndo_set_multicast_list = ei_set_multicast_list,
.ndo_validate_addr = eth_validate_addr,
.ndo_set_mac_addr = eth_set_mac_addr,
.ndo_set_mac_address = eth_set_mac_addr,
.ndo_change_mtu = eth_change_mtu,
#ifdef CONFIG_NET_POLL_CONTROLLER
.ndo_poll_controller = ei_poll,
Expand Down
27 changes: 21 additions & 6 deletions drivers/net/ax88796.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ static int phy_debug = 0;
#define __ei_open ax_ei_open
#define __ei_close ax_ei_close
#define __ei_poll ax_ei_poll
#define __ei_start_xmit ax_ei_start_xmit
#define __ei_tx_timeout ax_ei_tx_timeout
#define __ei_get_stats ax_ei_get_stats
#define __ei_set_multicast_list ax_ei_set_multicast_list
#define __ei_interrupt ax_ei_interrupt
#define ____alloc_ei_netdev ax__alloc_ei_netdev
#define __NS8390_init ax_NS8390_init
Expand Down Expand Up @@ -623,6 +626,23 @@ static void ax_eeprom_register_write(struct eeprom_93cx6 *eeprom)
}
#endif

static const struct net_device_ops ax_netdev_ops = {
.ndo_open = ax_open,
.ndo_stop = ax_close,
.ndo_do_ioctl = ax_ioctl,

.ndo_start_xmit = ax_ei_start_xmit,
.ndo_tx_timeout = ax_ei_tx_timeout,
.ndo_get_stats = ax_ei_get_stats,
.ndo_set_multicast_list = ax_ei_set_multicast_list,
.ndo_validate_addr = eth_validate_addr,
.ndo_set_mac_address = eth_mac_addr,
.ndo_change_mtu = eth_change_mtu,
#ifdef CONFIG_NET_POLL_CONTROLLER
.ndo_poll_controller = ax_ei_poll,
#endif
};

/* setup code */

static void ax_initial_setup(struct net_device *dev, struct ei_device *ei_local)
Expand Down Expand Up @@ -738,9 +758,7 @@ static int ax_init_dev(struct net_device *dev, int first_init)
ei_status.get_8390_hdr = &ax_get_8390_hdr;
ei_status.priv = 0;

dev->open = ax_open;
dev->stop = ax_close;
dev->do_ioctl = ax_ioctl;
dev->netdev_ops = &ax_netdev_ops;
dev->ethtool_ops = &ax_ethtool_ops;

ax->msg_enable = NETIF_MSG_LINK;
Expand All @@ -753,9 +771,6 @@ static int ax_init_dev(struct net_device *dev, int first_init)
ax->mii.mdio_write = ax_phy_write;
ax->mii.dev = dev;

#ifdef CONFIG_NET_POLL_CONTROLLER
dev->poll_controller = ax_ei_poll;
#endif
ax_NS8390_init(dev, 0);

if (first_init)
Expand Down
4 changes: 3 additions & 1 deletion drivers/net/b44.c
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,7 @@ static int b44_alloc_rx_skb(struct b44 *bp, int src_idx, u32 dest_idx_unmasked)
dev_kfree_skb_any(skb);
return -ENOMEM;
}
bp->force_copybreak = 1;
}

rh = (struct rx_header *) skb->data;
Expand Down Expand Up @@ -800,7 +801,7 @@ static int b44_rx(struct b44 *bp, int budget)
/* Omit CRC. */
len -= 4;

if (len > RX_COPY_THRESHOLD) {
if (!bp->force_copybreak && len > RX_COPY_THRESHOLD) {
int skb_size;
skb_size = b44_alloc_rx_skb(bp, cons, bp->rx_prod);
if (skb_size < 0)
Expand Down Expand Up @@ -2152,6 +2153,7 @@ static int __devinit b44_init_one(struct ssb_device *sdev,
bp = netdev_priv(dev);
bp->sdev = sdev;
bp->dev = dev;
bp->force_copybreak = 0;

bp->msg_enable = netif_msg_init(b44_debug, B44_DEF_MSG_ENABLE);

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/b44.h
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ struct b44 {
u32 rx_pending;
u32 tx_pending;
u8 phy_addr;

u8 force_copybreak;
struct mii_if_info mii_if;
};

Expand Down
19 changes: 12 additions & 7 deletions drivers/net/bnx2x.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
* (you will need to reboot afterwards) */
/* #define BNX2X_STOP_ON_ERROR */

#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
#define BCM_VLAN 1
#endif


/* error/debug prints */

#define DRV_MODULE_NAME "bnx2x"
Expand Down Expand Up @@ -78,11 +83,6 @@
#endif


#ifdef NETIF_F_HW_VLAN_TX
#define BCM_VLAN 1
#endif


#define U64_LO(x) (u32)(((u64)(x)) & 0xffffffff)
#define U64_HI(x) (u32)(((u64)(x)) >> 32)
#define HILO_U64(hi, lo) ((((u64)(hi)) << 32) + (lo))
Expand Down Expand Up @@ -150,6 +150,9 @@ struct sw_rx_page {

#define PAGES_PER_SGE_SHIFT 0
#define PAGES_PER_SGE (1 << PAGES_PER_SGE_SHIFT)
#define SGE_PAGE_SIZE PAGE_SIZE
#define SGE_PAGE_SHIFT PAGE_SHIFT
#define SGE_PAGE_ALIGN(addr) PAGE_ALIGN(addr)

#define BCM_RX_ETH_PAYLOAD_ALIGN 64

Expand Down Expand Up @@ -736,7 +739,7 @@ struct bnx2x {
struct bnx2x_fastpath fp[MAX_CONTEXT];
void __iomem *regview;
void __iomem *doorbells;
#define BNX2X_DB_SIZE (16*2048)
#define BNX2X_DB_SIZE (16*BCM_PAGE_SIZE)

struct net_device *dev;
struct pci_dev *pdev;
Expand Down Expand Up @@ -801,6 +804,8 @@ struct bnx2x {
#define TPA_ENABLE_FLAG 0x80
#define NO_MCP_FLAG 0x100
#define BP_NOMCP(bp) (bp->flags & NO_MCP_FLAG)
#define HW_VLAN_TX_FLAG 0x400
#define HW_VLAN_RX_FLAG 0x800

int func;
#define BP_PORT(bp) (bp->func % PORT_MAX)
Expand All @@ -811,7 +816,7 @@ struct bnx2x {
int pm_cap;
int pcie_cap;

struct work_struct sp_task;
struct delayed_work sp_task;
struct work_struct reset_task;

struct timer_list timer;
Expand Down
Loading

0 comments on commit 3feeba1

Please sign in to comment.