Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 43517
b: refs/heads/master
c: 0a85885
h: refs/heads/master
i:
  43515: 5f3bc22
v: v3
  • Loading branch information
Akinobu Mita authored and Linus Torvalds committed Dec 8, 2006
1 parent 4dd4d39 commit a8acf01
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 15 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: 60e657e377037d8ce82015903dd195851b7861ed
refs/heads/master: 0a8588578508a6c58a30ad1a7e23b285cfab49f3
1 change: 1 addition & 0 deletions trunk/drivers/atm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ config ATM_IDT77252_USE_SUNI
config ATM_AMBASSADOR
tristate "Madge Ambassador (Collage PCI 155 Server)"
depends on PCI && ATM
select BITREVERSE
help
This is a driver for ATMizer based ATM card produced by Madge
Networks Ltd. Say Y (or M to compile as a module named ambassador)
Expand Down
17 changes: 3 additions & 14 deletions trunk/drivers/atm/ambassador.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/poison.h>
#include <linux/bitrev.h>

#include <asm/atomic.h>
#include <asm/io.h>
Expand Down Expand Up @@ -2068,18 +2069,6 @@ static void __devinit amb_ucode_version (amb_dev * dev) {
PRINTK (KERN_INFO, "microcode version is %u.%u", major, minor);
}

// swap bits within byte to get Ethernet ordering
static u8 bit_swap (u8 byte)
{
const u8 swap[] = {
0x0, 0x8, 0x4, 0xc,
0x2, 0xa, 0x6, 0xe,
0x1, 0x9, 0x5, 0xd,
0x3, 0xb, 0x7, 0xf
};
return ((swap[byte & 0xf]<<4) | swap[byte>>4]);
}

// get end station address
static void __devinit amb_esi (amb_dev * dev, u8 * esi) {
u32 lower4;
Expand All @@ -2101,9 +2090,9 @@ static void __devinit amb_esi (amb_dev * dev, u8 * esi) {
PRINTDB (DBG_INIT, "ESI:");
for (i = 0; i < ESI_LEN; ++i) {
if (i < 4)
esi[i] = bit_swap (lower4>>(8*i));
esi[i] = bitrev8(lower4>>(8*i));
else
esi[i] = bit_swap (upper2>>(8*(i-4)));
esi[i] = bitrev8(upper2>>(8*(i-4)));
PRINTDM (DBG_INIT, " %02x", esi[i]);
}

Expand Down

0 comments on commit a8acf01

Please sign in to comment.