Commit f6866fec authored by Linus Torvalds's avatar Linus Torvalds

Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (82 commits)
  [NET]: Make sure sockets implement splice_read
  netconsole: avoid null pointer dereference at show_local_mac()
  [IPV6]: Fix reversed local_df test in ip6_fragment
  [XFRM]: Avoid bogus BUG() when throwing new policy away.
  [AF_KEY]: Fix bug in spdadd
  [NETFILTER] nf_conntrack_proto_tcp.c: Mistyped state corrected.
  net: xfrm statistics depend on INET
  [NETFILTER]: make secmark_tg_destroy() static
  [INET]: Unexport inet_listen_wlock
  [INET]: Unexport __inet_hash_connect
  [NET]: Improve cache line coherency of ingress qdisc
  [NET]: Fix race in dev_close(). (Bug 9750)
  [IPSEC]: Fix bogus usage of u64 on input sequence number
  [RTNETLINK]: Send a single notification on device state changes.
  [NETLABLE]: Hide netlbl_unlabel_audit_addr6 under ifdef CONFIG_IPV6.
  [NETLABEL]: Don't produce unused variables when IPv6 is off.
  [NETLABEL]: Compilation for CONFIG_AUDIT=n case.
  [GENETLINK]: Relax dances with genl_lock.
  [NETLABEL]: Fix lookup logic of netlbl_domhsh_search_def.
  [IPV6]: remove unused method declaration (net/ndisc.h).
  ...
