VERSION = 2
PATCHLEVEL = 2
SUBLEVEL = 13
-EXTRAVERSION = pre11
+EXTRAVERSION = pre12
ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
EB64+ CONFIG_ALPHA_EB64P \
EB66 CONFIG_ALPHA_EB66 \
EB66+ CONFIG_ALPHA_EB66P \
- Eiger CONFIG_ALPHA_EIGER \
Jensen CONFIG_ALPHA_JENSEN \
LX164 CONFIG_ALPHA_LX164 \
Miata CONFIG_ALPHA_MIATA \
define_bool CONFIG_ALPHA_EV5 y
define_bool CONFIG_ALPHA_PYXIS y
fi
-if [ "$CONFIG_ALPHA_DP264" = "y" -o "$CONFIG_ALPHA_EIGER" = "y" ]
+if [ "$CONFIG_ALPHA_DP264" = "y" ]
then
define_bool CONFIG_PCI y
define_bool CONFIG_ALPHA_EV6 y
-o "$CONFIG_ALPHA_SABLE" = "y" -o "$CONFIG_ALPHA_MIATA" = "y" \
-o "$CONFIG_ALPHA_NORITAKE" = "y" -o "$CONFIG_ALPHA_PC164" = "y" \
-o "$CONFIG_ALPHA_LX164" = "y" -o "$CONFIG_ALPHA_SX164" = "y" \
- -o "$CONFIG_ALPHA_DP264" = "y" -o "$CONFIG_ALPHA_RAWHIDE" = "y" \
- -o "$CONFIG_ALPHA_EIGER" = "y" ]
+ -o "$CONFIG_ALPHA_DP264" = "y" -o "$CONFIG_ALPHA_RAWHIDE" = "y" ]
then
bool 'Use SRM as bootloader' CONFIG_ALPHA_SRM
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
ifneq ($(CONFIG_ALPHA_CABRIOLET)$(CONFIG_ALPHA_EB164)$(CONFIG_ALPHA_EB66P)$(CONFIG_ALPHA_LX164)$(CONFIG_ALPHA_PC164),)
O_OBJS += sys_cabriolet.o
endif
-ifneq ($(CONFIG_ALPHA_DP264)$(CONFIG_ALPHA_EIGER),)
+ifdef CONFIG_ALPHA_DP264
O_OBJS += sys_dp264.o
endif
ifneq ($(CONFIG_ALPHA_EB64P)$(CONFIG_ALPHA_EB66),)
#include <asm/machvec.h>
#include <asm/pgtable.h>
#include <asm/semaphore.h>
-#include <asm/delay.h>
#define __KERNEL_SYSCALLS__
#include <asm/unistd.h>
EXPORT_SYMBOL(__memset);
EXPORT_SYMBOL(__memsetw);
EXPORT_SYMBOL(__constant_c_memset);
-EXPORT_SYMBOL(___delay);
EXPORT_SYMBOL(dump_thread);
EXPORT_SYMBOL(dump_fpu);
/* Bypass hi reg in the loop. */
dev->base_address[++idx] = 0;
- DBG_DEVS(("bios32 WARNING: "
- "handling 64-bit device in "
- "slot %d, function %d: \n",
- PCI_SLOT(dev->devfn),
- PCI_FUNC(dev->devfn)));
+ printk("bios32 WARNING: "
+ "handling 64-bit device in "
+ "slot %d, function %d: \n",
+ PCI_SLOT(dev->devfn),
+ PCI_FUNC(dev->devfn));
}
DBG_DEVS(("layout_dev: dev 0x%x MEM @ 0x%lx (0x%x)\n",
.prologue 0
call_pal PAL_halt
.end halt
-
- #
- # Having the delay loop out of line guarantees that we wont
- # run into weird alignment conditions (on new processors)
- # that vary the speed of the loop.
- #
- .align 5
- .globl ___delay
- .ent ___delay
-___delay:
- .set noat
- .frame $30,0,$28,0
- .prologue 0
-1: subq $0,1,$0
- bge $0,1b
- ret $31,($28),0
- .set at
- .end ___delay
}
}
-struct halt_info {
- int mode;
- char * restart_cmd;
-};
-
-static void
-halt_processor(void * generic_ptr)
+void
+generic_kill_arch (int mode, char *restart_cmd)
{
- struct percpu_struct * cpup;
- struct halt_info * how = (struct halt_info *)generic_ptr;
- unsigned long *flags, dummy = 0;
- int cpuid = smp_processor_id();
-
- /* No point in taking interrupts anymore. */
- cli();
+ /* The following currently only has any effect on SRM. We should
+ fix MILO to understand it. Should be pretty easy. Also we can
+ support RESTART2 via the ipc_buffer machinations pictured below,
+ which SRM ignores. */
if (alpha_using_srm) {
+ struct percpu_struct *cpup;
+ unsigned long flags;
+
cpup = (struct percpu_struct *)
- ((unsigned long)hwrpb + hwrpb->processor_offset
- + hwrpb->processor_size * cpuid);
- flags = &cpup->flags;
- } else
- flags = &dummy;
+ ((unsigned long)hwrpb + hwrpb->processor_offset);
- /* Clear reason to "default"; clear "bootstrap in progress". */
- *flags &= ~0x00ff0001UL;
+ flags = cpup->flags;
-#ifdef __SMP__
- /* Secondaries halt here. */
- if (cpuid != smp_boot_cpuid) {
- *flags |= 0x00040000UL;
- clear_bit(cpuid, &cpu_present_mask);
- halt();
+ /* Clear reason to "default"; clear "bootstrap in progress". */
+ flags &= ~0x00ff0001UL;
+
+ if (mode == LINUX_REBOOT_CMD_RESTART) {
+ if (!restart_cmd) {
+ flags |= 0x00020000UL; /* "cold bootstrap" */
+ cpup->ipc_buffer[0] = 0;
+ } else {
+ flags |= 0x00030000UL; /* "warm bootstrap" */
+ strncpy((char *)cpup->ipc_buffer, restart_cmd,
+ sizeof(cpup->ipc_buffer));
+ }
+ } else {
+ flags |= 0x00040000UL; /* "remain halted" */
+ }
+
+ cpup->flags = flags;
+ mb();
+
+ reset_for_srm();
+ set_hae(srm_hae);
+
+#ifdef CONFIG_DUMMY_CONSOLE
+ /* This has the effect of reseting the VGA video origin. */
+ take_over_console(&dummy_con, 0, MAX_NR_CONSOLES-1, 1);
+#endif
}
-#endif /* __SMP__ */
+
#ifdef CONFIG_RTC
/* Reset rtc to defaults. */
{
unsigned char control;
+ cli();
+
/* Reset periodic interrupt frequency. */
CMOS_WRITE(0x26, RTC_FREQ_SELECT);
control |= RTC_PIE;
CMOS_WRITE(control, RTC_CONTROL);
CMOS_READ(RTC_INTR_FLAGS);
- }
-#endif /* CONFIG_RTC */
- if (alpha_using_srm) {
- if (how->mode == LINUX_REBOOT_CMD_RESTART) {
- if (!how->restart_cmd) {
- *flags |= 0x00020000UL; /* "cold bootstrap" */
- cpup->ipc_buffer[0] = 0;
- } else {
- *flags |= 0x00030000UL; /* "warm bootstrap" */
- strncpy((char *)cpup->ipc_buffer,
- how->restart_cmd,
- sizeof(cpup->ipc_buffer));
- }
- } else
- *flags |= 0x00040000UL; /* "remain halted" */
- reset_for_srm();
- set_hae(srm_hae);
-
-#ifdef CONFIG_DUMMY_CONSOLE
- /* This has the effect of reseting the VGA video origin. */
- take_over_console(&dummy_con, 0, MAX_NR_CONSOLES-1, 1);
+ sti();
+ }
#endif
-#ifdef __SMP__
- /* Wait for the secondaries to halt. */
- clear_bit(smp_boot_cpuid, &cpu_present_mask);
- while (cpu_present_mask)
- /* Make sure we sample memory and not a register. */
- barrier();
-#endif /* __SMP__ */
+
+ if (!alpha_using_srm && mode != LINUX_REBOOT_CMD_RESTART) {
+ /* Unfortunately, since MILO doesn't currently understand
+ the hwrpb bits above, we can't reliably halt the
+ processor and keep it halted. So just loop. */
+ return;
}
- /* PRIMARY */
- halt();
-}
-void
-generic_kill_arch(int mode, char * restart_cmd)
-{
- struct halt_info copy_of_args;
+ if (alpha_using_srm)
+ srm_paging_stop();
- copy_of_args.mode = mode;
- copy_of_args.restart_cmd = restart_cmd;
-#ifdef __SMP__
- /* A secondary can't wait here for the primary to finish, can it now? */
- smp_call_function(halt_processor, (void *)©_of_args, 1, 0);
-#endif /* __SMP__ */
- halt_processor(©_of_args);
+ halt();
}
void
extern void handle_ipi(struct pt_regs *);
extern void smp_percpu_timer_interrupt(struct pt_regs *);
extern int smp_boot_cpuid;
-extern unsigned long cpu_present_mask;
/* bios32.c */
extern void reset_for_srm(void);
WEAK(eb64p_mv);
WEAK(eb66_mv);
WEAK(eb66p_mv);
-WEAK(eiger_mv);
WEAK(jensen_mv);
WEAK(lx164_mv);
WEAK(miata_mv);
"Mikasa", "EB64", "EB66", "EB64+", "AlphaBook1",
"Rawhide", "K2", "Lynx", "XL", "EB164", "Noritake",
"Cortex", "29", "Miata", "XXM", "Takara", "Yukon",
- "Tsunami", "Wildfire", "CUSCO", "Eiger"
+ "Tsunami", "Wildfire", "CUSCO"
};
static char unofficial_names[][8] = {"100", "Ruffian"};
NULL, /* Tsunami -- see variation. */
NULL, /* Wildfire */
NULL, /* CUSCO */
- &eiger_mv, /* Eiger */
};
static struct alpha_machine_vector *unofficial_vecs[] __initlocaldata =
&eb64p_mv,
&eb66_mv,
&eb66p_mv,
- &eiger_mv,
&jensen_mv,
&lx164_mv,
&miata_mv,
outb(mask, 0x21); /* ISA PIC1 */
}
-static void
-eiger_update_irq_hw(unsigned long irq, unsigned long mask, int unmask_p)
-{
- if (irq >= 16) {
- volatile unsigned long *csr;
-
- csr = &TSUNAMI_cchip->dim0.csr;
-
- *csr = ~mask;
- mb();
- *csr;
- }
- else if (irq >= 8)
- outb(mask >> 8, 0xA1); /* ISA PIC2 */
- else
- outb(mask, 0x21); /* ISA PIC1 */
-}
-
static void
dp264_device_interrupt(unsigned long vector, struct pt_regs * regs)
{
handle_irq(irq, ack, regs);
}
-static void
-eiger_srm_device_interrupt(unsigned long vector, struct pt_regs * regs)
-{
- int irq, ack;
-
- ack = irq = (vector - 0x800) >> 4;
-
- /* This is just like TAKARA rather than like the other TSUNAMIs. */
- /* ??? Is this really correct??? */
- if (irq > 15)
- ack = irq = ((vector - 0x800) >> 6) + 12;
-
- handle_irq(irq, ack, regs);
-}
-
static void __init
dp264_init_irq(void)
{
enable_irq(2);
}
-static void __init
-eiger_init_irq(void)
-{
- outb(0, DMA1_RESET_REG);
- outb(0, DMA2_RESET_REG);
- outb(DMA_MODE_CASCADE, DMA2_MODE_REG);
- outb(0, DMA2_MASK_REG);
-
- if (alpha_using_srm)
- alpha_mv.device_interrupt = eiger_srm_device_interrupt;
-
- eiger_update_irq_hw(16, alpha_irq_mask, 0);
-
-#if 0
- enable_irq(55); /* Enable ISA interrupt controller. */
-#endif
- enable_irq(2);
-}
-
/*
* PCI Fixup configuration.
{
layout_all_busses(DEFAULT_IO_BASE, DEFAULT_MEM_BASE);
common_pci_fixup(webbrick_map_irq, common_swizzle);
+ SMC669_Init(0);
}
static void __init
common_pci_fixup(clipper_map_irq, common_swizzle);
}
-static void __init
-eiger_pci_fixup(void)
-{
- layout_all_busses(DEFAULT_IO_BASE, DEFAULT_MEM_BASE);
- common_pci_fixup(monet_map_irq, monet_swizzle);
-}
-
/*
* The System Vectors
pci_fixup: clipper_pci_fixup,
kill_arch: generic_kill_arch,
};
+
/* No alpha_mv alias for webbrick/monet/clipper, since we compile them
in unconditionally with DP264; setup_arch knows how to cope. */
-
-struct alpha_machine_vector eiger_mv __initmv = {
- vector_name: "Eiger",
- DO_EV6_MMU,
- DO_DEFAULT_RTC,
- DO_TSUNAMI_IO,
- DO_TSUNAMI_BUS,
- machine_check: tsunami_machine_check,
- max_dma_address: ALPHA_MAX_DMA_ADDRESS,
-
- nr_irqs: 64,
- irq_probe_mask: _PROBE_MASK(64),
- update_irq_hw: eiger_update_irq_hw,
- ack_irq: generic_ack_irq,
- device_interrupt: dp264_device_interrupt,
-
- init_arch: tsunami_init_arch,
- init_irq: eiger_init_irq,
- init_pit: generic_init_pit,
- pci_fixup: eiger_pci_fixup,
- kill_arch: generic_kill_arch,
-};
-ALIAS_MV(eiger)
-
outb(mask >> 8, 0xA1); /* ISA PIC2 */
} else if (irq <= 31) {
regaddr = 0x510 + ((irq - 16) & 0x0c);
- outl((mask >> ((irq - 16) & 0x0c)) & 0x000f0000UL, regaddr);
+ outl((mask >> ((irq - 16) & 0x0c)) & 0xf0000Ul, regaddr);
}
}
if (alpha_using_srm)
alpha_mv.device_interrupt = takara_srm_device_interrupt;
- else {
+
+ if (!alpha_using_srm) {
unsigned int ctlreg = inl(0x500);
/* Return to non-accelerated mode. */
static int __init
takara_map_irq(struct pci_dev *dev, int slot, int pin)
{
- static char arc_irq_tab[15][5] __initlocaldata = {
+ static char irq_tab[15][5] __initlocaldata = {
{ 16+3, 16+3, 16+3, 16+3, 16+3}, /* slot 6 == device 3 */
{ 16+2, 16+2, 16+2, 16+2, 16+2}, /* slot 7 == device 2 */
{ 16+1, 16+1, 16+1, 16+1, 16+1}, /* slot 8 == device 1 */
{ 16+2, 16+2, 16+2, 16+2, 16+2}, /* slot 19 == device 2 */
{ 16+1, 16+1, 16+1, 16+1, 16+1}, /* slot 20 == device 1 */
};
- static char srm_irq_tab[15][5] __initlocaldata = {
- { 16+3, 16+3, 16+3, 16+3, 16+3}, /* slot 6 == device 3 */
- { 16+2, 16+2, 16+2, 16+2, 16+2}, /* slot 7 == device 2 */
- { 16+1, 16+1, 16+1, 16+1, 16+1}, /* slot 8 == device 1 */
- { -1, -1, -1, -1, -1}, /* slot 9 == nothing */
- { -1, -1, -1, -1, -1}, /* slot 10 == nothing */
- { -1, -1, -1, -1, -1}, /* slot 11 == nothing */
- { -1, -1, -1, -1, -1}, /* slot 12 == nothing */
- { -1, -1, -1, -1, -1}, /* slot 13 == nothing */
- { -1, -1, -1, -1, -1}, /* slot 14 == nothing */
- { -1, -1, -1, -1, -1}, /* slot 15 == nothing */
- { -1, -1, -1, -1, -1}, /* slot 16 == nothing */
- {16+12,16+12,16+13,16+14,16+15}, /* slot 17= device 4 */
- {16+ 8, 16+8, 16+9,16+10,16+11}, /* slot 18= device 3 */
- {16+ 4, 16+4, 16+5, 16+6, 16+7}, /* slot 19= device 2 */
- {16+ 0, 16+0, 16+1, 16+2, 16+3}, /* slot 20= device 1 */
- };
const long min_idsel = 6, max_idsel = 20, irqs_per_slot = 5;
-
- if (slot >= min_idsel && slot <= max_idsel && pin < irqs_per_slot) {
- if (alpha_using_srm)
- return srm_irq_tab[slot - min_idsel][pin];
- else
- return arc_irq_tab[slot - min_idsel][pin];
- } else
- return -1;
+ return COMMON_TABLE_LOOKUP;
}
static int __init
unsigned int busslot = PCI_SLOT(dev->bus->self->devfn);
/* Check first for built-in bridges. */
- if (busslot > 16 && ((1U << (36 - busslot)) & ctlreg)) {
+ if (busslot > 16 && ((1<<(36-busslot)) & ctlreg)) {
if (pin == 1)
pin += (20 - busslot);
else {
- /* Can only handle INTA pins currently. */
- printk(KERN_WARNING "takara_swizzle: cannot only "
- "handle cards with INTA IRQ pin now.\n");
+ /* Must be a card-based bridge. */
+ printk(KERN_WARNING "takara_swizzle: cannot handle "
+ "card-bridge behind builtin bridge yet.\n");
}
- } else {
- /* Must be a card-based bridge. */
- printk(KERN_WARNING "takara_swizzle: cannot handle "
- "card-bridge behind builtin bridge yet.\n");
}
*pinp = pin;
{
layout_all_busses(DEFAULT_IO_BASE, DEFAULT_MEM_BASE);
common_pci_fixup(takara_map_irq, takara_swizzle);
- enable_ide(0x26e);
+ /* enable_ide(0x26e); */
}
machine_check: cia_machine_check,
max_dma_address: ALPHA_MAX_DMA_ADDRESS,
- nr_irqs: 32,
- irq_probe_mask: _PROBE_MASK(32),
+ nr_irqs: 20,
+ irq_probe_mask: _PROBE_MASK(20),
update_irq_hw: takara_update_irq_hw,
ack_irq: generic_ack_irq,
device_interrupt: takara_device_interrupt,
/* For 128-bit division. */
-void
+__complex__ unsigned long
udiv128(unsigned long divisor_f0, unsigned long divisor_f1,
- unsigned long dividend_f0, unsigned long dividend_f1,
- unsigned long *quot, unsigned long *remd)
+ unsigned long dividend_f0, unsigned long dividend_f1)
{
_FP_FRAC_DECL_2(quo);
_FP_FRAC_DECL_2(rem);
_FP_FRAC_DECL_2(tmp);
unsigned long i, num_bits, bit;
+ __complex__ unsigned long ret;
_FP_FRAC_SET_2(rem, _FP_ZEROFRAC_2);
_FP_FRAC_SET_2(quo, _FP_ZEROFRAC_2);
}
out:
- *quot = quo_f1;
- *remd = rem_f1;
- return;
+ __real__ ret = quo_f1;
+ __imag__ ret = rem_f1;
+ return ret;
}
/*
: "r" ((UDItype)(u)), \
"r" ((UDItype)(v)))
-extern void udiv128(unsigned long, unsigned long,
- unsigned long, unsigned long,
- unsigned long *,
- unsigned long *);
-
-#define udiv_qrnnd(q, r, n1, n0, d) \
- do { \
- unsigned long xr, xi; \
- udiv128((n0), (n1), 0, (d), &xr, &xi); \
- (q) = xr; \
- (r) = xi; \
+extern __complex__ unsigned long udiv128(unsigned long, unsigned long,
+ unsigned long, unsigned long);
+
+#define udiv_qrnnd(q, r, n1, n0, d) \
+ do { \
+ __complex__ unsigned long x_; \
+ x_ = udiv128((n0), (n1), 0, (d)); \
+ (q) = __real__ x_; \
+ (r) = __imag__ x_; \
} while (0)
#define UDIV_NEEDS_NORMALIZATION 1
__u8 door_open : 1;
__u8 reserved1 : 4;
#elif defined(__LITTLE_ENDIAN_BITFIELD)
- __u8 reserved1 : 5;
+ __u8 reserved1 : 4;
__u8 door_open : 1;
__u8 mech_state : 3;
#else
*
* Maintainer(s):
* JS Jay Schulist jschlst@samba.anu.edu.au
- * CG Christoph Goos cgoos@syskonnect.de
+ * CG Christoph Goos cgoos@syskonnect.de
+ * AF Adam Fritzler mid@auk.cx
*
* Modification History:
* 29-Aug-97 CG Created
* 27-May-98 JS Formated to Linux Kernel Format
* 31-May-98 JS Hacked in PCI support
* 16-Jun-98 JS Modulized for multiple cards with one driver
+ * 21-Sep-99 CG Fixed source routing issues for 2.2 kernels
+ * 21-Sep-99 AF Added multicast changes recommended by
+ * Jochen Friedrich <jochen@nwe.de> (untested)
+ * Added detection of compatible Compaq PCI card
*
* To do:
* 1. Selectable 16 Mbps or 4Mbps
- * 2. Multi/Broadcast packet handling
+ * 2. Multi/Broadcast packet handling (might be done)
*
*/
static void sktr_exec_cmd(struct device *dev, unsigned short Command);
static void sktr_exec_sifcmd(struct device *dev, unsigned int WriteValue);
/* "F" */
-static unsigned char *sktr_fix_srouting(unsigned char *buf, short *FrameLen);
/* "G" */
static struct enet_statistics *sktr_get_stats(struct device *dev);
/* "H" */
/* Remove I/O space marker in bit 0. */
pci_ioaddr &= ~3;
- if(vendor != PCI_VENDOR_ID_SK)
+ if((vendor != PCI_VENDOR_ID_SK) &&
+ (vendor != PCI_VENDOR_ID_COMPAQ))
continue;
- if(device != PCI_DEVICE_ID_SK_TR)
+
+ if((vendor == PCI_VENDOR_ID_SK) &&
+ (device != PCI_DEVICE_ID_SK_TR))
+ continue;
+ else if((vendor == PCI_VENDOR_ID_COMPAQ) &&
+ (device != PCI_DEVICE_ID_COMPAQ_TOKENRING))
continue;
+
if(check_region(pci_ioaddr, SKTR_IO_EXTENT))
continue;
request_region(pci_ioaddr, SKTR_IO_EXTENT, pci_cardname);
{
static unsigned version_printed = 0;
struct net_local *tp;
+ int DeviceType = SK_PCI;
int err;
if(sktr_debug && version_printed++ == 0)
err = sktr_isa_chk_card(dev, ioaddr);
if(err < 0)
return (-ENODEV);
+ DeviceType = SK_ISA;
}
/* Setup this devices private information structure */
if(tp == NULL)
return (-ENOMEM);
memset(tp, 0, sizeof(struct net_local));
+ tp->DeviceType = DeviceType;
dev->priv = tp;
dev->init = sktr_init_card;
skb_put(tp->Rpl[i].Skb, tp->MaxPacketSize);
/* data unreachable for DMA ? then use local buffer */
- if(virt_to_bus(tp->Rpl[i].Skb->data) + tp->MaxPacketSize > ISA_MAX_ADDRESS)
+ if(tp->DeviceType == SK_ISA &&
+ virt_to_bus(tp->Rpl[i].Skb->data) +
+ tp->MaxPacketSize > ISA_MAX_ADDRESS)
{
tp->Rpl[i].SkbStat = SKB_DATA_COPY;
tp->Rpl[i].FragList[0].DataAddr = htonl(virt_to_bus(tp->LocalRxBuffers[i]));
tp->ocpl.OPENOptions = 0;
tp->ocpl.OPENOptions |= ENABLE_FULL_DUPLEX_SELECTION;
- tp->ocpl.OPENOptions |= PAD_ROUTING_FIELD;
+/* tp->ocpl.OPENOptions |= PAD_ROUTING_FIELD; no more needed */
tp->ocpl.FullDuplex = 0;
tp->ocpl.FullDuplex |= OPEN_FULL_DUPLEX_OFF;
return;
}
-/*
- * Linux always gives 18 byte of source routing information in the frame header.
- * But the length field can indicate shorter length. Then cut header
- * appropriate.
- */
-static unsigned char *sktr_fix_srouting(unsigned char *buf, short *FrameLen)
-{
- struct trh_hdr *trh = (struct trh_hdr *)buf;
- int len;
-
- if(buf[8] & TR_RII)
- {
- trh->rcf &= ~SWAPB((unsigned short) TR_RCF_LONGEST_FRAME_MASK);
- trh->rcf |= SWAPB((unsigned short) TR_RCF_FRAME4K);
- len = (SWAPB(trh->rcf) & TR_RCF_LEN_MASK) >> 8;
- if(len < 18)
- {
- memcpy(&buf[18-len],buf,sizeof(struct trh_hdr)-18+len);
- *FrameLen -= (18 - len);
- }
- return (&buf[18-len]);
- }
-
- return (buf);
-}
-
/*
* Gets skb from system, queues it and checks if it can be sent
*/
tp->QueueSkb++;
/* Is buffer reachable for Busmaster-DMA? */
- if(virt_to_bus((void*)(((long) skb->data) + skb->len))
+ if(tp->DeviceType == SK_ISA &&
+ virt_to_bus((void*)(((long) skb->data) + skb->len))
> ISA_MAX_ADDRESS)
{
/* Copy frame to local buffer */
length = skb->len;
buf = tp->LocalTxBuffers[i];
memcpy(buf, skb->data, length);
- newbuf = sktr_fix_srouting(buf, &length);
+ newbuf = buf;
}
else
{
/* Send direct from skb->data */
length = skb->len;
- newbuf = sktr_fix_srouting(skb->data, &length);
+ newbuf = skb->data;
}
/* Source address in packet? */
static void sktr_set_multicast_list(struct device *dev)
{
struct net_local *tp = (struct net_local *)dev->priv;
- unsigned int OpenOptions;
-
- OpenOptions = tp->ocpl.OPENOptions &
- ~(PASS_ADAPTER_MAC_FRAMES
- | PASS_ATTENTION_FRAMES
- | PASS_BEACON_MAC_FRAMES
- | COPY_ALL_MAC_FRAMES
- | COPY_ALL_NON_MAC_FRAMES);
-
- if(dev->flags & IFF_PROMISC)
- /* Enable promiscuous mode */
- OpenOptions |= COPY_ALL_NON_MAC_FRAMES | COPY_ALL_MAC_FRAMES;
- else
- {
- if(dev->flags & IFF_ALLMULTI)
- /* || dev->mc_count > HW_MAX_ADDRS) */
- {
- /* Disable promiscuous mode, use normal mode. */
- }
- else
- {
- if(dev->mc_count)
- {
- /* Walk the address list, and load the filter */
- }
- }
- }
-
- tp->ocpl.OPENOptions = OpenOptions;
- sktr_exec_cmd(dev, OC_MODIFY_OPEN_PARMS);
-
- return;
+ unsigned int OpenOptions;
+
+ OpenOptions = tp->ocpl.OPENOptions &
+ ~(PASS_ADAPTER_MAC_FRAMES
+ | PASS_ATTENTION_FRAMES
+ | PASS_BEACON_MAC_FRAMES
+ | COPY_ALL_MAC_FRAMES
+ | COPY_ALL_NON_MAC_FRAMES);
+
+ tp->ocpl.FunctAddr = 0;
+
+ if(dev->flags & IFF_PROMISC)
+ /* Enable promiscuous mode */
+ OpenOptions |= COPY_ALL_NON_MAC_FRAMES |
+ COPY_ALL_MAC_FRAMES;
+ else
+ {
+ if(dev->flags & IFF_ALLMULTI)
+ {
+ /* Disable promiscuous mode, use normal mode. */
+ tp->ocpl.FunctAddr = 0xFFFFFFFF;
+
+ }
+ else
+ {
+ int i;
+ struct dev_mc_list *mclist = dev->mc_list;
+ for (i=0; i< dev->mc_count; i++)
+ {
+ ((char *)(&tp->ocpl.FunctAddr))[0] |=
+ mclist->dmi_addr[2];
+ ((char *)(&tp->ocpl.FunctAddr))[1] |=
+ mclist->dmi_addr[3];
+ ((char *)(&tp->ocpl.FunctAddr))[2] |=
+ mclist->dmi_addr[4];
+ ((char *)(&tp->ocpl.FunctAddr))[3] |=
+ mclist->dmi_addr[5];
+ mclist = mclist->next;
+ }
+ }
+ sktr_exec_cmd(dev, OC_SET_FUNCT_ADDR);
+ }
+
+ tp->ocpl.OPENOptions = OpenOptions;
+ sktr_exec_cmd(dev, OC_MODIFY_OPEN_PARMS);
+ return;
}
/*
* Wait for some time (microseconds)
+ *
+ * udelay() is a bit harsh, but using a looser timer causes
+ * the bring-up-diags to stall indefinitly.
+ *
*/
static void sktr_wait(unsigned long time)
{
- long tmp;
-
- tmp = jiffies + time/(1000000/HZ);
- do {
- current->state = TASK_INTERRUPTIBLE;
- tmp = schedule_timeout(tmp);
- } while(time_after(tmp, jiffies));
-
+ udelay(time);
return;
}
/* Drop frames sent by myself */
if(sktr_chk_frame(dev, rpl->MData))
{
- printk(KERN_INFO "%s: Received my own frame\n",
- dev->name);
if(rpl->Skb != NULL)
dev_kfree_skb(rpl->Skb);
}
printk("%s: Packet Length %04X (%d)\n",
dev->name, Length, Length);
- /* Indicate the received frame to system the
- * adapter does the Source-Routing padding for
- * us. See: OpenOptions in sktr_init_opb()
+ /* Indicate the received frame to system.
+ * The source routing padding is no more
+ * necessary with 2.2.x kernel.
+ * See: OpenOptions in sktr_init_opb()
*/
skb = rpl->Skb;
if(rpl->SkbStat == SKB_UNAVAILABLE)
skb_put(rpl->Skb, tp->MaxPacketSize);
/* Data unreachable for DMA ? then use local buffer */
- if(virt_to_bus(rpl->Skb->data) + tp->MaxPacketSize
+ if(tp->DeviceType == SK_ISA &&
+ virt_to_bus(rpl->Skb->data) + tp->MaxPacketSize
> ISA_MAX_ADDRESS)
{
rpl->SkbStat = SKB_DATA_COPY;
#define TR_RCF_LONGEST_FRAME_MASK 0x0070
#define TR_RCF_FRAME4K 0x0030
+#define SK_ISA 0
+#define SK_PCI 1
+
/*------------------------------------------------------------------*/
/* Bit order for adapter communication with DMA */
/* -------------------------------------------------------------- */
unsigned char ScbInUse;
unsigned short CMDqueue;
+ unsigned int DeviceType;
+
unsigned long AdapterOpenFlag:1;
unsigned long AdapterVirtOpenFlag:1;
unsigned long OpenCommandIssued:1;
* Delay routines, using a pre-computed "loops_per_second" value.
*/
-/* We must make the innermost loop external, ie called via "jsr/bsr", so
- that timings will be consistent accross ALL invocations, which is not
- the case for a completely inline implementation. */
-
-extern void ___delay(void);
-
extern __inline__ void
__delay(unsigned long loops)
{
- register unsigned long r0 __asm__("$0") = loops;
-#ifdef MODULE
- __asm__ __volatile__("lda $28,___delay; jsr $28,($28),0"
- : "=r"(r0) : "r"(r0) : "$28");
-#else
- __asm__ __volatile__("bsr $28,___delay" : "=r"(r0) : "r"(r0) : "$28");
-#endif
+ __asm__ __volatile__(".align 3\n"
+ "1:\tsubq %0,1,%0\n\t"
+ "bge %0,1b": "=r" (loops) : "0" (loops));
}
/*
#define ST_DEC_TSUNAMI 34 /* Tsunami systype */
#define ST_DEC_WILDFIRE 35 /* Wildfire systype */
#define ST_DEC_CUSCO 36 /* CUSCO systype */
-#define ST_DEC_EIGER 37 /* Eiger systype */
/* UNOFFICIAL!!! */
#define ST_UNOFFICIAL_BIAS 100
#elif defined(CONFIG_ALPHA_EB66) || \
defined(CONFIG_ALPHA_EB64P) || \
- defined(CONFIG_ALPHA_MIKASA) || \
- defined(CONFIG_ALPHA_TAKARA)
+ defined(CONFIG_ALPHA_MIKASA)
# define NR_IRQS 32
#elif defined(CONFIG_ALPHA_ALCOR) || \
defined(CONFIG_ALPHA_SX164)
# define NR_IRQS 40
-#elif defined(CONFIG_ALPHA_DP264) || \
- defined(CONFIG_ALPHA_RAWHIDE) || \
- defined(CONFIG_ALPHA_EIGER)
+#elif defined(CONFIG_ALPHA_DP264) || \
+ defined(CONFIG_ALPHA_RAWHIDE)
# define NR_IRQS 64
+#elif defined(CONFIG_ALPHA_TAKARA)
+# define NR_IRQS 20
+
#else /* everyone else */
# define NR_IRQS 16
#endif
* <linux-pcisupport@cck.uni-kl.de>.
*/
#define PCI_VENDOR_ID_COMPAQ 0x0e11
+#define PCI_DEVICE_ID_COMPAQ_TOKENRING 0x0508
#define PCI_DEVICE_ID_COMPAQ_1280 0x3033
#define PCI_DEVICE_ID_COMPAQ_TRIFLEX 0x4000
#define PCI_DEVICE_ID_COMPAQ_SMART2P 0xae10