You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'master'
This commit is contained in:
+4
-3
@@ -2057,9 +2057,10 @@ L: linux-kernel@vger.kernel.org
|
||||
S: Maintained
|
||||
|
||||
NI5010 NETWORK DRIVER
|
||||
P: Jan-Pascal van Best and Andreas Mohr
|
||||
M: Jan-Pascal van Best <jvbest@qv3pluto.leidenuniv.nl>
|
||||
M: Andreas Mohr <100.30936@germany.net>
|
||||
P: Jan-Pascal van Best
|
||||
M: janpascal@vanbest.org
|
||||
P: Andreas Mohr
|
||||
M: andi@lisas.de
|
||||
L: netdev@vger.kernel.org
|
||||
S: Maintained
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
VERSION = 2
|
||||
PATCHLEVEL = 6
|
||||
SUBLEVEL = 17
|
||||
EXTRAVERSION =
|
||||
SUBLEVEL = 18
|
||||
EXTRAVERSION = -rc1
|
||||
NAME=Crazed Snow-Weasel
|
||||
|
||||
# *DOCUMENTATION*
|
||||
@@ -528,7 +528,7 @@ export MODLIB
|
||||
|
||||
ifdef INSTALL_MOD_STRIP
|
||||
ifeq ($(INSTALL_MOD_STRIP),1)
|
||||
mod_strip_cmd = $STRIP) --strip-debug
|
||||
mod_strip_cmd = $(STRIP) --strip-debug
|
||||
else
|
||||
mod_strip_cmd = $(STRIP) $(INSTALL_MOD_STRIP)
|
||||
endif # INSTALL_MOD_STRIP=1
|
||||
|
||||
@@ -107,3 +107,48 @@ void __init at91rm9200_map_io(void)
|
||||
iotable_init(at91rm9200_io_desc, ARRAY_SIZE(at91rm9200_io_desc));
|
||||
}
|
||||
|
||||
/*
|
||||
* The default interrupt priority levels (0 = lowest, 7 = highest).
|
||||
*/
|
||||
static unsigned int at91rm9200_default_irq_priority[NR_AIC_IRQS] __initdata = {
|
||||
7, /* Advanced Interrupt Controller (FIQ) */
|
||||
7, /* System Peripherals */
|
||||
0, /* Parallel IO Controller A */
|
||||
0, /* Parallel IO Controller B */
|
||||
0, /* Parallel IO Controller C */
|
||||
0, /* Parallel IO Controller D */
|
||||
6, /* USART 0 */
|
||||
6, /* USART 1 */
|
||||
6, /* USART 2 */
|
||||
6, /* USART 3 */
|
||||
0, /* Multimedia Card Interface */
|
||||
4, /* USB Device Port */
|
||||
0, /* Two-Wire Interface */
|
||||
6, /* Serial Peripheral Interface */
|
||||
5, /* Serial Synchronous Controller 0 */
|
||||
5, /* Serial Synchronous Controller 1 */
|
||||
5, /* Serial Synchronous Controller 2 */
|
||||
0, /* Timer Counter 0 */
|
||||
0, /* Timer Counter 1 */
|
||||
0, /* Timer Counter 2 */
|
||||
0, /* Timer Counter 3 */
|
||||
0, /* Timer Counter 4 */
|
||||
0, /* Timer Counter 5 */
|
||||
3, /* USB Host port */
|
||||
3, /* Ethernet MAC */
|
||||
0, /* Advanced Interrupt Controller (IRQ0) */
|
||||
0, /* Advanced Interrupt Controller (IRQ1) */
|
||||
0, /* Advanced Interrupt Controller (IRQ2) */
|
||||
0, /* Advanced Interrupt Controller (IRQ3) */
|
||||
0, /* Advanced Interrupt Controller (IRQ4) */
|
||||
0, /* Advanced Interrupt Controller (IRQ5) */
|
||||
0 /* Advanced Interrupt Controller (IRQ6) */
|
||||
};
|
||||
|
||||
void __init at91rm9200_init_irq(unsigned int priority[NR_AIC_IRQS])
|
||||
{
|
||||
if (!priority)
|
||||
priority = at91rm9200_default_irq_priority;
|
||||
|
||||
at91_aic_init(priority);
|
||||
}
|
||||
|
||||
@@ -8,13 +8,19 @@
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
void at91_gpio_irq_setup(unsigned banks);
|
||||
/* Interrupts */
|
||||
extern void __init at91rm9200_init_irq(unsigned int priority[]);
|
||||
extern void __init at91_aic_init(unsigned int priority[]);
|
||||
extern void __init at91_gpio_irq_setup(unsigned banks);
|
||||
|
||||
/* Timer */
|
||||
struct sys_timer;
|
||||
extern struct sys_timer at91rm9200_timer;
|
||||
|
||||
/* Memory Map */
|
||||
extern void __init at91rm9200_map_io(void);
|
||||
|
||||
/* Clocks */
|
||||
extern int __init at91_clock_init(unsigned long main_clock);
|
||||
struct device;
|
||||
extern void __init at91_clock_associate(const char *id, struct device *dev, const char *func);
|
||||
|
||||
@@ -36,58 +36,20 @@
|
||||
|
||||
#include "generic.h"
|
||||
|
||||
/*
|
||||
* The default interrupt priority levels (0 = lowest, 7 = highest).
|
||||
*/
|
||||
static unsigned int at91rm9200_default_irq_priority[NR_AIC_IRQS] __initdata = {
|
||||
7, /* Advanced Interrupt Controller */
|
||||
7, /* System Peripheral */
|
||||
0, /* Parallel IO Controller A */
|
||||
0, /* Parallel IO Controller B */
|
||||
0, /* Parallel IO Controller C */
|
||||
0, /* Parallel IO Controller D */
|
||||
6, /* USART 0 */
|
||||
6, /* USART 1 */
|
||||
6, /* USART 2 */
|
||||
6, /* USART 3 */
|
||||
0, /* Multimedia Card Interface */
|
||||
4, /* USB Device Port */
|
||||
0, /* Two-Wire Interface */
|
||||
6, /* Serial Peripheral Interface */
|
||||
5, /* Serial Synchronous Controller */
|
||||
5, /* Serial Synchronous Controller */
|
||||
5, /* Serial Synchronous Controller */
|
||||
0, /* Timer Counter 0 */
|
||||
0, /* Timer Counter 1 */
|
||||
0, /* Timer Counter 2 */
|
||||
0, /* Timer Counter 3 */
|
||||
0, /* Timer Counter 4 */
|
||||
0, /* Timer Counter 5 */
|
||||
3, /* USB Host port */
|
||||
3, /* Ethernet MAC */
|
||||
0, /* Advanced Interrupt Controller */
|
||||
0, /* Advanced Interrupt Controller */
|
||||
0, /* Advanced Interrupt Controller */
|
||||
0, /* Advanced Interrupt Controller */
|
||||
0, /* Advanced Interrupt Controller */
|
||||
0, /* Advanced Interrupt Controller */
|
||||
0 /* Advanced Interrupt Controller */
|
||||
};
|
||||
|
||||
|
||||
static void at91rm9200_mask_irq(unsigned int irq)
|
||||
static void at91_aic_mask_irq(unsigned int irq)
|
||||
{
|
||||
/* Disable interrupt on AIC */
|
||||
at91_sys_write(AT91_AIC_IDCR, 1 << irq);
|
||||
}
|
||||
|
||||
static void at91rm9200_unmask_irq(unsigned int irq)
|
||||
static void at91_aic_unmask_irq(unsigned int irq)
|
||||
{
|
||||
/* Enable interrupt on AIC */
|
||||
at91_sys_write(AT91_AIC_IECR, 1 << irq);
|
||||
}
|
||||
|
||||
static int at91rm9200_irq_type(unsigned irq, unsigned type)
|
||||
static int at91_aic_set_type(unsigned irq, unsigned type)
|
||||
{
|
||||
unsigned int smr, srctype;
|
||||
|
||||
@@ -122,7 +84,7 @@ static int at91rm9200_irq_type(unsigned irq, unsigned type)
|
||||
static u32 wakeups;
|
||||
static u32 backups;
|
||||
|
||||
static int at91rm9200_irq_set_wake(unsigned irq, unsigned value)
|
||||
static int at91_aic_set_wake(unsigned irq, unsigned value)
|
||||
{
|
||||
if (unlikely(irq >= 32))
|
||||
return -EINVAL;
|
||||
@@ -149,28 +111,24 @@ void at91_irq_resume(void)
|
||||
}
|
||||
|
||||
#else
|
||||
#define at91rm9200_irq_set_wake NULL
|
||||
#define at91_aic_set_wake NULL
|
||||
#endif
|
||||
|
||||
static struct irqchip at91rm9200_irq_chip = {
|
||||
.ack = at91rm9200_mask_irq,
|
||||
.mask = at91rm9200_mask_irq,
|
||||
.unmask = at91rm9200_unmask_irq,
|
||||
.set_type = at91rm9200_irq_type,
|
||||
.set_wake = at91rm9200_irq_set_wake,
|
||||
static struct irqchip at91_aic_chip = {
|
||||
.ack = at91_aic_mask_irq,
|
||||
.mask = at91_aic_mask_irq,
|
||||
.unmask = at91_aic_unmask_irq,
|
||||
.set_type = at91_aic_set_type,
|
||||
.set_wake = at91_aic_set_wake,
|
||||
};
|
||||
|
||||
/*
|
||||
* Initialize the AIC interrupt controller.
|
||||
*/
|
||||
void __init at91rm9200_init_irq(unsigned int priority[NR_AIC_IRQS])
|
||||
void __init at91_aic_init(unsigned int priority[NR_AIC_IRQS])
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
/* No priority list specified for this board -> use defaults */
|
||||
if (priority == NULL)
|
||||
priority = at91rm9200_default_irq_priority;
|
||||
|
||||
/*
|
||||
* The IVR is used by macro get_irqnr_and_base to read and verify.
|
||||
* The irq number is NR_AIC_IRQS when a spurious interrupt has occurred.
|
||||
@@ -178,10 +136,10 @@ void __init at91rm9200_init_irq(unsigned int priority[NR_AIC_IRQS])
|
||||
for (i = 0; i < NR_AIC_IRQS; i++) {
|
||||
/* Put irq number in Source Vector Register: */
|
||||
at91_sys_write(AT91_AIC_SVR(i), i);
|
||||
/* Store the Source Mode Register as defined in table above */
|
||||
/* Active Low interrupt, with the specified priority */
|
||||
at91_sys_write(AT91_AIC_SMR(i), AT91_AIC_SRCTYPE_LOW | priority[i]);
|
||||
|
||||
set_irq_chip(i, &at91rm9200_irq_chip);
|
||||
set_irq_chip(i, &at91_aic_chip);
|
||||
set_irq_handler(i, do_level_IRQ);
|
||||
set_irq_flags(i, IRQF_VALID | IRQF_PROBE);
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
#include <linux/spi/spi.h>
|
||||
|
||||
#include <asm/hardware.h>
|
||||
#include <asm/irq.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/setup.h>
|
||||
#include <asm/mach-types.h>
|
||||
@@ -36,7 +35,6 @@
|
||||
#include <asm/system.h>
|
||||
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach/irq.h>
|
||||
#include <asm/mach/map.h>
|
||||
#include <asm/mach/time.h>
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#include <linux/clk.h>
|
||||
|
||||
#include <asm/system.h>
|
||||
#include <asm/irq.h>
|
||||
#include <asm/hardware.h>
|
||||
#include <asm/dma.h>
|
||||
#include <asm/dma-mapping.h>
|
||||
|
||||
+10
-12
@@ -22,8 +22,8 @@
|
||||
#include <linux/init.h>
|
||||
#include <linux/ioport.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/irq.h>
|
||||
#include <asm/hardware.h>
|
||||
#include <asm/irq.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/setup.h>
|
||||
#include <asm/mach-types.h>
|
||||
@@ -96,26 +96,24 @@ void __init pnx4008_init_irq(void)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
/* configure and enable IRQ 0,1,30,31 (cascade interrupts) mask all others */
|
||||
/* configure IRQ's */
|
||||
for (i = 0; i < NR_IRQS; i++) {
|
||||
set_irq_flags(i, IRQF_VALID);
|
||||
set_irq_chip(i, &pnx4008_irq_chip);
|
||||
pnx4008_set_irq_type(i, pnx4008_irq_type[i]);
|
||||
}
|
||||
|
||||
/* configure and enable IRQ 0,1,30,31 (cascade interrupts) */
|
||||
pnx4008_set_irq_type(SUB1_IRQ_N, pnx4008_irq_type[SUB1_IRQ_N]);
|
||||
pnx4008_set_irq_type(SUB2_IRQ_N, pnx4008_irq_type[SUB2_IRQ_N]);
|
||||
pnx4008_set_irq_type(SUB1_FIQ_N, pnx4008_irq_type[SUB1_FIQ_N]);
|
||||
pnx4008_set_irq_type(SUB2_FIQ_N, pnx4008_irq_type[SUB2_FIQ_N]);
|
||||
|
||||
/* mask all others */
|
||||
__raw_writel((1 << SUB2_FIQ_N) | (1 << SUB1_FIQ_N) |
|
||||
(1 << SUB2_IRQ_N) | (1 << SUB1_IRQ_N),
|
||||
INTC_ER(MAIN_BASE_INT));
|
||||
__raw_writel(0, INTC_ER(SIC1_BASE_INT));
|
||||
__raw_writel(0, INTC_ER(SIC2_BASE_INT));
|
||||
|
||||
/* configure all other IRQ's */
|
||||
for (i = 0; i < NR_IRQS; i++) {
|
||||
if (i == SUB2_FIQ_N || i == SUB1_FIQ_N ||
|
||||
i == SUB2_IRQ_N || i == SUB1_IRQ_N)
|
||||
continue;
|
||||
set_irq_flags(i, IRQF_VALID);
|
||||
set_irq_chip(i, &pnx4008_irq_chip);
|
||||
pnx4008_set_irq_type(i, pnx4008_irq_type[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,17 +20,15 @@
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/kallsyms.h>
|
||||
#include <linux/time.h>
|
||||
#include <linux/timex.h>
|
||||
#include <linux/irq.h>
|
||||
|
||||
#include <asm/system.h>
|
||||
#include <asm/hardware.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/leds.h>
|
||||
#include <asm/irq.h>
|
||||
#include <asm/mach/irq.h>
|
||||
#include <asm/mach/time.h>
|
||||
|
||||
#include <linux/time.h>
|
||||
#include <linux/timex.h>
|
||||
#include <asm/errno.h>
|
||||
|
||||
/*! Note: all timers are UPCOUNTING */
|
||||
|
||||
@@ -405,20 +405,22 @@ static void mpic_unmask_irq(unsigned int irq)
|
||||
unsigned int loops = 100000;
|
||||
struct mpic *mpic = mpic_from_irq(irq);
|
||||
unsigned int src = mpic_irq_to_hw(irq);
|
||||
unsigned long flags;
|
||||
|
||||
DBG("%p: %s: enable_irq: %d (src %d)\n", mpic, mpic->name, irq, src);
|
||||
|
||||
spin_lock_irqsave(&mpic_lock, flags);
|
||||
mpic_irq_write(src, MPIC_IRQ_VECTOR_PRI,
|
||||
mpic_irq_read(src, MPIC_IRQ_VECTOR_PRI) &
|
||||
~MPIC_VECPRI_MASK);
|
||||
|
||||
/* make sure mask gets to controller before we return to user */
|
||||
do {
|
||||
if (!loops--) {
|
||||
printk(KERN_ERR "mpic_enable_irq timeout\n");
|
||||
break;
|
||||
}
|
||||
} while(mpic_irq_read(src, MPIC_IRQ_VECTOR_PRI) & MPIC_VECPRI_MASK);
|
||||
} while(mpic_irq_read(src, MPIC_IRQ_VECTOR_PRI) & MPIC_VECPRI_MASK);
|
||||
spin_unlock_irqrestore(&mpic_lock, flags);
|
||||
}
|
||||
|
||||
static void mpic_mask_irq(unsigned int irq)
|
||||
@@ -426,9 +428,11 @@ static void mpic_mask_irq(unsigned int irq)
|
||||
unsigned int loops = 100000;
|
||||
struct mpic *mpic = mpic_from_irq(irq);
|
||||
unsigned int src = mpic_irq_to_hw(irq);
|
||||
unsigned long flags;
|
||||
|
||||
DBG("%s: disable_irq: %d (src %d)\n", mpic->name, irq, src);
|
||||
|
||||
spin_lock_irqsave(&mpic_lock, flags);
|
||||
mpic_irq_write(src, MPIC_IRQ_VECTOR_PRI,
|
||||
mpic_irq_read(src, MPIC_IRQ_VECTOR_PRI) |
|
||||
MPIC_VECPRI_MASK);
|
||||
@@ -440,6 +444,7 @@ static void mpic_mask_irq(unsigned int irq)
|
||||
break;
|
||||
}
|
||||
} while(!(mpic_irq_read(src, MPIC_IRQ_VECTOR_PRI) & MPIC_VECPRI_MASK));
|
||||
spin_unlock_irqrestore(&mpic_lock, flags);
|
||||
}
|
||||
|
||||
static void mpic_end_irq(unsigned int irq)
|
||||
@@ -624,9 +629,10 @@ static int mpic_host_map(struct irq_host *h, unsigned int virq,
|
||||
struct irq_desc *desc = get_irq_desc(virq);
|
||||
struct irq_chip *chip;
|
||||
struct mpic *mpic = h->host_data;
|
||||
unsigned int vecpri = MPIC_VECPRI_SENSE_LEVEL |
|
||||
u32 v, vecpri = MPIC_VECPRI_SENSE_LEVEL |
|
||||
MPIC_VECPRI_POLARITY_NEGATIVE;
|
||||
int level;
|
||||
unsigned long iflags;
|
||||
|
||||
pr_debug("mpic: map virq %d, hwirq 0x%lx, flags: 0x%x\n",
|
||||
virq, hw, flags);
|
||||
@@ -668,11 +674,21 @@ static int mpic_host_map(struct irq_host *h, unsigned int virq,
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Reconfigure irq */
|
||||
vecpri |= MPIC_VECPRI_MASK | hw | (8 << MPIC_VECPRI_PRIORITY_SHIFT);
|
||||
mpic_irq_write(hw, MPIC_IRQ_VECTOR_PRI, vecpri);
|
||||
/* Reconfigure irq. We must preserve the mask bit as we can be called
|
||||
* while the interrupt is still active (This may change in the future
|
||||
* but for now, it is the case).
|
||||
*/
|
||||
spin_lock_irqsave(&mpic_lock, iflags);
|
||||
v = mpic_irq_read(hw, MPIC_IRQ_VECTOR_PRI);
|
||||
vecpri = (v &
|
||||
~(MPIC_VECPRI_POLARITY_MASK | MPIC_VECPRI_SENSE_MASK)) |
|
||||
vecpri;
|
||||
if (vecpri != v)
|
||||
mpic_irq_write(hw, MPIC_IRQ_VECTOR_PRI, vecpri);
|
||||
spin_unlock_irqrestore(&mpic_lock, iflags);
|
||||
|
||||
pr_debug("mpic: mapping as IRQ\n");
|
||||
pr_debug("mpic: mapping as IRQ, vecpri = 0x%08x (was 0x%08x)\n",
|
||||
vecpri, v);
|
||||
|
||||
set_irq_chip_data(virq, mpic);
|
||||
set_irq_chip_and_handler(virq, chip, handle_fasteoi_irq);
|
||||
@@ -904,8 +920,8 @@ void __init mpic_init(struct mpic *mpic)
|
||||
|
||||
/* do senses munging */
|
||||
if (mpic->senses && i < mpic->senses_count)
|
||||
vecpri = mpic_flags_to_vecpri(mpic->senses[i],
|
||||
&level);
|
||||
vecpri |= mpic_flags_to_vecpri(mpic->senses[i],
|
||||
&level);
|
||||
else
|
||||
vecpri |= MPIC_VECPRI_SENSE_LEVEL;
|
||||
|
||||
@@ -955,14 +971,17 @@ void __init mpic_set_clk_ratio(struct mpic *mpic, u32 clock_ratio)
|
||||
|
||||
void __init mpic_set_serial_int(struct mpic *mpic, int enable)
|
||||
{
|
||||
unsigned long flags;
|
||||
u32 v;
|
||||
|
||||
spin_lock_irqsave(&mpic_lock, flags);
|
||||
v = mpic_read(mpic->gregs, MPIC_GREG_GLOBAL_CONF_1);
|
||||
if (enable)
|
||||
v |= MPIC_GREG_GLOBAL_CONF_1_SIE;
|
||||
else
|
||||
v &= ~MPIC_GREG_GLOBAL_CONF_1_SIE;
|
||||
mpic_write(mpic->gregs, MPIC_GREG_GLOBAL_CONF_1, v);
|
||||
spin_unlock_irqrestore(&mpic_lock, flags);
|
||||
}
|
||||
|
||||
void mpic_irq_set_priority(unsigned int irq, unsigned int pri)
|
||||
|
||||
@@ -1032,7 +1032,9 @@ static void sun4v_vdev_irq_trans_init(struct device_node *dp)
|
||||
static void irq_trans_init(struct device_node *dp)
|
||||
{
|
||||
const char *model;
|
||||
#ifdef CONFIG_PCI
|
||||
int i;
|
||||
#endif
|
||||
|
||||
model = of_get_property(dp, "model", NULL);
|
||||
if (!model)
|
||||
|
||||
@@ -124,11 +124,6 @@ EXPORT_SYMBOL(__write_lock);
|
||||
EXPORT_SYMBOL(__write_unlock);
|
||||
EXPORT_SYMBOL(__write_trylock);
|
||||
|
||||
#if defined(CONFIG_MCOUNT)
|
||||
extern void _mcount(void);
|
||||
EXPORT_SYMBOL(_mcount);
|
||||
#endif
|
||||
|
||||
/* CPU online map and active count. */
|
||||
EXPORT_SYMBOL(cpu_online_map);
|
||||
EXPORT_SYMBOL(phys_cpu_present_map);
|
||||
@@ -136,6 +131,11 @@ EXPORT_SYMBOL(phys_cpu_present_map);
|
||||
EXPORT_SYMBOL(smp_call_function);
|
||||
#endif /* CONFIG_SMP */
|
||||
|
||||
#if defined(CONFIG_MCOUNT)
|
||||
extern void _mcount(void);
|
||||
EXPORT_SYMBOL(_mcount);
|
||||
#endif
|
||||
|
||||
EXPORT_SYMBOL(sparc64_get_clock_tick);
|
||||
|
||||
/* semaphores */
|
||||
|
||||
@@ -788,12 +788,15 @@ static int __devinit clock_probe(struct of_device *op, const struct of_device_id
|
||||
if (!regs)
|
||||
return -ENOMEM;
|
||||
|
||||
#ifdef CONFIG_PCI
|
||||
if (!strcmp(model, "ds1287") ||
|
||||
!strcmp(model, "m5819") ||
|
||||
!strcmp(model, "m5819p") ||
|
||||
!strcmp(model, "m5823")) {
|
||||
ds1287_regs = (unsigned long) regs;
|
||||
} else if (model[5] == '0' && model[6] == '2') {
|
||||
} else
|
||||
#endif
|
||||
if (model[5] == '0' && model[6] == '2') {
|
||||
mstk48t02_regs = regs;
|
||||
} else if(model[5] == '0' && model[6] == '8') {
|
||||
mstk48t08_regs = regs;
|
||||
|
||||
+19
-16
@@ -1836,9 +1836,10 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
|
||||
if (pdev->vendor == PCI_VENDOR_ID_REALTEK &&
|
||||
pdev->device == PCI_DEVICE_ID_REALTEK_8139 && pci_rev < 0x20) {
|
||||
printk(KERN_ERR PFX "pci dev %s (id %04x:%04x rev %02x) is not an 8139C+ compatible chip\n",
|
||||
pci_name(pdev), pdev->vendor, pdev->device, pci_rev);
|
||||
printk(KERN_ERR PFX "Try the \"8139too\" driver instead.\n");
|
||||
dev_err(&pdev->dev,
|
||||
"This (id %04x:%04x rev %02x) is not an 8139C+ compatible chip\n",
|
||||
pdev->vendor, pdev->device, pci_rev);
|
||||
dev_err(&pdev->dev, "Try the \"8139too\" driver instead.\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
@@ -1876,14 +1877,13 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
pciaddr = pci_resource_start(pdev, 1);
|
||||
if (!pciaddr) {
|
||||
rc = -EIO;
|
||||
printk(KERN_ERR PFX "no MMIO resource for pci dev %s\n",
|
||||
pci_name(pdev));
|
||||
dev_err(&pdev->dev, "no MMIO resource\n");
|
||||
goto err_out_res;
|
||||
}
|
||||
if (pci_resource_len(pdev, 1) < CP_REGS_SIZE) {
|
||||
rc = -EIO;
|
||||
printk(KERN_ERR PFX "MMIO resource (%llx) too small on pci dev %s\n",
|
||||
(unsigned long long)pci_resource_len(pdev, 1), pci_name(pdev));
|
||||
dev_err(&pdev->dev, "MMIO resource (%llx) too small\n",
|
||||
(unsigned long long)pci_resource_len(pdev, 1));
|
||||
goto err_out_res;
|
||||
}
|
||||
|
||||
@@ -1897,14 +1897,15 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
|
||||
rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
|
||||
if (rc) {
|
||||
printk(KERN_ERR PFX "No usable DMA configuration, "
|
||||
"aborting.\n");
|
||||
dev_err(&pdev->dev,
|
||||
"No usable DMA configuration, aborting.\n");
|
||||
goto err_out_res;
|
||||
}
|
||||
rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
|
||||
if (rc) {
|
||||
printk(KERN_ERR PFX "No usable consistent DMA configuration, "
|
||||
"aborting.\n");
|
||||
dev_err(&pdev->dev,
|
||||
"No usable consistent DMA configuration, "
|
||||
"aborting.\n");
|
||||
goto err_out_res;
|
||||
}
|
||||
}
|
||||
@@ -1915,9 +1916,9 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
regs = ioremap(pciaddr, CP_REGS_SIZE);
|
||||
if (!regs) {
|
||||
rc = -EIO;
|
||||
printk(KERN_ERR PFX "Cannot map PCI MMIO (%llx@%llx) on pci dev %s\n",
|
||||
(unsigned long long)pci_resource_len(pdev, 1),
|
||||
(unsigned long long)pciaddr, pci_name(pdev));
|
||||
dev_err(&pdev->dev, "Cannot map PCI MMIO (%lx@%lx)\n",
|
||||
(unsigned long long)pci_resource_len(pdev, 1),
|
||||
(unsigned long long)pciaddr);
|
||||
goto err_out_res;
|
||||
}
|
||||
dev->base_addr = (unsigned long) regs;
|
||||
@@ -1986,7 +1987,8 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
/* enable busmastering and memory-write-invalidate */
|
||||
pci_set_master(pdev);
|
||||
|
||||
if (cp->wol_enabled) cp_set_d3_state (cp);
|
||||
if (cp->wol_enabled)
|
||||
cp_set_d3_state (cp);
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -2011,7 +2013,8 @@ static void cp_remove_one (struct pci_dev *pdev)
|
||||
BUG_ON(!dev);
|
||||
unregister_netdev(dev);
|
||||
iounmap(cp->regs);
|
||||
if (cp->wol_enabled) pci_set_power_state (pdev, PCI_D0);
|
||||
if (cp->wol_enabled)
|
||||
pci_set_power_state (pdev, PCI_D0);
|
||||
pci_release_regions(pdev);
|
||||
pci_clear_mwi(pdev);
|
||||
pci_disable_device(pdev);
|
||||
|
||||
+18
-16
@@ -768,7 +768,7 @@ static int __devinit rtl8139_init_board (struct pci_dev *pdev,
|
||||
/* dev and priv zeroed in alloc_etherdev */
|
||||
dev = alloc_etherdev (sizeof (*tp));
|
||||
if (dev == NULL) {
|
||||
printk (KERN_ERR PFX "%s: Unable to alloc new net device\n", pci_name(pdev));
|
||||
dev_err(&pdev->dev, "Unable to alloc new net device\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
SET_MODULE_OWNER(dev);
|
||||
@@ -800,31 +800,31 @@ static int __devinit rtl8139_init_board (struct pci_dev *pdev,
|
||||
#ifdef USE_IO_OPS
|
||||
/* make sure PCI base addr 0 is PIO */
|
||||
if (!(pio_flags & IORESOURCE_IO)) {
|
||||
printk (KERN_ERR PFX "%s: region #0 not a PIO resource, aborting\n", pci_name(pdev));
|
||||
dev_err(&pdev->dev, "region #0 not a PIO resource, aborting\n");
|
||||
rc = -ENODEV;
|
||||
goto err_out;
|
||||
}
|
||||
/* check for weird/broken PCI region reporting */
|
||||
if (pio_len < RTL_MIN_IO_SIZE) {
|
||||
printk (KERN_ERR PFX "%s: Invalid PCI I/O region size(s), aborting\n", pci_name(pdev));
|
||||
dev_err(&pdev->dev, "Invalid PCI I/O region size(s), aborting\n");
|
||||
rc = -ENODEV;
|
||||
goto err_out;
|
||||
}
|
||||
#else
|
||||
/* make sure PCI base addr 1 is MMIO */
|
||||
if (!(mmio_flags & IORESOURCE_MEM)) {
|
||||
printk (KERN_ERR PFX "%s: region #1 not an MMIO resource, aborting\n", pci_name(pdev));
|
||||
dev_err(&pdev->dev, "region #1 not an MMIO resource, aborting\n");
|
||||
rc = -ENODEV;
|
||||
goto err_out;
|
||||
}
|
||||
if (mmio_len < RTL_MIN_IO_SIZE) {
|
||||
printk (KERN_ERR PFX "%s: Invalid PCI mem region size(s), aborting\n", pci_name(pdev));
|
||||
dev_err(&pdev->dev, "Invalid PCI mem region size(s), aborting\n");
|
||||
rc = -ENODEV;
|
||||
goto err_out;
|
||||
}
|
||||
#endif
|
||||
|
||||
rc = pci_request_regions (pdev, "8139too");
|
||||
rc = pci_request_regions (pdev, DRV_NAME);
|
||||
if (rc)
|
||||
goto err_out;
|
||||
disable_dev_on_err = 1;
|
||||
@@ -835,7 +835,7 @@ static int __devinit rtl8139_init_board (struct pci_dev *pdev,
|
||||
#ifdef USE_IO_OPS
|
||||
ioaddr = ioport_map(pio_start, pio_len);
|
||||
if (!ioaddr) {
|
||||
printk (KERN_ERR PFX "%s: cannot map PIO, aborting\n", pci_name(pdev));
|
||||
dev_err(&pdev->dev, "cannot map PIO, aborting\n");
|
||||
rc = -EIO;
|
||||
goto err_out;
|
||||
}
|
||||
@@ -846,7 +846,7 @@ static int __devinit rtl8139_init_board (struct pci_dev *pdev,
|
||||
/* ioremap MMIO region */
|
||||
ioaddr = pci_iomap(pdev, 1, 0);
|
||||
if (ioaddr == NULL) {
|
||||
printk (KERN_ERR PFX "%s: cannot remap MMIO, aborting\n", pci_name(pdev));
|
||||
dev_err(&pdev->dev, "cannot remap MMIO, aborting\n");
|
||||
rc = -EIO;
|
||||
goto err_out;
|
||||
}
|
||||
@@ -860,8 +860,7 @@ static int __devinit rtl8139_init_board (struct pci_dev *pdev,
|
||||
|
||||
/* check for missing/broken hardware */
|
||||
if (RTL_R32 (TxConfig) == 0xFFFFFFFF) {
|
||||
printk (KERN_ERR PFX "%s: Chip not responding, ignoring board\n",
|
||||
pci_name(pdev));
|
||||
dev_err(&pdev->dev, "Chip not responding, ignoring board\n");
|
||||
rc = -EIO;
|
||||
goto err_out;
|
||||
}
|
||||
@@ -875,9 +874,10 @@ static int __devinit rtl8139_init_board (struct pci_dev *pdev,
|
||||
}
|
||||
|
||||
/* if unknown chip, assume array element #0, original RTL-8139 in this case */
|
||||
printk (KERN_DEBUG PFX "%s: unknown chip version, assuming RTL-8139\n",
|
||||
pci_name(pdev));
|
||||
printk (KERN_DEBUG PFX "%s: TxConfig = 0x%lx\n", pci_name(pdev), RTL_R32 (TxConfig));
|
||||
dev_printk (KERN_DEBUG, &pdev->dev,
|
||||
"unknown chip version, assuming RTL-8139\n");
|
||||
dev_printk (KERN_DEBUG, &pdev->dev,
|
||||
"TxConfig = 0x%lx\n", RTL_R32 (TxConfig));
|
||||
tp->chipset = 0;
|
||||
|
||||
match:
|
||||
@@ -954,9 +954,11 @@ static int __devinit rtl8139_init_one (struct pci_dev *pdev,
|
||||
|
||||
if (pdev->vendor == PCI_VENDOR_ID_REALTEK &&
|
||||
pdev->device == PCI_DEVICE_ID_REALTEK_8139 && pci_rev >= 0x20) {
|
||||
printk(KERN_INFO PFX "pci dev %s (id %04x:%04x rev %02x) is an enhanced 8139C+ chip\n",
|
||||
pci_name(pdev), pdev->vendor, pdev->device, pci_rev);
|
||||
printk(KERN_INFO PFX "Use the \"8139cp\" driver for improved performance and stability.\n");
|
||||
dev_info(&pdev->dev,
|
||||
"This (id %04x:%04x rev %02x) is an enhanced 8139C+ chip\n",
|
||||
pdev->vendor, pdev->device, pci_rev);
|
||||
dev_info(&pdev->dev,
|
||||
"Use the \"8139cp\" driver for improved performance and stability.\n");
|
||||
}
|
||||
|
||||
i = rtl8139_init_board (pdev, &dev);
|
||||
|
||||
+12
-15
@@ -2120,13 +2120,14 @@ static int __devinit b44_init_one(struct pci_dev *pdev,
|
||||
|
||||
err = pci_enable_device(pdev);
|
||||
if (err) {
|
||||
printk(KERN_ERR PFX "Cannot enable PCI device, "
|
||||
dev_err(&pdev->dev, "Cannot enable PCI device, "
|
||||
"aborting.\n");
|
||||
return err;
|
||||
}
|
||||
|
||||
if (!(pci_resource_flags(pdev, 0) & IORESOURCE_MEM)) {
|
||||
printk(KERN_ERR PFX "Cannot find proper PCI device "
|
||||
dev_err(&pdev->dev,
|
||||
"Cannot find proper PCI device "
|
||||
"base address, aborting.\n");
|
||||
err = -ENODEV;
|
||||
goto err_out_disable_pdev;
|
||||
@@ -2134,8 +2135,8 @@ static int __devinit b44_init_one(struct pci_dev *pdev,
|
||||
|
||||
err = pci_request_regions(pdev, DRV_MODULE_NAME);
|
||||
if (err) {
|
||||
printk(KERN_ERR PFX "Cannot obtain PCI resources, "
|
||||
"aborting.\n");
|
||||
dev_err(&pdev->dev,
|
||||
"Cannot obtain PCI resources, aborting.\n");
|
||||
goto err_out_disable_pdev;
|
||||
}
|
||||
|
||||
@@ -2143,15 +2144,13 @@ static int __devinit b44_init_one(struct pci_dev *pdev,
|
||||
|
||||
err = pci_set_dma_mask(pdev, (u64) B44_DMA_MASK);
|
||||
if (err) {
|
||||
printk(KERN_ERR PFX "No usable DMA configuration, "
|
||||
"aborting.\n");
|
||||
dev_err(&pdev->dev, "No usable DMA configuration, aborting.\n");
|
||||
goto err_out_free_res;
|
||||
}
|
||||
|
||||
err = pci_set_consistent_dma_mask(pdev, (u64) B44_DMA_MASK);
|
||||
if (err) {
|
||||
printk(KERN_ERR PFX "No usable DMA configuration, "
|
||||
"aborting.\n");
|
||||
dev_err(&pdev->dev, "No usable DMA configuration, aborting.\n");
|
||||
goto err_out_free_res;
|
||||
}
|
||||
|
||||
@@ -2160,7 +2159,7 @@ static int __devinit b44_init_one(struct pci_dev *pdev,
|
||||
|
||||
dev = alloc_etherdev(sizeof(*bp));
|
||||
if (!dev) {
|
||||
printk(KERN_ERR PFX "Etherdev alloc failed, aborting.\n");
|
||||
dev_err(&pdev->dev, "Etherdev alloc failed, aborting.\n");
|
||||
err = -ENOMEM;
|
||||
goto err_out_free_res;
|
||||
}
|
||||
@@ -2181,8 +2180,7 @@ static int __devinit b44_init_one(struct pci_dev *pdev,
|
||||
|
||||
bp->regs = ioremap(b44reg_base, b44reg_len);
|
||||
if (bp->regs == 0UL) {
|
||||
printk(KERN_ERR PFX "Cannot map device registers, "
|
||||
"aborting.\n");
|
||||
dev_err(&pdev->dev, "Cannot map device registers, aborting.\n");
|
||||
err = -ENOMEM;
|
||||
goto err_out_free_dev;
|
||||
}
|
||||
@@ -2212,8 +2210,8 @@ static int __devinit b44_init_one(struct pci_dev *pdev,
|
||||
|
||||
err = b44_get_invariants(bp);
|
||||
if (err) {
|
||||
printk(KERN_ERR PFX "Problem fetching invariants of chip, "
|
||||
"aborting.\n");
|
||||
dev_err(&pdev->dev,
|
||||
"Problem fetching invariants of chip, aborting.\n");
|
||||
goto err_out_iounmap;
|
||||
}
|
||||
|
||||
@@ -2233,8 +2231,7 @@ static int __devinit b44_init_one(struct pci_dev *pdev,
|
||||
|
||||
err = register_netdev(dev);
|
||||
if (err) {
|
||||
printk(KERN_ERR PFX "Cannot register net device, "
|
||||
"aborting.\n");
|
||||
dev_err(&pdev->dev, "Cannot register net device, aborting.\n");
|
||||
goto err_out_iounmap;
|
||||
}
|
||||
|
||||
|
||||
+15
-15
@@ -5575,20 +5575,20 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)
|
||||
/* enable device (incl. PCI PM wakeup), and bus-mastering */
|
||||
rc = pci_enable_device(pdev);
|
||||
if (rc) {
|
||||
printk(KERN_ERR PFX "Cannot enable PCI device, aborting.");
|
||||
dev_err(&pdev->dev, "Cannot enable PCI device, aborting.");
|
||||
goto err_out;
|
||||
}
|
||||
|
||||
if (!(pci_resource_flags(pdev, 0) & IORESOURCE_MEM)) {
|
||||
printk(KERN_ERR PFX "Cannot find PCI device base address, "
|
||||
"aborting.\n");
|
||||
dev_err(&pdev->dev,
|
||||
"Cannot find PCI device base address, aborting.\n");
|
||||
rc = -ENODEV;
|
||||
goto err_out_disable;
|
||||
}
|
||||
|
||||
rc = pci_request_regions(pdev, DRV_MODULE_NAME);
|
||||
if (rc) {
|
||||
printk(KERN_ERR PFX "Cannot obtain PCI resources, aborting.\n");
|
||||
dev_err(&pdev->dev, "Cannot obtain PCI resources, aborting.\n");
|
||||
goto err_out_disable;
|
||||
}
|
||||
|
||||
@@ -5596,15 +5596,15 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)
|
||||
|
||||
bp->pm_cap = pci_find_capability(pdev, PCI_CAP_ID_PM);
|
||||
if (bp->pm_cap == 0) {
|
||||
printk(KERN_ERR PFX "Cannot find power management capability, "
|
||||
"aborting.\n");
|
||||
dev_err(&pdev->dev,
|
||||
"Cannot find power management capability, aborting.\n");
|
||||
rc = -EIO;
|
||||
goto err_out_release;
|
||||
}
|
||||
|
||||
bp->pcix_cap = pci_find_capability(pdev, PCI_CAP_ID_PCIX);
|
||||
if (bp->pcix_cap == 0) {
|
||||
printk(KERN_ERR PFX "Cannot find PCIX capability, aborting.\n");
|
||||
dev_err(&pdev->dev, "Cannot find PCIX capability, aborting.\n");
|
||||
rc = -EIO;
|
||||
goto err_out_release;
|
||||
}
|
||||
@@ -5612,14 +5612,14 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)
|
||||
if (pci_set_dma_mask(pdev, DMA_64BIT_MASK) == 0) {
|
||||
bp->flags |= USING_DAC_FLAG;
|
||||
if (pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK) != 0) {
|
||||
printk(KERN_ERR PFX "pci_set_consistent_dma_mask "
|
||||
"failed, aborting.\n");
|
||||
dev_err(&pdev->dev,
|
||||
"pci_set_consistent_dma_mask failed, aborting.\n");
|
||||
rc = -EIO;
|
||||
goto err_out_release;
|
||||
}
|
||||
}
|
||||
else if (pci_set_dma_mask(pdev, DMA_32BIT_MASK) != 0) {
|
||||
printk(KERN_ERR PFX "System does not support DMA, aborting.\n");
|
||||
dev_err(&pdev->dev, "System does not support DMA, aborting.\n");
|
||||
rc = -EIO;
|
||||
goto err_out_release;
|
||||
}
|
||||
@@ -5639,7 +5639,7 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)
|
||||
bp->regview = ioremap_nocache(dev->base_addr, mem_len);
|
||||
|
||||
if (!bp->regview) {
|
||||
printk(KERN_ERR PFX "Cannot map register space, aborting.\n");
|
||||
dev_err(&pdev->dev, "Cannot map register space, aborting.\n");
|
||||
rc = -ENOMEM;
|
||||
goto err_out_release;
|
||||
}
|
||||
@@ -5711,8 +5711,8 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)
|
||||
else if ((CHIP_ID(bp) == CHIP_ID_5706_A1) &&
|
||||
!(bp->flags & PCIX_FLAG)) {
|
||||
|
||||
printk(KERN_ERR PFX "5706 A1 can only be used in a PCIX bus, "
|
||||
"aborting.\n");
|
||||
dev_err(&pdev->dev,
|
||||
"5706 A1 can only be used in a PCIX bus, aborting.\n");
|
||||
goto err_out_unmap;
|
||||
}
|
||||
|
||||
@@ -5733,7 +5733,7 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)
|
||||
|
||||
if ((reg & BNX2_DEV_INFO_SIGNATURE_MAGIC_MASK) !=
|
||||
BNX2_DEV_INFO_SIGNATURE_MAGIC) {
|
||||
printk(KERN_ERR PFX "Firmware not running, aborting.\n");
|
||||
dev_err(&pdev->dev, "Firmware not running, aborting.\n");
|
||||
rc = -ENODEV;
|
||||
goto err_out_unmap;
|
||||
}
|
||||
@@ -5895,7 +5895,7 @@ bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
#endif
|
||||
|
||||
if ((rc = register_netdev(dev))) {
|
||||
printk(KERN_ERR PFX "Cannot register net device\n");
|
||||
dev_err(&pdev->dev, "Cannot register net device\n");
|
||||
if (bp->regview)
|
||||
iounmap(bp->regview);
|
||||
pci_release_regions(pdev);
|
||||
|
||||
+10
-15
@@ -4887,13 +4887,12 @@ static int __devinit cas_init_one(struct pci_dev *pdev,
|
||||
|
||||
err = pci_enable_device(pdev);
|
||||
if (err) {
|
||||
printk(KERN_ERR PFX "Cannot enable PCI device, "
|
||||
"aborting.\n");
|
||||
dev_err(&pdev->dev, "Cannot enable PCI device, aborting.\n");
|
||||
return err;
|
||||
}
|
||||
|
||||
if (!(pci_resource_flags(pdev, 0) & IORESOURCE_MEM)) {
|
||||
printk(KERN_ERR PFX "Cannot find proper PCI device "
|
||||
dev_err(&pdev->dev, "Cannot find proper PCI device "
|
||||
"base address, aborting.\n");
|
||||
err = -ENODEV;
|
||||
goto err_out_disable_pdev;
|
||||
@@ -4901,7 +4900,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev,
|
||||
|
||||
dev = alloc_etherdev(sizeof(*cp));
|
||||
if (!dev) {
|
||||
printk(KERN_ERR PFX "Etherdev alloc failed, aborting.\n");
|
||||
dev_err(&pdev->dev, "Etherdev alloc failed, aborting.\n");
|
||||
err = -ENOMEM;
|
||||
goto err_out_disable_pdev;
|
||||
}
|
||||
@@ -4910,8 +4909,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev,
|
||||
|
||||
err = pci_request_regions(pdev, dev->name);
|
||||
if (err) {
|
||||
printk(KERN_ERR PFX "Cannot obtain PCI resources, "
|
||||
"aborting.\n");
|
||||
dev_err(&pdev->dev, "Cannot obtain PCI resources, aborting.\n");
|
||||
goto err_out_free_netdev;
|
||||
}
|
||||
pci_set_master(pdev);
|
||||
@@ -4941,7 +4939,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev,
|
||||
if (pci_write_config_byte(pdev,
|
||||
PCI_CACHE_LINE_SIZE,
|
||||
cas_cacheline_size)) {
|
||||
printk(KERN_ERR PFX "Could not set PCI cache "
|
||||
dev_err(&pdev->dev, "Could not set PCI cache "
|
||||
"line size\n");
|
||||
goto err_write_cacheline;
|
||||
}
|
||||
@@ -4955,7 +4953,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev,
|
||||
err = pci_set_consistent_dma_mask(pdev,
|
||||
DMA_64BIT_MASK);
|
||||
if (err < 0) {
|
||||
printk(KERN_ERR PFX "Unable to obtain 64-bit DMA "
|
||||
dev_err(&pdev->dev, "Unable to obtain 64-bit DMA "
|
||||
"for consistent allocations\n");
|
||||
goto err_out_free_res;
|
||||
}
|
||||
@@ -4963,7 +4961,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev,
|
||||
} else {
|
||||
err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
|
||||
if (err) {
|
||||
printk(KERN_ERR PFX "No usable DMA configuration, "
|
||||
dev_err(&pdev->dev, "No usable DMA configuration, "
|
||||
"aborting.\n");
|
||||
goto err_out_free_res;
|
||||
}
|
||||
@@ -5023,8 +5021,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev,
|
||||
/* give us access to cassini registers */
|
||||
cp->regs = pci_iomap(pdev, 0, casreg_len);
|
||||
if (cp->regs == 0UL) {
|
||||
printk(KERN_ERR PFX "Cannot map device registers, "
|
||||
"aborting.\n");
|
||||
dev_err(&pdev->dev, "Cannot map device registers, aborting.\n");
|
||||
goto err_out_free_res;
|
||||
}
|
||||
cp->casreg_len = casreg_len;
|
||||
@@ -5040,8 +5037,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev,
|
||||
pci_alloc_consistent(pdev, sizeof(struct cas_init_block),
|
||||
&cp->block_dvma);
|
||||
if (!cp->init_block) {
|
||||
printk(KERN_ERR PFX "Cannot allocate init block, "
|
||||
"aborting.\n");
|
||||
dev_err(&pdev->dev, "Cannot allocate init block, aborting.\n");
|
||||
goto err_out_iounmap;
|
||||
}
|
||||
|
||||
@@ -5085,8 +5081,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev,
|
||||
dev->features |= NETIF_F_HIGHDMA;
|
||||
|
||||
if (register_netdev(dev)) {
|
||||
printk(KERN_ERR PFX "Cannot register net device, "
|
||||
"aborting.\n");
|
||||
dev_err(&pdev->dev, "Cannot register net device, aborting.\n");
|
||||
goto err_out_free_consistent;
|
||||
}
|
||||
|
||||
|
||||
@@ -703,8 +703,8 @@ static irqreturn_t lance_dma_merr_int(const int irq, void *dev_id,
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
static irqreturn_t
|
||||
lance_interrupt(const int irq, void *dev_id, struct pt_regs *regs)
|
||||
static irqreturn_t lance_interrupt(const int irq, void *dev_id,
|
||||
struct pt_regs *regs)
|
||||
{
|
||||
struct net_device *dev = (struct net_device *) dev_id;
|
||||
struct lance_private *lp = netdev_priv(dev);
|
||||
@@ -1253,7 +1253,7 @@ static int __init dec_lance_init(const int type, const int slot)
|
||||
return 0;
|
||||
|
||||
err_out_free_dev:
|
||||
kfree(dev);
|
||||
free_netdev(dev);
|
||||
|
||||
err_out:
|
||||
return ret;
|
||||
@@ -1299,6 +1299,7 @@ static void __exit dec_lance_cleanup(void)
|
||||
while (root_lance_dev) {
|
||||
struct net_device *dev = root_lance_dev;
|
||||
struct lance_private *lp = netdev_priv(dev);
|
||||
|
||||
unregister_netdev(dev);
|
||||
#ifdef CONFIG_TC
|
||||
if (lp->slot >= 0)
|
||||
|
||||
+2
-41
@@ -9,49 +9,10 @@
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
*/
|
||||
/*
|
||||
Rev Date Description
|
||||
==========================================================================
|
||||
0.01 2001/05/03 Created DL2000-based linux driver
|
||||
0.02 2001/05/21 Added VLAN and hardware checksum support.
|
||||
1.00 2001/06/26 Added jumbo frame support.
|
||||
1.01 2001/08/21 Added two parameters, rx_coalesce and rx_timeout.
|
||||
1.02 2001/10/08 Supported fiber media.
|
||||
Added flow control parameters.
|
||||
1.03 2001/10/12 Changed the default media to 1000mbps_fd for
|
||||
the fiber devices.
|
||||
1.04 2001/11/08 Fixed Tx stopped when tx very busy.
|
||||
1.05 2001/11/22 Fixed Tx stopped when unidirectional tx busy.
|
||||
1.06 2001/12/13 Fixed disconnect bug at 10Mbps mode.
|
||||
Fixed tx_full flag incorrect.
|
||||
Added tx_coalesce paramter.
|
||||
1.07 2002/01/03 Fixed miscount of RX frame error.
|
||||
1.08 2002/01/17 Fixed the multicast bug.
|
||||
1.09 2002/03/07 Move rx-poll-now to re-fill loop.
|
||||
Added rio_timer() to watch rx buffers.
|
||||
1.10 2002/04/16 Fixed miscount of carrier error.
|
||||
1.11 2002/05/23 Added ISR schedule scheme
|
||||
Fixed miscount of rx frame error for DGE-550SX.
|
||||
Fixed VLAN bug.
|
||||
1.12 2002/06/13 Lock tx_coalesce=1 on 10/100Mbps mode.
|
||||
1.13 2002/08/13 1. Fix disconnection (many tx:carrier/rx:frame
|
||||
errs) with some mainboards.
|
||||
2. Use definition "DRV_NAME" "DRV_VERSION"
|
||||
"DRV_RELDATE" for flexibility.
|
||||
1.14 2002/08/14 Support ethtool.
|
||||
1.15 2002/08/27 Changed the default media to Auto-Negotiation
|
||||
for the fiber devices.
|
||||
1.16 2002/09/04 More power down time for fiber devices auto-
|
||||
negotiation.
|
||||
Fix disconnect bug after ifup and ifdown.
|
||||
1.17 2002/10/03 Fix RMON statistics overflow.
|
||||
Always use I/O mapping to access eeprom,
|
||||
avoid system freezing with some chipsets.
|
||||
|
||||
*/
|
||||
#define DRV_NAME "D-Link DL2000-based linux driver"
|
||||
#define DRV_VERSION "v1.17b"
|
||||
#define DRV_RELDATE "2006/03/10"
|
||||
#define DRV_VERSION "v1.18"
|
||||
#define DRV_RELDATE "2006/06/27"
|
||||
#include "dl2k.h"
|
||||
#include <linux/dma-mapping.h>
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user