parents 4ee29f6a 997b37da
...@@ -208,6 +208,7 @@ static int hci_uart_close(struct hci_dev *hdev) ...@@ -208,6 +208,7 @@ static int hci_uart_close(struct hci_dev *hdev)
return 0; return 0;
hci_uart_flush(hdev); hci_uart_flush(hdev);
hdev->flush = NULL;
return 0; return 0;
} }
......
...@@ -168,7 +168,7 @@ static int debug = -1; ...@@ -168,7 +168,7 @@ static int debug = -1;
* Warning: 64K ring has hardware issues and may lock up. * Warning: 64K ring has hardware issues and may lock up.
*/ */
#if defined(CONFIG_SH_DREAMCAST) #if defined(CONFIG_SH_DREAMCAST)
#define RX_BUF_IDX 1 /* 16K ring */ #define RX_BUF_IDX 0 /* 8K ring */
#else #else
#define RX_BUF_IDX 2 /* 32K ring */ #define RX_BUF_IDX 2 /* 32K ring */
#endif #endif
......
...@@ -931,6 +931,14 @@ config ENC28J60_WRITEVERIFY ...@@ -931,6 +931,14 @@ config ENC28J60_WRITEVERIFY
Enable the verify after the buffer write useful for debugging purpose. Enable the verify after the buffer write useful for debugging purpose.
If unsure, say N. If unsure, say N.
config DM9000_DEBUGLEVEL
int "DM9000 maximum debug level"
depends on DM9000
default 4
help
The maximum level of debugging code compiled into the DM9000
driver.
config SMC911X config SMC911X
tristate "SMSC LAN911[5678] support" tristate "SMSC LAN911[5678] support"
select CRC32 select CRC32
...@@ -2352,6 +2360,16 @@ config GELIC_NET ...@@ -2352,6 +2360,16 @@ config GELIC_NET
To compile this driver as a module, choose M here: the To compile this driver as a module, choose M here: the
module will be called ps3_gelic. module will be called ps3_gelic.
config GELIC_WIRELESS
bool "PS3 Wireless support"
depends on GELIC_NET
help
This option adds the support for the wireless feature of PS3.
If you have the wireless-less model of PS3 or have no plan to
use wireless feature, disabling this option saves memory. As
the driver automatically distinguishes the models, you can
safely enable this option even if you have a wireless-less model.
config GIANFAR config GIANFAR
tristate "Gianfar Ethernet" tristate "Gianfar Ethernet"
depends on FSL_SOC depends on FSL_SOC
......
...@@ -70,7 +70,8 @@ obj-$(CONFIG_BNX2X) += bnx2x.o ...@@ -70,7 +70,8 @@ obj-$(CONFIG_BNX2X) += bnx2x.o
spidernet-y += spider_net.o spider_net_ethtool.o spidernet-y += spider_net.o spider_net_ethtool.o
obj-$(CONFIG_SPIDER_NET) += spidernet.o sungem_phy.o obj-$(CONFIG_SPIDER_NET) += spidernet.o sungem_phy.o
obj-$(CONFIG_GELIC_NET) += ps3_gelic.o obj-$(CONFIG_GELIC_NET) += ps3_gelic.o
ps3_gelic-objs += ps3_gelic_net.o gelic_wireless-$(CONFIG_GELIC_WIRELESS) += ps3_gelic_wireless.o
ps3_gelic-objs += ps3_gelic_net.o $(gelic_wireless-y)
obj-$(CONFIG_TC35815) += tc35815.o obj-$(CONFIG_TC35815) += tc35815.o
obj-$(CONFIG_SKGE) += skge.o obj-$(CONFIG_SKGE) += skge.o
obj-$(CONFIG_SKY2) += sky2.o obj-$(CONFIG_SKY2) += sky2.o
......
...@@ -404,7 +404,7 @@ void t3_l2t_update(struct t3cdev *dev, struct neighbour *neigh) ...@@ -404,7 +404,7 @@ void t3_l2t_update(struct t3cdev *dev, struct neighbour *neigh)
if (neigh->nud_state & NUD_FAILED) { if (neigh->nud_state & NUD_FAILED) {
arpq = e->arpq_head; arpq = e->arpq_head;
e->arpq_head = e->arpq_tail = NULL; e->arpq_head = e->arpq_tail = NULL;
} else if (neigh_is_connected(neigh)) } else if (neigh->nud_state & (NUD_CONNECTED|NUD_STALE))
setup_l2e_send_pending(dev, NULL, e); setup_l2e_send_pending(dev, NULL, e);
} else { } else {
e->state = neigh_is_connected(neigh) ? e->state = neigh_is_connected(neigh) ?
......
...@@ -1059,6 +1059,14 @@ static void write_tx_pkt_wr(struct adapter *adap, struct sk_buff *skb, ...@@ -1059,6 +1059,14 @@ static void write_tx_pkt_wr(struct adapter *adap, struct sk_buff *skb,
htonl(V_WR_TID(q->token))); htonl(V_WR_TID(q->token)));
} }
static inline void t3_stop_queue(struct net_device *dev, struct sge_qset *qs,
struct sge_txq *q)
{
netif_stop_queue(dev);
set_bit(TXQ_ETH, &qs->txq_stopped);
q->stops++;
}
/** /**
* eth_xmit - add a packet to the Ethernet Tx queue * eth_xmit - add a packet to the Ethernet Tx queue
* @skb: the packet * @skb: the packet
...@@ -1090,31 +1098,18 @@ int t3_eth_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -1090,31 +1098,18 @@ int t3_eth_xmit(struct sk_buff *skb, struct net_device *dev)
ndesc = calc_tx_descs(skb); ndesc = calc_tx_descs(skb);
if (unlikely(credits < ndesc)) { if (unlikely(credits < ndesc)) {
if (!netif_queue_stopped(dev)) { t3_stop_queue(dev, qs, q);
netif_stop_queue(dev); dev_err(&adap->pdev->dev,
set_bit(TXQ_ETH, &qs->txq_stopped); "%s: Tx ring %u full while queue awake!\n",
q->stops++; dev->name, q->cntxt_id & 7);
dev_err(&adap->pdev->dev,
"%s: Tx ring %u full while queue awake!\n",
dev->name, q->cntxt_id & 7);
}
spin_unlock(&q->lock); spin_unlock(&q->lock);
return NETDEV_TX_BUSY; return NETDEV_TX_BUSY;
} }
q->in_use += ndesc; q->in_use += ndesc;
if (unlikely(credits - ndesc < q->stop_thres)) { if (unlikely(credits - ndesc < q->stop_thres))
q->stops++; if (USE_GTS || !should_restart_tx(q))
netif_stop_queue(dev); t3_stop_queue(dev, qs, q);
set_bit(TXQ_ETH, &qs->txq_stopped);
#if !USE_GTS
if (should_restart_tx(q) &&
test_and_clear_bit(TXQ_ETH, &qs->txq_stopped)) {
q->restarts++;
netif_wake_queue(dev);
}
#endif
}
gen = q->gen; gen = q->gen;
q->unacked += ndesc; q->unacked += ndesc;
......
This diff is collapsed.
...@@ -926,8 +926,6 @@ e1000_probe(struct pci_dev *pdev, ...@@ -926,8 +926,6 @@ e1000_probe(struct pci_dev *pdev,
{ {
struct net_device *netdev; struct net_device *netdev;
struct e1000_adapter *adapter; struct e1000_adapter *adapter;
unsigned long mmio_start, mmio_len;
unsigned long flash_start, flash_len;
static int cards_found = 0; static int cards_found = 0;
static int global_quad_port_a = 0; /* global ksp3 port a indication */ static int global_quad_port_a = 0; /* global ksp3 port a indication */
...@@ -970,11 +968,9 @@ e1000_probe(struct pci_dev *pdev, ...@@ -970,11 +968,9 @@ e1000_probe(struct pci_dev *pdev,
adapter->hw.back = adapter; adapter->hw.back = adapter;
adapter->msg_enable = (1 << debug) - 1; adapter->msg_enable = (1 << debug) - 1;
mmio_start = pci_resource_start(pdev, BAR_0);
mmio_len = pci_resource_len(pdev, BAR_0);
err = -EIO; err = -EIO;
adapter->hw.hw_addr = ioremap(mmio_start, mmio_len); adapter->hw.hw_addr = ioremap(pci_resource_start(pdev, BAR_0),
pci_resource_len(pdev, BAR_0));
if (!adapter->hw.hw_addr) if (!adapter->hw.hw_addr)
goto err_ioremap; goto err_ioremap;
...@@ -1009,10 +1005,6 @@ e1000_probe(struct pci_dev *pdev, ...@@ -1009,10 +1005,6 @@ e1000_probe(struct pci_dev *pdev,
#endif #endif
strncpy(netdev->name, pci_name(pdev), sizeof(netdev->name) - 1); strncpy(netdev->name, pci_name(pdev), sizeof(netdev->name) - 1);
netdev->mem_start = mmio_start;
netdev->mem_end = mmio_start + mmio_len;
netdev->base_addr = adapter->hw.io_base;
adapter->bd_number = cards_found; adapter->bd_number = cards_found;
/* setup the private structure */ /* setup the private structure */
...@@ -1025,9 +1017,9 @@ e1000_probe(struct pci_dev *pdev, ...@@ -1025,9 +1017,9 @@ e1000_probe(struct pci_dev *pdev,
* because it depends on mac_type */ * because it depends on mac_type */
if ((adapter->hw.mac_type == e1000_ich8lan) && if ((adapter->hw.mac_type == e1000_ich8lan) &&
(pci_resource_flags(pdev, 1) & IORESOURCE_MEM)) { (pci_resource_flags(pdev, 1) & IORESOURCE_MEM)) {
flash_start = pci_resource_start(pdev, 1); adapter->hw.flash_address =
flash_len = pci_resource_len(pdev, 1); ioremap(pci_resource_start(pdev, 1),
adapter->hw.flash_address = ioremap(flash_start, flash_len); pci_resource_len(pdev, 1));
if (!adapter->hw.flash_address) if (!adapter->hw.flash_address)
goto err_flashmap; goto err_flashmap;
} }
......
This diff is collapsed.
...@@ -309,8 +309,8 @@ static ssize_t show_local_mac(struct netconsole_target *nt, char *buf) ...@@ -309,8 +309,8 @@ static ssize_t show_local_mac(struct netconsole_target *nt, char *buf)
struct net_device *dev = nt->np.dev; struct net_device *dev = nt->np.dev;
DECLARE_MAC_BUF(mac); DECLARE_MAC_BUF(mac);
return snprintf(buf, PAGE_SIZE, "%s\n", return snprintf(buf, PAGE_SIZE, "%s\n", dev ?
print_mac(mac, dev->dev_addr)); print_mac(mac, dev->dev_addr) : "ff:ff:ff:ff:ff:ff");
} }
static ssize_t show_remote_mac(struct netconsole_target *nt, char *buf) static ssize_t show_remote_mac(struct netconsole_target *nt, char *buf)
......
This diff is collapsed.
...@@ -36,12 +36,12 @@ ...@@ -36,12 +36,12 @@
struct scp_struct struct scp_struct
{ {
unsigned short zero_dum0; /* has to be zero */ u16 zero_dum0; /* has to be zero */
unsigned char sysbus; /* 0=16Bit,1=8Bit */ u8 sysbus; /* 0=16Bit,1=8Bit */
unsigned char zero_dum1; /* has to be zero for 586 */ u8 zero_dum1; /* has to be zero for 586 */
unsigned short zero_dum2; u8 zero_dum2;
unsigned short zero_dum3; u8 zero_dum3;
char *iscp; /* pointer to the iscp-block */ u32 iscp; /* pointer to the iscp-block */
}; };
...@@ -50,10 +50,10 @@ struct scp_struct ...@@ -50,10 +50,10 @@ struct scp_struct
*/ */
struct iscp_struct struct iscp_struct
{ {
unsigned char busy; /* 586 clears after successful init */ u8 busy; /* 586 clears after successful init */
unsigned char zero_dummy; /* has to be zero */ u8 zero_dummy; /* has to be zero */
unsigned short scb_offset; /* pointeroffset to the scb_base */ u16 scb_offset; /* pointeroffset to the scb_base */
char *scb_base; /* base-address of all 16-bit offsets */ u32 scb_base; /* base-address of all 16-bit offsets */
}; };
/* /*
...@@ -61,16 +61,16 @@ struct iscp_struct ...@@ -61,16 +61,16 @@ struct iscp_struct
*/ */
struct scb_struct struct scb_struct
{ {
unsigned char rus; u8 rus;
unsigned char cus; u8 cus;
unsigned char cmd_ruc; /* command word: RU part */ u8 cmd_ruc; /* command word: RU part */
unsigned char cmd_cuc; /* command word: CU part & ACK */ u8 cmd_cuc; /* command word: CU part & ACK */
unsigned short cbl_offset; /* pointeroffset, command block list */ u16 cbl_offset; /* pointeroffset, command block list */
unsigned short rfa_offset; /* pointeroffset, receive frame area */ u16 rfa_offset; /* pointeroffset, receive frame area */
unsigned short crc_errs; /* CRC-Error counter */ u16 crc_errs; /* CRC-Error counter */
unsigned short aln_errs; /* alignmenterror counter */ u16 aln_errs; /* alignmenterror counter */
unsigned short rsc_errs; /* Resourceerror counter */ u16 rsc_errs; /* Resourceerror counter */
unsigned short ovrn_errs; /* OVerrunerror counter */ u16 ovrn_errs; /* OVerrunerror counter */
}; };
/* /*
...@@ -119,16 +119,16 @@ struct scb_struct ...@@ -119,16 +119,16 @@ struct scb_struct
*/ */
struct rfd_struct struct rfd_struct
{ {
unsigned char stat_low; /* status word */ u8 stat_low; /* status word */
unsigned char stat_high; /* status word */ u8 stat_high; /* status word */
unsigned char rfd_sf; /* 82596 mode only */ u8 rfd_sf; /* 82596 mode only */
unsigned char last; /* Bit15,Last Frame on List / Bit14,suspend */ u8 last; /* Bit15,Last Frame on List / Bit14,suspend */
unsigned short next; /* linkoffset to next RFD */ u16 next; /* linkoffset to next RFD */
unsigned short rbd_offset; /* pointeroffset to RBD-buffer */ u16 rbd_offset; /* pointeroffset to RBD-buffer */
unsigned char dest[6]; /* ethernet-address, destination */ u8 dest[6]; /* ethernet-address, destination */
unsigned char source[6]; /* ethernet-address, source */ u8 source[6]; /* ethernet-address, source */
unsigned short length; /* 802.3 frame-length */ u16 length; /* 802.3 frame-length */
unsigned short zero_dummy; /* dummy */ u16 zero_dummy; /* dummy */
}; };
#define RFD_LAST 0x80 /* last: last rfd in the list */ #define RFD_LAST 0x80 /* last: last rfd in the list */
...@@ -153,11 +153,11 @@ struct rfd_struct ...@@ -153,11 +153,11 @@ struct rfd_struct
*/ */
struct rbd_struct struct rbd_struct
{ {
unsigned short status; /* status word,number of used bytes in buff */ u16 status; /* status word,number of used bytes in buff */
unsigned short next; /* pointeroffset to next RBD */ u16 next; /* pointeroffset to next RBD */
char *buffer; /* receive buffer address pointer */ u32 buffer; /* receive buffer address pointer */
unsigned short size; /* size of this buffer */ u16 size; /* size of this buffer */
unsigned short zero_dummy; /* dummy */ u16 zero_dummy; /* dummy */
}; };
#define RBD_LAST 0x8000 /* last buffer */ #define RBD_LAST 0x8000 /* last buffer */
...@@ -195,9 +195,9 @@ struct rbd_struct ...@@ -195,9 +195,9 @@ struct rbd_struct
*/ */
struct nop_cmd_struct struct nop_cmd_struct
{ {
unsigned short cmd_status; /* status of this command */ u16 cmd_status; /* status of this command */
unsigned short cmd_cmd; /* the command itself (+bits) */ u16 cmd_cmd; /* the command itself (+bits) */
unsigned short cmd_link; /* offsetpointer to next command */ u16 cmd_link; /* offsetpointer to next command */
}; };
/* /*
...@@ -205,10 +205,10 @@ struct nop_cmd_struct ...@@ -205,10 +205,10 @@ struct nop_cmd_struct
*/ */
struct iasetup_cmd_struct struct iasetup_cmd_struct
{ {
unsigned short cmd_status; u16 cmd_status;
unsigned short cmd_cmd; u16 cmd_cmd;
unsigned short cmd_link; u16 cmd_link;
unsigned char iaddr[6]; u8 iaddr[6];
}; };
/* /*
...@@ -216,21 +216,21 @@ struct iasetup_cmd_struct ...@@ -216,21 +216,21 @@ struct iasetup_cmd_struct
*/ */
struct configure_cmd_struct struct configure_cmd_struct
{ {
unsigned short cmd_status; u16 cmd_status;
unsigned short cmd_cmd; u16 cmd_cmd;
unsigned short cmd_link; u16 cmd_link;
unsigned char byte_cnt; /* size of the config-cmd */ u8 byte_cnt; /* size of the config-cmd */
unsigned char fifo; /* fifo/recv monitor */ u8 fifo; /* fifo/recv monitor */
unsigned char sav_bf; /* save bad frames (bit7=1)*/ u8 sav_bf; /* save bad frames (bit7=1)*/
unsigned char adr_len; /* adr_len(0-2),al_loc(3),pream(4-5),loopbak(6-7)*/ u8 adr_len; /* adr_len(0-2),al_loc(3),pream(4-5),loopbak(6-7)*/
unsigned char priority; /* lin_prio(0-2),exp_prio(4-6),bof_metd(7) */ u8 priority; /* lin_prio(0-2),exp_prio(4-6),bof_metd(7) */
unsigned char ifs; /* inter frame spacing */ u8 ifs; /* inter frame spacing */
unsigned char time_low; /* slot time low */ u8 time_low; /* slot time low */
unsigned char time_high; /* slot time high(0-2) and max. retries(4-7) */ u8 time_high; /* slot time high(0-2) and max. retries(4-7) */
unsigned char promisc; /* promisc-mode(0) , et al (1-7) */ u8 promisc; /* promisc-mode(0) , et al (1-7) */
unsigned char carr_coll; /* carrier(0-3)/collision(4-7) stuff */ u8 carr_coll; /* carrier(0-3)/collision(4-7) stuff */
unsigned char fram_len; /* minimal frame len */ u8 fram_len; /* minimal frame len */
unsigned char dummy; /* dummy */ u8 dummy; /* dummy */
}; };
/* /*
...@@ -238,11 +238,11 @@ struct configure_cmd_struct ...@@ -238,11 +238,11 @@ struct configure_cmd_struct
*/ */
struct mcsetup_cmd_struct struct mcsetup_cmd_struct
{ {
unsigned short cmd_status; u16 cmd_status;
unsigned short cmd_cmd; u16 cmd_cmd;
unsigned short cmd_link; u16 cmd_link;
unsigned short mc_cnt; /* number of bytes in the MC-List */ u16 mc_cnt; /* number of bytes in the MC-List */
unsigned char mc_list[0][6]; /* pointer to 6 bytes entries */ u8 mc_list[0][6]; /* pointer to 6 bytes entries */
}; };
/* /*
...@@ -250,10 +250,10 @@ struct mcsetup_cmd_struct ...@@ -250,10 +250,10 @@ struct mcsetup_cmd_struct
*/ */
struct dump_cmd_struct struct dump_cmd_struct
{ {
unsigned short cmd_status; u16 cmd_status;
unsigned short cmd_cmd; u16 cmd_cmd;
unsigned short cmd_link; u16 cmd_link;
unsigned short dump_offset; /* pointeroffset to DUMP space */ u16 dump_offset; /* pointeroffset to DUMP space */
}; };
/* /*
...@@ -261,12 +261,12 @@ struct dump_cmd_struct ...@@ -261,12 +261,12 @@ struct dump_cmd_struct
*/ */
struct transmit_cmd_struct struct transmit_cmd_struct
{ {
unsigned short cmd_status; u16 cmd_status;
unsigned short cmd_cmd; u16 cmd_cmd;
unsigned short cmd_link; u16 cmd_link;
unsigned short tbd_offset; /* pointeroffset to TBD */ u16 tbd_offset; /* pointeroffset to TBD */
unsigned char dest[6]; /* destination address of the frame */ u8 dest[6]; /* destination address of the frame */
unsigned short length; /* user defined: 802.3 length / Ether type */ u16 length; /* user defined: 802.3 length / Ether type */
}; };
#define TCMD_ERRMASK 0x0fa0 #define TCMD_ERRMASK 0x0fa0
...@@ -281,10 +281,10 @@ struct transmit_cmd_struct ...@@ -281,10 +281,10 @@ struct transmit_cmd_struct
struct tdr_cmd_struct struct tdr_cmd_struct
{ {
unsigned short cmd_status; u16 cmd_status;
unsigned short cmd_cmd; u16 cmd_cmd;
unsigned short cmd_link; u16 cmd_link;
unsigned short status; u16 status;
}; };
#define TDR_LNK_OK 0x8000 /* No link problem identified */ #define TDR_LNK_OK 0x8000 /* No link problem identified */
...@@ -298,9 +298,9 @@ struct tdr_cmd_struct ...@@ -298,9 +298,9 @@ struct tdr_cmd_struct
*/ */
struct tbd_struct struct tbd_struct
{ {
unsigned short size; /* size + EOF-Flag(15) */ u16 size; /* size + EOF-Flag(15) */
unsigned short next; /* pointeroffset to next TBD */ u16 next; /* pointeroffset to next TBD */
char *buffer; /* pointer to buffer */ u32 buffer; /* pointer to buffer */
}; };
#define TBD_LAST 0x8000 /* EOF-Flag, indicates last buffer in list */ #define TBD_LAST 0x8000 /* EOF-Flag, indicates last buffer in list */
......
...@@ -174,7 +174,11 @@ static int homepna[MAX_UNITS]; ...@@ -174,7 +174,11 @@ static int homepna[MAX_UNITS];
#define RX_RING_SIZE (1 << (PCNET32_LOG_RX_BUFFERS)) #define RX_RING_SIZE (1 << (PCNET32_LOG_RX_BUFFERS))
#define RX_MAX_RING_SIZE (1 << (PCNET32_LOG_MAX_RX_BUFFERS)) #define RX_MAX_RING_SIZE (1 << (PCNET32_LOG_MAX_RX_BUFFERS))
#define PKT_BUF_SZ 1544 #define PKT_BUF_SKB 1544
/* actual buffer length after being aligned */
#define PKT_BUF_SIZE (PKT_BUF_SKB - NET_IP_ALIGN)
/* chip wants twos complement of the (aligned) buffer length */
#define NEG_BUF_SIZE (NET_IP_ALIGN - PKT_BUF_SKB)
/* Offsets from base I/O address. */ /* Offsets from base I/O address. */
#define PCNET32_WIO_RDP 0x10 #define PCNET32_WIO_RDP 0x10
...@@ -604,7 +608,7 @@ static void pcnet32_realloc_rx_ring(struct net_device *dev, ...@@ -604,7 +608,7 @@ static void pcnet32_realloc_rx_ring(struct net_device *dev,
/* now allocate any new buffers needed */ /* now allocate any new buffers needed */
for (; new < size; new++ ) { for (; new < size; new++ ) {
struct sk_buff *rx_skbuff; struct sk_buff *rx_skbuff;
new_skb_list[new] = dev_alloc_skb(PKT_BUF_SZ); new_skb_list[new] = dev_alloc_skb(PKT_BUF_SKB);
if (!(rx_skbuff = new_skb_list[new])) { if (!(rx_skbuff = new_skb_list[new])) {
/* keep the original lists and buffers */ /* keep the original lists and buffers */
if (netif_msg_drv(lp)) if (netif_msg_drv(lp))
...@@ -613,20 +617,20 @@ static void pcnet32_realloc_rx_ring(struct net_device *dev, ...@@ -613,20 +617,20 @@ static void pcnet32_realloc_rx_ring(struct net_device *dev,
dev->name); dev->name);
goto free_all_new; goto free_all_new;
} }
skb_reserve(rx_skbuff, 2); skb_reserve(rx_skbuff, NET_IP_ALIGN);
new_dma_addr_list[new] = new_dma_addr_list[new] =
pci_map_single(lp->pci_dev, rx_skbuff->data, pci_map_single(lp->pci_dev, rx_skbuff->data,
PKT_BUF_SZ - 2, PCI_DMA_FROMDEVICE); PKT_BUF_SIZE, PCI_DMA_FROMDEVICE);
new_rx_ring[new].base = cpu_to_le32(new_dma_addr_list[new]); new_rx_ring[new].base = cpu_to_le32(new_dma_addr_list[new]);
new_rx_ring[new].buf_length = cpu_to_le16(2 - PKT_BUF_SZ); new_rx_ring[new].buf_length = cpu_to_le16(NEG_BUF_SIZE);
new_rx_ring[new].status = cpu_to_le16(0x8000); new_rx_ring[new].status = cpu_to_le16(0x8000);
} }
/* and free any unneeded buffers */ /* and free any unneeded buffers */
for (; new < lp->rx_ring_size; new++) { for (; new < lp->rx_ring_size; new++) {
if (lp->rx_skbuff[new]) { if (lp->rx_skbuff[new]) {
pci_unmap_single(lp->pci_dev, lp->rx_dma_addr[new], pci_unmap_single(lp->pci_dev, lp->rx_dma_addr[new],
PKT_BUF_SZ - 2, PCI_DMA_FROMDEVICE); PKT_BUF_SIZE, PCI_DMA_FROMDEVICE);
dev_kfree_skb(lp->rx_skbuff[new]); dev_kfree_skb(lp->rx_skbuff[new]);
} }
} }
...@@ -651,7 +655,7 @@ static void pcnet32_realloc_rx_ring(struct net_device *dev, ...@@ -651,7 +655,7 @@ static void pcnet32_realloc_rx_ring(struct net_device *dev,
for (; --new >= lp->rx_ring_size; ) { for (; --new >= lp->rx_ring_size; ) {
if (new_skb_list[new]) { if (new_skb_list[new]) {
pci_unmap_single(lp->pci_dev, new_dma_addr_list[new], pci_unmap_single(lp->pci_dev, new_dma_addr_list[new],
PKT_BUF_SZ - 2, PCI_DMA_FROMDEVICE); PKT_BUF_SIZE, PCI_DMA_FROMDEVICE);
dev_kfree_skb(new_skb_list[new]); dev_kfree_skb(new_skb_list[new]);
} }
} }
...@@ -678,7 +682,7 @@ static void pcnet32_purge_rx_ring(struct net_device *dev) ...@@ -678,7 +682,7 @@ static void pcnet32_purge_rx_ring(struct net_device *dev)
wmb(); /* Make sure adapter sees owner change */ wmb(); /* Make sure adapter sees owner change */
if (lp->rx_skbuff[i]) { if (lp->rx_skbuff[i]) {
pci_unmap_single(lp->pci_dev, lp->rx_dma_addr[i], pci_unmap_single(lp->pci_dev, lp->rx_dma_addr[i],
PKT_BUF_SZ - 2, PCI_DMA_FROMDEVICE); PKT_BUF_SIZE, PCI_DMA_FROMDEVICE);
dev_kfree_skb_any(lp->rx_skbuff[i]); dev_kfree_skb_any(lp->rx_skbuff[i]);
} }
lp->rx_skbuff[i] = NULL; lp->rx_skbuff[i] = NULL;
...@@ -1201,7 +1205,7 @@ static void pcnet32_rx_entry(struct net_device *dev, ...@@ -1201,7 +1205,7 @@ static void pcnet32_rx_entry(struct net_device *dev,
pkt_len = (le32_to_cpu(rxp->msg_length) & 0xfff) - 4; pkt_len = (le32_to_cpu(rxp->msg_length) & 0xfff) - 4;
/* Discard oversize frames. */ /* Discard oversize frames. */
if (unlikely(pkt_len > PKT_BUF_SZ - 2)) { if (unlikely(pkt_len > PKT_BUF_SIZE)) {
if (netif_msg_drv(lp)) if (netif_msg_drv(lp))
printk(KERN_ERR "%s: Impossible packet size %d!\n", printk(KERN_ERR "%s: Impossible packet size %d!\n",
dev->name, pkt_len); dev->name, pkt_len);
...@@ -1218,26 +1222,26 @@ static void pcnet32_rx_entry(struct net_device *dev, ...@@ -1218,26 +1222,26 @@ static void pcnet32_rx_entry(struct net_device *dev,
if (pkt_len > rx_copybreak) { if (pkt_len > rx_copybreak) {
struct sk_buff *newskb; struct sk_buff *newskb;
if ((newskb = dev_alloc_skb(PKT_BUF_SZ))) { if ((newskb = dev_alloc_skb(PKT_BUF_SKB))) {
skb_reserve(newskb, 2); skb_reserve(newskb, NET_IP_ALIGN);
skb = lp->rx_skbuff[entry]; skb = lp->rx_skbuff[entry];
pci_unmap_single(lp->pci_dev, pci_unmap_single(lp->pci_dev,
lp->rx_dma_addr[entry], lp->rx_dma_addr[entry],
PKT_BUF_SZ - 2, PKT_BUF_SIZE,
PCI_DMA_FROMDEVICE); PCI_DMA_FROMDEVICE);
skb_put(skb, pkt_len); skb_put(skb, pkt_len);
lp->rx_skbuff[entry] = newskb; lp->rx_skbuff[entry] = newskb;
lp->rx_dma_addr[entry] = lp->rx_dma_addr[entry] =
pci_map_single(lp->pci_dev, pci_map_single(lp->pci_dev,
newskb->data, newskb->data,
PKT_BUF_SZ - 2, PKT_BUF_SIZE,
PCI_DMA_FROMDEVICE); PCI_DMA_FROMDEVICE);
rxp->base = cpu_to_le32(lp->rx_dma_addr[entry]); rxp->base = cpu_to_le32(lp->rx_dma_addr[entry]);
rx_in_place = 1; rx_in_place = 1;
} else } else
skb = NULL; skb = NULL;
} else { } else {
skb = dev_alloc_skb(pkt_len + 2); skb = dev_alloc_skb(pkt_len + NET_IP_ALIGN);
} }
if (skb == NULL) { if (skb == NULL) {
...@@ -1250,7 +1254,7 @@ static void pcnet32_rx_entry(struct net_device *dev, ...@@ -1250,7 +1254,7 @@ static void pcnet32_rx_entry(struct net_device *dev,
} }
skb->dev = dev; skb->dev = dev;
if (!rx_in_place) { if (!rx_in_place) {
skb_reserve(skb, 2); /* 16 byte align */ skb_reserve(skb, NET_IP_ALIGN);
skb_put(skb, pkt_len); /* Make room */ skb_put(skb, pkt_len); /* Make room */
pci_dma_sync_single_for_cpu(lp->pci_dev, pci_dma_sync_single_for_cpu(lp->pci_dev,
lp->rx_dma_addr[entry], lp->rx_dma_addr[entry],
...@@ -1291,7 +1295,7 @@ static int pcnet32_rx(struct net_device *dev, int budget) ...@@ -1291,7 +1295,7 @@ static int pcnet32_rx(struct net_device *dev, int budget)
* The docs say that the buffer length isn't touched, but Andrew * The docs say that the buffer length isn't touched, but Andrew
* Boyd of QNX reports that some revs of the 79C965 clear it. * Boyd of QNX reports that some revs of the 79C965 clear it.
*/ */
rxp->buf_length = cpu_to_le16(2 - PKT_BUF_SZ); rxp->buf_length = cpu_to_le16(NEG_BUF_SIZE);
wmb(); /* Make sure owner changes after others are visible */ wmb(); /* Make sure owner changes after others are visible */
rxp->status = cpu_to_le16(0x8000); rxp->status = cpu_to_le16(0x8000);
entry = (++lp->cur_rx) & lp->rx_mod_mask; entry = (++lp->cur_rx) & lp->rx_mod_mask;
...@@ -1774,8 +1778,8 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev) ...@@ -1774,8 +1778,8 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
memset(dev->dev_addr, 0, sizeof(dev->dev_addr)); memset(dev->dev_addr, 0, sizeof(dev->dev_addr));
if (pcnet32_debug & NETIF_MSG_PROBE) { if (pcnet32_debug & NETIF_MSG_PROBE) {
for (i = 0; i < 6; i++) DECLARE_MAC_BUF(mac);
printk(" %2.2x", dev->dev_addr[i]); printk(" %s", print_mac(mac, dev->dev_addr));
/* Version 0x2623 and 0x2624 */ /* Version 0x2623 and 0x2624 */
if (((chip_version + 1) & 0xfffe) == 0x2624) { if (((chip_version + 1) & 0xfffe) == 0x2624) {
...@@ -2396,7 +2400,7 @@ static int pcnet32_init_ring(struct net_device *dev) ...@@ -2396,7 +2400,7 @@ static int pcnet32_init_ring(struct net_device *dev)
if (rx_skbuff == NULL) { if (rx_skbuff == NULL) {
if (! if (!
(rx_skbuff = lp->rx_skbuff[i] = (rx_skbuff = lp->rx_skbuff[i] =
dev_alloc_skb(PKT_BUF_SZ))) { dev_alloc_skb(PKT_BUF_SKB))) {
/* there is not much, we can do at this point */ /* there is not much, we can do at this point */
if (netif_msg_drv(lp)) if (netif_msg_drv(lp))
printk(KERN_ERR printk(KERN_ERR
...@@ -2404,16 +2408,16 @@ static int pcnet32_init_ring(struct net_device *dev) ...@@ -2404,16 +2408,16 @@ static int pcnet32_init_ring(struct net_device *dev)
dev->name); dev->name);
return -1; return -1;
} }
skb_reserve(rx_skbuff, 2); skb_reserve(rx_skbuff, NET_IP_ALIGN);
} }
rmb(); rmb();
if (lp->rx_dma_addr[i] == 0) if (lp->rx_dma_addr[i] == 0)
lp->rx_dma_addr[i] = lp->rx_dma_addr[i] =
pci_map_single(lp->pci_dev, rx_skbuff->data, pci_map_single(lp->pci_dev, rx_skbuff->data,
PKT_BUF_SZ - 2, PCI_DMA_FROMDEVICE); PKT_BUF_SIZE, PCI_DMA_FROMDEVICE);
lp->rx_ring[i].base = cpu_to_le32(lp->rx_dma_addr[i]); lp->rx_ring[i].base = cpu_to_le32(lp->rx_dma_addr[i]);
lp->rx_ring[i].buf_length = cpu_to_le16(2 - PKT_BUF_SZ); lp->rx_ring[i].buf_length = cpu_to_le16(NEG_BUF_SIZE);
wmb(); /* Make sure owner changes after all others are visible */ wmb(); /* Make sure owner changes after all others are visible */
lp->rx_ring[i].status = cpu_to_le16(0x8000); lp->rx_ring[i].status = cpu_to_le16(0x8000);
} }
......
...@@ -236,12 +236,12 @@ module_init(fixed_mdio_bus_init); ...@@ -236,12 +236,12 @@ module_init(fixed_mdio_bus_init);
static void __exit fixed_mdio_bus_exit(void) static void __exit fixed_mdio_bus_exit(void)
{ {
struct fixed_mdio_bus *fmb = &platform_fmb; struct fixed_mdio_bus *fmb = &platform_fmb;
struct fixed_phy *fp; struct fixed_phy *fp, *tmp;
mdiobus_unregister(&fmb->mii_bus); mdiobus_unregister(&fmb->mii_bus);
platform_device_unregister(pdev); platform_device_unregister(pdev);
list_for_each_entry(fp, &fmb->phys, node) { list_for_each_entry_safe(fp, tmp, &fmb->phys, node) {
list_del(&fp->node); list_del(&fp->node);
kfree(fp); kfree(fp);
} }
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -1630,7 +1630,8 @@ static inline void sis190_init_rxfilter(struct net_device *dev) ...@@ -1630,7 +1630,8 @@ static inline void sis190_init_rxfilter(struct net_device *dev)
SIS_PCI_COMMIT(); SIS_PCI_COMMIT();
} }
static int sis190_get_mac_addr(struct pci_dev *pdev, struct net_device *dev) static int __devinit sis190_get_mac_addr(struct pci_dev *pdev,
struct net_device *dev)
{ {
u8 from; u8 from;
......
...@@ -114,11 +114,20 @@ do { \ ...@@ -114,11 +114,20 @@ do { \
debug_event(claw_dbf_##name,level,(void*)(addr),len); \ debug_event(claw_dbf_##name,level,(void*)(addr),len); \
} while (0) } while (0)
/* Allow to sort out low debug levels early to avoid wasted sprints */
static inline int claw_dbf_passes(debug_info_t *dbf_grp, int level)
{
return (level <= dbf_grp->level);
}
#define CLAW_DBF_TEXT_(level,name,text...) \ #define CLAW_DBF_TEXT_(level,name,text...) \
do { \ do { \
sprintf(debug_buffer, text); \ if (claw_dbf_passes(claw_dbf_##name, level)) { \
debug_text_event(claw_dbf_##name,level, debug_buffer);\ sprintf(debug_buffer, text); \
} while (0) debug_text_event(claw_dbf_##name, level, \
debug_buffer); \
} \
} while (0)
/******************************************************* /*******************************************************
* Define Control Blocks * * Define Control Blocks *
...@@ -278,8 +287,6 @@ struct claw_env { ...@@ -278,8 +287,6 @@ struct claw_env {
__u16 write_size; /* write buffer size */ __u16 write_size; /* write buffer size */
__u16 dev_id; /* device ident */ __u16 dev_id; /* device ident */
__u8 packing; /* are we packing? */ __u8 packing; /* are we packing? */
volatile __u8 queme_switch; /* gate for imed packing */
volatile unsigned long pk_delay; /* Delay for adaptive packing */
__u8 in_use; /* device active flag */ __u8 in_use; /* device active flag */
struct net_device *ndev; /* backward ptr to the net dev*/ struct net_device *ndev; /* backward ptr to the net dev*/
}; };
......
...@@ -94,7 +94,7 @@ static int ...@@ -94,7 +94,7 @@ static int
lcs_register_debug_facility(void) lcs_register_debug_facility(void)
{ {
lcs_dbf_setup = debug_register("lcs_setup", 2, 1, 8); lcs_dbf_setup = debug_register("lcs_setup", 2, 1, 8);
lcs_dbf_trace = debug_register("lcs_trace", 2, 2, 8); lcs_dbf_trace = debug_register("lcs_trace", 4, 1, 8);
if (lcs_dbf_setup == NULL || lcs_dbf_trace == NULL) { if (lcs_dbf_setup == NULL || lcs_dbf_trace == NULL) {
PRINT_ERR("Not enough memory for debug facility.\n"); PRINT_ERR("Not enough memory for debug facility.\n");
lcs_unregister_debug_facility(); lcs_unregister_debug_facility();
......
...@@ -16,11 +16,19 @@ do { \ ...@@ -16,11 +16,19 @@ do { \
debug_event(lcs_dbf_##name,level,(void*)(addr),len); \ debug_event(lcs_dbf_##name,level,(void*)(addr),len); \
} while (0) } while (0)
/* Allow to sort out low debug levels early to avoid wasted sprints */
static inline int lcs_dbf_passes(debug_info_t *dbf_grp, int level)
{
return (level <= dbf_grp->level);
}
#define LCS_DBF_TEXT_(level,name,text...) \ #define LCS_DBF_TEXT_(level,name,text...) \
do { \ do { \
sprintf(debug_buffer, text); \ if (lcs_dbf_passes(lcs_dbf_##name, level)) { \
debug_text_event(lcs_dbf_##name,level, debug_buffer);\ sprintf(debug_buffer, text); \
} while (0) debug_text_event(lcs_dbf_##name, level, debug_buffer); \
} \
} while (0)
/** /**
* sysfs related stuff * sysfs related stuff
......
...@@ -97,12 +97,22 @@ MODULE_DESCRIPTION ("Linux for S/390 IUCV network driver"); ...@@ -97,12 +97,22 @@ MODULE_DESCRIPTION ("Linux for S/390 IUCV network driver");
DECLARE_PER_CPU(char[256], iucv_dbf_txt_buf); DECLARE_PER_CPU(char[256], iucv_dbf_txt_buf);
#define IUCV_DBF_TEXT_(name,level,text...) \ /* Allow to sort out low debug levels early to avoid wasted sprints */
do { \ static inline int iucv_dbf_passes(debug_info_t *dbf_grp, int level)
char* iucv_dbf_txt_buf = get_cpu_var(iucv_dbf_txt_buf); \ {
sprintf(iucv_dbf_txt_buf, text); \ return (level <= dbf_grp->level);
debug_text_event(iucv_dbf_##name,level,iucv_dbf_txt_buf); \ }
put_cpu_var(iucv_dbf_txt_buf); \
#define IUCV_DBF_TEXT_(name, level, text...) \
do { \
if (iucv_dbf_passes(iucv_dbf_##name, level)) { \
char* iucv_dbf_txt_buf = \
get_cpu_var(iucv_dbf_txt_buf); \
sprintf(iucv_dbf_txt_buf, text); \
debug_text_event(iucv_dbf_##name, level, \
iucv_dbf_txt_buf); \
put_cpu_var(iucv_dbf_txt_buf); \
} \
} while (0) } while (0)
#define IUCV_DBF_SPRINTF(name,level,text...) \ #define IUCV_DBF_SPRINTF(name,level,text...) \
...@@ -137,6 +147,7 @@ PRINT_##importance(header "%02x %02x %02x %02x %02x %02x %02x %02x " \ ...@@ -137,6 +147,7 @@ PRINT_##importance(header "%02x %02x %02x %02x %02x %02x %02x %02x " \
#define PRINTK_HEADER " iucv: " /* for debugging */ #define PRINTK_HEADER " iucv: " /* for debugging */
static struct device_driver netiucv_driver = { static struct device_driver netiucv_driver = {
.owner = THIS_MODULE,
.name = "netiucv", .name = "netiucv",
.bus = &iucv_bus, .bus = &iucv_bus,
}; };
...@@ -572,9 +583,9 @@ static void netiucv_callback_connres(struct iucv_path *path, u8 ipuser[16]) ...@@ -572,9 +583,9 @@ static void netiucv_callback_connres(struct iucv_path *path, u8 ipuser[16])
} }
/** /**
* Dummy NOP action for all statemachines * NOP action for statemachines
*/ */
static void fsm_action_nop(fsm_instance *fi, int event, void *arg) static void netiucv_action_nop(fsm_instance *fi, int event, void *arg)
{ {
} }
...@@ -1110,7 +1121,7 @@ static const fsm_node dev_fsm[] = { ...@@ -1110,7 +1121,7 @@ static const fsm_node dev_fsm[] = {
{ DEV_STATE_RUNNING, DEV_EVENT_STOP, dev_action_stop }, { DEV_STATE_RUNNING, DEV_EVENT_STOP, dev_action_stop },
{ DEV_STATE_RUNNING, DEV_EVENT_CONDOWN, dev_action_conndown }, { DEV_STATE_RUNNING, DEV_EVENT_CONDOWN, dev_action_conndown },
{ DEV_STATE_RUNNING, DEV_EVENT_CONUP, fsm_action_nop }, { DEV_STATE_RUNNING, DEV_EVENT_CONUP, netiucv_action_nop },
}; };
static const int DEV_FSM_LEN = sizeof(dev_fsm) / sizeof(fsm_node); static const int DEV_FSM_LEN = sizeof(dev_fsm) / sizeof(fsm_node);
......
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
#define DM9000_PLATF_8BITONLY (0x0001) #define DM9000_PLATF_8BITONLY (0x0001)
#define DM9000_PLATF_16BITONLY (0x0002) #define DM9000_PLATF_16BITONLY (0x0002)
#define DM9000_PLATF_32BITONLY (0x0004) #define DM9000_PLATF_32BITONLY (0x0004)
#define DM9000_PLATF_EXT_PHY (0x0008)
#define DM9000_PLATF_NO_EEPROM (0x0010)
/* platfrom data for platfrom device structure's platfrom_data field */ /* platfrom data for platfrom device structure's platfrom_data field */
......
...@@ -604,6 +604,10 @@ struct net_device ...@@ -604,6 +604,10 @@ struct net_device
unsigned char broadcast[MAX_ADDR_LEN]; /* hw bcast add */ unsigned char broadcast[MAX_ADDR_LEN]; /* hw bcast add */
/* ingress path synchronizer */
spinlock_t ingress_lock;
struct Qdisc *qdisc_ingress;
/* /*
* Cache line mostly used on queue transmit path (qdisc) * Cache line mostly used on queue transmit path (qdisc)
*/ */
...@@ -617,10 +621,6 @@ struct net_device ...@@ -617,10 +621,6 @@ struct net_device
/* Partially transmitted GSO packet. */ /* Partially transmitted GSO packet. */
struct sk_buff *gso_skb; struct sk_buff *gso_skb;
/* ingress path synchronizer */
spinlock_t ingress_lock;
struct Qdisc *qdisc_ingress;
/* /*
* One part is mostly used on xmit path (device) * One part is mostly used on xmit path (device)
*/ */
......
...@@ -324,6 +324,7 @@ extern void ax25_dama_on(ax25_cb *); ...@@ -324,6 +324,7 @@ extern void ax25_dama_on(ax25_cb *);
extern void ax25_dama_off(ax25_cb *); extern void ax25_dama_off(ax25_cb *);
/* ax25_ds_timer.c */ /* ax25_ds_timer.c */
extern void ax25_ds_setup_timer(ax25_dev *);
extern void ax25_ds_set_timer(ax25_dev *); extern void ax25_ds_set_timer(ax25_dev *);
extern void ax25_ds_del_timer(ax25_dev *); extern void ax25_ds_del_timer(ax25_dev *);
extern void ax25_ds_timer(ax25_cb *); extern void ax25_ds_timer(ax25_cb *);
...@@ -416,6 +417,7 @@ extern void ax25_calculate_rtt(ax25_cb *); ...@@ -416,6 +417,7 @@ extern void ax25_calculate_rtt(ax25_cb *);
extern void ax25_disconnect(ax25_cb *, int); extern void ax25_disconnect(ax25_cb *, int);
/* ax25_timer.c */ /* ax25_timer.c */
extern void ax25_setup_timers(ax25_cb *);
extern void ax25_start_heartbeat(ax25_cb *); extern void ax25_start_heartbeat(ax25_cb *);
extern void ax25_start_t1timer(ax25_cb *); extern void ax25_start_t1timer(ax25_cb *);
extern void ax25_start_t2timer(ax25_cb *); extern void ax25_start_t2timer(ax25_cb *);
......
...@@ -103,7 +103,6 @@ extern void ndisc_send_redirect(struct sk_buff *skb, ...@@ -103,7 +103,6 @@ extern void ndisc_send_redirect(struct sk_buff *skb,
extern int ndisc_mc_map(struct in6_addr *addr, char *buf, struct net_device *dev, int dir); extern int ndisc_mc_map(struct in6_addr *addr, char *buf, struct net_device *dev, int dir);
struct rt6_info * dflt_rt_lookup(void);
/* /*
* IGMP * IGMP
......
...@@ -508,7 +508,10 @@ struct xfrm_skb_cb { ...@@ -508,7 +508,10 @@ struct xfrm_skb_cb {
} header; } header;
/* Sequence number for replay protection. */ /* Sequence number for replay protection. */
u64 seq; union {
u64 output;
__be32 input;
} seq;
}; };
#define XFRM_SKB_CB(__skb) ((struct xfrm_skb_cb *)&((__skb)->cb[0])) #define XFRM_SKB_CB(__skb) ((struct xfrm_skb_cb *)&((__skb)->cb[0]))
......
...@@ -510,11 +510,7 @@ ax25_cb *ax25_create_cb(void) ...@@ -510,11 +510,7 @@ ax25_cb *ax25_create_cb(void)
skb_queue_head_init(&ax25->ack_queue); skb_queue_head_init(&ax25->ack_queue);
skb_queue_head_init(&ax25->reseq_queue); skb_queue_head_init(&ax25->reseq_queue);
init_timer(&ax25->timer); ax25_setup_timers(ax25);
init_timer(&ax25->t1timer);
init_timer(&ax25->t2timer);
init_timer(&ax25->t3timer);
init_timer(&ax25->idletimer);
ax25_fillin_cb(ax25, NULL); ax25_fillin_cb(ax25, NULL);
...@@ -1928,12 +1924,10 @@ static int ax25_info_show(struct seq_file *seq, void *v) ...@@ -1928,12 +1924,10 @@ static int ax25_info_show(struct seq_file *seq, void *v)
ax25->paclen); ax25->paclen);
if (ax25->sk != NULL) { if (ax25->sk != NULL) {
bh_lock_sock(ax25->sk); seq_printf(seq, " %d %d %lu\n",
seq_printf(seq," %d %d %ld\n",
atomic_read(&ax25->sk->sk_wmem_alloc), atomic_read(&ax25->sk->sk_wmem_alloc),
atomic_read(&ax25->sk->sk_rmem_alloc), atomic_read(&ax25->sk->sk_rmem_alloc),
ax25->sk->sk_socket != NULL ? SOCK_INODE(ax25->sk->sk_socket)->i_ino : 0L); sock_i_ino(ax25->sk));
bh_unlock_sock(ax25->sk);
} else { } else {
seq_puts(seq, " * * *\n"); seq_puts(seq, " * * *\n");
} }
......
...@@ -82,7 +82,7 @@ void ax25_dev_device_up(struct net_device *dev) ...@@ -82,7 +82,7 @@ void ax25_dev_device_up(struct net_device *dev)
ax25_dev->values[AX25_VALUES_DS_TIMEOUT]= AX25_DEF_DS_TIMEOUT; ax25_dev->values[AX25_VALUES_DS_TIMEOUT]= AX25_DEF_DS_TIMEOUT;
#if defined(CONFIG_AX25_DAMA_SLAVE) || defined(CONFIG_AX25_DAMA_MASTER) #if defined(CONFIG_AX25_DAMA_SLAVE) || defined(CONFIG_AX25_DAMA_MASTER)
init_timer(&ax25_dev->dama.slave_timer); ax25_ds_setup_timer(ax25_dev);
#endif #endif
spin_lock_bh(&ax25_dev_lock); spin_lock_bh(&ax25_dev_lock);
......
...@@ -40,13 +40,10 @@ static void ax25_ds_timeout(unsigned long); ...@@ -40,13 +40,10 @@ static void ax25_ds_timeout(unsigned long);
* 1/10th of a second. * 1/10th of a second.
*/ */
static void ax25_ds_add_timer(ax25_dev *ax25_dev) void ax25_ds_setup_timer(ax25_dev *ax25_dev)
{ {
struct timer_list *t = &ax25_dev->dama.slave_timer; setup_timer(&ax25_dev->dama.slave_timer, ax25_ds_timeout,
t->data = (unsigned long) ax25_dev; (unsigned long)ax25_dev);
t->function = &ax25_ds_timeout;
t->expires = jiffies + HZ;
add_timer(t);
} }
void ax25_ds_del_timer(ax25_dev *ax25_dev) void ax25_ds_del_timer(ax25_dev *ax25_dev)
...@@ -60,10 +57,9 @@ void ax25_ds_set_timer(ax25_dev *ax25_dev) ...@@ -60,10 +57,9 @@ void ax25_ds_set_timer(ax25_dev *ax25_dev)
if (ax25_dev == NULL) /* paranoia */ if (ax25_dev == NULL) /* paranoia */
return; return;
del_timer(&ax25_dev->dama.slave_timer);
ax25_dev->dama.slave_timeout = ax25_dev->dama.slave_timeout =
msecs_to_jiffies(ax25_dev->values[AX25_VALUES_DS_TIMEOUT]) / 10; msecs_to_jiffies(ax25_dev->values[AX25_VALUES_DS_TIMEOUT]) / 10;
ax25_ds_add_timer(ax25_dev); mod_timer(&ax25_dev->dama.slave_timer, jiffies + HZ);
} }
/* /*
......
This diff is collapsed.
This diff is collapsed.
...@@ -1071,8 +1071,6 @@ int dev_close(struct net_device *dev) ...@@ -1071,8 +1071,6 @@ int dev_close(struct net_device *dev)
*/ */
call_netdevice_notifiers(NETDEV_GOING_DOWN, dev); call_netdevice_notifiers(NETDEV_GOING_DOWN, dev);
dev_deactivate(dev);
clear_bit(__LINK_STATE_START, &dev->state); clear_bit(__LINK_STATE_START, &dev->state);
/* Synchronize to scheduled poll. We cannot touch poll list, /* Synchronize to scheduled poll. We cannot touch poll list,
...@@ -1083,6 +1081,8 @@ int dev_close(struct net_device *dev) ...@@ -1083,6 +1081,8 @@ int dev_close(struct net_device *dev)
*/ */
smp_mb__after_clear_bit(); /* Commit netif_running(). */ smp_mb__after_clear_bit(); /* Commit netif_running(). */
dev_deactivate(dev);
/* /*
* Call the device specific close. This cannot fail. * Call the device specific close. This cannot fail.
* Only if device is UP * Only if device is UP
......
...@@ -834,18 +834,12 @@ static void neigh_timer_handler(unsigned long arg) ...@@ -834,18 +834,12 @@ static void neigh_timer_handler(unsigned long arg)
} }
if (neigh->nud_state & (NUD_INCOMPLETE | NUD_PROBE)) { if (neigh->nud_state & (NUD_INCOMPLETE | NUD_PROBE)) {
struct sk_buff *skb = skb_peek(&neigh->arp_queue); struct sk_buff *skb = skb_peek(&neigh->arp_queue);
/* keep skb alive even if arp_queue overflows */
if (skb)
skb_get(skb);
write_unlock(&neigh->lock);
neigh->ops->solicit(neigh, skb); neigh->ops->solicit(neigh, skb);
atomic_inc(&neigh->probes); atomic_inc(&neigh->probes);
if (skb)
kfree_skb(skb);
} else {
out:
write_unlock(&neigh->lock);
} }
out:
write_unlock(&neigh->lock);
if (notify) if (notify)
neigh_update_notify(neigh); neigh_update_notify(neigh);
......
This diff is collapsed.
...@@ -2106,11 +2106,10 @@ int skb_append_datato_frags(struct sock *sk, struct sk_buff *skb, ...@@ -2106,11 +2106,10 @@ int skb_append_datato_frags(struct sock *sk, struct sk_buff *skb,
/** /**
* skb_pull_rcsum - pull skb and update receive checksum * skb_pull_rcsum - pull skb and update receive checksum
* @skb: buffer to update * @skb: buffer to update
* @start: start of data before pull
* @len: length of data pulled * @len: length of data pulled
* *
* This function performs an skb_pull on the packet and updates * This function performs an skb_pull on the packet and updates
* update the CHECKSUM_COMPLETE checksum. It should be used on * the CHECKSUM_COMPLETE checksum. It should be used on
* receive path processing instead of skb_pull unless you know * receive path processing instead of skb_pull unless you know
* that the checksum difference is zero (e.g., a valid IP header) * that the checksum difference is zero (e.g., a valid IP header)
* or you are setting ip_summed to CHECKSUM_NONE. * or you are setting ip_summed to CHECKSUM_NONE.
......
...@@ -96,7 +96,7 @@ static int ah_output(struct xfrm_state *x, struct sk_buff *skb) ...@@ -96,7 +96,7 @@ static int ah_output(struct xfrm_state *x, struct sk_buff *skb)
ah->reserved = 0; ah->reserved = 0;
ah->spi = x->id.spi; ah->spi = x->id.spi;
ah->seq_no = htonl(XFRM_SKB_CB(skb)->seq); ah->seq_no = htonl(XFRM_SKB_CB(skb)->seq.output);
spin_lock_bh(&x->lock); spin_lock_bh(&x->lock);
err = ah_mac_digest(ahp, skb, ah->auth_data); err = ah_mac_digest(ahp, skb, ah->auth_data);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -283,7 +283,7 @@ static int ah6_output(struct xfrm_state *x, struct sk_buff *skb) ...@@ -283,7 +283,7 @@ static int ah6_output(struct xfrm_state *x, struct sk_buff *skb)
ah->reserved = 0; ah->reserved = 0;
ah->spi = x->id.spi; ah->spi = x->id.spi;
ah->seq_no = htonl(XFRM_SKB_CB(skb)->seq); ah->seq_no = htonl(XFRM_SKB_CB(skb)->seq.output);
spin_lock_bh(&x->lock); spin_lock_bh(&x->lock);
err = ah_mac_digest(ahp, skb, ah->auth_data); err = ah_mac_digest(ahp, skb, ah->auth_data);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment