Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 93105
b: refs/heads/master
c: afd1dee
h: refs/heads/master
i:
  93103: 910bb71
v: v3
  • Loading branch information
Stefan Roese authored and Jeff Garzik committed Apr 25, 2008
1 parent 011dd71 commit 3edf6db
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f34ebab68a8e3c80ff4364f4c61734faec5161d4
refs/heads/master: afd1dee896e8b1cbd24258ac673aeccd803ff582
16 changes: 16 additions & 0 deletions trunk/drivers/net/ibm_newemac/mal.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,14 @@ void mal_enable_rx_channel(struct mal_instance *mal, int channel)
{
unsigned long flags;

/*
* On some 4xx PPC's (e.g. 460EX/GT), the rx channel is a multiple
* of 8, but enabling in MAL_RXCASR needs the divided by 8 value
* for the bitmask
*/
if (!(channel % 8))
channel >>= 3;

spin_lock_irqsave(&mal->lock, flags);

MAL_DBG(mal, "enable_rx(%d)" NL, channel);
Expand All @@ -148,6 +156,14 @@ void mal_enable_rx_channel(struct mal_instance *mal, int channel)

void mal_disable_rx_channel(struct mal_instance *mal, int channel)
{
/*
* On some 4xx PPC's (e.g. 460EX/GT), the rx channel is a multiple
* of 8, but enabling in MAL_RXCASR needs the divided by 8 value
* for the bitmask
*/
if (!(channel % 8))
channel >>= 3;

set_mal_dcrn(mal, MAL_RXCARR, MAL_CHAN_MASK(channel));

MAL_DBG(mal, "disable_rx(%d)" NL, channel);
Expand Down

0 comments on commit 3edf6db

Please sign in to comment.