Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
3f785f66
Commit
3f785f66
authored
Oct 14, 2004
by
Jeff Garzik
Browse files
Options
Browse Files
Download
Plain Diff
Merge pobox.com:/spare/repo/linux-2.6
into pobox.com:/spare/repo/netdev-2.6/misc
parents
8c225dbc
41ebfc9a
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
207 additions
and
30 deletions
+207
-30
drivers/net/Kconfig
drivers/net/Kconfig
+13
-13
drivers/net/e1000/e1000_main.c
drivers/net/e1000/e1000_main.c
+2
-0
drivers/net/hamradio/hdlcdrv.c
drivers/net/hamradio/hdlcdrv.c
+2
-0
drivers/net/ixgb/ixgb_main.c
drivers/net/ixgb/ixgb_main.c
+7
-3
drivers/net/mac8390.c
drivers/net/mac8390.c
+0
-4
drivers/net/ne2k-pci.c
drivers/net/ne2k-pci.c
+31
-0
drivers/net/ns83820.c
drivers/net/ns83820.c
+106
-6
drivers/net/smc91x.h
drivers/net/smc91x.h
+43
-0
drivers/net/tulip/de2104x.c
drivers/net/tulip/de2104x.c
+1
-2
drivers/net/tulip/de4x5.c
drivers/net/tulip/de4x5.c
+1
-1
net/irda/irlan/irlan_client.c
net/irda/irlan/irlan_client.c
+1
-1
No files found.
drivers/net/Kconfig
View file @
3f785f66
...
...
@@ -1730,7 +1730,7 @@ config VIA_RHINE
(e.g. VT8235).
To compile this driver as a module, choose M here. The module
will be called via-
rhine
.
will be called via-
velocity
.
config VIA_RHINE_MMIO
bool "Use MMIO instead of PIO"
...
...
@@ -1742,18 +1742,6 @@ config VIA_RHINE_MMIO
If unsure, say Y.
config VIA_VELOCITY
tristate "VIA Velocity support"
depends on NET_PCI && PCI
select CRC32
select CRC_CCITT
select MII
help
If you have a VIA "Velocity" based network card say Y here.
To compile this driver as a module, choose M here. The module
will be called via-velocity.
config LAN_SAA9730
bool "Philips SAA9730 Ethernet support (EXPERIMENTAL)"
depends on NET_PCI && EXPERIMENTAL && MIPS
...
...
@@ -2140,6 +2128,18 @@ config SK98LIN
say M here and read Documentation/kbuild/modules.txt. The module will
be called sk98lin. This is recommended.
config VIA_VELOCITY
tristate "VIA Velocity support"
depends on NET_PCI && PCI
select CRC32
select CRC_CCITT
select MII
help
If you have a VIA "Velocity" based network card say Y here.
To compile this driver as a module, choose M here. The module
will be called via-velocity.
config TIGON3
tristate "Broadcom Tigon3 support"
depends on PCI
...
...
drivers/net/e1000/e1000_main.c
View file @
3f785f66
...
...
@@ -641,6 +641,8 @@ e1000_remove(struct pci_dev *pdev)
pci_release_regions
(
pdev
);
free_netdev
(
netdev
);
pci_disable_device
(
pdev
);
}
/**
...
...
drivers/net/hamradio/hdlcdrv.c
View file @
3f785f66
...
...
@@ -549,6 +549,8 @@ static int hdlcdrv_close(struct net_device *dev)
netif_stop_queue
(
dev
);
netif_stop_queue
(
dev
);
if
(
s
->
ops
&&
s
->
ops
->
close
)
i
=
s
->
ops
->
close
(
dev
);
if
(
s
->
skb
)
...
...
drivers/net/ixgb/ixgb_main.c
View file @
3f785f66
...
...
@@ -30,7 +30,7 @@
char
ixgb_driver_name
[]
=
"ixgb"
;
char
ixgb_driver_string
[]
=
"Intel(R) PRO/10GbE Network Driver"
;
char
ixgb_driver_version
[]
=
"1.0.66"
;
char
ixgb_driver_version
[]
=
"1.0.66
-k2
"
;
char
ixgb_copyright
[]
=
"Copyright (c) 2001-2004 Intel Corporation."
;
/* ixgb_pci_tbl - PCI Device ID Table
...
...
@@ -1615,8 +1615,12 @@ static irqreturn_t ixgb_intr(int irq, void *data, struct pt_regs *regs)
}
#else
for
(
i
=
0
;
i
<
IXGB_MAX_INTR
;
i
++
)
if
(
!
ixgb_clean_rx_irq
(
adapter
)
&
!
ixgb_clean_tx_irq
(
adapter
)
)
if
(
ixgb_clean_rx_irq
(
adapter
)
==
FALSE
)
break
;
for
(
i
=
0
;
i
<
IXGB_MAX_INTR
;
i
++
)
if
(
ixgb_clean_tx_irq
(
adapter
)
==
FALSE
)
break
;
/* if RAIDC:EN == 1 and ICR:RXDMT0 == 1, we need to
* set IMS:RXDMT0 to 1 to restart the RBD timer (POLL)
*/
...
...
@@ -1677,7 +1681,7 @@ static boolean_t ixgb_clean_tx_irq(struct ixgb_adapter *adapter)
eop
=
tx_ring
->
buffer_info
[
i
].
next_to_watch
;
eop_desc
=
IXGB_TX_DESC
(
*
tx_ring
,
eop
);
while
(
eop_desc
->
status
&
cpu_to_le32
(
IXGB_TX_DESC_STATUS_DD
)
)
{
while
(
eop_desc
->
status
&
IXGB_TX_DESC_STATUS_DD
)
{
for
(
cleaned
=
FALSE
;
!
cleaned
;)
{
tx_desc
=
IXGB_TX_DESC
(
*
tx_ring
,
i
);
...
...
drivers/net/mac8390.c
View file @
3f785f66
...
...
@@ -42,10 +42,6 @@
#include "8390.h"
#if (LINUX_VERSION_CODE < 0x02030e)
#define net_device device
#endif
#define WD_START_PG 0x00
/* First page of TX buffer */
#define CABLETRON_RX_START_PG 0x00
/* First page of RX buffer */
#define CABLETRON_RX_STOP_PG 0x30
/* Last page +1 of RX ring */
...
...
drivers/net/ne2k-pci.c
View file @
3f785f66
...
...
@@ -653,12 +653,43 @@ static void __devexit ne2k_pci_remove_one (struct pci_dev *pdev)
pci_set_drvdata
(
pdev
,
NULL
);
}
#ifdef CONFIG_PM
static
int
ne2k_pci_suspend
(
struct
pci_dev
*
pdev
,
u32
state
)
{
struct
net_device
*
dev
=
pci_get_drvdata
(
pdev
);
netif_device_detach
(
dev
);
pci_save_state
(
pdev
,
pdev
->
saved_config_space
);
pci_set_power_state
(
pdev
,
state
);
return
0
;
}
static
int
ne2k_pci_resume
(
struct
pci_dev
*
pdev
)
{
struct
net_device
*
dev
=
pci_get_drvdata
(
pdev
);
pci_set_power_state
(
pdev
,
0
);
pci_restore_state
(
pdev
,
pdev
->
saved_config_space
);
NS8390_init
(
dev
,
1
);
netif_device_attach
(
dev
);
return
0
;
}
#endif
/* CONFIG_PM */
static
struct
pci_driver
ne2k_driver
=
{
.
name
=
DRV_NAME
,
.
probe
=
ne2k_pci_init_one
,
.
remove
=
__devexit_p
(
ne2k_pci_remove_one
),
.
id_table
=
ne2k_pci_tbl
,
#ifdef CONFIG_PM
.
suspend
=
ne2k_pci_suspend
,
.
resume
=
ne2k_pci_resume
,
#endif
/* CONFIG_PM */
};
...
...
drivers/net/ns83820.c
View file @
3f785f66
...
...
@@ -64,6 +64,8 @@
* tuning
* 0.20 - fix stupid RFEN thinko. i am such a smurf.
*
* 20040828 0.21 - add hardware vlan accleration
* by Neil Horman <nhorman@redhat.com>
* Driver Overview
* ===============
*
...
...
@@ -92,6 +94,7 @@
//#define dprintk printk
#define dprintk(x...) do { } while (0)
#include <linux/config.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/pci.h>
...
...
@@ -108,6 +111,7 @@
#include <linux/prefetch.h>
#include <linux/ethtool.h>
#include <linux/timer.h>
#include <linux/if_vlan.h>
#include <asm/io.h>
#include <asm/uaccess.h>
...
...
@@ -138,6 +142,9 @@ static int lnksts = 0; /* CFG_LNKSTS bit polarity */
/* tunables */
#define RX_BUF_SIZE 1500
/* 8192 */
#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
#define NS83820_VLAN_ACCEL_SUPPORT
#endif
/* Must not exceed ~65000. */
#define NR_RX_DESC 64
...
...
@@ -262,6 +269,8 @@ static int lnksts = 0; /* CFG_LNKSTS bit polarity */
#define EXTSTS_UDPPKT 0x00200000
#define EXTSTS_TCPPKT 0x00080000
#define EXTSTS_IPPKT 0x00020000
#define EXTSTS_VPKT 0x00010000
#define EXTSTS_VTG_MASK 0x0000ffff
#define SPDSTS_POLARITY (CFG_SPDSTS1 | CFG_SPDSTS0 | CFG_DUPSTS | (lnksts ? CFG_LNKSTS : 0))
...
...
@@ -403,6 +412,7 @@ static int lnksts = 0; /* CFG_LNKSTS bit polarity */
#define CMDSTS_INTR 0x20000000
#define CMDSTS_ERR 0x10000000
#define CMDSTS_OK 0x08000000
#define CMDSTS_RUNT 0x00200000
#define CMDSTS_LEN_MASK 0x0000ffff
#define CMDSTS_DEST_MASK 0x01800000
...
...
@@ -432,6 +442,10 @@ struct ns83820 {
struct
pci_dev
*
pci_dev
;
#ifdef NS83820_VLAN_ACCEL_SUPPORT
struct
vlan_group
*
vlgrp
;
#endif
struct
rx_info
rx_info
;
struct
tasklet_struct
rx_tasklet
;
...
...
@@ -494,6 +508,33 @@ static inline void kick_rx(struct net_device *ndev)
(((NR_TX_DESC-2 + dev->tx_done_idx - dev->tx_free_idx) % NR_TX_DESC) > MIN_TX_DESC_FREE)
#ifdef NS83820_VLAN_ACCEL_SUPPORT
static
void
ns83820_vlan_rx_register
(
struct
net_device
*
ndev
,
struct
vlan_group
*
grp
)
{
struct
ns83820
*
dev
=
PRIV
(
ndev
);
spin_lock_irq
(
&
dev
->
misc_lock
);
spin_lock
(
&
dev
->
tx_lock
);
dev
->
vlgrp
=
grp
;
spin_unlock
(
&
dev
->
tx_lock
);
spin_unlock_irq
(
&
dev
->
misc_lock
);
}
static
void
ns83820_vlan_rx_kill_vid
(
struct
net_device
*
ndev
,
unsigned
short
vid
)
{
struct
ns83820
*
dev
=
PRIV
(
ndev
);
spin_lock_irq
(
&
dev
->
misc_lock
);
spin_lock
(
&
dev
->
tx_lock
);
if
(
dev
->
vlgrp
)
dev
->
vlgrp
->
vlan_devices
[
vid
]
=
NULL
;
spin_unlock
(
&
dev
->
tx_lock
);
spin_unlock_irq
(
&
dev
->
misc_lock
);
}
#endif
/* Packet Receiver
*
* The hardware supports linked lists of receive descriptors for
...
...
@@ -836,6 +877,7 @@ static void fastcall rx_irq(struct net_device *ndev)
struct
ns83820
*
dev
=
PRIV
(
ndev
);
struct
rx_info
*
info
=
&
dev
->
rx_info
;
unsigned
next_rx
;
int
rx_rc
,
len
;
u32
cmdsts
,
*
desc
;
unsigned
long
flags
;
int
nr
=
0
;
...
...
@@ -876,8 +918,24 @@ static void fastcall rx_irq(struct net_device *ndev)
pci_unmap_single
(
dev
->
pci_dev
,
bufptr
,
RX_BUF_SIZE
,
PCI_DMA_FROMDEVICE
);
len
=
cmdsts
&
CMDSTS_LEN_MASK
;
#ifdef NS83820_VLAN_ACCEL_SUPPORT
/* NH: As was mentioned below, this chip is kinda
* brain dead about vlan tag stripping. Frames
* that are 64 bytes with a vlan header appended
* like arp frames, or pings, are flagged as Runts
* when the tag is stripped and hardware. This
* also means that the OK bit in the descriptor
* is cleared when the frame comes in so we have
* to do a specific length check here to make sure
* the frame would have been ok, had we not stripped
* the tag.
*/
if
(
likely
((
CMDSTS_OK
&
cmdsts
)
||
((
cmdsts
&
CMDSTS_RUNT
)
&&
len
>=
56
)))
{
#else
if
(
likely
(
CMDSTS_OK
&
cmdsts
))
{
int
len
=
cmdsts
&
0xffff
;
#endif
skb_put
(
skb
,
len
);
if
(
unlikely
(
!
skb
))
goto
netdev_mangle_me_harder_failed
;
...
...
@@ -891,7 +949,18 @@ static void fastcall rx_irq(struct net_device *ndev)
skb
->
ip_summed
=
CHECKSUM_NONE
;
}
skb
->
protocol
=
eth_type_trans
(
skb
,
ndev
);
if
(
NET_RX_DROP
==
netif_rx
(
skb
))
{
#ifdef NS83820_VLAN_ACCEL_SUPPORT
if
(
extsts
&
EXTSTS_VPKT
)
{
unsigned
short
tag
;
tag
=
ntohs
(
extsts
&
EXTSTS_VTG_MASK
);
rx_rc
=
vlan_hwaccel_rx
(
skb
,
dev
->
vlgrp
,
tag
);
}
else
{
rx_rc
=
netif_rx
(
skb
);
}
#else
rx_rc
=
netif_rx
(
skb
);
#endif
if
(
NET_RX_DROP
==
rx_rc
)
{
netdev_mangle_me_harder_failed:
dev
->
stats
.
rx_dropped
++
;
}
...
...
@@ -1099,6 +1168,17 @@ static int ns83820_hard_start_xmit(struct sk_buff *skb, struct net_device *ndev)
extsts
|=
EXTSTS_UDPPKT
;
}
#ifdef NS83820_VLAN_ACCEL_SUPPORT
if
(
vlan_tx_tag_present
(
skb
))
{
/* fetch the vlan tag info out of the
* ancilliary data if the vlan code
* is using hw vlan acceleration
*/
short
tag
=
vlan_tx_tag_get
(
skb
);
extsts
|=
(
EXTSTS_VPKT
|
htons
(
tag
));
}
#endif
len
=
skb
->
len
;
if
(
nr_frags
)
len
-=
skb
->
data_len
;
...
...
@@ -1887,7 +1967,6 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_
ndev
->
do_ioctl
=
ns83820_ioctl
;
ndev
->
tx_timeout
=
ns83820_tx_timeout
;
ndev
->
watchdog_timeo
=
5
*
HZ
;
pci_set_drvdata
(
pci_dev
,
ndev
);
ns83820_do_reset
(
dev
,
CR_RST
);
...
...
@@ -2013,11 +2092,25 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_
* a ping with a VLAN header) then the card, strips the 4 byte VLAN
* tag and then checks the packet size, so if RXCFG_ARP is not enabled,
* it discrards it!. These guys......
* also turn on tag stripping if hardware acceleration is enabled
*/
writel
(
VRCR_IPEN
|
VRCR_VTDEN
,
dev
->
base
+
VRCR
);
#ifdef NS83820_VLAN_ACCEL_SUPPORT
#define VRCR_INIT_VALUE (VRCR_IPEN|VRCR_VTDEN|VRCR_VTREN)
#else
#define VRCR_INIT_VALUE (VRCR_IPEN|VRCR_VTDEN)
#endif
writel
(
VRCR_INIT_VALUE
,
dev
->
base
+
VRCR
);
/* Enable per-packet TCP/UDP/IP checksumming */
writel
(
VTCR_PPCHK
,
dev
->
base
+
VTCR
);
/* Enable per-packet TCP/UDP/IP checksumming
* and per packet vlan tag insertion if
* vlan hardware acceleration is enabled
*/
#ifdef NS83820_VLAN_ACCEL_SUPPORT
#define VTCR_INIT_VALUE (VTCR_PPCHK|VTCR_VPPTI)
#else
#define VTCR_INIT_VALUE VTCR_PPCHK
#endif
writel
(
VTCR_INIT_VALUE
,
dev
->
base
+
VTCR
);
/* Ramit : Enable async and sync pause frames */
/* writel(0, dev->base + PCR); */
...
...
@@ -2034,6 +2127,13 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_
ndev
->
features
|=
NETIF_F_SG
;
ndev
->
features
|=
NETIF_F_IP_CSUM
;
#ifdef NS83820_VLAN_ACCEL_SUPPORT
/* We also support hardware vlan acceleration */
ndev
->
features
|=
NETIF_F_HW_VLAN_TX
|
NETIF_F_HW_VLAN_RX
;
ndev
->
vlan_rx_register
=
ns83820_vlan_rx_register
;
ndev
->
vlan_rx_kill_vid
=
ns83820_vlan_rx_kill_vid
;
#endif
if
(
using_dac
)
{
printk
(
KERN_INFO
"%s: using 64 bit addressing.
\n
"
,
ndev
->
name
);
...
...
drivers/net/smc91x.h
View file @
3f785f66
...
...
@@ -160,6 +160,49 @@ SMC_outw(u16 val, unsigned long ioaddr, int reg)
#define SMC_insw(a, r, p, l) insw((a) + (r), p, l)
#define SMC_outsw(a, r, p, l) outsw((a) + (r), p, l)
#elif defined(CONFIG_MACH_LPD7A400) || defined(CONFIG_MACH_LPD7A404)
#include <asm/arch/constants.h>
/* IOBARRIER_VIRT */
#define SMC_CAN_USE_8BIT 0
#define SMC_CAN_USE_16BIT 1
#define SMC_CAN_USE_32BIT 0
#define SMC_NOWAIT 0
#define SMC_IOBARRIER ({ barrier (); readl (IOBARRIER_VIRT); })
static
inline
unsigned
short
SMC_inw
(
unsigned
long
a
,
int
r
)
{
unsigned
short
v
;
v
=
readw
(
a
+
r
);
SMC_IOBARRIER
;
return
v
;
}
static
inline
void
SMC_outw
(
unsigned
short
v
,
unsigned
long
a
,
int
r
)
{
writew
(
v
,
a
+
r
);
SMC_IOBARRIER
;
}
static
inline
void
SMC_insw
(
unsigned
long
a
,
int
r
,
unsigned
char
*
p
,
int
l
)
{
while
(
l
--
>
0
)
{
*
((
unsigned
short
*
)
p
)
++
=
readw
(
a
+
r
);
SMC_IOBARRIER
;
}
}
static
inline
void
SMC_outsw
(
unsigned
long
a
,
int
r
,
unsigned
char
*
p
,
int
l
)
{
while
(
l
--
>
0
)
{
writew
(
*
((
unsigned
short
*
)
p
)
++
,
a
+
r
);
SMC_IOBARRIER
;
}
}
#define RPC_LSA_DEFAULT RPC_LED_TX_RX
#define RPC_LSB_DEFAULT RPC_LED_100_10
#elif defined(CONFIG_M32R)
#define SMC_CAN_USE_8BIT 0
...
...
drivers/net/tulip/de2104x.c
View file @
3f785f66
...
...
@@ -1208,8 +1208,7 @@ static void de_adapter_wake (struct de_private *de)
pci_write_config_dword
(
de
->
pdev
,
PCIPM
,
pmctl
);
/* de4x5.c delays, so we do too */
current
->
state
=
TASK_UNINTERRUPTIBLE
;
schedule_timeout
(
msecs_to_jiffies
(
10
));
msleep
(
10
);
}
}
...
...
drivers/net/tulip/de4x5.c
View file @
3f785f66
...
...
@@ -5089,7 +5089,7 @@ mii_get_phy(struct net_device *dev)
lp
->
useMII
=
TRUE
;
/* Search the MII address space for possible PHY devices */
for
(
n
=
0
,
lp
->
mii_cnt
=
0
,
i
=
1
;
!
((
i
==
1
)
&&
(
n
==
1
));
i
=
(
++
i
)
%
DE4X5_MAX_MII
)
{
for
(
n
=
0
,
lp
->
mii_cnt
=
0
,
i
=
1
;
!
((
i
==
1
)
&&
(
n
==
1
));
i
=
(
i
+
1
)
%
DE4X5_MAX_MII
)
{
lp
->
phy
[
lp
->
active
].
addr
=
i
;
if
(
i
==
0
)
n
++
;
/* Count cycles */
while
(
de4x5_reset_phy
(
dev
)
<
0
)
udelay
(
100
);
/* Wait for reset */
...
...
net/irda/irlan/irlan_client.c
View file @
3f785f66
...
...
@@ -234,7 +234,7 @@ static void irlan_client_ctrl_disconnect_indication(void *instance, void *sap,
ASSERT
(
tsap
==
self
->
client
.
tsap_ctrl
,
return
;);
/* Remove frames queued on the control channel */
while
((
skb
=
skb_dequeue
(
&
self
->
client
.
txq
)))
{
while
((
skb
=
skb_dequeue
(
&
self
->
client
.
txq
))
!=
NULL
)
{
dev_kfree_skb
(
skb
);
}
self
->
client
.
tx_busy
=
FALSE
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment