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
7ecc59c1
Commit
7ecc59c1
authored
Oct 06, 2009
by
David S. Miller
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
parents
bcdce719
1cec9727
Changes
36
Hide whitespace changes
Inline
Side-by-side
Showing
36 changed files
with
454 additions
and
188 deletions
+454
-188
Documentation/isdn/INTERFACE.CAPI
Documentation/isdn/INTERFACE.CAPI
+67
-16
Documentation/networking/pktgen.txt
Documentation/networking/pktgen.txt
+8
-0
drivers/connector/cn_proc.c
drivers/connector/cn_proc.c
+2
-1
drivers/isdn/capi/capi.c
drivers/isdn/capi/capi.c
+1
-1
drivers/isdn/capi/capidrv.c
drivers/isdn/capi/capidrv.c
+14
-13
drivers/isdn/gigaset/asyncdata.c
drivers/isdn/gigaset/asyncdata.c
+18
-10
drivers/isdn/gigaset/bas-gigaset.c
drivers/isdn/gigaset/bas-gigaset.c
+52
-35
drivers/isdn/gigaset/common.c
drivers/isdn/gigaset/common.c
+111
-23
drivers/isdn/gigaset/ev-layer.c
drivers/isdn/gigaset/ev-layer.c
+20
-10
drivers/isdn/gigaset/i4l.c
drivers/isdn/gigaset/i4l.c
+23
-0
drivers/isdn/gigaset/interface.c
drivers/isdn/gigaset/interface.c
+9
-0
drivers/isdn/gigaset/isocdata.c
drivers/isdn/gigaset/isocdata.c
+17
-13
drivers/net/benet/be_cmds.c
drivers/net/benet/be_cmds.c
+0
-1
drivers/net/benet/be_cmds.h
drivers/net/benet/be_cmds.h
+1
-1
drivers/net/benet/be_ethtool.c
drivers/net/benet/be_ethtool.c
+1
-1
drivers/net/benet/be_main.c
drivers/net/benet/be_main.c
+3
-3
drivers/net/e1000e/82571.c
drivers/net/e1000e/82571.c
+2
-2
drivers/net/ixgbe/ixgbe_82599.c
drivers/net/ixgbe/ixgbe_82599.c
+2
-0
drivers/net/ixgbe/ixgbe_main.c
drivers/net/ixgbe/ixgbe_main.c
+4
-0
drivers/net/ixgbe/ixgbe_type.h
drivers/net/ixgbe/ixgbe_type.h
+2
-0
drivers/net/pcmcia/pcnet_cs.c
drivers/net/pcmcia/pcnet_cs.c
+5
-5
drivers/net/qlge/qlge.h
drivers/net/qlge/qlge.h
+4
-4
drivers/net/qlge/qlge_ethtool.c
drivers/net/qlge/qlge_ethtool.c
+0
-2
drivers/net/qlge/qlge_main.c
drivers/net/qlge/qlge_main.c
+5
-13
drivers/net/qlge/qlge_mpi.c
drivers/net/qlge/qlge_mpi.c
+8
-4
drivers/serial/serial_cs.c
drivers/serial/serial_cs.c
+6
-6
firmware/Makefile
firmware/Makefile
+5
-2
firmware/WHENCE
firmware/WHENCE
+5
-0
firmware/cis/COMpad2.cis.ihex
firmware/cis/COMpad2.cis.ihex
+11
-0
firmware/cis/COMpad4.cis.ihex
firmware/cis/COMpad4.cis.ihex
+9
-0
firmware/cis/DP83903.cis.ihex
firmware/cis/DP83903.cis.ihex
+14
-0
firmware/cis/NE2K.cis.ihex
firmware/cis/NE2K.cis.ihex
+8
-0
firmware/cis/tamarack.cis.ihex
firmware/cis/tamarack.cis.ihex
+10
-0
include/linux/socket.h
include/linux/socket.h
+3
-18
net/core/net-sysfs.c
net/core/net-sysfs.c
+2
-2
net/core/pktgen.c
net/core/pktgen.c
+2
-2
No files found.
Documentation/isdn/INTERFACE.CAPI
View file @
7ecc59c1
...
@@ -60,10 +60,9 @@ open() operation on regular files or character devices.
...
@@ -60,10 +60,9 @@ open() operation on regular files or character devices.
After a successful return from register_appl(), CAPI messages from the
After a successful return from register_appl(), CAPI messages from the
application may be passed to the driver for the device via calls to the
application may be passed to the driver for the device via calls to the
send_message() callback function. The CAPI message to send is stored in the
send_message() callback function. Conversely, the driver may call Kernel
data portion of an skb. Conversely, the driver may call Kernel CAPI's
CAPI's capi_ctr_handle_message() function to pass a received CAPI message to
capi_ctr_handle_message() function to pass a received CAPI message to Kernel
Kernel CAPI for forwarding to an application, specifying its ApplID.
CAPI for forwarding to an application, specifying its ApplID.
Deregistration requests (CAPI operation CAPI_RELEASE) from applications are
Deregistration requests (CAPI operation CAPI_RELEASE) from applications are
forwarded as calls to the release_appl() callback function, passing the same
forwarded as calls to the release_appl() callback function, passing the same
...
@@ -142,6 +141,7 @@ u16 (*send_message)(struct capi_ctr *ctrlr, struct sk_buff *skb)
...
@@ -142,6 +141,7 @@ u16 (*send_message)(struct capi_ctr *ctrlr, struct sk_buff *skb)
to accepting or queueing the message. Errors occurring during the
to accepting or queueing the message. Errors occurring during the
actual processing of the message should be signaled with an
actual processing of the message should be signaled with an
appropriate reply message.
appropriate reply message.
May be called in process or interrupt context.
Calls to this function are not serialized by Kernel CAPI, ie. it must
Calls to this function are not serialized by Kernel CAPI, ie. it must
be prepared to be re-entered.
be prepared to be re-entered.
...
@@ -154,7 +154,8 @@ read_proc_t *ctr_read_proc
...
@@ -154,7 +154,8 @@ read_proc_t *ctr_read_proc
system entry, /proc/capi/controllers/<n>; will be called with a
system entry, /proc/capi/controllers/<n>; will be called with a
pointer to the device's capi_ctr structure as the last (data) argument
pointer to the device's capi_ctr structure as the last (data) argument
Note: Callback functions are never called in interrupt context.
Note: Callback functions except send_message() are never called in interrupt
context.
- to be filled in before calling capi_ctr_ready():
- to be filled in before calling capi_ctr_ready():
...
@@ -171,14 +172,40 @@ u8 serial[CAPI_SERIAL_LEN]
...
@@ -171,14 +172,40 @@ u8 serial[CAPI_SERIAL_LEN]
value to return for CAPI_GET_SERIAL
value to return for CAPI_GET_SERIAL
4.3 The _cmsg Structure
4.3 SKBs
CAPI messages are passed between Kernel CAPI and the driver via send_message()
and capi_ctr_handle_message(), stored in the data portion of a socket buffer
(skb). Each skb contains a single CAPI message coded according to the CAPI 2.0
standard.
For the data transfer messages, DATA_B3_REQ and DATA_B3_IND, the actual
payload data immediately follows the CAPI message itself within the same skb.
The Data and Data64 parameters are not used for processing. The Data64
parameter may be omitted by setting the length field of the CAPI message to 22
instead of 30.
4.4 The _cmsg Structure
(declared in <linux/isdn/capiutil.h>)
(declared in <linux/isdn/capiutil.h>)
The _cmsg structure stores the contents of a CAPI 2.0 message in an easily
The _cmsg structure stores the contents of a CAPI 2.0 message in an easily
accessible form. It contains members for all possible CAPI 2.0 parameters, of
accessible form. It contains members for all possible CAPI 2.0 parameters,
which only those appearing in the message type currently being processed are
including subparameters of the Additional Info and B Protocol structured
actually used. Unused members should be set to zero.
parameters, with the following exceptions:
* second Calling party number (CONNECT_IND)
* Data64 (DATA_B3_REQ and DATA_B3_IND)
* Sending complete (subparameter of Additional Info, CONNECT_REQ and INFO_REQ)
* Global Configuration (subparameter of B Protocol, CONNECT_REQ, CONNECT_RESP
and SELECT_B_PROTOCOL_REQ)
Only those parameters appearing in the message type currently being processed
are actually used. Unused members should be set to zero.
Members are named after the CAPI 2.0 standard names of the parameters they
Members are named after the CAPI 2.0 standard names of the parameters they
represent. See <linux/isdn/capiutil.h> for the exact spelling. Member data
represent. See <linux/isdn/capiutil.h> for the exact spelling. Member data
...
@@ -190,18 +217,19 @@ u16 for CAPI parameters of type 'word'
...
@@ -190,18 +217,19 @@ u16 for CAPI parameters of type 'word'
u32 for CAPI parameters of type 'dword'
u32 for CAPI parameters of type 'dword'
_cstruct for CAPI parameters of type 'struct' not containing any
_cstruct for CAPI parameters of type 'struct'
variably-sized (struct) subparameters (eg. 'Called Party Number')
The member is a pointer to a buffer containing the parameter in
The member is a pointer to a buffer containing the parameter in
CAPI encoding (length + content). It may also be NULL, which will
CAPI encoding (length + content). It may also be NULL, which will
be taken to represent an empty (zero length) parameter.
be taken to represent an empty (zero length) parameter.
Subparameters are stored in encoded form within the content part.
_cmstruct
for CAPI parameters of type 'struct' containing
'struct'
_cmstruct
alternative representation for CAPI parameters of type
'struct'
subparameters ('Additional Info' and 'B Protocol'
)
(used only for the 'Additional Info' and 'B Protocol' parameters
)
The representation is a single byte containing one of the values:
The representation is a single byte containing one of the values:
CAPI_DEFAULT: the parameter is empty
CAPI_DEFAULT: The parameter is empty/absent.
CAPI_COMPOSE: the values of the subparameters are stored
CAPI_COMPOSE: The parameter is present.
individually in the corresponding _cmsg structure members
Subparameter values are stored individually in the corresponding
_cmsg structure members.
Functions capi_cmsg2message() and capi_message2cmsg() are provided to convert
Functions capi_cmsg2message() and capi_message2cmsg() are provided to convert
messages between their transport encoding described in the CAPI 2.0 standard
messages between their transport encoding described in the CAPI 2.0 standard
...
@@ -297,3 +325,26 @@ char *capi_cmd2str(u8 Command, u8 Subcommand)
...
@@ -297,3 +325,26 @@ char *capi_cmd2str(u8 Command, u8 Subcommand)
be NULL if the command/subcommand is not one of those defined in the
be NULL if the command/subcommand is not one of those defined in the
CAPI 2.0 standard.
CAPI 2.0 standard.
7. Debugging
The module kernelcapi has a module parameter showcapimsgs controlling some
debugging output produced by the module. It can only be set when the module is
loaded, via a parameter "showcapimsgs=<n>" to the modprobe command, either on
the command line or in the configuration file.
If the lowest bit of showcapimsgs is set, kernelcapi logs controller and
application up and down events.
In addition, every registered CAPI controller has an associated traceflag
parameter controlling how CAPI messages sent from and to tha controller are
logged. The traceflag parameter is initialized with the value of the
showcapimsgs parameter when the controller is registered, but can later be
changed via the MANUFACTURER_REQ command KCAPI_CMD_TRACE.
If the value of traceflag is non-zero, CAPI messages are logged.
DATA_B3 messages are only logged if the value of traceflag is > 2.
If the lowest bit of traceflag is set, only the command/subcommand and message
length are logged. Otherwise, kernelcapi logs a readable representation of
the entire message.
Documentation/networking/pktgen.txt
View file @
7ecc59c1
...
@@ -90,6 +90,11 @@ Examples:
...
@@ -90,6 +90,11 @@ Examples:
pgset "dstmac 00:00:00:00:00:00" sets MAC destination address
pgset "dstmac 00:00:00:00:00:00" sets MAC destination address
pgset "srcmac 00:00:00:00:00:00" sets MAC source address
pgset "srcmac 00:00:00:00:00:00" sets MAC source address
pgset "queue_map_min 0" Sets the min value of tx queue interval
pgset "queue_map_max 7" Sets the max value of tx queue interval, for multiqueue devices
To select queue 1 of a given device,
use queue_map_min=1 and queue_map_max=1
pgset "src_mac_count 1" Sets the number of MACs we'll range through.
pgset "src_mac_count 1" Sets the number of MACs we'll range through.
The 'minimum' MAC is what you set with srcmac.
The 'minimum' MAC is what you set with srcmac.
...
@@ -101,6 +106,9 @@ Examples:
...
@@ -101,6 +106,9 @@ Examples:
IPDST_RND, UDPSRC_RND,
IPDST_RND, UDPSRC_RND,
UDPDST_RND, MACSRC_RND, MACDST_RND
UDPDST_RND, MACSRC_RND, MACDST_RND
MPLS_RND, VID_RND, SVID_RND
MPLS_RND, VID_RND, SVID_RND
QUEUE_MAP_RND # queue map random
QUEUE_MAP_CPU # queue map mirrors smp_processor_id()
pgset "udp_src_min 9" set UDP source port min, If < udp_src_max, then
pgset "udp_src_min 9" set UDP source port min, If < udp_src_max, then
cycle through the port range.
cycle through the port range.
...
...
drivers/connector/cn_proc.c
View file @
7ecc59c1
...
@@ -227,7 +227,8 @@ static void cn_proc_ack(int err, int rcvd_seq, int rcvd_ack)
...
@@ -227,7 +227,8 @@ static void cn_proc_ack(int err, int rcvd_seq, int rcvd_ack)
* cn_proc_mcast_ctl
* cn_proc_mcast_ctl
* @data: message sent from userspace via the connector
* @data: message sent from userspace via the connector
*/
*/
static
void
cn_proc_mcast_ctl
(
struct
cn_msg
*
msg
)
static
void
cn_proc_mcast_ctl
(
struct
cn_msg
*
msg
,
struct
netlink_skb_parms
*
nsp
)
{
{
enum
proc_cn_mcast_op
*
mc_op
=
NULL
;
enum
proc_cn_mcast_op
*
mc_op
=
NULL
;
int
err
=
0
;
int
err
=
0
;
...
...
drivers/isdn/capi/capi.c
View file @
7ecc59c1
...
@@ -603,7 +603,7 @@ static void capi_recv_message(struct capi20_appl *ap, struct sk_buff *skb)
...
@@ -603,7 +603,7 @@ static void capi_recv_message(struct capi20_appl *ap, struct sk_buff *skb)
if
(
CAPIMSG_CMD
(
skb
->
data
)
==
CAPI_CONNECT_B3_CONF
)
{
if
(
CAPIMSG_CMD
(
skb
->
data
)
==
CAPI_CONNECT_B3_CONF
)
{
u16
info
=
CAPIMSG_U16
(
skb
->
data
,
12
);
// Info field
u16
info
=
CAPIMSG_U16
(
skb
->
data
,
12
);
// Info field
if
(
info
==
0
)
{
if
(
(
info
&
0xff00
)
==
0
)
{
mutex_lock
(
&
cdev
->
ncci_list_mtx
);
mutex_lock
(
&
cdev
->
ncci_list_mtx
);
capincci_alloc
(
cdev
,
CAPIMSG_NCCI
(
skb
->
data
));
capincci_alloc
(
cdev
,
CAPIMSG_NCCI
(
skb
->
data
));
mutex_unlock
(
&
cdev
->
ncci_list_mtx
);
mutex_unlock
(
&
cdev
->
ncci_list_mtx
);
...
...
drivers/isdn/capi/capidrv.c
View file @
7ecc59c1
...
@@ -40,7 +40,7 @@ static int debugmode = 0;
...
@@ -40,7 +40,7 @@ static int debugmode = 0;
MODULE_DESCRIPTION
(
"CAPI4Linux: Interface to ISDN4Linux"
);
MODULE_DESCRIPTION
(
"CAPI4Linux: Interface to ISDN4Linux"
);
MODULE_AUTHOR
(
"Carsten Paeth"
);
MODULE_AUTHOR
(
"Carsten Paeth"
);
MODULE_LICENSE
(
"GPL"
);
MODULE_LICENSE
(
"GPL"
);
module_param
(
debugmode
,
uint
,
0
);
module_param
(
debugmode
,
uint
,
S_IRUGO
|
S_IWUSR
);
/* -------- type definitions ----------------------------------------- */
/* -------- type definitions ----------------------------------------- */
...
@@ -671,8 +671,8 @@ static void n0(capidrv_contr * card, capidrv_ncci * ncci)
...
@@ -671,8 +671,8 @@ static void n0(capidrv_contr * card, capidrv_ncci * ncci)
NULL
,
/* Useruserdata */
/* $$$$ */
NULL
,
/* Useruserdata */
/* $$$$ */
NULL
/* Facilitydataarray */
NULL
/* Facilitydataarray */
);
);
send_message
(
card
,
&
cmsg
);
plci_change_state
(
card
,
ncci
->
plcip
,
EV_PLCI_DISCONNECT_REQ
);
plci_change_state
(
card
,
ncci
->
plcip
,
EV_PLCI_DISCONNECT_REQ
);
send_message
(
card
,
&
cmsg
);
cmd
.
command
=
ISDN_STAT_BHUP
;
cmd
.
command
=
ISDN_STAT_BHUP
;
cmd
.
driver
=
card
->
myid
;
cmd
.
driver
=
card
->
myid
;
...
@@ -924,8 +924,8 @@ static void handle_incoming_call(capidrv_contr * card, _cmsg * cmsg)
...
@@ -924,8 +924,8 @@ static void handle_incoming_call(capidrv_contr * card, _cmsg * cmsg)
*/
*/
capi_cmsg_answer
(
cmsg
);
capi_cmsg_answer
(
cmsg
);
cmsg
->
Reject
=
1
;
/* ignore */
cmsg
->
Reject
=
1
;
/* ignore */
send_message
(
card
,
cmsg
);
plci_change_state
(
card
,
plcip
,
EV_PLCI_CONNECT_REJECT
);
plci_change_state
(
card
,
plcip
,
EV_PLCI_CONNECT_REJECT
);
send_message
(
card
,
cmsg
);
printk
(
KERN_INFO
"capidrv-%d: incoming call %s,%d,%d,%s ignored
\n
"
,
printk
(
KERN_INFO
"capidrv-%d: incoming call %s,%d,%d,%s ignored
\n
"
,
card
->
contrnr
,
card
->
contrnr
,
cmd
.
parm
.
setup
.
phone
,
cmd
.
parm
.
setup
.
phone
,
...
@@ -974,8 +974,8 @@ static void handle_incoming_call(capidrv_contr * card, _cmsg * cmsg)
...
@@ -974,8 +974,8 @@ static void handle_incoming_call(capidrv_contr * card, _cmsg * cmsg)
case
2
:
/* Call will be rejected. */
case
2
:
/* Call will be rejected. */
capi_cmsg_answer
(
cmsg
);
capi_cmsg_answer
(
cmsg
);
cmsg
->
Reject
=
2
;
/* reject call, normal call clearing */
cmsg
->
Reject
=
2
;
/* reject call, normal call clearing */
send_message
(
card
,
cmsg
);
plci_change_state
(
card
,
plcip
,
EV_PLCI_CONNECT_REJECT
);
plci_change_state
(
card
,
plcip
,
EV_PLCI_CONNECT_REJECT
);
send_message
(
card
,
cmsg
);
break
;
break
;
default:
default:
...
@@ -983,8 +983,8 @@ static void handle_incoming_call(capidrv_contr * card, _cmsg * cmsg)
...
@@ -983,8 +983,8 @@ static void handle_incoming_call(capidrv_contr * card, _cmsg * cmsg)
capi_cmsg_answer
(
cmsg
);
capi_cmsg_answer
(
cmsg
);
cmsg
->
Reject
=
8
;
/* reject call,
cmsg
->
Reject
=
8
;
/* reject call,
destination out of order */
destination out of order */
send_message
(
card
,
cmsg
);
plci_change_state
(
card
,
plcip
,
EV_PLCI_CONNECT_REJECT
);
plci_change_state
(
card
,
plcip
,
EV_PLCI_CONNECT_REJECT
);
send_message
(
card
,
cmsg
);
break
;
break
;
}
}
return
;
return
;
...
@@ -1020,8 +1020,8 @@ static void handle_plci(_cmsg * cmsg)
...
@@ -1020,8 +1020,8 @@ static void handle_plci(_cmsg * cmsg)
card
->
bchans
[
plcip
->
chan
].
disconnecting
=
1
;
card
->
bchans
[
plcip
->
chan
].
disconnecting
=
1
;
plci_change_state
(
card
,
plcip
,
EV_PLCI_DISCONNECT_IND
);
plci_change_state
(
card
,
plcip
,
EV_PLCI_DISCONNECT_IND
);
capi_cmsg_answer
(
cmsg
);
capi_cmsg_answer
(
cmsg
);
send_message
(
card
,
cmsg
);
plci_change_state
(
card
,
plcip
,
EV_PLCI_DISCONNECT_RESP
);
plci_change_state
(
card
,
plcip
,
EV_PLCI_DISCONNECT_RESP
);
send_message
(
card
,
cmsg
);
break
;
break
;
case
CAPI_DISCONNECT_CONF
:
/* plci */
case
CAPI_DISCONNECT_CONF
:
/* plci */
...
@@ -1078,8 +1078,8 @@ static void handle_plci(_cmsg * cmsg)
...
@@ -1078,8 +1078,8 @@ static void handle_plci(_cmsg * cmsg)
if
(
card
->
bchans
[
plcip
->
chan
].
incoming
)
{
if
(
card
->
bchans
[
plcip
->
chan
].
incoming
)
{
capi_cmsg_answer
(
cmsg
);
capi_cmsg_answer
(
cmsg
);
send_message
(
card
,
cmsg
);
plci_change_state
(
card
,
plcip
,
EV_PLCI_CONNECT_ACTIVE_IND
);
plci_change_state
(
card
,
plcip
,
EV_PLCI_CONNECT_ACTIVE_IND
);
send_message
(
card
,
cmsg
);
}
else
{
}
else
{
capidrv_ncci
*
nccip
;
capidrv_ncci
*
nccip
;
capi_cmsg_answer
(
cmsg
);
capi_cmsg_answer
(
cmsg
);
...
@@ -1098,13 +1098,14 @@ static void handle_plci(_cmsg * cmsg)
...
@@ -1098,13 +1098,14 @@ static void handle_plci(_cmsg * cmsg)
NULL
/* NCPI */
NULL
/* NCPI */
);
);
nccip
->
msgid
=
cmsg
->
Messagenumber
;
nccip
->
msgid
=
cmsg
->
Messagenumber
;
plci_change_state
(
card
,
plcip
,
EV_PLCI_CONNECT_ACTIVE_IND
);
ncci_change_state
(
card
,
nccip
,
EV_NCCI_CONNECT_B3_REQ
);
send_message
(
card
,
cmsg
);
send_message
(
card
,
cmsg
);
cmd
.
command
=
ISDN_STAT_DCONN
;
cmd
.
command
=
ISDN_STAT_DCONN
;
cmd
.
driver
=
card
->
myid
;
cmd
.
driver
=
card
->
myid
;
cmd
.
arg
=
plcip
->
chan
;
cmd
.
arg
=
plcip
->
chan
;
card
->
interface
.
statcallb
(
&
cmd
);
card
->
interface
.
statcallb
(
&
cmd
);
plci_change_state
(
card
,
plcip
,
EV_PLCI_CONNECT_ACTIVE_IND
);
ncci_change_state
(
card
,
nccip
,
EV_NCCI_CONNECT_B3_REQ
);
}
}
break
;
break
;
...
@@ -1193,8 +1194,8 @@ static void handle_ncci(_cmsg * cmsg)
...
@@ -1193,8 +1194,8 @@ static void handle_ncci(_cmsg * cmsg)
goto
notfound
;
goto
notfound
;
capi_cmsg_answer
(
cmsg
);
capi_cmsg_answer
(
cmsg
);
send_message
(
card
,
cmsg
);
ncci_change_state
(
card
,
nccip
,
EV_NCCI_CONNECT_B3_ACTIVE_IND
);
ncci_change_state
(
card
,
nccip
,
EV_NCCI_CONNECT_B3_ACTIVE_IND
);
send_message
(
card
,
cmsg
);
cmd
.
command
=
ISDN_STAT_BCONN
;
cmd
.
command
=
ISDN_STAT_BCONN
;
cmd
.
driver
=
card
->
myid
;
cmd
.
driver
=
card
->
myid
;
...
@@ -1222,8 +1223,8 @@ static void handle_ncci(_cmsg * cmsg)
...
@@ -1222,8 +1223,8 @@ static void handle_ncci(_cmsg * cmsg)
0
,
/* Reject */
0
,
/* Reject */
NULL
/* NCPI */
NULL
/* NCPI */
);
);
send_message
(
card
,
cmsg
);
ncci_change_state
(
card
,
nccip
,
EV_NCCI_CONNECT_B3_RESP
);
ncci_change_state
(
card
,
nccip
,
EV_NCCI_CONNECT_B3_RESP
);
send_message
(
card
,
cmsg
);
break
;
break
;
}
}
printk
(
KERN_ERR
"capidrv-%d: no mem for ncci, sorry
\n
"
,
card
->
contrnr
);
printk
(
KERN_ERR
"capidrv-%d: no mem for ncci, sorry
\n
"
,
card
->
contrnr
);
...
@@ -1299,8 +1300,8 @@ static void handle_ncci(_cmsg * cmsg)
...
@@ -1299,8 +1300,8 @@ static void handle_ncci(_cmsg * cmsg)
card
->
bchans
[
nccip
->
chan
].
disconnecting
=
1
;
card
->
bchans
[
nccip
->
chan
].
disconnecting
=
1
;
ncci_change_state
(
card
,
nccip
,
EV_NCCI_DISCONNECT_B3_IND
);
ncci_change_state
(
card
,
nccip
,
EV_NCCI_DISCONNECT_B3_IND
);
capi_cmsg_answer
(
cmsg
);
capi_cmsg_answer
(
cmsg
);
send_message
(
card
,
cmsg
);
ncci_change_state
(
card
,
nccip
,
EV_NCCI_DISCONNECT_B3_RESP
);
ncci_change_state
(
card
,
nccip
,
EV_NCCI_DISCONNECT_B3_RESP
);
send_message
(
card
,
cmsg
);
break
;
break
;
case
CAPI_DISCONNECT_B3_CONF
:
/* ncci */
case
CAPI_DISCONNECT_B3_CONF
:
/* ncci */
...
@@ -2014,8 +2015,8 @@ static void send_listen(capidrv_contr *card)
...
@@ -2014,8 +2015,8 @@ static void send_listen(capidrv_contr *card)
card
->
cipmask
,
card
->
cipmask
,
card
->
cipmask2
,
card
->
cipmask2
,
NULL
,
NULL
);
NULL
,
NULL
);
send_message
(
card
,
&
cmdcmsg
);
listen_change_state
(
card
,
EV_LISTEN_REQ
);
listen_change_state
(
card
,
EV_LISTEN_REQ
);
send_message
(
card
,
&
cmdcmsg
);
}
}
static
void
listentimerfunc
(
unsigned
long
x
)
static
void
listentimerfunc
(
unsigned
long
x
)
...
...
drivers/isdn/gigaset/asyncdata.c
View file @
7ecc59c1
...
@@ -334,7 +334,14 @@ static inline int iraw_loop(unsigned char c, unsigned char *src, int numbytes,
...
@@ -334,7 +334,14 @@ static inline int iraw_loop(unsigned char c, unsigned char *src, int numbytes,
return
startbytes
-
numbytes
;
return
startbytes
-
numbytes
;
}
}
/* process a block of data received from the device
/**
* gigaset_m10x_input() - process a block of data received from the device
* @inbuf: received data and device descriptor structure.
*
* Called by hardware module {ser,usb}_gigaset with a block of received
* bytes. Separates the bytes received over the serial data channel into
* user data and command replies (locked/unlocked) according to the
* current state of the interface.
*/
*/
void
gigaset_m10x_input
(
struct
inbuf_t
*
inbuf
)
void
gigaset_m10x_input
(
struct
inbuf_t
*
inbuf
)
{
{
...
@@ -543,16 +550,17 @@ static struct sk_buff *iraw_encode(struct sk_buff *skb, int head, int tail)
...
@@ -543,16 +550,17 @@ static struct sk_buff *iraw_encode(struct sk_buff *skb, int head, int tail)
return
iraw_skb
;
return
iraw_skb
;
}
}
/* gigaset_send_skb
/**
* called by common.c to queue an skb for sending
* gigaset_m10x_send_skb() - queue an skb for sending
* and start transmission if necessary
* @bcs: B channel descriptor structure.
* parameters:
* @skb: data to send.
* B Channel control structure
*
* skb
* Called by i4l.c to encode and queue an skb for sending, and start
* transmission if necessary.
*
* Return value:
* Return value:
* number of bytes accepted for sending
* number of bytes accepted for sending (skb->len) if ok,
* (skb->len if ok, 0 if out of buffer space)
* error code < 0 (eg. -ENOMEM) on error
* or error code (< 0, eg. -EINVAL)
*/
*/
int
gigaset_m10x_send_skb
(
struct
bc_state
*
bcs
,
struct
sk_buff
*
skb
)
int
gigaset_m10x_send_skb
(
struct
bc_state
*
bcs
,
struct
sk_buff
*
skb
)
{
{
...
...
drivers/isdn/gigaset/bas-gigaset.c
View file @
7ecc59c1
...
@@ -134,6 +134,7 @@ struct bas_cardstate {
...
@@ -134,6 +134,7 @@ struct bas_cardstate {
#define BS_ATRDPEND 0x040
/* urb_cmd_in in use */
#define BS_ATRDPEND 0x040
/* urb_cmd_in in use */
#define BS_ATWRPEND 0x080
/* urb_cmd_out in use */
#define BS_ATWRPEND 0x080
/* urb_cmd_out in use */
#define BS_SUSPEND 0x100
/* USB port suspended */
#define BS_SUSPEND 0x100
/* USB port suspended */
#define BS_RESETTING 0x200
/* waiting for HD_RESET_INTERRUPT_PIPE_ACK */
static
struct
gigaset_driver
*
driver
=
NULL
;
static
struct
gigaset_driver
*
driver
=
NULL
;
...
@@ -319,6 +320,21 @@ static int gigaset_set_line_ctrl(struct cardstate *cs, unsigned cflag)
...
@@ -319,6 +320,21 @@ static int gigaset_set_line_ctrl(struct cardstate *cs, unsigned cflag)
return
-
EINVAL
;
return
-
EINVAL
;
}
}
/* set/clear bits in base connection state, return previous state
*/
static
inline
int
update_basstate
(
struct
bas_cardstate
*
ucs
,
int
set
,
int
clear
)
{
unsigned
long
flags
;
int
state
;
spin_lock_irqsave
(
&
ucs
->
lock
,
flags
);
state
=
ucs
->
basstate
;
ucs
->
basstate
=
(
state
&
~
clear
)
|
set
;
spin_unlock_irqrestore
(
&
ucs
->
lock
,
flags
);
return
state
;
}
/* error_hangup
/* error_hangup
* hang up any existing connection because of an unrecoverable error
* hang up any existing connection because of an unrecoverable error
* This function may be called from any context and takes care of scheduling
* This function may be called from any context and takes care of scheduling
...
@@ -350,12 +366,9 @@ static inline void error_hangup(struct bc_state *bcs)
...
@@ -350,12 +366,9 @@ static inline void error_hangup(struct bc_state *bcs)
*/
*/
static
inline
void
error_reset
(
struct
cardstate
*
cs
)
static
inline
void
error_reset
(
struct
cardstate
*
cs
)
{
{
/* close AT command channel to recover (ignore errors) */
/* reset interrupt pipe to recover (ignore errors) */
req_submit
(
cs
->
bcs
,
HD_CLOSE_ATCHANNEL
,
0
,
BAS_TIMEOUT
);
update_basstate
(
cs
->
hw
.
bas
,
BS_RESETTING
,
0
);
req_submit
(
cs
->
bcs
,
HD_RESET_INTERRUPT_PIPE
,
0
,
BAS_TIMEOUT
);
//FIXME try to recover without bothering the user
dev_err
(
cs
->
dev
,
"unrecoverable error - please disconnect Gigaset base to reset
\n
"
);
}
}
/* check_pending
/* check_pending
...
@@ -398,8 +411,13 @@ static void check_pending(struct bas_cardstate *ucs)
...
@@ -398,8 +411,13 @@ static void check_pending(struct bas_cardstate *ucs)
case
HD_DEVICE_INIT_ACK
:
/* no reply expected */
case
HD_DEVICE_INIT_ACK
:
/* no reply expected */
ucs
->
pending
=
0
;
ucs
->
pending
=
0
;
break
;
break
;
/* HD_READ_ATMESSAGE, HD_WRITE_ATMESSAGE, HD_RESET_INTERRUPTPIPE
case
HD_RESET_INTERRUPT_PIPE
:
* are handled separately and should never end up here
if
(
!
(
ucs
->
basstate
&
BS_RESETTING
))
ucs
->
pending
=
0
;
break
;
/*
* HD_READ_ATMESSAGE and HD_WRITE_ATMESSAGE are handled separately
* and should never end up here
*/
*/
default:
default:
dev_warn
(
&
ucs
->
interface
->
dev
,
dev_warn
(
&
ucs
->
interface
->
dev
,
...
@@ -449,21 +467,6 @@ static void cmd_in_timeout(unsigned long data)
...
@@ -449,21 +467,6 @@ static void cmd_in_timeout(unsigned long data)
error_reset
(
cs
);
error_reset
(
cs
);
}
}
/* set/clear bits in base connection state, return previous state
*/
inline
static
int
update_basstate
(
struct
bas_cardstate
*
ucs
,
int
set
,
int
clear
)
{
unsigned
long
flags
;
int
state
;
spin_lock_irqsave
(
&
ucs
->
lock
,
flags
);
state
=
ucs
->
basstate
;
ucs
->
basstate
=
(
state
&
~
clear
)
|
set
;
spin_unlock_irqrestore
(
&
ucs
->
lock
,
flags
);
return
state
;
}
/* read_ctrl_callback
/* read_ctrl_callback
* USB completion handler for control pipe input
* USB completion handler for control pipe input
* called by the USB subsystem in interrupt context
* called by the USB subsystem in interrupt context
...
@@ -762,7 +765,8 @@ static void read_int_callback(struct urb *urb)
...
@@ -762,7 +765,8 @@ static void read_int_callback(struct urb *urb)
break
;
break
;
case
HD_RESET_INTERRUPT_PIPE_ACK
:
case
HD_RESET_INTERRUPT_PIPE_ACK
:
gig_dbg
(
DEBUG_USBREQ
,
"HD_RESET_INTERRUPT_PIPE_ACK"
);
update_basstate
(
ucs
,
0
,
BS_RESETTING
);
dev_notice
(
cs
->
dev
,
"interrupt pipe reset
\n
"
);
break
;
break
;
case
HD_SUSPEND_END
:
case
HD_SUSPEND_END
:
...
@@ -1331,28 +1335,24 @@ static void read_iso_tasklet(unsigned long data)
...
@@ -1331,28 +1335,24 @@ static void read_iso_tasklet(unsigned long data)
rcvbuf
=
urb
->
transfer_buffer
;
rcvbuf
=
urb
->
transfer_buffer
;
totleft
=
urb
->
actual_length
;
totleft
=
urb
->
actual_length
;
for
(
frame
=
0
;
totleft
>
0
&&
frame
<
BAS_NUMFRAMES
;
frame
++
)
{
for
(
frame
=
0
;
totleft
>
0
&&
frame
<
BAS_NUMFRAMES
;
frame
++
)
{
if
(
unlikely
(
urb
->
iso_frame_desc
[
frame
].
status
))
{
numbytes
=
urb
->
iso_frame_desc
[
frame
].
actual_length
;
if
(
unlikely
(
urb
->
iso_frame_desc
[
frame
].
status
))
dev_warn
(
cs
->
dev
,
dev_warn
(
cs
->
dev
,
"isochronous read: frame %d: %s
\n
"
,
"isochronous read: frame %d
[%d]
: %s
\n
"
,
frame
,
frame
,
numbytes
,
get_usb_statmsg
(
get_usb_statmsg
(
urb
->
iso_frame_desc
[
frame
].
status
));
urb
->
iso_frame_desc
[
frame
].
status
));
break
;
if
(
unlikely
(
numbytes
>
BAS_MAXFRAME
))
}
numbytes
=
urb
->
iso_frame_desc
[
frame
].
actual_length
;
if
(
unlikely
(
numbytes
>
BAS_MAXFRAME
))
{
dev_warn
(
cs
->
dev
,
dev_warn
(
cs
->
dev
,
"isochronous read: frame %d: "
"isochronous read: frame %d: "
"numbytes (%d) > BAS_MAXFRAME
\n
"
,
"numbytes (%d) > BAS_MAXFRAME
\n
"
,
frame
,
numbytes
);
frame
,
numbytes
);
break
;
}
if
(
unlikely
(
numbytes
>
totleft
))
{
if
(
unlikely
(
numbytes
>
totleft
))
{
dev_warn
(
cs
->
dev
,
dev_warn
(
cs
->
dev
,
"isochronous read: frame %d: "
"isochronous read: frame %d: "
"numbytes (%d) > totleft (%d)
\n
"
,
"numbytes (%d) > totleft (%d)
\n
"
,
frame
,
numbytes
,
totleft
);
frame
,
numbytes
,
totleft
);
break
;
numbytes
=
totleft
;
}
}
offset
=
urb
->
iso_frame_desc
[
frame
].
offset
;
offset
=
urb
->
iso_frame_desc
[
frame
].
offset
;
if
(
unlikely
(
offset
+
numbytes
>
BAS_INBUFSIZE
))
{
if
(
unlikely
(
offset
+
numbytes
>
BAS_INBUFSIZE
))
{
...
@@ -1361,7 +1361,7 @@ static void read_iso_tasklet(unsigned long data)
...
@@ -1361,7 +1361,7 @@ static void read_iso_tasklet(unsigned long data)
"offset (%d) + numbytes (%d) "
"offset (%d) + numbytes (%d) "
"> BAS_INBUFSIZE
\n
"
,
"> BAS_INBUFSIZE
\n
"
,
frame
,
offset
,
numbytes
);
frame
,
offset
,
numbytes
);
break
;
numbytes
=
BAS_INBUFSIZE
-
offset
;
}
}
gigaset_isoc_receive
(
rcvbuf
+
offset
,
numbytes
,
bcs
);
gigaset_isoc_receive
(
rcvbuf
+
offset
,
numbytes
,
bcs
);
totleft
-=
numbytes
;
totleft
-=
numbytes
;
...
@@ -1433,6 +1433,7 @@ static void req_timeout(unsigned long data)
...
@@ -1433,6 +1433,7 @@ static void req_timeout(unsigned long data)
case
HD_CLOSE_ATCHANNEL
:
case
HD_CLOSE_ATCHANNEL
:
dev_err
(
bcs
->
cs
->
dev
,
"timeout closing AT channel
\n
"
);
dev_err
(
bcs
->
cs
->
dev
,
"timeout closing AT channel
\n
"
);
error_reset
(
bcs
->
cs
);
break
;
break
;
case
HD_CLOSE_B2CHANNEL
:
case
HD_CLOSE_B2CHANNEL
:
...
@@ -1442,6 +1443,13 @@ static void req_timeout(unsigned long data)
...
@@ -1442,6 +1443,13 @@ static void req_timeout(unsigned long data)
error_reset
(
bcs
->
cs
);
error_reset
(
bcs
->
cs
);
break
;
break
;
case
HD_RESET_INTERRUPT_PIPE
:
/* error recovery escalation */
dev_err
(
bcs
->
cs
->
dev
,
"reset interrupt pipe timeout, attempting USB reset
\n
"
);
usb_queue_reset_device
(
bcs
->
cs
->
hw
.
bas
->
interface
);
break
;
default:
default:
dev_warn
(
bcs
->
cs
->
dev
,
"request 0x%02x timed out, clearing
\n
"
,
dev_warn
(
bcs
->
cs
->
dev
,
"request 0x%02x timed out, clearing
\n
"
,
pending
);
pending
);
...
@@ -1934,6 +1942,15 @@ static int gigaset_write_cmd(struct cardstate *cs,
...
@@ -1934,6 +1942,15 @@ static int gigaset_write_cmd(struct cardstate *cs,
goto
notqueued
;
goto
notqueued
;
}
}
/* translate "+++" escape sequence sent as a single separate command
* into "close AT channel" command for error recovery
* The next command will reopen the AT channel automatically.
*/
if
(
len
==
3
&&
!
memcmp
(
buf
,
"+++"
,
3
))
{
rc
=
req_submit
(
cs
->
bcs
,
HD_CLOSE_ATCHANNEL
,
0
,
BAS_TIMEOUT
);
goto
notqueued
;
}
if
(
len
>
IF_WRITEBUF
)
if
(
len
>
IF_WRITEBUF
)
len
=
IF_WRITEBUF
;
len
=
IF_WRITEBUF
;
if
(
!
(
cb
=
kmalloc
(
sizeof
(
struct
cmdbuf_t
)
+
len
,
GFP_ATOMIC
)))
{
if
(
!
(
cb
=
kmalloc
(
sizeof
(
struct
cmdbuf_t
)
+
len
,
GFP_ATOMIC
)))
{
...
...
drivers/isdn/gigaset/common.c
View file @
7ecc59c1
...
@@ -22,6 +22,12 @@
...
@@ -22,6 +22,12 @@
#define DRIVER_AUTHOR "Hansjoerg Lipp <hjlipp@web.de>, Tilman Schmidt <tilman@imap.cc>, Stefan Eilers"
#define DRIVER_AUTHOR "Hansjoerg Lipp <hjlipp@web.de>, Tilman Schmidt <tilman@imap.cc>, Stefan Eilers"
#define DRIVER_DESC "Driver for Gigaset 307x"
#define DRIVER_DESC "Driver for Gigaset 307x"
#ifdef CONFIG_GIGASET_DEBUG
#define DRIVER_DESC_DEBUG " (debug build)"
#else
#define DRIVER_DESC_DEBUG ""
#endif
/* Module parameters */
/* Module parameters */
int
gigaset_debuglevel
=
DEBUG_DEFAULT
;
int
gigaset_debuglevel
=
DEBUG_DEFAULT
;
EXPORT_SYMBOL_GPL
(
gigaset_debuglevel
);
EXPORT_SYMBOL_GPL
(
gigaset_debuglevel
);
...
@@ -32,6 +38,17 @@ MODULE_PARM_DESC(debug, "debug level");
...
@@ -32,6 +38,17 @@ MODULE_PARM_DESC(debug, "debug level");
#define VALID_MINOR 0x01
#define VALID_MINOR 0x01
#define VALID_ID 0x02
#define VALID_ID 0x02
/**
* gigaset_dbg_buffer() - dump data in ASCII and hex for debugging
* @level: debugging level.
* @msg: message prefix.
* @len: number of bytes to dump.
* @buf: data to dump.
*
* If the current debugging level includes one of the bits set in @level,
* @len bytes starting at @buf are logged to dmesg at KERN_DEBUG prio,
* prefixed by the text @msg.
*/
void
gigaset_dbg_buffer
(
enum
debuglevel
level
,
const
unsigned
char
*
msg
,
void
gigaset_dbg_buffer
(
enum
debuglevel
level
,
const
unsigned
char
*
msg
,
size_t
len
,
const
unsigned
char
*
buf
)
size_t
len
,
const
unsigned
char
*
buf
)
{
{
...
@@ -274,6 +291,20 @@ static void clear_events(struct cardstate *cs)
...
@@ -274,6 +291,20 @@ static void clear_events(struct cardstate *cs)
spin_unlock_irqrestore
(
&
cs
->
ev_lock
,
flags
);
spin_unlock_irqrestore
(
&
cs
->
ev_lock
,
flags
);
}
}
/**
* gigaset_add_event() - add event to device event queue
* @cs: device descriptor structure.
* @at_state: connection state structure.
* @type: event type.
* @ptr: pointer parameter for event.
* @parameter: integer parameter for event.
* @arg: pointer parameter for event.
*
* Allocate an event queue entry from the device's event queue, and set it up
* with the parameters given.
*
* Return value: added event
*/
struct
event_t
*
gigaset_add_event
(
struct
cardstate
*
cs
,
struct
event_t
*
gigaset_add_event
(
struct
cardstate
*
cs
,
struct
at_state_t
*
at_state
,
int
type
,
struct
at_state_t
*
at_state
,
int
type
,
void
*
ptr
,
int
parameter
,
void
*
arg
)
void
*
ptr
,
int
parameter
,
void
*
arg
)
...
@@ -398,6 +429,15 @@ static void make_invalid(struct cardstate *cs, unsigned mask)
...
@@ -398,6 +429,15 @@ static void make_invalid(struct cardstate *cs, unsigned mask)
spin_unlock_irqrestore
(
&
drv
->
lock
,
flags
);
spin_unlock_irqrestore
(
&
drv
->
lock
,
flags
);
}
}
/**
* gigaset_freecs() - free all associated ressources of a device
* @cs: device descriptor structure.
*
* Stops all tasklets and timers, unregisters the device from all
* subsystems it was registered to, deallocates the device structure
* @cs and all structures referenced from it.
* Operations on the device should be stopped before calling this.
*/
void
gigaset_freecs
(
struct
cardstate
*
cs
)
void
gigaset_freecs
(
struct
cardstate
*
cs
)
{
{
int
i
;
int
i
;
...
@@ -506,7 +546,12 @@ static void gigaset_inbuf_init(struct inbuf_t *inbuf, struct bc_state *bcs,
...
@@ -506,7 +546,12 @@ static void gigaset_inbuf_init(struct inbuf_t *inbuf, struct bc_state *bcs,
inbuf
->
inputstate
=
inputstate
;
inbuf
->
inputstate
=
inputstate
;
}
}
/* append received bytes to inbuf */
/**
* gigaset_fill_inbuf() - append received data to input buffer
* @inbuf: buffer structure.
* @src: received data.
* @numbytes: number of bytes received.
*/
int
gigaset_fill_inbuf
(
struct
inbuf_t
*
inbuf
,
const
unsigned
char
*
src
,
int
gigaset_fill_inbuf
(
struct
inbuf_t
*
inbuf
,
const
unsigned
char
*
src
,
unsigned
numbytes
)
unsigned
numbytes
)
{
{
...
@@ -606,20 +651,22 @@ static struct bc_state *gigaset_initbcs(struct bc_state *bcs,
...
@@ -606,20 +651,22 @@ static struct bc_state *gigaset_initbcs(struct bc_state *bcs,
return
NULL
;
return
NULL
;
}
}
/* gigaset_initcs
/**
* gigaset_initcs() - initialize device structure
* @drv: hardware driver the device belongs to
* @channels: number of B channels supported by device
* @onechannel: !=0 if B channel data and AT commands share one
* communication channel (M10x),
* ==0 if B channels have separate communication channels (base)
* @ignoreframes: number of frames to ignore after setting up B channel
* @cidmode: !=0: start in CallID mode
* @modulename: name of driver module for LL registration
*
* Allocate and initialize cardstate structure for Gigaset driver
* Allocate and initialize cardstate structure for Gigaset driver
* Calls hardware dependent gigaset_initcshw() function
* Calls hardware dependent gigaset_initcshw() function
* Calls B channel initialization function gigaset_initbcs() for each B channel
* Calls B channel initialization function gigaset_initbcs() for each B channel
* parameters:
*
* drv hardware driver the device belongs to
* Return value:
* channels number of B channels supported by device
* onechannel !=0: B channel data and AT commands share one
* communication channel
* ==0: B channels have separate communication channels
* ignoreframes number of frames to ignore after setting up B channel
* cidmode !=0: start in CallID mode
* modulename name of driver module (used for I4L registration)
* return value:
* pointer to cardstate structure
* pointer to cardstate structure
*/
*/
struct
cardstate
*
gigaset_initcs
(
struct
gigaset_driver
*
drv
,
int
channels
,
struct
cardstate
*
gigaset_initcs
(
struct
gigaset_driver
*
drv
,
int
channels
,
...
@@ -837,6 +884,17 @@ static void cleanup_cs(struct cardstate *cs)
...
@@ -837,6 +884,17 @@ static void cleanup_cs(struct cardstate *cs)
}
}
/**
* gigaset_start() - start device operations
* @cs: device descriptor structure.
*
* Prepares the device for use by setting up communication parameters,
* scheduling an EV_START event to initiate device initialization, and
* waiting for completion of the initialization.
*
* Return value:
* 1 - success, 0 - error
*/
int
gigaset_start
(
struct
cardstate
*
cs
)
int
gigaset_start
(
struct
cardstate
*
cs
)
{
{
unsigned
long
flags
;
unsigned
long
flags
;
...
@@ -879,9 +937,15 @@ int gigaset_start(struct cardstate *cs)
...
@@ -879,9 +937,15 @@ int gigaset_start(struct cardstate *cs)
}
}
EXPORT_SYMBOL_GPL
(
gigaset_start
);
EXPORT_SYMBOL_GPL
(
gigaset_start
);
/* gigaset_shutdown
/**
* check if a device is associated to the cardstate structure and stop it
* gigaset_shutdown() - shut down device operations
* return value: 0 if ok, -1 if no device was associated
* @cs: device descriptor structure.
*
* Deactivates the device by scheduling an EV_SHUTDOWN event and
* waiting for completion of the shutdown.
*
* Return value:
* 0 - success, -1 - error (no device associated)
*/
*/
int
gigaset_shutdown
(
struct
cardstate
*
cs
)
int
gigaset_shutdown
(
struct
cardstate
*
cs
)
{
{
...
@@ -912,6 +976,13 @@ int gigaset_shutdown(struct cardstate *cs)
...
@@ -912,6 +976,13 @@ int gigaset_shutdown(struct cardstate *cs)
}
}
EXPORT_SYMBOL_GPL
(
gigaset_shutdown
);
EXPORT_SYMBOL_GPL
(
gigaset_shutdown
);
/**
* gigaset_stop() - stop device operations
* @cs: device descriptor structure.
*
* Stops operations on the device by scheduling an EV_STOP event and
* waiting for completion of the shutdown.
*/
void
gigaset_stop
(
struct
cardstate
*
cs
)
void
gigaset_stop
(
struct
cardstate
*
cs
)
{
{
mutex_lock
(
&
cs
->
mutex
);
mutex_lock
(
&
cs
->
mutex
);
...
@@ -1020,6 +1091,14 @@ struct cardstate *gigaset_get_cs_by_tty(struct tty_struct *tty)
...
@@ -1020,6 +1091,14 @@ struct cardstate *gigaset_get_cs_by_tty(struct tty_struct *tty)
return
gigaset_get_cs_by_minor
(
tty
->
index
+
tty
->
driver
->
minor_start
);
return
gigaset_get_cs_by_minor
(
tty
->
index
+
tty
->
driver
->
minor_start
);
}
}
/**
* gigaset_freedriver() - free all associated ressources of a driver
* @drv: driver descriptor structure.
*
* Unregisters the driver from the system and deallocates the driver
* structure @drv and all structures referenced from it.
* All devices should be shut down before calling this.
*/
void
gigaset_freedriver
(
struct
gigaset_driver
*
drv
)
void
gigaset_freedriver
(
struct
gigaset_driver
*
drv
)
{
{
unsigned
long
flags
;
unsigned
long
flags
;
...
@@ -1035,14 +1114,16 @@ void gigaset_freedriver(struct gigaset_driver *drv)
...
@@ -1035,14 +1114,16 @@ void gigaset_freedriver(struct gigaset_driver *drv)
}
}
EXPORT_SYMBOL_GPL
(
gigaset_freedriver
);
EXPORT_SYMBOL_GPL
(
gigaset_freedriver
);
/* gigaset_initdriver
/**
* gigaset_initdriver() - initialize driver structure
* @minor: First minor number
* @minors: Number of minors this driver can handle
* @procname: Name of the driver
* @devname: Name of the device files (prefix without minor number)
*
* Allocate and initialize gigaset_driver structure. Initialize interface.
* Allocate and initialize gigaset_driver structure. Initialize interface.
* parameters:
*
* minor First minor number
* Return value:
* minors Number of minors this driver can handle
* procname Name of the driver
* devname Name of the device files (prefix without minor number)
* return value:
* Pointer to the gigaset_driver structure on success, NULL on failure.
* Pointer to the gigaset_driver structure on success, NULL on failure.
*/
*/
struct
gigaset_driver
*
gigaset_initdriver
(
unsigned
minor
,
unsigned
minors
,
struct
gigaset_driver
*
gigaset_initdriver
(
unsigned
minor
,
unsigned
minors
,
...
@@ -1095,6 +1176,13 @@ struct gigaset_driver *gigaset_initdriver(unsigned minor, unsigned minors,
...
@@ -1095,6 +1176,13 @@ struct gigaset_driver *gigaset_initdriver(unsigned minor, unsigned minors,
}
}
EXPORT_SYMBOL_GPL
(
gigaset_initdriver
);
EXPORT_SYMBOL_GPL
(
gigaset_initdriver
);
/**
* gigaset_blockdriver() - block driver
* @drv: driver descriptor structure.
*
* Prevents the driver from attaching new devices, in preparation for
* deregistration.
*/
void
gigaset_blockdriver
(
struct
gigaset_driver
*
drv
)
void
gigaset_blockdriver
(
struct
gigaset_driver
*
drv
)
{
{
drv
->
blocked
=
1
;
drv
->
blocked
=
1
;
...
@@ -1110,7 +1198,7 @@ static int __init gigaset_init_module(void)
...
@@ -1110,7 +1198,7 @@ static int __init gigaset_init_module(void)
if
(
gigaset_debuglevel
==
1
)
if
(
gigaset_debuglevel
==
1
)
gigaset_debuglevel
=
DEBUG_DEFAULT
;
gigaset_debuglevel
=
DEBUG_DEFAULT
;
pr_info
(
DRIVER_DESC
"
\n
"
);
pr_info
(
DRIVER_DESC
DRIVER_DESC_DEBUG
"
\n
"
);
return
0
;
return
0
;
}
}
...
...
drivers/isdn/gigaset/ev-layer.c
View file @
7ecc59c1
...
@@ -207,7 +207,6 @@ struct reply_t gigaset_tab_nocid[] =
...
@@ -207,7 +207,6 @@ struct reply_t gigaset_tab_nocid[] =
/* leave dle mode */
/* leave dle mode */
{
RSP_INIT
,
0
,
0
,
SEQ_DLE0
,
201
,
5
,
{
0
},
"^SDLE=0
\r
"
},
{
RSP_INIT
,
0
,
0
,
SEQ_DLE0
,
201
,
5
,
{
0
},
"^SDLE=0
\r
"
},
{
RSP_OK
,
201
,
201
,
-
1
,
202
,
-
1
},
{
RSP_OK
,
201
,
201
,
-
1
,
202
,
-
1
},
//{RSP_ZDLE, 202,202, 0, 202, 0, {ACT_ERROR}},//DELETE
{
RSP_ZDLE
,
202
,
202
,
0
,
0
,
0
,
{
ACT_DLE0
}},
{
RSP_ZDLE
,
202
,
202
,
0
,
0
,
0
,
{
ACT_DLE0
}},
{
RSP_NODEV
,
200
,
249
,
-
1
,
0
,
0
,
{
ACT_FAKEDLE0
}},
{
RSP_NODEV
,
200
,
249
,
-
1
,
0
,
0
,
{
ACT_FAKEDLE0
}},
{
RSP_ERROR
,
200
,
249
,
-
1
,
0
,
0
,
{
ACT_FAILDLE0
}},
{
RSP_ERROR
,
200
,
249
,
-
1
,
0
,
0
,
{
ACT_FAILDLE0
}},
...
@@ -265,6 +264,7 @@ struct reply_t gigaset_tab_nocid[] =
...
@@ -265,6 +264,7 @@ struct reply_t gigaset_tab_nocid[] =
{
EV_SHUTDOWN
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
{
ACT_SHUTDOWN
}},
//FIXME
{
EV_SHUTDOWN
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
{
ACT_SHUTDOWN
}},
//FIXME
/* misc. */
/* misc. */
{
RSP_ERROR
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
{
ACT_ERROR
}
},
{
RSP_EMPTY
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
{
ACT_DEBUG
}},
//FIXME
{
RSP_EMPTY
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
{
ACT_DEBUG
}},
//FIXME
{
RSP_ZCFGT
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
{
ACT_DEBUG
}},
//FIXME
{
RSP_ZCFGT
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
{
ACT_DEBUG
}},
//FIXME
{
RSP_ZCFG
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
{
ACT_DEBUG
}},
//FIXME
{
RSP_ZCFG
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
{
ACT_DEBUG
}},
//FIXME
...
@@ -328,10 +328,9 @@ struct reply_t gigaset_tab_cid[] =
...
@@ -328,10 +328,9 @@ struct reply_t gigaset_tab_cid[] =
{
RSP_INIT
,
-
1
,
-
1
,
SEQ_HUP
,
401
,
5
,
{
0
},
"+VLS=0
\r
"
},
/* hang up */
//-1,-1?
{
RSP_INIT
,
-
1
,
-
1
,
SEQ_HUP
,
401
,
5
,
{
0
},
"+VLS=0
\r
"
},
/* hang up */
//-1,-1?
{
RSP_OK
,
401
,
401
,
-
1
,
402
,
5
},
{
RSP_OK
,
401
,
401
,
-
1
,
402
,
5
},
{
RSP_ZVLS
,
402
,
402
,
0
,
403
,
5
},
{
RSP_ZVLS
,
402
,
402
,
0
,
403
,
5
},
{
RSP_ZSAU
,
403
,
403
,
ZSAU_DISCONNECT_REQ
,
-
1
,
-
1
,
{
ACT_DEBUG
}},
/* if not remote hup */
{
RSP_ZSAU
,
403
,
403
,
ZSAU_DISCONNECT_REQ
,
-
1
,
-
1
,
{
ACT_DEBUG
}
},
//{RSP_ZSAU, 403,403,ZSAU_NULL, 401, 0, {ACT_ERROR}}, //DELETE//FIXME -> DLE0 // should we do this _before_ hanging up for base driver?
{
RSP_ZSAU
,
403
,
403
,
ZSAU_NULL
,
0
,
0
,
{
ACT_DISCONNECT
}
},
{
RSP_ZSAU
,
403
,
403
,
ZSAU_NULL
,
0
,
0
,
{
ACT_DISCONNECT
}},
//FIXME -> DLE0 // should we do this _before_ hanging up for base driver?
{
RSP_NODEV
,
401
,
403
,
-
1
,
0
,
0
,
{
ACT_FAKEHUP
}
},
{
RSP_NODEV
,
401
,
403
,
-
1
,
0
,
0
,
{
ACT_FAKEHUP
}},
//FIXME -> DLE0 // should we do this _before_ hanging up for base driver?
{
RSP_ERROR
,
401
,
401
,
-
1
,
0
,
0
,
{
ACT_ABORTHUP
}},
{
RSP_ERROR
,
401
,
401
,
-
1
,
0
,
0
,
{
ACT_ABORTHUP
}},
{
EV_TIMEOUT
,
401
,
403
,
-
1
,
0
,
0
,
{
ACT_ABORTHUP
}},
{
EV_TIMEOUT
,
401
,
403
,
-
1
,
0
,
0
,
{
ACT_ABORTHUP
}},
...
@@ -474,8 +473,13 @@ static int cid_of_response(char *s)
...
@@ -474,8 +473,13 @@ static int cid_of_response(char *s)
//FIXME is ;<digit>+ at end of non-CID response really impossible?
//FIXME is ;<digit>+ at end of non-CID response really impossible?
}
}
/* This function will be called via task queue from the callback handler.
/**
* We received a modem response and have to handle it..
* gigaset_handle_modem_response() - process received modem response
* @cs: device descriptor structure.
*
* Called by asyncdata/isocdata if a block of data received from the
* device must be processed as a modem command response. The data is
* already in the cs structure.
*/
*/
void
gigaset_handle_modem_response
(
struct
cardstate
*
cs
)
void
gigaset_handle_modem_response
(
struct
cardstate
*
cs
)
{
{
...
@@ -707,6 +711,11 @@ static void disconnect(struct at_state_t **at_state_p)
...
@@ -707,6 +711,11 @@ static void disconnect(struct at_state_t **at_state_p)
if
(
bcs
)
{
if
(
bcs
)
{
/* B channel assigned: invoke hardware specific handler */
/* B channel assigned: invoke hardware specific handler */
cs
->
ops
->
close_bchannel
(
bcs
);
cs
->
ops
->
close_bchannel
(
bcs
);
/* notify LL */
if
(
bcs
->
chstate
&
(
CHS_D_UP
|
CHS_NOTIFY_LL
))
{
bcs
->
chstate
&=
~
(
CHS_D_UP
|
CHS_NOTIFY_LL
);
gigaset_i4l_channel_cmd
(
bcs
,
ISDN_STAT_DHUP
);
}
}
else
{
}
else
{
/* no B channel assigned: just deallocate */
/* no B channel assigned: just deallocate */
spin_lock_irqsave
(
&
cs
->
lock
,
flags
);
spin_lock_irqsave
(
&
cs
->
lock
,
flags
);
...
@@ -1429,11 +1438,12 @@ static void do_action(int action, struct cardstate *cs,
...
@@ -1429,11 +1438,12 @@ static void do_action(int action, struct cardstate *cs,
cs
->
gotfwver
=
-
1
;
cs
->
gotfwver
=
-
1
;
dev_err
(
cs
->
dev
,
"could not read firmware version.
\n
"
);
dev_err
(
cs
->
dev
,
"could not read firmware version.
\n
"
);
break
;
break
;
#ifdef CONFIG_GIGASET_DEBUG
case
ACT_ERROR
:
case
ACT_ERROR
:
*
p_genresp
=
1
;
gig_dbg
(
DEBUG_ANY
,
"%s: ERROR response in ConState %d"
,
*
p_resp_code
=
RSP_ERROR
;
__func__
,
at_state
->
ConState
);
cs
->
cur_at_seq
=
SEQ_NONE
;
break
;
break
;
#ifdef CONFIG_GIGASET_DEBUG
case
ACT_TEST
:
case
ACT_TEST
:
{
{
static
int
count
=
3
;
//2; //1;
static
int
count
=
3
;
//2; //1;
...
...
drivers/isdn/gigaset/i4l.c
View file @
7ecc59c1
...
@@ -51,6 +51,12 @@ static int writebuf_from_LL(int driverID, int channel, int ack,
...
@@ -51,6 +51,12 @@ static int writebuf_from_LL(int driverID, int channel, int ack,
return
-
ENODEV
;
return
-
ENODEV
;
}
}
bcs
=
&
cs
->
bcs
[
channel
];
bcs
=
&
cs
->
bcs
[
channel
];
/* can only handle linear sk_buffs */
if
(
skb_linearize
(
skb
)
<
0
)
{
dev_err
(
cs
->
dev
,
"%s: skb_linearize failed
\n
"
,
__func__
);
return
-
ENOMEM
;
}
len
=
skb
->
len
;
len
=
skb
->
len
;
gig_dbg
(
DEBUG_LLDATA
,
gig_dbg
(
DEBUG_LLDATA
,
...
@@ -79,6 +85,14 @@ static int writebuf_from_LL(int driverID, int channel, int ack,
...
@@ -79,6 +85,14 @@ static int writebuf_from_LL(int driverID, int channel, int ack,
return
cs
->
ops
->
send_skb
(
bcs
,
skb
);
return
cs
->
ops
->
send_skb
(
bcs
,
skb
);
}
}
/**
* gigaset_skb_sent() - acknowledge sending an skb
* @bcs: B channel descriptor structure.
* @skb: sent data.
*
* Called by hardware module {bas,ser,usb}_gigaset when the data in a
* skb has been successfully sent, for signalling completion to the LL.
*/
void
gigaset_skb_sent
(
struct
bc_state
*
bcs
,
struct
sk_buff
*
skb
)
void
gigaset_skb_sent
(
struct
bc_state
*
bcs
,
struct
sk_buff
*
skb
)
{
{
unsigned
len
;
unsigned
len
;
...
@@ -455,6 +469,15 @@ int gigaset_isdn_setup_accept(struct at_state_t *at_state)
...
@@ -455,6 +469,15 @@ int gigaset_isdn_setup_accept(struct at_state_t *at_state)
return
0
;
return
0
;
}
}
/**
* gigaset_isdn_icall() - signal incoming call
* @at_state: connection state structure.
*
* Called by main module to notify the LL that an incoming call has been
* received. @at_state contains the parameters of the call.
*
* Return value: call disposition (ICALL_*)
*/
int
gigaset_isdn_icall
(
struct
at_state_t
*
at_state
)
int
gigaset_isdn_icall
(
struct
at_state_t
*
at_state
)
{
{
struct
cardstate
*
cs
=
at_state
->
cs
;
struct
cardstate
*
cs
=
at_state
->
cs
;
...
...
drivers/isdn/gigaset/interface.c
View file @
7ecc59c1
...
@@ -616,6 +616,15 @@ void gigaset_if_free(struct cardstate *cs)
...
@@ -616,6 +616,15 @@ void gigaset_if_free(struct cardstate *cs)
tty_unregister_device
(
drv
->
tty
,
cs
->
minor_index
);
tty_unregister_device
(
drv
->
tty
,
cs
->
minor_index
);
}
}
/**
* gigaset_if_receive() - pass a received block of data to the tty device
* @cs: device descriptor structure.
* @buffer: received data.
* @len: number of bytes received.
*
* Called by asyncdata/isocdata if a block of data received from the
* device must be sent to userspace through the ttyG* device.
*/
void
gigaset_if_receive
(
struct
cardstate
*
cs
,
void
gigaset_if_receive
(
struct
cardstate
*
cs
,
unsigned
char
*
buffer
,
size_t
len
)
unsigned
char
*
buffer
,
size_t
len
)
{
{
...
...
drivers/isdn/gigaset/isocdata.c
View file @
7ecc59c1
...
@@ -429,7 +429,7 @@ static inline int hdlc_buildframe(struct isowbuf_t *iwb,
...
@@ -429,7 +429,7 @@ static inline int hdlc_buildframe(struct isowbuf_t *iwb,
return
-
EAGAIN
;
return
-
EAGAIN
;
}
}
dump_bytes
(
DEBUG_STREAM
,
"snd data"
,
in
,
count
);
dump_bytes
(
DEBUG_STREAM
_DUMP
,
"snd data"
,
in
,
count
);
/* bitstuff and checksum input data */
/* bitstuff and checksum input data */
fcs
=
PPP_INITFCS
;
fcs
=
PPP_INITFCS
;
...
@@ -448,7 +448,6 @@ static inline int hdlc_buildframe(struct isowbuf_t *iwb,
...
@@ -448,7 +448,6 @@ static inline int hdlc_buildframe(struct isowbuf_t *iwb,
/* put closing flag and repeat byte for flag idle */
/* put closing flag and repeat byte for flag idle */
isowbuf_putflag
(
iwb
);
isowbuf_putflag
(
iwb
);
end
=
isowbuf_donewrite
(
iwb
);
end
=
isowbuf_donewrite
(
iwb
);
dump_bytes
(
DEBUG_STREAM_DUMP
,
"isowbuf"
,
iwb
->
data
,
end
+
1
);
return
end
;
return
end
;
}
}
...
@@ -482,6 +481,8 @@ static inline int trans_buildframe(struct isowbuf_t *iwb,
...
@@ -482,6 +481,8 @@ static inline int trans_buildframe(struct isowbuf_t *iwb,
}
}
gig_dbg
(
DEBUG_STREAM
,
"put %d bytes"
,
count
);
gig_dbg
(
DEBUG_STREAM
,
"put %d bytes"
,
count
);
dump_bytes
(
DEBUG_STREAM_DUMP
,
"snd data"
,
in
,
count
);
write
=
iwb
->
write
;
write
=
iwb
->
write
;
do
{
do
{
c
=
bitrev8
(
*
in
++
);
c
=
bitrev8
(
*
in
++
);
...
@@ -583,7 +584,7 @@ static inline void hdlc_done(struct bc_state *bcs)
...
@@ -583,7 +584,7 @@ static inline void hdlc_done(struct bc_state *bcs)
procskb
->
tail
-=
2
;
procskb
->
tail
-=
2
;
gig_dbg
(
DEBUG_ISO
,
"%s: good frame (%d octets)"
,
gig_dbg
(
DEBUG_ISO
,
"%s: good frame (%d octets)"
,
__func__
,
procskb
->
len
);
__func__
,
procskb
->
len
);
dump_bytes
(
DEBUG_STREAM
,
dump_bytes
(
DEBUG_STREAM
_DUMP
,
"rcv data"
,
procskb
->
data
,
procskb
->
len
);
"rcv data"
,
procskb
->
data
,
procskb
->
len
);
bcs
->
hw
.
bas
->
goodbytes
+=
procskb
->
len
;
bcs
->
hw
.
bas
->
goodbytes
+=
procskb
->
len
;
gigaset_rcv_skb
(
procskb
,
bcs
->
cs
,
bcs
);
gigaset_rcv_skb
(
procskb
,
bcs
->
cs
,
bcs
);
...
@@ -878,6 +879,8 @@ static inline void trans_receive(unsigned char *src, unsigned count,
...
@@ -878,6 +879,8 @@ static inline void trans_receive(unsigned char *src, unsigned count,
dobytes
--
;
dobytes
--
;
}
}
if
(
dobytes
==
0
)
{
if
(
dobytes
==
0
)
{
dump_bytes
(
DEBUG_STREAM_DUMP
,
"rcv data"
,
skb
->
data
,
skb
->
len
);
gigaset_rcv_skb
(
skb
,
bcs
->
cs
,
bcs
);
gigaset_rcv_skb
(
skb
,
bcs
->
cs
,
bcs
);
bcs
->
skb
=
skb
=
dev_alloc_skb
(
SBUFSIZE
+
HW_HDR_LEN
);
bcs
->
skb
=
skb
=
dev_alloc_skb
(
SBUFSIZE
+
HW_HDR_LEN
);
if
(
!
skb
)
{
if
(
!
skb
)
{
...
@@ -973,16 +976,17 @@ void gigaset_isoc_input(struct inbuf_t *inbuf)
...
@@ -973,16 +976,17 @@ void gigaset_isoc_input(struct inbuf_t *inbuf)
/* == data output ========================================================== */
/* == data output ========================================================== */
/* gigaset_send_skb
/**
* called by common.c to queue an skb for sending
* gigaset_isoc_send_skb() - queue an skb for sending
* and start transmission if necessary
* @bcs: B channel descriptor structure.
* parameters:
* @skb: data to send.
* B Channel control structure
*
* skb
* Called by i4l.c to queue an skb for sending, and start transmission if
* return value:
* necessary.
* number of bytes accepted for sending
*
* (skb->len if ok, 0 if out of buffer space)
* Return value:
* or error code (< 0, eg. -EINVAL)
* number of bytes accepted for sending (skb->len) if ok,
* error code < 0 (eg. -ENODEV) on error
*/
*/
int
gigaset_isoc_send_skb
(
struct
bc_state
*
bcs
,
struct
sk_buff
*
skb
)
int
gigaset_isoc_send_skb
(
struct
bc_state
*
bcs
,
struct
sk_buff
*
skb
)
{
{
...
...
drivers/net/benet/be_cmds.c
View file @
7ecc59c1
...
@@ -1129,7 +1129,6 @@ int be_cmd_write_flashrom(struct be_adapter *adapter, struct be_dma_mem *cmd,
...
@@ -1129,7 +1129,6 @@ int be_cmd_write_flashrom(struct be_adapter *adapter, struct be_dma_mem *cmd,
spin_lock_bh
(
&
adapter
->
mcc_lock
);
spin_lock_bh
(
&
adapter
->
mcc_lock
);
wrb
=
wrb_from_mccq
(
adapter
);
wrb
=
wrb_from_mccq
(
adapter
);
req
=
embedded_payload
(
wrb
);
sge
=
nonembedded_sgl
(
wrb
);
sge
=
nonembedded_sgl
(
wrb
);
be_wrb_hdr_prepare
(
wrb
,
cmd
->
size
,
false
,
1
);
be_wrb_hdr_prepare
(
wrb
,
cmd
->
size
,
false
,
1
);
...
...
drivers/net/benet/be_cmds.h
View file @
7ecc59c1
...
@@ -62,7 +62,7 @@ enum {
...
@@ -62,7 +62,7 @@ enum {
MCC_STATUS_QUEUE_FLUSHING
=
0x4
,
MCC_STATUS_QUEUE_FLUSHING
=
0x4
,
/* The command is completing with a DMA error */
/* The command is completing with a DMA error */
MCC_STATUS_DMA_FAILED
=
0x5
,
MCC_STATUS_DMA_FAILED
=
0x5
,
MCC_STATUS_NOT_SUPPORTED
=
0x
66
MCC_STATUS_NOT_SUPPORTED
=
66
};
};
#define CQE_STATUS_COMPL_MASK 0xFFFF
#define CQE_STATUS_COMPL_MASK 0xFFFF
...
...
drivers/net/benet/be_ethtool.c
View file @
7ecc59c1
...
@@ -363,7 +363,7 @@ const struct ethtool_ops be_ethtool_ops = {
...
@@ -363,7 +363,7 @@ const struct ethtool_ops be_ethtool_ops = {
.
get_rx_csum
=
be_get_rx_csum
,
.
get_rx_csum
=
be_get_rx_csum
,
.
set_rx_csum
=
be_set_rx_csum
,
.
set_rx_csum
=
be_set_rx_csum
,
.
get_tx_csum
=
ethtool_op_get_tx_csum
,
.
get_tx_csum
=
ethtool_op_get_tx_csum
,
.
set_tx_csum
=
ethtool_op_set_tx_csum
,
.
set_tx_csum
=
ethtool_op_set_tx_
hw_
csum
,
.
get_sg
=
ethtool_op_get_sg
,
.
get_sg
=
ethtool_op_get_sg
,
.
set_sg
=
ethtool_op_set_sg
,
.
set_sg
=
ethtool_op_set_sg
,
.
get_tso
=
ethtool_op_get_tso
,
.
get_tso
=
ethtool_op_get_tso
,
...
...
drivers/net/benet/be_main.c
View file @
7ecc59c1
...
@@ -197,7 +197,7 @@ void netdev_stats_update(struct be_adapter *adapter)
...
@@ -197,7 +197,7 @@ void netdev_stats_update(struct be_adapter *adapter)
/* no space available in linux */
/* no space available in linux */
dev_stats
->
tx_dropped
=
0
;
dev_stats
->
tx_dropped
=
0
;
dev_stats
->
multicast
=
port_stats
->
tx_multicast
frames
;
dev_stats
->
multicast
=
port_stats
->
rx_multicast_
frames
;
dev_stats
->
collisions
=
0
;
dev_stats
->
collisions
=
0
;
/* detailed tx_errors */
/* detailed tx_errors */
...
@@ -1899,8 +1899,8 @@ static void be_netdev_init(struct net_device *netdev)
...
@@ -1899,8 +1899,8 @@ static void be_netdev_init(struct net_device *netdev)
struct
be_adapter
*
adapter
=
netdev_priv
(
netdev
);
struct
be_adapter
*
adapter
=
netdev_priv
(
netdev
);
netdev
->
features
|=
NETIF_F_SG
|
NETIF_F_HW_VLAN_RX
|
NETIF_F_TSO
|
netdev
->
features
|=
NETIF_F_SG
|
NETIF_F_HW_VLAN_RX
|
NETIF_F_TSO
|
NETIF_F_HW_VLAN_TX
|
NETIF_F_HW_VLAN_FILTER
|
NETIF_F_
IP
_CSUM
|
NETIF_F_HW_VLAN_TX
|
NETIF_F_HW_VLAN_FILTER
|
NETIF_F_
HW
_CSUM
|
NETIF_F_
IPV6_CSUM
|
NETIF_F_
GRO
;
NETIF_F_GRO
;
netdev
->
flags
|=
IFF_MULTICAST
;
netdev
->
flags
|=
IFF_MULTICAST
;
...
...
drivers/net/e1000e/82571.c
View file @
7ecc59c1
...
@@ -1803,7 +1803,7 @@ struct e1000_info e1000_82574_info = {
...
@@ -1803,7 +1803,7 @@ struct e1000_info e1000_82574_info = {
|
FLAG_HAS_AMT
|
FLAG_HAS_AMT
|
FLAG_HAS_CTRLEXT_ON_LOAD
,
|
FLAG_HAS_CTRLEXT_ON_LOAD
,
.
pba
=
20
,
.
pba
=
20
,
.
max_hw_frame_size
=
ETH_FRAME_LEN
+
ETH_FCS_LEN
,
.
max_hw_frame_size
=
DEFAULT_JUMBO
,
.
get_variants
=
e1000_get_variants_82571
,
.
get_variants
=
e1000_get_variants_82571
,
.
mac_ops
=
&
e82571_mac_ops
,
.
mac_ops
=
&
e82571_mac_ops
,
.
phy_ops
=
&
e82_phy_ops_bm
,
.
phy_ops
=
&
e82_phy_ops_bm
,
...
@@ -1820,7 +1820,7 @@ struct e1000_info e1000_82583_info = {
...
@@ -1820,7 +1820,7 @@ struct e1000_info e1000_82583_info = {
|
FLAG_HAS_AMT
|
FLAG_HAS_AMT
|
FLAG_HAS_CTRLEXT_ON_LOAD
,
|
FLAG_HAS_CTRLEXT_ON_LOAD
,
.
pba
=
20
,
.
pba
=
20
,
.
max_hw_frame_size
=
DEFAULT_JUMBO
,
.
max_hw_frame_size
=
ETH_FRAME_LEN
+
ETH_FCS_LEN
,
.
get_variants
=
e1000_get_variants_82571
,
.
get_variants
=
e1000_get_variants_82571
,
.
mac_ops
=
&
e82571_mac_ops
,
.
mac_ops
=
&
e82571_mac_ops
,
.
phy_ops
=
&
e82_phy_ops_bm
,
.
phy_ops
=
&
e82_phy_ops_bm
,
...
...
drivers/net/ixgbe/ixgbe_82599.c
View file @
7ecc59c1
...
@@ -330,6 +330,8 @@ static enum ixgbe_media_type ixgbe_get_media_type_82599(struct ixgbe_hw *hw)
...
@@ -330,6 +330,8 @@ static enum ixgbe_media_type ixgbe_get_media_type_82599(struct ixgbe_hw *hw)
switch
(
hw
->
device_id
)
{
switch
(
hw
->
device_id
)
{
case
IXGBE_DEV_ID_82599_KX4
:
case
IXGBE_DEV_ID_82599_KX4
:
case
IXGBE_DEV_ID_82599_KX4_MEZZ
:
case
IXGBE_DEV_ID_82599_COMBO_BACKPLANE
:
case
IXGBE_DEV_ID_82599_XAUI_LOM
:
case
IXGBE_DEV_ID_82599_XAUI_LOM
:
/* Default device ID is mezzanine card KX/KX4 */
/* Default device ID is mezzanine card KX/KX4 */
media_type
=
ixgbe_media_type_backplane
;
media_type
=
ixgbe_media_type_backplane
;
...
...
drivers/net/ixgbe/ixgbe_main.c
View file @
7ecc59c1
...
@@ -97,8 +97,12 @@ static struct pci_device_id ixgbe_pci_tbl[] = {
...
@@ -97,8 +97,12 @@ static struct pci_device_id ixgbe_pci_tbl[] = {
board_82599
},
board_82599
},
{
PCI_VDEVICE
(
INTEL
,
IXGBE_DEV_ID_82599_SFP
),
{
PCI_VDEVICE
(
INTEL
,
IXGBE_DEV_ID_82599_SFP
),
board_82599
},
board_82599
},
{
PCI_VDEVICE
(
INTEL
,
IXGBE_DEV_ID_82599_KX4_MEZZ
),
board_82599
},
{
PCI_VDEVICE
(
INTEL
,
IXGBE_DEV_ID_82599_CX4
),
{
PCI_VDEVICE
(
INTEL
,
IXGBE_DEV_ID_82599_CX4
),
board_82599
},
board_82599
},
{
PCI_VDEVICE
(
INTEL
,
IXGBE_DEV_ID_82599_COMBO_BACKPLANE
),
board_82599
},
/* required last entry */
/* required last entry */
{
0
,
}
{
0
,
}
...
...
drivers/net/ixgbe/ixgbe_type.h
View file @
7ecc59c1
...
@@ -49,9 +49,11 @@
...
@@ -49,9 +49,11 @@
#define IXGBE_DEV_ID_82598_SR_DUAL_PORT_EM 0x10E1
#define IXGBE_DEV_ID_82598_SR_DUAL_PORT_EM 0x10E1
#define IXGBE_DEV_ID_82598EB_XF_LR 0x10F4
#define IXGBE_DEV_ID_82598EB_XF_LR 0x10F4
#define IXGBE_DEV_ID_82599_KX4 0x10F7
#define IXGBE_DEV_ID_82599_KX4 0x10F7
#define IXGBE_DEV_ID_82599_KX4_MEZZ 0x1514
#define IXGBE_DEV_ID_82599_CX4 0x10F9
#define IXGBE_DEV_ID_82599_CX4 0x10F9
#define IXGBE_DEV_ID_82599_SFP 0x10FB
#define IXGBE_DEV_ID_82599_SFP 0x10FB
#define IXGBE_DEV_ID_82599_XAUI_LOM 0x10FC
#define IXGBE_DEV_ID_82599_XAUI_LOM 0x10FC
#define IXGBE_DEV_ID_82599_COMBO_BACKPLANE 0x10F8
/* General Registers */
/* General Registers */
#define IXGBE_CTRL 0x00000
#define IXGBE_CTRL 0x00000
...
...
drivers/net/pcmcia/pcnet_cs.c
View file @
7ecc59c1
...
@@ -1754,14 +1754,14 @@ static struct pcmcia_device_id pcnet_ids[] = {
...
@@ -1754,14 +1754,14 @@ static struct pcmcia_device_id pcnet_ids[] = {
PCMCIA_PFC_DEVICE_CIS_PROD_ID12
(
0
,
"Psion Dacom"
,
"Gold Card V34 Ethernet"
,
0xf5f025c2
,
0x338e8155
,
"cis/PCMLM28.cis"
),
PCMCIA_PFC_DEVICE_CIS_PROD_ID12
(
0
,
"Psion Dacom"
,
"Gold Card V34 Ethernet"
,
0xf5f025c2
,
0x338e8155
,
"cis/PCMLM28.cis"
),
PCMCIA_PFC_DEVICE_CIS_PROD_ID12
(
0
,
"Psion Dacom"
,
"Gold Card V34 Ethernet GSM"
,
0xf5f025c2
,
0x4ae85d35
,
"cis/PCMLM28.cis"
),
PCMCIA_PFC_DEVICE_CIS_PROD_ID12
(
0
,
"Psion Dacom"
,
"Gold Card V34 Ethernet GSM"
,
0xf5f025c2
,
0x4ae85d35
,
"cis/PCMLM28.cis"
),
PCMCIA_PFC_DEVICE_CIS_PROD_ID12
(
0
,
"LINKSYS"
,
"PCMLM28"
,
0xf7cb0b07
,
0x66881874
,
"cis/PCMLM28.cis"
),
PCMCIA_PFC_DEVICE_CIS_PROD_ID12
(
0
,
"LINKSYS"
,
"PCMLM28"
,
0xf7cb0b07
,
0x66881874
,
"cis/PCMLM28.cis"
),
PCMCIA_MFC_DEVICE_CIS_PROD_ID12
(
0
,
"DAYNA COMMUNICATIONS"
,
"LAN AND MODEM MULTIFUNCTION"
,
0x8fdf8f89
,
0xdd5ed9e8
,
"DP83903.cis"
),
PCMCIA_MFC_DEVICE_CIS_PROD_ID12
(
0
,
"DAYNA COMMUNICATIONS"
,
"LAN AND MODEM MULTIFUNCTION"
,
0x8fdf8f89
,
0xdd5ed9e8
,
"
cis/
DP83903.cis"
),
PCMCIA_MFC_DEVICE_CIS_PROD_ID4
(
0
,
"NSC MF LAN/Modem"
,
0x58fc6056
,
"DP83903.cis"
),
PCMCIA_MFC_DEVICE_CIS_PROD_ID4
(
0
,
"NSC MF LAN/Modem"
,
0x58fc6056
,
"
cis/
DP83903.cis"
),
PCMCIA_MFC_DEVICE_CIS_MANF_CARD
(
0
,
0x0175
,
0x0000
,
"DP83903.cis"
),
PCMCIA_MFC_DEVICE_CIS_MANF_CARD
(
0
,
0x0175
,
0x0000
,
"
cis/
DP83903.cis"
),
PCMCIA_DEVICE_CIS_MANF_CARD
(
0xc00f
,
0x0002
,
"cis/LA-PCM.cis"
),
PCMCIA_DEVICE_CIS_MANF_CARD
(
0xc00f
,
0x0002
,
"cis/LA-PCM.cis"
),
PCMCIA_DEVICE_CIS_PROD_ID12
(
"KTI"
,
"PE520 PLUS"
,
0xad180345
,
0x9d58d392
,
"PE520.cis"
),
PCMCIA_DEVICE_CIS_PROD_ID12
(
"KTI"
,
"PE520 PLUS"
,
0xad180345
,
0x9d58d392
,
"PE520.cis"
),
PCMCIA_DEVICE_CIS_PROD_ID12
(
"NDC"
,
"Ethernet"
,
0x01c43ae1
,
0x00b2e941
,
"NE2K.cis"
),
PCMCIA_DEVICE_CIS_PROD_ID12
(
"NDC"
,
"Ethernet"
,
0x01c43ae1
,
0x00b2e941
,
"
cis/
NE2K.cis"
),
PCMCIA_DEVICE_CIS_PROD_ID12
(
"PMX "
,
"PE-200"
,
0x34f3f1c8
,
0x10b59f8c
,
"PE-200.cis"
),
PCMCIA_DEVICE_CIS_PROD_ID12
(
"PMX "
,
"PE-200"
,
0x34f3f1c8
,
0x10b59f8c
,
"PE-200.cis"
),
PCMCIA_DEVICE_CIS_PROD_ID12
(
"TAMARACK"
,
"Ethernet"
,
0xcf434fba
,
0x00b2e941
,
"tamarack.cis"
),
PCMCIA_DEVICE_CIS_PROD_ID12
(
"TAMARACK"
,
"Ethernet"
,
0xcf434fba
,
0x00b2e941
,
"
cis/
tamarack.cis"
),
PCMCIA_DEVICE_PROD_ID12
(
"Ethernet"
,
"CF Size PC Card"
,
0x00b2e941
,
0x43ac239b
),
PCMCIA_DEVICE_PROD_ID12
(
"Ethernet"
,
"CF Size PC Card"
,
0x00b2e941
,
0x43ac239b
),
PCMCIA_DEVICE_PROD_ID123
(
"Fast Ethernet"
,
"CF Size PC Card"
,
"1.0"
,
PCMCIA_DEVICE_PROD_ID123
(
"Fast Ethernet"
,
"CF Size PC Card"
,
"1.0"
,
0xb4be14e3
,
0x43ac239b
,
0x0877b627
),
0xb4be14e3
,
0x43ac239b
,
0x0877b627
),
...
...
drivers/net/qlge/qlge.h
View file @
7ecc59c1
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
#include <linux/pci.h>
#include <linux/pci.h>
#include <linux/netdevice.h>
#include <linux/netdevice.h>
#include <linux/rtnetlink.h>
/*
/*
* General definitions...
* General definitions...
...
@@ -135,9 +136,9 @@ enum {
...
@@ -135,9 +136,9 @@ enum {
RST_FO_TFO
=
(
1
<<
0
),
RST_FO_TFO
=
(
1
<<
0
),
RST_FO_RR_MASK
=
0x00060000
,
RST_FO_RR_MASK
=
0x00060000
,
RST_FO_RR_CQ_CAM
=
0x00000000
,
RST_FO_RR_CQ_CAM
=
0x00000000
,
RST_FO_RR_DROP
=
0x0000000
1
,
RST_FO_RR_DROP
=
0x0000000
2
,
RST_FO_RR_DQ
=
0x0000000
2
,
RST_FO_RR_DQ
=
0x0000000
4
,
RST_FO_RR_RCV_FUNC_CQ
=
0x0000000
3
,
RST_FO_RR_RCV_FUNC_CQ
=
0x0000000
6
,
RST_FO_FRB
=
(
1
<<
12
),
RST_FO_FRB
=
(
1
<<
12
),
RST_FO_MOP
=
(
1
<<
13
),
RST_FO_MOP
=
(
1
<<
13
),
RST_FO_REG
=
(
1
<<
14
),
RST_FO_REG
=
(
1
<<
14
),
...
@@ -1477,7 +1478,6 @@ struct ql_adapter {
...
@@ -1477,7 +1478,6 @@ struct ql_adapter {
u32
mailbox_in
;
u32
mailbox_in
;
u32
mailbox_out
;
u32
mailbox_out
;
struct
mbox_params
idc_mbc
;
struct
mbox_params
idc_mbc
;
struct
mutex
mpi_mutex
;
int
tx_ring_size
;
int
tx_ring_size
;
int
rx_ring_size
;
int
rx_ring_size
;
...
...
drivers/net/qlge/qlge_ethtool.c
View file @
7ecc59c1
...
@@ -45,7 +45,6 @@ static int ql_update_ring_coalescing(struct ql_adapter *qdev)
...
@@ -45,7 +45,6 @@ static int ql_update_ring_coalescing(struct ql_adapter *qdev)
if
(
!
netif_running
(
qdev
->
ndev
))
if
(
!
netif_running
(
qdev
->
ndev
))
return
status
;
return
status
;
spin_lock
(
&
qdev
->
hw_lock
);
/* Skip the default queue, and update the outbound handler
/* Skip the default queue, and update the outbound handler
* queues if they changed.
* queues if they changed.
*/
*/
...
@@ -92,7 +91,6 @@ static int ql_update_ring_coalescing(struct ql_adapter *qdev)
...
@@ -92,7 +91,6 @@ static int ql_update_ring_coalescing(struct ql_adapter *qdev)
}
}
}
}
exit:
exit:
spin_unlock
(
&
qdev
->
hw_lock
);
return
status
;
return
status
;
}
}
...
...
drivers/net/qlge/qlge_main.c
View file @
7ecc59c1
...
@@ -34,7 +34,6 @@
...
@@ -34,7 +34,6 @@
#include <linux/etherdevice.h>
#include <linux/etherdevice.h>
#include <linux/ethtool.h>
#include <linux/ethtool.h>
#include <linux/skbuff.h>
#include <linux/skbuff.h>
#include <linux/rtnetlink.h>
#include <linux/if_vlan.h>
#include <linux/if_vlan.h>
#include <linux/delay.h>
#include <linux/delay.h>
#include <linux/mm.h>
#include <linux/mm.h>
...
@@ -1926,12 +1925,10 @@ static void ql_vlan_rx_add_vid(struct net_device *ndev, u16 vid)
...
@@ -1926,12 +1925,10 @@ static void ql_vlan_rx_add_vid(struct net_device *ndev, u16 vid)
status
=
ql_sem_spinlock
(
qdev
,
SEM_MAC_ADDR_MASK
);
status
=
ql_sem_spinlock
(
qdev
,
SEM_MAC_ADDR_MASK
);
if
(
status
)
if
(
status
)
return
;
return
;
spin_lock
(
&
qdev
->
hw_lock
);
if
(
ql_set_mac_addr_reg
if
(
ql_set_mac_addr_reg
(
qdev
,
(
u8
*
)
&
enable_bit
,
MAC_ADDR_TYPE_VLAN
,
vid
))
{
(
qdev
,
(
u8
*
)
&
enable_bit
,
MAC_ADDR_TYPE_VLAN
,
vid
))
{
QPRINTK
(
qdev
,
IFUP
,
ERR
,
"Failed to init vlan address.
\n
"
);
QPRINTK
(
qdev
,
IFUP
,
ERR
,
"Failed to init vlan address.
\n
"
);
}
}
spin_unlock
(
&
qdev
->
hw_lock
);
ql_sem_unlock
(
qdev
,
SEM_MAC_ADDR_MASK
);
ql_sem_unlock
(
qdev
,
SEM_MAC_ADDR_MASK
);
}
}
...
@@ -1945,12 +1942,10 @@ static void ql_vlan_rx_kill_vid(struct net_device *ndev, u16 vid)
...
@@ -1945,12 +1942,10 @@ static void ql_vlan_rx_kill_vid(struct net_device *ndev, u16 vid)
if
(
status
)
if
(
status
)
return
;
return
;
spin_lock
(
&
qdev
->
hw_lock
);
if
(
ql_set_mac_addr_reg
if
(
ql_set_mac_addr_reg
(
qdev
,
(
u8
*
)
&
enable_bit
,
MAC_ADDR_TYPE_VLAN
,
vid
))
{
(
qdev
,
(
u8
*
)
&
enable_bit
,
MAC_ADDR_TYPE_VLAN
,
vid
))
{
QPRINTK
(
qdev
,
IFUP
,
ERR
,
"Failed to clear vlan address.
\n
"
);
QPRINTK
(
qdev
,
IFUP
,
ERR
,
"Failed to clear vlan address.
\n
"
);
}
}
spin_unlock
(
&
qdev
->
hw_lock
);
ql_sem_unlock
(
qdev
,
SEM_MAC_ADDR_MASK
);
ql_sem_unlock
(
qdev
,
SEM_MAC_ADDR_MASK
);
}
}
...
@@ -2001,15 +1996,17 @@ static irqreturn_t qlge_isr(int irq, void *dev_id)
...
@@ -2001,15 +1996,17 @@ static irqreturn_t qlge_isr(int irq, void *dev_id)
/*
/*
* Check MPI processor activity.
* Check MPI processor activity.
*/
*/
if
(
var
&
STS_PI
)
{
if
((
var
&
STS_PI
)
&&
(
ql_read32
(
qdev
,
INTR_MASK
)
&
INTR_MASK_PI
))
{
/*
/*
* We've got an async event or mailbox completion.
* We've got an async event or mailbox completion.
* Handle it and clear the source of the interrupt.
* Handle it and clear the source of the interrupt.
*/
*/
QPRINTK
(
qdev
,
INTR
,
ERR
,
"Got MPI processor interrupt.
\n
"
);
QPRINTK
(
qdev
,
INTR
,
ERR
,
"Got MPI processor interrupt.
\n
"
);
ql_disable_completion_interrupt
(
qdev
,
intr_context
->
intr
);
ql_disable_completion_interrupt
(
qdev
,
intr_context
->
intr
);
queue_delayed_work_on
(
smp_processor_id
(),
qdev
->
workqueue
,
ql_write32
(
qdev
,
INTR_MASK
,
(
INTR_MASK_PI
<<
16
));
&
qdev
->
mpi_work
,
0
);
queue_delayed_work_on
(
smp_processor_id
(),
qdev
->
workqueue
,
&
qdev
->
mpi_work
,
0
);
work_done
++
;
work_done
++
;
}
}
...
@@ -3585,7 +3582,6 @@ static void qlge_set_multicast_list(struct net_device *ndev)
...
@@ -3585,7 +3582,6 @@ static void qlge_set_multicast_list(struct net_device *ndev)
status
=
ql_sem_spinlock
(
qdev
,
SEM_RT_IDX_MASK
);
status
=
ql_sem_spinlock
(
qdev
,
SEM_RT_IDX_MASK
);
if
(
status
)
if
(
status
)
return
;
return
;
spin_lock
(
&
qdev
->
hw_lock
);
/*
/*
* Set or clear promiscuous mode if a
* Set or clear promiscuous mode if a
* transition is taking place.
* transition is taking place.
...
@@ -3662,7 +3658,6 @@ static void qlge_set_multicast_list(struct net_device *ndev)
...
@@ -3662,7 +3658,6 @@ static void qlge_set_multicast_list(struct net_device *ndev)
}
}
}
}
exit:
exit:
spin_unlock
(
&
qdev
->
hw_lock
);
ql_sem_unlock
(
qdev
,
SEM_RT_IDX_MASK
);
ql_sem_unlock
(
qdev
,
SEM_RT_IDX_MASK
);
}
}
...
@@ -3682,10 +3677,8 @@ static int qlge_set_mac_address(struct net_device *ndev, void *p)
...
@@ -3682,10 +3677,8 @@ static int qlge_set_mac_address(struct net_device *ndev, void *p)
status
=
ql_sem_spinlock
(
qdev
,
SEM_MAC_ADDR_MASK
);
status
=
ql_sem_spinlock
(
qdev
,
SEM_MAC_ADDR_MASK
);
if
(
status
)
if
(
status
)
return
status
;
return
status
;
spin_lock
(
&
qdev
->
hw_lock
);
status
=
ql_set_mac_addr_reg
(
qdev
,
(
u8
*
)
ndev
->
dev_addr
,
status
=
ql_set_mac_addr_reg
(
qdev
,
(
u8
*
)
ndev
->
dev_addr
,
MAC_ADDR_TYPE_CAM_MAC
,
qdev
->
func
*
MAX_CQ
);
MAC_ADDR_TYPE_CAM_MAC
,
qdev
->
func
*
MAX_CQ
);
spin_unlock
(
&
qdev
->
hw_lock
);
if
(
status
)
if
(
status
)
QPRINTK
(
qdev
,
HW
,
ERR
,
"Failed to load MAC address.
\n
"
);
QPRINTK
(
qdev
,
HW
,
ERR
,
"Failed to load MAC address.
\n
"
);
ql_sem_unlock
(
qdev
,
SEM_MAC_ADDR_MASK
);
ql_sem_unlock
(
qdev
,
SEM_MAC_ADDR_MASK
);
...
@@ -3928,7 +3921,6 @@ static int __devinit ql_init_device(struct pci_dev *pdev,
...
@@ -3928,7 +3921,6 @@ static int __devinit ql_init_device(struct pci_dev *pdev,
INIT_DELAYED_WORK
(
&
qdev
->
mpi_work
,
ql_mpi_work
);
INIT_DELAYED_WORK
(
&
qdev
->
mpi_work
,
ql_mpi_work
);
INIT_DELAYED_WORK
(
&
qdev
->
mpi_port_cfg_work
,
ql_mpi_port_cfg_work
);
INIT_DELAYED_WORK
(
&
qdev
->
mpi_port_cfg_work
,
ql_mpi_port_cfg_work
);
INIT_DELAYED_WORK
(
&
qdev
->
mpi_idc_work
,
ql_mpi_idc_work
);
INIT_DELAYED_WORK
(
&
qdev
->
mpi_idc_work
,
ql_mpi_idc_work
);
mutex_init
(
&
qdev
->
mpi_mutex
);
init_completion
(
&
qdev
->
ide_completion
);
init_completion
(
&
qdev
->
ide_completion
);
if
(
!
cards_found
)
{
if
(
!
cards_found
)
{
...
...
drivers/net/qlge/qlge_mpi.c
View file @
7ecc59c1
...
@@ -472,7 +472,6 @@ static int ql_mailbox_command(struct ql_adapter *qdev, struct mbox_params *mbcp)
...
@@ -472,7 +472,6 @@ static int ql_mailbox_command(struct ql_adapter *qdev, struct mbox_params *mbcp)
{
{
int
status
,
count
;
int
status
,
count
;
mutex_lock
(
&
qdev
->
mpi_mutex
);
/* Begin polled mode for MPI */
/* Begin polled mode for MPI */
ql_write32
(
qdev
,
INTR_MASK
,
(
INTR_MASK_PI
<<
16
));
ql_write32
(
qdev
,
INTR_MASK
,
(
INTR_MASK_PI
<<
16
));
...
@@ -541,7 +540,6 @@ static int ql_mailbox_command(struct ql_adapter *qdev, struct mbox_params *mbcp)
...
@@ -541,7 +540,6 @@ static int ql_mailbox_command(struct ql_adapter *qdev, struct mbox_params *mbcp)
status
=
-
EIO
;
status
=
-
EIO
;
}
}
end:
end:
mutex_unlock
(
&
qdev
->
mpi_mutex
);
/* End polled mode for MPI */
/* End polled mode for MPI */
ql_write32
(
qdev
,
INTR_MASK
,
(
INTR_MASK_PI
<<
16
)
|
INTR_MASK_PI
);
ql_write32
(
qdev
,
INTR_MASK
,
(
INTR_MASK_PI
<<
16
)
|
INTR_MASK_PI
);
return
status
;
return
status
;
...
@@ -776,7 +774,9 @@ static int ql_idc_wait(struct ql_adapter *qdev)
...
@@ -776,7 +774,9 @@ static int ql_idc_wait(struct ql_adapter *qdev)
static
int
ql_set_port_cfg
(
struct
ql_adapter
*
qdev
)
static
int
ql_set_port_cfg
(
struct
ql_adapter
*
qdev
)
{
{
int
status
;
int
status
;
rtnl_lock
();
status
=
ql_mb_set_port_cfg
(
qdev
);
status
=
ql_mb_set_port_cfg
(
qdev
);
rtnl_unlock
();
if
(
status
)
if
(
status
)
return
status
;
return
status
;
status
=
ql_idc_wait
(
qdev
);
status
=
ql_idc_wait
(
qdev
);
...
@@ -797,7 +797,9 @@ void ql_mpi_port_cfg_work(struct work_struct *work)
...
@@ -797,7 +797,9 @@ void ql_mpi_port_cfg_work(struct work_struct *work)
container_of
(
work
,
struct
ql_adapter
,
mpi_port_cfg_work
.
work
);
container_of
(
work
,
struct
ql_adapter
,
mpi_port_cfg_work
.
work
);
int
status
;
int
status
;
rtnl_lock
();
status
=
ql_mb_get_port_cfg
(
qdev
);
status
=
ql_mb_get_port_cfg
(
qdev
);
rtnl_unlock
();
if
(
status
)
{
if
(
status
)
{
QPRINTK
(
qdev
,
DRV
,
ERR
,
QPRINTK
(
qdev
,
DRV
,
ERR
,
"Bug: Failed to get port config data.
\n
"
);
"Bug: Failed to get port config data.
\n
"
);
...
@@ -855,7 +857,9 @@ void ql_mpi_idc_work(struct work_struct *work)
...
@@ -855,7 +857,9 @@ void ql_mpi_idc_work(struct work_struct *work)
* needs to be set.
* needs to be set.
* */
* */
set_bit
(
QL_CAM_RT_SET
,
&
qdev
->
flags
);
set_bit
(
QL_CAM_RT_SET
,
&
qdev
->
flags
);
rtnl_lock
();
status
=
ql_mb_idc_ack
(
qdev
);
status
=
ql_mb_idc_ack
(
qdev
);
rtnl_unlock
();
if
(
status
)
{
if
(
status
)
{
QPRINTK
(
qdev
,
DRV
,
ERR
,
QPRINTK
(
qdev
,
DRV
,
ERR
,
"Bug: No pending IDC!
\n
"
);
"Bug: No pending IDC!
\n
"
);
...
@@ -871,7 +875,7 @@ void ql_mpi_work(struct work_struct *work)
...
@@ -871,7 +875,7 @@ void ql_mpi_work(struct work_struct *work)
struct
mbox_params
*
mbcp
=
&
mbc
;
struct
mbox_params
*
mbcp
=
&
mbc
;
int
err
=
0
;
int
err
=
0
;
mutex_lock
(
&
qdev
->
mpi_mutex
);
rtnl_lock
(
);
while
(
ql_read32
(
qdev
,
STS
)
&
STS_PI
)
{
while
(
ql_read32
(
qdev
,
STS
)
&
STS_PI
)
{
memset
(
mbcp
,
0
,
sizeof
(
struct
mbox_params
));
memset
(
mbcp
,
0
,
sizeof
(
struct
mbox_params
));
...
@@ -884,7 +888,7 @@ void ql_mpi_work(struct work_struct *work)
...
@@ -884,7 +888,7 @@ void ql_mpi_work(struct work_struct *work)
break
;
break
;
}
}
mutex_unlock
(
&
qdev
->
mpi_mutex
);
rtnl_unlock
(
);
ql_enable_completion_interrupt
(
qdev
,
0
);
ql_enable_completion_interrupt
(
qdev
,
0
);
}
}
...
...
drivers/serial/serial_cs.c
View file @
7ecc59c1
...
@@ -873,10 +873,10 @@ static struct pcmcia_device_id serial_ids[] = {
...
@@ -873,10 +873,10 @@ static struct pcmcia_device_id serial_ids[] = {
PCMCIA_PFC_DEVICE_CIS_PROD_ID12
(
1
,
"Psion Dacom"
,
"Gold Card V34 Ethernet"
,
0xf5f025c2
,
0x338e8155
,
"cis/PCMLM28.cis"
),
PCMCIA_PFC_DEVICE_CIS_PROD_ID12
(
1
,
"Psion Dacom"
,
"Gold Card V34 Ethernet"
,
0xf5f025c2
,
0x338e8155
,
"cis/PCMLM28.cis"
),
PCMCIA_PFC_DEVICE_CIS_PROD_ID12
(
1
,
"Psion Dacom"
,
"Gold Card V34 Ethernet GSM"
,
0xf5f025c2
,
0x4ae85d35
,
"cis/PCMLM28.cis"
),
PCMCIA_PFC_DEVICE_CIS_PROD_ID12
(
1
,
"Psion Dacom"
,
"Gold Card V34 Ethernet GSM"
,
0xf5f025c2
,
0x4ae85d35
,
"cis/PCMLM28.cis"
),
PCMCIA_PFC_DEVICE_CIS_PROD_ID12
(
1
,
"LINKSYS"
,
"PCMLM28"
,
0xf7cb0b07
,
0x66881874
,
"cis/PCMLM28.cis"
),
PCMCIA_PFC_DEVICE_CIS_PROD_ID12
(
1
,
"LINKSYS"
,
"PCMLM28"
,
0xf7cb0b07
,
0x66881874
,
"cis/PCMLM28.cis"
),
PCMCIA_MFC_DEVICE_CIS_PROD_ID12
(
1
,
"DAYNA COMMUNICATIONS"
,
"LAN AND MODEM MULTIFUNCTION"
,
0x8fdf8f89
,
0xdd5ed9e8
,
"DP83903.cis"
),
PCMCIA_MFC_DEVICE_CIS_PROD_ID12
(
1
,
"DAYNA COMMUNICATIONS"
,
"LAN AND MODEM MULTIFUNCTION"
,
0x8fdf8f89
,
0xdd5ed9e8
,
"
cis/
DP83903.cis"
),
PCMCIA_MFC_DEVICE_CIS_PROD_ID4
(
1
,
"NSC MF LAN/Modem"
,
0x58fc6056
,
"DP83903.cis"
),
PCMCIA_MFC_DEVICE_CIS_PROD_ID4
(
1
,
"NSC MF LAN/Modem"
,
0x58fc6056
,
"
cis/
DP83903.cis"
),
PCMCIA_MFC_DEVICE_CIS_MANF_CARD
(
1
,
0x0101
,
0x0556
,
"cis/3CCFEM556.cis"
),
PCMCIA_MFC_DEVICE_CIS_MANF_CARD
(
1
,
0x0101
,
0x0556
,
"cis/3CCFEM556.cis"
),
PCMCIA_MFC_DEVICE_CIS_MANF_CARD
(
1
,
0x0175
,
0x0000
,
"DP83903.cis"
),
PCMCIA_MFC_DEVICE_CIS_MANF_CARD
(
1
,
0x0175
,
0x0000
,
"
cis/
DP83903.cis"
),
PCMCIA_MFC_DEVICE_CIS_MANF_CARD
(
1
,
0x0101
,
0x0035
,
"cis/3CXEM556.cis"
),
PCMCIA_MFC_DEVICE_CIS_MANF_CARD
(
1
,
0x0101
,
0x0035
,
"cis/3CXEM556.cis"
),
PCMCIA_MFC_DEVICE_CIS_MANF_CARD
(
1
,
0x0101
,
0x003d
,
"cis/3CXEM556.cis"
),
PCMCIA_MFC_DEVICE_CIS_MANF_CARD
(
1
,
0x0101
,
0x003d
,
"cis/3CXEM556.cis"
),
PCMCIA_DEVICE_CIS_PROD_ID12
(
"Sierra Wireless"
,
"AC850"
,
0xd85f6206
,
0x42a2c018
,
"SW_8xx_SER.cis"
),
/* Sierra Wireless AC850 3G Network Adapter R1 */
PCMCIA_DEVICE_CIS_PROD_ID12
(
"Sierra Wireless"
,
"AC850"
,
0xd85f6206
,
0x42a2c018
,
"SW_8xx_SER.cis"
),
/* Sierra Wireless AC850 3G Network Adapter R1 */
...
@@ -884,9 +884,9 @@ static struct pcmcia_device_id serial_ids[] = {
...
@@ -884,9 +884,9 @@ static struct pcmcia_device_id serial_ids[] = {
PCMCIA_DEVICE_CIS_MANF_CARD
(
0x0192
,
0xa555
,
"SW_555_SER.cis"
),
/* Sierra Aircard 555 CDMA 1xrtt Modem -- pre update */
PCMCIA_DEVICE_CIS_MANF_CARD
(
0x0192
,
0xa555
,
"SW_555_SER.cis"
),
/* Sierra Aircard 555 CDMA 1xrtt Modem -- pre update */
PCMCIA_DEVICE_CIS_MANF_CARD
(
0x013f
,
0xa555
,
"SW_555_SER.cis"
),
/* Sierra Aircard 555 CDMA 1xrtt Modem -- post update */
PCMCIA_DEVICE_CIS_MANF_CARD
(
0x013f
,
0xa555
,
"SW_555_SER.cis"
),
/* Sierra Aircard 555 CDMA 1xrtt Modem -- post update */
PCMCIA_DEVICE_CIS_PROD_ID12
(
"MultiTech"
,
"PCMCIA 56K DataFax"
,
0x842047ee
,
0xc2efcf03
,
"cis/MT5634ZLX.cis"
),
PCMCIA_DEVICE_CIS_PROD_ID12
(
"MultiTech"
,
"PCMCIA 56K DataFax"
,
0x842047ee
,
0xc2efcf03
,
"cis/MT5634ZLX.cis"
),
PCMCIA_DEVICE_CIS_PROD_ID12
(
"ADVANTECH"
,
"COMpad-32/85B-2"
,
0x96913a85
,
0x27ab5437
,
"COMpad2.cis"
),
PCMCIA_DEVICE_CIS_PROD_ID12
(
"ADVANTECH"
,
"COMpad-32/85B-2"
,
0x96913a85
,
0x27ab5437
,
"
cis/
COMpad2.cis"
),
PCMCIA_DEVICE_CIS_PROD_ID12
(
"ADVANTECH"
,
"COMpad-32/85B-4"
,
0x96913a85
,
0xcec8f102
,
"COMpad4.cis"
),
PCMCIA_DEVICE_CIS_PROD_ID12
(
"ADVANTECH"
,
"COMpad-32/85B-4"
,
0x96913a85
,
0xcec8f102
,
"
cis/
COMpad4.cis"
),
PCMCIA_DEVICE_CIS_PROD_ID123
(
"ADVANTECH"
,
"COMpad-32/85"
,
"1.0"
,
0x96913a85
,
0x8fbe92ae
,
0x0877b627
,
"COMpad2.cis"
),
PCMCIA_DEVICE_CIS_PROD_ID123
(
"ADVANTECH"
,
"COMpad-32/85"
,
"1.0"
,
0x96913a85
,
0x8fbe92ae
,
0x0877b627
,
"
cis/
COMpad2.cis"
),
PCMCIA_DEVICE_CIS_PROD_ID2
(
"RS-COM 2P"
,
0xad20b156
,
"cis/RS-COM-2P.cis"
),
PCMCIA_DEVICE_CIS_PROD_ID2
(
"RS-COM 2P"
,
0xad20b156
,
"cis/RS-COM-2P.cis"
),
PCMCIA_DEVICE_CIS_MANF_CARD
(
0x0013
,
0x0000
,
"GLOBETROTTER.cis"
),
PCMCIA_DEVICE_CIS_MANF_CARD
(
0x0013
,
0x0000
,
"GLOBETROTTER.cis"
),
PCMCIA_DEVICE_PROD_ID12
(
"ELAN DIGITAL SYSTEMS LTD, c1997."
,
"SERIAL CARD: SL100 1.00."
,
0x19ca78af
,
0xf964f42b
),
PCMCIA_DEVICE_PROD_ID12
(
"ELAN DIGITAL SYSTEMS LTD, c1997."
,
"SERIAL CARD: SL100 1.00."
,
0x19ca78af
,
0xf964f42b
),
...
...
firmware/Makefile
View file @
7ecc59c1
...
@@ -67,10 +67,13 @@ fw-shipped-$(CONFIG_DVB_TTUSB_BUDGET) += ttusb-budget/dspbootcode.bin
...
@@ -67,10 +67,13 @@ fw-shipped-$(CONFIG_DVB_TTUSB_BUDGET) += ttusb-budget/dspbootcode.bin
fw-shipped-$(CONFIG_E100)
+=
e100/d101m_ucode.bin e100/d101s_ucode.bin
\
fw-shipped-$(CONFIG_E100)
+=
e100/d101m_ucode.bin e100/d101s_ucode.bin
\
e100/d102e_ucode.bin
e100/d102e_ucode.bin
fw-shipped-$(CONFIG_MYRI_SBUS)
+=
myricom/lanai.bin
fw-shipped-$(CONFIG_MYRI_SBUS)
+=
myricom/lanai.bin
fw-shipped-$(CONFIG_PCMCIA_PCNET)
+=
cis/LA-PCM.cis cis/PCMLM28.cis
fw-shipped-$(CONFIG_PCMCIA_PCNET)
+=
cis/LA-PCM.cis cis/PCMLM28.cis
\
cis/DP83903.cis cis/NE2K.cis
\
cis/tamarack.cis
fw-shipped-$(CONFIG_PCMCIA_3C589)
+=
cis/3CXEM556.cis
fw-shipped-$(CONFIG_PCMCIA_3C589)
+=
cis/3CXEM556.cis
fw-shipped-$(CONFIG_PCMCIA_3C574)
+=
cis/3CCFEM556.cis
fw-shipped-$(CONFIG_PCMCIA_3C574)
+=
cis/3CCFEM556.cis
fw-shipped-$(CONFIG_SERIAL_8250_CS)
+=
cis/MT5634ZLX.cis cis/RS-COM-2P.cis
fw-shipped-$(CONFIG_SERIAL_8250_CS)
+=
cis/MT5634ZLX.cis cis/RS-COM-2P.cis
\
cis/COMpad2.cis cis/COMpad4.cis
fw-shipped-$(CONFIG_PCMCIA_SMC91C92)
+=
ositech/Xilinx7OD.bin
fw-shipped-$(CONFIG_PCMCIA_SMC91C92)
+=
ositech/Xilinx7OD.bin
fw-shipped-$(CONFIG_SCSI_ADVANSYS)
+=
advansys/mcode.bin advansys/38C1600.bin
\
fw-shipped-$(CONFIG_SCSI_ADVANSYS)
+=
advansys/mcode.bin advansys/38C1600.bin
\
advansys/3550.bin advansys/38C0800.bin
advansys/3550.bin advansys/38C0800.bin
...
...
firmware/WHENCE
View file @
7ecc59c1
...
@@ -597,6 +597,9 @@ Driver: PCMCIA_PCNET - NE2000 compatible PCMCIA adapter
...
@@ -597,6 +597,9 @@ Driver: PCMCIA_PCNET - NE2000 compatible PCMCIA adapter
File: cis/LA-PCM.cis
File: cis/LA-PCM.cis
cis/PCMLM28.cis
cis/PCMLM28.cis
cis/DP83903.cis
cis/NE2K.cis
cis/tamarack.cis
Licence: GPL
Licence: GPL
...
@@ -628,6 +631,8 @@ Driver: SERIAL_8250_CS - Serial PCMCIA adapter
...
@@ -628,6 +631,8 @@ Driver: SERIAL_8250_CS - Serial PCMCIA adapter
File: cis/MT5634ZLX.cis
File: cis/MT5634ZLX.cis
cis/RS-COM-2P.cis
cis/RS-COM-2P.cis
cis/COMpad2.cis
cis/COMpad4.cis
Licence: GPL
Licence: GPL
...
...
firmware/cis/COMpad2.cis.ihex
0 → 100644
View file @
7ecc59c1
:1000000001030000FF151F0401414456414E5445B1
:10001000434800434F4D7061642D33322F38350013
:10002000312E300000FF210202011A0501050001F6
:10003000031B0EC18118AA61E80207E8030730B864
:100040009E1B08820108AA6030030F1B0883010869
:10005000AA6040030F1B08840108AA6050030F1B0D
:0D00600008850108AA6060030F1400FF006E
:00000001FF
#
# Replacement CIS for Advantech COMpad-32/85
#
firmware/cis/COMpad4.cis.ihex
0 → 100644
View file @
7ecc59c1
:1000000001030000FF151F0401414456414E5445B1
:10001000434800434F4D7061642D33322F383542D1
:100020002D34000000FF210202011A050102000127
:10003000011B0BC18118AA6040021F30B89E1B082B
:0C004000820108AA6040031F1400FF00AA
:00000001FF
#
# Replacement CIS for Advantech COMpad-32/85B-4
#
firmware/cis/DP83903.cis.ihex
0 → 100644
View file @
7ecc59c1
:1000000001030000FF152904014D756C74696675C4
:100010006E6374696F6E20436172640000004E531A
:1000200043204D46204C414E2F4D6F64656D00FFBF
:1000300020047501000021020000060B02004900A7
:100040000000006A000000FF00130343495321022F
:1000500006001A060517201077021B0C970179017C
:10006000556530FFFF284000FF001303434953212B
:100070000202001A060507401077021B09870119C2
:0800800001552330FFFFFF00D2
:00000001FF
#
# This CIS is for cards based on the National Semiconductor
# DP83903 Multiple Function Interface Chip
#
firmware/cis/NE2K.cis.ihex
0 → 100644
View file @
7ecc59c1
:1000000001030000FF1515040150434D4349410011
:1000100045746865726E6574000000FF2102060079
:100020001A050120F803031B09E001190155653089
:06003000FFFF1400FF00B9
:00000001FF
#
# Replacement CIS for various busted NE2000-compatible cards
#
firmware/cis/tamarack.cis.ihex
0 → 100644
View file @
7ecc59c1
:100000000103D400FF17034100FF152404015441EC
:100010004D415241434B0045746865726E657400F2
:10002000410030303437343331313830303100FF33
:10003000210206001A050120F803031B14E08119B0
:100040003F554D5D06864626E551000F100F30FFE7
:05005000FF1400FF0099
:00000001FF
#
# Replacement CIS for Surecom, Tamarack NE2000 cards
#
include/linux/socket.h
View file @
7ecc59c1
...
@@ -16,7 +16,7 @@ struct __kernel_sockaddr_storage {
...
@@ -16,7 +16,7 @@ struct __kernel_sockaddr_storage {
/* _SS_MAXSIZE value minus size of ss_family */
/* _SS_MAXSIZE value minus size of ss_family */
}
__attribute__
((
aligned
(
_K_SS_ALIGNSIZE
)));
/* force desired alignment */
}
__attribute__
((
aligned
(
_K_SS_ALIGNSIZE
)));
/* force desired alignment */
#if
defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
#if
def __KERNEL__
#include <asm/socket.h>
/* arch-dependent defines */
#include <asm/socket.h>
/* arch-dependent defines */
#include <linux/sockios.h>
/* the SIOCxxx I/O controls */
#include <linux/sockios.h>
/* the SIOCxxx I/O controls */
...
@@ -100,21 +100,6 @@ struct cmsghdr {
...
@@ -100,21 +100,6 @@ struct cmsghdr {
((mhdr)->msg_controllen - \
((mhdr)->msg_controllen - \
((char *)(cmsg) - (char *)(mhdr)->msg_control)))
((char *)(cmsg) - (char *)(mhdr)->msg_control)))
/*
* This mess will go away with glibc
*/
#ifdef __KERNEL__
#define __KINLINE static inline
#elif defined(__GNUC__)
#define __KINLINE static __inline__
#elif defined(__cplusplus)
#define __KINLINE static inline
#else
#define __KINLINE static
#endif
/*
/*
* Get the next cmsg header
* Get the next cmsg header
*
*
...
@@ -128,7 +113,7 @@ struct cmsghdr {
...
@@ -128,7 +113,7 @@ struct cmsghdr {
* ancillary object DATA. --ANK (980731)
* ancillary object DATA. --ANK (980731)
*/
*/
__KINLINE
struct
cmsghdr
*
__cmsg_nxthdr
(
void
*
__ctl
,
__kernel_size_t
__size
,
static
inline
struct
cmsghdr
*
__cmsg_nxthdr
(
void
*
__ctl
,
__kernel_size_t
__size
,
struct
cmsghdr
*
__cmsg
)
struct
cmsghdr
*
__cmsg
)
{
{
struct
cmsghdr
*
__ptr
;
struct
cmsghdr
*
__ptr
;
...
@@ -140,7 +125,7 @@ __KINLINE struct cmsghdr * __cmsg_nxthdr(void *__ctl, __kernel_size_t __size,
...
@@ -140,7 +125,7 @@ __KINLINE struct cmsghdr * __cmsg_nxthdr(void *__ctl, __kernel_size_t __size,
return
__ptr
;
return
__ptr
;
}
}
__KINLINE
struct
cmsghdr
*
cmsg_nxthdr
(
struct
msghdr
*
__msg
,
struct
cmsghdr
*
__cmsg
)
static
inline
struct
cmsghdr
*
cmsg_nxthdr
(
struct
msghdr
*
__msg
,
struct
cmsghdr
*
__cmsg
)
{
{
return
__cmsg_nxthdr
(
__msg
->
msg_control
,
__msg
->
msg_controllen
,
__cmsg
);
return
__cmsg_nxthdr
(
__msg
->
msg_control
,
__msg
->
msg_controllen
,
__cmsg
);
}
}
...
...
net/core/net-sysfs.c
View file @
7ecc59c1
...
@@ -406,13 +406,13 @@ static ssize_t wireless_show(struct device *d, char *buf,
...
@@ -406,13 +406,13 @@ static ssize_t wireless_show(struct device *d, char *buf,
const
struct
iw_statistics
*
iw
;
const
struct
iw_statistics
*
iw
;
ssize_t
ret
=
-
EINVAL
;
ssize_t
ret
=
-
EINVAL
;
r
ead_lock
(
&
dev_base_lock
);
r
tnl_lock
(
);
if
(
dev_isalive
(
dev
))
{
if
(
dev_isalive
(
dev
))
{
iw
=
get_wireless_stats
(
dev
);
iw
=
get_wireless_stats
(
dev
);
if
(
iw
)
if
(
iw
)
ret
=
(
*
format
)(
iw
,
buf
);
ret
=
(
*
format
)(
iw
,
buf
);
}
}
r
ead_unlock
(
&
dev_base_lock
);
r
tnl_unlock
(
);
return
ret
;
return
ret
;
}
}
...
...
net/core/pktgen.c
View file @
7ecc59c1
...
@@ -964,7 +964,7 @@ static ssize_t pktgen_if_write(struct file *file,
...
@@ -964,7 +964,7 @@ static ssize_t pktgen_if_write(struct file *file,
if
(
value
==
0x7FFFFFFF
)
if
(
value
==
0x7FFFFFFF
)
pkt_dev
->
delay
=
ULLONG_MAX
;
pkt_dev
->
delay
=
ULLONG_MAX
;
else
else
pkt_dev
->
delay
=
(
u64
)
value
*
NSEC_PER_USEC
;
pkt_dev
->
delay
=
(
u64
)
value
;
sprintf
(
pg_result
,
"OK: delay=%llu"
,
sprintf
(
pg_result
,
"OK: delay=%llu"
,
(
unsigned
long
long
)
pkt_dev
->
delay
);
(
unsigned
long
long
)
pkt_dev
->
delay
);
...
@@ -2212,7 +2212,7 @@ static void set_cur_queue_map(struct pktgen_dev *pkt_dev)
...
@@ -2212,7 +2212,7 @@ static void set_cur_queue_map(struct pktgen_dev *pkt_dev)
if
(
pkt_dev
->
flags
&
F_QUEUE_MAP_CPU
)
if
(
pkt_dev
->
flags
&
F_QUEUE_MAP_CPU
)
pkt_dev
->
cur_queue_map
=
smp_processor_id
();
pkt_dev
->
cur_queue_map
=
smp_processor_id
();
else
if
(
pkt_dev
->
queue_map_min
<
pkt_dev
->
queue_map_max
)
{
else
if
(
pkt_dev
->
queue_map_min
<
=
pkt_dev
->
queue_map_max
)
{
__u16
t
;
__u16
t
;
if
(
pkt_dev
->
flags
&
F_QUEUE_MAP_RND
)
{
if
(
pkt_dev
->
flags
&
F_QUEUE_MAP_RND
)
{
t
=
random32
()
%
t
=
random32
()
%
...
...
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