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
5009d269
Commit
5009d269
authored
Apr 02, 2007
by
Stefan Richter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ieee1394: eth1394: shorter error messages
Signed-off-by:
Stefan Richter
<
stefanr@s5r6.in-berlin.de
>
parent
027611b8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
24 deletions
+16
-24
drivers/ieee1394/eth1394.c
drivers/ieee1394/eth1394.c
+16
-24
No files found.
drivers/ieee1394/eth1394.c
View file @
5009d269
...
@@ -196,9 +196,8 @@ static struct hpsb_highlevel eth1394_highlevel = {
...
@@ -196,9 +196,8 @@ static struct hpsb_highlevel eth1394_highlevel = {
.
host_reset
=
ether1394_host_reset
,
.
host_reset
=
ether1394_host_reset
,
};
};
static
int
ether1394_recv_init
(
struct
net_device
*
de
v
)
static
int
ether1394_recv_init
(
struct
eth1394_priv
*
pri
v
)
{
{
struct
eth1394_priv
*
priv
=
netdev_priv
(
dev
);
unsigned
int
iso_buf_size
;
unsigned
int
iso_buf_size
;
/* FIXME: rawiso limits us to PAGE_SIZE */
/* FIXME: rawiso limits us to PAGE_SIZE */
...
@@ -212,9 +211,7 @@ static int ether1394_recv_init(struct net_device *dev)
...
@@ -212,9 +211,7 @@ static int ether1394_recv_init(struct net_device *dev)
HPSB_ISO_DMA_PACKET_PER_BUFFER
,
HPSB_ISO_DMA_PACKET_PER_BUFFER
,
1
,
ether1394_iso
);
1
,
ether1394_iso
);
if
(
priv
->
iso
==
NULL
)
{
if
(
priv
->
iso
==
NULL
)
{
ETH1394_PRINT
(
KERN_ERR
,
dev
->
name
,
ETH1394_PRINT_G
(
KERN_ERR
,
"Failed to allocate IR context
\n
"
);
"Could not allocate isochronous receive "
"context for the broadcast channel
\n
"
);
priv
->
bc_state
=
ETHER1394_BC_ERROR
;
priv
->
bc_state
=
ETHER1394_BC_ERROR
;
return
-
EAGAIN
;
return
-
EAGAIN
;
}
}
...
@@ -233,7 +230,7 @@ static int ether1394_open(struct net_device *dev)
...
@@ -233,7 +230,7 @@ static int ether1394_open(struct net_device *dev)
int
ret
;
int
ret
;
if
(
priv
->
bc_state
==
ETHER1394_BC_ERROR
)
{
if
(
priv
->
bc_state
==
ETHER1394_BC_ERROR
)
{
ret
=
ether1394_recv_init
(
de
v
);
ret
=
ether1394_recv_init
(
pri
v
);
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
}
}
...
@@ -560,9 +557,7 @@ static void ether1394_add_host(struct hpsb_host *host)
...
@@ -560,9 +557,7 @@ static void ether1394_add_host(struct hpsb_host *host)
dev
=
alloc_etherdev
(
sizeof
(
struct
eth1394_priv
));
dev
=
alloc_etherdev
(
sizeof
(
struct
eth1394_priv
));
if
(
dev
==
NULL
)
{
if
(
dev
==
NULL
)
{
ETH1394_PRINT_G
(
KERN_ERR
,
"Out of memory trying to allocate "
ETH1394_PRINT_G
(
KERN_ERR
,
"Out of memory
\n
"
);
"etherdevice for IEEE 1394 device %s-%d
\n
"
,
host
->
driver
->
name
,
host
->
id
);
goto
out
;
goto
out
;
}
}
...
@@ -583,20 +578,18 @@ static void ether1394_add_host(struct hpsb_host *host)
...
@@ -583,20 +578,18 @@ static void ether1394_add_host(struct hpsb_host *host)
hi
=
hpsb_create_hostinfo
(
&
eth1394_highlevel
,
host
,
sizeof
(
*
hi
));
hi
=
hpsb_create_hostinfo
(
&
eth1394_highlevel
,
host
,
sizeof
(
*
hi
));
if
(
hi
==
NULL
)
{
if
(
hi
==
NULL
)
{
ETH1394_PRINT_G
(
KERN_ERR
,
"Out of memory trying to create "
ETH1394_PRINT_G
(
KERN_ERR
,
"Out of memory
\n
"
);
"hostinfo for IEEE 1394 device %s-%d
\n
"
,
host
->
driver
->
name
,
host
->
id
);
goto
out
;
goto
out
;
}
}
ether1394_init_dev
(
dev
);
ether1394_init_dev
(
dev
);
if
(
register_netdev
(
dev
))
{
if
(
register_netdev
(
dev
))
{
ETH1394_PRINT
(
KERN_ERR
,
dev
->
name
,
"Error registering network
driver
\n
"
);
ETH1394_PRINT
_G
(
KERN_ERR
,
"Cannot register the
driver
\n
"
);
goto
out
;
goto
out
;
}
}
ETH1394_PRINT
(
KERN_INFO
,
dev
->
name
,
"IEEE-1394 IPv4 over 1394 Ethernet
(fw-host%d)
\n
"
,
ETH1394_PRINT
(
KERN_INFO
,
dev
->
name
,
"IPv4 over IEEE 1394
(fw-host%d)
\n
"
,
host
->
id
);
host
->
id
);
hi
->
host
=
host
;
hi
->
host
=
host
;
...
@@ -606,7 +599,7 @@ static void ether1394_add_host(struct hpsb_host *host)
...
@@ -606,7 +599,7 @@ static void ether1394_add_host(struct hpsb_host *host)
* be checked when the eth device is opened. */
* be checked when the eth device is opened. */
priv
->
broadcast_channel
=
host
->
csr
.
broadcast_channel
&
0x3f
;
priv
->
broadcast_channel
=
host
->
csr
.
broadcast_channel
&
0x3f
;
ether1394_recv_init
(
de
v
);
ether1394_recv_init
(
pri
v
);
return
;
return
;
out:
out:
if
(
dev
)
if
(
dev
)
...
@@ -1084,7 +1077,7 @@ static int ether1394_data_handler(struct net_device *dev, int srcid, int destid,
...
@@ -1084,7 +1077,7 @@ static int ether1394_data_handler(struct net_device *dev, int srcid, int destid,
skb
=
dev_alloc_skb
(
len
+
dev
->
hard_header_len
+
15
);
skb
=
dev_alloc_skb
(
len
+
dev
->
hard_header_len
+
15
);
if
(
!
skb
)
{
if
(
!
skb
)
{
HPSB_PRINT
(
KERN_ERR
,
"ether1394 rx: low on mem
\n
"
);
ETH1394_PRINT_G
(
KERN_ERR
,
"Out of memory
\n
"
);
priv
->
stats
.
rx_dropped
++
;
priv
->
stats
.
rx_dropped
++
;
return
-
1
;
return
-
1
;
}
}
...
@@ -1239,8 +1232,8 @@ static int ether1394_write(struct hpsb_host *host, int srcid, int destid,
...
@@ -1239,8 +1232,8 @@ static int ether1394_write(struct hpsb_host *host, int srcid, int destid,
hi
=
hpsb_get_hostinfo
(
&
eth1394_highlevel
,
host
);
hi
=
hpsb_get_hostinfo
(
&
eth1394_highlevel
,
host
);
if
(
hi
==
NULL
)
{
if
(
hi
==
NULL
)
{
ETH1394_PRINT_G
(
KERN_ERR
,
"
Could not find net device for host %s
\n
"
,
ETH1394_PRINT_G
(
KERN_ERR
,
"
No net device at fw-host%d
\n
"
,
host
->
driver
->
name
);
host
->
id
);
return
RCODE_ADDRESS_ERROR
;
return
RCODE_ADDRESS_ERROR
;
}
}
...
@@ -1265,8 +1258,8 @@ static void ether1394_iso(struct hpsb_iso *iso)
...
@@ -1265,8 +1258,8 @@ static void ether1394_iso(struct hpsb_iso *iso)
hi
=
hpsb_get_hostinfo
(
&
eth1394_highlevel
,
iso
->
host
);
hi
=
hpsb_get_hostinfo
(
&
eth1394_highlevel
,
iso
->
host
);
if
(
hi
==
NULL
)
{
if
(
hi
==
NULL
)
{
ETH1394_PRINT_G
(
KERN_ERR
,
"
Could not find net device for host %s
\n
"
,
ETH1394_PRINT_G
(
KERN_ERR
,
"
No net device at fw-host%d
\n
"
,
iso
->
host
->
driver
->
name
);
iso
->
host
->
id
);
return
;
return
;
}
}
...
@@ -1426,8 +1419,7 @@ static int ether1394_prep_write_packet(struct hpsb_packet *p,
...
@@ -1426,8 +1419,7 @@ static int ether1394_prep_write_packet(struct hpsb_packet *p,
p
->
expect_response
=
1
;
p
->
expect_response
=
1
;
if
(
hpsb_get_tlabel
(
p
))
{
if
(
hpsb_get_tlabel
(
p
))
{
ETH1394_PRINT_G
(
KERN_ERR
,
"No more tlabels left while sending "
ETH1394_PRINT_G
(
KERN_ERR
,
"Out of tlabels
\n
"
);
"to node "
NODE_BUS_FMT
"
\n
"
,
NODE_BUS_ARGS
(
host
,
node
));
return
-
1
;
return
-
1
;
}
}
p
->
header
[
0
]
=
p
->
header
[
0
]
=
...
...
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