Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
c15eed22
Commit
c15eed22
authored
Aug 29, 2013
by
Ben Hutchings
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sfc: Allow efx_nic_type::dimension_resources to fail
Signed-off-by:
Ben Hutchings
<
bhutchings@solarflare.com
>
parent
261e4d96
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
6 deletions
+12
-6
drivers/net/ethernet/sfc/efx.c
drivers/net/ethernet/sfc/efx.c
+7
-3
drivers/net/ethernet/sfc/falcon.c
drivers/net/ethernet/sfc/falcon.c
+2
-1
drivers/net/ethernet/sfc/net_driver.h
drivers/net/ethernet/sfc/net_driver.h
+1
-1
drivers/net/ethernet/sfc/siena.c
drivers/net/ethernet/sfc/siena.c
+2
-1
No files found.
drivers/net/ethernet/sfc/efx.c
View file @
c15eed22
...
...
@@ -1513,9 +1513,11 @@ static int efx_probe_nic(struct efx_nic *efx)
* in MSI-X interrupts. */
rc
=
efx_probe_interrupts
(
efx
);
if
(
rc
)
goto
fail
;
goto
fail
1
;
efx
->
type
->
dimension_resources
(
efx
);
rc
=
efx
->
type
->
dimension_resources
(
efx
);
if
(
rc
)
goto
fail2
;
if
(
efx
->
n_channels
>
1
)
get_random_bytes
(
&
efx
->
rx_hash_key
,
sizeof
(
efx
->
rx_hash_key
));
...
...
@@ -1533,7 +1535,9 @@ static int efx_probe_nic(struct efx_nic *efx)
return
0
;
fail:
fail2:
efx_remove_interrupts
(
efx
);
fail1:
efx
->
type
->
remove
(
efx
);
return
rc
;
}
...
...
drivers/net/ethernet/sfc/falcon.c
View file @
c15eed22
...
...
@@ -2174,10 +2174,11 @@ static int falcon_probe_nvconfig(struct efx_nic *efx)
return
rc
;
}
static
void
falcon_dimension_resources
(
struct
efx_nic
*
efx
)
static
int
falcon_dimension_resources
(
struct
efx_nic
*
efx
)
{
efx
->
rx_dc_base
=
0x20000
;
efx
->
tx_dc_base
=
0x26000
;
return
0
;
}
/* Probe all SPI devices on the NIC */
...
...
drivers/net/ethernet/sfc/net_driver.h
View file @
c15eed22
...
...
@@ -1036,7 +1036,7 @@ struct efx_nic_type {
int
(
*
probe
)(
struct
efx_nic
*
efx
);
void
(
*
remove
)(
struct
efx_nic
*
efx
);
int
(
*
init
)(
struct
efx_nic
*
efx
);
void
(
*
dimension_resources
)(
struct
efx_nic
*
efx
);
int
(
*
dimension_resources
)(
struct
efx_nic
*
efx
);
void
(
*
fini
)(
struct
efx_nic
*
efx
);
void
(
*
monitor
)(
struct
efx_nic
*
efx
);
enum
reset_type
(
*
map_reset_reason
)(
enum
reset_type
reason
);
...
...
drivers/net/ethernet/sfc/siena.c
View file @
c15eed22
...
...
@@ -177,13 +177,14 @@ static int siena_probe_nvconfig(struct efx_nic *efx)
return
rc
;
}
static
void
siena_dimension_resources
(
struct
efx_nic
*
efx
)
static
int
siena_dimension_resources
(
struct
efx_nic
*
efx
)
{
/* Each port has a small block of internal SRAM dedicated to
* the buffer table and descriptor caches. In theory we can
* map both blocks to one port, but we don't.
*/
efx_farch_dimension_resources
(
efx
,
FR_CZ_BUF_FULL_TBL_ROWS
/
2
);
return
0
;
}
static
unsigned
int
siena_mem_map_size
(
struct
efx_nic
*
efx
)
...
...
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