Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 315157
b: refs/heads/master
c: 065f5f9
h: refs/heads/master
i:
  315155: e823012
v: v3
  • Loading branch information
David S. Miller committed Jul 12, 2012
1 parent d9ffcda commit 2ac3ad2
Show file tree
Hide file tree
Showing 63 changed files with 1,391 additions and 540 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: 0b7f5d0b658a2596e582f1660670dcd1c1fc468e
refs/heads/master: 065f5f9749202cf91dae6f39ad7e9fe8801023b5
14 changes: 14 additions & 0 deletions trunk/Documentation/networking/ip-sysctl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,20 @@ tcp_thin_dupack - BOOLEAN
Documentation/networking/tcp-thin.txt
Default: 0

tcp_limit_output_bytes - INTEGER
Controls TCP Small Queue limit per tcp socket.
TCP bulk sender tends to increase packets in flight until it
gets losses notifications. With SNDBUF autotuning, this can
result in a large amount of packets queued in qdisc/device
on the local machine, hurting latency of other flows, for
typical pfifo_fast qdiscs.
tcp_limit_output_bytes limits the number of bytes on qdisc
or device to reduce artificial RTT/cwnd and reduce bufferbloat.
Note: For GSO/TSO enabled flows, we try to have at least two
packets in flight. Reducing tcp_limit_output_bytes might also
reduce the size of individual GSO packet (64KB being the max)
Default: 131072

UDP variables:

udp_mem - vector of 3 INTEGERs: min, pressure, max
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/****************************************************************************/

/*
* mcfne.h -- NE2000 in ColdFire eval boards.
* mcf8390.h -- NS8390 support for ColdFire eval boards.
*
* (C) Copyright 1999-2000, Greg Ungerer (gerg@snapgear.com)
* (C) Copyright 2000, Lineo (www.lineo.com)
Expand All @@ -14,8 +14,8 @@
*/

/****************************************************************************/
#ifndef mcfne_h
#define mcfne_h
#ifndef mcf8390_h
#define mcf8390_h
/****************************************************************************/


Expand All @@ -37,6 +37,7 @@
#if defined(CONFIG_ARN5206)
#define NE2000_ADDR 0x40000300
#define NE2000_ODDOFFSET 0x00010000
#define NE2000_ADDRSIZE 0x00020000
#define NE2000_IRQ_VECTOR 0xf0
#define NE2000_IRQ_PRIORITY 2
#define NE2000_IRQ_LEVEL 4
Expand All @@ -46,6 +47,7 @@
#if defined(CONFIG_M5206eC3)
#define NE2000_ADDR 0x40000300
#define NE2000_ODDOFFSET 0x00010000
#define NE2000_ADDRSIZE 0x00020000
#define NE2000_IRQ_VECTOR 0x1c
#define NE2000_IRQ_PRIORITY 2
#define NE2000_IRQ_LEVEL 4
Expand All @@ -54,6 +56,7 @@

#if defined(CONFIG_M5206e) && defined(CONFIG_NETtel)
#define NE2000_ADDR 0x30000300
#define NE2000_ADDRSIZE 0x00001000
#define NE2000_IRQ_VECTOR 25
#define NE2000_IRQ_PRIORITY 1
#define NE2000_IRQ_LEVEL 3
Expand All @@ -63,13 +66,15 @@
#if defined(CONFIG_M5307C3)
#define NE2000_ADDR 0x40000300
#define NE2000_ODDOFFSET 0x00010000
#define NE2000_ADDRSIZE 0x00020000
#define NE2000_IRQ_VECTOR 0x1b
#define NE2000_BYTE volatile unsigned short
#endif

