Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 149604
b: refs/heads/master
c: 345f842
h: refs/heads/master
v: v3
  • Loading branch information
Haiying Wang authored and Kumar Gala committed May 19, 2009
1 parent e74bf6f commit 87b265e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 06c4435021f4856261edd01e2691071edeb8fa51
refs/heads/master: 345f84227b50e90329dd303499024603596566f4
14 changes: 11 additions & 3 deletions trunk/drivers/net/ucc_geth.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ static int fill_init_enet_entries(struct ucc_geth_private *ugeth,
u8 num_entries,
u32 thread_size,
u32 thread_alignment,
enum qe_risc_allocation risc,
unsigned int risc,
int skip_page_for_first_entry)
{
u32 init_enet_offset;
Expand Down Expand Up @@ -307,7 +307,7 @@ static int fill_init_enet_entries(struct ucc_geth_private *ugeth,
static int return_init_enet_entries(struct ucc_geth_private *ugeth,
u32 *p_start,
u8 num_entries,
enum qe_risc_allocation risc,
unsigned int risc,
int skip_page_for_first_entry)
{
u32 init_enet_offset;
Expand Down Expand Up @@ -342,7 +342,7 @@ static int dump_init_enet_entries(struct ucc_geth_private *ugeth,
u32 __iomem *p_start,
u8 num_entries,
u32 thread_size,
enum qe_risc_allocation risc,
unsigned int risc,
int skip_page_for_first_entry)
{
u32 init_enet_offset;
Expand Down Expand Up @@ -2135,6 +2135,14 @@ static int ucc_struct_init(struct ucc_geth_private *ugeth)
return -ENOMEM;
}

/* read the number of risc engines, update the riscTx and riscRx
* if there are 4 riscs in QE
*/
if (qe_get_num_of_risc() == 4) {
ug_info->riscTx = QE_RISC_ALLOCATION_FOUR_RISCS;
ug_info->riscRx = QE_RISC_ALLOCATION_FOUR_RISCS;
}

ugeth->ug_regs = ioremap(uf_info->regs, sizeof(*ugeth->ug_regs));
if (!ugeth->ug_regs) {
if (netif_msg_probe(ugeth))
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/ucc_geth.h
Original file line number Diff line number Diff line change
Expand Up @@ -1120,8 +1120,8 @@ struct ucc_geth_info {
enum ucc_geth_maccfg2_pad_and_crc_mode padAndCrc;
enum ucc_geth_num_of_threads numThreadsTx;
enum ucc_geth_num_of_threads numThreadsRx;
enum qe_risc_allocation riscTx;
enum qe_risc_allocation riscRx;
unsigned int riscTx;
unsigned int riscRx;
};

/* structure representing UCC GETH */
Expand Down

0 comments on commit 87b265e

Please sign in to comment.