projects
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[x86] add cpu msr kernel module package
[openwrt.git]
/
package
/
ubsec_ssb
/
src
/
ubsec_ssb.c
diff --git
a/package/ubsec_ssb/src/ubsec_ssb.c
b/package/ubsec_ssb/src/ubsec_ssb.c
index
b574392
..
d6adf59
100644
(file)
--- a/
package/ubsec_ssb/src/ubsec_ssb.c
+++ b/
package/ubsec_ssb/src/ubsec_ssb.c
@@
-1,4
+1,3
@@
-/* $Id: $ */
/*
* Copyright (c) 2008 Daniel Mueller (daniel@danm.de)
/*
* Copyright (c) 2008 Daniel Mueller (daniel@danm.de)
@@
-45,8
+44,6
@@
*/
#include <linux/kernel.h>
*/
#include <linux/kernel.h>
-#include <linux/byteorder/swab.h>
-#include <linux/byteorder/generic.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/proc_fs.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/proc_fs.h>
@@
-88,8
+85,8
@@
#define DRV_MODULE_NAME "ubsec_ssb"
#define PFX DRV_MODULE_NAME ": "
#define DRV_MODULE_NAME "ubsec_ssb"
#define PFX DRV_MODULE_NAME ": "
-#define DRV_MODULE_VERSION "0.0
1
"
-#define DRV_MODULE_RELDATE "
Jan 1, 2008
"
+#define DRV_MODULE_VERSION "0.0
2
"
+#define DRV_MODULE_RELDATE "
Feb 21, 2009
"
#if 1
#define DPRINTF(a...) \
#if 1
#define DPRINTF(a...) \
@@
-496,7
+493,7
@@
__devinit ubsec_ssb_probe(struct ssb_device *sdev,
err = ssb_bus_powerup(sdev->bus, 0);
if (err) {
dev_err(sdev->dev, "Failed to powerup the bus\n");
err = ssb_bus_powerup(sdev->bus, 0);
if (err) {
dev_err(sdev->dev, "Failed to powerup the bus\n");
-
goto err_powerup
;
+
goto err_out
;
}
err = request_irq(sdev->irq, (irq_handler_t)ubsec_ssb_isr,
}
err = request_irq(sdev->irq, (irq_handler_t)ubsec_ssb_isr,
@@
-506,11
+503,16
@@
__devinit ubsec_ssb_probe(struct ssb_device *sdev,
goto err_out_powerdown;
}
goto err_out_powerdown;
}
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
+ err = dma_set_mask(sdev->dma_dev, DMA_BIT_MASK(32)) ||
+ dma_set_coherent_mask(sdev->dma_dev, DMA_BIT_MASK(32));
+#else
err = ssb_dma_set_mask(sdev, DMA_32BIT_MASK);
err = ssb_dma_set_mask(sdev, DMA_32BIT_MASK);
+#endif
if (err) {
dev_err(sdev->dev,
"Required 32BIT DMA mask unsupported by the system.\n");
if (err) {
dev_err(sdev->dev,
"Required 32BIT DMA mask unsupported by the system.\n");
- goto err_out_
powerdown
;
+ goto err_out_
free_irq
;
}
printk(KERN_INFO "Sentry5(tm) ROBOGateway(tm) IPSec Core at IRQ %u\n",
}
printk(KERN_INFO "Sentry5(tm) ROBOGateway(tm) IPSec Core at IRQ %u\n",
@@
-522,7
+524,7
@@
__devinit ubsec_ssb_probe(struct ssb_device *sdev,
ssb_device_enable(sdev, 0);
if (ubsec_attach(sdev, ent, sdev->dev) != 0)
ssb_device_enable(sdev, 0);
if (ubsec_attach(sdev, ent, sdev->dev) != 0)
- goto err_
disable_interrupt
;
+ goto err_
out_disable
;
#ifdef UBSEC_DEBUG
procdebug = create_proc_entry(DRV_MODULE_NAME, S_IRUSR, NULL);
#ifdef UBSEC_DEBUG
procdebug = create_proc_entry(DRV_MODULE_NAME, S_IRUSR, NULL);
@@
-536,15
+538,17
@@
__devinit ubsec_ssb_probe(struct ssb_device *sdev,
return 0;
return 0;
-err_disable_interrupt:
+err_out_disable:
+ ssb_device_disable(sdev, 0);
+
+err_out_free_irq:
free_irq(sdev->irq, sdev);
err_out_powerdown:
ssb_bus_may_powerdown(sdev->bus);
free_irq(sdev->irq, sdev);
err_out_powerdown:
ssb_bus_may_powerdown(sdev->bus);
-err_powerup:
- ssb_device_disable(sdev, 0);
- return err;
+err_out:
+ return err;
}
static void __devexit ubsec_ssb_remove(struct ssb_device *sdev) {
}
static void __devexit ubsec_ssb_remove(struct ssb_device *sdev) {
@@
-589,8
+593,8
@@
static void __devexit ubsec_ssb_remove(struct ssb_device *sdev) {
sc->sc_queuea[i] = NULL;
}
sc->sc_queuea[i] = NULL;
}
- ssb_bus_may_powerdown(sdev->bus);
ssb_device_disable(sdev, 0);
ssb_device_disable(sdev, 0);
+ ssb_bus_may_powerdown(sdev->bus);
ssb_set_drvdata(sdev, NULL);
#ifdef UBSEC_DEBUG
ssb_set_drvdata(sdev, NULL);
#ifdef UBSEC_DEBUG
This page took
0.027359 seconds
and
4
git commands to generate.