Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
kernel_linux
提交
96789ac4
K
kernel_linux
项目概览
OpenHarmony
/
kernel_linux
上一次同步 3 年多
通知
13
Star
8
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kernel_linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
96789ac4
编写于
2月 28, 2006
作者:
L
Linus Torvalds
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'upstream-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
上级
77eebf34
958ddb75
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
29 addition
and
105 deletion
+29
-105
drivers/net/8139cp.c
drivers/net/8139cp.c
+21
-16
drivers/net/sky2.c
drivers/net/sky2.c
+0
-77
drivers/net/sky2.h
drivers/net/sky2.h
+0
-1
drivers/net/via-velocity.c
drivers/net/via-velocity.c
+3
-0
net/ieee80211/ieee80211_rx.c
net/ieee80211/ieee80211_rx.c
+5
-11
未找到文件。
drivers/net/8139cp.c
浏览文件 @
96789ac4
...
...
@@ -1118,13 +1118,18 @@ static int cp_refill_rx (struct cp_private *cp)
return
-
ENOMEM
;
}
static
void
cp_init_rings_index
(
struct
cp_private
*
cp
)
{
cp
->
rx_tail
=
0
;
cp
->
tx_head
=
cp
->
tx_tail
=
0
;
}
static
int
cp_init_rings
(
struct
cp_private
*
cp
)
{
memset
(
cp
->
tx_ring
,
0
,
sizeof
(
struct
cp_desc
)
*
CP_TX_RING_SIZE
);
cp
->
tx_ring
[
CP_TX_RING_SIZE
-
1
].
opts1
=
cpu_to_le32
(
RingEnd
);
cp
->
rx_tail
=
0
;
cp
->
tx_head
=
cp
->
tx_tail
=
0
;
cp_init_rings_index
(
cp
);
return
cp_refill_rx
(
cp
);
}
...
...
@@ -1886,30 +1891,30 @@ static int cp_suspend (struct pci_dev *pdev, pm_message_t state)
spin_unlock_irqrestore
(
&
cp
->
lock
,
flags
);
if
(
cp
->
pdev
&&
cp
->
wol_enabled
)
{
pci_save_state
(
cp
->
pdev
);
cp_set_d3_state
(
cp
);
}
pci_save_state
(
pdev
);
pci_enable_wake
(
pdev
,
pci_choose_state
(
pdev
,
state
),
cp
->
wol_enabled
);
pci_set_power_state
(
pdev
,
pci_choose_state
(
pdev
,
state
));
return
0
;
}
static
int
cp_resume
(
struct
pci_dev
*
pdev
)
{
struct
net_device
*
dev
;
struct
cp_private
*
cp
;
struct
net_device
*
dev
=
pci_get_drvdata
(
pdev
)
;
struct
cp_private
*
cp
=
netdev_priv
(
dev
)
;
unsigned
long
flags
;
dev
=
pci_get_drvdata
(
pdev
);
cp
=
netdev_priv
(
dev
)
;
if
(
!
netif_running
(
dev
))
return
0
;
netif_device_attach
(
dev
);
if
(
cp
->
pdev
&&
cp
->
wol_enabled
)
{
pci_set_power_state
(
cp
->
pdev
,
PCI_D0
);
pci_restore_state
(
cp
->
pdev
);
}
pci_set_power_state
(
pdev
,
PCI_D0
);
pci_restore_state
(
pdev
);
pci_enable_wake
(
pdev
,
PCI_D0
,
0
);
/* FIXME: sh*t may happen if the Rx ring buffer is depleted */
cp_init_rings_index
(
cp
);
cp_init_hw
(
cp
);
netif_start_queue
(
dev
);
...
...
drivers/net/sky2.c
浏览文件 @
96789ac4
...
...
@@ -96,10 +96,6 @@ static int copybreak __read_mostly = 256;
module_param
(
copybreak
,
int
,
0
);
MODULE_PARM_DESC
(
copybreak
,
"Receive copy threshold"
);
static
int
disable_msi
=
0
;
module_param
(
disable_msi
,
int
,
0
);
MODULE_PARM_DESC
(
disable_msi
,
"Disable Message Signaled Interrupt (MSI)"
);
static
const
struct
pci_device_id
sky2_id_table
[]
=
{
{
PCI_DEVICE
(
PCI_VENDOR_ID_SYSKONNECT
,
0x9000
)
},
{
PCI_DEVICE
(
PCI_VENDOR_ID_SYSKONNECT
,
0x9E00
)
},
...
...
@@ -3126,61 +3122,6 @@ static void __devinit sky2_show_addr(struct net_device *dev)
dev
->
dev_addr
[
3
],
dev
->
dev_addr
[
4
],
dev
->
dev_addr
[
5
]);
}
/* Handle software interrupt used during MSI test */
static
irqreturn_t
__devinit
sky2_test_intr
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
regs
)
{
struct
sky2_hw
*
hw
=
dev_id
;
u32
status
=
sky2_read32
(
hw
,
B0_Y2_SP_ISRC2
);
if
(
status
==
0
)
return
IRQ_NONE
;
if
(
status
&
Y2_IS_IRQ_SW
)
{
sky2_write8
(
hw
,
B0_CTST
,
CS_CL_SW_IRQ
);
hw
->
msi
=
1
;
}
sky2_write32
(
hw
,
B0_Y2_SP_ICR
,
2
);
sky2_read32
(
hw
,
B0_IMSK
);
return
IRQ_HANDLED
;
}
/* Test interrupt path by forcing a a software IRQ */
static
int
__devinit
sky2_test_msi
(
struct
sky2_hw
*
hw
)
{
struct
pci_dev
*
pdev
=
hw
->
pdev
;
int
i
,
err
;
sky2_write32
(
hw
,
B0_IMSK
,
Y2_IS_IRQ_SW
);
err
=
request_irq
(
pdev
->
irq
,
sky2_test_intr
,
SA_SHIRQ
,
DRV_NAME
,
hw
);
if
(
err
)
{
printk
(
KERN_ERR
PFX
"%s: cannot assign irq %d
\n
"
,
pci_name
(
pdev
),
pdev
->
irq
);
return
err
;
}
sky2_write8
(
hw
,
B0_CTST
,
CS_ST_SW_IRQ
);
wmb
();
for
(
i
=
0
;
i
<
10
;
i
++
)
{
barrier
();
if
(
hw
->
msi
)
goto
found
;
mdelay
(
1
);
}
err
=
-
EOPNOTSUPP
;
sky2_write8
(
hw
,
B0_CTST
,
CS_CL_SW_IRQ
);
found:
sky2_write32
(
hw
,
B0_IMSK
,
0
);
free_irq
(
pdev
->
irq
,
hw
);
return
err
;
}
static
int
__devinit
sky2_probe
(
struct
pci_dev
*
pdev
,
const
struct
pci_device_id
*
ent
)
{
...
...
@@ -3302,20 +3243,6 @@ static int __devinit sky2_probe(struct pci_dev *pdev,
}
}
if
(
!
disable_msi
&&
pci_enable_msi
(
pdev
)
==
0
)
{
err
=
sky2_test_msi
(
hw
);
if
(
err
==
-
EOPNOTSUPP
)
{
/* MSI test failed, go back to INTx mode */
printk
(
KERN_WARNING
PFX
"%s: No interrupt was generated using MSI, "
"switching to INTx mode. Please report this failure to "
"the PCI maintainer and include system chipset information.
\n
"
,
pci_name
(
pdev
));
pci_disable_msi
(
pdev
);
}
else
if
(
err
)
goto
err_out_unregister
;
}
err
=
request_irq
(
pdev
->
irq
,
sky2_intr
,
SA_SHIRQ
|
SA_SAMPLE_RANDOM
,
DRV_NAME
,
hw
);
if
(
err
)
{
...
...
@@ -3332,8 +3259,6 @@ static int __devinit sky2_probe(struct pci_dev *pdev,
return
0
;
err_out_unregister:
if
(
hw
->
msi
)
pci_disable_msi
(
pdev
);
if
(
dev1
)
{
unregister_netdev
(
dev1
);
free_netdev
(
dev1
);
...
...
@@ -3376,8 +3301,6 @@ static void __devexit sky2_remove(struct pci_dev *pdev)
sky2_read8
(
hw
,
B0_CTST
);
free_irq
(
pdev
->
irq
,
hw
);
if
(
hw
->
msi
)
pci_disable_msi
(
pdev
);
pci_free_consistent
(
pdev
,
STATUS_LE_BYTES
,
hw
->
st_le
,
hw
->
st_dma
);
pci_release_regions
(
pdev
);
pci_disable_device
(
pdev
);
...
...
drivers/net/sky2.h
浏览文件 @
96789ac4
...
...
@@ -1881,7 +1881,6 @@ struct sky2_hw {
u32
intr_mask
;
int
pm_cap
;
int
msi
;
u8
chip_id
;
u8
chip_rev
;
u8
copper
;
...
...
drivers/net/via-velocity.c
浏览文件 @
96789ac4
...
...
@@ -1106,6 +1106,9 @@ static void velocity_free_rd_ring(struct velocity_info *vptr)
for
(
i
=
0
;
i
<
vptr
->
options
.
numrx
;
i
++
)
{
struct
velocity_rd_info
*
rd_info
=
&
(
vptr
->
rd_info
[
i
]);
struct
rx_desc
*
rd
=
vptr
->
rd_ring
+
i
;
memset
(
rd
,
0
,
sizeof
(
*
rd
));
if
(
!
rd_info
->
skb
)
continue
;
...
...
net/ieee80211/ieee80211_rx.c
浏览文件 @
96789ac4
...
...
@@ -1301,7 +1301,7 @@ static void update_network(struct ieee80211_network *dst,
/* dst->last_associate is not overwritten */
}
static
inline
int
is_beacon
(
int
fc
)
static
inline
int
is_beacon
(
__le16
fc
)
{
return
(
WLAN_FC_GET_STYPE
(
le16_to_cpu
(
fc
))
==
IEEE80211_STYPE_BEACON
);
}
...
...
@@ -1348,9 +1348,7 @@ static void ieee80211_process_probe_response(struct ieee80211_device
escape_essid
(
info_element
->
data
,
info_element
->
len
),
MAC_ARG
(
beacon
->
header
.
addr3
),
is_beacon
(
le16_to_cpu
(
beacon
->
header
.
frame_ctl
))
?
is_beacon
(
beacon
->
header
.
frame_ctl
)
?
"BEACON"
:
"PROBE RESPONSE"
);
return
;
}
...
...
@@ -1400,9 +1398,7 @@ static void ieee80211_process_probe_response(struct ieee80211_device
escape_essid
(
network
.
ssid
,
network
.
ssid_len
),
MAC_ARG
(
network
.
bssid
),
is_beacon
(
le16_to_cpu
(
beacon
->
header
.
frame_ctl
))
?
is_beacon
(
beacon
->
header
.
frame_ctl
)
?
"BEACON"
:
"PROBE RESPONSE"
);
#endif
memcpy
(
target
,
&
network
,
sizeof
(
*
target
));
...
...
@@ -1412,16 +1408,14 @@ static void ieee80211_process_probe_response(struct ieee80211_device
escape_essid
(
target
->
ssid
,
target
->
ssid_len
),
MAC_ARG
(
target
->
bssid
),
is_beacon
(
le16_to_cpu
(
beacon
->
header
.
frame_ctl
))
?
is_beacon
(
beacon
->
header
.
frame_ctl
)
?
"BEACON"
:
"PROBE RESPONSE"
);
update_network
(
target
,
&
network
);
}
spin_unlock_irqrestore
(
&
ieee
->
lock
,
flags
);
if
(
is_beacon
(
le16_to_cpu
(
beacon
->
header
.
frame_ctl
)
))
{
if
(
is_beacon
(
beacon
->
header
.
frame_ctl
))
{
if
(
ieee
->
handle_beacon
!=
NULL
)
ieee
->
handle_beacon
(
dev
,
beacon
,
&
network
);
}
else
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录