Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
ebc7ac0f
Commit
ebc7ac0f
authored
Oct 03, 2002
by
Martin Schwidefsky
Committed by
Linus Torvalds
Oct 03, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] s390 update (3/27): drivers.
s390 minimal device drivers changes for 2.5.39.
parent
3cefba2a
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
99 additions
and
49 deletions
+99
-49
drivers/s390/char/ctrlchar.c
drivers/s390/char/ctrlchar.c
+1
-1
drivers/s390/char/hwc_rw.c
drivers/s390/char/hwc_rw.c
+2
-2
drivers/s390/cio/cio.c
drivers/s390/cio/cio.c
+4
-4
drivers/s390/cio/proc.c
drivers/s390/cio/proc.c
+33
-1
drivers/s390/cio/requestirq.c
drivers/s390/cio/requestirq.c
+19
-0
drivers/s390/cio/s390io.c
drivers/s390/cio/s390io.c
+9
-0
drivers/s390/misc/chandev.c
drivers/s390/misc/chandev.c
+4
-1
drivers/s390/net/ctcmain.c
drivers/s390/net/ctcmain.c
+4
-3
drivers/s390/net/ctctty.c
drivers/s390/net/ctctty.c
+16
-25
drivers/s390/net/iucv.c
drivers/s390/net/iucv.c
+5
-6
drivers/s390/net/lcs.c
drivers/s390/net/lcs.c
+1
-0
drivers/s390/net/netiucv.c
drivers/s390/net/netiucv.c
+1
-1
drivers/s390/qdio.c
drivers/s390/qdio.c
+0
-5
No files found.
drivers/s390/char/ctrlchar.c
View file @
ebc7ac0f
...
...
@@ -26,7 +26,7 @@ static struct tq_struct ctrlchar_tq;
static
void
ctrlchar_handle_sysrq
(
struct
tty_struct
*
tty
)
{
handle_sysrq
(
ctrlchar_sysrq_key
,
NULL
,
NULL
,
tty
);
handle_sysrq
(
ctrlchar_sysrq_key
,
NULL
,
tty
);
}
#endif
...
...
drivers/s390/char/hwc_rw.c
View file @
ebc7ac0f
...
...
@@ -2219,7 +2219,7 @@ hwc_interrupt_handler (struct pt_regs *regs, __u16 code)
u32
ext_int_param
=
hwc_ext_int_param
();
irq_enter
(
cpu
,
0x2401
);
irq_enter
();
if
(
hwc_data
.
flags
&
HWC_INIT
)
{
...
...
@@ -2240,7 +2240,7 @@ hwc_interrupt_handler (struct pt_regs *regs, __u16 code)
hwc_do_interrupt
(
ext_int_param
);
spin_unlock
(
&
hwc_data
.
lock
);
}
irq_exit
(
cpu
,
0x2401
);
irq_exit
();
}
void
...
...
drivers/s390/cio/cio.c
View file @
ebc7ac0f
...
...
@@ -978,9 +978,9 @@ do_IRQ (struct pt_regs regs)
*/
if
(
tpi_info
->
adapter_IO
==
1
&&
tpi_info
->
int_type
==
IO_INTERRUPT_TYPE
)
{
irq_enter
(
cpu
,
-
1
);
irq_enter
();
do_adapter_IO
(
tpi_info
->
intparm
);
irq_exit
(
cpu
,
-
1
);
irq_exit
();
}
else
{
unsigned
int
irq
=
tpi_info
->
irq
;
...
...
@@ -1001,11 +1001,11 @@ do_IRQ (struct pt_regs regs)
return
;
}
irq_enter
(
cpu
,
irq
);
irq_enter
();
s390irq_spin_lock
(
irq
);
s390_process_IRQ
(
irq
);
s390irq_spin_unlock
(
irq
);
irq_exit
(
cpu
,
irq
);
irq_exit
();
}
#ifdef CONFIG_FAST_IRQ
...
...
drivers/s390/cio/proc.c
View file @
ebc7ac0f
/*
* drivers/s390/cio/proc.c
* S/390 common I/O routines -- proc file system entries
* $Revision: 1.
4
$
* $Revision: 1.
5
$
*
* Copyright (C) 1999-2002 IBM Deutschland Entwicklung GmbH,
* IBM Corporation
...
...
@@ -17,6 +17,7 @@
#include <linux/config.h>
#include <linux/init.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <asm/io.h>
#include <asm/irq.h>
...
...
@@ -30,6 +31,31 @@
static
int
chan_proc_init
(
void
);
int
show_interrupts
(
struct
seq_file
*
p
,
void
*
v
)
{
int
i
,
j
;
seq_puts
(
p
,
" "
);
for
(
j
=
0
;
j
<
num_online_cpus
();
j
++
)
seq_printf
(
p
,
"CPU%d "
,
j
);
seq_putc
(
p
,
'\n'
);
for
(
i
=
0
;
i
<
NR_IRQS
;
i
++
)
{
if
(
ioinfo
[
i
]
==
INVALID_STORAGE_AREA
)
continue
;
seq_printf
(
p
,
"%3d: "
,
i
);
seq_printf
(
p
,
" %s"
,
ioinfo
[
i
]
->
irq_desc
.
name
);
seq_putc
(
p
,
'\n'
);
}
/* endfor */
return
0
;
}
/*
* Display info on subchannels in /proc/subchannels.
* Adapted from procfs stuff in dasd.c by Cornelia Huck, 02/28/01.
...
...
@@ -267,3 +293,9 @@ cio_irq_proc_init (void)
}
__initcall
(
cio_irq_proc_init
);
void
init_irq_proc
(
void
)
{
/* For now, nothing... */
}
drivers/s390/cio/requestirq.c
View file @
ebc7ac0f
...
...
@@ -122,6 +122,16 @@ s390_request_irq (unsigned int irq,
NULL
,
irqflags
,
devname
,
dev_id
);
}
/*
* request_irq wrapper
*/
int
request_irq
(
unsigned
int
irq
,
void
(
*
handler
)(
int
,
void
*
,
struct
pt_regs
*
),
unsigned
long
irqflags
,
const
char
*
devname
,
void
*
dev_id
)
{
return
s390_request_irq
(
irq
,
handler
,
irqflags
,
devname
,
dev_id
);
}
void
s390_free_irq
(
unsigned
int
irq
,
void
*
dev_id
)
{
...
...
@@ -223,6 +233,15 @@ s390_free_irq (unsigned int irq, void *dev_id)
}
}
/*
* free_irq wrapper.
*/
void
free_irq
(
unsigned
int
irq
,
void
*
dev_id
)
{
s390_free_irq
(
irq
,
dev_id
);
}
/*
* Enable IRQ by modifying the subchannel
*/
...
...
drivers/s390/cio/s390io.c
View file @
ebc7ac0f
...
...
@@ -208,6 +208,15 @@ s390_init_IRQ (void)
return
;
}
/*
* init_IRQ wrapper
*/
void
__init
init_IRQ
(
void
)
{
s390_init_IRQ
();
}
/*
* dummy handler, used during init_IRQ() processing for compatibility only
*/
...
...
drivers/s390/misc/chandev.c
View file @
ebc7ac0f
...
...
@@ -24,6 +24,7 @@
#include <asm/s390dyn.h>
#include <asm/queue.h>
#include <linux/kmod.h>
#include <linux/tqueue.h>
#ifndef MIN
#define MIN(a,b) ((a<b)?a:b)
#endif
...
...
@@ -2825,6 +2826,7 @@ static void chandev_read_conf(void)
struct
stat
statbuf
;
char
*
buff
;
int
curr
,
left
,
len
,
fd
;
mm_segment_t
oldfs
;
/* if called from chandev_register_and_probe &
the driver is compiled into the kernel the
...
...
@@ -2835,6 +2837,7 @@ static void chandev_read_conf(void)
if
(
in_interrupt
()
||
current
->
fs
->
root
==
NULL
)
return
;
atomic_set
(
&
chandev_conf_read
,
TRUE
);
oldfs
=
get_fs
();
set_fs
(
KERNEL_DS
);
if
(
stat
(
CHANDEV_FILE
,
&
statbuf
)
==
0
)
{
...
...
@@ -2859,7 +2862,7 @@ static void chandev_read_conf(void)
vfree
(
buff
);
}
}
set_fs
(
USER_DS
);
set_fs
(
oldfs
);
}
static
void
chandev_read_conf_if_necessary
(
void
)
...
...
drivers/s390/net/ctcmain.c
View file @
ebc7ac0f
...
...
@@ -49,6 +49,7 @@
#include <linux/interrupt.h>
#include <linux/timer.h>
#include <linux/sched.h>
#include <linux/tqueue.h>
#include <linux/signal.h>
#include <linux/string.h>
...
...
@@ -195,7 +196,7 @@ typedef struct {
unsigned
long
doios_multi
;
unsigned
long
txlen
;
unsigned
long
tx_time
;
struct
time
val
send_stamp
;
struct
time
spec
send_stamp
;
}
ctc_profile
;
/**
...
...
@@ -976,10 +977,10 @@ static void ch_action_txdone(fsm_instance *fi, int event, void *arg)
int
first
=
1
;
int
i
;
struct
time
val
done_stamp
=
xtime
;
struct
time
spec
done_stamp
=
xtime
;
unsigned
long
duration
=
(
done_stamp
.
tv_sec
-
ch
->
prof
.
send_stamp
.
tv_sec
)
*
1000000
+
done_stamp
.
tv_usec
-
ch
->
prof
.
send_stamp
.
tv_usec
;
(
done_stamp
.
tv_nsec
-
ch
->
prof
.
send_stamp
.
tv_nsec
)
/
1000
;
if
(
duration
>
ch
->
prof
.
tx_time
)
ch
->
prof
.
tx_time
=
duration
;
...
...
drivers/s390/net/ctctty.c
View file @
ebc7ac0f
...
...
@@ -596,21 +596,17 @@ ctc_tty_flush_buffer(struct tty_struct *tty)
ctc_tty_info
*
info
;
unsigned
long
flags
;
#warning FIXME [kj] Consider using spinlocks.
save_flags
(
flags
);
cli
();
if
(
!
tty
)
{
restore_flags
(
flags
);
if
(
!
tty
)
return
;
}
spin_lock_irqsave
(
&
ctc_tty_lock
,
flags
);
info
=
(
ctc_tty_info
*
)
tty
->
driver_data
;
if
(
ctc_tty_paranoia_check
(
info
,
tty
->
device
,
"ctc_tty_flush_buffer"
))
{
restore_flags
(
flags
);
spin_unlock_irqrestore
(
&
ctc_tty_lock
,
flags
);
return
;
}
skb_queue_purge
(
&
info
->
tx_queue
);
info
->
lsr
|=
UART_LSR_TEMT
;
restore_flags
(
flags
);
spin_unlock_irqrestore
(
&
ctc_tty_lock
,
flags
);
wake_up_interruptible
(
&
tty
->
write_wait
);
if
((
tty
->
flags
&
(
1
<<
TTY_DO_WRITE_WAKEUP
))
&&
tty
->
ldisc
.
write_wakeup
)
...
...
@@ -689,10 +685,9 @@ ctc_tty_get_lsr_info(ctc_tty_info * info, uint * value)
uint
result
;
ulong
flags
;
save_flags
(
flags
);
cli
();
spin_lock_irqsave
(
&
ctc_tty_lock
,
flags
);
status
=
info
->
lsr
;
restore_flags
(
flags
);
spin_unlock_irqrestore
(
&
ctc_tty_lock
,
flags
);
result
=
((
status
&
UART_LSR_TEMT
)
?
TIOCSER_TEMT
:
0
);
put_user
(
result
,
(
uint
*
)
value
);
return
0
;
...
...
@@ -708,10 +703,9 @@ ctc_tty_get_ctc_tty_info(ctc_tty_info * info, uint * value)
ulong
flags
;
control
=
info
->
mcr
;
save_flags
(
flags
);
cli
();
spin_lock_irqsave
(
&
ctc_tty_lock
,
flags
);
status
=
info
->
msr
;
restore_flags
(
flags
);
spin_unlock_irqrestore
(
&
ctc_tty_lock
,
flags
);
result
=
((
control
&
UART_MCR_RTS
)
?
TIOCM_RTS
:
0
)
|
((
control
&
UART_MCR_DTR
)
?
TIOCM_DTR
:
0
)
|
((
status
&
UART_MSR_DCD
)
?
TIOCM_CAR
:
0
)
...
...
@@ -942,11 +936,10 @@ ctc_tty_block_til_ready(struct tty_struct *tty, struct file *filp, ctc_tty_info
printk
(
KERN_DEBUG
"ctc_tty_block_til_ready before block: %s%d, count = %d
\n
"
,
CTC_TTY_NAME
,
info
->
line
,
info
->
count
);
#endif
save_flags
(
flags
);
cli
();
spin_lock_irqsave
(
&
ctc_tty_lock
,
flags
);
if
(
!
(
tty_hung_up_p
(
filp
)))
info
->
count
--
;
restore_flags
(
flags
);
spin_unlock_irqrestore
(
&
ctc_tty_lock
,
flags
);
info
->
blocked_open
++
;
while
(
1
)
{
set_current_state
(
TASK_INTERRUPTIBLE
);
...
...
@@ -1053,16 +1046,14 @@ static void
ctc_tty_close
(
struct
tty_struct
*
tty
,
struct
file
*
filp
)
{
ctc_tty_info
*
info
=
(
ctc_tty_info
*
)
tty
->
driver_data
;
unsigned
long
saveflags
;
ulong
flags
;
ulong
timeout
;
if
(
!
info
||
ctc_tty_paranoia_check
(
info
,
tty
->
device
,
"ctc_tty_close"
))
return
;
save_flags
(
flags
);
cli
();
spin_lock_irqsave
(
&
ctc_tty_lock
,
flags
);
if
(
tty_hung_up_p
(
filp
))
{
restore_flags
(
flags
);
spin_unlock_irqrestore
(
&
ctc_tty_lock
,
flags
);
#ifdef CTC_DEBUG_MODEM_OPEN
printk
(
KERN_DEBUG
"ctc_tty_close return after tty_hung_up_p
\n
"
);
#endif
...
...
@@ -1086,7 +1077,7 @@ ctc_tty_close(struct tty_struct *tty, struct file *filp)
info
->
count
=
0
;
}
if
(
info
->
count
)
{
restore_flags
(
flags
);
local_irq_restore
(
flags
);
#ifdef CTC_DEBUG_MODEM_OPEN
printk
(
KERN_DEBUG
"ctc_tty_close after info->count != 0
\n
"
);
#endif
...
...
@@ -1117,7 +1108,9 @@ ctc_tty_close(struct tty_struct *tty, struct file *filp)
timeout
=
jiffies
+
HZ
;
while
(
!
(
info
->
lsr
&
UART_LSR_TEMT
))
{
set_current_state
(
TASK_INTERRUPTIBLE
);
spin_unlock_irqrestore
(
&
ctc_tty_lock
,
flags
);
schedule_timeout
(
20
);
spin_lock_irqsave
(
&
ctc_tty_lock
,
flags
);
if
(
time_after
(
jiffies
,
timeout
))
break
;
}
...
...
@@ -1127,9 +1120,7 @@ ctc_tty_close(struct tty_struct *tty, struct file *filp)
tty
->
driver
.
flush_buffer
(
tty
);
if
(
tty
->
ldisc
.
flush_buffer
)
tty
->
ldisc
.
flush_buffer
(
tty
);
spin_lock_irqsave
(
&
ctc_tty_lock
,
saveflags
);
info
->
tty
=
0
;
spin_unlock_irqrestore
(
&
ctc_tty_lock
,
saveflags
);
tty
->
closing
=
0
;
if
(
info
->
blocked_open
)
{
set_current_state
(
TASK_INTERRUPTIBLE
);
...
...
@@ -1138,7 +1129,7 @@ ctc_tty_close(struct tty_struct *tty, struct file *filp)
}
info
->
flags
&=
~
(
CTC_ASYNC_NORMAL_ACTIVE
|
CTC_ASYNC_CLOSING
);
wake_up_interruptible
(
&
info
->
close_wait
);
restore_flags
(
flags
);
spin_unlock_irqrestore
(
&
ctc_tty_lock
,
flags
);
#ifdef CTC_DEBUG_MODEM_OPEN
printk
(
KERN_DEBUG
"ctc_tty_close normal exit
\n
"
);
#endif
...
...
drivers/s390/net/iucv.c
View file @
ebc7ac0f
...
...
@@ -302,7 +302,7 @@ iucv_dumpit(char *title, void *buf, int len)
if
(
debuglevel
<
3
)
return
;
printk
(
KERN_DEBUG
__FUNCTION__
":
%s
\n
"
,
title
);
printk
(
KERN_DEBUG
"
%s
\n
"
,
title
);
printk
(
" "
);
for
(
i
=
0
;
i
<
len
;
i
++
)
{
if
(
!
(
i
%
16
)
&&
i
!=
0
)
...
...
@@ -318,7 +318,7 @@ iucv_dumpit(char *title, void *buf, int len)
#define iucv_debug(lvl, fmt, args...) \
do { \
if (debuglevel >= lvl) \
printk(KERN_DEBUG
__FUNCTION__ ": " fmt "\n"
, ## args); \
printk(KERN_DEBUG
"%s: " fmt "\n", __FUNCTION__
, ## args); \
} while (0)
#else
...
...
@@ -2183,14 +2183,13 @@ static void
iucv_irq_handler
(
struct
pt_regs
*
regs
,
__u16
code
)
{
iucv_irqdata
*
irqdata
;
int
cpu
=
smp_processor_id
();
irq_enter
(
cpu
,
0x4000
);
irq_enter
();
irqdata
=
kmalloc
(
sizeof
(
iucv_irqdata
),
GFP_ATOMIC
);
if
(
!
irqdata
)
{
printk
(
KERN_WARNING
"%s: out of memory
\n
"
,
__FUNCTION__
);
irq_exit
(
cpu
,
0x4000
);
irq_exit
();
return
;
}
...
...
@@ -2206,7 +2205,7 @@ iucv_irq_handler(struct pt_regs *regs, __u16 code)
mark_bh
(
IMMEDIATE_BH
);
}
irq_exit
(
cpu
,
0x4000
);
irq_exit
();
return
;
}
...
...
drivers/s390/net/lcs.c
View file @
ebc7ac0f
...
...
@@ -126,6 +126,7 @@ whether it is should wake up a process currently issuing lan commands.
#include <linux/sched.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/tqueue.h>
#include <asm/system.h>
#include <asm/io.h>
#include <asm/irq.h>
...
...
drivers/s390/net/netiucv.c
View file @
ebc7ac0f
...
...
@@ -88,7 +88,7 @@ typedef struct connection_profile_t {
unsigned
long
doios_multi
;
unsigned
long
txlen
;
unsigned
long
tx_time
;
struct
time
val
send_stamp
;
struct
time
spec
send_stamp
;
}
connection_profile
;
/**
...
...
drivers/s390/qdio.c
View file @
ebc7ac0f
...
...
@@ -245,26 +245,21 @@ static __inline__ int atomic_return_add (int i, atomic_t *v)
static
void
qdio_wait_nonbusy
(
unsigned
int
timeout
)
{
unsigned
int
start
;
unsigned
long
flags
;
char
dbf_text
[
15
];
sprintf
(
dbf_text
,
"wtnb%4x"
,
timeout
);
QDIO_DBF_TEXT3
(
0
,
trace
,
dbf_text
);
start
=
qdio_get_millis
();
save_flags
(
flags
);
cli
();
for
(;;)
{
set_task_state
(
current
,
TASK_INTERRUPTIBLE
);
if
(
qdio_get_millis
()
-
start
>
timeout
)
{
goto
out
;
}
restore_flags
(
flags
);
schedule_timeout
(((
start
+
timeout
-
qdio_get_millis
())
>>
10
)
*
HZ
);
save_flags
(
flags
);
cli
();
}
out:
set_task_state
(
current
,
TASK_RUNNING
);
restore_flags
(
flags
);
}
static
int
qdio_wait_for_no_use_count
(
atomic_t
*
use_count
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment