Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
2830077f
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
2830077f
编写于
6月 06, 2005
作者:
S
Steve French
浏览文件
操作
浏览文件
下载
差异文件
Merge with
rsync://rsync.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6.git
上级
36358c21
0b68177c
变更
56
展开全部
隐藏空白更改
内联
并排
Showing
56 changed file
with
2337 addition
and
1322 deletion
+2337
-1322
Documentation/DocBook/libata.tmpl
Documentation/DocBook/libata.tmpl
+124
-32
Makefile
Makefile
+1
-1
arch/m68knommu/kernel/process.c
arch/m68knommu/kernel/process.c
+12
-5
arch/ppc64/kernel/entry.S
arch/ppc64/kernel/entry.S
+0
-9
arch/ppc64/kernel/head.S
arch/ppc64/kernel/head.S
+5
-5
arch/ppc64/kernel/iSeries_setup.c
arch/ppc64/kernel/iSeries_setup.c
+22
-0
arch/ppc64/kernel/idle.c
arch/ppc64/kernel/idle.c
+3
-5
arch/ppc64/kernel/process.c
arch/ppc64/kernel/process.c
+0
-3
arch/ppc64/kernel/prom_init.c
arch/ppc64/kernel/prom_init.c
+1
-1
arch/ppc64/kernel/setup.c
arch/ppc64/kernel/setup.c
+1
-55
arch/ppc64/kernel/smp.c
arch/ppc64/kernel/smp.c
+1
-2
arch/ppc64/kernel/sysfs.c
arch/ppc64/kernel/sysfs.c
+2
-6
arch/s390/appldata/appldata_base.c
arch/s390/appldata/appldata_base.c
+41
-31
arch/s390/appldata/appldata_mem.c
arch/s390/appldata/appldata_mem.c
+1
-1
arch/s390/appldata/appldata_net_sum.c
arch/s390/appldata/appldata_net_sum.c
+1
-1
arch/s390/appldata/appldata_os.c
arch/s390/appldata/appldata_os.c
+2
-2
arch/s390/kernel/ptrace.c
arch/s390/kernel/ptrace.c
+50
-5
arch/s390/mm/fault.c
arch/s390/mm/fault.c
+1
-1
drivers/atm/Makefile
drivers/atm/Makefile
+2
-1
drivers/atm/fore200e.c
drivers/atm/fore200e.c
+2
-4
drivers/atm/he.c
drivers/atm/he.c
+2
-4
drivers/atm/nicstar.c
drivers/atm/nicstar.c
+10
-10
drivers/atm/zatm.c
drivers/atm/zatm.c
+4
-7
drivers/block/ub.c
drivers/block/ub.c
+363
-235
drivers/net/hamradio/baycom_epp.c
drivers/net/hamradio/baycom_epp.c
+36
-90
drivers/net/pcmcia/3c574_cs.c
drivers/net/pcmcia/3c574_cs.c
+3
-0
drivers/net/r8169.c
drivers/net/r8169.c
+25
-6
drivers/net/shaper.c
drivers/net/shaper.c
+19
-67
drivers/scsi/ata_piix.c
drivers/scsi/ata_piix.c
+0
-16
drivers/scsi/libata-core.c
drivers/scsi/libata-core.c
+427
-43
drivers/scsi/libata-scsi.c
drivers/scsi/libata-scsi.c
+1
-1
drivers/scsi/qla2xxx/qla_os.c
drivers/scsi/qla2xxx/qla_os.c
+13
-11
drivers/scsi/scsi_scan.c
drivers/scsi/scsi_scan.c
+1
-0
drivers/serial/vr41xx_siu.c
drivers/serial/vr41xx_siu.c
+9
-57
drivers/usb/core/sysfs.c
drivers/usb/core/sysfs.c
+10
-12
drivers/usb/input/hid-core.c
drivers/usb/input/hid-core.c
+18
-0
drivers/usb/media/pwc/ChangeLog
drivers/usb/media/pwc/ChangeLog
+0
-143
drivers/usb/net/usbnet.c
drivers/usb/net/usbnet.c
+1
-1
drivers/usb/serial/Kconfig
drivers/usb/serial/Kconfig
+11
-0
drivers/usb/serial/Makefile
drivers/usb/serial/Makefile
+1
-0
drivers/usb/serial/cp2101.c
drivers/usb/serial/cp2101.c
+275
-88
drivers/usb/serial/option.c
drivers/usb/serial/option.c
+729
-0
drivers/usb/storage/unusual_devs.h
drivers/usb/storage/unusual_devs.h
+9
-0
fs/jbd/checkpoint.c
fs/jbd/checkpoint.c
+3
-2
fs/mpage.c
fs/mpage.c
+4
-1
include/asm-ppc64/processor.h
include/asm-ppc64/processor.h
+22
-164
include/asm-ppc64/thread_info.h
include/asm-ppc64/thread_info.h
+2
-2
include/asm-s390/user.h
include/asm-s390/user.h
+1
-1
include/linux/if_shaper.h
include/linux/if_shaper.h
+1
-2
include/linux/libata.h
include/linux/libata.h
+58
-0
include/linux/netdevice.h
include/linux/netdevice.h
+1
-1
include/linux/usb.h
include/linux/usb.h
+5
-1
net/ipv4/ipvs/Makefile
net/ipv4/ipvs/Makefile
+1
-1
net/ipv4/ipvs/ip_vs_proto.c
net/ipv4/ipvs/ip_vs_proto.c
+0
-3
net/ipv4/ipvs/ip_vs_proto_icmp.c
net/ipv4/ipvs/ip_vs_proto_icmp.c
+0
-182
net/ipv6/ipv6_syms.c
net/ipv6/ipv6_syms.c
+0
-1
未找到文件。
Documentation/DocBook/libata.tmpl
浏览文件 @
2830077f
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
</authorgroup>
</authorgroup>
<copyright>
<copyright>
<year>
2003
</year>
<year>
2003
-2005
</year>
<holder>
Jeff Garzik
</holder>
<holder>
Jeff Garzik
</holder>
</copyright>
</copyright>
...
@@ -44,30 +44,38 @@
...
@@ -44,30 +44,38 @@
<toc></toc>
<toc></toc>
<chapter
id=
"libata
Thanks
"
>
<chapter
id=
"libata
Introduction
"
>
<title>
Thanks
</title>
<title>
Introduction
</title>
<para>
<para>
The bulk of the ATA knowledge comes thanks to long conversations with
libATA is a library used inside the Linux kernel to support ATA host
Andre Hedrick (www.linux-ide.org).
controllers and devices. libATA provides an ATA driver API, class
transports for ATA and ATAPI devices, and SCSI
<
-
>
ATA translation
for ATA devices according to the T10 SAT specification.
</para>
</para>
<para>
<para>
Thanks to Alan Cox for pointing out similarities
This Guide documents the libATA driver API, library functions, library
between SATA and SCSI, and in general for motivation to hack on
internals, and a couple sample ATA low-level drivers.
libata.
</para>
<para>
libata's device detection
method, ata_pio_devchk, and in general all the early probing was
based on extensive study of Hale Landis's probe/reset code in his
ATADRVR driver (www.ata-atapi.com).
</para>
</para>
</chapter>
</chapter>
<chapter
id=
"libataDriverApi"
>
<chapter
id=
"libataDriverApi"
>
<title>
libata Driver API
</title>
<title>
libata Driver API
</title>
<para>
struct ata_port_operations is defined for every low-level libata
hardware driver, and it controls how the low-level driver
interfaces with the ATA and SCSI layers.
</para>
<para>
FIS-based drivers will hook into the system with ->qc_prep() and
->qc_issue() high-level hooks. Hardware which behaves in a manner
similar to PCI IDE hardware may utilize several generic helpers,
defining at a bare minimum the bus I/O addresses of the ATA shadow
register blocks.
</para>
<sect1>
<sect1>
<title>
struct ata_port_operations
</title>
<title>
struct ata_port_operations
</title>
<sect2><title>
Disable ATA port
</title>
<programlisting>
<programlisting>
void (*port_disable) (struct ata_port *);
void (*port_disable) (struct ata_port *);
</programlisting>
</programlisting>
...
@@ -78,6 +86,9 @@ void (*port_disable) (struct ata_port *);
...
@@ -78,6 +86,9 @@ void (*port_disable) (struct ata_port *);
unplug).
unplug).
</para>
</para>
</sect2>
<sect2><title>
Post-IDENTIFY device configuration
</title>
<programlisting>
<programlisting>
void (*dev_config) (struct ata_port *, struct ata_device *);
void (*dev_config) (struct ata_port *, struct ata_device *);
</programlisting>
</programlisting>
...
@@ -88,6 +99,9 @@ void (*dev_config) (struct ata_port *, struct ata_device *);
...
@@ -88,6 +99,9 @@ void (*dev_config) (struct ata_port *, struct ata_device *);
issue of SET FEATURES - XFER MODE, and prior to operation.
issue of SET FEATURES - XFER MODE, and prior to operation.
</para>
</para>
</sect2>
<sect2><title>
Set PIO/DMA mode
</title>
<programlisting>
<programlisting>
void (*set_piomode) (struct ata_port *, struct ata_device *);
void (*set_piomode) (struct ata_port *, struct ata_device *);
void (*set_dmamode) (struct ata_port *, struct ata_device *);
void (*set_dmamode) (struct ata_port *, struct ata_device *);
...
@@ -108,6 +122,9 @@ void (*post_set_mode) (struct ata_port *ap);
...
@@ -108,6 +122,9 @@ void (*post_set_mode) (struct ata_port *ap);
->set_dma_mode() is only called if DMA is possible.
->set_dma_mode() is only called if DMA is possible.
</para>
</para>
</sect2>
<sect2><title>
Taskfile read/write
</title>
<programlisting>
<programlisting>
void (*tf_load) (struct ata_port *ap, struct ata_taskfile *tf);
void (*tf_load) (struct ata_port *ap, struct ata_taskfile *tf);
void (*tf_read) (struct ata_port *ap, struct ata_taskfile *tf);
void (*tf_read) (struct ata_port *ap, struct ata_taskfile *tf);
...
@@ -120,6 +137,9 @@ void (*tf_read) (struct ata_port *ap, struct ata_taskfile *tf);
...
@@ -120,6 +137,9 @@ void (*tf_read) (struct ata_port *ap, struct ata_taskfile *tf);
taskfile register values.
taskfile register values.
</para>
</para>
</sect2>
<sect2><title>
ATA command execute
</title>
<programlisting>
<programlisting>
void (*exec_command)(struct ata_port *ap, struct ata_taskfile *tf);
void (*exec_command)(struct ata_port *ap, struct ata_taskfile *tf);
</programlisting>
</programlisting>
...
@@ -129,17 +149,37 @@ void (*exec_command)(struct ata_port *ap, struct ata_taskfile *tf);
...
@@ -129,17 +149,37 @@ void (*exec_command)(struct ata_port *ap, struct ata_taskfile *tf);
->tf_load(), to be initiated in hardware.
->tf_load(), to be initiated in hardware.
</para>
</para>
</sect2>
<sect2><title>
Per-cmd ATAPI DMA capabilities filter
</title>
<programlisting>
int (*check_atapi_dma) (struct ata_queued_cmd *qc);
</programlisting>
<para>
Allow low-level driver to filter ATA PACKET commands, returning a status
indicating whether or not it is OK to use DMA for the supplied PACKET
command.
</para>
</sect2>
<sect2><title>
Read specific ATA shadow registers
</title>
<programlisting>
<programlisting>
u8 (*check_status)(struct ata_port *ap);
u8 (*check_status)(struct ata_port *ap);
void (*dev_select)(struct ata_port *ap, unsigned int device);
u8 (*check_altstatus)(struct ata_port *ap);
u8 (*check_err)(struct ata_port *ap);
</programlisting>
</programlisting>
<para>
<para>
Reads the Status
ATA shadow register from hardware. On some
Reads the Status
/AltStatus/Error ATA shadow register from
hardware
, this has the side effect of clearing the interrupt
hardware
. On some hardware, reading the Status register has
condition.
the side effect of clearing the interrupt
condition.
</para>
</para>
</sect2>
<sect2><title>
Select ATA device on bus
</title>
<programlisting>
<programlisting>
void (*dev_select)(struct ata_port *ap, unsigned int device);
void (*dev_select)(struct ata_port *ap, unsigned int device);
</programlisting>
</programlisting>
...
@@ -147,9 +187,13 @@ void (*dev_select)(struct ata_port *ap, unsigned int device);
...
@@ -147,9 +187,13 @@ void (*dev_select)(struct ata_port *ap, unsigned int device);
<para>
<para>
Issues the low-level hardware command(s) that causes one of N
Issues the low-level hardware command(s) that causes one of N
hardware devices to be considered 'selected' (active and
hardware devices to be considered 'selected' (active and
available for use) on the ATA bus.
available for use) on the ATA bus. This generally has no
meaning on FIS-based devices.
</para>
</para>
</sect2>
<sect2><title>
Reset ATA bus
</title>
<programlisting>
<programlisting>
void (*phy_reset) (struct ata_port *ap);
void (*phy_reset) (struct ata_port *ap);
</programlisting>
</programlisting>
...
@@ -162,17 +206,31 @@ void (*phy_reset) (struct ata_port *ap);
...
@@ -162,17 +206,31 @@ void (*phy_reset) (struct ata_port *ap);
functions ata_bus_reset() or sata_phy_reset() for this hook.
functions ata_bus_reset() or sata_phy_reset() for this hook.
</para>
</para>
</sect2>
<sect2><title>
Control PCI IDE BMDMA engine
</title>
<programlisting>
<programlisting>
void (*bmdma_setup) (struct ata_queued_cmd *qc);
void (*bmdma_setup) (struct ata_queued_cmd *qc);
void (*bmdma_start) (struct ata_queued_cmd *qc);
void (*bmdma_start) (struct ata_queued_cmd *qc);
void (*bmdma_stop) (struct ata_port *ap);
u8 (*bmdma_status) (struct ata_port *ap);
</programlisting>
</programlisting>
<para>
<para>
When setting up an IDE BMDMA transaction, these hooks arm
When setting up an IDE BMDMA transaction, these hooks arm
(->bmdma_setup) and fire (->bmdma_start) the hardware's DMA
(->bmdma_setup), fire (->bmdma_start), and halt (->bmdma_stop)
engine.
the hardware's DMA engine. ->bmdma_status is used to read the standard
PCI IDE DMA Status register.
</para>
</para>
<para>
These hooks are typically either no-ops, or simply not implemented, in
FIS-based drivers.
</para>
</sect2>
<sect2><title>
High-level taskfile hooks
</title>
<programlisting>
<programlisting>
void (*qc_prep) (struct ata_queued_cmd *qc);
void (*qc_prep) (struct ata_queued_cmd *qc);
int (*qc_issue) (struct ata_queued_cmd *qc);
int (*qc_issue) (struct ata_queued_cmd *qc);
...
@@ -190,20 +248,26 @@ int (*qc_issue) (struct ata_queued_cmd *qc);
...
@@ -190,20 +248,26 @@ int (*qc_issue) (struct ata_queued_cmd *qc);
->qc_issue is used to make a command active, once the hardware
->qc_issue is used to make a command active, once the hardware
and S/G tables have been prepared. IDE BMDMA drivers use the
and S/G tables have been prepared. IDE BMDMA drivers use the
helper function ata_qc_issue_prot() for taskfile protocol-based
helper function ata_qc_issue_prot() for taskfile protocol-based
dispatch. More advanced drivers roll their own ->qc_issue
dispatch. More advanced drivers implement their own ->qc_issue.
implementation, using this as the "issue new ATA command to
hardware" hook.
</para>
</para>
</sect2>
<sect2><title>
Timeout (error) handling
</title>
<programlisting>
<programlisting>
void (*eng_timeout) (struct ata_port *ap);
void (*eng_timeout) (struct ata_port *ap);
</programlisting>
</programlisting>
<para>
<para>
This is a high level error handling function, called from the
This is a high level error handling function, called from the
error handling thread, when a command times out.
error handling thread, when a command times out. Most newer
hardware will implement its own error handling code here. IDE BMDMA
drivers may use the helper function ata_eng_timeout().
</para>
</para>
</sect2>
<sect2><title>
Hardware interrupt handling
</title>
<programlisting>
<programlisting>
irqreturn_t (*irq_handler)(int, void *, struct pt_regs *);
irqreturn_t (*irq_handler)(int, void *, struct pt_regs *);
void (*irq_clear) (struct ata_port *);
void (*irq_clear) (struct ata_port *);
...
@@ -216,6 +280,9 @@ void (*irq_clear) (struct ata_port *);
...
@@ -216,6 +280,9 @@ void (*irq_clear) (struct ata_port *);
is quiet.
is quiet.
</para>
</para>
</sect2>
<sect2><title>
SATA phy read/write
</title>
<programlisting>
<programlisting>
u32 (*scr_read) (struct ata_port *ap, unsigned int sc_reg);
u32 (*scr_read) (struct ata_port *ap, unsigned int sc_reg);
void (*scr_write) (struct ata_port *ap, unsigned int sc_reg,
void (*scr_write) (struct ata_port *ap, unsigned int sc_reg,
...
@@ -227,6 +294,9 @@ void (*scr_write) (struct ata_port *ap, unsigned int sc_reg,
...
@@ -227,6 +294,9 @@ void (*scr_write) (struct ata_port *ap, unsigned int sc_reg,
if ->phy_reset hook called the sata_phy_reset() helper function.
if ->phy_reset hook called the sata_phy_reset() helper function.
</para>
</para>
</sect2>
<sect2><title>
Init and shutdown
</title>
<programlisting>
<programlisting>
int (*port_start) (struct ata_port *ap);
int (*port_start) (struct ata_port *ap);
void (*port_stop) (struct ata_port *ap);
void (*port_stop) (struct ata_port *ap);
...
@@ -240,15 +310,17 @@ void (*host_stop) (struct ata_host_set *host_set);
...
@@ -240,15 +310,17 @@ void (*host_stop) (struct ata_host_set *host_set);
tasks.
tasks.
</para>
</para>
<para>
<para>
->host_stop() is called when the rmmod or hot unplug process
begins. The hook must stop all hardware interrupts, DMA
engines, etc.
</para>
<para>
->port_stop() is called after ->host_stop(). It's sole function
->port_stop() is called after ->host_stop(). It's sole function
is to release DMA/memory resources, now that they are no longer
is to release DMA/memory resources, now that they are no longer
actively being used.
actively being used.
</para>
</para>
<para>
->host_stop() is called after all ->port_stop() calls
have completed. The hook must finalize hardware shutdown, release DMA
and other resources, etc.
</para>
</sect2>
</sect1>
</sect1>
</chapter>
</chapter>
...
@@ -279,4 +351,24 @@ void (*host_stop) (struct ata_host_set *host_set);
...
@@ -279,4 +351,24 @@ void (*host_stop) (struct ata_host_set *host_set);
!Idrivers/scsi/sata_sil.c
!Idrivers/scsi/sata_sil.c
</chapter>
</chapter>
<chapter
id=
"libataThanks"
>
<title>
Thanks
</title>
<para>
The bulk of the ATA knowledge comes thanks to long conversations with
Andre Hedrick (www.linux-ide.org), and long hours pondering the ATA
and SCSI specifications.
</para>
<para>
Thanks to Alan Cox for pointing out similarities
between SATA and SCSI, and in general for motivation to hack on
libata.
</para>
<para>
libata's device detection
method, ata_pio_devchk, and in general all the early probing was
based on extensive study of Hale Landis's probe/reset code in his
ATADRVR driver (www.ata-atapi.com).
</para>
</chapter>
</book>
</book>
Makefile
浏览文件 @
2830077f
VERSION
=
2
VERSION
=
2
PATCHLEVEL
=
6
PATCHLEVEL
=
6
SUBLEVEL
=
12
SUBLEVEL
=
12
EXTRAVERSION
=
-rc
5
EXTRAVERSION
=
-rc
6
NAME
=
Woozy Numbat
NAME
=
Woozy Numbat
# *DOCUMENTATION*
# *DOCUMENTATION*
...
...
arch/m68knommu/kernel/process.c
浏览文件 @
2830077f
...
@@ -45,11 +45,13 @@ asmlinkage void ret_from_fork(void);
...
@@ -45,11 +45,13 @@ asmlinkage void ret_from_fork(void);
*/
*/
void
default_idle
(
void
)
void
default_idle
(
void
)
{
{
while
(
1
)
{
local_irq_disable
();
if
(
need_resched
())
while
(
!
need_resched
())
{
__asm__
(
"stop #0x2000"
:
:
:
"cc"
);
/* This stop will re-enable interrupts */
schedule
();
__asm__
(
"stop #0x2000"
:
:
:
"cc"
);
local_irq_disable
();
}
}
local_irq_enable
();
}
}
void
(
*
idle
)(
void
)
=
default_idle
;
void
(
*
idle
)(
void
)
=
default_idle
;
...
@@ -63,7 +65,12 @@ void (*idle)(void) = default_idle;
...
@@ -63,7 +65,12 @@ void (*idle)(void) = default_idle;
void
cpu_idle
(
void
)
void
cpu_idle
(
void
)
{
{
/* endless idle loop with no priority at all */
/* endless idle loop with no priority at all */
idle
();
while
(
1
)
{
idle
();
preempt_enable_no_resched
();
schedule
();
preempt_disable
();
}
}
}
void
machine_restart
(
char
*
__unused
)
void
machine_restart
(
char
*
__unused
)
...
...
arch/ppc64/kernel/entry.S
浏览文件 @
2830077f
...
@@ -436,15 +436,6 @@ END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
...
@@ -436,15 +436,6 @@ END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
REST_8GPRS
(14,
r1
)
REST_8GPRS
(14,
r1
)
REST_10GPRS
(22,
r1
)
REST_10GPRS
(22,
r1
)
#ifdef CONFIG_PPC_ISERIES
clrrdi
r7
,
r1
,
THREAD_SHIFT
/*
get
current_thread_info
()
*/
ld
r7
,
TI_FLAGS
(
r7
)
/*
Get
run
light
flag
*/
mfspr
r9
,
CTRLF
srdi
r7
,
r7
,
TIF_RUN_LIGHT
insrdi
r9
,
r7
,
1
,
63
/*
Insert
run
light
into
CTRL
*/
mtspr
CTRLT
,
r9
#endif
/
*
convert
old
thread
to
its
task_struct
for
return
value
*/
/
*
convert
old
thread
to
its
task_struct
for
return
value
*/
addi
r3
,
r3
,-
THREAD
addi
r3
,
r3
,-
THREAD
ld
r7
,
_NIP
(
r1
)
/*
Return
to
_switch
caller
in
new
task
*/
ld
r7
,
_NIP
(
r1
)
/*
Return
to
_switch
caller
in
new
task
*/
...
...
arch/ppc64/kernel/head.S
浏览文件 @
2830077f
...
@@ -626,10 +626,10 @@ system_reset_iSeries:
...
@@ -626,10 +626,10 @@ system_reset_iSeries:
lhz
r24
,
PACAPACAINDEX
(
r13
)
/*
Get
processor
#
*/
lhz
r24
,
PACAPACAINDEX
(
r13
)
/*
Get
processor
#
*/
cmpwi
0
,
r24
,
0
/*
Are
we
processor
0
?
*/
cmpwi
0
,
r24
,
0
/*
Are
we
processor
0
?
*/
beq
.
__start_initialization_iSeries
/*
Start
up
the
first
processor
*/
beq
.
__start_initialization_iSeries
/*
Start
up
the
first
processor
*/
mfspr
r4
,
CTRLF
mfspr
r4
,
SPRN_
CTRLF
li
r5
,
RUNLATCH
/*
Turn
off
the
run
light
*/
li
r5
,
CTRL_RUNLATCH
/*
Turn
off
the
run
light
*/
andc
r4
,
r4
,
r5
andc
r4
,
r4
,
r5
mtspr
CTRLT
,
r4
mtspr
SPRN_
CTRLT
,
r4
1
:
1
:
HMT_LOW
HMT_LOW
...
@@ -2082,9 +2082,9 @@ _GLOBAL(hmt_start_secondary)
...
@@ -2082,9 +2082,9 @@ _GLOBAL(hmt_start_secondary)
mfspr
r4
,
HID0
mfspr
r4
,
HID0
ori
r4
,
r4
,
0x1
ori
r4
,
r4
,
0x1
mtspr
HID0
,
r4
mtspr
HID0
,
r4
mfspr
r4
,
CTRLF
mfspr
r4
,
SPRN_
CTRLF
oris
r4
,
r4
,
0x40
oris
r4
,
r4
,
0x40
mtspr
CTRLT
,
r4
mtspr
SPRN_
CTRLT
,
r4
blr
blr
#endif
#endif
...
...
arch/ppc64/kernel/iSeries_setup.c
浏览文件 @
2830077f
...
@@ -852,6 +852,28 @@ static int __init iSeries_src_init(void)
...
@@ -852,6 +852,28 @@ static int __init iSeries_src_init(void)
late_initcall
(
iSeries_src_init
);
late_initcall
(
iSeries_src_init
);
static
int
set_spread_lpevents
(
char
*
str
)
{
unsigned
long
i
;
unsigned
long
val
=
simple_strtoul
(
str
,
NULL
,
0
);
/*
* The parameter is the number of processors to share in processing
* lp events.
*/
if
((
val
>
0
)
&&
(
val
<=
NR_CPUS
))
{
for
(
i
=
1
;
i
<
val
;
++
i
)
paca
[
i
].
lpqueue_ptr
=
paca
[
0
].
lpqueue_ptr
;
printk
(
"lpevent processing spread over %ld processors
\n
"
,
val
);
}
else
{
printk
(
"invalid spread_lpevents %ld
\n
"
,
val
);
}
return
1
;
}
__setup
(
"spread_lpevents="
,
set_spread_lpevents
);
void
__init
iSeries_early_setup
(
void
)
void
__init
iSeries_early_setup
(
void
)
{
{
iSeries_fixup_klimit
();
iSeries_fixup_klimit
();
...
...
arch/ppc64/kernel/idle.c
浏览文件 @
2830077f
...
@@ -75,13 +75,9 @@ static int iSeries_idle(void)
...
@@ -75,13 +75,9 @@ static int iSeries_idle(void)
{
{
struct
paca_struct
*
lpaca
;
struct
paca_struct
*
lpaca
;
long
oldval
;
long
oldval
;
unsigned
long
CTRL
;
/* ensure iSeries run light will be out when idle */
/* ensure iSeries run light will be out when idle */
clear_thread_flag
(
TIF_RUN_LIGHT
);
ppc64_runlatch_off
();
CTRL
=
mfspr
(
CTRLF
);
CTRL
&=
~
RUNLATCH
;
mtspr
(
CTRLT
,
CTRL
);
lpaca
=
get_paca
();
lpaca
=
get_paca
();
...
@@ -111,7 +107,9 @@ static int iSeries_idle(void)
...
@@ -111,7 +107,9 @@ static int iSeries_idle(void)
}
}
}
}
ppc64_runlatch_on
();
schedule
();
schedule
();
ppc64_runlatch_off
();
}
}
return
0
;
return
0
;
...
...
arch/ppc64/kernel/process.c
浏览文件 @
2830077f
...
@@ -378,9 +378,6 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
...
@@ -378,9 +378,6 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
childregs
->
gpr
[
1
]
=
sp
+
sizeof
(
struct
pt_regs
);
childregs
->
gpr
[
1
]
=
sp
+
sizeof
(
struct
pt_regs
);
p
->
thread
.
regs
=
NULL
;
/* no user register state */
p
->
thread
.
regs
=
NULL
;
/* no user register state */
clear_ti_thread_flag
(
p
->
thread_info
,
TIF_32BIT
);
clear_ti_thread_flag
(
p
->
thread_info
,
TIF_32BIT
);
#ifdef CONFIG_PPC_ISERIES
set_ti_thread_flag
(
p
->
thread_info
,
TIF_RUN_LIGHT
);
#endif
}
else
{
}
else
{
childregs
->
gpr
[
1
]
=
usp
;
childregs
->
gpr
[
1
]
=
usp
;
p
->
thread
.
regs
=
childregs
;
p
->
thread
.
regs
=
childregs
;
...
...
arch/ppc64/kernel/prom_init.c
浏览文件 @
2830077f
...
@@ -1370,7 +1370,7 @@ static int __init prom_find_machine_type(void)
...
@@ -1370,7 +1370,7 @@ static int __init prom_find_machine_type(void)
}
}
/* Default to pSeries. We need to know if we are running LPAR */
/* Default to pSeries. We need to know if we are running LPAR */
rtas
=
call_prom
(
"finddevice"
,
1
,
1
,
ADDR
(
"/rtas"
));
rtas
=
call_prom
(
"finddevice"
,
1
,
1
,
ADDR
(
"/rtas"
));
if
(
!
PHANDLE_VALID
(
rtas
))
{
if
(
PHANDLE_VALID
(
rtas
))
{
int
x
=
prom_getproplen
(
rtas
,
"ibm,hypertas-functions"
);
int
x
=
prom_getproplen
(
rtas
,
"ibm,hypertas-functions"
);
if
(
x
!=
PROM_ERROR
)
{
if
(
x
!=
PROM_ERROR
)
{
prom_printf
(
"Hypertas detected, assuming LPAR !
\n
"
);
prom_printf
(
"Hypertas detected, assuming LPAR !
\n
"
);
...
...
arch/ppc64/kernel/setup.c
浏览文件 @
2830077f
...
@@ -103,11 +103,6 @@ extern void unflatten_device_tree(void);
...
@@ -103,11 +103,6 @@ extern void unflatten_device_tree(void);
extern
void
smp_release_cpus
(
void
);
extern
void
smp_release_cpus
(
void
);
unsigned
long
decr_overclock
=
1
;
unsigned
long
decr_overclock_proc0
=
1
;
unsigned
long
decr_overclock_set
=
0
;
unsigned
long
decr_overclock_proc0_set
=
0
;
int
have_of
=
1
;
int
have_of
=
1
;
int
boot_cpuid
=
0
;
int
boot_cpuid
=
0
;
int
boot_cpuid_phys
=
0
;
int
boot_cpuid_phys
=
0
;
...
@@ -1120,64 +1115,15 @@ void ppc64_dump_msg(unsigned int src, const char *msg)
...
@@ -1120,64 +1115,15 @@ void ppc64_dump_msg(unsigned int src, const char *msg)
printk
(
"[dump]%04x %s
\n
"
,
src
,
msg
);
printk
(
"[dump]%04x %s
\n
"
,
src
,
msg
);
}
}
int
set_spread_lpevents
(
char
*
str
)
{
/* The parameter is the number of processors to share in processing lp events */
unsigned
long
i
;
unsigned
long
val
=
simple_strtoul
(
str
,
NULL
,
0
);
if
(
(
val
>
0
)
&&
(
val
<=
NR_CPUS
)
)
{
for
(
i
=
1
;
i
<
val
;
++
i
)
paca
[
i
].
lpqueue_ptr
=
paca
[
0
].
lpqueue_ptr
;
printk
(
"lpevent processing spread over %ld processors
\n
"
,
val
);
}
else
printk
(
"invalid spreaqd_lpevents %ld
\n
"
,
val
);
return
1
;
}
/* This should only be called on processor 0 during calibrate decr */
/* This should only be called on processor 0 during calibrate decr */
void
setup_default_decr
(
void
)
void
setup_default_decr
(
void
)
{
{
struct
paca_struct
*
lpaca
=
get_paca
();
struct
paca_struct
*
lpaca
=
get_paca
();
if
(
decr_overclock_set
&&
!
decr_overclock_proc0_set
)
lpaca
->
default_decr
=
tb_ticks_per_jiffy
;
decr_overclock_proc0
=
decr_overclock
;
lpaca
->
default_decr
=
tb_ticks_per_jiffy
/
decr_overclock_proc0
;
lpaca
->
next_jiffy_update_tb
=
get_tb
()
+
tb_ticks_per_jiffy
;
lpaca
->
next_jiffy_update_tb
=
get_tb
()
+
tb_ticks_per_jiffy
;
}
}
int
set_decr_overclock_proc0
(
char
*
str
)
{
unsigned
long
val
=
simple_strtoul
(
str
,
NULL
,
0
);
if
(
(
val
>=
1
)
&&
(
val
<=
48
)
)
{
decr_overclock_proc0_set
=
1
;
decr_overclock_proc0
=
val
;
printk
(
"proc 0 decrementer overclock factor of %ld
\n
"
,
val
);
}
else
printk
(
"invalid proc 0 decrementer overclock factor of %ld
\n
"
,
val
);
return
1
;
}
int
set_decr_overclock
(
char
*
str
)
{
unsigned
long
val
=
simple_strtoul
(
str
,
NULL
,
0
);
if
(
(
val
>=
1
)
&&
(
val
<=
48
)
)
{
decr_overclock_set
=
1
;
decr_overclock
=
val
;
printk
(
"decrementer overclock factor of %ld
\n
"
,
val
);
}
else
printk
(
"invalid decrementer overclock factor of %ld
\n
"
,
val
);
return
1
;
}
__setup
(
"spread_lpevents="
,
set_spread_lpevents
);
__setup
(
"decr_overclock_proc0="
,
set_decr_overclock_proc0
);
__setup
(
"decr_overclock="
,
set_decr_overclock
);
#ifndef CONFIG_PPC_ISERIES
#ifndef CONFIG_PPC_ISERIES
/*
/*
* This function can be used by platforms to "find" legacy serial ports.
* This function can be used by platforms to "find" legacy serial ports.
...
...
arch/ppc64/kernel/smp.c
浏览文件 @
2830077f
...
@@ -334,7 +334,6 @@ void smp_call_function_interrupt(void)
...
@@ -334,7 +334,6 @@ void smp_call_function_interrupt(void)
}
}
}
}
extern
unsigned
long
decr_overclock
;
extern
struct
gettimeofday_struct
do_gtod
;
extern
struct
gettimeofday_struct
do_gtod
;
struct
thread_info
*
current_set
[
NR_CPUS
];
struct
thread_info
*
current_set
[
NR_CPUS
];
...
@@ -491,7 +490,7 @@ int __devinit __cpu_up(unsigned int cpu)
...
@@ -491,7 +490,7 @@ int __devinit __cpu_up(unsigned int cpu)
if
(
smp_ops
->
cpu_bootable
&&
!
smp_ops
->
cpu_bootable
(
cpu
))
if
(
smp_ops
->
cpu_bootable
&&
!
smp_ops
->
cpu_bootable
(
cpu
))
return
-
EINVAL
;
return
-
EINVAL
;
paca
[
cpu
].
default_decr
=
tb_ticks_per_jiffy
/
decr_overclock
;
paca
[
cpu
].
default_decr
=
tb_ticks_per_jiffy
;
if
(
!
cpu_has_feature
(
CPU_FTR_SLB
))
{
if
(
!
cpu_has_feature
(
CPU_FTR_SLB
))
{
void
*
tmp
;
void
*
tmp
;
...
...
arch/ppc64/kernel/sysfs.c
浏览文件 @
2830077f
...
@@ -113,7 +113,6 @@ void ppc64_enable_pmcs(void)
...
@@ -113,7 +113,6 @@ void ppc64_enable_pmcs(void)
#ifdef CONFIG_PPC_PSERIES
#ifdef CONFIG_PPC_PSERIES
unsigned
long
set
,
reset
;
unsigned
long
set
,
reset
;
int
ret
;
int
ret
;
unsigned
int
ctrl
;
#endif
/* CONFIG_PPC_PSERIES */
#endif
/* CONFIG_PPC_PSERIES */
/* Only need to enable them once */
/* Only need to enable them once */
...
@@ -167,11 +166,8 @@ void ppc64_enable_pmcs(void)
...
@@ -167,11 +166,8 @@ void ppc64_enable_pmcs(void)
* On SMT machines we have to set the run latch in the ctrl register
* On SMT machines we have to set the run latch in the ctrl register
* in order to make PMC6 spin.
* in order to make PMC6 spin.
*/
*/
if
(
cpu_has_feature
(
CPU_FTR_SMT
))
{
if
(
cpu_has_feature
(
CPU_FTR_SMT
))
ctrl
=
mfspr
(
CTRLF
);
ppc64_runlatch_on
();
ctrl
|=
RUNLATCH
;
mtspr
(
CTRLT
,
ctrl
);
}
#endif
/* CONFIG_PPC_PSERIES */
#endif
/* CONFIG_PPC_PSERIES */
}
}
...
...
arch/s390/appldata/appldata_base.c
浏览文件 @
2830077f
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
//#include <linux/kernel_stat.h>
//#include <linux/kernel_stat.h>
#include <linux/notifier.h>
#include <linux/notifier.h>
#include <linux/cpu.h>
#include <linux/cpu.h>
#include <linux/workqueue.h>
#include "appldata.h"
#include "appldata.h"
...
@@ -133,9 +134,12 @@ static int appldata_interval = APPLDATA_CPU_INTERVAL;
...
@@ -133,9 +134,12 @@ static int appldata_interval = APPLDATA_CPU_INTERVAL;
static
int
appldata_timer_active
;
static
int
appldata_timer_active
;
/*
/*
*
Tasklet
*
Work queue
*/
*/
static
struct
tasklet_struct
appldata_tasklet_struct
;
static
struct
workqueue_struct
*
appldata_wq
;
static
void
appldata_work_fn
(
void
*
data
);
static
DECLARE_WORK
(
appldata_work
,
appldata_work_fn
,
NULL
);
/*
/*
* Ops list
* Ops list
...
@@ -144,11 +148,11 @@ static DEFINE_SPINLOCK(appldata_ops_lock);
...
@@ -144,11 +148,11 @@ static DEFINE_SPINLOCK(appldata_ops_lock);
static
LIST_HEAD
(
appldata_ops_list
);
static
LIST_HEAD
(
appldata_ops_list
);
/*************************
timer, tasklet, DIAG
******************************/
/*************************
** timer, work, DIAG *
******************************/
/*
/*
* appldata_timer_function()
* appldata_timer_function()
*
*
* schedule
tasklet
and reschedule timer
* schedule
work
and reschedule timer
*/
*/
static
void
appldata_timer_function
(
unsigned
long
data
,
struct
pt_regs
*
regs
)
static
void
appldata_timer_function
(
unsigned
long
data
,
struct
pt_regs
*
regs
)
{
{
...
@@ -157,22 +161,22 @@ static void appldata_timer_function(unsigned long data, struct pt_regs *regs)
...
@@ -157,22 +161,22 @@ static void appldata_timer_function(unsigned long data, struct pt_regs *regs)
atomic_read
(
&
appldata_expire_count
));
atomic_read
(
&
appldata_expire_count
));
if
(
atomic_dec_and_test
(
&
appldata_expire_count
))
{
if
(
atomic_dec_and_test
(
&
appldata_expire_count
))
{
atomic_set
(
&
appldata_expire_count
,
num_online_cpus
());
atomic_set
(
&
appldata_expire_count
,
num_online_cpus
());
tasklet_schedule
((
struct
tasklet
_struct
*
)
data
);
queue_work
(
appldata_wq
,
(
struct
work
_struct
*
)
data
);
}
}
}
}
/*
/*
* appldata_
tasklet_functio
n()
* appldata_
work_f
n()
*
*
* call data gathering function for each (active) module
* call data gathering function for each (active) module
*/
*/
static
void
appldata_
tasklet_function
(
unsigned
long
data
)
static
void
appldata_
work_fn
(
void
*
data
)
{
{
struct
list_head
*
lh
;
struct
list_head
*
lh
;
struct
appldata_ops
*
ops
;
struct
appldata_ops
*
ops
;
int
i
;
int
i
;
P_DEBUG
(
" -=
Tasklet
=-
\n
"
);
P_DEBUG
(
" -=
Work Queue
=-
\n
"
);
i
=
0
;
i
=
0
;
spin_lock
(
&
appldata_ops_lock
);
spin_lock
(
&
appldata_ops_lock
);
list_for_each
(
lh
,
&
appldata_ops_list
)
{
list_for_each
(
lh
,
&
appldata_ops_list
)
{
...
@@ -231,7 +235,7 @@ static int appldata_diag(char record_nr, u16 function, unsigned long buffer,
...
@@ -231,7 +235,7 @@ static int appldata_diag(char record_nr, u16 function, unsigned long buffer,
:
"=d"
(
ry
)
:
"d"
(
&
(
appldata_parameter_list
))
:
"cc"
);
:
"=d"
(
ry
)
:
"d"
(
&
(
appldata_parameter_list
))
:
"cc"
);
return
(
int
)
ry
;
return
(
int
)
ry
;
}
}
/**********************
timer, tasklet, DIAG <END>
***************************/
/**********************
** timer, work, DIAG <END> *
***************************/
/****************************** /proc stuff **********************************/
/****************************** /proc stuff **********************************/
...
@@ -411,7 +415,7 @@ appldata_generic_handler(ctl_table *ctl, int write, struct file *filp,
...
@@ -411,7 +415,7 @@ appldata_generic_handler(ctl_table *ctl, int write, struct file *filp,
struct
list_head
*
lh
;
struct
list_head
*
lh
;
found
=
0
;
found
=
0
;
spin_lock
_bh
(
&
appldata_ops_lock
);
spin_lock
(
&
appldata_ops_lock
);
list_for_each
(
lh
,
&
appldata_ops_list
)
{
list_for_each
(
lh
,
&
appldata_ops_list
)
{
tmp_ops
=
list_entry
(
lh
,
struct
appldata_ops
,
list
);
tmp_ops
=
list_entry
(
lh
,
struct
appldata_ops
,
list
);
if
(
&
tmp_ops
->
ctl_table
[
2
]
==
ctl
)
{
if
(
&
tmp_ops
->
ctl_table
[
2
]
==
ctl
)
{
...
@@ -419,15 +423,15 @@ appldata_generic_handler(ctl_table *ctl, int write, struct file *filp,
...
@@ -419,15 +423,15 @@ appldata_generic_handler(ctl_table *ctl, int write, struct file *filp,
}
}
}
}
if
(
!
found
)
{
if
(
!
found
)
{
spin_unlock
_bh
(
&
appldata_ops_lock
);
spin_unlock
(
&
appldata_ops_lock
);
return
-
ENODEV
;
return
-
ENODEV
;
}
}
ops
=
ctl
->
data
;
ops
=
ctl
->
data
;
if
(
!
try_module_get
(
ops
->
owner
))
{
// protect this function
if
(
!
try_module_get
(
ops
->
owner
))
{
// protect this function
spin_unlock
_bh
(
&
appldata_ops_lock
);
spin_unlock
(
&
appldata_ops_lock
);
return
-
ENODEV
;
return
-
ENODEV
;
}
}
spin_unlock
_bh
(
&
appldata_ops_lock
);
spin_unlock
(
&
appldata_ops_lock
);
if
(
!*
lenp
||
*
ppos
)
{
if
(
!*
lenp
||
*
ppos
)
{
*
lenp
=
0
;
*
lenp
=
0
;
...
@@ -451,10 +455,11 @@ appldata_generic_handler(ctl_table *ctl, int write, struct file *filp,
...
@@ -451,10 +455,11 @@ appldata_generic_handler(ctl_table *ctl, int write, struct file *filp,
return
-
EFAULT
;
return
-
EFAULT
;
}
}
spin_lock
_bh
(
&
appldata_ops_lock
);
spin_lock
(
&
appldata_ops_lock
);
if
((
buf
[
0
]
==
'1'
)
&&
(
ops
->
active
==
0
))
{
if
((
buf
[
0
]
==
'1'
)
&&
(
ops
->
active
==
0
))
{
if
(
!
try_module_get
(
ops
->
owner
))
{
// protect tasklet
// protect work queue callback
spin_unlock_bh
(
&
appldata_ops_lock
);
if
(
!
try_module_get
(
ops
->
owner
))
{
spin_unlock
(
&
appldata_ops_lock
);
module_put
(
ops
->
owner
);
module_put
(
ops
->
owner
);
return
-
ENODEV
;
return
-
ENODEV
;
}
}
...
@@ -485,7 +490,7 @@ appldata_generic_handler(ctl_table *ctl, int write, struct file *filp,
...
@@ -485,7 +490,7 @@ appldata_generic_handler(ctl_table *ctl, int write, struct file *filp,
}
}
module_put
(
ops
->
owner
);
module_put
(
ops
->
owner
);
}
}
spin_unlock
_bh
(
&
appldata_ops_lock
);
spin_unlock
(
&
appldata_ops_lock
);
out:
out:
*
lenp
=
len
;
*
lenp
=
len
;
*
ppos
+=
len
;
*
ppos
+=
len
;
...
@@ -529,7 +534,7 @@ int appldata_register_ops(struct appldata_ops *ops)
...
@@ -529,7 +534,7 @@ int appldata_register_ops(struct appldata_ops *ops)
}
}
memset
(
ops
->
ctl_table
,
0
,
4
*
sizeof
(
struct
ctl_table
));
memset
(
ops
->
ctl_table
,
0
,
4
*
sizeof
(
struct
ctl_table
));
spin_lock
_bh
(
&
appldata_ops_lock
);
spin_lock
(
&
appldata_ops_lock
);
list_for_each
(
lh
,
&
appldata_ops_list
)
{
list_for_each
(
lh
,
&
appldata_ops_list
)
{
tmp_ops
=
list_entry
(
lh
,
struct
appldata_ops
,
list
);
tmp_ops
=
list_entry
(
lh
,
struct
appldata_ops
,
list
);
P_DEBUG
(
"register_ops loop: %i) name = %s, ctl = %i
\n
"
,
P_DEBUG
(
"register_ops loop: %i) name = %s, ctl = %i
\n
"
,
...
@@ -541,18 +546,18 @@ int appldata_register_ops(struct appldata_ops *ops)
...
@@ -541,18 +546,18 @@ int appldata_register_ops(struct appldata_ops *ops)
APPLDATA_PROC_NAME_LENGTH
)
==
0
)
{
APPLDATA_PROC_NAME_LENGTH
)
==
0
)
{
P_ERROR
(
"Name
\"
%s
\"
already registered!
\n
"
,
ops
->
name
);
P_ERROR
(
"Name
\"
%s
\"
already registered!
\n
"
,
ops
->
name
);
kfree
(
ops
->
ctl_table
);
kfree
(
ops
->
ctl_table
);
spin_unlock
_bh
(
&
appldata_ops_lock
);
spin_unlock
(
&
appldata_ops_lock
);
return
-
EBUSY
;
return
-
EBUSY
;
}
}
if
(
tmp_ops
->
ctl_nr
==
ops
->
ctl_nr
)
{
if
(
tmp_ops
->
ctl_nr
==
ops
->
ctl_nr
)
{
P_ERROR
(
"ctl_nr %i already registered!
\n
"
,
ops
->
ctl_nr
);
P_ERROR
(
"ctl_nr %i already registered!
\n
"
,
ops
->
ctl_nr
);
kfree
(
ops
->
ctl_table
);
kfree
(
ops
->
ctl_table
);
spin_unlock
_bh
(
&
appldata_ops_lock
);
spin_unlock
(
&
appldata_ops_lock
);
return
-
EBUSY
;
return
-
EBUSY
;
}
}
}
}
list_add
(
&
ops
->
list
,
&
appldata_ops_list
);
list_add
(
&
ops
->
list
,
&
appldata_ops_list
);
spin_unlock
_bh
(
&
appldata_ops_lock
);
spin_unlock
(
&
appldata_ops_lock
);
ops
->
ctl_table
[
0
].
ctl_name
=
CTL_APPLDATA
;
ops
->
ctl_table
[
0
].
ctl_name
=
CTL_APPLDATA
;
ops
->
ctl_table
[
0
].
procname
=
appldata_proc_name
;
ops
->
ctl_table
[
0
].
procname
=
appldata_proc_name
;
...
@@ -583,12 +588,12 @@ int appldata_register_ops(struct appldata_ops *ops)
...
@@ -583,12 +588,12 @@ int appldata_register_ops(struct appldata_ops *ops)
*/
*/
void
appldata_unregister_ops
(
struct
appldata_ops
*
ops
)
void
appldata_unregister_ops
(
struct
appldata_ops
*
ops
)
{
{
spin_lock
_bh
(
&
appldata_ops_lock
);
spin_lock
(
&
appldata_ops_lock
);
unregister_sysctl_table
(
ops
->
sysctl_header
);
unregister_sysctl_table
(
ops
->
sysctl_header
);
list_del
(
&
ops
->
list
);
list_del
(
&
ops
->
list
);
kfree
(
ops
->
ctl_table
);
kfree
(
ops
->
ctl_table
);
ops
->
ctl_table
=
NULL
;
ops
->
ctl_table
=
NULL
;
spin_unlock
_bh
(
&
appldata_ops_lock
);
spin_unlock
(
&
appldata_ops_lock
);
P_INFO
(
"%s-ops unregistered!
\n
"
,
ops
->
name
);
P_INFO
(
"%s-ops unregistered!
\n
"
,
ops
->
name
);
}
}
/********************** module-ops management <END> **************************/
/********************** module-ops management <END> **************************/
...
@@ -602,7 +607,7 @@ appldata_online_cpu(int cpu)
...
@@ -602,7 +607,7 @@ appldata_online_cpu(int cpu)
init_virt_timer
(
&
per_cpu
(
appldata_timer
,
cpu
));
init_virt_timer
(
&
per_cpu
(
appldata_timer
,
cpu
));
per_cpu
(
appldata_timer
,
cpu
).
function
=
appldata_timer_function
;
per_cpu
(
appldata_timer
,
cpu
).
function
=
appldata_timer_function
;
per_cpu
(
appldata_timer
,
cpu
).
data
=
(
unsigned
long
)
per_cpu
(
appldata_timer
,
cpu
).
data
=
(
unsigned
long
)
&
appldata_
tasklet_struct
;
&
appldata_
work
;
atomic_inc
(
&
appldata_expire_count
);
atomic_inc
(
&
appldata_expire_count
);
spin_lock
(
&
appldata_timer_lock
);
spin_lock
(
&
appldata_timer_lock
);
__appldata_vtimer_setup
(
APPLDATA_MOD_TIMER
);
__appldata_vtimer_setup
(
APPLDATA_MOD_TIMER
);
...
@@ -615,7 +620,7 @@ appldata_offline_cpu(int cpu)
...
@@ -615,7 +620,7 @@ appldata_offline_cpu(int cpu)
del_virt_timer
(
&
per_cpu
(
appldata_timer
,
cpu
));
del_virt_timer
(
&
per_cpu
(
appldata_timer
,
cpu
));
if
(
atomic_dec_and_test
(
&
appldata_expire_count
))
{
if
(
atomic_dec_and_test
(
&
appldata_expire_count
))
{
atomic_set
(
&
appldata_expire_count
,
num_online_cpus
());
atomic_set
(
&
appldata_expire_count
,
num_online_cpus
());
tasklet_schedule
(
&
appldata_tasklet_struct
);
queue_work
(
appldata_wq
,
&
appldata_work
);
}
}
spin_lock
(
&
appldata_timer_lock
);
spin_lock
(
&
appldata_timer_lock
);
__appldata_vtimer_setup
(
APPLDATA_MOD_TIMER
);
__appldata_vtimer_setup
(
APPLDATA_MOD_TIMER
);
...
@@ -648,7 +653,7 @@ static struct notifier_block __devinitdata appldata_nb = {
...
@@ -648,7 +653,7 @@ static struct notifier_block __devinitdata appldata_nb = {
/*
/*
* appldata_init()
* appldata_init()
*
*
* init timer
and tasklet
, register /proc entries
* init timer, register /proc entries
*/
*/
static
int
__init
appldata_init
(
void
)
static
int
__init
appldata_init
(
void
)
{
{
...
@@ -657,6 +662,12 @@ static int __init appldata_init(void)
...
@@ -657,6 +662,12 @@ static int __init appldata_init(void)
P_DEBUG
(
"sizeof(parameter_list) = %lu
\n
"
,
P_DEBUG
(
"sizeof(parameter_list) = %lu
\n
"
,
sizeof
(
struct
appldata_parameter_list
));
sizeof
(
struct
appldata_parameter_list
));
appldata_wq
=
create_singlethread_workqueue
(
"appldata"
);
if
(
!
appldata_wq
)
{
P_ERROR
(
"Could not create work queue
\n
"
);
return
-
ENOMEM
;
}
for_each_online_cpu
(
i
)
for_each_online_cpu
(
i
)
appldata_online_cpu
(
i
);
appldata_online_cpu
(
i
);
...
@@ -670,7 +681,6 @@ static int __init appldata_init(void)
...
@@ -670,7 +681,6 @@ static int __init appldata_init(void)
appldata_table
[
1
].
de
->
owner
=
THIS_MODULE
;
appldata_table
[
1
].
de
->
owner
=
THIS_MODULE
;
#endif
#endif
tasklet_init
(
&
appldata_tasklet_struct
,
appldata_tasklet_function
,
0
);
P_DEBUG
(
"Base interface initialized.
\n
"
);
P_DEBUG
(
"Base interface initialized.
\n
"
);
return
0
;
return
0
;
}
}
...
@@ -678,7 +688,7 @@ static int __init appldata_init(void)
...
@@ -678,7 +688,7 @@ static int __init appldata_init(void)
/*
/*
* appldata_exit()
* appldata_exit()
*
*
* stop timer
and tasklet
, unregister /proc entries
* stop timer, unregister /proc entries
*/
*/
static
void
__exit
appldata_exit
(
void
)
static
void
__exit
appldata_exit
(
void
)
{
{
...
@@ -690,7 +700,7 @@ static void __exit appldata_exit(void)
...
@@ -690,7 +700,7 @@ static void __exit appldata_exit(void)
/*
/*
* ops list should be empty, but just in case something went wrong...
* ops list should be empty, but just in case something went wrong...
*/
*/
spin_lock
_bh
(
&
appldata_ops_lock
);
spin_lock
(
&
appldata_ops_lock
);
list_for_each
(
lh
,
&
appldata_ops_list
)
{
list_for_each
(
lh
,
&
appldata_ops_list
)
{
ops
=
list_entry
(
lh
,
struct
appldata_ops
,
list
);
ops
=
list_entry
(
lh
,
struct
appldata_ops
,
list
);
rc
=
appldata_diag
(
ops
->
record_nr
,
APPLDATA_STOP_REC
,
rc
=
appldata_diag
(
ops
->
record_nr
,
APPLDATA_STOP_REC
,
...
@@ -700,7 +710,7 @@ static void __exit appldata_exit(void)
...
@@ -700,7 +710,7 @@ static void __exit appldata_exit(void)
"return code: %d
\n
"
,
ops
->
name
,
rc
);
"return code: %d
\n
"
,
ops
->
name
,
rc
);
}
}
}
}
spin_unlock
_bh
(
&
appldata_ops_lock
);
spin_unlock
(
&
appldata_ops_lock
);
for_each_online_cpu
(
i
)
for_each_online_cpu
(
i
)
appldata_offline_cpu
(
i
);
appldata_offline_cpu
(
i
);
...
@@ -709,7 +719,7 @@ static void __exit appldata_exit(void)
...
@@ -709,7 +719,7 @@ static void __exit appldata_exit(void)
unregister_sysctl_table
(
appldata_sysctl_header
);
unregister_sysctl_table
(
appldata_sysctl_header
);
tasklet_kill
(
&
appldata_tasklet_struct
);
destroy_workqueue
(
appldata_wq
);
P_DEBUG
(
"... module unloaded!
\n
"
);
P_DEBUG
(
"... module unloaded!
\n
"
);
}
}
/**************************** init / exit <END> ******************************/
/**************************** init / exit <END> ******************************/
...
...
arch/s390/appldata/appldata_mem.c
浏览文件 @
2830077f
...
@@ -68,7 +68,7 @@ struct appldata_mem_data {
...
@@ -68,7 +68,7 @@ struct appldata_mem_data {
u64
pgmajfault
;
/* page faults (major only) */
u64
pgmajfault
;
/* page faults (major only) */
// <-- New in 2.6
// <-- New in 2.6
}
appldata_mem_data
;
}
__attribute__
((
packed
))
appldata_mem_data
;
static
inline
void
appldata_debug_print
(
struct
appldata_mem_data
*
mem_data
)
static
inline
void
appldata_debug_print
(
struct
appldata_mem_data
*
mem_data
)
...
...
arch/s390/appldata/appldata_net_sum.c
浏览文件 @
2830077f
...
@@ -57,7 +57,7 @@ struct appldata_net_sum_data {
...
@@ -57,7 +57,7 @@ struct appldata_net_sum_data {
u64
rx_dropped
;
/* no space in linux buffers */
u64
rx_dropped
;
/* no space in linux buffers */
u64
tx_dropped
;
/* no space available in linux */
u64
tx_dropped
;
/* no space available in linux */
u64
collisions
;
/* collisions while transmitting */
u64
collisions
;
/* collisions while transmitting */
}
appldata_net_sum_data
;
}
__attribute__
((
packed
))
appldata_net_sum_data
;
static
inline
void
appldata_print_debug
(
struct
appldata_net_sum_data
*
net_data
)
static
inline
void
appldata_print_debug
(
struct
appldata_net_sum_data
*
net_data
)
...
...
arch/s390/appldata/appldata_os.c
浏览文件 @
2830077f
...
@@ -49,7 +49,7 @@ struct appldata_os_per_cpu {
...
@@ -49,7 +49,7 @@ struct appldata_os_per_cpu {
u32
per_cpu_softirq
;
/* ... spent in softirqs */
u32
per_cpu_softirq
;
/* ... spent in softirqs */
u32
per_cpu_iowait
;
/* ... spent while waiting for I/O */
u32
per_cpu_iowait
;
/* ... spent while waiting for I/O */
// <-- New in 2.6
// <-- New in 2.6
};
}
__attribute__
((
packed
))
;
struct
appldata_os_data
{
struct
appldata_os_data
{
u64
timestamp
;
u64
timestamp
;
...
@@ -75,7 +75,7 @@ struct appldata_os_data {
...
@@ -75,7 +75,7 @@ struct appldata_os_data {
/* per cpu data */
/* per cpu data */
struct
appldata_os_per_cpu
os_cpu
[
0
];
struct
appldata_os_per_cpu
os_cpu
[
0
];
};
}
__attribute__
((
packed
))
;
static
struct
appldata_os_data
*
appldata_os_data
;
static
struct
appldata_os_data
*
appldata_os_data
;
...
...
arch/s390/kernel/ptrace.c
浏览文件 @
2830077f
...
@@ -40,6 +40,7 @@
...
@@ -40,6 +40,7 @@
#include <asm/pgalloc.h>
#include <asm/pgalloc.h>
#include <asm/system.h>
#include <asm/system.h>
#include <asm/uaccess.h>
#include <asm/uaccess.h>
#include <asm/unistd.h>
#ifdef CONFIG_S390_SUPPORT
#ifdef CONFIG_S390_SUPPORT
#include "compat_ptrace.h"
#include "compat_ptrace.h"
...
@@ -130,13 +131,19 @@ static int
...
@@ -130,13 +131,19 @@ static int
peek_user
(
struct
task_struct
*
child
,
addr_t
addr
,
addr_t
data
)
peek_user
(
struct
task_struct
*
child
,
addr_t
addr
,
addr_t
data
)
{
{
struct
user
*
dummy
=
NULL
;
struct
user
*
dummy
=
NULL
;
addr_t
offset
,
tmp
;
addr_t
offset
,
tmp
,
mask
;
/*
/*
* Stupid gdb peeks/pokes the access registers in 64 bit with
* Stupid gdb peeks/pokes the access registers in 64 bit with
* an alignment of 4. Programmers from hell...
* an alignment of 4. Programmers from hell...
*/
*/
if
((
addr
&
3
)
||
addr
>
sizeof
(
struct
user
)
-
__ADDR_MASK
)
mask
=
__ADDR_MASK
;
#ifdef CONFIG_ARCH_S390X
if
(
addr
>=
(
addr_t
)
&
dummy
->
regs
.
acrs
&&
addr
<
(
addr_t
)
&
dummy
->
regs
.
orig_gpr2
)
mask
=
3
;
#endif
if
((
addr
&
mask
)
||
addr
>
sizeof
(
struct
user
)
-
__ADDR_MASK
)
return
-
EIO
;
return
-
EIO
;
if
(
addr
<
(
addr_t
)
&
dummy
->
regs
.
acrs
)
{
if
(
addr
<
(
addr_t
)
&
dummy
->
regs
.
acrs
)
{
...
@@ -153,6 +160,16 @@ peek_user(struct task_struct *child, addr_t addr, addr_t data)
...
@@ -153,6 +160,16 @@ peek_user(struct task_struct *child, addr_t addr, addr_t data)
* access registers are stored in the thread structure
* access registers are stored in the thread structure
*/
*/
offset
=
addr
-
(
addr_t
)
&
dummy
->
regs
.
acrs
;
offset
=
addr
-
(
addr_t
)
&
dummy
->
regs
.
acrs
;
#ifdef CONFIG_ARCH_S390X
/*
* Very special case: old & broken 64 bit gdb reading
* from acrs[15]. Result is a 64 bit value. Read the
* 32 bit acrs[15] value and shift it by 32. Sick...
*/
if
(
addr
==
(
addr_t
)
&
dummy
->
regs
.
acrs
[
15
])
tmp
=
((
unsigned
long
)
child
->
thread
.
acrs
[
15
])
<<
32
;
else
#endif
tmp
=
*
(
addr_t
*
)((
addr_t
)
&
child
->
thread
.
acrs
+
offset
);
tmp
=
*
(
addr_t
*
)((
addr_t
)
&
child
->
thread
.
acrs
+
offset
);
}
else
if
(
addr
==
(
addr_t
)
&
dummy
->
regs
.
orig_gpr2
)
{
}
else
if
(
addr
==
(
addr_t
)
&
dummy
->
regs
.
orig_gpr2
)
{
...
@@ -167,6 +184,9 @@ peek_user(struct task_struct *child, addr_t addr, addr_t data)
...
@@ -167,6 +184,9 @@ peek_user(struct task_struct *child, addr_t addr, addr_t data)
*/
*/
offset
=
addr
-
(
addr_t
)
&
dummy
->
regs
.
fp_regs
;
offset
=
addr
-
(
addr_t
)
&
dummy
->
regs
.
fp_regs
;
tmp
=
*
(
addr_t
*
)((
addr_t
)
&
child
->
thread
.
fp_regs
+
offset
);
tmp
=
*
(
addr_t
*
)((
addr_t
)
&
child
->
thread
.
fp_regs
+
offset
);
if
(
addr
==
(
addr_t
)
&
dummy
->
regs
.
fp_regs
.
fpc
)
tmp
&=
(
unsigned
long
)
FPC_VALID_MASK
<<
(
BITS_PER_LONG
-
32
);
}
else
if
(
addr
<
(
addr_t
)
(
&
dummy
->
regs
.
per_info
+
1
))
{
}
else
if
(
addr
<
(
addr_t
)
(
&
dummy
->
regs
.
per_info
+
1
))
{
/*
/*
...
@@ -191,13 +211,19 @@ static int
...
@@ -191,13 +211,19 @@ static int
poke_user
(
struct
task_struct
*
child
,
addr_t
addr
,
addr_t
data
)
poke_user
(
struct
task_struct
*
child
,
addr_t
addr
,
addr_t
data
)
{
{
struct
user
*
dummy
=
NULL
;
struct
user
*
dummy
=
NULL
;
addr_t
offset
;
addr_t
offset
,
mask
;
/*
/*
* Stupid gdb peeks/pokes the access registers in 64 bit with
* Stupid gdb peeks/pokes the access registers in 64 bit with
* an alignment of 4. Programmers from hell indeed...
* an alignment of 4. Programmers from hell indeed...
*/
*/
if
((
addr
&
3
)
||
addr
>
sizeof
(
struct
user
)
-
__ADDR_MASK
)
mask
=
__ADDR_MASK
;
#ifdef CONFIG_ARCH_S390X
if
(
addr
>=
(
addr_t
)
&
dummy
->
regs
.
acrs
&&
addr
<
(
addr_t
)
&
dummy
->
regs
.
orig_gpr2
)
mask
=
3
;
#endif
if
((
addr
&
mask
)
||
addr
>
sizeof
(
struct
user
)
-
__ADDR_MASK
)
return
-
EIO
;
return
-
EIO
;
if
(
addr
<
(
addr_t
)
&
dummy
->
regs
.
acrs
)
{
if
(
addr
<
(
addr_t
)
&
dummy
->
regs
.
acrs
)
{
...
@@ -224,6 +250,17 @@ poke_user(struct task_struct *child, addr_t addr, addr_t data)
...
@@ -224,6 +250,17 @@ poke_user(struct task_struct *child, addr_t addr, addr_t data)
* access registers are stored in the thread structure
* access registers are stored in the thread structure
*/
*/
offset
=
addr
-
(
addr_t
)
&
dummy
->
regs
.
acrs
;
offset
=
addr
-
(
addr_t
)
&
dummy
->
regs
.
acrs
;
#ifdef CONFIG_ARCH_S390X
/*
* Very special case: old & broken 64 bit gdb writing
* to acrs[15] with a 64 bit value. Ignore the lower
* half of the value and write the upper 32 bit to
* acrs[15]. Sick...
*/
if
(
addr
==
(
addr_t
)
&
dummy
->
regs
.
acrs
[
15
])
child
->
thread
.
acrs
[
15
]
=
(
unsigned
int
)
(
data
>>
32
);
else
#endif
*
(
addr_t
*
)((
addr_t
)
&
child
->
thread
.
acrs
+
offset
)
=
data
;
*
(
addr_t
*
)((
addr_t
)
&
child
->
thread
.
acrs
+
offset
)
=
data
;
}
else
if
(
addr
==
(
addr_t
)
&
dummy
->
regs
.
orig_gpr2
)
{
}
else
if
(
addr
==
(
addr_t
)
&
dummy
->
regs
.
orig_gpr2
)
{
...
@@ -237,7 +274,8 @@ poke_user(struct task_struct *child, addr_t addr, addr_t data)
...
@@ -237,7 +274,8 @@ poke_user(struct task_struct *child, addr_t addr, addr_t data)
* floating point regs. are stored in the thread structure
* floating point regs. are stored in the thread structure
*/
*/
if
(
addr
==
(
addr_t
)
&
dummy
->
regs
.
fp_regs
.
fpc
&&
if
(
addr
==
(
addr_t
)
&
dummy
->
regs
.
fp_regs
.
fpc
&&
(
data
&
~
FPC_VALID_MASK
)
!=
0
)
(
data
&
~
((
unsigned
long
)
FPC_VALID_MASK
<<
(
BITS_PER_LONG
-
32
)))
!=
0
)
return
-
EINVAL
;
return
-
EINVAL
;
offset
=
addr
-
(
addr_t
)
&
dummy
->
regs
.
fp_regs
;
offset
=
addr
-
(
addr_t
)
&
dummy
->
regs
.
fp_regs
;
*
(
addr_t
*
)((
addr_t
)
&
child
->
thread
.
fp_regs
+
offset
)
=
data
;
*
(
addr_t
*
)((
addr_t
)
&
child
->
thread
.
fp_regs
+
offset
)
=
data
;
...
@@ -722,6 +760,13 @@ syscall_trace(struct pt_regs *regs, int entryexit)
...
@@ -722,6 +760,13 @@ syscall_trace(struct pt_regs *regs, int entryexit)
ptrace_notify
(
SIGTRAP
|
((
current
->
ptrace
&
PT_TRACESYSGOOD
)
ptrace_notify
(
SIGTRAP
|
((
current
->
ptrace
&
PT_TRACESYSGOOD
)
?
0x80
:
0
));
?
0x80
:
0
));
/*
* If the debuffer has set an invalid system call number,
* we prepare to skip the system call restart handling.
*/
if
(
!
entryexit
&&
regs
->
gprs
[
2
]
>=
NR_syscalls
)
regs
->
trap
=
-
1
;
/*
/*
* this isn't the same as continuing with a signal, but it will do
* this isn't the same as continuing with a signal, but it will do
* for normal use. strace only continues with a signal if the
* for normal use. strace only continues with a signal if the
...
...
arch/s390/mm/fault.c
浏览文件 @
2830077f
...
@@ -207,7 +207,7 @@ do_exception(struct pt_regs *regs, unsigned long error_code, int is_protection)
...
@@ -207,7 +207,7 @@ do_exception(struct pt_regs *regs, unsigned long error_code, int is_protection)
* we are not in an interrupt and that there is a
* we are not in an interrupt and that there is a
* user context.
* user context.
*/
*/
if
(
user_address
==
0
||
in_
interrupt
()
||
!
mm
)
if
(
user_address
==
0
||
in_
atomic
()
||
!
mm
)
goto
no_context
;
goto
no_context
;
/*
/*
...
...
drivers/atm/Makefile
浏览文件 @
2830077f
...
@@ -39,7 +39,8 @@ ifeq ($(CONFIG_ATM_FORE200E_PCA),y)
...
@@ -39,7 +39,8 @@ ifeq ($(CONFIG_ATM_FORE200E_PCA),y)
fore_200e-objs
+=
fore200e_pca_fw.o
fore_200e-objs
+=
fore200e_pca_fw.o
# guess the target endianess to choose the right PCA-200E firmware image
# guess the target endianess to choose the right PCA-200E firmware image
ifeq
($(CONFIG_ATM_FORE200E_PCA_DEFAULT_FW),y)
ifeq
($(CONFIG_ATM_FORE200E_PCA_DEFAULT_FW),y)
CONFIG_ATM_FORE200E_PCA_FW
=
$(
shell
if
test
-n
"
`
$(CC)
-E
-dM
$(src)
/../../include/asm/byteorder.h |
grep
' __LITTLE_ENDIAN '
`
"
;
then
echo
$(obj)
/pca200e.bin
;
else
echo
$(obj)
/pca200e_ecd.bin2
;
fi
)
byteorder.h
:=
include
$(
if
$(
patsubst
$(srctree)
,,
$(objtree)
)
,2
)
/asm/byteorder.h
CONFIG_ATM_FORE200E_PCA_FW
:=
$(obj)
/pca200e
$(
if
$(
shell
$(CC)
-E
-dM
$(byteorder.h)
|
grep
' __LITTLE_ENDIAN '
)
,.bin,_ecd.bin2
)
endif
endif
endif
endif
...
...
drivers/atm/fore200e.c
浏览文件 @
2830077f
...
@@ -383,8 +383,7 @@ fore200e_shutdown(struct fore200e* fore200e)
...
@@ -383,8 +383,7 @@ fore200e_shutdown(struct fore200e* fore200e)
switch
(
fore200e
->
state
)
{
switch
(
fore200e
->
state
)
{
case
FORE200E_STATE_COMPLETE
:
case
FORE200E_STATE_COMPLETE
:
if
(
fore200e
->
stats
)
kfree
(
fore200e
->
stats
);
kfree
(
fore200e
->
stats
);
case
FORE200E_STATE_IRQ
:
case
FORE200E_STATE_IRQ
:
free_irq
(
fore200e
->
irq
,
fore200e
->
atm_dev
);
free_irq
(
fore200e
->
irq
,
fore200e
->
atm_dev
);
...
@@ -963,8 +962,7 @@ fore200e_tx_irq(struct fore200e* fore200e)
...
@@ -963,8 +962,7 @@ fore200e_tx_irq(struct fore200e* fore200e)
entry
,
txq
->
tail
,
entry
->
vc_map
,
entry
->
skb
);
entry
,
txq
->
tail
,
entry
->
vc_map
,
entry
->
skb
);
/* free copy of misaligned data */
/* free copy of misaligned data */
if
(
entry
->
data
)
kfree
(
entry
->
data
);
kfree
(
entry
->
data
);
/* remove DMA mapping */
/* remove DMA mapping */
fore200e
->
bus
->
dma_unmap
(
fore200e
,
entry
->
tpd
->
tsd
[
0
].
buffer
,
entry
->
tpd
->
tsd
[
0
].
length
,
fore200e
->
bus
->
dma_unmap
(
fore200e
,
entry
->
tpd
->
tsd
[
0
].
buffer
,
entry
->
tpd
->
tsd
[
0
].
length
,
...
...
drivers/atm/he.c
浏览文件 @
2830077f
...
@@ -412,8 +412,7 @@ he_init_one(struct pci_dev *pci_dev, const struct pci_device_id *pci_ent)
...
@@ -412,8 +412,7 @@ he_init_one(struct pci_dev *pci_dev, const struct pci_device_id *pci_ent)
init_one_failure:
init_one_failure:
if
(
atm_dev
)
if
(
atm_dev
)
atm_dev_deregister
(
atm_dev
);
atm_dev_deregister
(
atm_dev
);
if
(
he_dev
)
kfree
(
he_dev
);
kfree
(
he_dev
);
pci_disable_device
(
pci_dev
);
pci_disable_device
(
pci_dev
);
return
err
;
return
err
;
}
}
...
@@ -2534,8 +2533,7 @@ he_open(struct atm_vcc *vcc)
...
@@ -2534,8 +2533,7 @@ he_open(struct atm_vcc *vcc)
open_failed:
open_failed:
if
(
err
)
{
if
(
err
)
{
if
(
he_vcc
)
kfree
(
he_vcc
);
kfree
(
he_vcc
);
clear_bit
(
ATM_VF_ADDR
,
&
vcc
->
flags
);
clear_bit
(
ATM_VF_ADDR
,
&
vcc
->
flags
);
}
}
else
else
...
...
drivers/atm/nicstar.c
浏览文件 @
2830077f
...
@@ -676,10 +676,10 @@ static int __devinit ns_init_card(int i, struct pci_dev *pcidev)
...
@@ -676,10 +676,10 @@ static int __devinit ns_init_card(int i, struct pci_dev *pcidev)
PRINTK
(
"nicstar%d: RSQ base at 0x%x.
\n
"
,
i
,
(
u32
)
card
->
rsq
.
base
);
PRINTK
(
"nicstar%d: RSQ base at 0x%x.
\n
"
,
i
,
(
u32
)
card
->
rsq
.
base
);
/* Initialize SCQ0, the only VBR SCQ used */
/* Initialize SCQ0, the only VBR SCQ used */
card
->
scq1
=
(
scq_info
*
)
NULL
;
card
->
scq1
=
NULL
;
card
->
scq2
=
(
scq_info
*
)
NULL
;
card
->
scq2
=
NULL
;
card
->
scq0
=
get_scq
(
VBR_SCQSIZE
,
NS_VRSCD0
);
card
->
scq0
=
get_scq
(
VBR_SCQSIZE
,
NS_VRSCD0
);
if
(
card
->
scq0
==
(
scq_info
*
)
NULL
)
if
(
card
->
scq0
==
NULL
)
{
{
printk
(
"nicstar%d: can't get SCQ0.
\n
"
,
i
);
printk
(
"nicstar%d: can't get SCQ0.
\n
"
,
i
);
error
=
12
;
error
=
12
;
...
@@ -993,24 +993,24 @@ static scq_info *get_scq(int size, u32 scd)
...
@@ -993,24 +993,24 @@ static scq_info *get_scq(int size, u32 scd)
int
i
;
int
i
;
if
(
size
!=
VBR_SCQSIZE
&&
size
!=
CBR_SCQSIZE
)
if
(
size
!=
VBR_SCQSIZE
&&
size
!=
CBR_SCQSIZE
)
return
(
scq_info
*
)
NULL
;
return
NULL
;
scq
=
(
scq_info
*
)
kmalloc
(
sizeof
(
scq_info
),
GFP_KERNEL
);
scq
=
(
scq_info
*
)
kmalloc
(
sizeof
(
scq_info
),
GFP_KERNEL
);
if
(
scq
==
(
scq_info
*
)
NULL
)
if
(
scq
==
NULL
)
return
(
scq_info
*
)
NULL
;
return
NULL
;
scq
->
org
=
kmalloc
(
2
*
size
,
GFP_KERNEL
);
scq
->
org
=
kmalloc
(
2
*
size
,
GFP_KERNEL
);
if
(
scq
->
org
==
NULL
)
if
(
scq
->
org
==
NULL
)
{
{
kfree
(
scq
);
kfree
(
scq
);
return
(
scq_info
*
)
NULL
;
return
NULL
;
}
}
scq
->
skb
=
(
struct
sk_buff
**
)
kmalloc
(
sizeof
(
struct
sk_buff
*
)
*
scq
->
skb
=
(
struct
sk_buff
**
)
kmalloc
(
sizeof
(
struct
sk_buff
*
)
*
(
size
/
NS_SCQE_SIZE
),
GFP_KERNEL
);
(
size
/
NS_SCQE_SIZE
),
GFP_KERNEL
);
if
(
scq
->
skb
==
(
struct
sk_buff
**
)
NULL
)
if
(
scq
->
skb
==
NULL
)
{
{
kfree
(
scq
->
org
);
kfree
(
scq
->
org
);
kfree
(
scq
);
kfree
(
scq
);
return
(
scq_info
*
)
NULL
;
return
NULL
;
}
}
scq
->
num_entries
=
size
/
NS_SCQE_SIZE
;
scq
->
num_entries
=
size
/
NS_SCQE_SIZE
;
scq
->
base
=
(
ns_scqe
*
)
ALIGN_ADDRESS
(
scq
->
org
,
size
);
scq
->
base
=
(
ns_scqe
*
)
ALIGN_ADDRESS
(
scq
->
org
,
size
);
...
@@ -1498,7 +1498,7 @@ static int ns_open(struct atm_vcc *vcc)
...
@@ -1498,7 +1498,7 @@ static int ns_open(struct atm_vcc *vcc)
vc
->
cbr_scd
=
NS_FRSCD
+
frscdi
*
NS_FRSCD_SIZE
;
vc
->
cbr_scd
=
NS_FRSCD
+
frscdi
*
NS_FRSCD_SIZE
;
scq
=
get_scq
(
CBR_SCQSIZE
,
vc
->
cbr_scd
);
scq
=
get_scq
(
CBR_SCQSIZE
,
vc
->
cbr_scd
);
if
(
scq
==
(
scq_info
*
)
NULL
)
if
(
scq
==
NULL
)
{
{
PRINTK
(
"nicstar%d: can't get fixed rate SCQ.
\n
"
,
card
->
index
);
PRINTK
(
"nicstar%d: can't get fixed rate SCQ.
\n
"
,
card
->
index
);
card
->
scd2vc
[
frscdi
]
=
NULL
;
card
->
scd2vc
[
frscdi
]
=
NULL
;
...
...
drivers/atm/zatm.c
浏览文件 @
2830077f
...
@@ -902,7 +902,7 @@ static void close_tx(struct atm_vcc *vcc)
...
@@ -902,7 +902,7 @@ static void close_tx(struct atm_vcc *vcc)
zatm_dev
->
tx_bw
+=
vcc
->
qos
.
txtp
.
min_pcr
;
zatm_dev
->
tx_bw
+=
vcc
->
qos
.
txtp
.
min_pcr
;
dealloc_shaper
(
vcc
->
dev
,
zatm_vcc
->
shaper
);
dealloc_shaper
(
vcc
->
dev
,
zatm_vcc
->
shaper
);
}
}
if
(
zatm_vcc
->
ring
)
kfree
(
zatm_vcc
->
ring
);
kfree
(
zatm_vcc
->
ring
);
}
}
...
@@ -1339,12 +1339,9 @@ static int __init zatm_start(struct atm_dev *dev)
...
@@ -1339,12 +1339,9 @@ static int __init zatm_start(struct atm_dev *dev)
return
0
;
return
0
;
out:
out:
for
(
i
=
0
;
i
<
NR_MBX
;
i
++
)
for
(
i
=
0
;
i
<
NR_MBX
;
i
++
)
if
(
zatm_dev
->
mbx_start
[
i
]
!=
0
)
kfree
(
zatm_dev
->
mbx_start
[
i
]);
kfree
((
void
*
)
zatm_dev
->
mbx_start
[
i
]);
kfree
(
zatm_dev
->
rx_map
);
if
(
zatm_dev
->
rx_map
!=
NULL
)
kfree
(
zatm_dev
->
tx_map
);
kfree
(
zatm_dev
->
rx_map
);
if
(
zatm_dev
->
tx_map
!=
NULL
)
kfree
(
zatm_dev
->
tx_map
);
free_irq
(
zatm_dev
->
irq
,
dev
);
free_irq
(
zatm_dev
->
irq
,
dev
);
return
error
;
return
error
;
}
}
...
...
drivers/block/ub.c
浏览文件 @
2830077f
此差异已折叠。
点击以展开。
drivers/net/hamradio/baycom_epp.c
浏览文件 @
2830077f
...
@@ -374,29 +374,6 @@ static inline void do_kiss_params(struct baycom_state *bc,
...
@@ -374,29 +374,6 @@ static inline void do_kiss_params(struct baycom_state *bc,
}
}
/* --------------------------------------------------------------------- */
/* --------------------------------------------------------------------- */
/*
* high performance HDLC encoder
* yes, it's ugly, but generates pretty good code
*/
#define ENCODEITERA(j) \
({ \
if (!(notbitstream & (0x1f0 << j))) \
goto stuff##j; \
encodeend##j: ; \
})
#define ENCODEITERB(j) \
({ \
stuff##j: \
bitstream &= ~(0x100 << j); \
bitbuf = (bitbuf & (((2 << j) << numbit) - 1)) | \
((bitbuf & ~(((2 << j) << numbit) - 1)) << 1); \
numbit++; \
notbitstream = ~bitstream; \
goto encodeend##j; \
})
static
void
encode_hdlc
(
struct
baycom_state
*
bc
)
static
void
encode_hdlc
(
struct
baycom_state
*
bc
)
{
{
...
@@ -405,6 +382,7 @@ static void encode_hdlc(struct baycom_state *bc)
...
@@ -405,6 +382,7 @@ static void encode_hdlc(struct baycom_state *bc)
int
pkt_len
;
int
pkt_len
;
unsigned
bitstream
,
notbitstream
,
bitbuf
,
numbit
,
crc
;
unsigned
bitstream
,
notbitstream
,
bitbuf
,
numbit
,
crc
;
unsigned
char
crcarr
[
2
];
unsigned
char
crcarr
[
2
];
int
j
;
if
(
bc
->
hdlctx
.
bufcnt
>
0
)
if
(
bc
->
hdlctx
.
bufcnt
>
0
)
return
;
return
;
...
@@ -429,24 +407,14 @@ static void encode_hdlc(struct baycom_state *bc)
...
@@ -429,24 +407,14 @@ static void encode_hdlc(struct baycom_state *bc)
pkt_len
--
;
pkt_len
--
;
if
(
!
pkt_len
)
if
(
!
pkt_len
)
bp
=
crcarr
;
bp
=
crcarr
;
ENCODEITERA
(
0
);
for
(
j
=
0
;
j
<
8
;
j
++
)
ENCODEITERA
(
1
);
if
(
unlikely
(
!
(
notbitstream
&
(
0x1f0
<<
j
))))
{
ENCODEITERA
(
2
);
bitstream
&=
~
(
0x100
<<
j
);
ENCODEITERA
(
3
);
bitbuf
=
(
bitbuf
&
(((
2
<<
j
)
<<
numbit
)
-
1
))
|
ENCODEITERA
(
4
);
((
bitbuf
&
~
(((
2
<<
j
)
<<
numbit
)
-
1
))
<<
1
);
ENCODEITERA
(
5
);
numbit
++
;
ENCODEITERA
(
6
);
notbitstream
=
~
bitstream
;
ENCODEITERA
(
7
);
}
goto
enditer
;
ENCODEITERB
(
0
);
ENCODEITERB
(
1
);
ENCODEITERB
(
2
);
ENCODEITERB
(
3
);
ENCODEITERB
(
4
);
ENCODEITERB
(
5
);
ENCODEITERB
(
6
);
ENCODEITERB
(
7
);
enditer:
numbit
+=
8
;
numbit
+=
8
;
while
(
numbit
>=
8
)
{
while
(
numbit
>=
8
)
{
*
wp
++
=
bitbuf
;
*
wp
++
=
bitbuf
;
...
@@ -610,37 +578,6 @@ static void do_rxpacket(struct net_device *dev)
...
@@ -610,37 +578,6 @@ static void do_rxpacket(struct net_device *dev)
bc
->
stats
.
rx_packets
++
;
bc
->
stats
.
rx_packets
++
;
}
}
#define DECODEITERA(j) \
({ \
if (!(notbitstream & (0x0fc << j)))
/* flag or abort */
\
goto flgabrt##j; \
if ((bitstream & (0x1f8 << j)) == (0xf8 << j))
/* stuffed bit */
\
goto stuff##j; \
enditer##j: ; \
})
#define DECODEITERB(j) \
({ \
flgabrt##j: \
if (!(notbitstream & (0x1fc << j))) {
/* abort received */
\
state = 0; \
goto enditer##j; \
} \
if ((bitstream & (0x1fe << j)) != (0x0fc << j))
/* flag received */
\
goto enditer##j; \
if (state) \
do_rxpacket(dev); \
bc->hdlcrx.bufcnt = 0; \
bc->hdlcrx.bufptr = bc->hdlcrx.buf; \
state = 1; \
numbits = 7-j; \
goto enditer##j; \
stuff##j: \
numbits--; \
bitbuf = (bitbuf & ((~0xff) << j)) | ((bitbuf & ~((~0xff) << j)) << 1); \
goto enditer##j; \
})
static
int
receive
(
struct
net_device
*
dev
,
int
cnt
)
static
int
receive
(
struct
net_device
*
dev
,
int
cnt
)
{
{
struct
baycom_state
*
bc
=
netdev_priv
(
dev
);
struct
baycom_state
*
bc
=
netdev_priv
(
dev
);
...
@@ -649,6 +586,7 @@ static int receive(struct net_device *dev, int cnt)
...
@@ -649,6 +586,7 @@ static int receive(struct net_device *dev, int cnt)
unsigned
char
tmp
[
128
];
unsigned
char
tmp
[
128
];
unsigned
char
*
cp
;
unsigned
char
*
cp
;
int
cnt2
,
ret
=
0
;
int
cnt2
,
ret
=
0
;
int
j
;
numbits
=
bc
->
hdlcrx
.
numbits
;
numbits
=
bc
->
hdlcrx
.
numbits
;
state
=
bc
->
hdlcrx
.
state
;
state
=
bc
->
hdlcrx
.
state
;
...
@@ -669,24 +607,32 @@ static int receive(struct net_device *dev, int cnt)
...
@@ -669,24 +607,32 @@ static int receive(struct net_device *dev, int cnt)
bitbuf
|=
(
*
cp
)
<<
8
;
bitbuf
|=
(
*
cp
)
<<
8
;
numbits
+=
8
;
numbits
+=
8
;
notbitstream
=
~
bitstream
;
notbitstream
=
~
bitstream
;
DECODEITERA
(
0
);
for
(
j
=
0
;
j
<
8
;
j
++
)
{
DECODEITERA
(
1
);
DECODEITERA
(
2
);
/* flag or abort */
DECODEITERA
(
3
);
if
(
unlikely
(
!
(
notbitstream
&
(
0x0fc
<<
j
))))
{
DECODEITERA
(
4
);
DECODEITERA
(
5
);
/* abort received */
DECODEITERA
(
6
);
if
(
!
(
notbitstream
&
(
0x1fc
<<
j
)))
DECODEITERA
(
7
);
state
=
0
;
goto
enddec
;
DECODEITERB
(
0
);
/* not flag received */
DECODEITERB
(
1
);
else
if
(
!
(
bitstream
&
(
0x1fe
<<
j
))
!=
(
0x0fc
<<
j
))
{
DECODEITERB
(
2
);
if
(
state
)
DECODEITERB
(
3
);
do_rxpacket
(
dev
);
DECODEITERB
(
4
);
bc
->
hdlcrx
.
bufcnt
=
0
;
DECODEITERB
(
5
);
bc
->
hdlcrx
.
bufptr
=
bc
->
hdlcrx
.
buf
;
DECODEITERB
(
6
);
state
=
1
;
DECODEITERB
(
7
);
numbits
=
7
-
j
;
enddec:
}
}
/* stuffed bit */
else
if
(
unlikely
((
bitstream
&
(
0x1f8
<<
j
))
==
(
0xf8
<<
j
)))
{
numbits
--
;
bitbuf
=
(
bitbuf
&
((
~
0xff
)
<<
j
))
|
((
bitbuf
&
~
((
~
0xff
)
<<
j
))
<<
1
);
}
}
while
(
state
&&
numbits
>=
8
)
{
while
(
state
&&
numbits
>=
8
)
{
if
(
bc
->
hdlcrx
.
bufcnt
>=
TXBUFFER_SIZE
)
{
if
(
bc
->
hdlcrx
.
bufcnt
>=
TXBUFFER_SIZE
)
{
state
=
0
;
state
=
0
;
...
...
drivers/net/pcmcia/3c574_cs.c
浏览文件 @
2830077f
...
@@ -1274,6 +1274,9 @@ static int el3_close(struct net_device *dev)
...
@@ -1274,6 +1274,9 @@ static int el3_close(struct net_device *dev)
spin_lock_irqsave
(
&
lp
->
window_lock
,
flags
);
spin_lock_irqsave
(
&
lp
->
window_lock
,
flags
);
update_stats
(
dev
);
update_stats
(
dev
);
spin_unlock_irqrestore
(
&
lp
->
window_lock
,
flags
);
spin_unlock_irqrestore
(
&
lp
->
window_lock
,
flags
);
/* force interrupts off */
outw
(
SetIntrEnb
|
0x0000
,
ioaddr
+
EL3_CMD
);
}
}
link
->
open
--
;
link
->
open
--
;
...
...
drivers/net/r8169.c
浏览文件 @
2830077f
...
@@ -1585,8 +1585,8 @@ rtl8169_hw_start(struct net_device *dev)
...
@@ -1585,8 +1585,8 @@ rtl8169_hw_start(struct net_device *dev)
RTL_W8
(
ChipCmd
,
CmdTxEnb
|
CmdRxEnb
);
RTL_W8
(
ChipCmd
,
CmdTxEnb
|
CmdRxEnb
);
RTL_W8
(
EarlyTxThres
,
EarlyTxThld
);
RTL_W8
(
EarlyTxThres
,
EarlyTxThld
);
/*
For gigabit rtl8169, MTU + header + CRC + VLAN
*/
/*
Low hurts. Let's disable the filtering.
*/
RTL_W16
(
RxMaxSize
,
tp
->
rx_buf_sz
);
RTL_W16
(
RxMaxSize
,
16383
);
/* Set Rx Config register */
/* Set Rx Config register */
i
=
rtl8169_rx_config
|
i
=
rtl8169_rx_config
|
...
@@ -2127,6 +2127,11 @@ rtl8169_tx_interrupt(struct net_device *dev, struct rtl8169_private *tp,
...
@@ -2127,6 +2127,11 @@ rtl8169_tx_interrupt(struct net_device *dev, struct rtl8169_private *tp,
}
}
}
}
static
inline
int
rtl8169_fragmented_frame
(
u32
status
)
{
return
(
status
&
(
FirstFrag
|
LastFrag
))
!=
(
FirstFrag
|
LastFrag
);
}
static
inline
void
rtl8169_rx_csum
(
struct
sk_buff
*
skb
,
struct
RxDesc
*
desc
)
static
inline
void
rtl8169_rx_csum
(
struct
sk_buff
*
skb
,
struct
RxDesc
*
desc
)
{
{
u32
opts1
=
le32_to_cpu
(
desc
->
opts1
);
u32
opts1
=
le32_to_cpu
(
desc
->
opts1
);
...
@@ -2177,27 +2182,41 @@ rtl8169_rx_interrupt(struct net_device *dev, struct rtl8169_private *tp,
...
@@ -2177,27 +2182,41 @@ rtl8169_rx_interrupt(struct net_device *dev, struct rtl8169_private *tp,
while
(
rx_left
>
0
)
{
while
(
rx_left
>
0
)
{
unsigned
int
entry
=
cur_rx
%
NUM_RX_DESC
;
unsigned
int
entry
=
cur_rx
%
NUM_RX_DESC
;
struct
RxDesc
*
desc
=
tp
->
RxDescArray
+
entry
;
u32
status
;
u32
status
;
rmb
();
rmb
();
status
=
le32_to_cpu
(
tp
->
RxDescArray
[
entry
].
opts1
);
status
=
le32_to_cpu
(
desc
->
opts1
);
if
(
status
&
DescOwn
)
if
(
status
&
DescOwn
)
break
;
break
;
if
(
status
&
RxRES
)
{
if
(
status
&
RxRES
)
{
printk
(
KERN_INFO
"%s: Rx ERROR!!!
\n
"
,
dev
->
name
);
printk
(
KERN_INFO
"%s: Rx ERROR. status = %08x
\n
"
,
dev
->
name
,
status
);
tp
->
stats
.
rx_errors
++
;
tp
->
stats
.
rx_errors
++
;
if
(
status
&
(
RxRWT
|
RxRUNT
))
if
(
status
&
(
RxRWT
|
RxRUNT
))
tp
->
stats
.
rx_length_errors
++
;
tp
->
stats
.
rx_length_errors
++
;
if
(
status
&
RxCRC
)
if
(
status
&
RxCRC
)
tp
->
stats
.
rx_crc_errors
++
;
tp
->
stats
.
rx_crc_errors
++
;
rtl8169_mark_to_asic
(
desc
,
tp
->
rx_buf_sz
);
}
else
{
}
else
{
struct
RxDesc
*
desc
=
tp
->
RxDescArray
+
entry
;
struct
sk_buff
*
skb
=
tp
->
Rx_skbuff
[
entry
];
struct
sk_buff
*
skb
=
tp
->
Rx_skbuff
[
entry
];
int
pkt_size
=
(
status
&
0x00001FFF
)
-
4
;
int
pkt_size
=
(
status
&
0x00001FFF
)
-
4
;
void
(
*
pci_action
)(
struct
pci_dev
*
,
dma_addr_t
,
void
(
*
pci_action
)(
struct
pci_dev
*
,
dma_addr_t
,
size_t
,
int
)
=
pci_dma_sync_single_for_device
;
size_t
,
int
)
=
pci_dma_sync_single_for_device
;
/*
* The driver does not support incoming fragmented
* frames. They are seen as a symptom of over-mtu
* sized frames.
*/
if
(
unlikely
(
rtl8169_fragmented_frame
(
status
)))
{
tp
->
stats
.
rx_dropped
++
;
tp
->
stats
.
rx_length_errors
++
;
rtl8169_mark_to_asic
(
desc
,
tp
->
rx_buf_sz
);
goto
move_on
;
}
rtl8169_rx_csum
(
skb
,
desc
);
rtl8169_rx_csum
(
skb
,
desc
);
pci_dma_sync_single_for_cpu
(
tp
->
pci_dev
,
pci_dma_sync_single_for_cpu
(
tp
->
pci_dev
,
...
@@ -2224,7 +2243,7 @@ rtl8169_rx_interrupt(struct net_device *dev, struct rtl8169_private *tp,
...
@@ -2224,7 +2243,7 @@ rtl8169_rx_interrupt(struct net_device *dev, struct rtl8169_private *tp,
tp
->
stats
.
rx_bytes
+=
pkt_size
;
tp
->
stats
.
rx_bytes
+=
pkt_size
;
tp
->
stats
.
rx_packets
++
;
tp
->
stats
.
rx_packets
++
;
}
}
move_on:
cur_rx
++
;
cur_rx
++
;
rx_left
--
;
rx_left
--
;
}
}
...
...
drivers/net/shaper.c
浏览文件 @
2830077f
...
@@ -100,35 +100,8 @@ static int sh_debug; /* Debug flag */
...
@@ -100,35 +100,8 @@ static int sh_debug; /* Debug flag */
#define SHAPER_BANNER "CymruNet Traffic Shaper BETA 0.04 for Linux 2.1\n"
#define SHAPER_BANNER "CymruNet Traffic Shaper BETA 0.04 for Linux 2.1\n"
/*
* Locking
*/
static
int
shaper_lock
(
struct
shaper
*
sh
)
{
/*
* Lock in an interrupt must fail
*/
while
(
test_and_set_bit
(
0
,
&
sh
->
locked
))
{
if
(
!
in_interrupt
())
sleep_on
(
&
sh
->
wait_queue
);
else
return
0
;
}
return
1
;
}
static
void
shaper_kick
(
struct
shaper
*
sh
);
static
void
shaper_kick
(
struct
shaper
*
sh
);
static
void
shaper_unlock
(
struct
shaper
*
sh
)
{
clear_bit
(
0
,
&
sh
->
locked
);
wake_up
(
&
sh
->
wait_queue
);
shaper_kick
(
sh
);
}
/*
/*
* Compute clocks on a buffer
* Compute clocks on a buffer
*/
*/
...
@@ -157,17 +130,15 @@ static void shaper_setspeed(struct shaper *shaper, int bitspersec)
...
@@ -157,17 +130,15 @@ static void shaper_setspeed(struct shaper *shaper, int bitspersec)
* Throw a frame at a shaper.
* Throw a frame at a shaper.
*/
*/
static
int
shaper_qframe
(
struct
shaper
*
shaper
,
struct
sk_buff
*
skb
)
static
int
shaper_start_xmit
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
{
{
struct
shaper
*
shaper
=
dev
->
priv
;
struct
sk_buff
*
ptr
;
struct
sk_buff
*
ptr
;
/*
if
(
down_trylock
(
&
shaper
->
sem
))
* Get ready to work on this shaper. Lock may fail if its
return
-
1
;
* an interrupt and locked.
*/
if
(
!
shaper_lock
(
shaper
))
return
-
1
;
ptr
=
shaper
->
sendq
.
prev
;
ptr
=
shaper
->
sendq
.
prev
;
/*
/*
...
@@ -260,7 +231,8 @@ static int shaper_qframe(struct shaper *shaper, struct sk_buff *skb)
...
@@ -260,7 +231,8 @@ static int shaper_qframe(struct shaper *shaper, struct sk_buff *skb)
dev_kfree_skb
(
ptr
);
dev_kfree_skb
(
ptr
);
shaper
->
stats
.
collisions
++
;
shaper
->
stats
.
collisions
++
;
}
}
shaper_unlock
(
shaper
);
shaper_kick
(
shaper
);
up
(
&
shaper
->
sem
);
return
0
;
return
0
;
}
}
...
@@ -297,8 +269,13 @@ static void shaper_queue_xmit(struct shaper *shaper, struct sk_buff *skb)
...
@@ -297,8 +269,13 @@ static void shaper_queue_xmit(struct shaper *shaper, struct sk_buff *skb)
static
void
shaper_timer
(
unsigned
long
data
)
static
void
shaper_timer
(
unsigned
long
data
)
{
{
struct
shaper
*
sh
=
(
struct
shaper
*
)
data
;
struct
shaper
*
shaper
=
(
struct
shaper
*
)
data
;
shaper_kick
(
sh
);
if
(
!
down_trylock
(
&
shaper
->
sem
))
{
shaper_kick
(
shaper
);
up
(
&
shaper
->
sem
);
}
else
mod_timer
(
&
shaper
->
timer
,
jiffies
);
}
}
/*
/*
...
@@ -310,19 +287,6 @@ static void shaper_kick(struct shaper *shaper)
...
@@ -310,19 +287,6 @@ static void shaper_kick(struct shaper *shaper)
{
{
struct
sk_buff
*
skb
;
struct
sk_buff
*
skb
;
/*
* Shaper unlock will kick
*/
if
(
test_and_set_bit
(
0
,
&
shaper
->
locked
))
{
if
(
sh_debug
)
printk
(
"Shaper locked.
\n
"
);
mod_timer
(
&
shaper
->
timer
,
jiffies
);
return
;
}
/*
/*
* Walk the list (may be empty)
* Walk the list (may be empty)
*/
*/
...
@@ -364,8 +328,6 @@ static void shaper_kick(struct shaper *shaper)
...
@@ -364,8 +328,6 @@ static void shaper_kick(struct shaper *shaper)
if
(
skb
!=
NULL
)
if
(
skb
!=
NULL
)
mod_timer
(
&
shaper
->
timer
,
SHAPERCB
(
skb
)
->
shapeclock
);
mod_timer
(
&
shaper
->
timer
,
SHAPERCB
(
skb
)
->
shapeclock
);
clear_bit
(
0
,
&
shaper
->
locked
);
}
}
...
@@ -376,14 +338,12 @@ static void shaper_kick(struct shaper *shaper)
...
@@ -376,14 +338,12 @@ static void shaper_kick(struct shaper *shaper)
static
void
shaper_flush
(
struct
shaper
*
shaper
)
static
void
shaper_flush
(
struct
shaper
*
shaper
)
{
{
struct
sk_buff
*
skb
;
struct
sk_buff
*
skb
;
if
(
!
shaper_lock
(
shaper
))
{
down
(
&
shaper
->
sem
);
printk
(
KERN_ERR
"shaper: shaper_flush() called by an irq!
\n
"
);
return
;
}
while
((
skb
=
skb_dequeue
(
&
shaper
->
sendq
))
!=
NULL
)
while
((
skb
=
skb_dequeue
(
&
shaper
->
sendq
))
!=
NULL
)
dev_kfree_skb
(
skb
);
dev_kfree_skb
(
skb
);
shaper_unlock
(
shaper
);
shaper_kick
(
shaper
);
up
(
&
shaper
->
sem
);
}
}
/*
/*
...
@@ -426,13 +386,6 @@ static int shaper_close(struct net_device *dev)
...
@@ -426,13 +386,6 @@ static int shaper_close(struct net_device *dev)
* ARP and other resolutions and not before.
* ARP and other resolutions and not before.
*/
*/
static
int
shaper_start_xmit
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
{
struct
shaper
*
sh
=
dev
->
priv
;
return
shaper_qframe
(
sh
,
skb
);
}
static
struct
net_device_stats
*
shaper_get_stats
(
struct
net_device
*
dev
)
static
struct
net_device_stats
*
shaper_get_stats
(
struct
net_device
*
dev
)
{
{
struct
shaper
*
sh
=
dev
->
priv
;
struct
shaper
*
sh
=
dev
->
priv
;
...
@@ -623,7 +576,6 @@ static void shaper_init_priv(struct net_device *dev)
...
@@ -623,7 +576,6 @@ static void shaper_init_priv(struct net_device *dev)
init_timer
(
&
sh
->
timer
);
init_timer
(
&
sh
->
timer
);
sh
->
timer
.
function
=
shaper_timer
;
sh
->
timer
.
function
=
shaper_timer
;
sh
->
timer
.
data
=
(
unsigned
long
)
sh
;
sh
->
timer
.
data
=
(
unsigned
long
)
sh
;
init_waitqueue_head
(
&
sh
->
wait_queue
);
}
}
/*
/*
...
...
drivers/scsi/ata_piix.c
浏览文件 @
2830077f
...
@@ -665,15 +665,6 @@ static int piix_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
...
@@ -665,15 +665,6 @@ static int piix_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
return
ata_pci_init_one
(
pdev
,
port_info
,
n_ports
);
return
ata_pci_init_one
(
pdev
,
port_info
,
n_ports
);
}
}
/**
* piix_init -
*
* LOCKING:
*
* RETURNS:
*
*/
static
int
__init
piix_init
(
void
)
static
int
__init
piix_init
(
void
)
{
{
int
rc
;
int
rc
;
...
@@ -689,13 +680,6 @@ static int __init piix_init(void)
...
@@ -689,13 +680,6 @@ static int __init piix_init(void)
return
0
;
return
0
;
}
}
/**
* piix_exit -
*
* LOCKING:
*
*/
static
void
__exit
piix_exit
(
void
)
static
void
__exit
piix_exit
(
void
)
{
{
pci_unregister_driver
(
&
piix_pci_driver
);
pci_unregister_driver
(
&
piix_pci_driver
);
...
...
drivers/scsi/libata-core.c
浏览文件 @
2830077f
此差异已折叠。
点击以展开。
drivers/scsi/libata-scsi.c
浏览文件 @
2830077f
...
@@ -947,7 +947,7 @@ unsigned int ata_scsiop_inq_83(struct ata_scsi_args *args, u8 *rbuf,
...
@@ -947,7 +947,7 @@ unsigned int ata_scsiop_inq_83(struct ata_scsi_args *args, u8 *rbuf,
}
}
/**
/**
* ata_scsiop_noop -
* ata_scsiop_noop -
Command handler that simply returns success.
* @args: device IDENTIFY data / SCSI command of interest.
* @args: device IDENTIFY data / SCSI command of interest.
* @rbuf: Response buffer, to which simulated SCSI cmd output is sent.
* @rbuf: Response buffer, to which simulated SCSI cmd output is sent.
* @buflen: Response buffer length.
* @buflen: Response buffer length.
...
...
drivers/scsi/qla2xxx/qla_os.c
浏览文件 @
2830077f
...
@@ -507,6 +507,7 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd)
...
@@ -507,6 +507,7 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd)
int
ret
,
i
;
int
ret
,
i
;
unsigned
int
id
,
lun
;
unsigned
int
id
,
lun
;
unsigned
long
serial
;
unsigned
long
serial
;
unsigned
long
flags
;
if
(
!
CMD_SP
(
cmd
))
if
(
!
CMD_SP
(
cmd
))
return
FAILED
;
return
FAILED
;
...
@@ -519,7 +520,7 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd)
...
@@ -519,7 +520,7 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd)
/* Check active list for command command. */
/* Check active list for command command. */
spin_unlock_irq
(
ha
->
host
->
host_lock
);
spin_unlock_irq
(
ha
->
host
->
host_lock
);
spin_lock
(
&
ha
->
hardware_lock
);
spin_lock
_irqsave
(
&
ha
->
hardware_lock
,
flags
);
for
(
i
=
1
;
i
<
MAX_OUTSTANDING_COMMANDS
;
i
++
)
{
for
(
i
=
1
;
i
<
MAX_OUTSTANDING_COMMANDS
;
i
++
)
{
sp
=
ha
->
outstanding_cmds
[
i
];
sp
=
ha
->
outstanding_cmds
[
i
];
...
@@ -534,7 +535,7 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd)
...
@@ -534,7 +535,7 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd)
sp
->
state
));
sp
->
state
));
DEBUG3
(
qla2x00_print_scsi_cmd
(
cmd
);)
DEBUG3
(
qla2x00_print_scsi_cmd
(
cmd
);)
spin_unlock
(
&
ha
->
hardware_lock
);
spin_unlock
_irqrestore
(
&
ha
->
hardware_lock
,
flags
);
if
(
qla2x00_abort_command
(
ha
,
sp
))
{
if
(
qla2x00_abort_command
(
ha
,
sp
))
{
DEBUG2
(
printk
(
"%s(%ld): abort_command "
DEBUG2
(
printk
(
"%s(%ld): abort_command "
"mbx failed.
\n
"
,
__func__
,
ha
->
host_no
));
"mbx failed.
\n
"
,
__func__
,
ha
->
host_no
));
...
@@ -543,20 +544,19 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd)
...
@@ -543,20 +544,19 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd)
"mbx success.
\n
"
,
__func__
,
ha
->
host_no
));
"mbx success.
\n
"
,
__func__
,
ha
->
host_no
));
ret
=
SUCCESS
;
ret
=
SUCCESS
;
}
}
spin_lock
(
&
ha
->
hardware_lock
);
spin_lock
_irqsave
(
&
ha
->
hardware_lock
,
flags
);
break
;
break
;
}
}
spin_unlock_irqrestore
(
&
ha
->
hardware_lock
,
flags
);
/* Wait for the command to be returned. */
/* Wait for the command to be returned. */
if
(
ret
==
SUCCESS
)
{
if
(
ret
==
SUCCESS
)
{
spin_unlock
(
&
ha
->
hardware_lock
);
if
(
qla2x00_eh_wait_on_command
(
ha
,
cmd
)
!=
QLA_SUCCESS
)
{
if
(
qla2x00_eh_wait_on_command
(
ha
,
cmd
)
!=
QLA_SUCCESS
)
{
qla_printk
(
KERN_ERR
,
ha
,
qla_printk
(
KERN_ERR
,
ha
,
"scsi(%ld:%d:%d): Abort handler timed out -- %lx "
"scsi(%ld:%d:%d): Abort handler timed out -- %lx "
"%x.
\n
"
,
ha
->
host_no
,
id
,
lun
,
serial
,
ret
);
"%x.
\n
"
,
ha
->
host_no
,
id
,
lun
,
serial
,
ret
);
}
}
spin_lock
(
&
ha
->
hardware_lock
);
}
}
spin_lock_irq
(
ha
->
host
->
host_lock
);
spin_lock_irq
(
ha
->
host
->
host_lock
);
...
@@ -588,6 +588,7 @@ qla2x00_eh_wait_for_pending_target_commands(scsi_qla_host_t *ha, unsigned int t)
...
@@ -588,6 +588,7 @@ qla2x00_eh_wait_for_pending_target_commands(scsi_qla_host_t *ha, unsigned int t)
int
status
;
int
status
;
srb_t
*
sp
;
srb_t
*
sp
;
struct
scsi_cmnd
*
cmd
;
struct
scsi_cmnd
*
cmd
;
unsigned
long
flags
;
status
=
0
;
status
=
0
;
...
@@ -596,11 +597,11 @@ qla2x00_eh_wait_for_pending_target_commands(scsi_qla_host_t *ha, unsigned int t)
...
@@ -596,11 +597,11 @@ qla2x00_eh_wait_for_pending_target_commands(scsi_qla_host_t *ha, unsigned int t)
* array
* array
*/
*/
for
(
cnt
=
1
;
cnt
<
MAX_OUTSTANDING_COMMANDS
;
cnt
++
)
{
for
(
cnt
=
1
;
cnt
<
MAX_OUTSTANDING_COMMANDS
;
cnt
++
)
{
spin_lock
(
&
ha
->
hardware_lock
);
spin_lock
_irqsave
(
&
ha
->
hardware_lock
,
flags
);
sp
=
ha
->
outstanding_cmds
[
cnt
];
sp
=
ha
->
outstanding_cmds
[
cnt
];
if
(
sp
)
{
if
(
sp
)
{
cmd
=
sp
->
cmd
;
cmd
=
sp
->
cmd
;
spin_unlock
(
&
ha
->
hardware_lock
);
spin_unlock
_irqrestore
(
&
ha
->
hardware_lock
,
flags
);
if
(
cmd
->
device
->
id
==
t
)
{
if
(
cmd
->
device
->
id
==
t
)
{
if
(
!
qla2x00_eh_wait_on_command
(
ha
,
cmd
))
{
if
(
!
qla2x00_eh_wait_on_command
(
ha
,
cmd
))
{
status
=
1
;
status
=
1
;
...
@@ -608,7 +609,7 @@ qla2x00_eh_wait_for_pending_target_commands(scsi_qla_host_t *ha, unsigned int t)
...
@@ -608,7 +609,7 @@ qla2x00_eh_wait_for_pending_target_commands(scsi_qla_host_t *ha, unsigned int t)
}
}
}
}
}
else
{
}
else
{
spin_unlock
(
&
ha
->
hardware_lock
);
spin_unlock
_irqrestore
(
&
ha
->
hardware_lock
,
flags
);
}
}
}
}
return
(
status
);
return
(
status
);
...
@@ -740,6 +741,7 @@ qla2x00_eh_wait_for_pending_commands(scsi_qla_host_t *ha)
...
@@ -740,6 +741,7 @@ qla2x00_eh_wait_for_pending_commands(scsi_qla_host_t *ha)
int
status
;
int
status
;
srb_t
*
sp
;
srb_t
*
sp
;
struct
scsi_cmnd
*
cmd
;
struct
scsi_cmnd
*
cmd
;
unsigned
long
flags
;
status
=
1
;
status
=
1
;
...
@@ -748,17 +750,17 @@ qla2x00_eh_wait_for_pending_commands(scsi_qla_host_t *ha)
...
@@ -748,17 +750,17 @@ qla2x00_eh_wait_for_pending_commands(scsi_qla_host_t *ha)
* array
* array
*/
*/
for
(
cnt
=
1
;
cnt
<
MAX_OUTSTANDING_COMMANDS
;
cnt
++
)
{
for
(
cnt
=
1
;
cnt
<
MAX_OUTSTANDING_COMMANDS
;
cnt
++
)
{
spin_lock
(
&
ha
->
hardware_lock
);
spin_lock
_irqsave
(
&
ha
->
hardware_lock
,
flags
);
sp
=
ha
->
outstanding_cmds
[
cnt
];
sp
=
ha
->
outstanding_cmds
[
cnt
];
if
(
sp
)
{
if
(
sp
)
{
cmd
=
sp
->
cmd
;
cmd
=
sp
->
cmd
;
spin_unlock
(
&
ha
->
hardware_lock
);
spin_unlock
_irqrestore
(
&
ha
->
hardware_lock
,
flags
);
status
=
qla2x00_eh_wait_on_command
(
ha
,
cmd
);
status
=
qla2x00_eh_wait_on_command
(
ha
,
cmd
);
if
(
status
==
0
)
if
(
status
==
0
)
break
;
break
;
}
}
else
{
else
{
spin_unlock
(
&
ha
->
hardware_lock
);
spin_unlock
_irqrestore
(
&
ha
->
hardware_lock
,
flags
);
}
}
}
}
return
(
status
);
return
(
status
);
...
...
drivers/scsi/scsi_scan.c
浏览文件 @
2830077f
...
@@ -1197,6 +1197,7 @@ struct scsi_device *__scsi_add_device(struct Scsi_Host *shost, uint channel,
...
@@ -1197,6 +1197,7 @@ struct scsi_device *__scsi_add_device(struct Scsi_Host *shost, uint channel,
if
(
!
starget
)
if
(
!
starget
)
return
ERR_PTR
(
-
ENOMEM
);
return
ERR_PTR
(
-
ENOMEM
);
get_device
(
&
starget
->
dev
);
down
(
&
shost
->
scan_mutex
);
down
(
&
shost
->
scan_mutex
);
res
=
scsi_probe_and_add_lun
(
starget
,
lun
,
NULL
,
&
sdev
,
1
,
hostdata
);
res
=
scsi_probe_and_add_lun
(
starget
,
lun
,
NULL
,
&
sdev
,
1
,
hostdata
);
if
(
res
!=
SCSI_SCAN_LUN_PRESENT
)
if
(
res
!=
SCSI_SCAN_LUN_PRESENT
)
...
...
drivers/serial/vr41xx_siu.c
浏览文件 @
2830077f
...
@@ -234,7 +234,7 @@ static inline const char *siu_type_name(struct uart_port *port)
...
@@ -234,7 +234,7 @@ static inline const char *siu_type_name(struct uart_port *port)
return
"DSIU"
;
return
"DSIU"
;
}
}
return
"unknown"
;
return
NULL
;
}
}
static
unsigned
int
siu_tx_empty
(
struct
uart_port
*
port
)
static
unsigned
int
siu_tx_empty
(
struct
uart_port
*
port
)
...
@@ -482,9 +482,6 @@ static irqreturn_t siu_interrupt(int irq, void *dev_id, struct pt_regs *regs)
...
@@ -482,9 +482,6 @@ static irqreturn_t siu_interrupt(int irq, void *dev_id, struct pt_regs *regs)
struct
uart_port
*
port
;
struct
uart_port
*
port
;
uint8_t
iir
,
lsr
;
uint8_t
iir
,
lsr
;
if
(
dev_id
==
NULL
)
return
IRQ_NONE
;
port
=
(
struct
uart_port
*
)
dev_id
;
port
=
(
struct
uart_port
*
)
dev_id
;
iir
=
siu_read
(
port
,
UART_IIR
);
iir
=
siu_read
(
port
,
UART_IIR
);
...
@@ -507,6 +504,9 @@ static int siu_startup(struct uart_port *port)
...
@@ -507,6 +504,9 @@ static int siu_startup(struct uart_port *port)
{
{
int
retval
;
int
retval
;
if
(
port
->
membase
==
NULL
)
return
-
ENODEV
;
siu_clear_fifo
(
port
);
siu_clear_fifo
(
port
);
(
void
)
siu_read
(
port
,
UART_LSR
);
(
void
)
siu_read
(
port
,
UART_LSR
);
...
@@ -545,9 +545,6 @@ static void siu_shutdown(struct uart_port *port)
...
@@ -545,9 +545,6 @@ static void siu_shutdown(struct uart_port *port)
unsigned
long
flags
;
unsigned
long
flags
;
uint8_t
lcr
;
uint8_t
lcr
;
if
(
port
->
membase
==
NULL
)
return
;
siu_write
(
port
,
UART_IER
,
0
);
siu_write
(
port
,
UART_IER
,
0
);
spin_lock_irqsave
(
&
port
->
lock
,
flags
);
spin_lock_irqsave
(
&
port
->
lock
,
flags
);
...
@@ -802,53 +799,6 @@ static int siu_init_ports(void)
...
@@ -802,53 +799,6 @@ static int siu_init_ports(void)
#ifdef CONFIG_SERIAL_VR41XX_CONSOLE
#ifdef CONFIG_SERIAL_VR41XX_CONSOLE
static
void
early_set_termios
(
struct
uart_port
*
port
,
struct
termios
*
new
,
struct
termios
*
old
)
{
tcflag_t
c_cflag
;
uint8_t
lcr
;
unsigned
int
baud
,
quot
;
c_cflag
=
new
->
c_cflag
;
switch
(
c_cflag
&
CSIZE
)
{
case
CS5
:
lcr
=
UART_LCR_WLEN5
;
break
;
case
CS6
:
lcr
=
UART_LCR_WLEN6
;
break
;
case
CS7
:
lcr
=
UART_LCR_WLEN7
;
break
;
default:
lcr
=
UART_LCR_WLEN8
;
break
;
}
if
(
c_cflag
&
CSTOPB
)
lcr
|=
UART_LCR_STOP
;
if
(
c_cflag
&
PARENB
)
lcr
|=
UART_LCR_PARITY
;
if
((
c_cflag
&
PARODD
)
!=
PARODD
)
lcr
|=
UART_LCR_EPAR
;
if
(
c_cflag
&
CMSPAR
)
lcr
|=
UART_LCR_SPAR
;
baud
=
uart_get_baud_rate
(
port
,
new
,
old
,
0
,
port
->
uartclk
/
16
);
quot
=
uart_get_divisor
(
port
,
baud
);
siu_write
(
port
,
UART_LCR
,
lcr
|
UART_LCR_DLAB
);
siu_write
(
port
,
UART_DLL
,
(
uint8_t
)
quot
);
siu_write
(
port
,
UART_DLM
,
(
uint8_t
)(
quot
>>
8
));
siu_write
(
port
,
UART_LCR
,
lcr
);
}
static
struct
uart_ops
early_uart_ops
=
{
.
set_termios
=
early_set_termios
,
};
#define BOTH_EMPTY (UART_LSR_TEMT | UART_LSR_THRE)
#define BOTH_EMPTY (UART_LSR_TEMT | UART_LSR_THRE)
static
void
wait_for_xmitr
(
struct
uart_port
*
port
)
static
void
wait_for_xmitr
(
struct
uart_port
*
port
)
...
@@ -915,7 +865,7 @@ static int siu_console_setup(struct console *con, char *options)
...
@@ -915,7 +865,7 @@ static int siu_console_setup(struct console *con, char *options)
if
(
port
->
membase
==
NULL
)
{
if
(
port
->
membase
==
NULL
)
{
if
(
port
->
mapbase
==
0
)
if
(
port
->
mapbase
==
0
)
return
-
ENODEV
;
return
-
ENODEV
;
port
->
membase
=
(
unsigned
char
__iomem
*
)
KSEG1ADDR
(
port
->
mapbase
);
port
->
membase
=
ioremap
(
port
->
mapbase
,
siu_port_size
(
port
)
);
}
}
vr41xx_select_siu_interface
(
SIU_INTERFACE_RS232C
);
vr41xx_select_siu_interface
(
SIU_INTERFACE_RS232C
);
...
@@ -949,7 +899,7 @@ static int __devinit siu_console_init(void)
...
@@ -949,7 +899,7 @@ static int __devinit siu_console_init(void)
for
(
i
=
0
;
i
<
num
;
i
++
)
{
for
(
i
=
0
;
i
<
num
;
i
++
)
{
port
=
&
siu_uart_ports
[
i
];
port
=
&
siu_uart_ports
[
i
];
port
->
ops
=
&
early
_uart_ops
;
port
->
ops
=
&
siu
_uart_ops
;
}
}
register_console
(
&
siu_console
);
register_console
(
&
siu_console
);
...
@@ -994,8 +944,10 @@ static int siu_probe(struct device *dev)
...
@@ -994,8 +944,10 @@ static int siu_probe(struct device *dev)
port
->
dev
=
dev
;
port
->
dev
=
dev
;
retval
=
uart_add_one_port
(
&
siu_uart_driver
,
port
);
retval
=
uart_add_one_port
(
&
siu_uart_driver
,
port
);
if
(
retval
)
if
(
retval
<
0
)
{
port
->
dev
=
NULL
;
break
;
break
;
}
}
}
if
(
i
==
0
&&
retval
<
0
)
{
if
(
i
==
0
&&
retval
<
0
)
{
...
...
drivers/usb/core/sysfs.c
浏览文件 @
2830077f
...
@@ -290,32 +290,30 @@ static ssize_t show_modalias(struct device *dev, char *buf)
...
@@ -290,32 +290,30 @@ static ssize_t show_modalias(struct device *dev, char *buf)
{
{
struct
usb_interface
*
intf
;
struct
usb_interface
*
intf
;
struct
usb_device
*
udev
;
struct
usb_device
*
udev
;
int
len
;
intf
=
to_usb_interface
(
dev
);
intf
=
to_usb_interface
(
dev
);
udev
=
interface_to_usbdev
(
intf
);
udev
=
interface_to_usbdev
(
intf
);
if
(
udev
->
descriptor
.
bDeviceClass
==
0
)
{
struct
usb_host_interface
*
alt
=
intf
->
cur_altsetting
;
return
sprintf
(
buf
,
"usb:v%04Xp%04Xd%04Xdc%02Xdsc%02Xdp%02Xic%02Xisc%02Xip%02X
\n
"
,
len
=
sprintf
(
buf
,
"usb:v%04Xp%04Xd%04Xdc%02Xdsc%02Xdp%02Xic
"
,
le16_to_cpu
(
udev
->
descriptor
.
idVendor
),
le16_to_cpu
(
udev
->
descriptor
.
idVendor
),
le16_to_cpu
(
udev
->
descriptor
.
idProduct
),
le16_to_cpu
(
udev
->
descriptor
.
idProduct
),
le16_to_cpu
(
udev
->
descriptor
.
bcdDevice
),
le16_to_cpu
(
udev
->
descriptor
.
bcdDevice
),
udev
->
descriptor
.
bDeviceClass
,
udev
->
descriptor
.
bDeviceClass
,
udev
->
descriptor
.
bDeviceSubClass
,
udev
->
descriptor
.
bDeviceSubClass
,
udev
->
descriptor
.
bDeviceProtocol
,
udev
->
descriptor
.
bDeviceProtocol
);
buf
+=
len
;
if
(
udev
->
descriptor
.
bDeviceClass
==
0
)
{
struct
usb_host_interface
*
alt
=
intf
->
cur_altsetting
;
return
len
+
sprintf
(
buf
,
"%02Xisc%02Xip%02X
\n
"
,
alt
->
desc
.
bInterfaceClass
,
alt
->
desc
.
bInterfaceClass
,
alt
->
desc
.
bInterfaceSubClass
,
alt
->
desc
.
bInterfaceSubClass
,
alt
->
desc
.
bInterfaceProtocol
);
alt
->
desc
.
bInterfaceProtocol
);
}
else
{
}
else
{
return
sprintf
(
buf
,
"usb:v%04Xp%04Xd%04Xdc%02Xdsc%02Xdp%02Xic*isc*ip*
\n
"
,
return
len
+
sprintf
(
buf
,
"*isc*ip*
\n
"
);
le16_to_cpu
(
udev
->
descriptor
.
idVendor
),
le16_to_cpu
(
udev
->
descriptor
.
idProduct
),
le16_to_cpu
(
udev
->
descriptor
.
bcdDevice
),
udev
->
descriptor
.
bDeviceClass
,
udev
->
descriptor
.
bDeviceSubClass
,
udev
->
descriptor
.
bDeviceProtocol
);
}
}
}
}
static
DEVICE_ATTR
(
modalias
,
S_IRUGO
,
show_modalias
,
NULL
);
static
DEVICE_ATTR
(
modalias
,
S_IRUGO
,
show_modalias
,
NULL
);
...
...
drivers/usb/input/hid-core.c
浏览文件 @
2830077f
...
@@ -1315,6 +1315,8 @@ void hid_init_reports(struct hid_device *hid)
...
@@ -1315,6 +1315,8 @@ void hid_init_reports(struct hid_device *hid)
#define USB_DEVICE_ID_WACOM_INTUOS2 0x0040
#define USB_DEVICE_ID_WACOM_INTUOS2 0x0040
#define USB_DEVICE_ID_WACOM_VOLITO 0x0060
#define USB_DEVICE_ID_WACOM_VOLITO 0x0060
#define USB_DEVICE_ID_WACOM_PTU 0x0003
#define USB_DEVICE_ID_WACOM_PTU 0x0003
#define USB_DEVICE_ID_WACOM_INTUOS3 0x00B0
#define USB_DEVICE_ID_WACOM_CINTIQ 0x003F
#define USB_VENDOR_ID_KBGEAR 0x084e
#define USB_VENDOR_ID_KBGEAR 0x084e
#define USB_DEVICE_ID_KBGEAR_JAMSTUDIO 0x1001
#define USB_DEVICE_ID_KBGEAR_JAMSTUDIO 0x1001
...
@@ -1401,6 +1403,7 @@ void hid_init_reports(struct hid_device *hid)
...
@@ -1401,6 +1403,7 @@ void hid_init_reports(struct hid_device *hid)
#define USB_VENDOR_ID_DELORME 0x1163
#define USB_VENDOR_ID_DELORME 0x1163
#define USB_DEVICE_ID_DELORME_EARTHMATE 0x0100
#define USB_DEVICE_ID_DELORME_EARTHMATE 0x0100
#define USB_DEVICE_ID_DELORME_EM_LT20 0x0200
#define USB_VENDOR_ID_MCC 0x09db
#define USB_VENDOR_ID_MCC 0x09db
#define USB_DEVICE_ID_MCC_PMD1024LS 0x0076
#define USB_DEVICE_ID_MCC_PMD1024LS 0x0076
...
@@ -1412,6 +1415,12 @@ void hid_init_reports(struct hid_device *hid)
...
@@ -1412,6 +1415,12 @@ void hid_init_reports(struct hid_device *hid)
#define USB_VENDOR_ID_BTC 0x046e
#define USB_VENDOR_ID_BTC 0x046e
#define USB_DEVICE_ID_BTC_KEYBOARD 0x5303
#define USB_DEVICE_ID_BTC_KEYBOARD 0x5303
#define USB_VENDOR_ID_VERNIER 0x08f7
#define USB_DEVICE_ID_VERNIER_LABPRO 0x0001
#define USB_DEVICE_ID_VERNIER_GOTEMP 0x0002
#define USB_DEVICE_ID_VERNIER_SKIP 0x0003
#define USB_DEVICE_ID_VERNIER_CYCLOPS 0x0004
/*
/*
* Alphabetically sorted blacklist by quirk type.
* Alphabetically sorted blacklist by quirk type.
...
@@ -1437,6 +1446,7 @@ static struct hid_blacklist {
...
@@ -1437,6 +1446,7 @@ static struct hid_blacklist {
{
USB_VENDOR_ID_CODEMERCS
,
USB_DEVICE_ID_CODEMERCS_IOW28
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_CODEMERCS
,
USB_DEVICE_ID_CODEMERCS_IOW28
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_CYPRESS
,
USB_DEVICE_ID_CYPRESS_HIDCOM
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_CYPRESS
,
USB_DEVICE_ID_CYPRESS_HIDCOM
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_DELORME
,
USB_DEVICE_ID_DELORME_EARTHMATE
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_DELORME
,
USB_DEVICE_ID_DELORME_EARTHMATE
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_DELORME
,
USB_DEVICE_ID_DELORME_EM_LT20
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_ESSENTIAL_REALITY
,
USB_DEVICE_ID_ESSENTIAL_REALITY_P5
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_ESSENTIAL_REALITY
,
USB_DEVICE_ID_ESSENTIAL_REALITY_P5
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_GLAB
,
USB_DEVICE_ID_4_PHIDGETSERVO_30
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_GLAB
,
USB_DEVICE_ID_4_PHIDGETSERVO_30
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_GLAB
,
USB_DEVICE_ID_1_PHIDGETSERVO_30
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_GLAB
,
USB_DEVICE_ID_1_PHIDGETSERVO_30
,
HID_QUIRK_IGNORE
},
...
@@ -1456,6 +1466,10 @@ static struct hid_blacklist {
...
@@ -1456,6 +1466,10 @@ static struct hid_blacklist {
{
USB_VENDOR_ID_ONTRAK
,
USB_DEVICE_ID_ONTRAK_ADU100
+
300
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_ONTRAK
,
USB_DEVICE_ID_ONTRAK_ADU100
+
300
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_ONTRAK
,
USB_DEVICE_ID_ONTRAK_ADU100
+
400
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_ONTRAK
,
USB_DEVICE_ID_ONTRAK_ADU100
+
400
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_ONTRAK
,
USB_DEVICE_ID_ONTRAK_ADU100
+
500
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_ONTRAK
,
USB_DEVICE_ID_ONTRAK_ADU100
+
500
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_VERNIER
,
USB_DEVICE_ID_VERNIER_LABPRO
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_VERNIER
,
USB_DEVICE_ID_VERNIER_GOTEMP
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_VERNIER
,
USB_DEVICE_ID_VERNIER_SKIP
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_VERNIER
,
USB_DEVICE_ID_VERNIER_CYCLOPS
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_WACOM
,
USB_DEVICE_ID_WACOM_PENPARTNER
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_WACOM
,
USB_DEVICE_ID_WACOM_PENPARTNER
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_WACOM
,
USB_DEVICE_ID_WACOM_GRAPHIRE
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_WACOM
,
USB_DEVICE_ID_WACOM_GRAPHIRE
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_WACOM
,
USB_DEVICE_ID_WACOM_GRAPHIRE
+
1
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_WACOM
,
USB_DEVICE_ID_WACOM_GRAPHIRE
+
1
,
HID_QUIRK_IGNORE
},
...
@@ -1481,6 +1495,10 @@ static struct hid_blacklist {
...
@@ -1481,6 +1495,10 @@ static struct hid_blacklist {
{
USB_VENDOR_ID_WACOM
,
USB_DEVICE_ID_WACOM_INTUOS2
+
7
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_WACOM
,
USB_DEVICE_ID_WACOM_INTUOS2
+
7
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_WACOM
,
USB_DEVICE_ID_WACOM_VOLITO
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_WACOM
,
USB_DEVICE_ID_WACOM_VOLITO
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_WACOM
,
USB_DEVICE_ID_WACOM_PTU
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_WACOM
,
USB_DEVICE_ID_WACOM_PTU
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_WACOM
,
USB_DEVICE_ID_WACOM_INTUOS3
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_WACOM
,
USB_DEVICE_ID_WACOM_INTUOS3
+
1
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_WACOM
,
USB_DEVICE_ID_WACOM_INTUOS3
+
2
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_WACOM
,
USB_DEVICE_ID_WACOM_CINTIQ
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_WISEGROUP
,
USB_DEVICE_ID_4_PHIDGETSERVO_20
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_WISEGROUP
,
USB_DEVICE_ID_4_PHIDGETSERVO_20
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_WISEGROUP
,
USB_DEVICE_ID_1_PHIDGETSERVO_20
,
HID_QUIRK_IGNORE
},
{
USB_VENDOR_ID_WISEGROUP
,
USB_DEVICE_ID_1_PHIDGETSERVO_20
,
HID_QUIRK_IGNORE
},
...
...
drivers/usb/media/pwc/ChangeLog
已删除
100644 → 0
浏览文件 @
36358c21
9.0.2
* Adding #ifdef to compile PWC before and after 2.6.5
9.0.1
9.0
8.12
* Implement motorized pan/tilt feature for Logitech QuickCam Orbit/Spere.
8.11.1
* Fix for PCVC720/40, would not be able to set videomode
* Fix for Samsung MPC models, appearantly they are based on a newer chipset
8.11
* 20 dev_hints (per request)
* Hot unplugging should be better, no more dangling pointers or memory leaks
* Added reserved Logitech webcam IDs
* Device now remembers size & fps between close()/open()
* Removed palette stuff altogether
8.10.1
* Added IDs for PCVC720K/40 and Creative Labs Webcam Pro
8.10
* Fixed ID for QuickCam Notebook pro
* Added GREALSIZE ioctl() call
* Fixed bug in case PWCX was not loaded and invalid size was set
8.9
* Merging with kernel 2.5.49
* Adding IDs for QuickCam Zoom & QuickCam Notebook
8.8
* Fixing 'leds' parameter
* Adding IDs for Logitech QuickCam Pro 4000
* Making URB init/cleanup a little nicer
8.7
* Incorporating changes in ioctl() parameter passing
* Also changes to URB mechanism
8.6
* Added ID's for Visionite VCS UM100 and UC300
* Removed YUV420-interlaced palette altogether (was confusing)
* Removed MIRROR stuff as it didn't work anyway
* Fixed a problem with the 'leds' parameter (wouldn't blink)
* Added ioctl()s for advanced features: 'extended' whitebalance ioctl()s,
CONTOUR, BACKLIGHT, FLICKER, DYNNOISE.
* VIDIOCGCAP.name now contains real camera model name instead of
'Philips xxx webcam'
* Added PROBE ioctl (see previous point & API doc)
8.5
* Adding IDs for Creative Labs Webcam 5
* Adding IDs for SOTEC CMS-001 webcam
* Solving possible hang in VIDIOCSYNC when unplugging the cam
* Forgot to return structure in VIDIOCPWCGAWB, oops
* Time interval for the LEDs are now in milliseconds
8.4
* Fixing power_save option for Vesta range
* Handling new error codes in ISOC callback
* Adding dev_hint module parameter, to specify /dev/videoX device nodes
8.3
* Adding Samsung C10 and C30 cameras
* Removing palette module parameter
* Fixed typo in ID of QuickCam 3000 Pro
* Adding LED settings (blinking while in use) for ToUCam cameras.
* Turns LED off when camera is not in use.
8.2
* Making module more silent when trace = 0
* Adding QuickCam 3000 Pro IDs
* Chrominance control for the Vesta cameras
* Hopefully fixed problems on machines with BIGMEM and > 1GB of RAM
* Included Oliver Neukem's lock_kernel() patch
* Allocates less memory for image buffers
* Adds ioctl()s for the whitebalancing
8.1
* Adding support for 750
* Adding V4L GAUDIO/SAUDIO/UNIT ioctl() calls
8.0
* 'damage control' after inclusion in 2.4.5.
* Changed wait-queue mechanism in read/mmap/poll according to the book.
* Included YUV420P palette.
* Changed interface to decompressor module.
* Cleaned up pwc structure a bit.
7.0
* Fixed bug in vcvt_420i_yuyv; extra variables on stack were misaligned.
* There is now a clear error message when an image size is selected that
is only supported using the decompressor, and the decompressor isn't
loaded.
* When the decompressor wasn't loaded, selecting large image size
would create skewed or double images.
6.3
* Introduced spinlocks for the buffer pointer manipulation; a number of
reports seem to suggest the down()/up() semaphores were the cause of
lockups, since they are not suitable for interrupt/user locking.
* Separated decompressor and core code into 2 modules.
6.2
* Non-integral image sizes are now padded with gray or black.
* Added SHUTTERSPEED ioctl().
* Fixed buglet in VIDIOCPWCSAGC; the function would always return an error,
even though the call succeeded.
* Added hotplug support for 2.4.*.
* Memory: the 645/646 uses less memory now.
6.1
* VIDIOCSPICT returns -EINVAL with invalid palettes.
* Added saturation control.
* Split decompressors from rest.
* Fixed bug that would reset the framerate to the default framerate if
the rate field was set to 0 (which is not what I intended, nl. do not
change the framerate!).
* VIDIOCPWCSCQUAL (setting compression quality) now takes effect immediately.
* Workaround for a bug in the 730 sensor.
drivers/usb/net/usbnet.c
浏览文件 @
2830077f
...
@@ -2765,7 +2765,7 @@ static int blan_mdlm_bind (struct usbnet *dev, struct usb_interface *intf)
...
@@ -2765,7 +2765,7 @@ static int blan_mdlm_bind (struct usbnet *dev, struct usb_interface *intf)
}
}
/* expect bcdVersion 1.0, ignore */
/* expect bcdVersion 1.0, ignore */
if
(
memcmp
(
&
desc
->
bGUID
,
blan_guid
,
16
)
if
(
memcmp
(
&
desc
->
bGUID
,
blan_guid
,
16
)
&&
memcmp
(
&
desc
->
bGUID
,
blan
_guid
,
16
)
)
{
&&
memcmp
(
&
desc
->
bGUID
,
safe
_guid
,
16
)
)
{
/* hey, this one might _really_ be MDLM! */
/* hey, this one might _really_ be MDLM! */
dev_dbg
(
&
intf
->
dev
,
"MDLM guid
\n
"
);
dev_dbg
(
&
intf
->
dev
,
"MDLM guid
\n
"
);
goto
bad_desc
;
goto
bad_desc
;
...
...
drivers/usb/serial/Kconfig
浏览文件 @
2830077f
...
@@ -455,6 +455,17 @@ config USB_SERIAL_XIRCOM
...
@@ -455,6 +455,17 @@ config USB_SERIAL_XIRCOM
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 keyspan_pda.
module will be called keyspan_pda.
config USB_SERIAL_OPTION
tristate "USB Option PCMCIA serial driver"
depends on USB_SERIAL && USB_OHCI_HCD && PCCARD
help
Say Y here if you want to use an Option card. This is a
GSM card, controlled by three serial ports which are connected
via an OHCI adapter located on a PC card.
To compile this driver as a module, choose M here: the
module will be called option.
config USB_SERIAL_OMNINET
config USB_SERIAL_OMNINET
tristate "USB ZyXEL omni.net LCD Plus Driver (EXPERIMENTAL)"
tristate "USB ZyXEL omni.net LCD Plus Driver (EXPERIMENTAL)"
depends on USB_SERIAL && EXPERIMENTAL
depends on USB_SERIAL && EXPERIMENTAL
...
...
drivers/usb/serial/Makefile
浏览文件 @
2830077f
...
@@ -32,6 +32,7 @@ obj-$(CONFIG_USB_SERIAL_KLSI) += kl5kusb105.o
...
@@ -32,6 +32,7 @@ obj-$(CONFIG_USB_SERIAL_KLSI) += kl5kusb105.o
obj-$(CONFIG_USB_SERIAL_KOBIL_SCT)
+=
kobil_sct.o
obj-$(CONFIG_USB_SERIAL_KOBIL_SCT)
+=
kobil_sct.o
obj-$(CONFIG_USB_SERIAL_MCT_U232)
+=
mct_u232.o
obj-$(CONFIG_USB_SERIAL_MCT_U232)
+=
mct_u232.o
obj-$(CONFIG_USB_SERIAL_OMNINET)
+=
omninet.o
obj-$(CONFIG_USB_SERIAL_OMNINET)
+=
omninet.o
obj-$(CONFIG_USB_SERIAL_OPTION)
+=
option.o
obj-$(CONFIG_USB_SERIAL_PL2303)
+=
pl2303.o
obj-$(CONFIG_USB_SERIAL_PL2303)
+=
pl2303.o
obj-$(CONFIG_USB_SERIAL_SAFE)
+=
safe_serial.o
obj-$(CONFIG_USB_SERIAL_SAFE)
+=
safe_serial.o
obj-$(CONFIG_USB_SERIAL_TI)
+=
ti_usb_3410_5052.o
obj-$(CONFIG_USB_SERIAL_TI)
+=
ti_usb_3410_5052.o
...
...
drivers/usb/serial/cp2101.c
浏览文件 @
2830077f
此差异已折叠。
点击以展开。
drivers/usb/serial/option.c
0 → 100644
浏览文件 @
2830077f
此差异已折叠。
点击以展开。
drivers/usb/storage/unusual_devs.h
浏览文件 @
2830077f
...
@@ -862,6 +862,15 @@ UNUSUAL_DEV( 0x090a, 0x1001, 0x0100, 0x0100,
...
@@ -862,6 +862,15 @@ UNUSUAL_DEV( 0x090a, 0x1001, 0x0100, 0x0100,
US_SC_DEVICE
,
US_PR_BULK
,
NULL
,
US_SC_DEVICE
,
US_PR_BULK
,
NULL
,
US_FL_NEED_OVERRIDE
),
US_FL_NEED_OVERRIDE
),
/* Reported by Filippo Bardelli <filibard@libero.it>
* The device reports a subclass of RBC, which is wrong.
*/
UNUSUAL_DEV
(
0x090a
,
0x1050
,
0x0100
,
0x0100
,
"Trumpion Microelectronics, Inc."
,
"33520 USB Digital Voice Recorder"
,
US_SC_UFI
,
US_PR_DEVICE
,
NULL
,
0
),
/* Trumpion Microelectronics MP3 player (felipe_alfaro@linuxmail.org) */
/* Trumpion Microelectronics MP3 player (felipe_alfaro@linuxmail.org) */
UNUSUAL_DEV
(
0x090a
,
0x1200
,
0x0000
,
0x9999
,
UNUSUAL_DEV
(
0x090a
,
0x1200
,
0x0000
,
0x9999
,
"Trumpion"
,
"Trumpion"
,
...
...
fs/jbd/checkpoint.c
浏览文件 @
2830077f
...
@@ -188,7 +188,6 @@ static int __cleanup_transaction(journal_t *journal, transaction_t *transaction)
...
@@ -188,7 +188,6 @@ static int __cleanup_transaction(journal_t *journal, transaction_t *transaction)
}
else
{
}
else
{
jbd_unlock_bh_state
(
bh
);
jbd_unlock_bh_state
(
bh
);
}
}
jh
=
next_jh
;
}
while
(
jh
!=
last_jh
);
}
while
(
jh
!=
last_jh
);
return
ret
;
return
ret
;
...
@@ -339,8 +338,10 @@ int log_do_checkpoint(journal_t *journal)
...
@@ -339,8 +338,10 @@ int log_do_checkpoint(journal_t *journal)
}
}
}
while
(
jh
!=
last_jh
&&
!
retry
);
}
while
(
jh
!=
last_jh
&&
!
retry
);
if
(
batch_count
)
if
(
batch_count
)
{
__flush_batch
(
journal
,
bhs
,
&
batch_count
);
__flush_batch
(
journal
,
bhs
,
&
batch_count
);
retry
=
1
;
}
/*
/*
* If someone cleaned up this transaction while we slept, we're
* If someone cleaned up this transaction while we slept, we're
...
...
fs/mpage.c
浏览文件 @
2830077f
...
@@ -79,8 +79,11 @@ static int mpage_end_io_write(struct bio *bio, unsigned int bytes_done, int err)
...
@@ -79,8 +79,11 @@ static int mpage_end_io_write(struct bio *bio, unsigned int bytes_done, int err)
if
(
--
bvec
>=
bio
->
bi_io_vec
)
if
(
--
bvec
>=
bio
->
bi_io_vec
)
prefetchw
(
&
bvec
->
bv_page
->
flags
);
prefetchw
(
&
bvec
->
bv_page
->
flags
);
if
(
!
uptodate
)
if
(
!
uptodate
)
{
SetPageError
(
page
);
SetPageError
(
page
);
if
(
page
->
mapping
)
set_bit
(
AS_EIO
,
&
page
->
mapping
->
flags
);
}
end_page_writeback
(
page
);
end_page_writeback
(
page
);
}
while
(
bvec
>=
bio
->
bi_io_vec
);
}
while
(
bvec
>=
bio
->
bi_io_vec
);
bio_put
(
bio
);
bio_put
(
bio
);
...
...
include/asm-ppc64/processor.h
浏览文件 @
2830077f
...
@@ -120,103 +120,18 @@
...
@@ -120,103 +120,18 @@
/* Special Purpose Registers (SPRNs)*/
/* Special Purpose Registers (SPRNs)*/
#define SPRN_CDBCR 0x3D7
/* Cache Debug Control Register */
#define SPRN_CTR 0x009
/* Count Register */
#define SPRN_CTR 0x009
/* Count Register */
#define SPRN_DABR 0x3F5
/* Data Address Breakpoint Register */
#define SPRN_DABR 0x3F5
/* Data Address Breakpoint Register */
#define SPRN_DAC1 0x3F6
/* Data Address Compare 1 */
#define DABR_TRANSLATION (1UL << 2)
#define SPRN_DAC2 0x3F7
/* Data Address Compare 2 */
#define SPRN_DAR 0x013
/* Data Address Register */
#define SPRN_DAR 0x013
/* Data Address Register */
#define SPRN_DBCR 0x3F2
/* Debug Control Regsiter */
#define DBCR_EDM 0x80000000
#define DBCR_IDM 0x40000000
#define DBCR_RST(x) (((x) & 0x3) << 28)
#define DBCR_RST_NONE 0
#define DBCR_RST_CORE 1
#define DBCR_RST_CHIP 2
#define DBCR_RST_SYSTEM 3
#define DBCR_IC 0x08000000
/* Instruction Completion Debug Evnt */
#define DBCR_BT 0x04000000
/* Branch Taken Debug Event */
#define DBCR_EDE 0x02000000
/* Exception Debug Event */
#define DBCR_TDE 0x01000000
/* TRAP Debug Event */
#define DBCR_FER 0x00F80000
/* First Events Remaining Mask */
#define DBCR_FT 0x00040000
/* Freeze Timers on Debug Event */
#define DBCR_IA1 0x00020000
/* Instr. Addr. Compare 1 Enable */
#define DBCR_IA2 0x00010000
/* Instr. Addr. Compare 2 Enable */
#define DBCR_D1R 0x00008000
/* Data Addr. Compare 1 Read Enable */
#define DBCR_D1W 0x00004000
/* Data Addr. Compare 1 Write Enable */
#define DBCR_D1S(x) (((x) & 0x3) << 12)
/* Data Adrr. Compare 1 Size */
#define DAC_BYTE 0
#define DAC_HALF 1
#define DAC_WORD 2
#define DAC_QUAD 3
#define DBCR_D2R 0x00000800
/* Data Addr. Compare 2 Read Enable */
#define DBCR_D2W 0x00000400
/* Data Addr. Compare 2 Write Enable */
#define DBCR_D2S(x) (((x) & 0x3) << 8)
/* Data Addr. Compare 2 Size */
#define DBCR_SBT 0x00000040
/* Second Branch Taken Debug Event */
#define DBCR_SED 0x00000020
/* Second Exception Debug Event */
#define DBCR_STD 0x00000010
/* Second Trap Debug Event */
#define DBCR_SIA 0x00000008
/* Second IAC Enable */
#define DBCR_SDA 0x00000004
/* Second DAC Enable */
#define DBCR_JOI 0x00000002
/* JTAG Serial Outbound Int. Enable */
#define DBCR_JII 0x00000001
/* JTAG Serial Inbound Int. Enable */
#define SPRN_DBCR0 0x3F2
/* Debug Control Register 0 */
#define SPRN_DBCR1 0x3BD
/* Debug Control Register 1 */
#define SPRN_DBSR 0x3F0
/* Debug Status Register */
#define SPRN_DCCR 0x3FA
/* Data Cache Cacheability Register */
#define DCCR_NOCACHE 0
/* Noncacheable */
#define DCCR_CACHE 1
/* Cacheable */
#define SPRN_DCMP 0x3D1
/* Data TLB Compare Register */
#define SPRN_DCWR 0x3BA
/* Data Cache Write-thru Register */
#define DCWR_COPY 0
/* Copy-back */
#define DCWR_WRITE 1
/* Write-through */
#define SPRN_DEAR 0x3D5
/* Data Error Address Register */
#define SPRN_DEC 0x016
/* Decrement Register */
#define SPRN_DEC 0x016
/* Decrement Register */
#define SPRN_DMISS 0x3D0
/* Data TLB Miss Register */
#define SPRN_DSISR 0x012
/* Data Storage Interrupt Status Register */
#define SPRN_DSISR 0x012
/* Data Storage Interrupt Status Register */
#define DSISR_NOHPTE 0x40000000
/* no translation found */
#define DSISR_NOHPTE 0x40000000
/* no translation found */
#define DSISR_PROTFAULT 0x08000000
/* protection fault */
#define DSISR_PROTFAULT 0x08000000
/* protection fault */
#define DSISR_ISSTORE 0x02000000
/* access was a store */
#define DSISR_ISSTORE 0x02000000
/* access was a store */
#define DSISR_DABRMATCH 0x00400000
/* hit data breakpoint */
#define DSISR_DABRMATCH 0x00400000
/* hit data breakpoint */
#define DSISR_NOSEGMENT 0x00200000
/* STAB/SLB miss */
#define DSISR_NOSEGMENT 0x00200000
/* STAB/SLB miss */
#define SPRN_EAR 0x11A
/* External Address Register */
#define SPRN_ESR 0x3D4
/* Exception Syndrome Register */
#define ESR_IMCP 0x80000000
/* Instr. Machine Check - Protection */
#define ESR_IMCN 0x40000000
/* Instr. Machine Check - Non-config */
#define ESR_IMCB 0x20000000
/* Instr. Machine Check - Bus error */
#define ESR_IMCT 0x10000000
/* Instr. Machine Check - Timeout */
#define ESR_PIL 0x08000000
/* Program Exception - Illegal */
#define ESR_PPR 0x04000000
/* Program Exception - Priveleged */
#define ESR_PTR 0x02000000
/* Program Exception - Trap */
#define ESR_DST 0x00800000
/* Storage Exception - Data miss */
#define ESR_DIZ 0x00400000
/* Storage Exception - Zone fault */
#define SPRN_EVPR 0x3D6
/* Exception Vector Prefix Register */
#define SPRN_HASH1 0x3D2
/* Primary Hash Address Register */
#define SPRN_HASH2 0x3D3
/* Secondary Hash Address Resgister */
#define SPRN_HID0 0x3F0
/* Hardware Implementation Register 0 */
#define SPRN_HID0 0x3F0
/* Hardware Implementation Register 0 */
#define HID0_EMCP (1<<31)
/* Enable Machine Check pin */
#define HID0_EBA (1<<29)
/* Enable Bus Address Parity */
#define HID0_EBD (1<<28)
/* Enable Bus Data Parity */
#define HID0_SBCLK (1<<27)
#define HID0_EICE (1<<26)
#define HID0_ECLK (1<<25)
#define HID0_PAR (1<<24)
#define HID0_DOZE (1<<23)
#define HID0_NAP (1<<22)
#define HID0_SLEEP (1<<21)
#define HID0_DPM (1<<20)
#define HID0_ICE (1<<15)
/* Instruction Cache Enable */
#define HID0_DCE (1<<14)
/* Data Cache Enable */
#define HID0_ILOCK (1<<13)
/* Instruction Cache Lock */
#define HID0_DLOCK (1<<12)
/* Data Cache Lock */
#define HID0_ICFI (1<<11)
/* Instr. Cache Flash Invalidate */
#define HID0_DCI (1<<10)
/* Data Cache Invalidate */
#define HID0_SPD (1<<9)
/* Speculative disable */
#define HID0_SGE (1<<7)
/* Store Gathering Enable */
#define HID0_SIED (1<<7)
/* Serial Instr. Execution [Disable] */
#define HID0_BTIC (1<<5)
/* Branch Target Instruction Cache Enable */
#define HID0_ABE (1<<3)
/* Address Broadcast Enable */
#define HID0_BHTE (1<<2)
/* Branch History Table Enable */
#define HID0_BTCD (1<<1)
/* Branch target cache disable */
#define SPRN_MSRDORM 0x3F1
/* Hardware Implementation Register 1 */
#define SPRN_MSRDORM 0x3F1
/* Hardware Implementation Register 1 */
#define SPRN_HID1 0x3F1
/* Hardware Implementation Register 1 */
#define SPRN_HID1 0x3F1
/* Hardware Implementation Register 1 */
#define SPRN_IABR 0x3F2
/* Instruction Address Breakpoint Register */
#define SPRN_IABR 0x3F2
/* Instruction Address Breakpoint Register */
...
@@ -225,23 +140,8 @@
...
@@ -225,23 +140,8 @@
#define SPRN_HID5 0x3F6
/* 970 HID5 */
#define SPRN_HID5 0x3F6
/* 970 HID5 */
#define SPRN_TSC 0x3FD
/* Thread switch control */
#define SPRN_TSC 0x3FD
/* Thread switch control */
#define SPRN_TST 0x3FC
/* Thread switch timeout */
#define SPRN_TST 0x3FC
/* Thread switch timeout */
#define SPRN_IAC1 0x3F4
/* Instruction Address Compare 1 */
#define SPRN_IAC2 0x3F5
/* Instruction Address Compare 2 */
#define SPRN_ICCR 0x3FB
/* Instruction Cache Cacheability Register */
#define ICCR_NOCACHE 0
/* Noncacheable */
#define ICCR_CACHE 1
/* Cacheable */
#define SPRN_ICDBDR 0x3D3
/* Instruction Cache Debug Data Register */
#define SPRN_ICMP 0x3D5
/* Instruction TLB Compare Register */
#define SPRN_ICTC 0x3FB
/* Instruction Cache Throttling Control Reg */
#define SPRN_IMISS 0x3D4
/* Instruction TLB Miss Register */
#define SPRN_IMMR 0x27E
/* Internal Memory Map Register */
#define SPRN_L2CR 0x3F9
/* Level 2 Cache Control Regsiter */
#define SPRN_L2CR 0x3F9
/* Level 2 Cache Control Regsiter */
#define SPRN_LR 0x008
/* Link Register */
#define SPRN_LR 0x008
/* Link Register */
#define SPRN_PBL1 0x3FC
/* Protection Bound Lower 1 */
#define SPRN_PBL2 0x3FE
/* Protection Bound Lower 2 */
#define SPRN_PBU1 0x3FD
/* Protection Bound Upper 1 */
#define SPRN_PBU2 0x3FF
/* Protection Bound Upper 2 */
#define SPRN_PID 0x3B1
/* Process ID */
#define SPRN_PIR 0x3FF
/* Processor Identification Register */
#define SPRN_PIR 0x3FF
/* Processor Identification Register */
#define SPRN_PIT 0x3DB
/* Programmable Interval Timer */
#define SPRN_PIT 0x3DB
/* Programmable Interval Timer */
#define SPRN_PURR 0x135
/* Processor Utilization of Resources Register */
#define SPRN_PURR 0x135
/* Processor Utilization of Resources Register */
...
@@ -249,9 +149,6 @@
...
@@ -249,9 +149,6 @@
#define SPRN_RPA 0x3D6
/* Required Physical Address Register */
#define SPRN_RPA 0x3D6
/* Required Physical Address Register */
#define SPRN_SDA 0x3BF
/* Sampled Data Address Register */
#define SPRN_SDA 0x3BF
/* Sampled Data Address Register */
#define SPRN_SDR1 0x019
/* MMU Hash Base Register */
#define SPRN_SDR1 0x019
/* MMU Hash Base Register */
#define SPRN_SGR 0x3B9
/* Storage Guarded Register */
#define SGR_NORMAL 0
#define SGR_GUARDED 1
#define SPRN_SIA 0x3BB
/* Sampled Instruction Address Register */
#define SPRN_SIA 0x3BB
/* Sampled Instruction Address Register */
#define SPRN_SPRG0 0x110
/* Special Purpose Register General 0 */
#define SPRN_SPRG0 0x110
/* Special Purpose Register General 0 */
#define SPRN_SPRG1 0x111
/* Special Purpose Register General 1 */
#define SPRN_SPRG1 0x111
/* Special Purpose Register General 1 */
...
@@ -264,50 +161,12 @@
...
@@ -264,50 +161,12 @@
#define SPRN_TBWL 0x11C
/* Time Base Lower Register (super, W/O) */
#define SPRN_TBWL 0x11C
/* Time Base Lower Register (super, W/O) */
#define SPRN_TBWU 0x11D
/* Time Base Write Upper Register (super, W/O) */
#define SPRN_TBWU 0x11D
/* Time Base Write Upper Register (super, W/O) */
#define SPRN_HIOR 0x137
/* 970 Hypervisor interrupt offset */
#define SPRN_HIOR 0x137
/* 970 Hypervisor interrupt offset */
#define SPRN_TCR 0x3DA
/* Timer Control Register */
#define TCR_WP(x) (((x)&0x3)<<30)
/* WDT Period */
#define WP_2_17 0
/* 2^17 clocks */
#define WP_2_21 1
/* 2^21 clocks */
#define WP_2_25 2
/* 2^25 clocks */
#define WP_2_29 3
/* 2^29 clocks */
#define TCR_WRC(x) (((x)&0x3)<<28)
/* WDT Reset Control */
#define WRC_NONE 0
/* No reset will occur */
#define WRC_CORE 1
/* Core reset will occur */
#define WRC_CHIP 2
/* Chip reset will occur */
#define WRC_SYSTEM 3
/* System reset will occur */
#define TCR_WIE 0x08000000
/* WDT Interrupt Enable */
#define TCR_PIE 0x04000000
/* PIT Interrupt Enable */
#define TCR_FP(x) (((x)&0x3)<<24)
/* FIT Period */
#define FP_2_9 0
/* 2^9 clocks */
#define FP_2_13 1
/* 2^13 clocks */
#define FP_2_17 2
/* 2^17 clocks */
#define FP_2_21 3
/* 2^21 clocks */
#define TCR_FIE 0x00800000
/* FIT Interrupt Enable */
#define TCR_ARE 0x00400000
/* Auto Reload Enable */
#define SPRN_THRM1 0x3FC
/* Thermal Management Register 1 */
#define THRM1_TIN (1<<0)
#define THRM1_TIV (1<<1)
#define THRM1_THRES (0x7f<<2)
#define THRM1_TID (1<<29)
#define THRM1_TIE (1<<30)
#define THRM1_V (1<<31)
#define SPRN_THRM2 0x3FD
/* Thermal Management Register 2 */
#define SPRN_THRM3 0x3FE
/* Thermal Management Register 3 */
#define THRM3_E (1<<31)
#define SPRN_TSR 0x3D8
/* Timer Status Register */
#define TSR_ENW 0x80000000
/* Enable Next Watchdog */
#define TSR_WIS 0x40000000
/* WDT Interrupt Status */
#define TSR_WRS(x) (((x)&0x3)<<28)
/* WDT Reset Status */
#define WRS_NONE 0
/* No WDT reset occurred */
#define WRS_CORE 1
/* WDT forced core reset */
#define WRS_CHIP 2
/* WDT forced chip reset */
#define WRS_SYSTEM 3
/* WDT forced system reset */
#define TSR_PIS 0x08000000
/* PIT Interrupt Status */
#define TSR_FIS 0x04000000
/* FIT Interrupt Status */
#define SPRN_USIA 0x3AB
/* User Sampled Instruction Address Register */
#define SPRN_USIA 0x3AB
/* User Sampled Instruction Address Register */
#define SPRN_XER 0x001
/* Fixed Point Exception Register */
#define SPRN_XER 0x001
/* Fixed Point Exception Register */
#define SPRN_ZPR 0x3B0
/* Zone Protection Register */
#define SPRN_VRSAVE 0x100
/* Vector save */
#define SPRN_VRSAVE 0x100
/* Vector save */
#define SPRN_CTRLF 0x088
#define SPRN_CTRLT 0x098
#define CTRL_RUNLATCH 0x1
/* Performance monitor SPRs */
/* Performance monitor SPRs */
#define SPRN_SIAR 780
#define SPRN_SIAR 780
...
@@ -352,28 +211,19 @@
...
@@ -352,28 +211,19 @@
#define CTR SPRN_CTR
/* Counter Register */
#define CTR SPRN_CTR
/* Counter Register */
#define DAR SPRN_DAR
/* Data Address Register */
#define DAR SPRN_DAR
/* Data Address Register */
#define DABR SPRN_DABR
/* Data Address Breakpoint Register */
#define DABR SPRN_DABR
/* Data Address Breakpoint Register */
#define DCMP SPRN_DCMP
/* Data TLB Compare Register */
#define DEC SPRN_DEC
/* Decrement Register */
#define DEC SPRN_DEC
/* Decrement Register */
#define DMISS SPRN_DMISS
/* Data TLB Miss Register */
#define DSISR SPRN_DSISR
/* Data Storage Interrupt Status Register */
#define DSISR SPRN_DSISR
/* Data Storage Interrupt Status Register */
#define EAR SPRN_EAR
/* External Address Register */
#define HASH1 SPRN_HASH1
/* Primary Hash Address Register */
#define HASH2 SPRN_HASH2
/* Secondary Hash Address Register */
#define HID0 SPRN_HID0
/* Hardware Implementation Register 0 */
#define HID0 SPRN_HID0
/* Hardware Implementation Register 0 */
#define MSRDORM SPRN_MSRDORM
/* MSR Dormant Register */
#define MSRDORM SPRN_MSRDORM
/* MSR Dormant Register */
#define NIADORM SPRN_NIADORM
/* NIA Dormant Register */
#define NIADORM SPRN_NIADORM
/* NIA Dormant Register */
#define TSC SPRN_TSC
/* Thread switch control */
#define TSC SPRN_TSC
/* Thread switch control */
#define TST SPRN_TST
/* Thread switch timeout */
#define TST SPRN_TST
/* Thread switch timeout */
#define IABR SPRN_IABR
/* Instruction Address Breakpoint Register */
#define IABR SPRN_IABR
/* Instruction Address Breakpoint Register */
#define ICMP SPRN_ICMP
/* Instruction TLB Compare Register */
#define IMISS SPRN_IMISS
/* Instruction TLB Miss Register */
#define IMMR SPRN_IMMR
/* PPC 860/821 Internal Memory Map Register */
#define L2CR SPRN_L2CR
/* PPC 750 L2 control register */
#define L2CR SPRN_L2CR
/* PPC 750 L2 control register */
#define __LR SPRN_LR
#define __LR SPRN_LR
#define PVR SPRN_PVR
/* Processor Version */
#define PVR SPRN_PVR
/* Processor Version */
#define PIR SPRN_PIR
/* Processor ID */
#define PIR SPRN_PIR
/* Processor ID */
#define PURR SPRN_PURR
/* Processor Utilization of Resource Register */
#define PURR SPRN_PURR
/* Processor Utilization of Resource Register */
//#define RPA SPRN_RPA /* Required Physical Address Register */
#define SDR1 SPRN_SDR1
/* MMU hash base register */
#define SDR1 SPRN_SDR1
/* MMU hash base register */
#define SPR0 SPRN_SPRG0
/* Supervisor Private Registers */
#define SPR0 SPRN_SPRG0
/* Supervisor Private Registers */
#define SPR1 SPRN_SPRG1
#define SPR1 SPRN_SPRG1
...
@@ -389,10 +239,6 @@
...
@@ -389,10 +239,6 @@
#define TBRU SPRN_TBRU
/* Time Base Read Upper Register */
#define TBRU SPRN_TBRU
/* Time Base Read Upper Register */
#define TBWL SPRN_TBWL
/* Time Base Write Lower Register */
#define TBWL SPRN_TBWL
/* Time Base Write Lower Register */
#define TBWU SPRN_TBWU
/* Time Base Write Upper Register */
#define TBWU SPRN_TBWU
/* Time Base Write Upper Register */
#define ICTC 1019
#define THRM1 SPRN_THRM1
/* Thermal Management Register 1 */
#define THRM2 SPRN_THRM2
/* Thermal Management Register 2 */
#define THRM3 SPRN_THRM3
/* Thermal Management Register 3 */
#define XER SPRN_XER
#define XER SPRN_XER
/* Processor Version Register (PVR) field extraction */
/* Processor Version Register (PVR) field extraction */
...
@@ -436,12 +282,6 @@
...
@@ -436,12 +282,6 @@
#define XGLUE(a,b) a##b
#define XGLUE(a,b) a##b
#define GLUE(a,b) XGLUE(a,b)
#define GLUE(a,b) XGLUE(a,b)
/* iSeries CTRL register (for runlatch) */
#define CTRLT 0x098
#define CTRLF 0x088
#define RUNLATCH 0x0001
#ifdef __ASSEMBLY__
#ifdef __ASSEMBLY__
#define _GLOBAL(name) \
#define _GLOBAL(name) \
...
@@ -656,6 +496,24 @@ static inline void prefetchw(const void *x)
...
@@ -656,6 +496,24 @@ static inline void prefetchw(const void *x)
#define HAVE_ARCH_PICK_MMAP_LAYOUT
#define HAVE_ARCH_PICK_MMAP_LAYOUT
static
inline
void
ppc64_runlatch_on
(
void
)
{
unsigned
long
ctrl
;
ctrl
=
mfspr
(
SPRN_CTRLF
);
ctrl
|=
CTRL_RUNLATCH
;
mtspr
(
SPRN_CTRLT
,
ctrl
);
}
static
inline
void
ppc64_runlatch_off
(
void
)
{
unsigned
long
ctrl
;
ctrl
=
mfspr
(
SPRN_CTRLF
);
ctrl
&=
~
CTRL_RUNLATCH
;
mtspr
(
SPRN_CTRLT
,
ctrl
);
}
#endif
/* __KERNEL__ */
#endif
/* __KERNEL__ */
#endif
/* __ASSEMBLY__ */
#endif
/* __ASSEMBLY__ */
...
...
include/asm-ppc64/thread_info.h
浏览文件 @
2830077f
...
@@ -96,7 +96,7 @@ static inline struct thread_info *current_thread_info(void)
...
@@ -96,7 +96,7 @@ static inline struct thread_info *current_thread_info(void)
#define TIF_POLLING_NRFLAG 4
/* true if poll_idle() is polling
#define TIF_POLLING_NRFLAG 4
/* true if poll_idle() is polling
TIF_NEED_RESCHED */
TIF_NEED_RESCHED */
#define TIF_32BIT 5
/* 32 bit binary */
#define TIF_32BIT 5
/* 32 bit binary */
#define TIF_RUN_LIGHT 6
/* iSeries run light
*/
/* #define SPARE 6
*/
#define TIF_ABI_PENDING 7
/* 32/64 bit switch needed */
#define TIF_ABI_PENDING 7
/* 32/64 bit switch needed */
#define TIF_SYSCALL_AUDIT 8
/* syscall auditing active */
#define TIF_SYSCALL_AUDIT 8
/* syscall auditing active */
#define TIF_SINGLESTEP 9
/* singlestepping active */
#define TIF_SINGLESTEP 9
/* singlestepping active */
...
@@ -110,7 +110,7 @@ static inline struct thread_info *current_thread_info(void)
...
@@ -110,7 +110,7 @@ static inline struct thread_info *current_thread_info(void)
#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
#define _TIF_32BIT (1<<TIF_32BIT)
#define _TIF_32BIT (1<<TIF_32BIT)
#define _TIF_RUN_LIGHT (1<<TIF_RUN_LIGHT)
/* #define _SPARE (1<<SPARE) */
#define _TIF_ABI_PENDING (1<<TIF_ABI_PENDING)
#define _TIF_ABI_PENDING (1<<TIF_ABI_PENDING)
#define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT)
#define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT)
#define _TIF_SINGLESTEP (1<<TIF_SINGLESTEP)
#define _TIF_SINGLESTEP (1<<TIF_SINGLESTEP)
...
...
include/asm-s390/user.h
浏览文件 @
2830077f
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
#define _S390_USER_H
#define _S390_USER_H
#include <asm/page.h>
#include <asm/page.h>
#include <
linux
/ptrace.h>
#include <
asm
/ptrace.h>
/* Core file format: The core file is written in such a way that gdb
/* Core file format: The core file is written in such a way that gdb
can understand it and provide useful information to the user (under
can understand it and provide useful information to the user (under
linux we use the 'trad-core' bfd). There are quite a number of
linux we use the 'trad-core' bfd). There are quite a number of
...
...
include/linux/if_shaper.h
浏览文件 @
2830077f
...
@@ -23,7 +23,7 @@ struct shaper
...
@@ -23,7 +23,7 @@ struct shaper
__u32
shapeclock
;
__u32
shapeclock
;
unsigned
long
recovery
;
/* Time we can next clock a packet out on
unsigned
long
recovery
;
/* Time we can next clock a packet out on
an empty queue */
an empty queue */
unsigned
long
locked
;
struct
semaphore
sem
;
struct
net_device_stats
stats
;
struct
net_device_stats
stats
;
struct
net_device
*
dev
;
struct
net_device
*
dev
;
int
(
*
hard_start_xmit
)
(
struct
sk_buff
*
skb
,
int
(
*
hard_start_xmit
)
(
struct
sk_buff
*
skb
,
...
@@ -38,7 +38,6 @@ struct shaper
...
@@ -38,7 +38,6 @@ struct shaper
int
(
*
hard_header_cache
)(
struct
neighbour
*
neigh
,
struct
hh_cache
*
hh
);
int
(
*
hard_header_cache
)(
struct
neighbour
*
neigh
,
struct
hh_cache
*
hh
);
void
(
*
header_cache_update
)(
struct
hh_cache
*
hh
,
struct
net_device
*
dev
,
unsigned
char
*
haddr
);
void
(
*
header_cache_update
)(
struct
hh_cache
*
hh
,
struct
net_device
*
dev
,
unsigned
char
*
haddr
);
struct
net_device_stats
*
(
*
get_stats
)(
struct
net_device
*
dev
);
struct
net_device_stats
*
(
*
get_stats
)(
struct
net_device
*
dev
);
wait_queue_head_t
wait_queue
;
struct
timer_list
timer
;
struct
timer_list
timer
;
};
};
...
...
include/linux/libata.h
浏览文件 @
2830077f
...
@@ -467,12 +467,34 @@ static inline u8 ata_chk_status(struct ata_port *ap)
...
@@ -467,12 +467,34 @@ static inline u8 ata_chk_status(struct ata_port *ap)
return
ap
->
ops
->
check_status
(
ap
);
return
ap
->
ops
->
check_status
(
ap
);
}
}
/**
* ata_pause - Flush writes and pause 400 nanoseconds.
* @ap: Port to wait for.
*
* LOCKING:
* Inherited from caller.
*/
static
inline
void
ata_pause
(
struct
ata_port
*
ap
)
static
inline
void
ata_pause
(
struct
ata_port
*
ap
)
{
{
ata_altstatus
(
ap
);
ata_altstatus
(
ap
);
ndelay
(
400
);
ndelay
(
400
);
}
}
/**
* ata_busy_wait - Wait for a port status register
* @ap: Port to wait for.
*
* Waits up to max*10 microseconds for the selected bits in the port's
* status register to be cleared.
* Returns final value of status register.
*
* LOCKING:
* Inherited from caller.
*/
static
inline
u8
ata_busy_wait
(
struct
ata_port
*
ap
,
unsigned
int
bits
,
static
inline
u8
ata_busy_wait
(
struct
ata_port
*
ap
,
unsigned
int
bits
,
unsigned
int
max
)
unsigned
int
max
)
{
{
...
@@ -487,6 +509,18 @@ static inline u8 ata_busy_wait(struct ata_port *ap, unsigned int bits,
...
@@ -487,6 +509,18 @@ static inline u8 ata_busy_wait(struct ata_port *ap, unsigned int bits,
return
status
;
return
status
;
}
}
/**
* ata_wait_idle - Wait for a port to be idle.
* @ap: Port to wait for.
*
* Waits up to 10ms for port's BUSY and DRQ signals to clear.
* Returns final value of status register.
*
* LOCKING:
* Inherited from caller.
*/
static
inline
u8
ata_wait_idle
(
struct
ata_port
*
ap
)
static
inline
u8
ata_wait_idle
(
struct
ata_port
*
ap
)
{
{
u8
status
=
ata_busy_wait
(
ap
,
ATA_BUSY
|
ATA_DRQ
,
1000
);
u8
status
=
ata_busy_wait
(
ap
,
ATA_BUSY
|
ATA_DRQ
,
1000
);
...
@@ -525,6 +559,18 @@ static inline void ata_tf_init(struct ata_port *ap, struct ata_taskfile *tf, uns
...
@@ -525,6 +559,18 @@ static inline void ata_tf_init(struct ata_port *ap, struct ata_taskfile *tf, uns
tf
->
device
=
ATA_DEVICE_OBS
|
ATA_DEV1
;
tf
->
device
=
ATA_DEVICE_OBS
|
ATA_DEV1
;
}
}
/**
* ata_irq_on - Enable interrupts on a port.
* @ap: Port on which interrupts are enabled.
*
* Enable interrupts on a legacy IDE device using MMIO or PIO,
* wait for idle, clear any pending interrupts.
*
* LOCKING:
* Inherited from caller.
*/
static
inline
u8
ata_irq_on
(
struct
ata_port
*
ap
)
static
inline
u8
ata_irq_on
(
struct
ata_port
*
ap
)
{
{
struct
ata_ioports
*
ioaddr
=
&
ap
->
ioaddr
;
struct
ata_ioports
*
ioaddr
=
&
ap
->
ioaddr
;
...
@@ -544,6 +590,18 @@ static inline u8 ata_irq_on(struct ata_port *ap)
...
@@ -544,6 +590,18 @@ static inline u8 ata_irq_on(struct ata_port *ap)
return
tmp
;
return
tmp
;
}
}
/**
* ata_irq_ack - Acknowledge a device interrupt.
* @ap: Port on which interrupts are enabled.
*
* Wait up to 10 ms for legacy IDE device to become idle (BUSY
* or BUSY+DRQ clear). Obtain dma status and port status from
* device. Clear the interrupt. Return port status.
*
* LOCKING:
*/
static
inline
u8
ata_irq_ack
(
struct
ata_port
*
ap
,
unsigned
int
chk_drq
)
static
inline
u8
ata_irq_ack
(
struct
ata_port
*
ap
,
unsigned
int
chk_drq
)
{
{
unsigned
int
bits
=
chk_drq
?
ATA_BUSY
|
ATA_DRQ
:
ATA_BUSY
;
unsigned
int
bits
=
chk_drq
?
ATA_BUSY
|
ATA_DRQ
:
ATA_BUSY
;
...
...
include/linux/netdevice.h
浏览文件 @
2830077f
...
@@ -204,7 +204,7 @@ struct hh_cache
...
@@ -204,7 +204,7 @@ struct hh_cache
/* cached hardware header; allow for machine alignment needs. */
/* cached hardware header; allow for machine alignment needs. */
#define HH_DATA_MOD 16
#define HH_DATA_MOD 16
#define HH_DATA_OFF(__len) \
#define HH_DATA_OFF(__len) \
(HH_DATA_MOD - ((
__len) & (HH_DATA_MOD - 1)
))
(HH_DATA_MOD - ((
(__len - 1) & (HH_DATA_MOD - 1)) + 1
))
#define HH_DATA_ALIGN(__len) \
#define HH_DATA_ALIGN(__len) \
(((__len)+(HH_DATA_MOD-1))&~(HH_DATA_MOD - 1))
(((__len)+(HH_DATA_MOD-1))&~(HH_DATA_MOD - 1))
unsigned
long
hh_data
[
HH_DATA_ALIGN
(
LL_MAX_HEADER
)
/
sizeof
(
long
)];
unsigned
long
hh_data
[
HH_DATA_ALIGN
(
LL_MAX_HEADER
)
/
sizeof
(
long
)];
...
...
include/linux/usb.h
浏览文件 @
2830077f
...
@@ -796,6 +796,10 @@ typedef void (*usb_complete_t)(struct urb *, struct pt_regs *);
...
@@ -796,6 +796,10 @@ typedef void (*usb_complete_t)(struct urb *, struct pt_regs *);
* of the iso_frame_desc array, and the number of errors is reported in
* of the iso_frame_desc array, and the number of errors is reported in
* error_count. Completion callbacks for ISO transfers will normally
* error_count. Completion callbacks for ISO transfers will normally
* (re)submit URBs to ensure a constant transfer rate.
* (re)submit URBs to ensure a constant transfer rate.
*
* Note that even fields marked "public" should not be touched by the driver
* when the urb is owned by the hcd, that is, since the call to
* usb_submit_urb() till the entry into the completion routine.
*/
*/
struct
urb
struct
urb
{
{
...
@@ -803,12 +807,12 @@ struct urb
...
@@ -803,12 +807,12 @@ struct urb
struct
kref
kref
;
/* reference count of the URB */
struct
kref
kref
;
/* reference count of the URB */
spinlock_t
lock
;
/* lock for the URB */
spinlock_t
lock
;
/* lock for the URB */
void
*
hcpriv
;
/* private data for host controller */
void
*
hcpriv
;
/* private data for host controller */
struct
list_head
urb_list
;
/* list pointer to all active urbs */
int
bandwidth
;
/* bandwidth for INT/ISO request */
int
bandwidth
;
/* bandwidth for INT/ISO request */
atomic_t
use_count
;
/* concurrent submissions counter */
atomic_t
use_count
;
/* concurrent submissions counter */
u8
reject
;
/* submissions will fail */
u8
reject
;
/* submissions will fail */
/* public, documented fields in the urb that can be used by drivers */
/* public, documented fields in the urb that can be used by drivers */
struct
list_head
urb_list
;
/* list head for use by the urb owner */
struct
usb_device
*
dev
;
/* (in) pointer to associated device */
struct
usb_device
*
dev
;
/* (in) pointer to associated device */
unsigned
int
pipe
;
/* (in) pipe information */
unsigned
int
pipe
;
/* (in) pipe information */
int
status
;
/* (return) non-ISO status */
int
status
;
/* (return) non-ISO status */
...
...
net/ipv4/ipvs/Makefile
浏览文件 @
2830077f
...
@@ -11,7 +11,7 @@ ip_vs_proto-objs-$(CONFIG_IP_VS_PROTO_AH) += ip_vs_proto_ah.o
...
@@ -11,7 +11,7 @@ ip_vs_proto-objs-$(CONFIG_IP_VS_PROTO_AH) += ip_vs_proto_ah.o
ip_vs-objs
:=
ip_vs_conn.o ip_vs_core.o ip_vs_ctl.o ip_vs_sched.o
\
ip_vs-objs
:=
ip_vs_conn.o ip_vs_core.o ip_vs_ctl.o ip_vs_sched.o
\
ip_vs_xmit.o ip_vs_app.o ip_vs_sync.o
\
ip_vs_xmit.o ip_vs_app.o ip_vs_sync.o
\
ip_vs_est.o ip_vs_proto.o
ip_vs_proto_icmp.o
\
ip_vs_est.o ip_vs_proto.o
\
$
(
ip_vs_proto-objs-y
)
$
(
ip_vs_proto-objs-y
)
...
...
net/ipv4/ipvs/ip_vs_proto.c
浏览文件 @
2830077f
此差异已折叠。
点击以展开。
net/ipv4/ipvs/ip_vs_proto_icmp.c
已删除
100644 → 0
浏览文件 @
36358c21
此差异已折叠。
点击以展开。
net/ipv6/ipv6_syms.c
浏览文件 @
2830077f
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录