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
Kirill Smelkov
linux
Commits
e7be5403
Commit
e7be5403
authored
Nov 23, 2007
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Import 2.3.11
parent
5688f16b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
10 deletions
+35
-10
drivers/misc/parport_ieee1284.c
drivers/misc/parport_ieee1284.c
+29
-9
fs/exec.c
fs/exec.c
+1
-1
include/linux/parport.h
include/linux/parport.h
+5
-0
No files found.
drivers/misc/parport_ieee1284.c
View file @
e7be5403
...
...
@@ -220,7 +220,7 @@ int parport_negotiate (struct parport *port, int mode)
printk
(
KERN_ERR
"parport: IEEE1284 not supported in this kernel
\n
"
);
return
-
1
;
#else
int
m
=
mode
;
int
m
=
mode
&
~
IEEE1284_ADDR
;
unsigned
char
xflag
;
port
=
port
->
physport
;
...
...
@@ -229,6 +229,12 @@ int parport_negotiate (struct parport *port, int mode)
if
(
port
->
ieee1284
.
mode
==
mode
)
return
0
;
/* Is the difference just an address-or-not bit? */
if
((
port
->
ieee1284
.
mode
&
~
IEEE1284_ADDR
)
==
(
mode
&
~
IEEE1284_ADDR
)){
port
->
ieee1284
.
mode
=
mode
;
return
0
;
}
/* Go to compability forward idle mode */
if
(
port
->
ieee1284
.
mode
!=
IEEE1284_MODE_COMPAT
)
parport_ieee1284_terminate
(
port
);
...
...
@@ -409,10 +415,11 @@ ssize_t parport_write (struct parport *port, const void *buffer, size_t len)
#else
ssize_t
retval
;
int
mode
=
port
->
ieee1284
.
mode
;
int
addr
=
mode
&
IEEE1284_ADDR
;
size_t
(
*
fn
)
(
struct
parport
*
,
const
void
*
,
size_t
,
int
);
/* Ignore the device-ID-request bit. */
mode
&=
~
IEEE1284_DEVICEID
;
/* Ignore the device-ID-request bit
and the address bit
. */
mode
&=
~
(
IEEE1284_DEVICEID
|
IEEE1284_ADDR
)
;
/* Use the mode we're in. */
switch
(
mode
)
{
...
...
@@ -426,13 +433,19 @@ ssize_t parport_write (struct parport *port, const void *buffer, size_t len)
case
IEEE1284_MODE_EPP
:
DPRINTK
(
KERN_DEBUG
"%s: Using EPP mode
\n
"
,
port
->
name
);
fn
=
port
->
ops
->
epp_write_data
;
if
(
addr
)
fn
=
port
->
ops
->
epp_write_addr
;
else
fn
=
port
->
ops
->
epp_write_data
;
break
;
case
IEEE1284_MODE_ECP
:
case
IEEE1284_MODE_ECPRLE
:
DPRINTK
(
KERN_DEBUG
"%s: Using ECP mode
\n
"
,
port
->
name
);
fn
=
port
->
ops
->
ecp_write_data
;
if
(
addr
)
fn
=
port
->
ops
->
ecp_write_addr
;
else
fn
=
port
->
ops
->
ecp_write_data
;
break
;
case
IEEE1284_MODE_ECPSWE
:
...
...
@@ -440,7 +453,10 @@ ssize_t parport_write (struct parport *port, const void *buffer, size_t len)
port
->
name
);
/* The caller has specified that it must be emulated,
* even if we have ECP hardware! */
fn
=
parport_ieee1284_ecp_write_data
;
if
(
addr
)
fn
=
parport_ieee1284_ecp_write_addr
;
else
fn
=
parport_ieee1284_ecp_write_data
;
break
;
default:
...
...
@@ -464,10 +480,11 @@ ssize_t parport_read (struct parport *port, void *buffer, size_t len)
return
-
ENODEV
;
#else
int
mode
=
port
->
physport
->
ieee1284
.
mode
;
int
addr
=
mode
&
IEEE1284_ADDR
;
size_t
(
*
fn
)
(
struct
parport
*
,
void
*
,
size_t
,
int
);
/* Ignore the device-ID-request bit. */
mode
&=
~
IEEE1284_DEVICEID
;
/* Ignore the device-ID-request bit
and the address bit
. */
mode
&=
~
(
IEEE1284_DEVICEID
|
IEEE1284_ADDR
)
;
/* Use the mode we're in. */
switch
(
mode
)
{
...
...
@@ -486,7 +503,10 @@ ssize_t parport_read (struct parport *port, void *buffer, size_t len)
case
IEEE1284_MODE_EPP
:
DPRINTK
(
KERN_DEBUG
"%s: Using EPP mode
\n
"
,
port
->
name
);
fn
=
port
->
ops
->
epp_read_data
;
if
(
addr
)
fn
=
port
->
ops
->
epp_read_addr
;
else
fn
=
port
->
ops
->
epp_read_data
;
break
;
case
IEEE1284_MODE_ECP
:
...
...
fs/exec.c
View file @
e7be5403
...
...
@@ -365,7 +365,7 @@ int read_exec(struct dentry *dentry, unsigned long offset,
static
int
exec_mmap
(
void
)
{
struct
mm_struct
*
mm
,
*
old_mm
,
*
active_mm
;
struct
mm_struct
*
mm
,
*
old_mm
;
old_mm
=
current
->
mm
;
if
(
old_mm
&&
atomic_read
(
&
old_mm
->
mm_users
)
==
1
)
{
...
...
include/linux/parport.h
View file @
e7be5403
...
...
@@ -70,6 +70,11 @@ typedef enum {
#define IEEE1284_MODE_EPPSWE (1<<12)
/* Software-emulated */
#define IEEE1284_DEVICEID (1<<2)
/* This is a flag */
/* For the benefit of parport_read/write, you can use these with
* parport_negotiate to use address operations. They have no effect
* other than to make parport_read/write use address transfers. */
#define IEEE1284_ADDR (1<<13)
/* This is a flag */
/* The rest is for the kernel only */
#ifdef __KERNEL__
...
...
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