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
45efddad
Commit
45efddad
authored
Dec 04, 2002
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://kernel.bkbits.net/jgarzik/net-drivers-2.5
into home.transmeta.com:/home/torvalds/v2.5/linux
parents
047d0b01
1a9eed8d
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
35 additions
and
34 deletions
+35
-34
Documentation/networking/netdevices.txt
Documentation/networking/netdevices.txt
+19
-14
drivers/net/ewrk3.c
drivers/net/ewrk3.c
+13
-14
drivers/net/r8169.c
drivers/net/r8169.c
+3
-3
drivers/net/sk98lin/h/skgehw.h
drivers/net/sk98lin/h/skgehw.h
+0
-1
drivers/net/skfp/h/skfbi.h
drivers/net/skfp/h/skfbi.h
+0
-1
drivers/net/tulip/de2104x.c
drivers/net/tulip/de2104x.c
+0
-1
No files found.
Documentation/networking/netdevices.txt
View file @
45efddad
...
...
@@ -12,31 +12,36 @@ network devices.
struct net_device synchronization rules
=======================================
dev->open:
Locking: Inside
rtnl_lock() semaphore.
Sleeping: OK
Synchronization:
rtnl_lock() semaphore.
Context: process
dev->stop:
Locking: Inside rtnl_lock() semaphore.
Sleeping: OK
Synchronization: rtnl_lock() semaphore.
Context: process
Notes: netif_running() is guaranteed false when this is called
dev->do_ioctl:
Locking: Inside
rtnl_lock() semaphore.
Sleeping: OK
Synchronization:
rtnl_lock() semaphore.
Context: process
dev->get_stats:
Locking: Inside dev_base_lock spin
lock.
Sleeping: NO
Synchronization: dev_base_lock rw
lock.
Context: nominally process, but don't sleep inside an rwlock
dev->hard_start_xmit:
Locking: Inside
dev->xmit_lock spinlock.
Sleeping: NO
Synchronization:
dev->xmit_lock spinlock.
Context: BHs disabled
dev->tx_timeout:
Locking: Inside
dev->xmit_lock spinlock.
Sleeping: NO
Synchronization:
dev->xmit_lock spinlock.
Context: BHs disabled
dev->set_multicast_list:
Locking: Inside
dev->xmit_lock spinlock.
Sleeping: NO
Synchronization:
dev->xmit_lock spinlock.
Context: BHs disabled
dev->poll:
Synchronization: __LINK_STATE_RX_SCHED bit in dev->state. See
dev_close code and comments in net/core/dev.c for more info.
Context: softirq
drivers/net/ewrk3.c
View file @
45efddad
...
...
@@ -707,12 +707,20 @@ static void ewrk3_init(struct net_device *dev)
struct
ewrk3_private
*
lp
=
(
struct
ewrk3_private
*
)
dev
->
priv
;
u_char
csr
,
page
;
u_long
iobase
=
dev
->
base_addr
;
int
i
;
/*
** Enable any multicasts
*/
set_multicast_list
(
dev
);
/*
** Set hardware MAC address. Address is initialized from the EEPROM
** during startup but may have since been changed by the user.
*/
for
(
i
=
0
;
i
<
ETH_ALEN
;
i
++
)
outb
(
dev
->
dev_addr
[
i
],
EWRK3_PAR0
+
i
);
/*
** Clean out any remaining entries in all the queues here
*/
...
...
@@ -1754,23 +1762,17 @@ static int ewrk3_ethtool_ioctl(struct net_device *dev, void *useraddr)
return
0
;
}
#ifdef BROKEN
/* Blink LED for identification */
case
ETHTOOL_PHYS_ID
:
{
struct
ethtool_value
edata
;
u_long
flags
;
long
delay
,
ret
;
u_char
cr
;
int
count
;
wait_queue_head_t
wait
;
init_waitqueue_head
(
&
wait
);
if
(
copy_from_user
(
&
edata
,
useraddr
,
sizeof
(
edata
)))
return
-
EFAULT
;
/* Toggle LED 4x per second */
delay
=
HZ
>>
2
;
count
=
edata
.
data
<<
2
;
spin_lock_irqsave
(
&
lp
->
hw_lock
,
flags
);
...
...
@@ -1791,24 +1793,21 @@ static int ewrk3_ethtool_ioctl(struct net_device *dev, void *useraddr)
/* Wait a little while */
spin_unlock_irqrestore
(
&
lp
->
hw_lock
,
flags
);
ret
=
delay
;
__wait_event_interruptible_timeout
(
wait
,
0
,
ret
);
set_current_state
(
TASK_UNINTERRUPTIBLE
)
;
schedule_timeout
(
HZ
>>
2
);
spin_lock_irqsave
(
&
lp
->
hw_lock
,
flags
);
/* Exit if we got a signal */
if
(
ret
==
-
ERESTARTSYS
)
goto
out
;
if
(
signal_pending
(
current
)
)
break
;
}
ret
=
0
;
out:
lp
->
led_mask
=
CR_LED
;
cr
=
inb
(
EWRK3_CR
);
outb
(
cr
&
~
CR_LED
,
EWRK3_CR
);
spin_unlock_irqrestore
(
&
lp
->
hw_lock
,
flags
);
return
ret
;
return
signal_pending
(
current
)
?
-
ERESTARTSYS
:
0
;
}
#endif
/* BROKEN */
}
...
...
drivers/net/r8169.c
View file @
45efddad
...
...
@@ -508,7 +508,7 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
spin_lock_init
(
&
tp
->
lock
);
p
dev
->
driver_data
=
dev
;
p
ci_set_drvdata
(
pdev
,
dev
)
;
printk
(
KERN_INFO
"%s: %s at 0x%lx, "
"%2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x, "
...
...
@@ -618,7 +618,7 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
static
void
__devexit
rtl8169_remove_one
(
struct
pci_dev
*
pdev
)
{
struct
net_device
*
dev
=
p
dev
->
driver_data
;
struct
net_device
*
dev
=
p
ci_get_drvdata
(
pdev
)
;
struct
rtl8169_private
*
tp
=
(
struct
rtl8169_private
*
)
(
dev
->
priv
);
assert
(
dev
!=
NULL
);
...
...
@@ -633,7 +633,7 @@ rtl8169_remove_one(struct pci_dev *pdev)
sizeof
(
struct
net_device
)
+
sizeof
(
struct
rtl8169_private
));
kfree
(
dev
);
p
dev
->
driver_data
=
NULL
;
p
ci_set_drvdata
(
pdev
,
NULL
)
;
}
static
int
...
...
drivers/net/sk98lin/h/skgehw.h
View file @
45efddad
...
...
@@ -384,7 +384,6 @@ extern "C" {
/* VPD Region */
/* PCI_VPD_ADR_REG 16 bit VPD Address Register */
#define PCI_VPD_FLAG (1L<<15)
/* Bit 15: starts VPD rd/wd cycle*/
#define PCI_VPD_ADDR (0x3fffL<<0)
/* Bit 14..0: VPD address */
/*
* Control Register File:
...
...
drivers/net/skfp/h/skfbi.h
View file @
45efddad
...
...
@@ -1039,7 +1039,6 @@
/* PCI_VPD_NITEM 8 bit (ML) Next Item Ptr */
/* PCI_VPD_ADR_REG 16 bit (ML) VPD Address Register */
#define PCI_VPD_FLAG (1<<15)
/* Bit 15 starts VPD rd/wd cycle*/
#define PCI_VPD_ADDR (0x3fff<<0)
/* Bit 0..14 VPD address */
/* PCI_VPD_DAT_REG 32 bit (ML) VPD Data Register */
...
...
drivers/net/tulip/de2104x.c
View file @
45efddad
...
...
@@ -2014,7 +2014,6 @@ static int __init de_init_one (struct pci_dev *pdev,
dev
->
watchdog_timeo
=
TX_TIMEOUT
;
dev
->
irq
=
pdev
->
irq
;
init_timer
(
&
de
->
media_timer
);
de
=
dev
->
priv
;
de
->
de21040
=
ent
->
driver_data
==
0
?
1
:
0
;
...
...
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