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
74beaae0
Commit
74beaae0
authored
Nov 23, 2007
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Import 1.1.47
parent
ab114917
Changes
22
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
1046 additions
and
209 deletions
+1046
-209
Makefile
Makefile
+1
-1
drivers/block/blk.h
drivers/block/blk.h
+0
-4
drivers/block/floppy.c
drivers/block/floppy.c
+1
-1
drivers/block/hd.c
drivers/block/hd.c
+1
-0
drivers/char/console.c
drivers/char/console.c
+2
-2
drivers/char/kbd_kern.h
drivers/char/kbd_kern.h
+6
-2
drivers/char/keyboard.c
drivers/char/keyboard.c
+7
-12
drivers/char/n_tty.c
drivers/char/n_tty.c
+2
-2
drivers/char/tty_io.c
drivers/char/tty_io.c
+5
-3
drivers/scsi/NCR5380.c
drivers/scsi/NCR5380.c
+15
-4
drivers/scsi/constants.h
drivers/scsi/constants.h
+1
-0
drivers/scsi/pas16.c
drivers/scsi/pas16.c
+43
-13
drivers/scsi/sr.c
drivers/scsi/sr.c
+14
-1
fs/ext2/balloc.c
fs/ext2/balloc.c
+1
-4
include/asm-i386/bitops.h
include/asm-i386/bitops.h
+12
-0
include/linux/ncp.h
include/linux/ncp.h
+106
-0
include/linux/socket.h
include/linux/socket.h
+1
-0
net/inet/datagram.c
net/inet/datagram.c
+2
-1
net/inet/ipx.c
net/inet/ipx.c
+796
-158
net/inet/ncp.h
net/inet/ncp.h
+26
-0
net/inet/sock.h
net/inet/sock.h
+2
-0
net/socket.c
net/socket.c
+2
-1
No files found.
Makefile
View file @
74beaae0
VERSION
=
1
PATCHLEVEL
=
1
SUBLEVEL
=
4
6
SUBLEVEL
=
4
7
ARCH
=
i386
...
...
drivers/block/blk.h
View file @
74beaae0
...
...
@@ -223,10 +223,6 @@ static void floppy_off(unsigned int nr);
#define DEVICE_ON(device)
#define DEVICE_OFF(device)
#else
#error "unknown blk device"
#endif
#if (MAJOR_NR != SCSI_TAPE_MAJOR)
...
...
drivers/block/floppy.c
View file @
74beaae0
...
...
@@ -231,7 +231,7 @@ static struct {
{{
3
,
250
,
16
,
16
,
3000
,
100
,
300
,
0
,
2
,
5
,
83
,
3
*
HZ
,
20
,
{
3
,
1
,
2
,
0
,
2
},
0
,
0
,
{
4
,
22
,
21
,
30
,
3
,
0
,
0
,
0
},
150
,
4
},
"720k"
},
/*3 1/2 DD*/
{{
4
,
500
,
16
,
16
,
3
000
,
40
,
300
,
10
,
2
,
5
,
83
,
3
*
HZ
,
20
,
{
3
,
1
,
2
,
0
,
2
},
0
,
{{
4
,
500
,
16
,
16
,
4
000
,
40
,
300
,
10
,
2
,
5
,
83
,
3
*
HZ
,
20
,
{
3
,
1
,
2
,
0
,
2
},
0
,
0
,
{
7
,
4
,
25
,
22
,
31
,
21
,
29
,
11
},
150
,
7
},
"1.44M"
},
/*3 1/2 HD*/
{{
5
,
1000
,
15
,
8
,
3000
,
40
,
300
,
10
,
2
,
5
,
83
,
3
*
HZ
,
40
,
{
3
,
1
,
2
,
0
,
2
},
0
,
...
...
drivers/block/hd.c
View file @
74beaae0
...
...
@@ -866,6 +866,7 @@ static int hd_ioctl(struct inode * inode, struct file * file,
if
(
err
)
return
err
;
memcpy_tofs
((
char
*
)
arg
,
(
char
*
)
hd_ident_info
[
dev
],
sizeof
(
struct
hd_driveid
));
return
0
;
RO_IOCTLS
(
inode
->
i_rdev
,
arg
);
default:
...
...
drivers/char/console.c
View file @
74beaae0
...
...
@@ -1457,13 +1457,13 @@ void poke_blanked_console(void)
}
}
void
*
memsetw
(
void
*
s
,
unsigned
short
c
,
int
count
)
void
*
memsetw
(
void
*
s
,
unsigned
short
c
,
unsigned
int
count
)
{
__asm__
(
"cld
\n\t
"
"rep
\n\t
"
"stosw"
:
/* no output */
:
"a"
(
c
),
"D"
(
s
),
"c"
(
count
)
:
"a"
(
c
),
"D"
(
s
),
"c"
(
count
/
2
)
:
"cx"
,
"di"
);
return
s
;
}
...
...
drivers/char/kbd_kern.h
View file @
74beaae0
...
...
@@ -16,13 +16,17 @@
* Note: lockstate is used as index in the array key_map.
*/
struct
kbd_struct
{
unsigned
char
ledstate
;
/* 3 bits */
unsigned
char
ledstate
;
/* 3 bits */
unsigned
char
default_ledstate
;
unsigned
char
lockstate
;
/* 3 bits */
#define VC_SCROLLOCK 0
/* scroll-lock mode */
#define VC_NUMLOCK 1
/* numeric lock mode */
#define VC_CAPSLOCK 2
/* capslock mode */
unsigned
char
lockstate
;
/* 4 bits - must be in 0..15 */
#define VC_SHIFTLOCK KG_SHIFT
/* shift lock mode */
#define VC_ALTGRLOCK KG_ALTGR
/* altgr lock mode */
#define VC_CTRLLOCK KG_CTRL
/* control lock mode */
#define VC_ALTLOCK KG_ALT
/* alt lock mode */
unsigned
char
modeflags
;
#define VC_APPLIC 0
/* application key mode */
...
...
drivers/char/keyboard.c
View file @
74beaae0
...
...
@@ -344,15 +344,15 @@ static void keyboard_interrupt(int int_pt_regs)
u_char
type
;
/* the XOR below used to be an OR */
int
shift_final
=
shift_state
^
vc_kbd_lock
(
kbd
,
VC_CAPSLOCK
)
;
int
shift_final
=
shift_state
^
kbd
->
lockstate
;
key_code
=
key_map
[
shift_final
][
scancode
];
type
=
KTYP
(
key_code
);
if
(
type
==
KT_LETTER
)
{
type
=
KT_LATIN
;
if
(
vc_kbd_l
ock
(
kbd
,
VC_CAPSLOCK
))
key_code
=
key_map
[
shift_final
][
scancode
];
if
(
vc_kbd_l
ed
(
kbd
,
VC_CAPSLOCK
))
key_code
=
key_map
[
shift_final
^
(
1
<<
KG_SHIFT
)
][
scancode
];
}
(
*
key_handler
[
type
])(
key_code
&
0xff
,
up_flag
);
}
...
...
@@ -404,7 +404,6 @@ static void caps_toggle(void)
if
(
rep
)
return
;
chg_vc_kbd_led
(
kbd
,
VC_CAPSLOCK
);
chg_vc_kbd_lock
(
kbd
,
VC_CAPSLOCK
);
}
static
void
caps_on
(
void
)
...
...
@@ -412,7 +411,6 @@ static void caps_on(void)
if
(
rep
)
return
;
set_vc_kbd_led
(
kbd
,
VC_CAPSLOCK
);
set_vc_kbd_lock
(
kbd
,
VC_CAPSLOCK
);
}
static
void
show_ptregs
(
void
)
...
...
@@ -463,10 +461,8 @@ static void num(void)
applkey
(
'P'
,
1
);
return
;
}
if
(
!
rep
)
{
/* no autorepeat for numlock, ChN */
if
(
!
rep
)
/* no autorepeat for numlock, ChN */
chg_vc_kbd_led
(
kbd
,
VC_NUMLOCK
);
chg_vc_kbd_lock
(
kbd
,
VC_NUMLOCK
);
}
}
static
void
lastcons
(
void
)
...
...
@@ -647,7 +643,8 @@ static void do_pad(unsigned char value, char up_flag)
applkey
(
app_map
[
value
],
1
);
return
;
}
if
(
!
vc_kbd_lock
(
kbd
,
VC_NUMLOCK
))
if
(
!
vc_kbd_led
(
kbd
,
VC_NUMLOCK
))
switch
(
value
)
{
case
KVAL
(
K_PCOMMA
):
case
KVAL
(
K_PDOT
):
...
...
@@ -709,10 +706,8 @@ static void do_shift(unsigned char value, char up_flag)
/* kludge... */
if
(
value
==
KVAL
(
K_CAPSSHIFT
))
{
value
=
KVAL
(
K_SHIFT
);
if
(
!
up_flag
)
{
if
(
!
up_flag
)
clr_vc_kbd_led
(
kbd
,
VC_CAPSLOCK
);
clr_vc_kbd_lock
(
kbd
,
VC_CAPSLOCK
);
}
}
if
(
up_flag
)
{
...
...
drivers/char/n_tty.c
View file @
74beaae0
...
...
@@ -931,9 +931,9 @@ static int write_chan(struct tty_struct * tty, struct file * file,
if
(
opost
(
c
,
tty
)
<
0
)
break
;
b
++
;
nr
--
;
if
(
tty
->
driver
.
flush_chars
)
tty
->
driver
.
flush_chars
(
tty
);
}
if
(
tty
->
driver
.
flush_chars
)
tty
->
driver
.
flush_chars
(
tty
);
}
else
{
c
=
tty
->
driver
.
write
(
tty
,
1
,
b
,
nr
);
b
+=
c
;
...
...
drivers/char/tty_io.c
View file @
74beaae0
...
...
@@ -1535,8 +1535,10 @@ int tty_register_driver(struct tty_driver *driver)
return
0
;
error
=
register_chrdev
(
driver
->
major
,
driver
->
name
,
&
tty_fops
);
if
(
error
)
if
(
error
<
0
)
return
error
;
else
if
(
driver
->
major
==
0
)
driver
->
major
=
error
;
if
(
!
driver
->
put_char
)
driver
->
put_char
=
tty_default_put_char
;
...
...
@@ -1545,7 +1547,7 @@ int tty_register_driver(struct tty_driver *driver)
driver
->
next
=
tty_drivers
;
tty_drivers
->
prev
=
driver
;
tty_drivers
=
driver
;
return
0
;
return
error
;
}
/*
...
...
@@ -1589,7 +1591,7 @@ long tty_init(long kmem_start)
panic
(
"size of tty structure > PAGE_SIZE!"
);
if
(
register_chrdev
(
TTY_MAJOR
,
"tty"
,
&
tty_fops
))
panic
(
"unable to get major %d for tty device"
,
TTY_MAJOR
);
if
(
register_chrdev
(
TTYAUX_MAJOR
,
"
tty
"
,
&
tty_fops
))
if
(
register_chrdev
(
TTYAUX_MAJOR
,
"
cua
"
,
&
tty_fops
))
panic
(
"unable to get major %d for tty device"
,
TTYAUX_MAJOR
);
kmem_start
=
kbd_init
(
kmem_start
);
...
...
drivers/scsi/NCR5380.c
View file @
74beaae0
...
...
@@ -193,6 +193,11 @@
* DIFFERENTIAL - if defined, NCR53c81 chips will use external differential
* transceivers.
*
* LIMIT_TRANSFERSIZE - if defined, limit the pseudo-dma transfers to 512
* bytes at a time. Since interrupts are disabled by default during
* these transfers, we might need this to give reasonable interrupt
* service time if the transfer size gets too large.
*
* LINKED - if defined, linked commands are supported.
*
* PSEUDO_DMA - if defined, PSEUDO DMA is used during the data transfer phases.
...
...
@@ -1980,10 +1985,16 @@ static void NCR5380_information_transfer (struct Scsi_Host *instance) {
if
(
!
cmd
->
device
->
borken
&&
(
transfersize
=
NCR5380_dma_xfer_len
(
instance
,
cmd
))
!=
0
)
{
#else
if
(
!
cmd
->
device
->
borken
&&
(
transfersize
=
cmd
->
transfersize
)
&&
cmd
->
SCp
.
this_residual
&&
!
(
cmd
->
SCp
.
this_residual
%
transfersize
))
{
transfersize
=
cmd
->
transfersize
;
#ifdef LIMIT_TRANSFERSIZE
/* If we have problems with interrupt service */
if
(
transfersize
>
512
)
transfersize
=
512
;
#endif
/* LIMIT_TRANSFERSIZE */
if
(
!
cmd
->
device
->
borken
&&
transfersize
&&
cmd
->
SCp
.
this_residual
&&
!
(
cmd
->
SCp
.
this_residual
%
transfersize
))
{
#endif
len
=
transfersize
;
if
(
NCR5380_transfer_dma
(
instance
,
&
phase
,
...
...
drivers/scsi/constants.h
View file @
74beaae0
...
...
@@ -4,4 +4,5 @@ extern void print_command(unsigned char *);
extern
int
print_msg
(
unsigned
char
*
);
extern
void
print_sense
(
char
*
,
Scsi_Cmnd
*
);
extern
void
print_status
(
int
);
extern
void
print_Scsi_Cmnd
(
Scsi_Cmnd
*
);
#endif
/* def _CONSTANTS_H */
drivers/scsi/pas16.c
View file @
74beaae0
#define AUTOSENSE
#define PSEUDO_DMA
#define FOO
#define UNSAFE
/* Not unsafe for PAS16 -- use it */
/*
* This driver adapted from Drew Eckhardt's Trantor T128 driver
...
...
@@ -40,6 +42,11 @@
* AUTOSENSE - if defined, REQUEST SENSE will be performed automatically
* for commands that return with a CHECK CONDITION status.
*
* LIMIT_TRANSFERSIZE - if defined, limit the pseudo-dma transfers to 512
* bytes at a time. Since interrupts are disabled by default during
* these transfers, we might need this to give reasonable interrupt
* service time if the transfer size gets too large.
*
* PSEUDO_DMA - enables PSEUDO-DMA hardware, should give a 3-4X performance
* increase compared to polled I/O.
*
...
...
@@ -47,11 +54,13 @@
*
* SCSI2 - enable support for SCSI-II tagged queueing. Untested.
*
*
* UNSAFE - leave interrupts enabled during pseudo-DMA transfers. You
* only really want to use this if you're having a problem with
* dropped characters during high speed communications, and even
* then, you're going to be better off twiddling with transfersize.
* UNSAFE - leave interrupts enabled during pseudo-DMA transfers. This
* parameter comes from the NCR5380 code. It is NOT unsafe with
* the PAS16 and you should use it. If you don't you will have
* a problem with dropped characters during high speed
* communications during SCSI transfers. If you really don't
* want to use UNSAFE you can try defining LIMIT_TRANSFERSIZE or
* twiddle with the transfer size in the high level code.
*
* USLEEP - enable support for devices that don't disconnect. Untested.
*
...
...
@@ -242,7 +251,7 @@ void init_board( unsigned short io_port, int irq, int force_irq )
int
pas16_hw_detect
(
unsigned
short
board_num
)
{
unsigned
char
board_rev
,
tmp
;
unsigned
short
port
=
bases
[
board_num
].
io_port
;
unsigned
short
io_
port
=
bases
[
board_num
].
io_port
;
/* See if we can find a PAS16 board at the address associated
* with this logical board number.
...
...
@@ -251,26 +260,39 @@ int pas16_hw_detect( unsigned short board_num )
/* First, attempt to take a newer model board out of reset and
* give it a base address. This shouldn't affect older boards.
*/
enable_board
(
board_num
,
port
);
enable_board
(
board_num
,
io_
port
);
/* Now see if it looks like a PAS16 board */
board_rev
=
inb
(
port
+
PCB_CONFIG
);
board_rev
=
inb
(
io_
port
+
PCB_CONFIG
);
if
(
board_rev
==
0xff
)
return
0
;
tmp
=
board_rev
^
0xe0
;
outb
(
tmp
,
port
+
PCB_CONFIG
);
tmp
=
inb
(
port
+
PCB_CONFIG
);
outb
(
board_rev
,
port
+
PCB_CONFIG
);
outb
(
tmp
,
io_
port
+
PCB_CONFIG
);
tmp
=
inb
(
io_
port
+
PCB_CONFIG
);
outb
(
board_rev
,
io_
port
+
PCB_CONFIG
);
if
(
board_rev
!=
tmp
)
/* Not a PAS-16 */
return
0
;
if
(
(
inb
(
port
+
OPERATION_MODE_1
)
&
0x03
)
!=
0x03
)
if
(
(
inb
(
io_
port
+
OPERATION_MODE_1
)
&
0x03
)
!=
0x03
)
return
0
;
/* return if no SCSI interface found */
/* Mediavision has some new model boards that return ID bits
* that indicate a SCSI interface, but they're not (LMS). We'll
* put in an additional test to try and weed them out.
*/
outb
(
0x01
,
io_port
+
WAIT_STATE
);
/* 1 Wait state */
NCR5380_write
(
MODE_REG
,
0x20
);
/* Is it really SCSI? */
if
(
NCR5380_read
(
MODE_REG
)
!=
0x20
)
/* Write to a reg. */
return
0
;
/* and try to read */
NCR5380_write
(
MODE_REG
,
0x00
);
/* it back. */
if
(
NCR5380_read
(
MODE_REG
)
!=
0x00
)
return
0
;
return
1
;
}
...
...
@@ -426,7 +448,15 @@ int pas16_biosparam(Disk * disk, int dev, int * ip)
int
size
=
disk
->
capacity
;
ip
[
0
]
=
64
;
ip
[
1
]
=
32
;
ip
[
2
]
=
size
>>
11
;
ip
[
2
]
=
size
>>
11
;
/* I think I have it as /(32*64) */
if
(
ip
[
2
]
>
1024
)
{
/* yes, >, not >= */
ip
[
0
]
=
255
;
ip
[
1
]
=
63
;
ip
[
2
]
=
size
/
(
63
*
255
);
if
(
ip
[
2
]
>
1023
)
/* yes >1023... */
ip
[
2
]
=
1023
;
}
return
0
;
}
...
...
drivers/scsi/sr.c
View file @
74beaae0
...
...
@@ -627,7 +627,20 @@ are any multiple of 512 bytes long. */
printk
(
"
\n
"
);
};
#endif
/* Some dumb host adapters can speed transfers by knowing the
* minimum tranfersize in advance.
*
* We shouldn't disconnect in the middle of a sector, but the cdrom
* sector size can be larger than the size of a buffer and the
* transfer may be split to the size of a buffer. So it's safe to
* assume that we can at least transfer the minimum of the buffer
* size (1024) and the sector size between each connect / disconnect.
*/
SCpnt
->
transfersize
=
(
scsi_CDs
[
dev
].
sector_size
>
1024
)
?
1024
:
scsi_CDs
[
dev
].
sector_size
;
SCpnt
->
this_count
=
this_count
;
scsi_do_cmd
(
SCpnt
,
(
void
*
)
cmd
,
buffer
,
realcount
*
scsi_CDs
[
dev
].
sector_size
,
...
...
fs/ext2/balloc.c
View file @
74beaae0
...
...
@@ -316,10 +316,7 @@ int ext2_new_block (struct super_block * sb, unsigned long goal,
else
lmap
|=
0xffffffff
<<
(
31
-
(
j
&
31
));
if
(
lmap
!=
0xffffffffl
)
{
__asm__
(
"bsfl %1,%0"
:
"=r"
(
k
)
:
"r"
(
~
lmap
));
k
++
;
k
=
ffz
(
lmap
)
+
1
;
if
((
j
+
k
)
<
EXT2_BLOCKS_PER_GROUP
(
sb
))
{
j
+=
k
;
goto
got_block
;
...
...
include/asm-i386/bitops.h
View file @
74beaae0
...
...
@@ -121,4 +121,16 @@ extern inline int find_next_zero_bit (unsigned long * addr, int size,
return
(
offset
+
set
+
res
);
}
/*
* ffz = Find First Zero in word. Undefined if no zero exists,
* so code should check against ~0UL first..
*/
extern
inline
unsigned
long
ffz
(
unsigned
long
word
)
{
__asm__
(
"bsfl %1,%0"
:
"=r"
(
word
)
:
"r"
(
~
word
));
return
word
;
}
#endif
/* _I386_BITOPS_H */
include/linux/ncp.h
0 → 100644
View file @
74beaae0
#ifndef _LINUX_NCP_H_
#define _LINUX_NCP_H_
#define NCP_OPEN 0x1111
#define NCP_CLOSE 0x5555
#define NCP_REQUEST 0x2222
#define NCP_REPLY 0x3333
struct
ncp_request
{
unsigned
short
p_type
__attribute__
((
packed
));
unsigned
char
seq
__attribute__
((
packed
));
unsigned
char
c_low
__attribute__
((
packed
));
unsigned
char
task
__attribute__
((
packed
));
unsigned
char
c_high
__attribute__
((
packed
));
unsigned
char
func
__attribute__
((
packed
));
};
struct
ncp_request_sf
{
unsigned
short
p_type
__attribute__
((
packed
));
unsigned
char
seq
__attribute__
((
packed
));
unsigned
char
c_low
__attribute__
((
packed
));
unsigned
char
task
__attribute__
((
packed
));
unsigned
char
c_high
__attribute__
((
packed
));
unsigned
char
func
__attribute__
((
packed
));
unsigned
short
s_len
__attribute__
((
packed
));
unsigned
char
s_func
__attribute__
((
packed
));
};
struct
ncp_reply
{
unsigned
short
p_type
__attribute__
((
packed
));
unsigned
char
seq
__attribute__
((
packed
));
unsigned
char
c_low
__attribute__
((
packed
));
unsigned
char
task
__attribute__
((
packed
));
unsigned
char
c_high
__attribute__
((
packed
));
unsigned
char
f_stat
__attribute__
((
packed
));
unsigned
char
c_stat
__attribute__
((
packed
));
};
#define OTYPE_USER 0x0001
#define OTYPE_GROUP 0x0002
#define OTYPE_PQUEUE 0x0003
#define OTYPE_FSERVER 0x0004
#define OTYPE_JSERVER 0x0005
#define OTYPE_PSERVER 0x0007
#define OTYPE_UNKNOWN_1 0x002E
#define OTYPE_ADV_PSERVER 0x0047
#define OTYPE_AFSERVER 0x0107
#define OTYPE_UNKNOWN_2 0x0143
#define OTYPE_UNKNOWN_3 0x01F5
#define OTYPE_UNKNOWN_4 0x023F
#define LIMIT_OBJNAME 47
struct
bind_obj
{
unsigned
long
id
__attribute__
((
packed
));
unsigned
short
type
__attribute__
((
packed
));
char
name
[
LIMIT_OBJNAME
+
1
]
__attribute__
((
packed
));
};
struct
get_bind_obj
{
unsigned
short
type
__attribute__
((
packed
));
unsigned
char
n_len
__attribute__
((
packed
));
char
name
[
0
]
__attribute__
((
packed
));
};
struct
scan_bind_obj
{
unsigned
long
id
__attribute__
((
packed
));
unsigned
short
type
__attribute__
((
packed
));
unsigned
char
n_len
__attribute__
((
packed
));
char
name
[
0
]
__attribute__
((
packed
));
};
struct
login_req
{
unsigned
char
password
[
8
]
__attribute__
((
packed
));
unsigned
short
type
__attribute__
((
packed
));
unsigned
char
n_len
__attribute__
((
packed
));
char
name
[
0
]
__attribute__
((
packed
));
};
struct
ncp_time
{
unsigned
char
year
__attribute__
((
packed
));
unsigned
char
month
__attribute__
((
packed
));
unsigned
char
day
__attribute__
((
packed
));
unsigned
char
hours
__attribute__
((
packed
));
unsigned
char
mins
__attribute__
((
packed
));
unsigned
char
secs
__attribute__
((
packed
));
unsigned
char
c_secs
__attribute__
((
packed
));
};
struct
login_info
{
unsigned
long
id
__attribute__
((
packed
));
unsigned
short
un1
__attribute__
((
packed
));
char
name
[
LIMIT_OBJNAME
+
1
]
__attribute__
((
packed
));
struct
ncp_time
time
__attribute__
((
packed
));
};
#endif
include/linux/socket.h
View file @
74beaae0
...
...
@@ -20,6 +20,7 @@ struct linger {
#define SOCK_RAW 3
/* raw socket */
#define SOCK_RDM 4
/* reliably-delivered message */
#define SOCK_SEQPACKET 5
/* sequential packet socket */
#define SOCK_NCP 6
/* Novell NCP socket */
#define SOCK_PACKET 10
/* linux specific way of */
/* getting packets at the dev */
/* level. For writing rarp and */
...
...
net/inet/datagram.c
View file @
74beaae0
...
...
@@ -177,7 +177,8 @@ int datagram_select(struct sock *sk, int sel_type, select_table *wait)
switch
(
sel_type
)
{
case
SEL_IN
:
if
(
sk
->
type
==
SOCK_SEQPACKET
&&
sk
->
state
==
TCP_CLOSE
)
if
((
sk
->
type
==
SOCK_SEQPACKET
||
sk
->
type
==
SOCK_NCP
)
&&
sk
->
state
==
TCP_CLOSE
)
{
/* Connection closed: Wake up */
return
(
1
);
...
...
net/inet/ipx.c
View file @
74beaae0
This diff is collapsed.
Click to expand it.
net/inet/ncp.h
0 → 100644
View file @
74beaae0
/*
*
* Kernel support for NCP
*
* Mark Evans 1994
*
*/
#ifndef _NCP_H
#define _NCP_H
#include <linux/ncp.h>
struct
ncp_info
{
unsigned
short
conn
;
/* connection number */
unsigned
char
seq
;
/* sequence number */
ipx_socket
*
ncp
;
/* ncp socket */
ipx_socket
*
watchdog
;
/* watchdog socket */
ipx_socket
*
mail
;
/* mail socket */
};
#define NCP_TIMEOUT (3*HZ)
#define MAX_TIMEOUT 15
#endif
/* _NCP_H */
net/inet/sock.h
View file @
74beaae0
...
...
@@ -41,6 +41,7 @@
#endif
#ifdef CONFIG_IPX
#include "ipx.h"
#include "ncp.h"
#endif
#define SOCK_ARRAY_SIZE 64
...
...
@@ -137,6 +138,7 @@ struct sock {
#ifdef CONFIG_IPX
ipx_address
ipx_source_addr
,
ipx_dest_addr
;
unsigned
short
ipx_type
;
struct
ncp_info
ncp
;
#endif
#ifdef CONFIG_AX25
/* Really we want to add a per protocol private area */
...
...
net/socket.c
View file @
74beaae0
...
...
@@ -592,7 +592,8 @@ static int sock_socket(int family, int type, int protocol)
if
((
type
!=
SOCK_STREAM
&&
type
!=
SOCK_DGRAM
&&
type
!=
SOCK_SEQPACKET
&&
type
!=
SOCK_RAW
&&
type
!=
SOCK_PACKET
)
||
protocol
<
0
)
type
!=
SOCK_PACKET
&&
type
!=
SOCK_NCP
)
||
protocol
<
0
)
return
(
-
EINVAL
);
/*
...
...
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