mirror of
https://github.com/ukui/kernel.git
synced 2026-03-09 10:07:04 -07:00
Merge branch 'master'
This commit is contained in:
@@ -46,8 +46,9 @@ USB-specific:
|
||||
|
||||
-EMSGSIZE (a) endpoint maxpacket size is zero; it is not usable
|
||||
in the current interface altsetting.
|
||||
(b) ISO packet is biger than endpoint maxpacket
|
||||
(c) requested data transfer size is invalid (negative)
|
||||
(b) ISO packet is larger than the endpoint maxpacket.
|
||||
(c) requested data transfer length is invalid: negative
|
||||
or too large for the host controller.
|
||||
|
||||
-ENOSPC This request would overcommit the usb bandwidth reserved
|
||||
for periodic transfers (interrupt, isochronous).
|
||||
|
||||
2
Makefile
2
Makefile
@@ -1,7 +1,7 @@
|
||||
VERSION = 2
|
||||
PATCHLEVEL = 6
|
||||
SUBLEVEL = 15
|
||||
EXTRAVERSION =-rc3
|
||||
EXTRAVERSION =-rc4
|
||||
NAME=Affluent Albatross
|
||||
|
||||
# *DOCUMENTATION*
|
||||
|
||||
@@ -2009,7 +2009,7 @@ static void ack_edge_ioapic_vector(unsigned int vector)
|
||||
{
|
||||
int irq = vector_to_irq(vector);
|
||||
|
||||
move_irq(vector);
|
||||
move_native_irq(vector);
|
||||
ack_edge_ioapic_irq(irq);
|
||||
}
|
||||
|
||||
@@ -2024,7 +2024,7 @@ static void end_level_ioapic_vector (unsigned int vector)
|
||||
{
|
||||
int irq = vector_to_irq(vector);
|
||||
|
||||
move_irq(vector);
|
||||
move_native_irq(vector);
|
||||
end_level_ioapic_irq(irq);
|
||||
}
|
||||
|
||||
|
||||
@@ -111,6 +111,14 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = {
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge 2400"),
|
||||
},
|
||||
},
|
||||
{ /* Handle problems with rebooting on HP nc6120 */
|
||||
.callback = set_bios_reboot,
|
||||
.ident = "HP Compaq nc6120",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "HP Compaq nc6120"),
|
||||
},
|
||||
},
|
||||
{ }
|
||||
};
|
||||
|
||||
|
||||
@@ -42,6 +42,7 @@ EXPORT_SYMBOL(clear_page);
|
||||
|
||||
#ifdef CONFIG_VIRTUAL_MEM_MAP
|
||||
#include <linux/bootmem.h>
|
||||
EXPORT_SYMBOL(min_low_pfn); /* defined by bootmem.c, but not exported by generic code */
|
||||
EXPORT_SYMBOL(max_low_pfn); /* defined by bootmem.c, but not exported by generic code */
|
||||
#endif
|
||||
|
||||
|
||||
@@ -740,7 +740,7 @@ int __kprobes kprobe_exceptions_notify(struct notifier_block *self,
|
||||
switch(val) {
|
||||
case DIE_BREAK:
|
||||
/* err is break number from ia64_bad_break() */
|
||||
if (args->err == 0x80200 || args->err == 0x80300)
|
||||
if (args->err == 0x80200 || args->err == 0x80300 || args->err == 0)
|
||||
if (pre_kprobes_handler(args))
|
||||
ret = NOTIFY_STOP;
|
||||
break;
|
||||
|
||||
@@ -132,24 +132,6 @@ __kprobes ia64_bad_break (unsigned long break_num, struct pt_regs *regs)
|
||||
siginfo_t siginfo;
|
||||
int sig, code;
|
||||
|
||||
/* break.b always sets cr.iim to 0, which causes problems for
|
||||
* debuggers. Get the real break number from the original instruction,
|
||||
* but only for kernel code. User space break.b is left alone, to
|
||||
* preserve the existing behaviour. All break codings have the same
|
||||
* format, so there is no need to check the slot type.
|
||||
*/
|
||||
if (break_num == 0 && !user_mode(regs)) {
|
||||
struct ia64_psr *ipsr = ia64_psr(regs);
|
||||
unsigned long *bundle = (unsigned long *)regs->cr_iip;
|
||||
unsigned long slot;
|
||||
switch (ipsr->ri) {
|
||||
case 0: slot = (bundle[0] >> 5); break;
|
||||
case 1: slot = (bundle[0] >> 46) | (bundle[1] << 18); break;
|
||||
default: slot = (bundle[1] >> 23); break;
|
||||
}
|
||||
break_num = ((slot >> 36 & 1) << 20) | (slot >> 6 & 0xfffff);
|
||||
}
|
||||
|
||||
/* SIGILL, SIGFPE, SIGSEGV, and SIGBUS want these field initialized: */
|
||||
siginfo.si_addr = (void __user *) (regs->cr_iip + ia64_psr(regs)->ri);
|
||||
siginfo.si_imm = break_num;
|
||||
|
||||
@@ -163,15 +163,13 @@ EXPORT_SYMBOL(giveup_altivec);
|
||||
EXPORT_SYMBOL(giveup_spe);
|
||||
#endif /* CONFIG_SPE */
|
||||
|
||||
#ifdef CONFIG_PPC64
|
||||
EXPORT_SYMBOL(__flush_icache_range);
|
||||
#else
|
||||
#ifndef CONFIG_PPC64
|
||||
EXPORT_SYMBOL(flush_instruction_cache);
|
||||
EXPORT_SYMBOL(flush_icache_range);
|
||||
EXPORT_SYMBOL(flush_tlb_kernel_range);
|
||||
EXPORT_SYMBOL(flush_tlb_page);
|
||||
EXPORT_SYMBOL(_tlbie);
|
||||
#endif
|
||||
EXPORT_SYMBOL(__flush_icache_range);
|
||||
EXPORT_SYMBOL(flush_dcache_range);
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
|
||||
@@ -201,6 +201,28 @@ int dump_spe(struct pt_regs *regs, elf_vrregset_t *evrregs)
|
||||
}
|
||||
#endif /* CONFIG_SPE */
|
||||
|
||||
/*
|
||||
* If we are doing lazy switching of CPU state (FP, altivec or SPE),
|
||||
* and the current task has some state, discard it.
|
||||
*/
|
||||
static inline void discard_lazy_cpu_state(void)
|
||||
{
|
||||
#ifndef CONFIG_SMP
|
||||
preempt_disable();
|
||||
if (last_task_used_math == current)
|
||||
last_task_used_math = NULL;
|
||||
#ifdef CONFIG_ALTIVEC
|
||||
if (last_task_used_altivec == current)
|
||||
last_task_used_altivec = NULL;
|
||||
#endif /* CONFIG_ALTIVEC */
|
||||
#ifdef CONFIG_SPE
|
||||
if (last_task_used_spe == current)
|
||||
last_task_used_spe = NULL;
|
||||
#endif
|
||||
preempt_enable();
|
||||
#endif /* CONFIG_SMP */
|
||||
}
|
||||
|
||||
int set_dabr(unsigned long dabr)
|
||||
{
|
||||
if (ppc_md.set_dabr)
|
||||
@@ -434,19 +456,7 @@ void show_regs(struct pt_regs * regs)
|
||||
void exit_thread(void)
|
||||
{
|
||||
kprobe_flush_task(current);
|
||||
|
||||
#ifndef CONFIG_SMP
|
||||
if (last_task_used_math == current)
|
||||
last_task_used_math = NULL;
|
||||
#ifdef CONFIG_ALTIVEC
|
||||
if (last_task_used_altivec == current)
|
||||
last_task_used_altivec = NULL;
|
||||
#endif /* CONFIG_ALTIVEC */
|
||||
#ifdef CONFIG_SPE
|
||||
if (last_task_used_spe == current)
|
||||
last_task_used_spe = NULL;
|
||||
#endif
|
||||
#endif /* CONFIG_SMP */
|
||||
discard_lazy_cpu_state();
|
||||
}
|
||||
|
||||
void flush_thread(void)
|
||||
@@ -458,18 +468,7 @@ void flush_thread(void)
|
||||
t->flags ^= (_TIF_ABI_PENDING | _TIF_32BIT);
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_SMP
|
||||
if (last_task_used_math == current)
|
||||
last_task_used_math = NULL;
|
||||
#ifdef CONFIG_ALTIVEC
|
||||
if (last_task_used_altivec == current)
|
||||
last_task_used_altivec = NULL;
|
||||
#endif /* CONFIG_ALTIVEC */
|
||||
#ifdef CONFIG_SPE
|
||||
if (last_task_used_spe == current)
|
||||
last_task_used_spe = NULL;
|
||||
#endif
|
||||
#endif /* CONFIG_SMP */
|
||||
discard_lazy_cpu_state();
|
||||
|
||||
#ifdef CONFIG_PPC64 /* for now */
|
||||
if (current->thread.dabr) {
|
||||
@@ -635,18 +634,7 @@ void start_thread(struct pt_regs *regs, unsigned long start, unsigned long sp)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_SMP
|
||||
if (last_task_used_math == current)
|
||||
last_task_used_math = NULL;
|
||||
#ifdef CONFIG_ALTIVEC
|
||||
if (last_task_used_altivec == current)
|
||||
last_task_used_altivec = NULL;
|
||||
#endif
|
||||
#ifdef CONFIG_SPE
|
||||
if (last_task_used_spe == current)
|
||||
last_task_used_spe = NULL;
|
||||
#endif
|
||||
#endif /* CONFIG_SMP */
|
||||
discard_lazy_cpu_state();
|
||||
memset(current->thread.fpr, 0, sizeof(current->thread.fpr));
|
||||
current->thread.fpscr.val = 0;
|
||||
#ifdef CONFIG_ALTIVEC
|
||||
|
||||
@@ -265,7 +265,7 @@ static int __init call_prom_ret(const char *service, int nargs, int nret,
|
||||
va_end(list);
|
||||
|
||||
for (i = 0; i < nret; i++)
|
||||
rets[nargs+i] = 0;
|
||||
args.args[nargs+i] = 0;
|
||||
|
||||
if (enter_prom(&args, RELOC(prom_entry)) < 0)
|
||||
return PROM_ERROR;
|
||||
|
||||
@@ -184,7 +184,7 @@ EXPORT_SYMBOL(kernel_thread);
|
||||
|
||||
EXPORT_SYMBOL(flush_instruction_cache);
|
||||
EXPORT_SYMBOL(giveup_fpu);
|
||||
EXPORT_SYMBOL(flush_icache_range);
|
||||
EXPORT_SYMBOL(__flush_icache_range);
|
||||
EXPORT_SYMBOL(flush_dcache_range);
|
||||
EXPORT_SYMBOL(flush_icache_user_range);
|
||||
EXPORT_SYMBOL(flush_dcache_page);
|
||||
|
||||
@@ -417,6 +417,7 @@ void show_regs(struct pt_regs * regs)
|
||||
|
||||
void exit_thread(void)
|
||||
{
|
||||
preempt_disable();
|
||||
if (last_task_used_math == current)
|
||||
last_task_used_math = NULL;
|
||||
if (last_task_used_altivec == current)
|
||||
@@ -425,10 +426,12 @@ void exit_thread(void)
|
||||
if (last_task_used_spe == current)
|
||||
last_task_used_spe = NULL;
|
||||
#endif
|
||||
preempt_enable();
|
||||
}
|
||||
|
||||
void flush_thread(void)
|
||||
{
|
||||
preempt_disable();
|
||||
if (last_task_used_math == current)
|
||||
last_task_used_math = NULL;
|
||||
if (last_task_used_altivec == current)
|
||||
@@ -437,6 +440,7 @@ void flush_thread(void)
|
||||
if (last_task_used_spe == current)
|
||||
last_task_used_spe = NULL;
|
||||
#endif
|
||||
preempt_enable();
|
||||
}
|
||||
|
||||
void
|
||||
@@ -535,6 +539,7 @@ void start_thread(struct pt_regs *regs, unsigned long nip, unsigned long sp)
|
||||
regs->nip = nip;
|
||||
regs->gpr[1] = sp;
|
||||
regs->msr = MSR_USER;
|
||||
preempt_disable();
|
||||
if (last_task_used_math == current)
|
||||
last_task_used_math = NULL;
|
||||
if (last_task_used_altivec == current)
|
||||
@@ -543,6 +548,7 @@ void start_thread(struct pt_regs *regs, unsigned long nip, unsigned long sp)
|
||||
if (last_task_used_spe == current)
|
||||
last_task_used_spe = NULL;
|
||||
#endif
|
||||
preempt_enable();
|
||||
memset(current->thread.fpr, 0, sizeof(current->thread.fpr));
|
||||
current->thread.fpscr.val = 0;
|
||||
#ifdef CONFIG_ALTIVEC
|
||||
|
||||
@@ -77,6 +77,7 @@ static inline void io_remap_pte_range(struct mm_struct *mm, pte_t * pte,
|
||||
BUG_ON(!pte_none(*pte));
|
||||
set_pte_at(mm, address, pte, entry);
|
||||
address += PAGE_SIZE;
|
||||
pte_val(entry) += PAGE_SIZE;
|
||||
pte++;
|
||||
} while (address < curend);
|
||||
} while (address < end);
|
||||
|
||||
@@ -5,6 +5,13 @@
|
||||
menu "ATM drivers"
|
||||
depends on NETDEVICES && ATM
|
||||
|
||||
config ATM_DUMMY
|
||||
tristate "Dummy ATM driver"
|
||||
depends on ATM
|
||||
help
|
||||
Dummy ATM driver. Useful for proxy signalling, testing,
|
||||
and development. If unsure, say N.
|
||||
|
||||
config ATM_TCP
|
||||
tristate "ATM over TCP"
|
||||
depends on INET && ATM
|
||||
|
||||
@@ -31,6 +31,7 @@ ifeq ($(CONFIG_ATM_IDT77252_USE_SUNI),y)
|
||||
obj-$(CONFIG_ATM_IDT77252) += suni.o
|
||||
endif
|
||||
|
||||
obj-$(CONFIG_ATM_DUMMY) += adummy.o
|
||||
obj-$(CONFIG_ATM_TCP) += atmtcp.o
|
||||
obj-$(CONFIG_ATM_FIRESTREAM) += firestream.o
|
||||
obj-$(CONFIG_ATM_LANAI) += lanai.o
|
||||
|
||||
168
drivers/atm/adummy.c
Normal file
168
drivers/atm/adummy.c
Normal file
@@ -0,0 +1,168 @@
|
||||
/*
|
||||
* adummy.c: a dummy ATM driver
|
||||
*/
|
||||
|
||||
#include <linux/config.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/version.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/skbuff.h>
|
||||
#include <linux/pci.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/timer.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/byteorder.h>
|
||||
#include <asm/uaccess.h>
|
||||
|
||||
#include <linux/atmdev.h>
|
||||
#include <linux/atm.h>
|
||||
#include <linux/sonet.h>
|
||||
|
||||
/* version definition */
|
||||
|
||||
#define DRV_VERSION "1.0"
|
||||
|
||||
#define DEV_LABEL "adummy"
|
||||
|
||||
#define ADUMMY_DEV(dev) ((struct adummy_dev *) (dev)->dev_data)
|
||||
|
||||
struct adummy_dev {
|
||||
struct atm_dev *atm_dev;
|
||||
|
||||
struct list_head entry;
|
||||
};
|
||||
|
||||
/* globals */
|
||||
|
||||
static LIST_HEAD(adummy_devs);
|
||||
|
||||
static int __init
|
||||
adummy_start(struct atm_dev *dev)
|
||||
{
|
||||
dev->ci_range.vpi_bits = 4;
|
||||
dev->ci_range.vci_bits = 12;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
adummy_open(struct atm_vcc *vcc)
|
||||
{
|
||||
short vpi = vcc->vpi;
|
||||
int vci = vcc->vci;
|
||||
|
||||
if (vci == ATM_VCI_UNSPEC || vpi == ATM_VPI_UNSPEC)
|
||||
return 0;
|
||||
|
||||
set_bit(ATM_VF_ADDR, &vcc->flags);
|
||||
set_bit(ATM_VF_READY, &vcc->flags);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
adummy_close(struct atm_vcc *vcc)
|
||||
{
|
||||
clear_bit(ATM_VF_READY, &vcc->flags);
|
||||
clear_bit(ATM_VF_ADDR, &vcc->flags);
|
||||
}
|
||||
|
||||
static int
|
||||
adummy_send(struct atm_vcc *vcc, struct sk_buff *skb)
|
||||
{
|
||||
if (vcc->pop)
|
||||
vcc->pop(vcc, skb);
|
||||
else
|
||||
dev_kfree_skb_any(skb);
|
||||
atomic_inc(&vcc->stats->tx);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
adummy_proc_read(struct atm_dev *dev, loff_t *pos, char *page)
|
||||
{
|
||||
int left = *pos;
|
||||
|
||||
if (!left--)
|
||||
return sprintf(page, "version %s\n", DRV_VERSION);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct atmdev_ops adummy_ops =
|
||||
{
|
||||
.open = adummy_open,
|
||||
.close = adummy_close,
|
||||
.send = adummy_send,
|
||||
.proc_read = adummy_proc_read,
|
||||
.owner = THIS_MODULE
|
||||
};
|
||||
|
||||
static int __init adummy_init(void)
|
||||
{
|
||||
struct atm_dev *atm_dev;
|
||||
struct adummy_dev *adummy_dev;
|
||||
int err = 0;
|
||||
|
||||
printk(KERN_ERR "adummy: version %s\n", DRV_VERSION);
|
||||
|
||||
adummy_dev = (struct adummy_dev *) kmalloc(sizeof(struct adummy_dev),
|
||||
GFP_KERNEL);
|
||||
if (!adummy_dev) {
|
||||
printk(KERN_ERR DEV_LABEL ": kmalloc() failed\n");
|
||||
err = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
memset(adummy_dev, 0, sizeof(struct adummy_dev));
|
||||
|
||||
atm_dev = atm_dev_register(DEV_LABEL, &adummy_ops, -1, 0);
|
||||
if (!atm_dev) {
|
||||
printk(KERN_ERR DEV_LABEL ": atm_dev_register() failed\n");
|
||||
err = -ENODEV;
|
||||
goto out_kfree;
|
||||
}
|
||||
|
||||
adummy_dev->atm_dev = atm_dev;
|
||||
atm_dev->dev_data = adummy_dev;
|
||||
|
||||
if (adummy_start(atm_dev)) {
|
||||
printk(KERN_ERR DEV_LABEL ": adummy_start() failed\n");
|
||||
err = -ENODEV;
|
||||
goto out_unregister;
|
||||
}
|
||||
|
||||
list_add(&adummy_dev->entry, &adummy_devs);
|
||||
out:
|
||||
return err;
|
||||
|
||||
out_unregister:
|
||||
atm_dev_deregister(atm_dev);
|
||||
out_kfree:
|
||||
kfree(adummy_dev);
|
||||
goto out;
|
||||
}
|
||||
|
||||
static void __exit adummy_cleanup(void)
|
||||
{
|
||||
struct adummy_dev *adummy_dev, *next;
|
||||
|
||||
list_for_each_entry_safe(adummy_dev, next, &adummy_devs, entry) {
|
||||
atm_dev_deregister(adummy_dev->atm_dev);
|
||||
kfree(adummy_dev);
|
||||
}
|
||||
}
|
||||
|
||||
module_init(adummy_init);
|
||||
module_exit(adummy_cleanup);
|
||||
|
||||
MODULE_AUTHOR("chas williams <chas@cmf.nrl.navy.mil>");
|
||||
MODULE_DESCRIPTION("dummy ATM driver");
|
||||
MODULE_LICENSE("GPL");
|
||||
@@ -1,54 +0,0 @@
|
||||
/* drivers/atm/atmdev_init.c - ATM device driver initialization */
|
||||
|
||||
/* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */
|
||||
|
||||
|
||||
#include <linux/config.h>
|
||||
#include <linux/init.h>
|
||||
|
||||
|
||||
#ifdef CONFIG_ATM_ZATM
|
||||
extern int zatm_detect(void);
|
||||
#endif
|
||||
#ifdef CONFIG_ATM_AMBASSADOR
|
||||
extern int amb_detect(void);
|
||||
#endif
|
||||
#ifdef CONFIG_ATM_HORIZON
|
||||
extern int hrz_detect(void);
|
||||
#endif
|
||||
#ifdef CONFIG_ATM_FORE200E
|
||||
extern int fore200e_detect(void);
|
||||
#endif
|
||||
#ifdef CONFIG_ATM_LANAI
|
||||
extern int lanai_detect(void);
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* For historical reasons, atmdev_init returns the number of devices found.
|
||||
* Note that some detections may not go via atmdev_init (e.g. eni.c), so this
|
||||
* number is meaningless.
|
||||
*/
|
||||
|
||||
int __init atmdev_init(void)
|
||||
{
|
||||
int devs;
|
||||
|
||||
devs = 0;
|
||||
#ifdef CONFIG_ATM_ZATM
|
||||
devs += zatm_detect();
|
||||
#endif
|
||||
#ifdef CONFIG_ATM_AMBASSADOR
|
||||
devs += amb_detect();
|
||||
#endif
|
||||
#ifdef CONFIG_ATM_HORIZON
|
||||
devs += hrz_detect();
|
||||
#endif
|
||||
#ifdef CONFIG_ATM_FORE200E
|
||||
devs += fore200e_detect();
|
||||
#endif
|
||||
#ifdef CONFIG_ATM_LANAI
|
||||
devs += lanai_detect();
|
||||
#endif
|
||||
return devs;
|
||||
}
|
||||
@@ -246,10 +246,6 @@ static void atmtcp_c_close(struct atm_vcc *vcc)
|
||||
{
|
||||
struct atm_dev *atmtcp_dev;
|
||||
struct atmtcp_dev_data *dev_data;
|
||||
struct sock *s;
|
||||
struct hlist_node *node;
|
||||
struct atm_vcc *walk;
|
||||
int i;
|
||||
|
||||
atmtcp_dev = (struct atm_dev *) vcc->dev_data;
|
||||
dev_data = PRIV(atmtcp_dev);
|
||||
@@ -257,20 +253,8 @@ static void atmtcp_c_close(struct atm_vcc *vcc)
|
||||
if (dev_data->persist) return;
|
||||
atmtcp_dev->dev_data = NULL;
|
||||
kfree(dev_data);
|
||||
shutdown_atm_dev(atmtcp_dev);
|
||||
atm_dev_deregister(atmtcp_dev);
|
||||
vcc->dev_data = NULL;
|
||||
read_lock(&vcc_sklist_lock);
|
||||
for(i = 0; i < VCC_HTABLE_SIZE; ++i) {
|
||||
struct hlist_head *head = &vcc_hash[i];
|
||||
|
||||
sk_for_each(s, node, head) {
|
||||
walk = atm_sk(s);
|
||||
if (walk->dev != atmtcp_dev)
|
||||
continue;
|
||||
wake_up(s->sk_sleep);
|
||||
}
|
||||
}
|
||||
read_unlock(&vcc_sklist_lock);
|
||||
module_put(THIS_MODULE);
|
||||
}
|
||||
|
||||
@@ -450,7 +434,7 @@ static int atmtcp_remove_persistent(int itf)
|
||||
if (PRIV(dev)->vcc) return 0;
|
||||
kfree(dev_data);
|
||||
atm_dev_put(dev);
|
||||
shutdown_atm_dev(dev);
|
||||
atm_dev_deregister(dev);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
* o lanai_change_qos() isn't written yet
|
||||
*
|
||||
* o There aren't any ioctl's yet -- I'd like to eventually support
|
||||
* setting loopback and LED modes that way. (see lanai_ioctl)
|
||||
* setting loopback and LED modes that way.
|
||||
*
|
||||
* o If the segmentation engine or DMA gets shut down we should restart
|
||||
* card as per section 17.0i. (see lanai_reset)
|
||||
@@ -305,7 +305,7 @@ struct lanai_dev {
|
||||
* vci with their bit set
|
||||
*/
|
||||
static void vci_bitfield_iterate(struct lanai_dev *lanai,
|
||||
/*const*/ unsigned long *lp,
|
||||
const unsigned long *lp,
|
||||
void (*func)(struct lanai_dev *,vci_t vci))
|
||||
{
|
||||
vci_t vci = find_first_bit(lp, NUM_VCI);
|
||||
@@ -951,7 +951,7 @@ static int __devinit eeprom_read(struct lanai_dev *lanai)
|
||||
/* read a big-endian 4-byte value out of eeprom */
|
||||
static inline u32 eeprom_be4(const struct lanai_dev *lanai, int address)
|
||||
{
|
||||
return be32_to_cpup((u32 *) (&lanai->eeprom[address]));
|
||||
return be32_to_cpup((const u32 *) &lanai->eeprom[address]);
|
||||
}
|
||||
|
||||
/* Checksum/validate EEPROM contents */
|
||||
@@ -1160,7 +1160,7 @@ static inline int vcc_tx_space(const struct lanai_vcc *lvcc, int endptr)
|
||||
}
|
||||
|
||||
/* test if VCC is currently backlogged */
|
||||
static inline int vcc_is_backlogged(/*const*/ struct lanai_vcc *lvcc)
|
||||
static inline int vcc_is_backlogged(const struct lanai_vcc *lvcc)
|
||||
{
|
||||
return !skb_queue_empty(&lvcc->tx.backlog);
|
||||
}
|
||||
@@ -1395,7 +1395,8 @@ static void vcc_rx_aal5(struct lanai_vcc *lvcc, int endptr)
|
||||
{
|
||||
int size;
|
||||
struct sk_buff *skb;
|
||||
/*const*/ u32 *x, *end = &lvcc->rx.buf.start[endptr * 4];
|
||||
const u32 *x;
|
||||
u32 *end = &lvcc->rx.buf.start[endptr * 4];
|
||||
int n = ((unsigned long) end) - ((unsigned long) lvcc->rx.buf.ptr);
|
||||
if (n < 0)
|
||||
n += lanai_buf_size(&lvcc->rx.buf);
|
||||
@@ -2111,7 +2112,7 @@ static int lanai_normalize_ci(struct lanai_dev *lanai,
|
||||
* shifted by that much as we compute
|
||||
*
|
||||
*/
|
||||
static int pcr_to_cbricg(/*const*/ struct atm_qos *qos)
|
||||
static int pcr_to_cbricg(const struct atm_qos *qos)
|
||||
{
|
||||
int rounddown = 0; /* 1 = Round PCR down, i.e. round ICG _up_ */
|
||||
int x, icg, pcr = atm_pcr_goal(&qos->txtp);
|
||||
@@ -2434,93 +2435,6 @@ static int lanai_open(struct atm_vcc *atmvcc)
|
||||
return result;
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* ioctl operations for card */
|
||||
/* NOTE: these are all DEBUGGING ONLY currently */
|
||||
static int lanai_ioctl(struct atm_dev *atmdev, unsigned int cmd, void __user *arg)
|
||||
{
|
||||
int result = 0;
|
||||
struct lanai_dev *lanai = (struct lanai_dev *) atmdev->dev_data;
|
||||
switch(cmd) {
|
||||
case 2106275:
|
||||
shutdown_atm_dev(atmdev);
|
||||
return 0;
|
||||
case 2200000: {
|
||||
unsigned long flags;
|
||||
spin_lock_irqsave(&lanai->servicelock, flags);
|
||||
run_service(lanai);
|
||||
spin_unlock_irqrestore(&lanai->servicelock, flags);
|
||||
return 0; }
|
||||
case 2200002:
|
||||
get_statistics(lanai);
|
||||
return 0;
|
||||
case 2200003: {
|
||||
unsigned int i;
|
||||
for (i = 0; i <= 0x5C ; i += 4) {
|
||||
if (i==0x48) /* Write-only butt reg */
|
||||
continue;
|
||||
printk(KERN_CRIT DEV_LABEL " 0x%02X: "
|
||||
"0x%08X\n", i,
|
||||
(unsigned int) readl(lanai->base + i));
|
||||
barrier(); mb();
|
||||
pcistatus_check(lanai, 0);
|
||||
barrier(); mb();
|
||||
}
|
||||
return 0; }
|
||||
case 2200004: {
|
||||
u8 b;
|
||||
u16 w;
|
||||
u32 dw;
|
||||
struct pci_dev *pci = lanai->pci;
|
||||
(void) pci_read_config_word(pci, PCI_VENDOR_ID, &w);
|
||||
DPRINTK("vendor = 0x%X\n", (unsigned int) w);
|
||||
(void) pci_read_config_word(pci, PCI_DEVICE_ID, &w);
|
||||
DPRINTK("device = 0x%X\n", (unsigned int) w);
|
||||
(void) pci_read_config_word(pci, PCI_COMMAND, &w);
|
||||
DPRINTK("command = 0x%X\n", (unsigned int) w);
|
||||
(void) pci_read_config_word(pci, PCI_STATUS, &w);
|
||||
DPRINTK("status = 0x%X\n", (unsigned int) w);
|
||||
(void) pci_read_config_dword(pci,
|
||||
PCI_CLASS_REVISION, &dw);
|
||||
DPRINTK("class/revision = 0x%X\n", (unsigned int) dw);
|
||||
(void) pci_read_config_byte(pci,
|
||||
PCI_CACHE_LINE_SIZE, &b);
|
||||
DPRINTK("cache line size = 0x%X\n", (unsigned int) b);
|
||||
(void) pci_read_config_byte(pci, PCI_LATENCY_TIMER, &b);
|
||||
DPRINTK("latency = %d (0x%X)\n",
|
||||
(int) b, (unsigned int) b);
|
||||
(void) pci_read_config_byte(pci, PCI_HEADER_TYPE, &b);
|
||||
DPRINTK("header type = 0x%X\n", (unsigned int) b);
|
||||
(void) pci_read_config_byte(pci, PCI_BIST, &b);
|
||||
DPRINTK("bist = 0x%X\n", (unsigned int) b);
|
||||
/* skipping a few here */
|
||||
(void) pci_read_config_byte(pci,
|
||||
PCI_INTERRUPT_LINE, &b);
|
||||
DPRINTK("pci_int_line = 0x%X\n", (unsigned int) b);
|
||||
(void) pci_read_config_byte(pci,
|
||||
PCI_INTERRUPT_PIN, &b);
|
||||
DPRINTK("pci_int_pin = 0x%X\n", (unsigned int) b);
|
||||
(void) pci_read_config_byte(pci, PCI_MIN_GNT, &b);
|
||||
DPRINTK("min_gnt = 0x%X\n", (unsigned int) b);
|
||||
(void) pci_read_config_byte(pci, PCI_MAX_LAT, &b);
|
||||
DPRINTK("max_lat = 0x%X\n", (unsigned int) b); }
|
||||
return 0;
|
||||
#ifdef USE_POWERDOWN
|
||||
case 2200005:
|
||||
DPRINTK("Coming out of powerdown\n");
|
||||
lanai->conf1 &= ~CONFIG1_POWERDOWN;
|
||||
conf1_write(lanai);
|
||||
return 0;
|
||||
#endif
|
||||
default:
|
||||
result = -ENOIOCTLCMD;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#else /* !0 */
|
||||
#define lanai_ioctl NULL
|
||||
#endif /* 0 */
|
||||
|
||||
static int lanai_send(struct atm_vcc *atmvcc, struct sk_buff *skb)
|
||||
{
|
||||
struct lanai_vcc *lvcc = (struct lanai_vcc *) atmvcc->dev_data;
|
||||
@@ -2678,7 +2592,6 @@ static const struct atmdev_ops ops = {
|
||||
.dev_close = lanai_dev_close,
|
||||
.open = lanai_open,
|
||||
.close = lanai_close,
|
||||
.ioctl = lanai_ioctl,
|
||||
.getsockopt = NULL,
|
||||
.setsockopt = NULL,
|
||||
.send = lanai_send,
|
||||
@@ -2760,6 +2673,7 @@ static void __exit lanai_module_exit(void)
|
||||
* gone, so there isn't much to do
|
||||
*/
|
||||
DPRINTK("cleanup_module()\n");
|
||||
pci_unregister_driver(&lanai_driver);
|
||||
}
|
||||
|
||||
module_init(lanai_module_init);
|
||||
|
||||
@@ -432,7 +432,10 @@ int drm_addctx(struct inode *inode, struct file *filp,
|
||||
|
||||
if (ctx.handle != DRM_KERNEL_CONTEXT) {
|
||||
if (dev->driver->context_ctor)
|
||||
dev->driver->context_ctor(dev, ctx.handle);
|
||||
if (!dev->driver->context_ctor(dev, ctx.handle)) {
|
||||
DRM_DEBUG( "Running out of ctxs or memory.\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
}
|
||||
|
||||
ctx_entry = drm_alloc(sizeof(*ctx_entry), DRM_MEM_CTXLIST);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user