#if defined(CONFIG_M5272) && defined(CONFIG_NETtel)
#define NE2000_ADDR 0x30600300
#define NE2000_ODDOFFSET 0x00008000
#define NE2000_ADDRSIZE 0x00010000
#define NE2000_IRQ_VECTOR 67
#undef BSWAP
#define BSWAP(w) (w)
Expand All @@ -82,6 +87,7 @@
#define NE2000_ADDR0 0x30600300
#define NE2000_ADDR1 0x30800300
#define NE2000_ODDOFFSET 0x00008000
#define NE2000_ADDRSIZE 0x00010000
#define NE2000_IRQ_VECTOR0 27
#define NE2000_IRQ_VECTOR1 29
#undef BSWAP
Expand All @@ -94,6 +100,7 @@
#if defined(CONFIG_M5307) && defined(CONFIG_SECUREEDGEMP3)
#define NE2000_ADDR 0x30600300
#define NE2000_ODDOFFSET 0x00008000
#define NE2000_ADDRSIZE 0x00010000
#define NE2000_IRQ_VECTOR 27
#undef BSWAP
#define BSWAP(w) (w)
Expand All @@ -105,6 +112,7 @@
#if defined(CONFIG_ARN5307)
#define NE2000_ADDR 0xfe600300
#define NE2000_ODDOFFSET 0x00010000
#define NE2000_ADDRSIZE 0x00020000
#define NE2000_IRQ_VECTOR 0x1b
#define NE2000_IRQ_PRIORITY 2
#define NE2000_IRQ_LEVEL 3
Expand All @@ -114,129 +122,10 @@
#if defined(CONFIG_M5407C3)
#define NE2000_ADDR 0x40000300
#define NE2000_ODDOFFSET 0x00010000
#define NE2000_ADDRSIZE 0x00020000
#define NE2000_IRQ_VECTOR 0x1b
#define NE2000_BYTE volatile unsigned short
#endif

/****************************************************************************/

/*
* Side-band address space for odd address requires re-mapping
* many of the standard ISA access functions.
*/
#ifdef NE2000_ODDOFFSET

#undef outb
#undef outb_p
#undef inb
#undef inb_p
#undef outsb
#undef outsw
#undef insb
#undef insw

#define outb ne2000_outb
#define inb ne2000_inb
#define outb_p ne2000_outb
#define inb_p ne2000_inb
#define outsb ne2000_outsb
#define outsw ne2000_outsw
#define insb ne2000_insb
#define insw ne2000_insw


#ifndef COLDFIRE_NE2000_FUNCS

void ne2000_outb(unsigned int val, unsigned int addr);
int ne2000_inb(unsigned int addr);
void ne2000_insb(unsigned int addr, void *vbuf, int unsigned long len);
void ne2000_insw(unsigned int addr, void *vbuf, unsigned long len);
void ne2000_outsb(unsigned int addr, void *vbuf, unsigned long len);
void ne2000_outsw(unsigned int addr, void *vbuf, unsigned long len);

#else

/*
* This macro converts a conventional register address into the
* real memory pointer of the mapped NE2000 device.
* On most NE2000 implementations on ColdFire boards the chip is
* mapped in kinda funny, due to its ISA heritage.
*/
#define NE2000_PTR(addr) ((addr&0x1)?(NE2000_ODDOFFSET+addr-1):(addr))
#define NE2000_DATA_PTR(addr) (addr)


void ne2000_outb(unsigned int val, unsigned int addr)
{
NE2000_BYTE *rp;

rp = (NE2000_BYTE *) NE2000_PTR(addr);
*rp = RSWAP(val);
}

int ne2000_inb(unsigned int addr)
{
NE2000_BYTE *rp, val;

rp = (NE2000_BYTE *) NE2000_PTR(addr);
val = *rp;
return((int) ((NE2000_BYTE) RSWAP(val)));
}

void ne2000_insb(unsigned int addr, void *vbuf, int unsigned long len)
{
NE2000_BYTE *rp, val;
unsigned char *buf;

buf = (unsigned char *) vbuf;
rp = (NE2000_BYTE *) NE2000_DATA_PTR(addr);
for (; (len > 0); len--) {
val = *rp;
*buf++ = RSWAP(val);
}
}

void ne2000_insw(unsigned int addr, void *vbuf, unsigned long len)
{
volatile unsigned short *rp;
unsigned short w, *buf;

buf = (unsigned short *) vbuf;
rp = (volatile unsigned short *) NE2000_DATA_PTR(addr);
for (; (len > 0); len--) {
w = *rp;
*buf++ = BSWAP(w);
}
}

void ne2000_outsb(unsigned int addr, const void *vbuf, unsigned long len)
{
NE2000_BYTE *rp, val;
unsigned char *buf;

buf = (unsigned char *) vbuf;
rp = (NE2000_BYTE *) NE2000_DATA_PTR(addr);
for (; (len > 0); len--) {
val = *buf++;
*rp = RSWAP(val);
}
}

void ne2000_outsw(unsigned int addr, const void *vbuf, unsigned long len)
{
volatile unsigned short *rp;
unsigned short w, *buf;

buf = (unsigned short *) vbuf;
rp = (volatile unsigned short *) NE2000_DATA_PTR(addr);
for (; (len > 0); len--) {
w = *buf++;
*rp = BSWAP(w);
}
}

#endif /* COLDFIRE_NE2000_FUNCS */
#endif /* NE2000_OFFOFFSET */

/****************************************************************************/
#endif /* mcfne_h */
#endif /* mcf8390_h */
32 changes: 18 additions & 14 deletions trunk/drivers/ieee802154/at86rf230.c
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,13 @@ at86rf230_xmit(struct ieee802154_dev *dev, struct sk_buff *skb)
int rc;
unsigned long flags;

spin_lock(&lp->lock);
if (lp->irq_disabled) {
spin_unlock(&lp->lock);
return -EBUSY;
}
spin_unlock(&lp->lock);

might_sleep();

rc = at86rf230_state(dev, STATE_FORCE_TX_ON);
Expand Down Expand Up @@ -592,12 +599,8 @@ static int at86rf230_rx(struct at86rf230_local *lp)
if (!skb)
return -ENOMEM;

if (at86rf230_write_subreg(lp, SR_RX_PDT_DIS, 1) ||
at86rf230_read_fbuf(lp, skb_put(skb, len), &len, &lqi) ||
at86rf230_write_subreg(lp, SR_RX_SAFE_MODE, 1) ||
at86rf230_write_subreg(lp, SR_RX_PDT_DIS, 0)) {
if (at86rf230_read_fbuf(lp, skb_put(skb, len), &len, &lqi))
goto err;
}

if (len < 2)
goto err;
Expand Down Expand Up @@ -633,7 +636,6 @@ static void at86rf230_irqwork(struct work_struct *work)
int rc;
unsigned long flags;

spin_lock_irqsave(&lp->lock, flags);
rc = at86rf230_read_subreg(lp, RG_IRQ_STATUS, 0xff, 0, &val);
status |= val;

Expand All @@ -643,31 +645,33 @@ static void at86rf230_irqwork(struct work_struct *work)
status &= ~IRQ_TRX_UR; /* FIXME: possibly handle ???*/

if (status & IRQ_TRX_END) {
spin_lock_irqsave(&lp->lock, flags);
status &= ~IRQ_TRX_END;
if (lp->is_tx) {
lp->is_tx = 0;
spin_unlock_irqrestore(&lp->lock, flags);
complete(&lp->tx_complete);
} else {
spin_unlock_irqrestore(&lp->lock, flags);
at86rf230_rx(lp);
}
}

if (lp->irq_disabled) {
lp->irq_disabled = 0;
enable_irq(lp->spi->irq);
}
spin_lock_irqsave(&lp->lock, flags);
lp->irq_disabled = 0;
spin_unlock_irqrestore(&lp->lock, flags);

enable_irq(lp->spi->irq);
}

static irqreturn_t at86rf230_isr(int irq, void *data)
{
struct at86rf230_local *lp = data;

disable_irq_nosync(irq);

spin_lock(&lp->lock);
if (!lp->irq_disabled) {
disable_irq_nosync(irq);
lp->irq_disabled = 1;
}
lp->irq_disabled = 1;
spin_unlock(&lp->lock);

schedule_work(&lp->irqwork);
Expand Down
14 changes: 14 additions & 0 deletions trunk/drivers/net/ethernet/8390/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,20 @@ config MAC8390
and read the Ethernet-HOWTO, available from
<http://www.tldp.org/docs.html#howto>.

config MCF8390
tristate "ColdFire NS8390 based Ethernet support"
depends on COLDFIRE
select CRC32
---help---
This driver is for Ethernet devices using an NS8390-compatible
chipset on many common ColdFire CPU based boards. Many of the older
Freescale dev boards use this, and some other common boards like
some SnapGear routers do as well.

If you have one of these boards and want to use the network interface
on them then choose Y. To compile this driver as a module, choose M
here, the module will be called mcf8390.

config NE2000
tristate "NE2000/NE1000 support"
depends on (ISA || (Q40 && m) || M32R || MACH_TX49XX)
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/ethernet/8390/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ obj-$(CONFIG_HPLAN_PLUS) += hp-plus.o 8390p.o
obj-$(CONFIG_HPLAN) += hp.o 8390p.o
obj-$(CONFIG_HYDRA) += hydra.o 8390.o
obj-$(CONFIG_LNE390) += lne390.o 8390.o
obj-$(CONFIG_MCF8390) += mcf8390.o 8390.o
obj-$(CONFIG_NE2000) += ne.o 8390p.o
obj-$(CONFIG_NE2_MCA) += ne2.o 8390p.o
obj-$(CONFIG_NE2K_PCI) += ne2k-pci.o 8390.o
Expand Down
Loading

0 comments on commit 2ac3ad2

Please sign in to comment.