Here is the big staging tree merge for your 2.6.33-git tree. There are 2 merges within this pull, one generated by me due to the need for a way to apply patches from different people that were modifying the same file. The other to merge the staging patches to your tree and resolve some conflicts that were there due to changes done by the wireless tree (which I knew was going to happen). Then a final api fixup patch was applied to get everything to build properly after the merge (the wireless tree api changes missed one of the staging drivers, no big deal). There are a few new drivers in this merge, and a number of existing ones are removed for a variety of reasons (duplicates of other in-kernel drivers that are now working properly, authors asking for the code to be removed, or lack of development effort.) Everything is self-contained to the drivers/staging/ directory, which in one case looks a bit odd (the patches for the dream android device which are required because that arch does not look like it is ever going to be merged through the correct channel any time soon, as the code needs lots of work.) The final diffstat shows that we did do a few more insertions than removals here, but nothing major: 478 files changed, 29064 insertions(+), 24384 deletions(-) Please pull from: master.kernel.org:/pub/scm/linux/kernel/git/gregkh/staging-2.6.git/ All of these patches have been in the linux-next and mm trees. The patches will be sent as a follow-on to this message to the driver-devel list for people to see. thanks, greg k-h -------------- drivers/staging/Kconfig | 14 +- drivers/staging/Makefile | 8 +- drivers/staging/altpciechdma/Kconfig | 10 - drivers/staging/altpciechdma/Makefile | 2 - drivers/staging/altpciechdma/TODO | 15 - drivers/staging/altpciechdma/altpciechdma.c | 1182 ------ drivers/staging/arlan/Makefile ...
From: Bruce Beare <bbeare1@gmail.com> use tabs instead of leading spaces Signed-off-by: Bruce Beare <bbeare1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/comedi/drivers/pcmad.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/comedi/drivers/pcmad.c b/drivers/staging/comedi/drivers/pcmad.c index acac670..202bfd4 100644 --- a/drivers/staging/comedi/drivers/pcmad.c +++ b/drivers/staging/comedi/drivers/pcmad.c @@ -34,11 +34,11 @@ Configuration options: [0] - I/O port base [1] - unused [2] - Analog input reference - 0 = single ended - 1 = differential + 0 = single ended + 1 = differential [3] - Analog input encoding (must match jumpers) - 0 = straight binary - 1 = two's complement + 0 = straight binary + 1 = two's complement */ #include <linux/interrupt.h> -- 1.7.0.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Bruce Beare <bbeare1@gmail.com>
Signed-off-by: Bruce Beare <bbeare1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/pcmad.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/comedi/drivers/pcmad.c b/drivers/staging/comedi/drivers/pcmad.c
index 202bfd4..787aea2 100644
--- a/drivers/staging/comedi/drivers/pcmad.c
+++ b/drivers/staging/comedi/drivers/pcmad.c
@@ -113,9 +113,8 @@ static int pcmad_ai_insn_read(struct comedi_device *dev,
data[n] = inb(dev->iobase + PCMAD_LSB);
data[n] |= (inb(dev->iobase + PCMAD_MSB) << 8);
- if (devpriv->twos_comp) {
+ if (devpriv->twos_comp)
data[n] ^= (1 << (this_board->n_ai_bits - 1));
- }
}
return n;
@@ -168,9 +167,8 @@ static int pcmad_detach(struct comedi_device *dev)
{
printk("comedi%d: pcmad: remove\n", dev->minor);
- if (dev->irq) {
+ if (dev->irq)
free_irq(dev->irq, dev);
- }
if (dev->iobase)
release_region(dev->iobase, PCMAD_SIZE);
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Bruce Beare <bbeare1@gmail.com>
cleanup printk() warnings for including the facility level.
cleanup add a printk("\n") to terminate the print for the non-error case.
Signed-off-by: Bruce Beare <bbeare1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/pcmad.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/comedi/drivers/pcmad.c b/drivers/staging/comedi/drivers/pcmad.c
index 787aea2..44ed777 100644
--- a/drivers/staging/comedi/drivers/pcmad.c
+++ b/drivers/staging/comedi/drivers/pcmad.c
@@ -134,11 +134,12 @@ static int pcmad_attach(struct comedi_device *dev, struct comedi_devconfig *it)
unsigned long iobase;
iobase = it->options[0];
- printk("comedi%d: pcmad: 0x%04lx ", dev->minor, iobase);
+ printk(KERN_NOTICE "comedi%d: pcmad: 0x%04lx ", dev->minor, iobase);
if (!request_region(iobase, PCMAD_SIZE, "pcmad")) {
- printk("I/O port conflict\n");
+ printk(KERN_CONT "I/O port conflict\n");
return -EIO;
}
+ printk(KERN_CONT "\n");
dev->iobase = iobase;
ret = alloc_subdevices(dev, 1);
@@ -165,7 +166,7 @@ static int pcmad_attach(struct comedi_device *dev, struct comedi_devconfig *it)
static int pcmad_detach(struct comedi_device *dev)
{
- printk("comedi%d: pcmad: remove\n", dev->minor);
+ printk(KERN_NOTICE "comedi%d: pcmad: remove\n", dev->minor);
if (dev->irq)
free_irq(dev->irq, dev);
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Pavel Machek <pavel@ucw.cz> Add missing files/includes neccessary for Dream compilation. Mark flash support as broken -- it is not present on released Dream, anyway. Signed-off-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/dream/camera/Kconfig | 2 +- drivers/staging/dream/camera/Makefile | 1 + drivers/staging/dream/include/linux/android_pmem.h | 80 ++ drivers/staging/dream/include/linux/gpio_event.h | 154 ++++ drivers/staging/dream/include/linux/msm_adsp.h | 84 ++ drivers/staging/dream/include/linux/msm_audio.h | 115 +++ .../staging/dream/include/linux/msm_rpcrouter.h | 47 + drivers/staging/dream/include/linux/wakelock.h | 91 ++ drivers/staging/dream/include/mach/camera.h | 279 ++++++ drivers/staging/dream/include/mach/msm_adsp.h | 112 +++ drivers/staging/dream/include/mach/msm_rpcrouter.h | 179 ++++ drivers/staging/dream/include/mach/msm_smd.h | 107 +++ .../dream/include/mach/qdsp5/qdsp5audplaycmdi.h | 94 ++ .../dream/include/mach/qdsp5/qdsp5audplaymsg.h | 70 ++ .../dream/include/mach/qdsp5/qdsp5audppcmdi.h | 914 ++++++++++++++++++++ .../dream/include/mach/qdsp5/qdsp5audppmsg.h | 318 +++++++ .../dream/include/mach/qdsp5/qdsp5audpreproccmdi.h | 256 ++++++ .../dream/include/mach/qdsp5/qdsp5audpreprocmsg.h | 85 ++ .../dream/include/mach/qdsp5/qdsp5audreccmdi.h | 176 ++++ .../dream/include/mach/qdsp5/qdsp5audrecmsg.h | 127 +++ .../dream/include/mach/qdsp5/qdsp5jpegcmdi.h | 376 ++++++++ .../dream/include/mach/qdsp5/qdsp5jpegmsg.h | 177 ++++ .../dream/include/mach/qdsp5/qdsp5lpmcmdi.h | 82 ++ .../staging/dream/include/mach/qdsp5/qdsp5lpmmsg.h | 80 ++ .../dream/include/mach/qdsp5/qdsp5vdeccmdi.h | 235 +++++ .../dream/include/mach/qdsp5/qdsp5vdecmsg.h | 107 +++ .../dream/include/mach/qdsp5/qdsp5venccmdi.h | 212 +++++ ...
From: Pavel Machek <pavel@ucw.cz>
cppcheck found that ctrl_pmsm is leaked if the open operation fails.
Signed-off-by: Eric Sesterhenn <eric.sesterhenn@lsexperts.de>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/dream/camera/msm_camera.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/staging/dream/camera/msm_camera.c b/drivers/staging/dream/camera/msm_camera.c
index 7d93877..87e118d 100644
--- a/drivers/staging/dream/camera/msm_camera.c
+++ b/drivers/staging/dream/camera/msm_camera.c
@@ -1885,8 +1885,10 @@ static int msm_open_control(struct inode *inode, struct file *filep)
return -ENOMEM;
rc = msm_open_common(inode, filep, 0);
- if (rc < 0)
+ if (rc < 0) {
+ kfree(ctrl_pmsm);
return rc;
+ }
ctrl_pmsm->pmsm = filep->private_data;
filep->private_data = ctrl_pmsm;
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Huang Weiyi <weiyi.huang@gmail.com>
Remove duplicated #include('s) in
drivers/staging/dream/smd/smd_rpcrouter.c
Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/dream/smd/smd_rpcrouter.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/dream/smd/smd_rpcrouter.c b/drivers/staging/dream/smd/smd_rpcrouter.c
index 5ac2cd4..69911a7 100644
--- a/drivers/staging/dream/smd/smd_rpcrouter.c
+++ b/drivers/staging/dream/smd/smd_rpcrouter.c
@@ -38,8 +38,6 @@
#include <linux/platform_device.h>
#include <linux/uaccess.h>
-#include <asm/byteorder.h>
-
#include <mach/msm_smd.h>
#include "smd_rpcrouter.h"
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Thiago Farina <tfransosi@gmail.com>
*apdbg.c: use NULL pointer instead of 0 interger. Also make two functions private.
Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/otus/apdbg.c | 53 +++++++++++++++++++----------------------
1 files changed, 25 insertions(+), 28 deletions(-)
diff --git a/drivers/staging/otus/apdbg.c b/drivers/staging/otus/apdbg.c
index 0eb93f1..b59028e 100644
--- a/drivers/staging/otus/apdbg.c
+++ b/drivers/staging/otus/apdbg.c
@@ -90,8 +90,27 @@ struct zdap_ioctl {
#endif
-char hex(char);
-unsigned char asctohex(char *str);
+static char hex(char v)
+{
+ if (isdigit(v))
+ return v - '0';
+ else if (isxdigit(v))
+ return tolower(v) - 'a' + 10;
+ else
+ return 0;
+}
+
+static unsigned char asctohex(char *str)
+{
+ unsigned char value;
+
+ value = hex(*str) & 0x0f;
+ value = value << 4;
+ str++;
+ value |= hex(*str) & 0x0f;
+
+ return value;
+}
char *prgname;
@@ -109,10 +128,10 @@ int set_ioctl(int sock, struct ifreq *req)
int read_reg(int sock, struct ifreq *req)
{
- struct zdap_ioctl *zdreq = 0;
+ struct zdap_ioctl *zdreq = NULL;
if (!set_ioctl(sock, req))
- return -1;
+ return -1;
/*
* zdreq = (struct zdap_ioctl *)req->ifr_data;
@@ -125,7 +144,7 @@ int read_reg(int sock, struct ifreq *req)
int read_mem(int sock, struct ifreq *req)
{
- struct zdap_ioctl *zdreq = 0;
+ struct zdap_ioctl *zdreq = NULL;
int i;
if (!set_ioctl(sock, req))
@@ -368,7 +387,7 @@ int main(int argc, char **argv)
zdreq.addr = addr;
zdreq.cmd = ZM_IOCTL_SET_PIBSS_MODE;
- } else {
+ } else {
fprintf(stderr, "error action\n");
exit(1);
}
@@ -380,25 +399,3 @@ fail:
exit(0);
}
-unsigned char asctohex(char *str)
-{
- unsigned char value;
-
- value = hex(*str) & 0x0f;
- value = value << 4;
- str++;
- value |= hex(*str) & 0x0f;
-
- return value;
-}
-
-char hex(char v)
-{
- if ...From: Roel Kluin <roel.kluin@gmail.com>
This semicolon is misplaced.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/otus/80211core/ctxrx.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/otus/80211core/ctxrx.c b/drivers/staging/otus/80211core/ctxrx.c
index ac54d5a..7fa4f48 100644
--- a/drivers/staging/otus/80211core/ctxrx.c
+++ b/drivers/staging/otus/80211core/ctxrx.c
@@ -536,8 +536,7 @@ void zfProtRspSim(zdev_t* dev, zbuf_t* buf)
zm_msg2_rx(ZM_LV_2, "ip1=", dip[1]);
//ARP request to 192.168.1.15
- if ((arpOp == 0x0100) && (dip[0] == 0xa8c0) && (dip[1] == 0x0f01));
- {
+ if ((arpOp == 0x0100) && (dip[0] == 0xa8c0) && (dip[1] == 0x0f01)) {
zm_msg0_rx(ZM_LV_2, "ARP");
/* ARP response */
zmw_rx_buf_writeh(dev, buf, 20, 0x0200);
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Martyn Welch <martyn.welch@gefanuc.com>
Geographical addressing only works if the VME backplane supports it. There
are a large number of old backplanes which do not support geographical
addressing. These boards will generally report a slot ID of zero - which is
an invalid ID in the slot numbering scheme.
Allow the geographical address to be over-ridden on the tsi148 so that a
slot ID can be provided manually in these circumstances.
Signed-off-by: Markus Kraemer <mkraemer@e18.physik.tu-muenchen.de>
Signed-off-by: Martyn Welch <martyn.welch@gefanuc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/vme/bridges/vme_tsi148.c | 25 ++++++++++++++++++++-----
1 files changed, 20 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/vme/bridges/vme_tsi148.c b/drivers/staging/vme/bridges/vme_tsi148.c
index 89a7dcc..324cc38 100644
--- a/drivers/staging/vme/bridges/vme_tsi148.c
+++ b/drivers/staging/vme/bridges/vme_tsi148.c
@@ -63,6 +63,7 @@ int tsi148_slot_get(void);
/* Modue parameter */
int err_chk = 0;
+static int geoid;
/* XXX These should all be in a per device structure */
struct vme_bridge *tsi148_bridge;
@@ -2145,8 +2146,12 @@ int tsi148_slot_get(void)
{
u32 slot = 0;
- slot = ioread32be(tsi148_bridge->base + TSI148_LCSR_VSTAT);
- slot = slot & TSI148_LCSR_VSTAT_GA_M;
+ if (!geoid) {
+ slot = ioread32be(tsi148_bridge->base + TSI148_LCSR_VSTAT);
+ slot = slot & TSI148_LCSR_VSTAT_GA_M;
+ } else
+ slot = geoid;
+
return (int)slot;
}
@@ -2196,6 +2201,7 @@ static int tsi148_crcsr_init(struct pci_dev *pdev)
vstat = tsi148_slot_get();
if (cbar != vstat) {
+ cbar = vstat;
dev_info(&pdev->dev, "Setting CR/CSR offset\n");
iowrite32be(cbar<<3, tsi148_bridge->base + TSI148_CBAR);
}
@@ -2458,8 +2464,13 @@ static int tsi148_probe(struct pci_dev *pdev, const struct pci_device_id *id)
data = ioread32be(tsi148_bridge->base + TSI148_LCSR_VSTAT);
dev_info(&pdev->dev, "Board is%s the VME ...From: Martyn Welch <martyn.welch@gefanuc.com>
Correction of erroneous error message in vme_user.c.
Signed-off-by: Martyn Welch <martyn.welch@gefanuc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/vme/devices/vme_user.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/vme/devices/vme_user.c b/drivers/staging/vme/devices/vme_user.c
index e228942..2159540 100644
--- a/drivers/staging/vme/devices/vme_user.c
+++ b/drivers/staging/vme/devices/vme_user.c
@@ -574,8 +574,8 @@ static int __init vme_user_init(void)
* in future revisions if that ever becomes necessary.
*/
if (bus_num > USER_BUS_MAX) {
- printk(KERN_ERR "%s: Driver only able to handle %d PIO2 "
- "Cards\n", driver_name, USER_BUS_MAX);
+ printk(KERN_ERR "%s: Driver only able to handle %d buses\n",
+ driver_name, USER_BUS_MAX);
bus_num = USER_BUS_MAX;
}
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Martyn Welch <martyn.welch@gefanuc.com>
Geographical addressing only works if the VME backplane supports it. There
are a large number of old backplanes which do not support geographical
addressing. These boards will generally report a slot ID of zero - which is
an invalid ID in the slot numbering scheme.
Allow the geographical address to be over-ridden on the ca91c142 so that a
slot ID can be provided manually in these circumstances.
Signed-off-by: Martyn Welch <martyn.welch@gefanuc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/vme/bridges/vme_ca91cx42.c | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/vme/bridges/vme_ca91cx42.c b/drivers/staging/vme/bridges/vme_ca91cx42.c
index 1cf3e91..5799b09 100644
--- a/drivers/staging/vme/bridges/vme_ca91cx42.c
+++ b/drivers/staging/vme/bridges/vme_ca91cx42.c
@@ -38,6 +38,9 @@ static int ca91cx42_probe(struct pci_dev *, const struct pci_device_id *);
static void ca91cx42_remove(struct pci_dev *);
static void __exit ca91cx42_exit(void);
+/* Module parameters */
+static int geoid;
+
struct vme_bridge *ca91cx42_bridge;
wait_queue_head_t dma_queue;
wait_queue_head_t iack_queue;
@@ -881,8 +884,12 @@ int ca91cx42_slot_get(void)
{
u32 slot = 0;
- slot = ioread32(ca91cx42_bridge->base + VCSR_BS);
- slot = ((slot & CA91CX42_VCSR_BS_SLOT_M) >> 27);
+ if (!geoid) {
+ slot = ioread32(ca91cx42_bridge->base + VCSR_BS);
+ slot = ((slot & CA91CX42_VCSR_BS_SLOT_M) >> 27);
+ } else
+ slot = geoid;
+
return (int)slot;
}
@@ -1299,6 +1306,9 @@ static void __exit ca91cx42_exit(void)
pci_unregister_driver(&ca91cx42_driver);
}
+MODULE_PARM_DESC(geoid, "Override geographical addressing");
+module_param(geoid, int, 0);
+
MODULE_DESCRIPTION("VME driver for the Tundra Universe II VME bridge");
MODULE_LICENSE("GPL");
--
1.7.0.1
_______________________________________________
devel mailing ...From: Martyn Welch <martyn.welch@gefanuc.com>
Running checkpatch on the core VME code highlights many errors. Fix them.
Signed-off-by: Martyn Welch <martyn.welch@gefanuc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/vme/vme.c | 222 +++++++++++++++++++-------------------
drivers/staging/vme/vme.h | 23 ++--
drivers/staging/vme/vme_bridge.h | 8 +-
3 files changed, 126 insertions(+), 127 deletions(-)
diff --git a/drivers/staging/vme/vme.c b/drivers/staging/vme/vme.c
index 994fdb9..c915e92 100644
--- a/drivers/staging/vme/vme.c
+++ b/drivers/staging/vme/vme.c
@@ -37,8 +37,8 @@
static unsigned int vme_bus_numbers;
DEFINE_MUTEX(vme_bus_num_mtx);
-static void __exit vme_exit (void);
-static int __init vme_init (void);
+static void __exit vme_exit(void);
+static int __init vme_init(void);
/*
@@ -86,26 +86,26 @@ static struct vme_bridge *find_bridge(struct vme_resource *resource)
* XXX VME bridges could be available on buses other than PCI. At the momment
* this framework only supports PCI devices.
*/
-void * vme_alloc_consistent(struct vme_resource *resource, size_t size,
+void *vme_alloc_consistent(struct vme_resource *resource, size_t size,
dma_addr_t *dma)
{
struct vme_bridge *bridge;
struct pci_dev *pdev;
- if(resource == NULL) {
- printk("No resource\n");
+ if (resource == NULL) {
+ printk(KERN_ERR "No resource\n");
return NULL;
}
bridge = find_bridge(resource);
- if(bridge == NULL) {
- printk("Can't find bridge\n");
+ if (bridge == NULL) {
+ printk(KERN_ERR "Can't find bridge\n");
return NULL;
}
/* Find pci_dev container of dev */
if (bridge->parent == NULL) {
- printk("Dev entry NULL\n");
+ printk(KERN_ERR "Dev entry NULL\n");
return NULL;
}
pdev = container_of(bridge->parent, struct pci_dev, dev);
@@ -126,14 +126,14 @@ void vme_free_consistent(struct vme_resource *resource, size_t size,
struct vme_bridge *bridge;
struct pci_dev ...From: Martyn Welch <martyn.welch@gefanuc.com>
Functionality for master RMW and location monitors has been implemented.
Remove the commented out structures from the original codebase.
Signed-off-by: Martyn Welch <martyn.welch@gefanuc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/vme/vme_bridge.h | 32 --------------------------------
1 files changed, 0 insertions(+), 32 deletions(-)
diff --git a/drivers/staging/vme/vme_bridge.h b/drivers/staging/vme/vme_bridge.h
index a64677e..92e5614 100644
--- a/drivers/staging/vme/vme_bridge.h
+++ b/drivers/staging/vme/vme_bridge.h
@@ -229,36 +229,4 @@ struct vmeArbiterCfg {
};
typedef struct vmeArbiterCfg vmeArbiterCfg_t;
-
-/*
- * VMEbus RMW Configuration Data
- */
-struct vmeRmwCfg {
- unsigned int targetAddrU; /* VME Address (Upper) to trigger RMW cycle */
- unsigned int targetAddr; /* VME Address (Lower) to trigger RMW cycle */
- vme_address_t addrSpace; /* VME Address Space */
- int enableMask; /* Bit mask defining the bits of interest */
- int compareData; /* Data to be compared with the data read */
- int swapData; /* Data written to the VMEbus on success */
- int maxAttempts; /* Maximum times to try */
- int numAttempts; /* Number of attempts before success */
- int reserved; /* For future use */
-
-};
-typedef struct vmeRmwCfg vmeRmwCfg_t;
-
-/*
- * VMEbus Location Monitor Arg Structure
- */
-struct vmeLmCfg {
- unsigned int addrU; /* Location Monitor Address upper */
- unsigned int addr; /* Location Monitor Address lower */
- vme_address_t addrSpace; /* Address Space */
- int userAccessType; /* User/Supervisor Access Type */
- int dataAccessType; /* Data/Program Access Type */
- int lmWait; /* Time to wait for access */
- int lmEvents; /* Lm event mask */
- int reserved; /* For future use */
-};
-typedef struct vmeLmCfg vmeLmCfg_t;
#endif
--
1.7.0.1
_______________________________________________
devel mailing ...From: Martyn Welch <martyn.welch@gefanuc.com> Unable to build both drivers at the same time due to classing variables that should be declared static but aren't. Signed-off-by: Martyn Welch <martyn.welch@gefanuc.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/vme/bridges/vme_ca91cx42.c | 28 +++++++++++++++------------- drivers/staging/vme/bridges/vme_tsi148.c | 20 ++++++++++---------- 2 files changed, 25 insertions(+), 23 deletions(-) diff --git a/drivers/staging/vme/bridges/vme_ca91cx42.c b/drivers/staging/vme/bridges/vme_ca91cx42.c index 5799b09..4704798 100644 --- a/drivers/staging/vme/bridges/vme_ca91cx42.c +++ b/drivers/staging/vme/bridges/vme_ca91cx42.c @@ -41,21 +41,23 @@ static void __exit ca91cx42_exit(void); /* Module parameters */ static int geoid; -struct vme_bridge *ca91cx42_bridge; -wait_queue_head_t dma_queue; -wait_queue_head_t iack_queue; -wait_queue_head_t lm_queue; -wait_queue_head_t mbox_queue; - -void (*lm_callback[4])(int); /* Called in interrupt handler, be careful! */ -void *crcsr_kernel; -dma_addr_t crcsr_bus; - -struct mutex vme_rmw; /* Only one RMW cycle at a time */ -struct mutex vme_int; /* - * Only one VME interrupt can be - * generated at a time, provide locking - */ +static struct vme_bridge *ca91cx42_bridge; +static wait_queue_head_t dma_queue; +static wait_queue_head_t iack_queue; +#if 0 +static wait_queue_head_t lm_queue; +#endif +static wait_queue_head_t mbox_queue; + +static void (*lm_callback[4])(int); /* Called in interrupt handler */ +static void *crcsr_kernel; +static dma_addr_t crcsr_bus; + +static struct mutex vme_rmw; /* Only one RMW cycle at a time */ +static struct mutex vme_int; /* + * Only one VME interrupt can be + * generated at a time, provide locking + */ static char driver_name[] = "vme_ca91cx42"; diff --git a/drivers/staging/vme/bridges/vme_tsi148.c b/drivers/staging/vme/bridges/vme_tsi148.c index 324cc38..4d19a91 100644 --- ...
From: kirjanov@gmail.com <kirjanov@gmail.com> Convert to netdev_tx_t. Signed-off-by: Denis Kirjanov <kirjanov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/slicoss/slicoss.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c index 5b191af..a18eeb6 100644 --- a/drivers/staging/slicoss/slicoss.c +++ b/drivers/staging/slicoss/slicoss.c @@ -101,7 +101,7 @@ static struct net_device_stats *slic_get_stats(struct net_device *dev); static int slic_entry_open(struct net_device *dev); static int slic_entry_halt(struct net_device *dev); static int slic_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); -static int slic_xmit_start(struct sk_buff *skb, struct net_device *dev); +static netdev_tx_t slic_xmit_start(struct sk_buff *skb, struct net_device *dev); static void slic_xmit_fail(struct adapter *adapter, struct sk_buff *skb, void *cmd, u32 skbtype, u32 status); static void slic_config_pci(struct pci_dev *pcidev); @@ -784,7 +784,7 @@ static void slic_xmit_build_request(struct adapter *adapter, #define NORMAL_ETHFRAME 0 -static int slic_xmit_start(struct sk_buff *skb, struct net_device *dev) +static netdev_tx_t slic_xmit_start(struct sk_buff *skb, struct net_device *dev) { struct sliccard *card; struct adapter *adapter = (struct adapter *)netdev_priv(dev); -- 1.7.0.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: kirjanov@gmail.com <kirjanov@gmail.com> Check for valid hw address. Signed-off-by: Denis Kirjanov <kirjanov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/slicoss/slicoss.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c index a18eeb6..9c8eb09 100644 --- a/drivers/staging/slicoss/slicoss.c +++ b/drivers/staging/slicoss/slicoss.c @@ -2531,6 +2531,9 @@ static int slic_mac_set_address(struct net_device *dev, void *ptr) if (!adapter) return -EBUSY; + if (!is_valid_ether_addr(addr->sa_data)) + return -EINVAL; + memcpy(dev->dev_addr, addr->sa_data, dev->addr_len); memcpy(adapter->currmacaddr, addr->sa_data, dev->addr_len); -- 1.7.0.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: kirjanov@gmail.com <kirjanov@gmail.com> No need to check pointer expicitly since it has been done in debugfs_remove() Signed-off-by: Denis Kirjanov <kirjanov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/slicoss/slicoss.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c index 41c440d..96108fd 100644 --- a/drivers/staging/slicoss/slicoss.c +++ b/drivers/staging/slicoss/slicoss.c @@ -3971,10 +3971,8 @@ static void slic_debug_adapter_create(struct adapter *adapter) static void slic_debug_adapter_destroy(struct adapter *adapter) { - if (adapter->debugfs_entry) { - debugfs_remove(adapter->debugfs_entry); - adapter->debugfs_entry = NULL; - } + debugfs_remove(adapter->debugfs_entry); + adapter->debugfs_entry = NULL; } static void slic_debug_card_create(struct sliccard *card) -- 1.7.0.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: kirjanov@gmail.com <kirjanov@gmail.com> Use PCI_DEVICE_TABLE: defines array as const and puts it into the __devinitconst section. Signed-off-by: Denis Kirjanov <kirjanov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/slicoss/slicoss.c | 12 ++++-------- 1 files changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c index 8727170..4dbd5aa 100644 --- a/drivers/staging/slicoss/slicoss.c +++ b/drivers/staging/slicoss/slicoss.c @@ -194,14 +194,10 @@ MODULE_PARM_DESC(dynamic_intagg, "Dynamic Interrupt Aggregation Setting"); module_param(intagg_delay, int, 0); MODULE_PARM_DESC(intagg_delay, "uSec Interrupt Aggregation Delay"); -static struct pci_device_id slic_pci_tbl[] __devinitdata = { - {PCI_VENDOR_ID_ALACRITECH, - SLIC_1GB_DEVICE_ID, - PCI_ANY_ID, PCI_ANY_ID,}, - {PCI_VENDOR_ID_ALACRITECH, - SLIC_2GB_DEVICE_ID, - PCI_ANY_ID, PCI_ANY_ID,}, - {0,} +static DEFINE_PCI_DEVICE_TABLE(slic_pci_tbl) = { + { PCI_DEVICE(PCI_VENDOR_ID_ALACRITECH, SLIC_1GB_DEVICE_ID) }, + { PCI_DEVICE(PCI_VENDOR_ID_ALACRITECH, SLIC_2GB_DEVICE_ID) }, + { 0 } }; MODULE_DEVICE_TABLE(pci, slic_pci_tbl); -- 1.7.0.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: kirjanov@gmail.com <kirjanov@gmail.com> Use compare_ether_addr. Signed-off-by: Denis Kirjanov <kirjanov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/slicoss/slic.h | 9 --------- drivers/staging/slicoss/slicoss.c | 11 +++-------- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/drivers/staging/slicoss/slic.h b/drivers/staging/slicoss/slic.h index ccf7625..eb3a619 100644 --- a/drivers/staging/slicoss/slic.h +++ b/drivers/staging/slicoss/slic.h @@ -527,15 +527,6 @@ struct adapter { (largestat) += ((newstat) - (oldstat)); \ } -#define ETHER_EQ_ADDR(_AddrA, _AddrB, _Result) \ -{ \ - _Result = true; \ - if (*(u32 *)(_AddrA) != *(u32 *)(_AddrB)) \ - _Result = false; \ - if (*(u16 *)(&((_AddrA)[4])) != *(u16 *)(&((_AddrB)[4]))) \ - _Result = false; \ -} - #if defined(CONFIG_X86_64) || defined(CONFIG_IA64) #define SLIC_GET_ADDR_LOW(_addr) (u32)((u64)(_addr) & \ 0x00000000FFFFFFFF) diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c index 4dbd5aa..aefe3fe 100644 --- a/drivers/staging/slicoss/slicoss.c +++ b/drivers/staging/slicoss/slicoss.c @@ -1249,13 +1249,11 @@ static struct net_device_stats *slic_get_stats(struct net_device *dev) static int slic_mcast_add_list(struct adapter *adapter, char *address) { struct mcast_address *mcaddr, *mlist; - bool equaladdr; /* Check to see if it already exists */ mlist = adapter->mcastaddrs; while (mlist) { - ETHER_EQ_ADDR(mlist->address, address, equaladdr); - if (equaladdr) + if (!compare_ether_addr(mlist->address, address)) return STATUS_SUCCESS; mlist = mlist->next; } @@ -2469,7 ...
From: Joe Perches <joe@perches.com> Uncompiled. Doesn't currently build anyway. Converted MAC_FMT to %pM Converted some %02x%02x%02x%02x%02x%02x to %pm Converted MAC_ARG to direct use Removed MAC_FMT and MAC_ARG macros Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/rtl8187se/ieee80211/ieee80211.h | 4 -- .../rtl8187se/ieee80211/ieee80211_crypt_ccmp.c | 21 +++----- .../rtl8187se/ieee80211/ieee80211_crypt_tkip.c | 20 ++++---- drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c | 48 +++++++++--------- .../rtl8187se/ieee80211/ieee80211_softmac.c | 2 +- drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c | 6 +- drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c | 4 +- drivers/staging/rtl8192e/ieee80211.h | 3 - drivers/staging/rtl8192e/ieee80211/ieee80211.h | 3 - .../rtl8192e/ieee80211/ieee80211_crypt_ccmp.c | 18 +++---- .../rtl8192e/ieee80211/ieee80211_crypt_tkip.c | 27 +++++----- drivers/staging/rtl8192e/ieee80211/ieee80211_rx.c | 52 ++++++++++---------- .../staging/rtl8192e/ieee80211/ieee80211_softmac.c | 2 +- drivers/staging/rtl8192e/ieee80211/ieee80211_tx.c | 4 +- drivers/staging/rtl8192e/ieee80211/ieee80211_wx.c | 4 +- .../staging/rtl8192e/ieee80211/rtl819x_BAProc.c | 6 +- .../staging/rtl8192e/ieee80211/rtl819x_TSProc.c | 6 +- drivers/staging/rtl8192e/r8192E_core.c | 2 +- drivers/staging/rtl8192su/ieee80211/ieee80211.h | 4 -- .../rtl8192su/ieee80211/ieee80211_crypt_ccmp.c | 21 +++----- .../rtl8192su/ieee80211/ieee80211_crypt_tkip.c | 20 ++++---- drivers/staging/rtl8192su/ieee80211/ieee80211_rx.c | 48 +++++++++--------- .../rtl8192su/ieee80211/ieee80211_softmac.c | 2 +- drivers/staging/rtl8192su/ieee80211/ieee80211_tx.c | 4 +- drivers/staging/rtl8192su/ieee80211/ieee80211_wx.c | 4 +- .../staging/rtl8192su/ieee80211/rtl819x_BAProc.c ...
From: kirjanov@gmail.com <kirjanov@gmail.com> Use pci_set_consistent_dma_mask() in the case of 64-bit consistent allocations. Signed-off-by: Denis Kirjanov <kirjanov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/slicoss/slicoss.c | 23 ++++++++++++++++++----- 1 files changed, 18 insertions(+), 5 deletions(-) diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c index aefe3fe..09a9d75 100644 --- a/drivers/staging/slicoss/slicoss.c +++ b/drivers/staging/slicoss/slicoss.c @@ -366,6 +366,7 @@ static int __devinit slic_entry_probe(struct pci_dev *pcidev, ulong mmio_start = 0; ulong mmio_len = 0; struct sliccard *card = NULL; + int pci_using_dac = 0; slic_global.dynamic_intagg = dynamic_intagg; @@ -379,16 +380,26 @@ static int __devinit slic_entry_probe(struct pci_dev *pcidev, printk(KERN_DEBUG "%s\n", slic_proc_version); } - err = pci_set_dma_mask(pcidev, DMA_BIT_MASK(64)); - if (err) { - err = pci_set_dma_mask(pcidev, DMA_BIT_MASK(32)); - if (err) + if (!pci_set_dma_mask(pcidev, DMA_BIT_MASK(64))) { + pci_using_dac = 1; + if (pci_set_consistent_dma_mask(pcidev, DMA_BIT_MASK(64))) { + dev_err(&pcidev->dev, "unable to obtain 64-bit DMA for " + "consistent allocations\n"); goto err_out_disable_pci; + } + } else if (pci_set_dma_mask(pcidev, DMA_BIT_MASK(32))) { + pci_using_dac = 0; + pci_set_consistent_dma_mask(pcidev, DMA_BIT_MASK(32)); + } else { + dev_err(&pcidev->dev, "no usable DMA configuration\n"); + goto err_out_disable_pci; } err = pci_request_regions(pcidev, DRV_NAME); - if (err) + if (err) { + dev_err(&pcidev->dev, "can't obtain PCI resources\n"); goto err_out_disable_pci; + } pci_set_master(pcidev); @@ -404,6 +415,8 @@ static int __devinit slic_entry_probe(struct pci_dev *pcidev, adapter = netdev_priv(netdev); adapter->netdev = netdev; adapter->pcidev = pcidev; + if (pci_using_dac) + netdev->features |= ...
From: kirjanov@gmail.com <kirjanov@gmail.com> No need type casting when using netdev_priv. Signed-off-by: Denis Kirjanov <kirjanov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/slicoss/slicoss.c | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c index 9c8eb09..41c440d 100644 --- a/drivers/staging/slicoss/slicoss.c +++ b/drivers/staging/slicoss/slicoss.c @@ -292,7 +292,7 @@ static void slic_init_adapter(struct net_device *netdev, { ushort index; struct slic_handle *pslic_handle; - struct adapter *adapter = (struct adapter *)netdev_priv(netdev); + struct adapter *adapter = netdev_priv(netdev); /* adapter->pcidev = pcidev;*/ adapter->vendid = pci_tbl_entry->vendor; @@ -484,7 +484,7 @@ err_out_disable_pci: static int slic_entry_open(struct net_device *dev) { - struct adapter *adapter = (struct adapter *) netdev_priv(dev); + struct adapter *adapter = netdev_priv(dev); struct sliccard *card = adapter->card; u32 locked = 0; int status; @@ -534,7 +534,7 @@ static void __devexit slic_entry_remove(struct pci_dev *pcidev) struct net_device *dev = pci_get_drvdata(pcidev); u32 mmio_start = 0; uint mmio_len = 0; - struct adapter *adapter = (struct adapter *) netdev_priv(dev); + struct adapter *adapter = netdev_priv(dev); struct sliccard *card; struct mcast_address *mcaddr, *mlist; @@ -581,7 +581,7 @@ static void __devexit slic_entry_remove(struct pci_dev *pcidev) static int slic_entry_halt(struct net_device *dev) { - struct adapter *adapter = (struct adapter *)netdev_priv(dev); + struct adapter *adapter = netdev_priv(dev); struct sliccard *card = adapter->card; __iomem struct slic_regs *slic_regs = adapter->slic_regs; @@ -624,7 +624,7 @@ static int slic_entry_halt(struct net_device *dev) static int slic_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { - struct ...
From: kirjanov@gmail.com <kirjanov@gmail.com> Use dev->stats rather than adapter->stats. Signed-off-by: Denis Kirjanov <kirjanov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/slicoss/slicoss.c | 25 ++++++++++++------------- 1 files changed, 12 insertions(+), 13 deletions(-) diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c index 96108fd..8727170 100644 --- a/drivers/staging/slicoss/slicoss.c +++ b/drivers/staging/slicoss/slicoss.c @@ -1230,21 +1230,20 @@ static void slic_init_cleanup(struct adapter *adapter) static struct net_device_stats *slic_get_stats(struct net_device *dev) { struct adapter *adapter = netdev_priv(dev); - struct net_device_stats *stats; ASSERT(adapter); - stats = &adapter->stats; - stats->collisions = adapter->slic_stats.iface.xmit_collisions; - stats->rx_errors = adapter->slic_stats.iface.rcv_errors; - stats->tx_errors = adapter->slic_stats.iface.xmt_errors; - stats->rx_missed_errors = adapter->slic_stats.iface.rcv_discards; - stats->tx_heartbeat_errors = 0; - stats->tx_aborted_errors = 0; - stats->tx_window_errors = 0; - stats->tx_fifo_errors = 0; - stats->rx_frame_errors = 0; - stats->rx_length_errors = 0; - return &adapter->stats; + dev->stats.collisions = adapter->slic_stats.iface.xmit_collisions; + dev->stats.rx_errors = adapter->slic_stats.iface.rcv_errors; + dev->stats.tx_errors = adapter->slic_stats.iface.xmt_errors; + dev->stats.rx_missed_errors = adapter->slic_stats.iface.rcv_discards; + dev->stats.tx_heartbeat_errors = 0; + dev->stats.tx_aborted_errors = 0; + dev->stats.tx_window_errors = 0; + dev->stats.tx_fifo_errors = 0; + dev->stats.rx_frame_errors = 0; + dev->stats.rx_length_errors = 0; + + return &dev->stats; } /* -- 1.7.0.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Ameya Palande <2ameya@gmail.com>
Signed-off-by: Ameya Palande <2ameya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/mimio/mimio.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/mimio/mimio.c b/drivers/staging/mimio/mimio.c
index 1ba8103..4d7a602 100644
--- a/drivers/staging/mimio/mimio.c
+++ b/drivers/staging/mimio/mimio.c
@@ -145,7 +145,7 @@ static void mimio_rx_handler(struct mimio *, unsigned char *, unsigned int);
static int mimio_tx(struct mimio *, const char *, int);
static char mimio_name[] = "VirtualInk mimio-Xi";
-static struct usb_device_id mimio_table [] = {
+static struct usb_device_id mimio_table[] = {
{ USB_DEVICE(MIMIO_VENDOR_ID, MIMIO_PRODUCT_ID) },
{ USB_DEVICE(0x0525, 0xa4a0) }, /* gadget zero firmware */
{ }
@@ -588,7 +588,7 @@ static int handle_mimio_rx_penupdown(struct mimio *mimio,
*(mimio->pktbuf.p + 2);
if (x != *(mimio->pktbuf.p + 3)) {
dev_dbg(&mimio->idev->dev, "EV_PEN%s: bad xsum.\n",
- down ? "DOWN":"UP");
+ down ? "DOWN" : "UP");
/* skip this event data */
mimio->pktbuf.p += 4;
/* decode any remaining events */
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Ameya Palande <2ameya@gmail.com>
Signed-off-by: Ameya Palande <2ameya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/mimio/mimio.c | 24 ------------------------
1 files changed, 0 insertions(+), 24 deletions(-)
diff --git a/drivers/staging/mimio/mimio.c b/drivers/staging/mimio/mimio.c
index 4d7a602..5bdbe02 100644
--- a/drivers/staging/mimio/mimio.c
+++ b/drivers/staging/mimio/mimio.c
@@ -505,23 +505,6 @@ static int mimio_probe(struct usb_interface *ifc,
input_set_abs_params(input_dev, ABS_Y, 0, MIMIO_YRANGE_MAX, 0, 0);
input_dev->absbit[BIT_WORD(ABS_MISC)] |= BIT_MASK(ABS_MISC);
-#if 0
- input_dev->absmin[ABS_X] = 0;
- input_dev->absmin[ABS_Y] = 0;
- input_dev->absmax[ABS_X] = 9600;
- input_dev->absmax[ABS_Y] = 4800;
- input_dev->absfuzz[ABS_X] = 0;
- input_dev->absfuzz[ABS_Y] = 0;
- input_dev->absflat[ABS_X] = 0;
- input_dev->absflat[ABS_Y] = 0;
-#endif
-
-#if 0
- /* this will just reduce the precision */
- input_dev->absfuzz[ABS_X] = 8; /* experimental; may need to change */
- input_dev->absfuzz[ABS_Y] = 8; /* experimental; may need to change */
-#endif
-
/*
* Register the input device.
*/
@@ -720,13 +703,6 @@ static void mimio_rx_handler(struct mimio *mimio,
if (instr_ofst[mimio->pktbuf.instr] >= 0) {
int code = BTN_TOOL_PEN +
instr_ofst[mimio->last_pen_down];
-#if 0
- /* Utter hack to ensure we get forwarded _AND_
- * so we can identify when a complete signal is
- * received */
- mimio->idev->abs[ABS_Y] = -1;
- mimio->idev->abs[ABS_X] = -1;
-#endif
/* input_regs(mimio->idev, regs); */
input_report_abs(mimio->idev, ABS_X, x);
input_report_abs(mimio->idev, ABS_Y, y);
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Ameya Palande <2ameya@gmail.com> Rearrange code and cleanup the information to get rid of checkpatch.pl line > 80 chars complaints. Signed-off-by: Ameya Palande <2ameya@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/mimio/mimio.c | 96 ++++++++++++++++++++++------------------- 1 files changed, 51 insertions(+), 45 deletions(-) diff --git a/drivers/staging/mimio/mimio.c b/drivers/staging/mimio/mimio.c index 5bdbe02..2cfef4a 100644 --- a/drivers/staging/mimio/mimio.c +++ b/drivers/staging/mimio/mimio.c @@ -1,47 +1,46 @@ /* * Hardware event => input event mapping: * + * BTN_TOOL_PEN 0x140 black + * BTN_TOOL_RUBBER 0x141 blue + * BTN_TOOL_BRUSH 0x142 green + * BTN_TOOL_PENCIL 0x143 red + * BTN_TOOL_AIRBRUSH 0x144 eraser + * BTN_TOOL_FINGER 0x145 small eraser + * BTN_TOOL_MOUSE 0x146 mimio interactive + * BTN_TOOL_LENS 0x147 mimio interactive but1 + * LOCALBTN_TOOL_EXTRA1 0x14a mimio interactive but2 == BTN_TOUCH + * LOCALBTN_TOOL_EXTRA2 0x14b mimio extra pens (orange, brown, yellow, + * purple) == BTN_STYLUS + * LOCALBTN_TOOL_EXTRA3 0x14c unused == BTN_STYLUS2 + * BTN_TOOL_DOUBLETAP 0x14d unused + * BTN_TOOL_TRIPLETAP 0x14e unused * - * - input.h:#define BTN_TOOL_PEN 0x140 black - input.h:#define BTN_TOOL_RUBBER 0x141 blue - input.h:#define BTN_TOOL_BRUSH 0x142 green - input.h:#define BTN_TOOL_PENCIL 0x143 red - input.h:#define BTN_TOOL_AIRBRUSH 0x144 eraser - input.h:#define BTN_TOOL_FINGER 0x145 small eraser - input.h:#define BTN_TOOL_MOUSE 0x146 mimio interactive - input.h:#define BTN_TOOL_LENS 0x147 mimio interactive but1 - input.h:#define LOCALBTN_TOOL_EXTRA1 0x14a mimio interactive but2 == BTN_TOUCH - input.h:#define LOCALBTN_TOOL_EXTRA2 0x14b mimio extra pens (orange, brown, yellow, purple) == BTN_STYLUS - input.h:#define LOCALBTN_TOOL_EXTRA3 ...
From: Peter Huewe <peterhuewe@gmx.de>
This almost trivial patch replaces the hardcoded values for the vendor and
device ids with defines, as they are used in drivers/hid/hid-ids.h
For me this seems to be more consistent, however as drivers/hid/hid-ids.h
is not within the default include directory I had to redefine the defines here
(maybe move the hid-ids.h to include/linux ?)
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/asus_oled/asus_oled.c | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/asus_oled/asus_oled.c b/drivers/staging/asus_oled/asus_oled.c
index 43c57b7..0c1fb0d 100644
--- a/drivers/staging/asus_oled/asus_oled.c
+++ b/drivers/staging/asus_oled/asus_oled.c
@@ -52,6 +52,10 @@
#define ASUS_OLED_DISP_HEIGHT 32
#define ASUS_OLED_PACKET_BUF_SIZE 256
+#define USB_VENDOR_ID_ASUS 0x0b05
+#define USB_DEVICE_ID_ASUS_LCM 0x1726
+#define USB_DEVICE_ID_ASUS_LCM2 0x175b
+
MODULE_AUTHOR("Jakub Schmidtke, sjakub@gmail.com");
MODULE_DESCRIPTION("Asus OLED Driver v" ASUS_OLED_VERSION);
MODULE_LICENSE("GPL");
@@ -85,16 +89,18 @@ struct oled_dev_desc_str {
/* table of devices that work with this driver */
static struct usb_device_id id_table[] = {
/* Asus G1/G2 (and variants)*/
- { USB_DEVICE(0x0b05, 0x1726) },
+ { USB_DEVICE(USB_VENDOR_ID_ASUS, USB_DEVICE_ID_ASUS_LCM) },
/* Asus G50V (and possibly others - G70? G71?)*/
- { USB_DEVICE(0x0b05, 0x175b) },
+ { USB_DEVICE(USB_VENDOR_ID_ASUS, USB_DEVICE_ID_ASUS_LCM2) },
{ },
};
/* parameters of specific devices */
static struct oled_dev_desc_str oled_dev_desc_table[] = {
- { 0x0b05, 0x1726, 128, PACK_MODE_G1, "G1/G2" },
- { 0x0b05, 0x175b, 256, PACK_MODE_G50, "G50" },
+ { USB_VENDOR_ID_ASUS, USB_DEVICE_ID_ASUS_LCM, 128, PACK_MODE_G1,
+ "G1/G2" },
+ { USB_VENDOR_ID_ASUS, USB_DEVICE_ID_ASUS_LCM2, 256, PACK_MODE_G50,
+ "G50" },
{ },
};
-- ...From: Andrew Lunn <andrew@lunn.ch>
Break up a lot of the big functions up into many smaller ones. This
helps with readability and there is now a lot less code squashed
against the right hand margin.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Marek Lindner <lindner_marek@yahoo.de>
Acked-by: Simon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/batman-adv/routing.c | 1148 +++++++++++++++++++++-------------
1 files changed, 709 insertions(+), 439 deletions(-)
diff --git a/drivers/staging/batman-adv/routing.c b/drivers/staging/batman-adv/routing.c
index 1f42d41..1ff2a7a 100644
--- a/drivers/staging/batman-adv/routing.c
+++ b/drivers/staging/batman-adv/routing.c
@@ -19,10 +19,6 @@
*
*/
-
-
-
-
#include "main.h"
#include "routing.h"
#include "send.h"
@@ -37,8 +33,6 @@
#include "aggregation.h"
#include "compat.h"
-
-
DECLARE_WAIT_QUEUE_HEAD(thread_wait);
static DECLARE_DELAYED_WORK(purge_orig_wq, purge_orig);
@@ -83,7 +77,9 @@ void originator_free(void)
spin_unlock(&orig_hash_lock);
}
-static struct neigh_node *create_neighbor(struct orig_node *orig_node, struct orig_node *orig_neigh_node, uint8_t *neigh, struct batman_if *if_incoming)
+static struct neigh_node *
+create_neighbor(struct orig_node *orig_node, struct orig_node *orig_neigh_node,
+ uint8_t *neigh, struct batman_if *if_incoming)
{
struct neigh_node *neigh_node;
@@ -122,12 +118,14 @@ void free_orig_node(void *data)
kfree(orig_node);
}
-/* this function finds or creates an originator entry for the given address if it does not exits */
+/* this function finds or creates an originator entry for the given
+ * address if it does not exits */
static struct orig_node *get_orig_node(uint8_t *addr)
{
struct orig_node *orig_node;
struct hashtable_t *swaphash;
char orig_str[ETH_STR_LEN];
+ int size;
orig_node = ((struct orig_node *)hash_find(orig_hash, addr));
@@ ...From: Andrew Lunn <andrew@lunn.ch> batman-adv used its own logging infrastructure. Replace this with standard kernel logging, printk(), with compile time and runtime options to enable/disable different debug levels. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/batman-adv/Makefile | 2 +- drivers/staging/batman-adv/README | 50 +++++++- drivers/staging/batman-adv/bitarray.c | 15 +- drivers/staging/batman-adv/device.c | 13 +- drivers/staging/batman-adv/hard-interface.c | 36 +++--- drivers/staging/batman-adv/log.c | 179 ------------------------ drivers/staging/batman-adv/log.h | 32 ----- drivers/staging/batman-adv/main.c | 24 +++- drivers/staging/batman-adv/main.h | 45 +++--- drivers/staging/batman-adv/proc.c | 171 ++++------------------- drivers/staging/batman-adv/routing.c | 102 +++++++------- drivers/staging/batman-adv/send.c | 56 ++++---- drivers/staging/batman-adv/soft-interface.c | 3 +- drivers/staging/batman-adv/translation-table.c | 22 ++-- drivers/staging/batman-adv/vis.c | 12 +- 15 files changed, 242 insertions(+), 520 deletions(-) delete mode 100644 drivers/staging/batman-adv/log.c delete mode 100644 drivers/staging/batman-adv/log.h diff --git a/drivers/staging/batman-adv/Makefile b/drivers/staging/batman-adv/Makefile index 02da871..64bdb78 100644 --- a/drivers/staging/batman-adv/Makefile +++ b/drivers/staging/batman-adv/Makefile @@ -19,4 +19,4 @@ # obj-m += batman-adv.o -batman-adv-objs := main.o proc.o send.o routing.o soft-interface.o device.o translation-table.o bitarray.o hash.o ring_buffer.o vis.o hard-interface.o aggregation.o log.o +batman-adv-objs := main.o proc.o send.o routing.o soft-interface.o device.o translation-table.o bitarray.o hash.o ring_buffer.o vis.o hard-interface.o ...
From: Andrew Lunn <andrew@lunn.ch>
Without this change we spam the kernel log on every packet received on
any other interface when an interface has been added, but is not yet
active, ie UP.
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/batman-adv/routing.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/batman-adv/routing.c b/drivers/staging/batman-adv/routing.c
index 1ff2a7a..decf67f 100644
--- a/drivers/staging/batman-adv/routing.c
+++ b/drivers/staging/batman-adv/routing.c
@@ -1177,12 +1177,8 @@ static int discard_one_packet(struct batman_if *batman_if,
{
int result = -EAGAIN;
- if (batman_if->if_active != IF_TO_BE_ACTIVATED) {
- printk(KERN_WARNING
- "batman-adv:Could not read from deactivated interface %s!\n",
- batman_if->dev);
- } else {
- if (batman_if->raw_sock)
+ if ((batman_if->if_active == IF_TO_BE_ACTIVATED)
+ && (batman_if->raw_sock)) {
result = receive_raw_packet(batman_if->raw_sock,
packet_buff,
PACKBUFF_SIZE);
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Andrew Lunn <andrew@lunn.ch>
It does not matter if the interface is to be activated or not, we must
read the packet in order that it be discarded.
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/batman-adv/routing.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/batman-adv/routing.c b/drivers/staging/batman-adv/routing.c
index decf67f..6a8d73d 100644
--- a/drivers/staging/batman-adv/routing.c
+++ b/drivers/staging/batman-adv/routing.c
@@ -1177,8 +1177,7 @@ static int discard_one_packet(struct batman_if *batman_if,
{
int result = -EAGAIN;
- if ((batman_if->if_active == IF_TO_BE_ACTIVATED)
- && (batman_if->raw_sock)) {
+ if (batman_if->raw_sock) {
result = receive_raw_packet(batman_if->raw_sock,
packet_buff,
PACKBUFF_SIZE);
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Andrew Lunn <andrew@lunn.ch> Bug found and fixed in origional version by Linus Luessing. Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Linus Luessing <linus.luessing@web.de> Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/batman-adv/Makefile | 2 +- drivers/staging/batman-adv/main.c | 1 + drivers/staging/batman-adv/originator.c | 243 +++++++++++++++++++++++++++++++ drivers/staging/batman-adv/originator.h | 31 ++++ drivers/staging/batman-adv/routing.c | 221 +--------------------------- drivers/staging/batman-adv/routing.h | 12 +- 6 files changed, 289 insertions(+), 221 deletions(-) create mode 100644 drivers/staging/batman-adv/originator.c create mode 100644 drivers/staging/batman-adv/originator.h diff --git a/drivers/staging/batman-adv/Makefile b/drivers/staging/batman-adv/Makefile index 64bdb78..42b4e63 100644 --- a/drivers/staging/batman-adv/Makefile +++ b/drivers/staging/batman-adv/Makefile @@ -19,4 +19,4 @@ # obj-m += batman-adv.o -batman-adv-objs := main.o proc.o send.o routing.o soft-interface.o device.o translation-table.o bitarray.o hash.o ring_buffer.o vis.o hard-interface.o aggregation.o +batman-adv-objs := main.o proc.o send.o routing.o soft-interface.o device.o translation-table.o bitarray.o hash.o ring_buffer.o vis.o hard-interface.o aggregation.o originator.o diff --git a/drivers/staging/batman-adv/main.c b/drivers/staging/batman-adv/main.c index 4b93a5d..a74bfbe 100644 --- a/drivers/staging/batman-adv/main.c +++ b/drivers/staging/batman-adv/main.c @@ -23,6 +23,7 @@ #include "proc.h" #include "routing.h" #include "send.h" +#include "originator.h" #include "soft-interface.h" #include "device.h" #include "translation-table.h" diff --git a/drivers/staging/batman-adv/originator.c b/drivers/staging/batman-adv/originator.c new file mode 100644 index 0000000..9962af7 --- /dev/null +++ ...
From: Andrew Lunn <andrew@lunn.ch>
So that the configuration hierarchy is correct, set the debug option
to have the same base as the main BATMAN option.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/batman-adv/Kconfig | 4 ++--
drivers/staging/batman-adv/README | 2 +-
drivers/staging/batman-adv/main.c | 2 +-
drivers/staging/batman-adv/main.h | 4 ++--
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/batman-adv/Kconfig b/drivers/staging/batman-adv/Kconfig
index 1d74dab..69e8fb0 100644
--- a/drivers/staging/batman-adv/Kconfig
+++ b/drivers/staging/batman-adv/Kconfig
@@ -14,10 +14,10 @@ config BATMAN_ADV
http://www.open-mesh.org/ for more information and user space
tools.
-config BATMAN_DEBUG
+config BATMAN_ADV_DEBUG
bool "B.A.T.M.A.N. debugging"
depends on BATMAN_ADV != n
- help
+ ---help---
This is an option for use by developers; most people should
say N here. This enables compilation of support for
diff --git a/drivers/staging/batman-adv/README b/drivers/staging/batman-adv/README
index 6c62482..a6a419d 100644
--- a/drivers/staging/batman-adv/README
+++ b/drivers/staging/batman-adv/README
@@ -115,7 +115,7 @@ kernel, use "make menuconfig" and enable the option
"B.A.T.M.A.N. debugging". When compiling outside of the kernel tree it
is necessary to edit the file Makefile.kbuild and uncomment the line
-#EXTRA_CFLAGS += -DCONFIG_BATMAN_DEBUG
+#EXTRA_CFLAGS += -DCONFIG_BATMAN_ADV_DEBUG
The additional debug output is by default disabled. It can be enabled
either at kernel modules load time or during run time. To enable debug
diff --git a/drivers/staging/batman-adv/main.c b/drivers/staging/batman-adv/main.c
index a74bfbe..434c600 100644
--- a/drivers/staging/batman-adv/main.c
+++ b/drivers/staging/batman-adv/main.c
@@ -57,7 +57,7 @@ atomic_t module_state;
...From: Ameya Palande <2ameya@gmail.com> Remove <linux/device.h> which is included twice Signed-off-by: Ameya Palande <2ameya@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/iio/ring_sw.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/drivers/staging/iio/ring_sw.c b/drivers/staging/iio/ring_sw.c index 359ff92..b746cf6 100644 --- a/drivers/staging/iio/ring_sw.c +++ b/drivers/staging/iio/ring_sw.c @@ -8,7 +8,6 @@ */ #include <linux/kernel.h> -#include <linux/device.h> #include <linux/module.h> #include <linux/device.h> #include <linux/workqueue.h> -- 1.7.0.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Huang Weiyi <weiyi.huang@gmail.com>
Remove duplicated #include('s) in
drivers/staging/wlags49_h2/wl_pci.c
Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/wlags49_h2/wl_pci.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/drivers/staging/wlags49_h2/wl_pci.c b/drivers/staging/wlags49_h2/wl_pci.c
index a3db111..01e4bec 100644
--- a/drivers/staging/wlags49_h2/wl_pci.c
+++ b/drivers/staging/wlags49_h2/wl_pci.c
@@ -81,7 +81,6 @@
#include <asm/system.h>
#include <asm/io.h>
#include <asm/irq.h>
-#include <asm/system.h>
#include <asm/bitops.h>
#include <asm/uaccess.h>
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Huang Weiyi <weiyi.huang@gmail.com>
Remove unused #include <linux/version.h>('s) in
drivers/staging/ramzswap/ramzswap_drv.c
Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/ramzswap/ramzswap_drv.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/drivers/staging/ramzswap/ramzswap_drv.c b/drivers/staging/ramzswap/ramzswap_drv.c
index 989fac5..18196f3 100644
--- a/drivers/staging/ramzswap/ramzswap_drv.c
+++ b/drivers/staging/ramzswap/ramzswap_drv.c
@@ -29,7 +29,6 @@
#include <linux/swap.h>
#include <linux/swapops.h>
#include <linux/vmalloc.h>
-#include <linux/version.h>
#include "ramzswap_drv.h"
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Radu Voicilas <rvoicilas@gmail.com>
dot11d.h needed a good refactoring - I've dropped some of the //
comments or transformed them to match the kernel documentation.
r8180_93cx6.h - fixed a little bit the copyright section.
Signed-off-by: Radu Voicilas <rvoicilas@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/rtl8192e/dot11d.h | 138 +++++++++++++++-----------------
drivers/staging/rtl8192e/r8180_93cx6.h | 33 ++++----
2 files changed, 83 insertions(+), 88 deletions(-)
diff --git a/drivers/staging/rtl8192e/dot11d.h b/drivers/staging/rtl8192e/dot11d.h
index 15b7a4b..5b0e2db 100644
--- a/drivers/staging/rtl8192e/dot11d.h
+++ b/drivers/staging/rtl8192e/dot11d.h
@@ -1,102 +1,96 @@
-#ifndef __INC_DOT11D_H
-#define __INC_DOT11D_H
+#ifndef INC_DOT11D_H
+#define INC_DOT11D_H
#ifdef ENABLE_DOT11D
#include "ieee80211.h"
-//#define ENABLE_DOT11D
-
-//#define DOT11D_MAX_CHNL_NUM 83
-
typedef struct _CHNL_TXPOWER_TRIPLE {
u8 FirstChnl;
u8 NumChnls;
u8 MaxTxPowerInDbm;
-}CHNL_TXPOWER_TRIPLE, *PCHNL_TXPOWER_TRIPLE;
+} CHNL_TXPOWER_TRIPLE, *PCHNL_TXPOWER_TRIPLE;
typedef enum _DOT11D_STATE {
DOT11D_STATE_NONE = 0,
DOT11D_STATE_LEARNED,
DOT11D_STATE_DONE,
-}DOT11D_STATE;
+} DOT11D_STATE;
+
+/**
+ * struct _RT_DOT11D_INFO
+ * @CountryIeLen: value greater than 0 if @CountryIeBuf contains
+ * valid country information element.
+ * @chanell_map: holds channel values
+ * 0 - invalid,
+ * 1 - valid (active scan),
+ * 2 - valid (passive scan)
+ * @CountryIeSrcAddr - Source AP of the country IE
+ */
typedef struct _RT_DOT11D_INFO {
- //DECLARE_RT_OBJECT(RT_DOT11D_INFO);
+ bool bEnabled;
- bool bEnabled; // dot11MultiDomainCapabilityEnabled
+ u16 CountryIeLen;
+ u8 CountryIeBuf[MAX_IE_LEN];
+ u8 CountryIeSrcAddr[6];
+ u8 CountryIeWatchdog;
- u16 CountryIeLen; // > 0 if CountryIeBuf[] contains valid country information element.
- u8 CountryIeBuf[MAX_IE_LEN];
- u8 ...From: Radu Voicilas <rvoicilas@gmail.com> Fixes to the way code looks. Signed-off-by: Radu Voicilas <rvoicilas@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/rtl8192e/r8190_rtl8256.h | 49 ++++++++++++++++------------- 1 files changed, 27 insertions(+), 22 deletions(-) diff --git a/drivers/staging/rtl8192e/r8190_rtl8256.h b/drivers/staging/rtl8192e/r8190_rtl8256.h index 7d9095a..ce49c60 100644 --- a/drivers/staging/rtl8192e/r8190_rtl8256.h +++ b/drivers/staging/rtl8192e/r8190_rtl8256.h @@ -1,28 +1,33 @@ -/* - This is part of the rtl8180-sa2400 driver - released under the GPL (See file COPYING for details). - Copyright (c) 2005 Andrea Merello <andreamrl@tiscali.it> +/* r8190_rtl8256.h - rtl8256 radio frontend + * + * This is part of the rtl8180-sa2400 driver + * released under the GPL (See file COPYING for details). + * Copyright (c) 2005 Andrea Merello <andreamrl@tiscali.it> + * + * Many thanks to Realtek Corp. for their great support! + */ - This files contains programming code for the rtl8256 - radio frontend. - - *Many* thanks to Realtek Corp. for their great support! - -*/ - -#ifndef RTL8225H -#define RTL8225H +#ifndef RTL8225_H +#define RTL8225_H #ifdef RTL8190P -#define RTL819X_TOTAL_RF_PATH 4 +#define RTL819X_TOTAL_RF_PATH 4 #else -#define RTL819X_TOTAL_RF_PATH 2 //for 8192E +#define RTL819X_TOTAL_RF_PATH 2 /* for 8192E */ #endif -extern void PHY_SetRF8256Bandwidth(struct net_device* dev , HT_CHANNEL_WIDTH Bandwidth); -extern RT_STATUS PHY_RF8256_Config(struct net_device* dev); -extern RT_STATUS phy_RF8256_Config_ParaFile(struct net_device* dev); -extern void PHY_SetRF8256CCKTxPower(struct net_device* dev, u8 powerlevel); -extern void PHY_SetRF8256OFDMTxPower(struct net_device* dev, u8 powerlevel); -extern bool MgntActSet_RF_State(struct net_device* dev, RT_RF_POWER_STATE StateToSet, RT_RF_CHANGE_SOURCE ChangeSource); -#endif +extern void PHY_SetRF8256Bandwidth(struct net_device *dev, + ...
From: david woo <xinhua_wu@realsil.com.cn> This patch should allow the driver to consume a lot less power. Signed-off-by: david woo <xinhua_wu@realsil.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/rtl8192e/Makefile | 9 +- drivers/staging/rtl8192e/ieee80211/ieee80211.h | 156 ++++- .../rtl8192e/ieee80211/ieee80211_crypt_ccmp.c | 6 +- drivers/staging/rtl8192e/ieee80211/ieee80211_rx.c | 96 +++- .../staging/rtl8192e/ieee80211/ieee80211_softmac.c | 244 +++++-- .../rtl8192e/ieee80211/ieee80211_softmac_wx.c | 26 +- drivers/staging/rtl8192e/ieee80211/ieee80211_tx.c | 76 ++ drivers/staging/rtl8192e/ieee80211/rtl819x_HT.h | 4 +- .../staging/rtl8192e/ieee80211/rtl819x_HTProc.c | 63 ++- drivers/staging/rtl8192e/r8190_rtl8256.c | 360 +++++----- drivers/staging/rtl8192e/r8192E.h | 23 +- drivers/staging/rtl8192e/r8192E_core.c | 757 +++++++++++++++++--- drivers/staging/rtl8192e/r8192E_dm.c | 40 +- drivers/staging/rtl8192e/r8192E_hw.h | 8 + drivers/staging/rtl8192e/r8192E_wx.c | 212 ++++-- drivers/staging/rtl8192e/r8192E_wx.h | 1 - drivers/staging/rtl8192e/r819xE_phy.c | 2 +- drivers/staging/rtl8192e/r819xE_phyreg.h | 3 + 18 files changed, 1660 insertions(+), 426 deletions(-) diff --git a/drivers/staging/rtl8192e/Makefile b/drivers/staging/rtl8192e/Makefile index 5e4aa95..e032c3e 100644 --- a/drivers/staging/rtl8192e/Makefile +++ b/drivers/staging/rtl8192e/Makefile @@ -1,13 +1,15 @@ NIC_SELECT = RTL8192E - EXTRA_CFLAGS += -DRTL8192E EXTRA_CFLAGS += -std=gnu89 EXTRA_CFLAGS += -O2 EXTRA_CFLAGS += -DTHOMAS_TURBO EXTRA_CFLAGS += -DENABLE_DOT11D -r8192_pci-objs := \ +EXTRA_CFLAGS += -DENABLE_IPS +EXTRA_CFLAGS += -DENABLE_LPS + +r8192e_pci-objs := \ r8192E_core.o \ r8180_93cx6.o \ r8192E_wx.o \ @@ -31,4 +33,5 @@ ...
From: Radu Voicilas <rvoicilas@gmail.com> Changed all the comments to conform to the standard, aligned register values. Signed-off-by: Radu Voicilas <rvoicilas@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/rtl8192e/r819xE_phyreg.h | 1114 +++++++++++++++--------------- 1 files changed, 574 insertions(+), 540 deletions(-) diff --git a/drivers/staging/rtl8192e/r819xE_phyreg.h b/drivers/staging/rtl8192e/r819xE_phyreg.h index 6a26883..d5de279 100644 --- a/drivers/staging/rtl8192e/r819xE_phyreg.h +++ b/drivers/staging/rtl8192e/r819xE_phyreg.h @@ -81,55 +81,70 @@ #define rFPGA0_XB_LSSIReadBack 0x8a4 #define rFPGA0_XC_LSSIReadBack 0x8a8 #define rFPGA0_XD_LSSIReadBack 0x8ac -#define rFPGA0_PSDReport 0x8b4 +#define rFPGA0_PSDReport 0x8b4 #define rFPGA0_XAB_RFInterfaceRB 0x8e0 #define rFPGA0_XCD_RFInterfaceRB 0x8e4 -//page 9 -#define rFPGA1_RFMOD 0x900 //RF mode & OFDM TxSC -#define rFPGA1_TxBlock 0x904 -#define rFPGA1_DebugSelect 0x908 -#define rFPGA1_TxInfo 0x90c - -//page a -#define rCCK0_System 0xa00 -#define rCCK0_AFESetting 0xa04 -#define rCCK0_CCA 0xa08 -#define rCCK0_RxAGC1 0xa0c //AGC default value, saturation level -#define rCCK0_RxAGC2 0xa10 //AGC & DAGC -#define rCCK0_RxHP 0xa14 -#define rCCK0_DSPParameter1 0xa18 //Timing recovery & Channel estimation threshold -#define rCCK0_DSPParameter2 0xa1c //SQ threshold -#define rCCK0_TxFilter1 0xa20 -#define rCCK0_TxFilter2 0xa24 -#define rCCK0_DebugPort 0xa28 //debug port and Tx filter3 -#define rCCK0_FalseAlarmReport 0xa2c //0xa2d -#define rCCK0_TRSSIReport 0xa50 -#define rCCK0_RxReport 0xa54 //0xa57 -#define rCCK0_FACounterLower 0xa5c //0xa5b -#define rCCK0_FACounterUpper 0xa58 //0xa5c - -//page ...
From: Radu Voicilas <rvoicilas@gmail.com> Signed-off-by: Radu Voicilas <rvoicilas@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/rtl8192e/r819xE_phy.h | 194 ++++++++++++++++++++------------- 1 files changed, 116 insertions(+), 78 deletions(-) diff --git a/drivers/staging/rtl8192e/r819xE_phy.h b/drivers/staging/rtl8192e/r819xE_phy.h index fa77abe..41e0d77 100644 --- a/drivers/staging/rtl8192e/r819xE_phy.h +++ b/drivers/staging/rtl8192e/r819xE_phy.h @@ -1,43 +1,46 @@ #ifndef _R819XU_PHY_H #define _R819XU_PHY_H -/* Channel switch:The size of command tables for switch channel*/ + +/* Channel switch: the size of command tables for switch channel */ #define MAX_PRECMD_CNT 16 #define MAX_RFDEPENDCMD_CNT 16 #define MAX_POSTCMD_CNT 16 #ifdef RTL8190P #define MACPHY_Array_PGLength 21 -#define Rtl819XMACPHY_Array_PG Rtl8190PciMACPHY_Array_PG -#define Rtl819XMACPHY_Array Rtl8190PciMACPHY_Array +#define Rtl819XMACPHY_Array_PG Rtl8190PciMACPHY_Array_PG +#define Rtl819XMACPHY_Array Rtl8190PciMACPHY_Array #define RadioC_ArrayLength 246 #define RadioD_ArrayLength 78 -#define Rtl819XRadioA_Array Rtl8190PciRadioA_Array -#define Rtl819XRadioB_Array Rtl8190PciRadioB_Array -#define Rtl819XRadioC_Array Rtl8190PciRadioC_Array -#define Rtl819XRadioD_Array Rtl8190PciRadioD_Array -#define Rtl819XAGCTAB_Array Rtl8190PciAGCTAB_Array -#define PHY_REGArrayLength 280 -#define Rtl819XPHY_REGArray Rtl8190PciPHY_REGArray -#define PHY_REG_1T2RArrayLength 280 -#define Rtl819XPHY_REG_1T2RArray Rtl8190PciPHY_REG_1T2RArray +#define Rtl819XRadioA_Array Rtl8190PciRadioA_Array +#define Rtl819XRadioB_Array Rtl8190PciRadioB_Array +#define Rtl819XRadioC_Array Rtl8190PciRadioC_Array +#define Rtl819XRadioD_Array Rtl8190PciRadioD_Array +#define Rtl819XAGCTAB_Array Rtl8190PciAGCTAB_Array +#define PHY_REGArrayLength 280 +#define Rtl819XPHY_REGArray Rtl8190PciPHY_REGArray +#define PHY_REG_1T2RArrayLength 280 +#define ...
From: Radu Voicilas <rvoicilas@gmail.com>
Signed-off-by: Radu Voicilas <rvoicilas@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/rtl8192e/r819xE_firmware.c | 81 ++++++++++++++++-----------
1 files changed, 48 insertions(+), 33 deletions(-)
diff --git a/drivers/staging/rtl8192e/r819xE_firmware.c b/drivers/staging/rtl8192e/r819xE_firmware.c
index 1f9e413..e05ba17 100644
--- a/drivers/staging/rtl8192e/r819xE_firmware.c
+++ b/drivers/staging/rtl8192e/r819xE_firmware.c
@@ -1,5 +1,5 @@
/*
- * Procedure: Init boot code/firmware code/data session
+ * Procedure: Init boot code/firmware code/data session
*
* Description: This routine will intialize firmware. If any error occurs
* during the initialization process, the routine shall terminate
@@ -7,19 +7,21 @@
* NdisOpenFile only from MiniportInitialize.
*
* Arguments: The pointer of the adapter
-
+ *
* Returns:
* NDIS_STATUS_FAILURE - the following initialization process
* should be terminated
* NDIS_STATUS_SUCCESS - if firmware initialization process
* success
*/
+
#include "r8192E.h"
#include "r8192E_hw.h"
+
#include <linux/firmware.h>
/* It should be double word alignment */
-#define GET_COMMAND_PACKET_FRAG_THRESHOLD(v) (4 * (v / 4) - 8)
+#define GET_COMMAND_PACKET_FRAG_THRESHOLD(v) (4 * (v / 4) - 8)
enum firmware_init_step {
FW_INIT_STEP0_BOOT = 0,
@@ -47,17 +49,17 @@ void firmware_init_param(struct net_device *dev)
static bool fw_download_code(struct net_device *dev, u8 *code_virtual_address,
u32 buffer_len)
{
- struct r8192_priv *priv = ieee80211_priv(dev);
- bool rt_status = true;
- u16 frag_threshold;
- u16 frag_length, frag_offset = 0;
- int i;
-
- rt_firmware *pfirmware = priv->pFirmware;
- struct sk_buff *skb;
- unsigned char *seg_ptr;
- cb_desc *tcb_desc;
- u8 bLastIniPkt;
+ struct r8192_priv *priv = ieee80211_priv(dev);
+ bool ...From: Greg Kroah-Hartman <gregkh@suse.de> This is needed so the code properly builds Cc: Scott Smedley <ss@aao.gov.au> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/dt3155/dt3155_drv.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/staging/dt3155/dt3155_drv.c b/drivers/staging/dt3155/dt3155_drv.c index f3ae8e8..3efdeb9 100644 --- a/drivers/staging/dt3155/dt3155_drv.c +++ b/drivers/staging/dt3155/dt3155_drv.c @@ -76,6 +76,7 @@ MODULE_LICENSE("GPL"); #include <linux/pci.h> #include <linux/types.h> #include <linux/poll.h> +#include <linux/sched.h> #include <asm/io.h> #include <asm/uaccess.h> -- 1.7.0.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Scott Smedley <ss@aao.gov.au> This is a driver for the DT3155 Digitizer Signed-off-by: Scott Smedley <ss@aao.gov.au> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/dt3155/Makefile | 27 + drivers/staging/dt3155/allocator.README | 98 +++ drivers/staging/dt3155/allocator.c | 296 ++++++++ drivers/staging/dt3155/allocator.h | 28 + drivers/staging/dt3155/dt3155.h | 175 +++++ drivers/staging/dt3155/dt3155.sysvinit | 60 ++ drivers/staging/dt3155/dt3155_drv.c | 1203 +++++++++++++++++++++++++++++++ drivers/staging/dt3155/dt3155_drv.h | 50 ++ drivers/staging/dt3155/dt3155_io.c | 236 ++++++ drivers/staging/dt3155/dt3155_io.h | 400 ++++++++++ drivers/staging/dt3155/dt3155_isr.c | 545 ++++++++++++++ drivers/staging/dt3155/dt3155_isr.h | 77 ++ drivers/staging/dt3155/pci-compat.h | 97 +++ drivers/staging/dt3155/sysdep.h | 820 +++++++++++++++++++++ 14 files changed, 4112 insertions(+), 0 deletions(-) create mode 100644 drivers/staging/dt3155/Makefile create mode 100644 drivers/staging/dt3155/allocator.README create mode 100644 drivers/staging/dt3155/allocator.c create mode 100644 drivers/staging/dt3155/allocator.h create mode 100644 drivers/staging/dt3155/dt3155.h create mode 100644 drivers/staging/dt3155/dt3155.sysvinit create mode 100644 drivers/staging/dt3155/dt3155_drv.c create mode 100644 drivers/staging/dt3155/dt3155_drv.h create mode 100644 drivers/staging/dt3155/dt3155_io.c create mode 100644 drivers/staging/dt3155/dt3155_io.h create mode 100644 drivers/staging/dt3155/dt3155_isr.c create mode 100644 drivers/staging/dt3155/dt3155_isr.h create mode 100644 drivers/staging/dt3155/pci-compat.h create mode 100644 drivers/staging/dt3155/sysdep.h diff --git a/drivers/staging/dt3155/Makefile b/drivers/staging/dt3155/Makefile new file mode 100644 index 0000000..1717ffb --- /dev/null +++ b/drivers/staging/dt3155/Makefile @@ -0,0 +1,27 ...
From: Greg Kroah-Hartman <gregkh@suse.de> Cc: Scott Smedley <ss@aao.gov.au> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/dt3155/TODO | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) create mode 100644 drivers/staging/dt3155/TODO diff --git a/drivers/staging/dt3155/TODO b/drivers/staging/dt3155/TODO new file mode 100644 index 0000000..3baa3b6 --- /dev/null +++ b/drivers/staging/dt3155/TODO @@ -0,0 +1,10 @@ +TODO: + - fix checkpatch.pl issues + - remove old kernel support, it is not needed + - convert to proper PCI device API + - fix sparse warnings + - audit for correct subsystem interaction + - review review review! + +Please send patches to Greg Kroah-Hartman <greg@kroah.com> +and Scott Smedley <ss@aao.gov.au> -- 1.7.0.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman <gregkh@suse.de> Now it will build with the rest of the kernel Cc: Scott Smedley <ss@aao.gov.au> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/Kconfig | 2 ++ drivers/staging/Makefile | 1 + drivers/staging/dt3155/Kconfig | 4 ++++ drivers/staging/dt3155/Makefile | 33 ++++++--------------------------- 4 files changed, 13 insertions(+), 27 deletions(-) create mode 100644 drivers/staging/dt3155/Kconfig diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig index fc2e963..02cde39 100644 --- a/drivers/staging/Kconfig +++ b/drivers/staging/Kconfig @@ -143,5 +143,7 @@ source "drivers/staging/netwave/Kconfig" source "drivers/staging/sm7xx/Kconfig" +source "drivers/staging/dt3155/Kconfig" + endif # !STAGING_EXCLUDE_BUILD endif # STAGING diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile index b5e67b8..9d47d42 100644 --- a/drivers/staging/Makefile +++ b/drivers/staging/Makefile @@ -53,3 +53,4 @@ obj-$(CONFIG_WAVELAN) += wavelan/ obj-$(CONFIG_PCMCIA_WAVELAN) += wavelan/ obj-$(CONFIG_PCMCIA_NETWAVE) += netwave/ obj-$(CONFIG_FB_SM7XX) += sm7xx/ +obj-$(CONFIG_DT3155) += dt3155/ diff --git a/drivers/staging/dt3155/Kconfig b/drivers/staging/dt3155/Kconfig new file mode 100644 index 0000000..4a3293c --- /dev/null +++ b/drivers/staging/dt3155/Kconfig @@ -0,0 +1,4 @@ +config DT3155 + tristate "DT3155 Digitizer support" + depends on PCI + diff --git a/drivers/staging/dt3155/Makefile b/drivers/staging/dt3155/Makefile index 1717ffb..136f21f 100644 --- a/drivers/staging/dt3155/Makefile +++ b/drivers/staging/dt3155/Makefile @@ -1,27 +1,6 @@ - -ifeq ($(shell [[ `uname -r | cut -f 1,2 -d\.` < 2.6 ]] && echo pre2.6),pre2.6) -# system with a pre 2.6 kernel _don't_ use kbuild. -all: - $(MAKE) -f Makefile.pre-2.6 - -clean: - rm -f *.o - -else -# systems with a 2.6 or later kernel use kbuild. -ifneq ($(KERNELRELEASE),) -obj-m := dt3155.o -dt3155-objs := ...
From: Bernie Thompson <bernie@plugable.com> Add dynamic modeset support udlfb uses EDID to find the monitor’s preferred mode udlfb no longer has fixed mode tables – it’s able to set any mode dynamically, from the standard VESA timing characteristics of the monitor. Draws from probe and setmode code of both displaylink-mod 0.3 branch of Roberto De Ioris, and Jaya Kumar's displaylinkfb. Lays foundation for defio support and making backbuffer optional. With additional changes to minimize diffs and clean for checkpatch.pl style. Does not yet include new ioctls or refcount/mutex code from displaylink-mod. Tested to work with existing xf-video-displaylink X server unmodified. Signed-off-by: Bernie Thompson <bernie@plugable.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/udlfb/udlfb.c | 652 ++++++++++++++++++++++++++++------------- drivers/staging/udlfb/udlfb.h | 156 +---------- 2 files changed, 451 insertions(+), 357 deletions(-) diff --git a/drivers/staging/udlfb/udlfb.c b/drivers/staging/udlfb/udlfb.c index f5416af..b61a3e5 100644 --- a/drivers/staging/udlfb/udlfb.c +++ b/drivers/staging/udlfb/udlfb.c @@ -1,17 +1,19 @@ -/***************************************************************************** - * DLFB Kernel Driver * - * Version 0.2 (udlfb) * - * (C) 2009 Roberto De Ioris <roberto@unbit.it> * - * * - * This file is licensed under the GPLv2. See COPYING in the package. * - * Based on the amazing work of Florian Echtler and libdlo 0.1 * - * * - * * - * 10.06.09 release 0.2.3 (edid ioctl, fallback for unsupported modes) * - * 05.06.09 release 0.2.2 (real screen blanking, rle compression, ...
From: Adam Buchbinder <adam.buchbinder@gmail.com>
Some comments and one message misspell "successful" or variants of
the word; this fixes them. No change in functionality.
Signed-off-by: Adam Buchbinder <adam.buchbinder@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/altpciechdma/altpciechdma.c | 2 +-
drivers/staging/rt2860/sta/connect.c | 4 ++--
drivers/staging/wlags49_h2/wl_netdev.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/altpciechdma/altpciechdma.c b/drivers/staging/altpciechdma/altpciechdma.c
index 2f07dd4..2a02f8e 100644
--- a/drivers/staging/altpciechdma/altpciechdma.c
+++ b/drivers/staging/altpciechdma/altpciechdma.c
@@ -894,7 +894,7 @@ static int __devinit probe(struct pci_dev *dev, const struct pci_device_id *id)
}
/* remember which irq we allocated */
ape->irq_line = (int)irq_line;
- printk(KERN_DEBUG "Succesfully requested IRQ #%d with dev_id 0x%p\n", irq_line, ape);
+ printk(KERN_DEBUG "Successfully requested IRQ #%d with dev_id 0x%p\n", irq_line, ape);
#endif
/* show BARs */
scan_bars(ape, dev);
diff --git a/drivers/staging/rt2860/sta/connect.c b/drivers/staging/rt2860/sta/connect.c
index 17e59ba..55732b1 100644
--- a/drivers/staging/rt2860/sta/connect.c
+++ b/drivers/staging/rt2860/sta/connect.c
@@ -62,8 +62,8 @@ u8 CipherSuiteWpaNoneAes[] = {
u8 CipherSuiteWpaNoneAesLen =
(sizeof(CipherSuiteWpaNoneAes) / sizeof(u8));
-/* The following MACRO is called after 1. starting an new IBSS, 2. succesfully JOIN an IBSS, */
-/* or 3. succesfully ASSOCIATE to a BSS, 4. successfully RE_ASSOCIATE to a BSS */
+/* The following MACRO is called after 1. starting an new IBSS, 2. successfully JOIN an IBSS, */
+/* or 3. successfully ASSOCIATE to a BSS, 4. successfully RE_ASSOCIATE to a BSS */
/* All settings successfuly negotiated furing MLME state machines become final settings */
/* and are copied to pAd->StaActive */
#define ...From: Adam Buchbinder <adam.buchbinder@gmail.com> Some comments misspell "should" or "shouldn't"; this fixes them. No code changes. Signed-off-by: Adam Buchbinder <adam.buchbinder@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- .../comedi/drivers/addi-data/APCI1710_Chrono.c | 2 +- .../comedi/drivers/addi-data/APCI1710_Dig_io.c | 2 +- .../comedi/drivers/addi-data/APCI1710_INCCPT.c | 2 +- .../comedi/drivers/addi-data/APCI1710_Inp_cpt.c | 2 +- .../comedi/drivers/addi-data/APCI1710_Pwm.c | 2 +- .../comedi/drivers/addi-data/APCI1710_Ssi.c | 2 +- .../comedi/drivers/addi-data/APCI1710_Tor.c | 2 +- .../comedi/drivers/addi-data/APCI1710_Ttl.c | 2 +- .../comedi/drivers/addi-data/addi_amcc_S5920.c | 2 +- .../staging/comedi/drivers/addi-data/addi_common.c | 2 +- .../staging/comedi/drivers/addi-data/addi_eeprom.c | 2 +- .../comedi/drivers/addi-data/hwdrv_APCI1710.c | 2 +- .../comedi/drivers/addi-data/hwdrv_apci035.c | 2 +- .../comedi/drivers/addi-data/hwdrv_apci1032.c | 2 +- .../comedi/drivers/addi-data/hwdrv_apci1500.c | 2 +- .../comedi/drivers/addi-data/hwdrv_apci1516.c | 2 +- .../comedi/drivers/addi-data/hwdrv_apci1564.c | 2 +- .../comedi/drivers/addi-data/hwdrv_apci16xx.c | 2 +- .../comedi/drivers/addi-data/hwdrv_apci2016.c | 2 +- .../comedi/drivers/addi-data/hwdrv_apci2032.c | 2 +- .../comedi/drivers/addi-data/hwdrv_apci2200.c | 2 +- .../comedi/drivers/addi-data/hwdrv_apci3120.c | 2 +- .../comedi/drivers/addi-data/hwdrv_apci3200.c | 2 +- .../comedi/drivers/addi-data/hwdrv_apci3501.c | 2 +- .../comedi/drivers/addi-data/hwdrv_apci3xxx.c | 2 +- .../staging/rtl8192e/ieee80211/rtl819x_HTProc.c | 2 +- drivers/staging/rtl8192e/r8192E_core.c | 4 ++-- .../staging/rtl8192su/ieee80211/rtl819x_HTProc.c | 2 +- ...
From: Adam Buchbinder <adam.buchbinder@gmail.com> A comment misspells "invocation"; this fixes it. No code changes. Signed-off-by: Adam Buchbinder <adam.buchbinder@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/wlan-ng/hfa384x_usb.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c index 925678b..c6a9e17 100644 --- a/drivers/staging/wlan-ng/hfa384x_usb.c +++ b/drivers/staging/wlan-ng/hfa384x_usb.c @@ -52,7 +52,7 @@ * around the register accesses. The next higher level represents C-callable * prism2 API functions that match the Intersil documentation as closely * as is reasonable. The next higher layer implements common sequences -* of invokations of the API layer (e.g. write to bap, followed by cmd). +* of invocations of the API layer (e.g. write to bap, followed by cmd). * * Common sequences: * hfa384x_drvr_xxx Highest level abstractions provided by the -- 1.7.0.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/winbond/core.h | 2 +-
drivers/staging/winbond/localpara.h | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/winbond/core.h b/drivers/staging/winbond/core.h
index 7d4bd5e..0a2060b 100644
--- a/drivers/staging/winbond/core.h
+++ b/drivers/staging/winbond/core.h
@@ -14,7 +14,7 @@
struct wbsoft_priv {
u32 adapterIndex; // 20060703.4 Add for using padapterContext global adapter point
- WB_LOCALDESCRIPT sLocalPara; // Myself connected parameters
+ struct wb_local_para sLocalPara; // Myself connected parameters
MLME_FRAME sMlmeFrame; // connect to peerSTA parameters
diff --git a/drivers/staging/winbond/localpara.h b/drivers/staging/winbond/localpara.h
index 5626a76..b731875 100644
--- a/drivers/staging/winbond/localpara.h
+++ b/drivers/staging/winbond/localpara.h
@@ -136,7 +136,7 @@ typedef struct _RadioOff
} RadioOff, *psRadioOff;
//===========================================================================
-typedef struct LOCAL_PARA
+struct wb_local_para
{
u8 PermanentAddress[ MAC_ADDR_LENGTH + 2 ]; // read from EPROM, manufacture set for each NetCard
u8 ThisMacAddress[ MAC_ADDR_LENGTH + 2 ]; // the driver will use actually.
@@ -274,6 +274,6 @@ typedef struct LOCAL_PARA
u16 IE_Append_size;
u16 reserved_7;
-} WB_LOCALDESCRIPT, *PWB_LOCALDESCRIPT;
+};
#endif
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/winbond/localpara.h | 6 +++---
drivers/staging/winbond/sme_api.h | 2 --
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/winbond/localpara.h b/drivers/staging/winbond/localpara.h
index b731875..b82d5ce 100644
--- a/drivers/staging/winbond/localpara.h
+++ b/drivers/staging/winbond/localpara.h
@@ -129,11 +129,11 @@ typedef struct _CHAN_LIST
ChanInfo Channel[50]; // 100B
} CHAN_LIST, *psCHAN_LIST;
-typedef struct _RadioOff
+struct radio_off
{
u8 boHwRadioOff;
u8 boSwRadioOff;
-} RadioOff, *psRadioOff;
+};
//===========================================================================
struct wb_local_para
@@ -186,7 +186,7 @@ struct wb_local_para
u16 ListenInterval; // The listen interval when SME invoking MLME_
// (Re)Associate_Request().
- RadioOff RadioOffStatus;
+ struct radio_off RadioOffStatus;
u8 Reserved0[2];
u8 boMsRadioOff; // Ndis demands to be true when set Disassoc. OID and be false when set SSID OID.
diff --git a/drivers/staging/winbond/sme_api.h b/drivers/staging/winbond/sme_api.h
index 5498783..62c2564 100644
--- a/drivers/staging/winbond/sme_api.h
+++ b/drivers/staging/winbond/sme_api.h
@@ -193,8 +193,6 @@ s8 sme_get_cwmin_value(void *pcore_data, u8 *cwmin);
s8 sme_get_cwmax_value(void *pcore_data, u16 *cwmax);
s8 sme_get_ms_radio_mode(void *pcore_data, u8 * pMsRadioOff);
s8 sme_set_ms_radio_mode(void *pcore_data, u8 boMsRadioOff);
-s8 sme_get_radio_mode(void *pcore_data, psRadioOff pRadioOffData);
-s8 sme_set_radio_mode(void *pcore_data, RadioOff RadioOffData);
void sme_get_tx_power_level(void *pcore_data, u32 *TxPower);
u8 sme_set_tx_power_level(void *pcore_data, u32 TxPower);
-- ...From: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/winbond/localpara.h | 9 ---------
1 files changed, 0 insertions(+), 9 deletions(-)
diff --git a/drivers/staging/winbond/localpara.h b/drivers/staging/winbond/localpara.h
index b82d5ce..6b29b56 100644
--- a/drivers/staging/winbond/localpara.h
+++ b/drivers/staging/winbond/localpara.h
@@ -110,13 +110,6 @@
// 20061108 WPS IE buffer
#define MAX_IE_APPEND_SIZE 256 + 4 // Due to [E id][Length][OUI][Data] may 257 bytes
-typedef struct _EVENTLOG
-{
- u16 Count; //Total count from start
- u16 index; //Buffer index, 0 ~ 63
- u32 EventValue[64]; //BYTE 3~2 : count, BYTE 1 : Event, BYTE 0 : reason
-} Event_Log, *pEvent_Log;
-
typedef struct _ChanInfo
{
u8 band;
@@ -264,8 +257,6 @@ struct wb_local_para
u32 bToSelfPacketReceived;
u32 WepKeyDetectTimerCount;
- Event_Log EventLog;
-
u16 SignalLostTh;
u16 SignalRoamTh;
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/winbond/localpara.h | 10 +++++-----
drivers/staging/winbond/reg.c | 10 +++++-----
drivers/staging/winbond/sme_api.h | 2 +-
drivers/staging/winbond/wb35reg_f.h | 2 +-
drivers/staging/winbond/wbusb.c | 8 ++++----
5 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/drivers/staging/winbond/localpara.h b/drivers/staging/winbond/localpara.h
index 6b29b56..7ca58d0 100644
--- a/drivers/staging/winbond/localpara.h
+++ b/drivers/staging/winbond/localpara.h
@@ -110,16 +110,16 @@
// 20061108 WPS IE buffer
#define MAX_IE_APPEND_SIZE 256 + 4 // Due to [E id][Length][OUI][Data] may 257 bytes
-typedef struct _ChanInfo
+struct chan_info
{
u8 band;
u8 ChanNo;
-} ChanInfo, *pChanInfo;
+};
typedef struct _CHAN_LIST
{
u16 Count;
- ChanInfo Channel[50]; // 100B
+ struct chan_info Channel[50]; // 100B
} CHAN_LIST, *psCHAN_LIST;
struct radio_off
@@ -189,7 +189,7 @@ struct wb_local_para
u8 RoamStatus;
u8 reserved7[3];
- ChanInfo CurrentChan; //Current channel no. and channel band. It may be changed by scanning.
+ struct chan_info CurrentChan; //Current channel no. and channel band. It may be changed by scanning.
u8 boHandover; // Roaming, Hnadover to other AP.
u8 boCCAbusy;
@@ -246,7 +246,7 @@ struct wb_local_para
u32 _dot11WEPUndecryptableCount;
u32 _dot11FrameDuplicateCount;
- ChanInfo IbssChanSetting; // 2B. Start IBSS Channel setting by registry or WWU.
+ struct chan_info IbssChanSetting; // 2B. Start IBSS Channel setting by registry or WWU.
u8 reserved_5[2]; //It may not be used after considering RF type,
//region and modulation type.
diff --git a/drivers/staging/winbond/reg.c b/drivers/staging/winbond/reg.c
index d915cbd..5f5048a ...From: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/winbond/mds_f.h | 3 ---
drivers/staging/winbond/mds_s.h | 28 ----------------------------
2 files changed, 0 insertions(+), 31 deletions(-)
diff --git a/drivers/staging/winbond/mds_f.h b/drivers/staging/winbond/mds_f.h
index ab1ea53..e09dd4b 100644
--- a/drivers/staging/winbond/mds_f.h
+++ b/drivers/staging/winbond/mds_f.h
@@ -11,9 +11,6 @@ void Mds_SendComplete( struct wbsoft_priv *adapter, PT02_DESCRIPTOR pT02 );
void Mds_MpduProcess( struct wbsoft_priv *adapter, struct wb35_descriptor *pRxDes );
extern void DataDmp(u8 *pdata, u32 len, u32 offset);
-// For Asynchronous indicating. The routine collocates with USB.
-void Mds_MsduProcess( struct wbsoft_priv *adapter, PRXLAYER1 pRxLayer1, u8 SlotIndex);
-
// For data frame sending 20060802
u16 MDS_GetPacketSize( struct wbsoft_priv *adapter );
void MDS_GetNextPacket( struct wbsoft_priv *adapter, struct wb35_descriptor *pDes );
diff --git a/drivers/staging/winbond/mds_s.h b/drivers/staging/winbond/mds_s.h
index e8e13bd..217ff08 100644
--- a/drivers/staging/winbond/mds_s.h
+++ b/drivers/staging/winbond/mds_s.h
@@ -133,32 +133,4 @@ struct wb35_mds {
};
-//
-// Reveive Layer 1 Format.
-//----------------------------
-typedef struct _RXLAYER1
-{
- u16 SequenceNumber; // The sequence number of the last received packet.
- u16 BufferTotalSize;
-
- u32 InUsed;
- u32 DecryptionMethod; // The desired defragment number of the next incoming packet.
-
- u8 DeFragmentNumber;
- u8 FrameType;
- u8 TypeEncapsulated;
- u8 BufferNumber;
-
- u32 FirstFrameArrivedTime;
-
- u8 LastFrameType; // 20061004 for fix intel 3945 's bug
- u8 RESERVED[3]; //@@ anson
-
- /////////////////////////////////////////////////////////////////////////////////////////////
- // For brand-new Rx ...From: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/winbond/mlme_s.h | 8 --------
1 files changed, 0 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/winbond/mlme_s.h b/drivers/staging/winbond/mlme_s.h
index ea12684..1217a1c 100644
--- a/drivers/staging/winbond/mlme_s.h
+++ b/drivers/staging/winbond/mlme_s.h
@@ -165,14 +165,6 @@ typedef struct _AUTHREQ {
} MLME_AUTHREQ_PARA, *psMLME_AUTHREQ_PARA;
-struct _Reason_Code {
-
- u8 peerMACaddr[MAC_ADDR_LENGTH];
- u16 wReasonCode;
-};
-typedef struct _Reason_Code MLME_DEAUTHREQ_PARA, *psMLME_DEAUTHREQ_PARA;
-typedef struct _Reason_Code MLME_DISASSOCREQ_PARA, *psMLME_DISASSOCREQ_PARA;
-
typedef struct _ASSOCREQ {
u8 PeerSTAAddr[MAC_ADDR_LENGTH];
u16 CapabilityInfo;
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Simon Horman <horms@verge.net.au> The prevailing idiom is to select WIRELESS_EXT not depend on it. Depending leaves this driver in a situation where it can only be built if another driver that selects WIRELESS_EXT has been enabled. Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/rtl8192su/Kconfig | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/staging/rtl8192su/Kconfig b/drivers/staging/rtl8192su/Kconfig index 123fa6d..b72a962 100644 --- a/drivers/staging/rtl8192su/Kconfig +++ b/drivers/staging/rtl8192su/Kconfig @@ -1,6 +1,7 @@ config RTL8192SU tristate "RealTek RTL8192SU Wireless LAN NIC driver" depends on PCI && WLAN && USB - depends on WIRELESS_EXT + select WIRELESS_EXT + select WEXT_PRIV default N ---help--- -- 1.7.0.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Simon Horman <horms@verge.net.au>
$ gcc --version
gcc (Debian 4.4.2-5) 4.4.2
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ make
...
drivers/staging/rtl8192su/ieee80211/rtl819x_BAProc.c: In function ‘ieee80211_rx_ADDBAReq’:
drivers/staging/rtl8192su/ieee80211/rtl819x_BAProc.c:342: warning: format ‘%ld’ expects type ‘long int’, but argument 3 has type ‘unsigned int’
drivers/staging/rtl8192su/ieee80211/rtl819x_BAProc.c: In function ‘ieee80211_rx_ADDBARsp’:
drivers/staging/rtl8192su/ieee80211/rtl819x_BAProc.c:443: warning: format ‘%ld’ expects type ‘long int’, but argument 3 has type ‘unsigned int’
drivers/staging/rtl8192su/ieee80211/rtl819x_BAProc.c: In function ‘ieee80211_rx_DELBA’:
drivers/staging/rtl8192su/ieee80211/rtl819x_BAProc.c:573: warning: format ‘%ld’ expects type ‘long int’, but argument 3 has type ‘unsigned int’
...
Also some style fixes for these lines:
+ Fix excessively long lines
+ Remove leading space before struct
+ Remove unnecessary parentheses
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
.../staging/rtl8192su/ieee80211/rtl819x_BAProc.c | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/rtl8192su/ieee80211/rtl819x_BAProc.c b/drivers/staging/rtl8192su/ieee80211/rtl819x_BAProc.c
index 6eb1096..5a38884 100644
--- a/drivers/staging/rtl8192su/ieee80211/rtl819x_BAProc.c
+++ b/drivers/staging/rtl8192su/ieee80211/rtl819x_BAProc.c
@@ -339,7 +339,10 @@ int ieee80211_rx_ADDBAReq( struct ieee80211_device* ieee, struct sk_buff *skb)
if (skb->len < sizeof( struct ieee80211_hdr_3addr) + 9)
{
- IEEE80211_DEBUG(IEEE80211_DL_ERR, " Invalid skb len in BAREQ(%d / %ld)\n", skb->len, (sizeof( struct ieee80211_hdr_3addr) + 9));
+ IEEE80211_DEBUG(IEEE80211_DL_ERR,
+ " Invalid skb len in BAREQ(%d / ...From: Simon Horman <horms@verge.net.au> The prevailing idiom is to select WIRELESS_EXT not depend on it. Depending leaves this driver in a situation where it can only be built if another driver that selects WIRELESS_EXT has been enabled. Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/wlan-ng/Kconfig | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/staging/wlan-ng/Kconfig b/drivers/staging/wlan-ng/Kconfig index f44294b..704ebd2 100644 --- a/drivers/staging/wlan-ng/Kconfig +++ b/drivers/staging/wlan-ng/Kconfig @@ -1,6 +1,7 @@ config PRISM2_USB tristate "Prism2.5/3 USB driver" - depends on WLAN && USB && WIRELESS_EXT + depends on WLAN && USB + select WIRELESS_EXT default n ---help--- This is the wlan-ng prism 2.5/3 USB driver for a wide range of -- 1.7.0.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Simon Horman <horms@verge.net.au> $ gcc --version gcc (Debian 4.4.2-5) 4.4.2 Copyright (C) 2009 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ make ... drivers/staging/wlan-ng/p80211wext.c: In function ‘p80211wext_dorequest’: drivers/staging/wlan-ng/p80211wext.c:139: warning: ‘mibitem.len’ is used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c:139: warning: ‘mibitem.status’ is used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c: In function ‘p80211wext_giwretry’: drivers/staging/wlan-ng/p80211wext.c:967: warning: ‘mibitem.len’ is used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c:967: warning: ‘mibitem.status’ is used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c:967: warning: ‘mibitem.data’ is used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c: In function ‘p80211wext_siwretry’: drivers/staging/wlan-ng/p80211wext.c:1057: warning: ‘mibitem.len’ may be used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c:1057: warning: ‘mibitem.status’ may be used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c: In function ‘p80211wext_giwtxpow’: drivers/staging/wlan-ng/p80211wext.c:1149: warning: ‘mibitem.len’ is used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c:1149: warning: ‘mibitem.status’ is used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c:1149: warning: ‘mibitem.data’ is used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c: In function ‘p80211wext_siwtxpow’: drivers/staging/wlan-ng/p80211wext.c:1123: warning: ‘mibitem.len’ may be used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c:1123: warning: ‘mibitem.status’ may be used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c: In function ...
From: Greg Kroah-Hartman <gregkh@suse.de>
This fixes up the worst of the coding style errors for the
allocator code.
Cc: Scott Smedley <ss@aao.gov.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/dt3155/allocator.c | 314 ++++++++++++++++++------------------
drivers/staging/dt3155/allocator.h | 2 +-
2 files changed, 158 insertions(+), 158 deletions(-)
diff --git a/drivers/staging/dt3155/allocator.c b/drivers/staging/dt3155/allocator.c
index 90429db..c1b8544 100644
--- a/drivers/staging/dt3155/allocator.c
+++ b/drivers/staging/dt3155/allocator.c
@@ -26,7 +26,7 @@
Date Programmer Description of changes made
-------------------------------------------------------------------
02-Aug-2002 NJC allocator now steps in 1MB increments, rather
- than doubling its size each time.
+ than doubling its size each time.
Also, allocator_init(u_int *) now returns
(in the first arg) the size of the free
space. This is no longer consistent with
@@ -68,7 +68,7 @@
# define DUMP_LIST() dump_list()
# ifdef __KERNEL__
/* This one if debugging is on, and kernel space */
-# define PDEBUG(fmt, args...) printk( KERN_DEBUG ALL_MSG fmt, ## args)
+# define PDEBUG(fmt, args...) printk(KERN_DEBUG ALL_MSG fmt, ## args)
# else
/* This one for user space */
# define PDEBUG(fmt, args...) fprintf(stderr, fmt, ## args)
@@ -88,8 +88,8 @@ int allocator_himem = 1; /* 0 = probe, pos. = megs, neg. = disable */
int allocator_step = 1; /* This is the step size in MB */
int allocator_probe = 1; /* This is a flag -- 1=probe, 0=don't probe */
-static unsigned long allocator_buffer = 0; /* physical address */
-static unsigned long allocator_buffer_size = 0; /* kilobytes */
+static unsigned long allocator_buffer; /* physical address */
+static unsigned long allocator_buffer_size; /* kilobytes */
/*
* The allocator keeps a list of DMA areas, so multiple ...From: Greg Kroah-Hartman <gregkh@suse.de>
This cleans up some of the coding style issues in the .h files.
More remains to be done.
Cc: Scott Smedley <ss@aao.gov.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/dt3155/dt3155.h | 148 +++++++++++++++++------------------
drivers/staging/dt3155/dt3155_drv.h | 6 +-
drivers/staging/dt3155/dt3155_io.h | 73 ++++++++---------
drivers/staging/dt3155/dt3155_isr.h | 20 +++---
4 files changed, 120 insertions(+), 127 deletions(-)
diff --git a/drivers/staging/dt3155/dt3155.h b/drivers/staging/dt3155/dt3155.h
index 2e15815..2a01e01 100644
--- a/drivers/staging/dt3155/dt3155.h
+++ b/drivers/staging/dt3155/dt3155.h
@@ -1,7 +1,7 @@
/*
Copyright 1996,2002,2005 Gregory D. Hager, Alfred A. Rizzi, Noah J. Cowan,
- Jason Lapenta, Scott Smedley
+ Jason Lapenta, Scott Smedley
This file is part of the DT3155 Device Driver.
@@ -20,8 +20,6 @@ along with the DT3155 Device Driver; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
MA 02111-1307 USA
- $Id: dt3155.h,v 1.11 2005/08/09 06:08:51 ssmedley Exp $
-
-- Changes --
Date Programmer Description of changes made
@@ -56,120 +54,118 @@ MA 02111-1307 USA
/* Can be 1 or 2 */
#define MAXBOARDS 1
-#define BOARD_MAX_BUFFS 3
-#define MAXBUFFERS BOARD_MAX_BUFFS*MAXBOARDS
+#define BOARD_MAX_BUFFS 3
+#define MAXBUFFERS (BOARD_MAX_BUFFS*MAXBOARDS)
-#define PCI_PAGE_SIZE (1 << 12)
+#define PCI_PAGE_SIZE (1 << 12)
#ifdef CCIR
-#define DT3155_MAX_ROWS 576
-#define DT3155_MAX_COLS 768
-#define FORMAT50HZ TRUE
+#define DT3155_MAX_ROWS 576
+#define DT3155_MAX_COLS 768
+#define FORMAT50HZ TRUE
#else
-#define DT3155_MAX_ROWS 480
-#define DT3155_MAX_COLS 640
-#define FORMAT50HZ FALSE
+#define DT3155_MAX_ROWS 480
+#define DT3155_MAX_COLS 640
+#define FORMAT50HZ FALSE
#endif
/* Configuration structure */
struct dt3155_config_s {
- u_int ...From: Greg Kroah-Hartman <gregkh@suse.de> It has no users, and no developers to maintain it to get it merged into mainline. So sad. Cc: Daniel Drake <ddrake@brontes3d.com> Cc: Justin Bronder <jsbronder@brontes3d.com> Cc: Duane Griffin <duaneg@dghda.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/Kconfig | 2 - drivers/staging/Makefile | 1 - drivers/staging/b3dfg/Kconfig | 10 - drivers/staging/b3dfg/Makefile | 1 - drivers/staging/b3dfg/TODO | 4 - drivers/staging/b3dfg/b3dfg.c | 1100 ---------------------------------------- 6 files changed, 0 insertions(+), 1118 deletions(-) delete mode 100644 drivers/staging/b3dfg/Kconfig delete mode 100644 drivers/staging/b3dfg/Makefile delete mode 100644 drivers/staging/b3dfg/TODO delete mode 100644 drivers/staging/b3dfg/b3dfg.c diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig index 02cde39..a1dee5c 100644 --- a/drivers/staging/Kconfig +++ b/drivers/staging/Kconfig @@ -89,8 +89,6 @@ source "drivers/staging/dream/Kconfig" source "drivers/staging/pohmelfs/Kconfig" -source "drivers/staging/b3dfg/Kconfig" - source "drivers/staging/phison/Kconfig" source "drivers/staging/p9auth/Kconfig" diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile index 9d47d42..f7d34ee 100644 --- a/drivers/staging/Makefile +++ b/drivers/staging/Makefile @@ -27,7 +27,6 @@ obj-$(CONFIG_INPUT_MIMIO) += mimio/ obj-$(CONFIG_TRANZPORT) += frontier/ obj-$(CONFIG_DREAM) += dream/ obj-$(CONFIG_POHMELFS) += pohmelfs/ -obj-$(CONFIG_B3DFG) += b3dfg/ obj-$(CONFIG_IDE_PHISON) += phison/ obj-$(CONFIG_PLAN9AUTH) += p9auth/ obj-$(CONFIG_LINE6_USB) += line6/ diff --git a/drivers/staging/b3dfg/Kconfig b/drivers/staging/b3dfg/Kconfig deleted file mode 100644 index 9e6573c..0000000 --- a/drivers/staging/b3dfg/Kconfig +++ /dev/null @@ -1,10 +0,0 @@ -config B3DFG - tristate "Brontes 3d Frame Framegrabber" - depends on PCI - default ...
From: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/winbond/localpara.h | 7 -------
drivers/staging/winbond/scan_s.h | 1 -
2 files changed, 0 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/winbond/localpara.h b/drivers/staging/winbond/localpara.h
index 7ca58d0..fcf6a04 100644
--- a/drivers/staging/winbond/localpara.h
+++ b/drivers/staging/winbond/localpara.h
@@ -116,12 +116,6 @@ struct chan_info
u8 ChanNo;
};
-typedef struct _CHAN_LIST
-{
- u16 Count;
- struct chan_info Channel[50]; // 100B
-} CHAN_LIST, *psCHAN_LIST;
-
struct radio_off
{
u8 boHwRadioOff;
@@ -250,7 +244,6 @@ struct wb_local_para
u8 reserved_5[2]; //It may not be used after considering RF type,
//region and modulation type.
- CHAN_LIST sSupportChanList; // 86B. It will be obtained according to RF type and region
u8 reserved_6[2]; //two variables are for wep key error detection added by ws 02/02/04
u32 bWepKeyError;
diff --git a/drivers/staging/winbond/scan_s.h b/drivers/staging/winbond/scan_s.h
index 775bb81..209717f 100644
--- a/drivers/staging/winbond/scan_s.h
+++ b/drivers/staging/winbond/scan_s.h
@@ -35,7 +35,6 @@ typedef struct _SCAN_REQ_PARA //mandatory parameters for SCAN request
{
u32 ScanType; //passive/active scan
- CHAN_LIST sChannelList; // 86B
u8 reserved_1[2];
struct SSID_Element sSSID; // 34B. scan only for this SSID
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman <gregkh@suse.de> No one seems to be maintaining this anymore, and it is not on any track to be merged to mainline. Cc: Ashwin Ganti <ashwin.ganti@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/Kconfig | 2 - drivers/staging/Makefile | 1 - drivers/staging/p9auth/Kconfig | 9 - drivers/staging/p9auth/Makefile | 1 - drivers/staging/p9auth/p9auth.c | 408 --------------------------------------- 5 files changed, 0 insertions(+), 421 deletions(-) delete mode 100644 drivers/staging/p9auth/Kconfig delete mode 100644 drivers/staging/p9auth/Makefile delete mode 100644 drivers/staging/p9auth/p9auth.c diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig index a1dee5c..e43cab4 100644 --- a/drivers/staging/Kconfig +++ b/drivers/staging/Kconfig @@ -91,8 +91,6 @@ source "drivers/staging/pohmelfs/Kconfig" source "drivers/staging/phison/Kconfig" -source "drivers/staging/p9auth/Kconfig" - source "drivers/staging/line6/Kconfig" source "drivers/gpu/drm/vmwgfx/Kconfig" diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile index f7d34ee..c2f0ca9 100644 --- a/drivers/staging/Makefile +++ b/drivers/staging/Makefile @@ -28,7 +28,6 @@ obj-$(CONFIG_TRANZPORT) += frontier/ obj-$(CONFIG_DREAM) += dream/ obj-$(CONFIG_POHMELFS) += pohmelfs/ obj-$(CONFIG_IDE_PHISON) += phison/ -obj-$(CONFIG_PLAN9AUTH) += p9auth/ obj-$(CONFIG_LINE6_USB) += line6/ obj-$(CONFIG_USB_SERIAL_QUATECH2) += serqt_usb2/ obj-$(CONFIG_USB_SERIAL_QUATECH_USB2) += quatech_usb2/ diff --git a/drivers/staging/p9auth/Kconfig b/drivers/staging/p9auth/Kconfig deleted file mode 100644 index d1c66d2..0000000 --- a/drivers/staging/p9auth/Kconfig +++ /dev/null @@ -1,9 +0,0 @@ -config PLAN9AUTH - tristate "Plan 9 style capability device implementation" - default n - depends on CRYPTO - help - This module implements the Plan 9 style capability device. - - To compile this driver as a ...
From: Greg Kroah-Hartman <gregkh@suse.de> No one seems to be able to maintain this, or merge it into mainline, so remove it. Acked-by: Leon Woestenberg <leon@sidebranch.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/Kconfig | 2 - drivers/staging/Makefile | 1 - drivers/staging/altpciechdma/Kconfig | 10 - drivers/staging/altpciechdma/Makefile | 2 - drivers/staging/altpciechdma/TODO | 15 - drivers/staging/altpciechdma/altpciechdma.c | 1182 --------------------------- 6 files changed, 0 insertions(+), 1212 deletions(-) delete mode 100644 drivers/staging/altpciechdma/Kconfig delete mode 100644 drivers/staging/altpciechdma/Makefile delete mode 100644 drivers/staging/altpciechdma/TODO delete mode 100644 drivers/staging/altpciechdma/altpciechdma.c diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig index e43cab4..9543174 100644 --- a/drivers/staging/Kconfig +++ b/drivers/staging/Kconfig @@ -71,8 +71,6 @@ source "drivers/staging/asus_oled/Kconfig" source "drivers/staging/panel/Kconfig" -source "drivers/staging/altpciechdma/Kconfig" - source "drivers/staging/rtl8187se/Kconfig" source "drivers/staging/rtl8192su/Kconfig" diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile index c2f0ca9..394327a 100644 --- a/drivers/staging/Makefile +++ b/drivers/staging/Makefile @@ -18,7 +18,6 @@ obj-$(CONFIG_RT2870) += rt2870/ obj-$(CONFIG_COMEDI) += comedi/ obj-$(CONFIG_ASUS_OLED) += asus_oled/ obj-$(CONFIG_PANEL) += panel/ -obj-$(CONFIG_ALTERA_PCIE_CHDMA) += altpciechdma/ obj-$(CONFIG_R8187SE) += rtl8187se/ obj-$(CONFIG_RTL8192SU) += rtl8192su/ obj-$(CONFIG_RTL8192U) += rtl8192u/ diff --git a/drivers/staging/altpciechdma/Kconfig b/drivers/staging/altpciechdma/Kconfig deleted file mode 100644 index 0f4bf92..0000000 --- a/drivers/staging/altpciechdma/Kconfig +++ /dev/null @@ -1,10 +0,0 @@ -config ALTERA_PCIE_CHDMA - tristate ...
From: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/winbond/mto.h | 5 -----
1 files changed, 0 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/winbond/mto.h b/drivers/staging/winbond/mto.h
index 4fe24b0..fb4781d 100644
--- a/drivers/staging/winbond/mto.h
+++ b/drivers/staging/winbond/mto.h
@@ -141,11 +141,6 @@ extern u16 MTO_Frag_Th_Tbl[];
#define MTO_DATA_RATE() MTO_Data_Rate_Tbl[MTO_RATE_LEVEL()]
#define MTO_FRAG_TH() MTO_Frag_Th_Tbl[MTO_FRAG_TH_LEVEL()]
-typedef struct {
- u8 tx_rate;
- u8 tx_retry_rate;
-} TXRETRY_REC;
-
extern void MTO_Init(struct wbsoft_priv *);
extern void MTO_PeriodicTimerExpired(struct wbsoft_priv *);
extern void MTO_SetDTORateRange(struct wbsoft_priv *, u8 *, u8);
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Justin Madru <jdm64@gawab.com>
the code was looping, setting s_move[i] to the following calculations
if (actual_step>= 0)
s_move[i] = ((((i + 1) * gain + 0x200) - (i * gain + 0x200)) / 0x400);
else
s_move[i] = ((((i + 1) * gain - 0x200) - (i * gain - 0x200)) / 0x400);
but, this code reduces to the expression
s_move[i] = gain>> 10;
The reason for the complexity was to generate a step function with
integer division and rounding to land on specific values. But these calculations
can be simplified to the following code:
gain = ((actual_step<< 10) / 5)>> 10;
for (i = 0; i<= 4; i++)
s_move[i] = gain;
Signed-off-by: Justin Madru<jdm64@gawab.com>
Reviewed-by: Ray Lee<ray-lk@madrabbit.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/dream/camera/s5k3e2fx.c | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/dream/camera/s5k3e2fx.c b/drivers/staging/dream/camera/s5k3e2fx.c
index edba198..66582af 100644
--- a/drivers/staging/dream/camera/s5k3e2fx.c
+++ b/drivers/staging/dream/camera/s5k3e2fx.c
@@ -1093,14 +1093,10 @@ static int32_t s5k3e2fx_move_focus(int direction, int32_t num_steps)
actual_step = step_direction * (int16_t)num_steps;
pos_offset = init_code + s5k3e2fx_ctrl->curr_lens_pos;
- gain = actual_step * 0x400 / 5;
+ gain = ((actual_step << 10) / 5) >> 10;
- for (i = 0; i <= 4; i++) {
- if (actual_step >= 0)
- s_move[i] = ((((i+1)*gain+0x200) - (i*gain+0x200))/0x400);
- else
- s_move[i] = ((((i+1)*gain-0x200) - (i*gain-0x200))/0x400);
- }
+ for (i = 0; i <= 4; i++)
+ s_move[i] = gain;
/* Ring Damping Code */
for (i = 0; i <= 4; i++) {
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Roel Kluin <roel.kluin@gmail.com> not(!) has a higher precedence than bit and(&). Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c index da2449d..c0b2c02 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c @@ -718,7 +718,7 @@ int ieee80211_wx_get_encode_ext(struct ieee80211_device *ieee, } else idx = ieee->tx_keyidx; - if (!ext->ext_flags & IW_ENCODE_EXT_GROUP_KEY && + if (!(ext->ext_flags & IW_ENCODE_EXT_GROUP_KEY) && ext->alg != IW_ENCODE_ALG_WEP) if (idx != 0 || ieee->iw_mode != IW_MODE_INFRA) return -EINVAL; -- 1.7.0.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Roel Kluin <roel.kluin@gmail.com>
`i' reaches 101 after the loop, so if it was 100 then it succeeded in
the last iteration. This is probably unlikely to cause problems.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/rt2860/common/rtmp_mcu.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/staging/rt2860/common/rtmp_mcu.c b/drivers/staging/rt2860/common/rtmp_mcu.c
index 9f03901..e80f587 100644
--- a/drivers/staging/rt2860/common/rtmp_mcu.c
+++ b/drivers/staging/rt2860/common/rtmp_mcu.c
@@ -221,7 +221,7 @@ int RtmpAsicSendCommandToMcu(struct rt_rtmp_adapter *pAd,
("AsicSendCommanToMcu::Mail box is busy\n"));
} while (i++ < 100);
- if (i >= 100) {
+ if (i > 100) {
DBGPRINT_ERR(("H2M_MAILBOX still hold by MCU. command fail\n"));
return FALSE;
}
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Jarod Wilson <jarod@redhat.com> This patch supersedes the earlier ones sent by Manu Abraham to add the Broadcom Crystal HD driver to the staging tree, per discussion with him about it. I've been working with Broadcom's Naren Sankar on this driver for a number of months, and had already talked Naren about submitting this on Broadcom's behalf, didn't expect anyone else to jump on submitting it as quickly as Manu did. ;) This version is a one-shot deal, incorporating the original driver, Manu's coding style clean-ups, udev device creation support from Edgar 'gimli' Hucek, and a number of other small tweaks from myself and Scott Davilla, the other individual who has been working closely on this code with Naren and I. I've tested this iteration of the code lightly on a mini pci-e board in a ThinkPad T61p running x86_64 Fedora 12, with the expected results, and will test further on other systems with other variants of the card (I have three varieties of this device currently in hand). Scott has also tested on assorted primarily i686 varieties of Ubuntu, and Naren has tested with both Fedora and Ubuntu, iirc. Note: only the 70012 is currently supported by this driver, 70015 support will follow later. Also note that Blu-Ray support isn't enabled (at the firmware level), due to misc fun related to the BD encryption scheme, DRM, etc. :\ I *do* have a git tree containing the driver, lib, gst plugin and firmware that I'm working from at the moment[*], as there are inter- dependencies between the driver and lib, and the driver can be used with kernels going a ways back (I've only tested back to 2.6.18 as it exists in Red Hat Enterprise Linux 5). I'm exporting from there, into a linux-next tree, then generating patches from there. The goal is to feed everything upstream as quickly as possible, but there are users who want this code for earlier kernels too... The firmware will be submitted for inclusion in dwmw2's linux-firmware tree once there is a suitable ...
From: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> state in the README that we also (compile) support 2.6.32 Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/batman-adv/README | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/batman-adv/README b/drivers/staging/batman-adv/README index a6a419d..2bedcbe 100644 --- a/drivers/staging/batman-adv/README +++ b/drivers/staging/batman-adv/README @@ -1,4 +1,4 @@ -[state: 13-11-2009] +[state: 13-12-2009] BATMAN-ADV ---------- @@ -15,7 +15,7 @@ above B.A.T.M.A.N. Advanced, prominent examples are: IPv4, IPv6, DHCP, IPX. This is batman-advanced implemented as Linux kernel driver. It does not depend on any network (other) driver, and can be used on wifi as well as ethernet, vpn, etc ... (anything with ethernet-style layer 2). -It compiles against and should work with Linux 2.6.20 - 2.6.31. Supporting older +It compiles against and should work with Linux 2.6.20 - 2.6.32. Supporting older versions is not planned, but it's probably easy to backport it. If you work on a backport, feel free to contact us. :-) -- 1.7.0.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Andrew Lunn <andrew@lunn.ch>
Ameya Palande requested we replace printk(KERN_DEBUG "") by pr_debug()
I decided it was better to use our debug macro.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/batman-adv/TODO | 6 ------
drivers/staging/batman-adv/device.c | 6 +++---
2 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/drivers/staging/batman-adv/TODO b/drivers/staging/batman-adv/TODO
index ea6dcf9..8c2b89e 100644
--- a/drivers/staging/batman-adv/TODO
+++ b/drivers/staging/batman-adv/TODO
@@ -29,12 +29,6 @@
-> PRIMARY)
=> logging
-* the log level LOG_TYPE_CRIT, LOG_TYPE_WARN & LOG_TYPE_NOTICE will be
-* unified to use printk
-* LOG_TYPE_BATMAN & LOG_TYPE_ROUTES will also use printk but only after the
-* internal debug level has been raised
-* the internal debug level can be modified using a module parameter (debug)
-* or at run time via /sys/module/batman-adv/parameters/debug
* make use of printk %pM support instead of converting mac addresses
* manually
diff --git a/drivers/staging/batman-adv/device.c b/drivers/staging/batman-adv/device.c
index 12f2de9..92cf8d5 100644
--- a/drivers/staging/batman-adv/device.c
+++ b/drivers/staging/batman-adv/device.c
@@ -207,7 +207,7 @@ ssize_t bat_device_write(struct file *file, const char __user *buff,
struct batman_if *batman_if;
if (len < sizeof(struct icmp_packet)) {
- printk(KERN_DEBUG "batman-adv:Error - can't send packet from char device: invalid packet size\n");
+ bat_dbg(DBG_BATMAN, "batman-adv:Error - can't send packet from char device: invalid packet size\n");
return -EINVAL;
}
@@ -218,12 +218,12 @@ ssize_t bat_device_write(struct file *file, const char __user *buff,
return -EFAULT;
if (icmp_packet.packet_type != BAT_ICMP) {
- printk(KERN_DEBUG "batman-adv:Error - can't send packet from char device: got bogus packet type (expected: ...From: Sven Eckelmann <sven.eckelmann@gmx.de> It is safe to call kfree(NULL) which makes this extra check unneeded. It was found using checkpatch.pl from linux-2.6 Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Acked-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/batman-adv/hard-interface.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/staging/batman-adv/hard-interface.c b/drivers/staging/batman-adv/hard-interface.c index e9cb977..28d02f6 100644 --- a/drivers/staging/batman-adv/hard-interface.c +++ b/drivers/staging/batman-adv/hard-interface.c @@ -399,8 +399,7 @@ int hardif_add_interface(char *dev, int if_num) return 1; out: - if (batman_if->packet_buff) - kfree(batman_if->packet_buff); + kfree(batman_if->packet_buff); kfree(batman_if); kfree(dev); return -1; -- 1.7.0.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
instead of dynamically registering hash iterators, calling functions are
changed to register the iterator objects statically. The two advantages are:
* no memory leaks when aborting from hash_iterate()
* no calls to kmalloc/kfree, therefore a little faster/safer
Tested with 9 QEMU instances, no obvious regression found.
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/batman-adv/hard-interface.c | 6 ++--
drivers/staging/batman-adv/hash.c | 23 ++++++-----------
drivers/staging/batman-adv/hash.h | 5 +++
drivers/staging/batman-adv/originator.c | 8 +++---
drivers/staging/batman-adv/proc.c | 12 ++++----
drivers/staging/batman-adv/routing.c | 6 ++--
drivers/staging/batman-adv/translation-table.c | 24 ++++++++--------
drivers/staging/batman-adv/vis.c | 33 +++++++++++------------
8 files changed, 57 insertions(+), 60 deletions(-)
diff --git a/drivers/staging/batman-adv/hard-interface.c b/drivers/staging/batman-adv/hard-interface.c
index 28d02f6..7c88592 100644
--- a/drivers/staging/batman-adv/hard-interface.c
+++ b/drivers/staging/batman-adv/hard-interface.c
@@ -318,7 +318,7 @@ int hardif_add_interface(char *dev, int if_num)
struct batman_if *batman_if;
struct batman_packet *batman_packet;
struct orig_node *orig_node;
- struct hash_it_t *hashit = NULL;
+ HASHIT(hashit);
batman_if = kmalloc(sizeof(struct batman_if), GFP_KERNEL);
@@ -377,8 +377,8 @@ int hardif_add_interface(char *dev, int if_num)
* if_num */
spin_lock(&orig_hash_lock);
- while (NULL != (hashit = hash_iterate(orig_hash, hashit))) {
- orig_node = hashit->bucket->data;
+ while (hash_iterate(orig_hash, &hashit)) {
+ orig_node = hashit.bucket->data;
if (resize_orig(orig_node, if_num) == -1) {
...From: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
we have written "neighbors", "neighbours" and bad spelled versions of this
word, this patch should make it consistent.
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/batman-adv/originator.c | 12 ++++++------
drivers/staging/batman-adv/packet.h | 2 +-
drivers/staging/batman-adv/proc.c | 2 +-
drivers/staging/batman-adv/routing.c | 10 +++++-----
drivers/staging/batman-adv/types.h | 2 +-
5 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/drivers/staging/batman-adv/originator.c b/drivers/staging/batman-adv/originator.c
index b104982..6a1fdf2 100644
--- a/drivers/staging/batman-adv/originator.c
+++ b/drivers/staging/batman-adv/originator.c
@@ -74,7 +74,7 @@ create_neighbor(struct orig_node *orig_node, struct orig_node *orig_neigh_node,
{
struct neigh_node *neigh_node;
- bat_dbg(DBG_BATMAN, "Creating new last-hop neighbour of originator\n");
+ bat_dbg(DBG_BATMAN, "Creating new last-hop neighbor of originator\n");
neigh_node = kmalloc(sizeof(struct neigh_node), GFP_ATOMIC);
memset(neigh_node, 0, sizeof(struct neigh_node));
@@ -94,7 +94,7 @@ void free_orig_node(void *data)
struct neigh_node *neigh_node;
struct orig_node *orig_node = (struct orig_node *)data;
- /* for all neighbours towards this originator ... */
+ /* for all neighbors towards this originator ... */
list_for_each_safe(list_pos, list_pos_tmp, &orig_node->neigh_list) {
neigh_node = list_entry(list_pos, struct neigh_node, list);
@@ -159,7 +159,7 @@ struct orig_node *get_orig_node(uint8_t *addr)
return orig_node;
}
-static bool purge_orig_neigbours(struct orig_node *orig_node,
+static bool purge_orig_neighbors(struct orig_node *orig_node,
struct neigh_node **best_neigh_node)
{
struct list_head *list_pos, *list_pos_tmp;
@@ -170,7 +170,7 @@ static ...From: Sven Eckelmann <sven.eckelmann@gmx.de>
forw_bcast_list_lock is spin_locked in both process and softirq context.
SoftIRQ calls the spinlock with disabled IRQ and normal process context
with enabled IRQs.
When process context is inside an spin_locked area protected by
forw_bcast_list_lock and gets interrupted by an IRQ, it could happen
that something tries to lock forw_bcast_list_lock again in SoftIRQ
context. It cannot proceed further since the lock is already taken
somewhere else, but no reschedule will happen inside the SoftIRQ
context. This leads to an complete kernel hang without any chance of
resurrection.
All functions called in process context must disable IRQs when they try
to get get that lock to to prevent any reschedule due to IRQs.
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Acked-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/batman-adv/send.c | 19 +++++++++++--------
1 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/batman-adv/send.c b/drivers/staging/batman-adv/send.c
index fc4953f..49b1534 100644
--- a/drivers/staging/batman-adv/send.c
+++ b/drivers/staging/batman-adv/send.c
@@ -338,12 +338,13 @@ static void forw_packet_free(struct forw_packet *forw_packet)
static void _add_bcast_packet_to_list(struct forw_packet *forw_packet,
unsigned long send_time)
{
+ unsigned long flags;
INIT_HLIST_NODE(&forw_packet->list);
/* add new packet to packet list */
- spin_lock(&forw_bcast_list_lock);
+ spin_lock_irqsave(&forw_bcast_list_lock, flags);
hlist_add_head(&forw_packet->list, &forw_bcast_list);
- spin_unlock(&forw_bcast_list_lock);
+ spin_unlock_irqrestore(&forw_bcast_list_lock, flags);
/* start timer for this packet */
INIT_DELAYED_WORK(&forw_packet->delayed_work,
@@ -382,10 +383,11 @@ void send_outstanding_bcast_packet(struct work_struct *work)
container_of(work, ...From: Marek Lindner <lindner_marek@yahoo.de> The originator table contained a TAB instead of a space which broke the layout as well as the batctl parser. Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/batman-adv/proc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/staging/batman-adv/proc.c b/drivers/staging/batman-adv/proc.c index 71668cf..4afabad 100644 --- a/drivers/staging/batman-adv/proc.c +++ b/drivers/staging/batman-adv/proc.c @@ -230,7 +230,7 @@ static int proc_originators_read(struct seq_file *seq, void *offset) addr_to_string(orig_str, orig_node->orig); addr_to_string(router_str, orig_node->router->addr); - seq_printf(seq, "%-17s (%3i) %17s [%10s]:", + seq_printf(seq, "%-17s (%3i) %17s [%10s]:", orig_str, orig_node->router->tq_avg, router_str, orig_node->router->if_incoming->dev); -- 1.7.0.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Linus Luessing <linus.luessing@web.de>
batman-adv used to export the vis data using different formats that were
switchable via /proc/net/batman-adv/vis_format. The various formats moved
to user space and rendered this configuration switch useless.
Signed-off-by: Linus Luessing <linus.luessing@web.de>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/batman-adv/proc.c | 79 +------------------------------------
drivers/staging/batman-adv/vis.h | 5 --
2 files changed, 1 insertions(+), 83 deletions(-)
diff --git a/drivers/staging/batman-adv/proc.c b/drivers/staging/batman-adv/proc.c
index 3ecf8e7..d0da0ea 100644
--- a/drivers/staging/batman-adv/proc.c
+++ b/drivers/staging/batman-adv/proc.c
@@ -29,13 +29,11 @@
#include "vis.h"
#include "compat.h"
-static uint8_t vis_format = DOT_DRAW;
-
static struct proc_dir_entry *proc_batman_dir, *proc_interface_file;
static struct proc_dir_entry *proc_orig_interval_file, *proc_originators_file;
static struct proc_dir_entry *proc_transt_local_file;
static struct proc_dir_entry *proc_transt_global_file;
-static struct proc_dir_entry *proc_vis_file, *proc_vis_format_file;
+static struct proc_dir_entry *proc_vis_file;
static struct proc_dir_entry *proc_aggr_file;
static int proc_interfaces_read(struct seq_file *seq, void *offset)
@@ -401,11 +399,8 @@ static int proc_vis_read(struct seq_file *seq, void *offset)
struct vis_info_entry *entries;
HLIST_HEAD(vis_if_list);
int i;
- uint8_t current_format;
char tmp_addr_str[ETH_STR_LEN];
- current_format = vis_format;
-
rcu_read_lock();
if (list_empty(&if_list) || (!is_vis_server())) {
rcu_read_unlock();
@@ -471,55 +466,6 @@ static int proc_vis_open(struct inode *inode, struct file *file)
return single_open(file, proc_vis_read, NULL);
}
-static int proc_vis_format_read(struct seq_file *seq, void *offset)
-{
- uint8_t ...From: Andrew Lunn <andrew@lunn.ch> The batman-adv kernel module is able to output visualization data using the dot draw or JSON format. This patch transforms the output into a generic format (called vis raw). User space tool may convert the raw data to support a variety of formats without the need of modifying the kernel module. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/batman-adv/TODO | 11 --- drivers/staging/batman-adv/proc.c | 171 +++++++++++++------------------------ drivers/staging/batman-adv/proc.h | 9 -- 3 files changed, 61 insertions(+), 130 deletions(-) diff --git a/drivers/staging/batman-adv/TODO b/drivers/staging/batman-adv/TODO index 8c2b89e..b1e369c 100644 --- a/drivers/staging/batman-adv/TODO +++ b/drivers/staging/batman-adv/TODO @@ -17,17 +17,6 @@ -> transtable_global (read-only) [outputs the global translation table] -> transtable_local (read-only) [outputs the local translation table] -=> vis "raw" data output -* the raw format shall replace dot draw / json to offer a neutral that can -* be converted -* the format (comma seperated entries): --> "mac" -> mac address of an originator (each line begins with it) --> "TQ mac value" -> src mac's link quality towards mac address --> "HNA mac" -> HNA announced by source mac --> "PRIMARY" -> this is a primary interface --> "SEC mac" -> secondary mac address of source (requires preceeding --> PRIMARY) - => logging * make use of printk %pM support instead of converting mac addresses * manually diff --git a/drivers/staging/batman-adv/proc.c b/drivers/staging/batman-adv/proc.c index 4afabad..3ecf8e7 100644 --- a/drivers/staging/batman-adv/proc.c +++ b/drivers/staging/batman-adv/proc.c @@ -322,166 +322,117 @@ static int proc_transt_global_open(struct inode *inode, struct file *file) return single_open(file, proc_transt_global_read, NULL); } -/* insert ...
From: Marek Lindner <lindner_marek@yahoo.de>
The /proc vis file was used to enable/disable the vis server and to output
the vis data at the same time. This behaviour was confusing and lacked a
proper method to display the current vis server status.
This patch seperates the 2 functionalities:
* use vis_server to enable/disable the vis server and to retrieve its status
* use vis_data to retrieve the vis raw data (if the server is enabled)
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/batman-adv/proc.c | 172 +++++++++++++++---------------------
drivers/staging/batman-adv/proc.h | 4 +-
drivers/staging/batman-adv/types.h | 10 ++
drivers/staging/batman-adv/vis.c | 62 +++++++++++++
drivers/staging/batman-adv/vis.h | 6 ++
5 files changed, 151 insertions(+), 103 deletions(-)
diff --git a/drivers/staging/batman-adv/proc.c b/drivers/staging/batman-adv/proc.c
index d0da0ea..a4f19e1 100644
--- a/drivers/staging/batman-adv/proc.c
+++ b/drivers/staging/batman-adv/proc.c
@@ -33,7 +33,7 @@ static struct proc_dir_entry *proc_batman_dir, *proc_interface_file;
static struct proc_dir_entry *proc_orig_interval_file, *proc_originators_file;
static struct proc_dir_entry *proc_transt_local_file;
static struct proc_dir_entry *proc_transt_global_file;
-static struct proc_dir_entry *proc_vis_file;
+static struct proc_dir_entry *proc_vis_srv_file, *proc_vis_data_file;
static struct proc_dir_entry *proc_aggr_file;
static int proc_interfaces_read(struct seq_file *seq, void *offset)
@@ -320,79 +320,55 @@ static int proc_transt_global_open(struct inode *inode, struct file *file)
return single_open(file, proc_transt_global_read, NULL);
}
-/* While scanning for vis-entries of a particular vis-originator
- * this list collects its interfaces to create a subgraph/cluster
- * out of them later
- */
-struct if_list_entry {
- uint8_t ...From: Linus Lüssing <linus.luessing@web.de>
This patches fixes two rounding issues in vis.c for sending and
purging vis packets. Before, the timers and timeouts always got
rounded down to seconds, though we want a precision in
milliseconds.
This also fixes a kernel panic that occures when lowering the
timer for sending vis packets (vis_interval) to less than 1000ms
in main.c manually.
Signed-off-by: Linus Lüssing <linus.luessing@web.de>
Acked-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/batman-adv/vis.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/batman-adv/vis.c b/drivers/staging/batman-adv/vis.c
index 086da87..0546310 100644
--- a/drivers/staging/batman-adv/vis.c
+++ b/drivers/staging/batman-adv/vis.c
@@ -377,7 +377,7 @@ static void purge_vis_packets(void)
if (info == my_vis_info) /* never purge own data. */
continue;
if (time_after(jiffies,
- info->first_seen + (VIS_TIMEOUT/1000)*HZ)) {
+ info->first_seen + (VIS_TIMEOUT*HZ)/1000)) {
hash_remove_bucket(vis_hash, &hashit);
free_info(info);
}
@@ -556,6 +556,6 @@ void vis_quit(void)
static void start_vis_timer(void)
{
queue_delayed_work(bat_event_workqueue, &vis_timer_wq,
- (atomic_read(&vis_interval)/1000) * HZ);
+ (atomic_read(&vis_interval) * HZ) / 1000);
}
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> there are some kmallocs left which are not checked whether they succeeds or not, which might lead to corrupted data structures if the system memory is full. This patch should clean up the remaining unchecked kmalloc()s. Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/batman-adv/originator.c | 22 ++++++++++++++++++- drivers/staging/batman-adv/routing.c | 27 +++++++++++++++++++---- drivers/staging/batman-adv/translation-table.c | 18 ++++++++------- 3 files changed, 53 insertions(+), 14 deletions(-) diff --git a/drivers/staging/batman-adv/originator.c b/drivers/staging/batman-adv/originator.c index 6a1fdf2..71bd2cf 100644 --- a/drivers/staging/batman-adv/originator.c +++ b/drivers/staging/batman-adv/originator.c @@ -77,6 +77,9 @@ create_neighbor(struct orig_node *orig_node, struct orig_node *orig_neigh_node, bat_dbg(DBG_BATMAN, "Creating new last-hop neighbor of originator\n"); neigh_node = kmalloc(sizeof(struct neigh_node), GFP_ATOMIC); + if (!neigh_node) + return NULL; + memset(neigh_node, 0, sizeof(struct neigh_node)); INIT_LIST_HEAD(&neigh_node->list); @@ -127,6 +130,9 @@ struct orig_node *get_orig_node(uint8_t *addr) bat_dbg(DBG_BATMAN, "Creating new originator: %s \n", orig_str); orig_node = kmalloc(sizeof(struct orig_node), GFP_ATOMIC); + if (!orig_node) + return NULL; + memset(orig_node, 0, sizeof(struct orig_node)); INIT_LIST_HEAD(&orig_node->neigh_list); @@ -138,13 +144,20 @@ struct orig_node *get_orig_node(uint8_t *addr) size = num_ifs * sizeof(TYPE_OF_WORD) * NUM_WORDS; orig_node->bcast_own = kmalloc(size, GFP_ATOMIC); + if (!orig_node->bcast_own) + goto free_orig_node; + memset(orig_node->bcast_own, 0, size); size = num_ifs * sizeof(uint8_t); orig_node->bcast_own_sum = kmalloc(size, GFP_ATOMIC); + if ...
From: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> This patch removes the (ugly and racy) packet receiving thread and the kernel socket usage. Instead, packets are received directly by registering the ethernet type and handling skbs instead of self-allocated buffers. Some consequences and comments: * we don't copy the payload data when forwarding/sending/receiving data anymore. This should boost performance. * packets from/to different interfaces can be (theoretically) processed simultaneously. Only the big originator hash lock might be in the way. * no more polling or sleeping/wakeup/scheduling issues when receiving packets * this might introduce new race conditions. * aggregation and vis code still use packet buffers and are not (yet) converted. * all spinlocks were converted to irqsave/restore versions to solve some lifelock issues when preempted. This might be overkill, some of these locks might be reverted later. * skb copies are only done if neccesary to avoid overhead performance differences: * we made some "benchmarks" with intel laptops. * bandwidth on Gigabit Ethernet increased from ~500 MBit/s to ~920 MBit/s * ping latency decresed from ~2ms to ~0.2 ms I did some tests on my 9 node qemu environment and could confirm that usual sending/receiving, forwarding, vis, batctl ping etc works. Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Acked-by: Sven Eckelmann <sven.eckelmann@gmx.de> Acked-by: Marek Lindner <lindner_marek@yahoo.de> Acked-by: Linus Lüssing <linus.luessing@web.de> Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/batman-adv/aggregation.c | 13 +- drivers/staging/batman-adv/device.c | 24 +- drivers/staging/batman-adv/hard-interface.c | 154 +++++--- drivers/staging/batman-adv/hard-interface.h | 4 + drivers/staging/batman-adv/main.c | 29 +- drivers/staging/batman-adv/originator.c | 18 +- drivers/staging/batman-adv/proc.c | 10 +- ...
From: Andrew Lunn <andrew@lunn.ch>
Some embedded devices have very limited sources of entropy for the
random number generator. It has been observed that the random MAC
address on the interface bat0 is not always random. When testing with
a collection of identical hardware, sometimes the bat0 device the same
MAC address on multiple devices, causing mayhem. This patch allows the
MAC address to be set by the user.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/batman-adv/soft-interface.c | 13 +++++++++++--
drivers/staging/batman-adv/translation-table.c | 15 +++++++++++++++
drivers/staging/batman-adv/translation-table.h | 1 +
3 files changed, 27 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/batman-adv/soft-interface.c b/drivers/staging/batman-adv/soft-interface.c
index 8ae3483..bc0217b 100644
--- a/drivers/staging/batman-adv/soft-interface.c
+++ b/drivers/staging/batman-adv/soft-interface.c
@@ -145,9 +145,18 @@ struct net_device_stats *interface_stats(struct net_device *dev)
return &priv->stats;
}
-int interface_set_mac_addr(struct net_device *dev, void *addr)
+int interface_set_mac_addr(struct net_device *dev, void *p)
{
- return -EBUSY;
+ struct sockaddr *addr = p;
+
+ if (!is_valid_ether_addr(addr->sa_data))
+ return -EADDRNOTAVAIL;
+
+ hna_local_remove(dev->dev_addr, "mac address changed");
+ memcpy(dev->dev_addr, addr->sa_data, ETH_ALEN);
+ hna_local_add(dev->dev_addr);
+
+ return 0;
}
int interface_change_mtu(struct net_device *dev, int new_mtu)
diff --git a/drivers/staging/batman-adv/translation-table.c b/drivers/staging/batman-adv/translation-table.c
index 8c8136b..53a054e 100644
--- a/drivers/staging/batman-adv/translation-table.c
+++ b/drivers/staging/batman-adv/translation-table.c
@@ -211,6 +211,21 @@ static void hna_local_del(struct hna_local_entry *hna_local_entry,
...From: Andrew Lunn <andrew@lunn.ch>
printk() since kernel version 2.6.29 has supported printing MAC
addresses directly, as an extension to the %p processing. This patch
makes use of this for printk() and bat_dbg(). This will remove the
overhead of using addr_to_string() which is normally never actually
output.
Fixed a typo found by Gus Wirth.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/batman-adv/TODO | 4 -
drivers/staging/batman-adv/compat.h | 82 ++++++++++++++++++-----
drivers/staging/batman-adv/device.c | 1 +
drivers/staging/batman-adv/hard-interface.c | 14 ++--
drivers/staging/batman-adv/main.c | 2 +-
drivers/staging/batman-adv/originator.c | 17 ++----
drivers/staging/batman-adv/routing.c | 65 ++++++-------------
drivers/staging/batman-adv/send.c | 13 +---
drivers/staging/batman-adv/translation-table.c | 34 +++-------
9 files changed, 111 insertions(+), 121 deletions(-)
diff --git a/drivers/staging/batman-adv/TODO b/drivers/staging/batman-adv/TODO
index b1e369c..2122adc 100644
--- a/drivers/staging/batman-adv/TODO
+++ b/drivers/staging/batman-adv/TODO
@@ -17,10 +17,6 @@
-> transtable_global (read-only) [outputs the global translation table]
-> transtable_local (read-only) [outputs the local translation table]
-=> logging
-* make use of printk %pM support instead of converting mac addresses
-* manually
-
=> strip out all backward compatibility support to older kernels
(only found in compat.h)
diff --git a/drivers/staging/batman-adv/compat.h b/drivers/staging/batman-adv/compat.h
index f4e0a45..ded1e6e 100644
--- a/drivers/staging/batman-adv/compat.h
+++ b/drivers/staging/batman-adv/compat.h
@@ -35,41 +35,87 @@
#define list_first_entry(ptr, type, member) \
list_entry((ptr)->next, type, member)
-#endif /* ...From: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Since we are now part of mainline, we don't need compat.h to allow building of the module with old versions of the kernel. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/batman-adv/TODO | 3 - drivers/staging/batman-adv/compat.h | 121 ------------------------ drivers/staging/batman-adv/device.c | 2 - drivers/staging/batman-adv/hard-interface.c | 1 - drivers/staging/batman-adv/main.c | 1 - drivers/staging/batman-adv/originator.c | 16 +--- drivers/staging/batman-adv/proc.c | 1 - drivers/staging/batman-adv/routing.c | 2 - drivers/staging/batman-adv/send.c | 2 - drivers/staging/batman-adv/soft-interface.c | 6 +- drivers/staging/batman-adv/translation-table.c | 1 - drivers/staging/batman-adv/vis.c | 1 - 12 files changed, 6 insertions(+), 151 deletions(-) delete mode 100644 drivers/staging/batman-adv/compat.h diff --git a/drivers/staging/batman-adv/TODO b/drivers/staging/batman-adv/TODO index 2122adc..2f15136 100644 --- a/drivers/staging/batman-adv/TODO +++ b/drivers/staging/batman-adv/TODO @@ -17,9 +17,6 @@ -> transtable_global (read-only) [outputs the global translation table] -> transtable_local (read-only) [outputs the local translation table] -=> strip out all backward compatibility support to older kernels - (only found in compat.h) - => fix checkpatch.pl errors Please send all patches to: diff --git a/drivers/staging/batman-adv/compat.h b/drivers/staging/batman-adv/compat.h deleted file mode 100644 index ded1e6e..0000000 --- a/drivers/staging/batman-adv/compat.h +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright (C) 2007-2009 B.A.T.M.A.N. contributors: - * - * Marek Lindner, Simon Wunderlich - * - * This program is free software; you can redistribute it and/or - * modify it ...
From: Greg Kroah-Hartman <gregkh@suse.de>
This callback was never called, so delete the thing.
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/hv/StorVscApi.h | 3 ---
drivers/staging/hv/storvsc_drv.c | 1 -
2 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/hv/StorVscApi.h b/drivers/staging/hv/StorVscApi.h
index 69c1406..1aca24e 100644
--- a/drivers/staging/hv/StorVscApi.h
+++ b/drivers/staging/hv/StorVscApi.h
@@ -91,9 +91,6 @@ struct storvsc_driver_object {
/* Maximum # of requests in flight per channel/device */
u32 MaxOutstandingRequestsPerChannel;
- /* Set by the caller to allow us to re-enumerate the bus on the host */
- void (*OnHostRescan)(struct hv_device *Device);
-
/* Specific to this driver */
int (*OnIORequest)(struct hv_device *Device,
struct hv_storvsc_request *Request);
diff --git a/drivers/staging/hv/storvsc_drv.c b/drivers/staging/hv/storvsc_drv.c
index d49dc21..c383962 100644
--- a/drivers/staging/hv/storvsc_drv.c
+++ b/drivers/staging/hv/storvsc_drv.c
@@ -148,7 +148,6 @@ static int storvsc_drv_init(int (*drv_init)(struct hv_driver *drv))
vmbus_get_interface(&storvsc_drv_obj->Base.VmbusChannelInterface);
storvsc_drv_obj->RingBufferSize = storvsc_ringbuffer_size;
- storvsc_drv_obj->OnHostRescan = storvsc_host_rescan;
/* Callback to client driver to complete the initialization */
drv_init(&storvsc_drv_obj->Base);
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Linus Lüssing <linus.luessing@web.de>
A non-integer changes the aggregation mode. Therefore this patch changes
the behaviour to explicitly check strict_strtoul()'s return code.
Signed-off-by: Linus Lüssing <linus.luessing@web.de>
Acked-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/batman-adv/proc.c | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/staging/batman-adv/proc.c b/drivers/staging/batman-adv/proc.c
index 4d19935..68c36b0 100644
--- a/drivers/staging/batman-adv/proc.c
+++ b/drivers/staging/batman-adv/proc.c
@@ -427,6 +427,7 @@ static ssize_t proc_aggr_write(struct file *file, const char __user *buffer,
char *aggr_string;
int not_copied = 0;
unsigned long aggregation_enabled_tmp;
+ int retval;
aggr_string = kmalloc(count, GFP_KERNEL);
@@ -436,22 +437,21 @@ static ssize_t proc_aggr_write(struct file *file, const char __user *buffer,
not_copied = copy_from_user(aggr_string, buffer, count);
aggr_string[count - not_copied - 1] = 0;
- strict_strtoul(aggr_string, 10, &aggregation_enabled_tmp);
+ retval = strict_strtoul(aggr_string, 10, &aggregation_enabled_tmp);
- if ((aggregation_enabled_tmp != 0) && (aggregation_enabled_tmp != 1)) {
+ if (retval || aggregation_enabled_tmp > 1) {
printk(KERN_ERR "batman-adv:Aggregation can only be enabled (1) or disabled (0), given value: %li\n", aggregation_enabled_tmp);
- goto end;
+ } else {
+ printk(KERN_INFO "batman-adv:Changing aggregation from: %s (%i) to: %s (%li)\n",
+ (atomic_read(&aggregation_enabled) == 1 ?
+ "enabled" : "disabled"),
+ atomic_read(&aggregation_enabled),
+ (aggregation_enabled_tmp == 1 ? "enabled" : "disabled"),
+ aggregation_enabled_tmp);
+ atomic_set(&aggregation_enabled,
+ (unsigned)aggregation_enabled_tmp);
}
- printk(KERN_INFO "batman-adv:Changing aggregation from: %s (%i) to: %s (%li)\n",
- ...From: Greg Kroah-Hartman <gregkh@suse.de>
Now that the callback pointer was removed, we can remove
the code itself, as it is never used.
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/hv/storvsc_drv.c | 204 --------------------------------------
1 files changed, 0 insertions(+), 204 deletions(-)
diff --git a/drivers/staging/hv/storvsc_drv.c b/drivers/staging/hv/storvsc_drv.c
index c383962..56c911e 100644
--- a/drivers/staging/hv/storvsc_drv.c
+++ b/drivers/staging/hv/storvsc_drv.c
@@ -39,8 +39,6 @@
struct host_device_context {
/* must be 1st field
* FIXME this is a bug */
- struct work_struct host_rescan_work;
-
/* point back to our device context */
struct device_context *device_ctx;
struct kmem_cache *request_pool;
@@ -77,8 +75,6 @@ static int storvsc_queuecommand(struct scsi_cmnd *scmnd,
static int storvsc_device_alloc(struct scsi_device *);
static int storvsc_device_configure(struct scsi_device *);
static int storvsc_host_reset_handler(struct scsi_cmnd *scmnd);
-static void storvsc_host_rescan_callback(struct work_struct *work);
-static void storvsc_host_rescan(struct hv_device *device_obj);
static int storvsc_remove(struct device *dev);
static struct scatterlist *create_bounce_buffer(struct scatterlist *sgl,
@@ -94,8 +90,6 @@ static unsigned int copy_to_bounce_buffer(struct scatterlist *orig_sgl,
struct scatterlist *bounce_sgl,
unsigned int orig_sgl_count);
-static int storvsc_report_luns(struct scsi_device *sdev, unsigned int luns[],
- unsigned int *lun_count);
static int storvsc_get_chs(struct scsi_device *sdev, struct block_device *bdev,
sector_t capacity, int *info);
@@ -265,9 +259,6 @@ static int storvsc_probe(struct device *device)
host_device_ctx->port = host->host_no;
host_device_ctx->device_ctx = device_ctx;
- INIT_WORK(&host_device_ctx->host_rescan_work,
- ...From: Greg Kroah-Hartman <gregkh@suse.de>
This callback only calls one function, so just call the function
instead, no need for indirection at all.
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/hv/StorVsc.c | 3 +--
drivers/staging/hv/StorVscApi.h | 2 +-
drivers/staging/hv/storvsc_drv.c | 10 +---------
3 files changed, 3 insertions(+), 12 deletions(-)
diff --git a/drivers/staging/hv/StorVsc.c b/drivers/staging/hv/StorVsc.c
index 2f7c425..38ea140 100644
--- a/drivers/staging/hv/StorVsc.c
+++ b/drivers/staging/hv/StorVsc.c
@@ -625,7 +625,7 @@ static int StorVscOnDeviceRemove(struct hv_device *Device)
return 0;
}
-static int StorVscOnHostReset(struct hv_device *Device)
+int StorVscOnHostReset(struct hv_device *Device)
{
struct storvsc_device *storDevice;
struct storvsc_request_extension *request;
@@ -842,7 +842,6 @@ int StorVscInitialize(struct hv_driver *Driver)
storDriver->Base.OnCleanup = StorVscOnCleanup;
storDriver->OnIORequest = StorVscOnIORequest;
- storDriver->OnHostReset = StorVscOnHostReset;
DPRINT_EXIT(STORVSC);
diff --git a/drivers/staging/hv/StorVscApi.h b/drivers/staging/hv/StorVscApi.h
index 1aca24e..126a858 100644
--- a/drivers/staging/hv/StorVscApi.h
+++ b/drivers/staging/hv/StorVscApi.h
@@ -94,7 +94,6 @@ struct storvsc_driver_object {
/* Specific to this driver */
int (*OnIORequest)(struct hv_device *Device,
struct hv_storvsc_request *Request);
- int (*OnHostReset)(struct hv_device *Device);
};
struct storvsc_device_info {
@@ -105,6 +104,7 @@ struct storvsc_device_info {
/* Interface */
int StorVscInitialize(struct hv_driver *driver);
+int StorVscOnHostReset(struct hv_device *Device);
int BlkVscInitialize(struct hv_driver *driver);
#endif /* _STORVSC_API_H_ */
diff --git a/drivers/staging/hv/storvsc_drv.c b/drivers/staging/hv/storvsc_drv.c
index 56c911e..12f8f3f ...From: Greg Kroah-Hartman <gregkh@suse.de>
This callback only calls one function, so just call the function
instead, no need for indirection at all.
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/hv/NetVscApi.h | 2 +-
drivers/staging/hv/RndisFilter.c | 5 +----
drivers/staging/hv/netvsc_drv.c | 7 +------
3 files changed, 3 insertions(+), 11 deletions(-)
diff --git a/drivers/staging/hv/NetVscApi.h b/drivers/staging/hv/NetVscApi.h
index 1ce2b74..93b9226 100644
--- a/drivers/staging/hv/NetVscApi.h
+++ b/drivers/staging/hv/NetVscApi.h
@@ -105,7 +105,6 @@ struct netvsc_driver {
void (*OnLinkStatusChanged)(struct hv_device *dev, u32 Status);
/* Specific to this driver */
- int (*OnOpen)(struct hv_device *dev);
int (*OnClose)(struct hv_device *dev);
int (*OnSend)(struct hv_device *dev, struct hv_netvsc_packet *packet);
@@ -119,5 +118,6 @@ struct netvsc_device_info {
/* Interface */
int NetVscInitialize(struct hv_driver *drv);
+int RndisFilterOnOpen(struct hv_device *Device);
#endif /* _NETVSC_API_H_ */
diff --git a/drivers/staging/hv/RndisFilter.c b/drivers/staging/hv/RndisFilter.c
index 26d7997..74f741e 100644
--- a/drivers/staging/hv/RndisFilter.c
+++ b/drivers/staging/hv/RndisFilter.c
@@ -85,8 +85,6 @@ static int RndisFilterOnDeviceRemove(struct hv_device *Device);
static void RndisFilterOnCleanup(struct hv_driver *Driver);
-static int RndisFilterOnOpen(struct hv_device *Device);
-
static int RndisFilterOnClose(struct hv_device *Device);
static int RndisFilterOnSend(struct hv_device *Device,
@@ -654,7 +652,6 @@ int RndisFilterInit(struct netvsc_driver *Driver)
Driver->Base.OnDeviceRemove = RndisFilterOnDeviceRemove;
Driver->Base.OnCleanup = RndisFilterOnCleanup;
Driver->OnSend = RndisFilterOnSend;
- Driver->OnOpen = RndisFilterOnOpen;
Driver->OnClose = RndisFilterOnClose;
/* Driver->QueryLinkStatus = ...From: Greg Kroah-Hartman <gregkh@suse.de>
This callback only calls one function, so just call the function
instead, no need for indirection at all.
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/hv/NetVscApi.h | 2 +-
drivers/staging/hv/RndisFilter.c | 5 +----
drivers/staging/hv/netvsc_drv.c | 7 +------
3 files changed, 3 insertions(+), 11 deletions(-)
diff --git a/drivers/staging/hv/NetVscApi.h b/drivers/staging/hv/NetVscApi.h
index 93b9226..95d7a32 100644
--- a/drivers/staging/hv/NetVscApi.h
+++ b/drivers/staging/hv/NetVscApi.h
@@ -105,7 +105,6 @@ struct netvsc_driver {
void (*OnLinkStatusChanged)(struct hv_device *dev, u32 Status);
/* Specific to this driver */
- int (*OnClose)(struct hv_device *dev);
int (*OnSend)(struct hv_device *dev, struct hv_netvsc_packet *packet);
void *Context;
@@ -119,5 +118,6 @@ struct netvsc_device_info {
/* Interface */
int NetVscInitialize(struct hv_driver *drv);
int RndisFilterOnOpen(struct hv_device *Device);
+int RndisFilterOnClose(struct hv_device *Device);
#endif /* _NETVSC_API_H_ */
diff --git a/drivers/staging/hv/RndisFilter.c b/drivers/staging/hv/RndisFilter.c
index 74f741e..1ab7fa9 100644
--- a/drivers/staging/hv/RndisFilter.c
+++ b/drivers/staging/hv/RndisFilter.c
@@ -85,8 +85,6 @@ static int RndisFilterOnDeviceRemove(struct hv_device *Device);
static void RndisFilterOnCleanup(struct hv_driver *Driver);
-static int RndisFilterOnClose(struct hv_device *Device);
-
static int RndisFilterOnSend(struct hv_device *Device,
struct hv_netvsc_packet *Packet);
@@ -652,7 +650,6 @@ int RndisFilterInit(struct netvsc_driver *Driver)
Driver->Base.OnDeviceRemove = RndisFilterOnDeviceRemove;
Driver->Base.OnCleanup = RndisFilterOnCleanup;
Driver->OnSend = RndisFilterOnSend;
- Driver->OnClose = RndisFilterOnClose;
/* Driver->QueryLinkStatus = ...From: Hank Janssen <hjanssen@microsoft.com>
Removed legacy XEN layer from hypervisor setup, and made sure only
Hyper-V is Is a valid hypervisor to run on.
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/hv/Hv.c | 205 +++++++++++++++++++----------------------------
drivers/staging/hv/Hv.h | 10 +--
2 files changed, 84 insertions(+), 131 deletions(-)
diff --git a/drivers/staging/hv/Hv.c b/drivers/staging/hv/Hv.c
index c2809f2..51149e6 100644
--- a/drivers/staging/hv/Hv.c
+++ b/drivers/staging/hv/Hv.c
@@ -208,50 +208,51 @@ int HvInit(void)
/* HvQueryHypervisorFeatures(maxLeaf); */
/*
- * Determine if we are running on xenlinux (ie x2v shim) or native
- * linux
+ * We only support running on top of Hyper-V
*/
rdmsrl(HV_X64_MSR_GUEST_OS_ID, gHvContext.GuestId);
- if (gHvContext.GuestId == 0) {
- /* Write our OS info */
- wrmsrl(HV_X64_MSR_GUEST_OS_ID, HV_LINUX_GUEST_ID);
- gHvContext.GuestId = HV_LINUX_GUEST_ID;
+
+ if (gHvContext.GuestId != 0) {
+ DPRINT_ERR(VMBUS, "Unknown guest id (0x%llx)!!",
+ gHvContext.GuestId);
+ goto Cleanup;
}
+ /* Write our OS info */
+ wrmsrl(HV_X64_MSR_GUEST_OS_ID, HV_LINUX_GUEST_ID);
+ gHvContext.GuestId = HV_LINUX_GUEST_ID;
+
/* See if the hypercall page is already set */
rdmsrl(HV_X64_MSR_HYPERCALL, hypercallMsr.AsUINT64);
- if (gHvContext.GuestId == HV_LINUX_GUEST_ID) {
- /* Allocate the hypercall page memory */
- /* virtAddr = osd_PageAlloc(1); */
- virtAddr = osd_VirtualAllocExec(PAGE_SIZE);
-
- if (!virtAddr) {
- DPRINT_ERR(VMBUS,
- "unable to allocate hypercall page!!");
- goto Cleanup;
- }
- hypercallMsr.Enable = 1;
- /* hypercallMsr.GuestPhysicalAddress =
- * virt_to_phys(virtAddr) >> PAGE_SHIFT; */
- hypercallMsr.GuestPhysicalAddress = vmalloc_to_pfn(virtAddr);
- wrmsrl(HV_X64_MSR_HYPERCALL, hypercallMsr.AsUINT64);
+ /*
+ * Allocate ...From: C. Bartlett <c-bartlett@hotmail.co.uk>
This is a patch to the RingBuffer.c file that corrects various coding style
warnings and errors found by checkpatch.pl
[ The real solution here is to get rid of this file entirely, and use the
kernel's internal ring buffer api, but until then, make these changes so as to
make checkpatch.pl happy, and keep others from continuously sending this type
of patch. - gkh]
Signed-off-by: Craig Bartlett <c-bartlett@hotmail.co.uk>
Cc: Bill Pemberton <wfp5p@virginia.edu>
Cc: Nicolas Palix <npalix@diku.dk>
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/hv/RingBuffer.c | 153 ++++++++++++++++++++++-----------------
1 files changed, 86 insertions(+), 67 deletions(-)
diff --git a/drivers/staging/hv/RingBuffer.c b/drivers/staging/hv/RingBuffer.c
index f69ae33..80b8a2c 100644
--- a/drivers/staging/hv/RingBuffer.c
+++ b/drivers/staging/hv/RingBuffer.c
@@ -48,7 +48,7 @@ Description:
static inline void
GetRingBufferAvailBytes(RING_BUFFER_INFO *rbi, u32 *read, u32 *write)
{
- u32 read_loc,write_loc;
+ u32 read_loc, write_loc;
/* Capture the read/write indices before they changed */
read_loc = rbi->RingBuffer->ReadIndex;
@@ -68,7 +68,7 @@ Description:
--*/
static inline u32
-GetNextWriteLocation(RING_BUFFER_INFO* RingInfo)
+GetNextWriteLocation(RING_BUFFER_INFO *RingInfo)
{
u32 next = RingInfo->RingBuffer->WriteIndex;
@@ -87,7 +87,7 @@ Description:
--*/
static inline void
-SetNextWriteLocation(RING_BUFFER_INFO* RingInfo, u32 NextWriteLocation)
+SetNextWriteLocation(RING_BUFFER_INFO *RingInfo, u32 NextWriteLocation)
{
RingInfo->RingBuffer->WriteIndex = NextWriteLocation;
}
@@ -102,7 +102,7 @@ Description:
--*/
static inline u32
-GetNextReadLocation(RING_BUFFER_INFO* RingInfo)
+GetNextReadLocation(RING_BUFFER_INFO *RingInfo)
{
u32 next = RingInfo->RingBuffer->ReadIndex;
@@ -122,7 ...From: Hank Janssen <hjanssen@microsoft.com> Provide proper versioning information for all HV drivers. With removal of build time/date/and Minor number as requested by Greg KH Signed-off-by: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Haiyang Zhang <haiyang@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/hv/VersionInfo.h | 22 +++++++++++++++++++--- drivers/staging/hv/Vmbus.c | 6 ++---- drivers/staging/hv/blkvsc_drv.c | 2 ++ drivers/staging/hv/netvsc_drv.c | 5 +++-- drivers/staging/hv/storvsc_drv.c | 2 ++ drivers/staging/hv/vmbus_drv.c | 2 ++ 6 files changed, 30 insertions(+), 9 deletions(-) diff --git a/drivers/staging/hv/VersionInfo.h b/drivers/staging/hv/VersionInfo.h index 9c3641d..10d7b19 100644 --- a/drivers/staging/hv/VersionInfo.h +++ b/drivers/staging/hv/VersionInfo.h @@ -24,8 +24,24 @@ #ifndef __HV_VERSION_INFO #define __HV_VERSION_INFO -static const char VersionDate[] = __DATE__; -static const char VersionTime[] = __TIME__; -static const char VersionDesc[] = "Version 2.0"; +/* + * We use the same version numbering for all Hyper-V modules. + * + * Definition of versioning is as follows; + * + * Major Number Changes for these scenarios; + * 1. When a new version of Windows Hyper-V + * is released. + * 2. A Major change has occurred in the + * Linux IC's. + * (For example the merge for the first time + * into the kernel) Every time the Major Number + * changes, the Revision number is reset to 0. + * Minor Number Changes when new functionality is added + * to the Linux IC's that is not a bug fix. + * + */ +#define HV_DRV_VERSION "3.0" + #endif diff --git a/drivers/staging/hv/Vmbus.c b/drivers/staging/hv/Vmbus.c index 35a023e..3d0a240 100644 --- a/drivers/staging/hv/Vmbus.c +++ b/drivers/staging/hv/Vmbus.c @@ -273,10 +273,8 @@ int VmbusInitialize(struct hv_driver *drv) DPRINT_ENTER(VMBUS); - DPRINT_INFO(VMBUS, ...
From: Haiyang Zhang <haiyangz@microsoft.com>
Rename struct device_context and re-arrange the fields inside.
Rename struct device_context to struct vm_device, and move struct device
field to the end according to Document/driver-model standard.
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/hv/blkvsc_drv.c | 8 ++++----
drivers/staging/hv/netvsc_drv.c | 10 +++++-----
drivers/staging/hv/storvsc_drv.c | 10 +++++-----
drivers/staging/hv/vmbus.h | 12 ++++++------
drivers/staging/hv/vmbus_drv.c | 36 ++++++++++++++++++------------------
5 files changed, 38 insertions(+), 38 deletions(-)
diff --git a/drivers/staging/hv/blkvsc_drv.c b/drivers/staging/hv/blkvsc_drv.c
index 635692d..1d1a46f 100644
--- a/drivers/staging/hv/blkvsc_drv.c
+++ b/drivers/staging/hv/blkvsc_drv.c
@@ -93,7 +93,7 @@ struct blkvsc_request {
/* Per device structure */
struct block_device_context {
/* point back to our device context */
- struct device_context *device_ctx;
+ struct vm_device *device_ctx;
struct kmem_cache *request_pool;
spinlock_t lock;
struct gendisk *gd;
@@ -255,7 +255,7 @@ static int blkvsc_probe(struct device *device)
(struct blkvsc_driver_context *)driver_ctx;
struct storvsc_driver_object *storvsc_drv_obj =
&blkvsc_drv_ctx->drv_obj;
- struct device_context *device_ctx = device_to_device_context(device);
+ struct vm_device *device_ctx = device_to_vm_device(device);
struct hv_device *device_obj = &device_ctx->device_obj;
struct block_device_context *blkdev = NULL;
@@ -746,7 +746,7 @@ static int blkvsc_remove(struct device *device)
(struct blkvsc_driver_context *)driver_ctx;
struct storvsc_driver_object *storvsc_drv_obj =
&blkvsc_drv_ctx->drv_obj;
- struct device_context *device_ctx = device_to_device_context(device);
+ struct vm_device *device_ctx = device_to_vm_device(device);
struct ...From: Simon Horman <horms@verge.net.au>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
.../rtl8192e/ieee80211/ieee80211_crypt_ccmp.c | 19 +++++++++++++------
1 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_ccmp.c b/drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_ccmp.c
index 70159cf..d5fe94d 100644
--- a/drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_ccmp.c
+++ b/drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_ccmp.c
@@ -475,12 +475,19 @@ static int ieee80211_ccmp_get_key(void *key, int len, u8 *seq, void *priv)
static char * ieee80211_ccmp_print_stats(char *p, void *priv)
{
struct ieee80211_ccmp_data *ccmp = priv;
- p += sprintf(p, "key[%d] alg=CCMP key_set=%d "
- "tx_pn=%02x%02x%02x%02x%02x%02x "
- "rx_pn=%02x%02x%02x%02x%02x%02x "
- "format_errors=%d replays=%d decrypt_errors=%d\n",
- ccmp->key_idx, ccmp->key_set,
- ccmp->tx_pn, ccmp->rx_pn,
+ int i;
+
+ p += sprintf(p, "key[%d] alg=CCMP key_set=%d tx_pn=",
+ ccmp->key_idx, ccmp->key_set);
+
+ for (i = 0; i < ARRAY_SIZE(ccmp->tx_pn); i++)
+ p += sprintf(p, "%02x", ccmp->tx_pn[i]);
+
+ sprintf(p, " rx_pn=");
+ for (i = 0; i < ARRAY_SIZE(ccmp->rx_pn); i++)
+ p += sprintf(p, "%02x", ccmp->tx_pn[i]);
+
+ p += sprintf(p, " format_errors=%d replays=%d decrypt_errors=%d\n",
ccmp->dot11RSNAStatsCCMPFormatErrors,
ccmp->dot11RSNAStatsCCMPReplays,
ccmp->dot11RSNAStatsCCMPDecryptErrors);
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Chris Nicholson <chris.nicholson@cnick.org.uk>
This is a patch to the Channel.c file that fixes up a brace
warning found by checkpatch.pl
Signed-off-by: Chris Nicholson <chris.nicholson@cnick.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/hv/Channel.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/hv/Channel.c b/drivers/staging/hv/Channel.c
index 746370e..d46eb14 100644
--- a/drivers/staging/hv/Channel.c
+++ b/drivers/staging/hv/Channel.c
@@ -991,9 +991,8 @@ void VmbusChannelOnTimer(unsigned long data)
{
struct vmbus_channel *channel = (struct vmbus_channel *)data;
- if (channel->OnChannelCallback) {
+ if (channel->OnChannelCallback)
channel->OnChannelCallback(channel->ChannelCallbackContext);
- }
}
/**
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Simon Horman <horms@verge.net.au> Remove unnecessary forward declaration of rtusb_probe() and rtusb_disconnect() Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/rt2860/usb_main_dev.c | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rt2860/usb_main_dev.c b/drivers/staging/rt2860/usb_main_dev.c index 1e6e8a3..1873a79 100644 --- a/drivers/staging/rt2860/usb_main_dev.c +++ b/drivers/staging/rt2860/usb_main_dev.c @@ -216,10 +216,6 @@ static int rt2870_suspend(struct usb_interface *intf, pm_message_t state); static int rt2870_resume(struct usb_interface *intf); #endif /* CONFIG_PM // */ -static int rtusb_probe(struct usb_interface *intf, - const struct usb_device_id *id); -static void rtusb_disconnect(struct usb_interface *intf); - static BOOLEAN USBDevConfigInit(IN struct usb_device *dev, IN struct usb_interface *intf, struct rt_rtmp_adapter *pAd) -- 1.7.0.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Simon Horman <horms@verge.net.au> Remove compatibility code as this is not an older version of the kernel. Signed-off-by: Simon Horman <horms@verge.net.au> Cc: Scott Smedley <ss@aao.gov.au> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/dt3155/allocator.c | 3 +- drivers/staging/dt3155/dt3155_drv.c | 115 +----- drivers/staging/dt3155/dt3155_drv.h | 5 - drivers/staging/dt3155/dt3155_isr.c | 41 +-- drivers/staging/dt3155/pci-compat.h | 97 ---- drivers/staging/dt3155/sysdep.h | 820 ----------------------------------- 6 files changed, 8 insertions(+), 1073 deletions(-) delete mode 100644 drivers/staging/dt3155/pci-compat.h delete mode 100644 drivers/staging/dt3155/sysdep.h diff --git a/drivers/staging/dt3155/allocator.c b/drivers/staging/dt3155/allocator.c index c1b8544..4983c93 100644 --- a/drivers/staging/dt3155/allocator.c +++ b/drivers/staging/dt3155/allocator.c @@ -54,11 +54,10 @@ #include <linux/errno.h> #include <linux/types.h> #include <linux/mm.h> /* PAGE_ALIGN() */ +#include <linux/io.h> #include <asm/page.h> -#include "sysdep.h" - /*#define ALL_DEBUG*/ #define ALL_MSG "allocator: " diff --git a/drivers/staging/dt3155/dt3155_drv.c b/drivers/staging/dt3155/dt3155_drv.c index 950956c..6b40d42 100644 --- a/drivers/staging/dt3155/dt3155_drv.c +++ b/drivers/staging/dt3155/dt3155_drv.c @@ -59,13 +59,10 @@ extern void printques(int); #ifdef MODULE #include <linux/module.h> -#include <linux/version.h> #include <linux/interrupt.h> -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,10) MODULE_LICENSE("GPL"); -#endif #endif @@ -105,11 +102,7 @@ int dt3155_errno = 0; #endif /* wait queue for interrupts */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,1) wait_queue_head_t dt3155_read_wait_queue[ MAXBOARDS ]; -#else -struct wait_queue *dt3155_read_wait_queue[ MAXBOARDS ]; -#endif #define DT_3155_SUCCESS 0 #define DT_3155_FAILURE -EIO @@ -186,11 +179,7 @@ static ...
From: C yp <cyp561@gmail.com> Also removed an extra semicolon. Signed-off-by: Cyp <cyp561@gmail.com> Cc: Nitin Gupta <ngupta@vflare.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/ramzswap/Kconfig | 2 +- drivers/staging/ramzswap/ramzswap.txt | 6 +++--- drivers/staging/ramzswap/ramzswap_drv.c | 4 ++-- drivers/staging/ramzswap/ramzswap_drv.h | 6 +++--- drivers/staging/ramzswap/ramzswap_ioctl.h | 4 ++-- drivers/staging/ramzswap/xvmalloc.c | 2 +- drivers/staging/ramzswap/xvmalloc_int.h | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/staging/ramzswap/Kconfig b/drivers/staging/ramzswap/Kconfig index 24e2569..127b3c6 100644 --- a/drivers/staging/ramzswap/Kconfig +++ b/drivers/staging/ramzswap/Kconfig @@ -5,7 +5,7 @@ config RAMZSWAP select LZO_DECOMPRESS default n help - Creates virtual block devices which can be used (only) as a swap + Creates virtual block devices which can (only) be used as swap disks. Pages swapped to these disks are compressed and stored in memory itself. diff --git a/drivers/staging/ramzswap/ramzswap.txt b/drivers/staging/ramzswap/ramzswap.txt index e9f1619..9694acf 100644 --- a/drivers/staging/ramzswap/ramzswap.txt +++ b/drivers/staging/ramzswap/ramzswap.txt @@ -5,9 +5,9 @@ Project home: http://compcache.googlecode.com/ * Introduction -It creates RAM based block devices which can be used (only) as swap disks. -Pages swapped to these devices are compressed and stored in memory itself. -See project home for use cases, performance numbers and a lot more. +The ramzswap module creates RAM based block devices which can (only) be used as +swap disks. Pages swapped to these devices are compressed and stored in memory +itself. See project home for use cases, performance numbers and a lot more. Individual ramzswap devices are configured and initialized using rzscontrol userspace utility as shown in examples below. ...
From: Simon Horman <horms@verge.net.au>
$ make CONFIG_DEBUG_SECTION_MISMATCH=y
WARNING: drivers/staging/rt2870/rt2870sta.o(.text+0x2f4c5): Section
mismatch in reference from the function rtusb_probe() to the function .devinit.text:rt2870_probe()
The function rtusb_probe() references
the function __devinit rt2870_probe().
This is often because rtusb_probe lacks a __devinit
annotation or the annotation of rt2870_probe is wrong.
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/rt2860/usb_main_dev.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/staging/rt2860/usb_main_dev.c b/drivers/staging/rt2860/usb_main_dev.c
index 925a236..1e6e8a3 100644
--- a/drivers/staging/rt2860/usb_main_dev.c
+++ b/drivers/staging/rt2860/usb_main_dev.c
@@ -296,7 +296,7 @@ static BOOLEAN USBDevConfigInit(IN struct usb_device *dev,
}
-static int rtusb_probe(struct usb_interface *intf,
+static int __devinit rtusb_probe(struct usb_interface *intf,
const struct usb_device_id *id)
{
struct rt_rtmp_adapter *pAd;
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Dan Carpenter <error27@gmail.com>
The check for dio_num_asics is used to determine if there is more than 1 irq.
If it is false then irq[1] is past the end of the array.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/pcmmio.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/staging/comedi/drivers/pcmmio.c b/drivers/staging/comedi/drivers/pcmmio.c
index 35ba939..6ca4105 100644
--- a/drivers/staging/comedi/drivers/pcmmio.c
+++ b/drivers/staging/comedi/drivers/pcmmio.c
@@ -550,7 +550,7 @@ static int pcmmio_attach(struct comedi_device *dev, struct comedi_devconfig *it)
if (irq[0]) {
printk("irq: %u ", irq[0]);
- if (irq[1] && thisboard->dio_num_asics == 2)
+ if (thisboard->dio_num_asics == 2 && irq[1])
printk("second ASIC irq: %u ", irq[1]);
} else {
printk("(IRQ mode disabled) ");
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Dan Carpenter <error27@gmail.com>
medusa_set_videostandard() takes the lock but it always drops it before
returning.
This was found with a static checker and compile tested only. :/
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/cx25821/cx25821-medusa-video.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/cx25821/cx25821-medusa-video.c b/drivers/staging/cx25821/cx25821-medusa-video.c
index 1eb079b..d601620 100644
--- a/drivers/staging/cx25821/cx25821-medusa-video.c
+++ b/drivers/staging/cx25821/cx25821-medusa-video.c
@@ -795,10 +795,8 @@ int medusa_video_init(struct cx25821_dev *dev)
value &= 0xFFFFFFDF;
ret_val = cx25821_i2c_write(&dev->i2c_bus[0], MON_A_CTRL, value);
- if (ret_val < 0) {
- mutex_unlock(&dev->lock);
+ if (ret_val < 0)
return -EINVAL;
- }
mutex_unlock(&dev->lock);
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Dan Carpenter <error27@gmail.com> The INPUT(n) macro indexes an array of size 2. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/cx25821/cx25821-video.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/staging/cx25821/cx25821-video.c b/drivers/staging/cx25821/cx25821-video.c index c7c14c7..6e710ae 100644 --- a/drivers/staging/cx25821/cx25821-video.c +++ b/drivers/staging/cx25821/cx25821-video.c @@ -876,7 +876,7 @@ int cx25821_enum_input(struct cx25821_dev *dev, struct v4l2_input *i) dprintk(1, "%s()\n", __func__); n = i->index; - if (n > 2) + if (n >= 2) return -EINVAL; if (0 == INPUT(n)->type) -- 1.7.0.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Dan Carpenter <error27@gmail.com>
A 33 char ESSID is too long and it could cause a buffer overflow
a couple lines below when we put a NULL terminator on the end.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/otus/ioctl.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/staging/otus/ioctl.c b/drivers/staging/otus/ioctl.c
index 6808e69..86d9333 100644
--- a/drivers/staging/otus/ioctl.c
+++ b/drivers/staging/otus/ioctl.c
@@ -930,7 +930,7 @@ int usbdrvwext_siwessid(struct net_device *dev,
return -EINVAL;
if (essid->flags == 1) {
- if (essid->length > (IW_ESSID_MAX_SIZE + 1))
+ if (essid->length > IW_ESSID_MAX_SIZE)
return -E2BIG;
if (copy_from_user(&EssidBuf, essid->pointer, essid->length))
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: H Hartley Sweeten <hartleys@visionengravers.com> Trivial, use the %pM kernel extension to display the MAC address. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Olaf Hartmann <o.hartmann@telovital.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/et131x/et131x_netdev.c | 8 ++------ 1 files changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/staging/et131x/et131x_netdev.c b/drivers/staging/et131x/et131x_netdev.c index 24d97b4..c63032f 100644 --- a/drivers/staging/et131x/et131x_netdev.c +++ b/drivers/staging/et131x/et131x_netdev.c @@ -674,12 +674,8 @@ int et131x_set_mac_addr(struct net_device *netdev, void *new_mac) memcpy(netdev->dev_addr, address->sa_data, netdev->addr_len); - printk(KERN_INFO - "%s: Setting MAC address to %02x:%02x:%02x:%02x:%02x:%02x\n", - netdev->name, - netdev->dev_addr[0], netdev->dev_addr[1], - netdev->dev_addr[2], netdev->dev_addr[3], - netdev->dev_addr[4], netdev->dev_addr[5]); + printk(KERN_INFO "%s: Setting MAC address to %pM\n", + netdev->name, netdev->dev_addr); /* Free Rx DMA memory */ et131x_adapter_memory_free(adapter); -- 1.7.0.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: H Hartley Sweeten <hartleys@visionengravers.com>
Trivial, use the %pM kernel extension to display the MAC address.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/rtl8192e/r8192E_core.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/rtl8192e/r8192E_core.c b/drivers/staging/rtl8192e/r8192E_core.c
index d310528..50c7602 100644
--- a/drivers/staging/rtl8192e/r8192E_core.c
+++ b/drivers/staging/rtl8192e/r8192E_core.c
@@ -2814,10 +2814,7 @@ static void rtl8192_read_eeprom_info(struct net_device* dev)
memcpy(dev->dev_addr, bMac_Tmp_Addr, 6);
}
- RT_TRACE(COMP_INIT, "Permanent Address = %02x-%02x-%02x-%02x-%02x-%02x\n",
- dev->dev_addr[0], dev->dev_addr[1],
- dev->dev_addr[2], dev->dev_addr[3],
- dev->dev_addr[4], dev->dev_addr[5]);
+ RT_TRACE(COMP_INIT, "Permanent Address = %pM\n", dev->dev_addr);
//2 TX Power Check EEPROM Fail or not
if(priv->card_8192_version > VERSION_8190_BD) {
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman <gregkh@suse.de>
The HV core mucks around with specific irqs and other low-level stuff
and takes forever to determine that it really shouldn't be running on a
machine. So instead, trigger off of the DMI system information and
error out much sooner. This also allows the module loading tools to
recognize that this code should be loaded on this type of system.
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/hv/vmbus_drv.c | 21 +++++++++++++++++----
1 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
index 186cbe6..2c90619 100644
--- a/drivers/staging/hv/vmbus_drv.c
+++ b/drivers/staging/hv/vmbus_drv.c
@@ -25,6 +25,7 @@
#include <linux/interrupt.h>
#include <linux/sysctl.h>
#include <linux/pci.h>
+#include <linux/dmi.h>
#include "VersionInfo.h"
#include "osd.h"
#include "logging.h"
@@ -948,6 +949,19 @@ static irqreturn_t vmbus_isr(int irq, void *dev_id)
}
}
+static struct dmi_system_id __initdata microsoft_hv_dmi_table[] = {
+ {
+ .ident = "Hyper-V",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Virtual Machine"),
+ DMI_MATCH(DMI_BOARD_NAME, "Virtual Machine"),
+ },
+ },
+ { },
+};
+MODULE_DEVICE_TABLE(dmi, microsoft_hv_dmi_table);
+
static int __init vmbus_init(void)
{
int ret = 0;
@@ -959,6 +973,9 @@ static int __init vmbus_init(void)
vmbus_loglevel, HIWORD(vmbus_loglevel), LOWORD(vmbus_loglevel));
/* Todo: it is used for loglevel, to be ported to new kernel. */
+ if (!dmi_check_system(microsoft_hv_dmi_table))
+ return -ENODEV;
+
ret = vmbus_bus_init(VmbusInitialize);
DPRINT_EXIT(VMBUS_DRV);
@@ -980,10 +997,6 @@ static void __exit vmbus_exit(void)
* needed by distro tools to determine if the hyperv drivers should be
...From: H Hartley Sweeten <hartleys@visionengravers.com>
Trivial, use the %pM kernel extension to display the MAC address.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Forest Bond <forest@alittletooquiet.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/vt6655/device_main.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c
index 0db8d7b..ddf3aa0 100644
--- a/drivers/staging/vt6655/device_main.c
+++ b/drivers/staging/vt6655/device_main.c
@@ -1105,10 +1105,7 @@ static void device_print_info(PSDevice pDevice)
struct net_device* dev=pDevice->dev;
DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "%s: %s\n",dev->name, get_chip_name(pDevice->chip_id));
- DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "%s: MAC=%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X",
- dev->name,
- dev->dev_addr[0],dev->dev_addr[1],dev->dev_addr[2],
- dev->dev_addr[3],dev->dev_addr[4],dev->dev_addr[5]);
+ DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "%s: MAC=%pM", dev->name, dev->dev_addr);
#ifdef IO_MAP
DBG_PRT(MSG_LEVEL_INFO, KERN_INFO" IO=0x%lx ",(ULONG) pDevice->ioaddr);
DBG_PRT(MSG_LEVEL_INFO, KERN_INFO" IRQ=%d \n", pDevice->dev->irq);
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Dan Carpenter <error27@gmail.com>
There was a buffer overflow in the original code. rf_path was 2 and it should
have been only 0 or 1.
I don't have the hardware for this, so I can't test it.
Looking at the code, there are two almost identical sections for updating the
hal variables. The first one was clearly wrong and had the array overflow as
well. The second one looked correct. I decided to use the second section as
is except for whitespace changes.
The differences between the two original sections:
1) The second one had more debug output.
2) The second one looped over rf_path instead of corrupting data.
3) The second one had these additional assigments.
if (rf_path == 0) {
priv->TxPowerLevelOFDM24G[i] = priv->RfTxPwrLevelOfdm1T[rf_path][i] ;
priv->TxPowerLevelCCK[i] = priv->RfTxPwrLevelCck[rf_path][i];
}
Signed-off-by: Dan Carpenter <error27@gmail.com>
Cc: Jerry chuang <wlanfae@realtek.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/rtl8192su/r8192U_core.c | 127 +++++++++++--------------------
1 files changed, 43 insertions(+), 84 deletions(-)
diff --git a/drivers/staging/rtl8192su/r8192U_core.c b/drivers/staging/rtl8192su/r8192U_core.c
index 27c45fb..f15be1e 100644
--- a/drivers/staging/rtl8192su/r8192U_core.c
+++ b/drivers/staging/rtl8192su/r8192U_core.c
@@ -3359,6 +3359,46 @@ u8 rtl8192SU_BoardTypeToRFtype(struct net_device* dev, u8 Boardtype)
return RFtype;
}
+void update_hal_variables(struct r8192_priv *priv)
+{
+ int rf_path;
+ int i;
+ u8 index;
+
+ for (rf_path = 0; rf_path < 2; rf_path++) {
+ for (i = 0; i < 3; i++) {
+ RT_TRACE((COMP_INIT), "CCK RF-%d CHan_Area-%d = 0x%x\n", rf_path, i, priv->RfCckChnlAreaTxPwr[rf_path][i]);
+ RT_TRACE((COMP_INIT), "OFDM-1T RF-%d CHan_Area-%d = 0x%x\n", rf_path, i, priv->RfOfdmChnlAreaTxPwr1T[rf_path][i]);
+ RT_TRACE((COMP_INIT), "OFDM-2T RF-%d ...From: Simon Horman <horms@verge.net.au>
The use of pci_find_device() is deprecated.
Signed-off-by: Simon Horman <horms@verge.net.au>
Cc: Scott Smedley <ss@aao.gov.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/dt3155/dt3155_drv.c | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/dt3155/dt3155_drv.c b/drivers/staging/dt3155/dt3155_drv.c
index 3efdeb9..950956c 100644
--- a/drivers/staging/dt3155/dt3155_drv.c
+++ b/drivers/staging/dt3155/dt3155_drv.c
@@ -963,7 +963,7 @@ static int find_PCI (void)
unsigned long base;
unsigned char irq;
- while ((pci_dev = pci_find_device
+ while ((pci_dev = pci_get_device
(DT3155_VENDORID, DT3155_DEVICEID, pci_dev)) != NULL)
{
pci_index ++;
@@ -983,7 +983,7 @@ static int find_PCI (void)
"for %d devices\n"
"DT3155: Please change MAXBOARDS in dt3155.h\n",
pci_index, MAXBOARDS);
- return DT_3155_FAILURE;
+ goto err;
}
/* Now, just go out and make sure that this/these device(s) is/are
@@ -992,7 +992,7 @@ static int find_PCI (void)
(u_int *) &base)))
{
printk("DT3155: Was not able to find device \n");
- return DT_3155_FAILURE;
+ goto err;
}
DT_3155_DEBUG_MSG("DT3155: Base address 0 for device is %lx \n", base);
@@ -1007,13 +1007,13 @@ static int find_PCI (void)
if ( !dt3155_lbase[pci_index-1] )
{
printk("DT3155: Unable to remap control registers\n");
- return DT_3155_FAILURE;
+ goto err;
}
if ( (error = pci_read_config_byte( pci_dev, PCI_INTERRUPT_LINE, &irq)) )
{
printk("DT3155: Was not able to find device \n");
- return DT_3155_FAILURE;
+ goto err;
}
DT_3155_DEBUG_MSG("DT3155: IRQ is %d \n",irq);
@@ -1029,6 +1029,10 @@ static int find_PCI (void)
ndevices = pci_index;
return DT_3155_SUCCESS;
+
+err:
+ pci_dev_put(pci_dev);
+ return DT_3155_FAILURE;
}
u_long allocatorAddr = ...From: Simon Horman <horms@verge.net.au>
ieee80211_crypto_tkip_exit(), ieee80211_crypto_deinit() and
ieee80211_crypto_ccmp_exit() are called by ieee80211_rtl_init()
which are in section __init, so they can't be in section __exit.
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
.../staging/rtl8192e/ieee80211/ieee80211_crypt.c | 2 +-
.../rtl8192e/ieee80211/ieee80211_crypt_ccmp.c | 2 +-
.../rtl8192e/ieee80211/ieee80211_crypt_tkip.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211_crypt.c b/drivers/staging/rtl8192e/ieee80211/ieee80211_crypt.c
index b1c5493..b3c9bf4 100644
--- a/drivers/staging/rtl8192e/ieee80211/ieee80211_crypt.c
+++ b/drivers/staging/rtl8192e/ieee80211/ieee80211_crypt.c
@@ -225,7 +225,7 @@ out:
}
-void __exit ieee80211_crypto_deinit(void)
+void ieee80211_crypto_deinit(void)
{
struct list_head *ptr, *n;
diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_ccmp.c b/drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_ccmp.c
index d5fe94d..1776f7e 100644
--- a/drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_ccmp.c
+++ b/drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_ccmp.c
@@ -524,7 +524,7 @@ int __init ieee80211_crypto_ccmp_init(void)
}
-void __exit ieee80211_crypto_ccmp_exit(void)
+void ieee80211_crypto_ccmp_exit(void)
{
ieee80211_unregister_crypto_ops(&ieee80211_crypt_ccmp);
}
diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_tkip.c b/drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_tkip.c
index 7056d93..03cb21e 100644
--- a/drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_tkip.c
+++ b/drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_tkip.c
@@ -1012,7 +1012,7 @@ int __init ieee80211_crypto_tkip_init(void)
}
-void __exit ieee80211_crypto_tkip_exit(void)
+void ieee80211_crypto_tkip_exit(void)
{
...From: Roel Kluin <roel.kluin@gmail.com>
This always evaluates to true.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/otus/80211core/cmmsta.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/staging/otus/80211core/cmmsta.c b/drivers/staging/otus/80211core/cmmsta.c
index a11d559..5c0dea7 100644
--- a/drivers/staging/otus/80211core/cmmsta.c
+++ b/drivers/staging/otus/80211core/cmmsta.c
@@ -2808,7 +2808,7 @@ void zfStaProcessProbeReq(zdev_t* dev, zbuf_t* buf, u16_t* src)
zmw_get_wlan_dev(dev);
/* check mode : AP/IBSS */
- if ((wd->wlanMode != ZM_MODE_AP) || (wd->wlanMode != ZM_MODE_IBSS))
+ if ((wd->wlanMode != ZM_MODE_AP) && (wd->wlanMode != ZM_MODE_IBSS))
{
zm_msg0_mm(ZM_LV_3, "Ignore probe req");
return;
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman <gregkh@suse.de>
This allows the HV core to be properly found and autoloaded
by the system tools.
It uses the Microsoft virtual VGA device to trigger this.
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/hv/vmbus_drv.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
index de8729d..186cbe6 100644
--- a/drivers/staging/hv/vmbus_drv.c
+++ b/drivers/staging/hv/vmbus_drv.c
@@ -24,6 +24,7 @@
#include <linux/irq.h>
#include <linux/interrupt.h>
#include <linux/sysctl.h>
+#include <linux/pci.h>
#include "VersionInfo.h"
#include "osd.h"
#include "logging.h"
@@ -974,6 +975,22 @@ static void __exit vmbus_exit(void)
return;
}
+/*
+ * We use a PCI table to determine if we should autoload this driver This is
+ * needed by distro tools to determine if the hyperv drivers should be
+ * installed and/or configured. We don't do anything else with the table, but
+ * it needs to be present.
+ *
+ * We might consider triggering off of DMI table info as well, as that does
+ * decribe the virtual machine being run on, but not all configuration tools
+ * seem to be able to handle DMI device ids properly.
+ */
+const static struct pci_device_id microsoft_hv_pci_table[] = {
+ { PCI_DEVICE(0x1414, 0x5353) }, /* VGA compatible controller */
+ { 0 }
+};
+MODULE_DEVICE_TABLE(pci, microsoft_hv_pci_table);
+
MODULE_LICENSE("GPL");
MODULE_VERSION(HV_DRV_VERSION);
module_param(vmbus_irq, int, S_IRUGO);
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Dan Carpenter <error27@gmail.com>
Changed > to >= to avoid array overflow.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/comedi_bond.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/staging/comedi/drivers/comedi_bond.c b/drivers/staging/comedi/drivers/comedi_bond.c
index cf39a24..d7260cc 100644
--- a/drivers/staging/comedi/drivers/comedi_bond.c
+++ b/drivers/staging/comedi/drivers/comedi_bond.c
@@ -417,7 +417,7 @@ static int doDevConfig(struct comedi_device *dev, struct comedi_devconfig *it)
int sdev = -1, nchans, tmp;
struct BondedDevice *bdev = NULL;
- if (minor < 0 || minor > COMEDI_NUM_BOARD_MINORS) {
+ if (minor < 0 || minor >= COMEDI_NUM_BOARD_MINORS) {
ERROR("Minor %d is invalid!\n", minor);
return 0;
}
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Simon Horman <horms@verge.net.au>
sizeof() returns a size_t but the other types involved
are unsigned long, so using min() results in a warning.
As sizeof() is called on an 11 character buffer defined
immediately above unsigned long is obviously wide enough
for the result.
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
.../staging/rtl8192su/ieee80211/ieee80211_module.c | 2 +-
.../staging/rtl8192u/ieee80211/ieee80211_module.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8192su/ieee80211/ieee80211_module.c b/drivers/staging/rtl8192su/ieee80211/ieee80211_module.c
index e8c67d5..c024fa6 100644
--- a/drivers/staging/rtl8192su/ieee80211/ieee80211_module.c
+++ b/drivers/staging/rtl8192su/ieee80211/ieee80211_module.c
@@ -262,7 +262,7 @@ static int store_debug_level(struct file *file, const char *buffer,
unsigned long count, void *data)
{
char buf[] = "0x00000000";
- unsigned long len = min(sizeof(buf) - 1, count);
+ unsigned long len = min_t(unsigned long, sizeof(buf) - 1, count);
char *p = (char *)buf;
unsigned long val;
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_module.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_module.c
index 7a8690f..b752017 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_module.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_module.c
@@ -260,7 +260,7 @@ static int store_debug_level(struct file *file, const char *buffer,
unsigned long count, void *data)
{
char buf[] = "0x00000000";
- unsigned long len = min(sizeof(buf) - 1, count);
+ unsigned long len = min_t(unsigned long, sizeof(buf) - 1, count);
char *p = (char *)buf;
unsigned long val;
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Alan Cox <alan@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/sep/sep_driver.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/sep/sep_driver.c b/drivers/staging/sep/sep_driver.c
index e7bc9ec..a5d65b9 100644
--- a/drivers/staging/sep/sep_driver.c
+++ b/drivers/staging/sep/sep_driver.c
@@ -35,6 +35,7 @@
#include <linux/cdev.h>
#include <linux/kdev_t.h>
#include <linux/mutex.h>
+#include <linux/sched.h>
#include <linux/mm.h>
#include <linux/poll.h>
#include <linux/wait.h>
@@ -273,8 +274,8 @@ static dma_addr_t sep_shared_virt_to_bus(struct sep_device *sep,
void *virt_address)
{
dma_addr_t pa = sep->shared_bus + (virt_address - sep->shared_addr);
- edbg("sep: virt to bus b %08llx v %p\n",
- (unsigned long long)pa, virt_address);
+ edbg("sep: virt to bus b %08llx v %p\n", (unsigned long long) pa,
+ virt_address);
return pa;
}
@@ -1771,7 +1772,7 @@ static struct sep_flow_context_t *sep_find_flow_context(struct sep_device *sep,
static int sep_create_flow_dma_tables_handler(struct sep_device *sep,
unsigned long arg)
{
- int error;
+ int error = -ENOENT;
struct sep_driver_build_flow_table_t command_args;
/* first table - output */
struct sep_lli_entry_t first_table_data;
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: H Hartley Sweeten <hartleys@visionengravers.com> Trivial, use the %pM kernel extension to display the MAC address. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/rtl8192su/r8192U_core.c | 14 ++++++-------- 1 files changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/staging/rtl8192su/r8192U_core.c b/drivers/staging/rtl8192su/r8192U_core.c index ecfa91b..27c45fb 100644 --- a/drivers/staging/rtl8192su/r8192U_core.c +++ b/drivers/staging/rtl8192su/r8192U_core.c @@ -3426,10 +3426,9 @@ rtl8192SU_ConfigAdapterInfo8192SForAutoLoadFail(struct net_device* dev) write_nic_dword(dev, IDR0, ((u32*)dev->dev_addr)[0]); write_nic_word(dev, IDR4, ((u16*)(dev->dev_addr + 4))[0]); - RT_TRACE(COMP_INIT, "ReadAdapterInfo8192SEFuse(), Permanent Address = %02x-%02x-%02x-%02x-%02x-%02x\n", - dev->dev_addr[0], dev->dev_addr[1], - dev->dev_addr[2], dev->dev_addr[3], - dev->dev_addr[4], dev->dev_addr[5]); + RT_TRACE(COMP_INIT, + "ReadAdapterInfo8192SEFuse(), Permanent Address = %pM\n", + dev->dev_addr); priv->EEPROMBoardType = EEPROM_Default_BoardType; priv->rf_type = RF_1T2R; //RF_2T2R @@ -3767,10 +3766,9 @@ rtl8192SU_ReadAdapterInfo8192SUsb(struct net_device* dev) write_nic_dword(dev, IDR0, ((u32*)dev->dev_addr)[0]); write_nic_word(dev, IDR4, ((u16*)(dev->dev_addr + 4))[0]); - RT_TRACE(COMP_INIT, "ReadAdapterInfo8192SEFuse(), Permanent Address = %02x-%02x-%02x-%02x-%02x-%02x\n", - dev->dev_addr[0], dev->dev_addr[1], - dev->dev_addr[2], dev->dev_addr[3], - dev->dev_addr[4], dev->dev_addr[5]); + RT_TRACE(COMP_INIT, + "ReadAdapterInfo8192SEFuse(), Permanent Address = %pM\n", + dev->dev_addr); // // Get CustomerID(Boad Type) -- 1.7.0.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Alan Cox <alan@linux.intel.com>
SEP doesn't need lock_kernel.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/sep/sep_driver.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/sep/sep_driver.c b/drivers/staging/sep/sep_driver.c
index a5d65b9..92fa186 100644
--- a/drivers/staging/sep/sep_driver.c
+++ b/drivers/staging/sep/sep_driver.c
@@ -2233,7 +2233,7 @@ static int sep_set_flow_id_handler(struct sep_device *sep,
return error;
}
-static int sep_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg)
+static long sep_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
{
int error = 0;
struct sep_device *sep = filp->private_data;
@@ -2608,7 +2608,7 @@ static dev_t sep_devno;
/* the files operations structure of the driver */
static struct file_operations sep_file_operations = {
.owner = THIS_MODULE,
- .ioctl = sep_ioctl,
+ .unlocked_ioctl = sep_ioctl,
.poll = sep_poll,
.open = sep_open,
.release = sep_release,
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Joe Perches <joe@perches.com>
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/pohmelfs/inode.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/pohmelfs/inode.c b/drivers/staging/pohmelfs/inode.c
index f69b778..e286fd1 100644
--- a/drivers/staging/pohmelfs/inode.c
+++ b/drivers/staging/pohmelfs/inode.c
@@ -1767,8 +1767,7 @@ static int pohmelfs_show_stats(struct seq_file *m, struct vfsmount *mnt)
seq_printf(m, "%u ", ctl->idx);
if (ctl->addr.sa_family == AF_INET) {
struct sockaddr_in *sin = (struct sockaddr_in *)&st->ctl.addr;
- /* seq_printf(m, "%pi4:%u", &sin->sin_addr.s_addr, ntohs(sin->sin_port)); */
- seq_printf(m, "%u.%u.%u.%u:%u", NIPQUAD(sin->sin_addr.s_addr), ntohs(sin->sin_port));
+ seq_printf(m, "%pI4:%u", &sin->sin_addr.s_addr, ntohs(sin->sin_port));
} else if (ctl->addr.sa_family == AF_INET6) {
struct sockaddr_in6 *sin = (struct sockaddr_in6 *)&st->ctl.addr;
seq_printf(m, "%pi6:%u", &sin->sin6_addr, ntohs(sin->sin6_port));
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Benjamin Adolphi <b.adolphi@googlemail.com>
This fixes all coding style issues and some spelling mistakes.
Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/rar/rar_driver.c | 132 ++++++++++++++++++-------------------
drivers/staging/rar/rar_driver.h | 68 ++++++++-----------
2 files changed, 93 insertions(+), 107 deletions(-)
diff --git a/drivers/staging/rar/rar_driver.c b/drivers/staging/rar/rar_driver.c
index d85d189..b91a90f 100644
--- a/drivers/staging/rar/rar_driver.c
+++ b/drivers/staging/rar/rar_driver.c
@@ -68,7 +68,8 @@ static void __exit rar_exit_handler(void);
/*
function that is activated on the successfull probe of the RAR device
*/
-static int __devinit rar_probe(struct pci_dev *pdev, const struct pci_device_id *ent);
+static int __devinit rar_probe(struct pci_dev *pdev,
+ const struct pci_device_id *ent);
static struct pci_device_id rar_pci_id_tbl[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4110) },
@@ -86,9 +87,9 @@ static struct pci_driver rar_pci_driver = {
/* This function is used to retrieved RAR info using the IPC message
bus interface */
-static int memrar_get_rar_addr(struct pci_dev* pdev,
- int offset,
- u32 *addr)
+static int memrar_get_rar_addr(struct pci_dev *pdev,
+ int offset,
+ u32 *addr)
{
/*
* ======== The Lincroft Message Bus Interface ========
@@ -140,29 +141,29 @@ static int memrar_get_rar_addr(struct pci_dev* pdev,
| (offset << 8)
| (LNC_MESSAGE_BYTE_WRITE_ENABLES << 4);
- printk(KERN_WARNING "rar- offset to LNC MSG is %x\n",offset);
+ printk(KERN_WARNING "rar- offset to LNC MSG is %x\n", offset);
if (addr == 0)
return -EINVAL;
/* Send the control message */
result = pci_write_config_dword(pdev,
- LNC_MCR_OFFSET,
- ...From: Dan Carpenter <error27@gmail.com>
err_out_put is for when the netfs_trans_alloc() succeeded.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/pohmelfs/inode.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/staging/pohmelfs/inode.c b/drivers/staging/pohmelfs/inode.c
index e286fd1..6a978c8 100644
--- a/drivers/staging/pohmelfs/inode.c
+++ b/drivers/staging/pohmelfs/inode.c
@@ -322,7 +322,7 @@ int pohmelfs_write_create_inode(struct pohmelfs_inode *pi)
t = netfs_trans_alloc(psb, err + 1, 0, 0);
if (!t) {
err = -ENOMEM;
- goto err_out_put;
+ goto err_out_exit;
}
t->complete = pohmelfs_write_inode_complete;
t->private = igrab(inode);
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Evgeniy Polyakov <zbr@ioremap.net>
Since pohmelfs isn't tied to a single block device, it needs to setup a
backing dev like nfs/btrfs/etc do.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/pohmelfs/inode.c | 20 ++++++++++++++++++--
drivers/staging/pohmelfs/netfs.h | 3 +++
2 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/pohmelfs/inode.c b/drivers/staging/pohmelfs/inode.c
index 6a978c8..eec3798 100644
--- a/drivers/staging/pohmelfs/inode.c
+++ b/drivers/staging/pohmelfs/inode.c
@@ -36,6 +36,7 @@
#define POHMELFS_MAGIC_NUM 0x504f482e
static struct kmem_cache *pohmelfs_inode_cache;
+static atomic_t psb_bdi_num = ATOMIC_INIT(0);
/*
* Removes inode from all trees, drops local name cache and removes all queued
@@ -1331,6 +1332,8 @@ static void pohmelfs_put_super(struct super_block *sb)
pohmelfs_crypto_exit(psb);
pohmelfs_state_exit(psb);
+ bdi_destroy(&psb->bdi);
+
kfree(psb);
sb->s_fs_info = NULL;
}
@@ -1814,11 +1817,22 @@ static int pohmelfs_fill_super(struct super_block *sb, void *data, int silent)
if (!psb)
goto err_out_exit;
+ err = bdi_init(&psb->bdi);
+ if (err)
+ goto err_out_free_sb;
+
+ err = bdi_register(&psb->bdi, NULL, "pfs-%d", atomic_inc_return(&psb_bdi_num));
+ if (err) {
+ bdi_destroy(&psb->bdi);
+ goto err_out_free_sb;
+ }
+
sb->s_fs_info = psb;
sb->s_op = &pohmelfs_sb_ops;
sb->s_magic = POHMELFS_MAGIC_NUM;
sb->s_maxbytes = MAX_LFS_FILESIZE;
sb->s_blocksize = PAGE_SIZE;
+ sb->s_bdi = &psb->bdi;
psb->sb = sb;
@@ -1862,11 +1876,11 @@ static int pohmelfs_fill_super(struct super_block *sb, void *data, int silent)
err = pohmelfs_parse_options((char *) data, psb, 0);
if (err)
- goto err_out_free_sb;
+ goto err_out_free_bdi;
err = pohmelfs_copy_crypto(psb);
if (err)
- goto ...From: Andrew Lunn <andrew@lunn.ch> The module now only compiles inside mainline, so remove the comments about different versions of the kernel it can be used with. Also update comments about building with debug enabled and how to use the VIS data now that it no longer natively outputs dot or JSON. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/batman-adv/README | 50 +++++++++--------------------------- 1 files changed, 13 insertions(+), 37 deletions(-) diff --git a/drivers/staging/batman-adv/README b/drivers/staging/batman-adv/README index 2bedcbe..7d666ad 100644 --- a/drivers/staging/batman-adv/README +++ b/drivers/staging/batman-adv/README @@ -1,4 +1,4 @@ -[state: 13-12-2009] +[state: 06-01-2010] BATMAN-ADV ---------- @@ -15,19 +15,6 @@ above B.A.T.M.A.N. Advanced, prominent examples are: IPv4, IPv6, DHCP, IPX. This is batman-advanced implemented as Linux kernel driver. It does not depend on any network (other) driver, and can be used on wifi as well as ethernet, vpn, etc ... (anything with ethernet-style layer 2). -It compiles against and should work with Linux 2.6.20 - 2.6.32. Supporting older -versions is not planned, but it's probably easy to backport it. If you work on a -backport, feel free to contact us. :-) - -COMPILE -------- -To compile against your currently installed kernel, just type: - -# make - -if you want to compile against some other kernel, use: - -# make KERNELPATH=/path/to/kernel USAGE ----- @@ -73,16 +60,9 @@ When configured as server, you can get a topology snapshot of your mesh: # cat /proc/net/batman-adv/vis -This output format is a graphviz formatted text file which can be -processed with graphviz-tools like dot. -The labels are similar/compatible to the ETX metric, 1.0 means perfect -connection (100%), 2.0 means 50%, 3.0 means 33% and so on. - -Alternatively, a JSON output format is available. The format can be set -using by writing ...
From: Roel Kluin <roel.kluin@gmail.com>
`!' has a higher precedence than `&' so parentheses are required.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/vt6655/iwctl.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/staging/vt6655/iwctl.c b/drivers/staging/vt6655/iwctl.c
index 108830f..78b4983 100644
--- a/drivers/staging/vt6655/iwctl.c
+++ b/drivers/staging/vt6655/iwctl.c
@@ -1472,7 +1472,7 @@ if((wrq->flags & IW_ENCODE_DISABLED)==0){
if ( index < 4 ) {
pDevice->byKeyIndex = index;
}
- else if(!wrq->flags & IW_ENCODE_MODE) {
+ else if(!(wrq->flags & IW_ENCODE_MODE)) {
rc = -EINVAL;
return rc;
}
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Alexander Beregalov <a.beregalov@gmail.com>
Assign dev only if fh is not NULL.
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/cx25821/cx25821-audups11.c | 3 ++-
drivers/staging/cx25821/cx25821-video.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/cx25821/cx25821-audups11.c b/drivers/staging/cx25821/cx25821-audups11.c
index 89c8fe2..46c7f78 100644
--- a/drivers/staging/cx25821/cx25821-audups11.c
+++ b/drivers/staging/cx25821/cx25821-audups11.c
@@ -343,10 +343,11 @@ static int vidioc_s_ctrl(struct file *file, void *priv,
struct v4l2_control *ctl)
{
struct cx25821_fh *fh = priv;
- struct cx25821_dev *dev = fh->dev;
+ struct cx25821_dev *dev;
int err;
if (fh) {
+ dev = fh->dev;
err = v4l2_prio_check(&dev->prio, &fh->prio);
if (0 != err)
return err;
diff --git a/drivers/staging/cx25821/cx25821-video.c b/drivers/staging/cx25821/cx25821-video.c
index 6e710ae..8cd3986 100644
--- a/drivers/staging/cx25821/cx25821-video.c
+++ b/drivers/staging/cx25821/cx25821-video.c
@@ -963,10 +963,11 @@ int cx25821_set_freq(struct cx25821_dev *dev, struct v4l2_frequency *f)
int vidioc_s_frequency(struct file *file, void *priv, struct v4l2_frequency *f)
{
struct cx25821_fh *fh = priv;
- struct cx25821_dev *dev = fh->dev;
+ struct cx25821_dev *dev;
int err;
if (fh) {
+ dev = fh->dev;
err = v4l2_prio_check(&dev->prio, &fh->prio);
if (0 != err)
return err;
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Peter Huewe <peterhuewe@gmx.de>
This patch adds a NULL test to check wether kmalloc was successful or
not.
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/asus_oled/asus_oled.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/drivers/staging/asus_oled/asus_oled.c b/drivers/staging/asus_oled/asus_oled.c
index 0c1fb0d..c597fb2 100644
--- a/drivers/staging/asus_oled/asus_oled.c
+++ b/drivers/staging/asus_oled/asus_oled.c
@@ -430,6 +430,11 @@ static ssize_t odev_set_picture(struct asus_oled_dev *odev,
kfree(odev->buf);
odev->buf = kmalloc(odev->buf_size, GFP_KERNEL);
+ if (odev->buf == NULL) {
+ odev->buf_size = 0;
+ printk(ASUS_OLED_ERROR "Out of memory!\n");
+ return -ENOMEM;
+ }
memset(odev->buf, 0xff, odev->buf_size);
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Peter Huewe <peterhuewe@gmx.de> Without WEXT_PRIV set the driver fails to build due to unknown fields in the iw_handler_def struct. Those fields are enclosed in WEXT_PRIV conditionals in the prototype of iw_handler_def in include/net/iw_handler.h Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Acked-by: Simon Horman <horms@verge.net.au> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/otus/Kconfig | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/staging/otus/Kconfig b/drivers/staging/otus/Kconfig index f6cc262..e918134 100644 --- a/drivers/staging/otus/Kconfig +++ b/drivers/staging/otus/Kconfig @@ -1,6 +1,8 @@ config OTUS tristate "Atheros OTUS 802.11n USB wireless support" depends on USB && WLAN && MAC80211 + select WIRELESS_EXT + select WEXT_PRIV default N ---help--- Enable support for Atheros 802.11n USB hardware: -- 1.7.0.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Peter Huewe <peterhuewe@gmx.de> Without WEXT_PRIV set the driver fails to build due to unknown fields in the iw_handler_def struct. Those fields are enclosed in WEXT_PRIV conditionals in the prototype of iw_handler_def in include/net/iw_handler.h Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Acked-by: Simon Horman <horms@verge.net.au> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/rtl8192u/Kconfig | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/staging/rtl8192u/Kconfig b/drivers/staging/rtl8192u/Kconfig index 9913ab8..0439c90 100644 --- a/drivers/staging/rtl8192u/Kconfig +++ b/drivers/staging/rtl8192u/Kconfig @@ -1,6 +1,7 @@ config RTL8192U tristate "RealTek RTL8192U Wireless LAN NIC driver" depends on PCI && WLAN && USB - depends on WIRELESS_EXT + select WIRELESS_EXT + select WEXT_PRIV default N ---help--- -- 1.7.0.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Peter Huewe <peterhuewe@gmx.de> Without WEXT_PRIV set the p80211wext.c fails to build due to unknown fields in the iw_handler_def struct. Those fields are enclosed in WEXT_PRIV conditionals in the prototype of iw_handler_def in include/net/iw_handler.h Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Acked-by: Simon Horman <horms@verge.net.au> Cc: stable <stable@kernel.org> [2.6.33 only] Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/wlan-ng/Kconfig | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/staging/wlan-ng/Kconfig b/drivers/staging/wlan-ng/Kconfig index 704ebd2..82fcc16 100644 --- a/drivers/staging/wlan-ng/Kconfig +++ b/drivers/staging/wlan-ng/Kconfig @@ -2,6 +2,7 @@ config PRISM2_USB tristate "Prism2.5/3 USB driver" depends on WLAN && USB select WIRELESS_EXT + select WEXT_PRIV default n ---help--- This is the wlan-ng prism 2.5/3 USB driver for a wide range of -- 1.7.0.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Jarod Wilson <jarod@redhat.com> I somehow managed to not actually include these two fixes in the submission that was committed to the staging tree. libcrystalhd should eventually be built against the kernel-provided header, and needs the stdint.h include. The VOID bit is to keep things in sync with the Mac OS X driver and library that Scott Davilla is also working on. Signed-off-by: Scott Davilla <davilla@4pi.com> Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/crystalhd/bc_dts_types.h | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/drivers/staging/crystalhd/bc_dts_types.h b/drivers/staging/crystalhd/bc_dts_types.h index e073d74..ac0c817 100644 --- a/drivers/staging/crystalhd/bc_dts_types.h +++ b/drivers/staging/crystalhd/bc_dts_types.h @@ -25,6 +25,10 @@ #ifndef _BC_DTS_TYPES_H_ #define _BC_DTS_TYPES_H_ +#ifdef __LINUX_USER__ // Don't include these for KERNEL.. +#include <stdint.h> +#endif + #if defined(_WIN64) || defined(_WIN32) typedef uint32_t U32; typedef int32_t S32; @@ -62,7 +66,9 @@ typedef int BOOL; typedef uint32_t ULONG; typedef int32_t LONG; typedef void *HANDLE; +#ifndef VOID typedef void VOID; +#endif typedef void *LPVOID; typedef uint32_t DWORD; typedef uint32_t UINT32; -- 1.7.0.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: horms@vergenet.net <horms@vergenet.net> $ gcc (Debian 4.4.2-8) 4.4.2 Copyright (C) 2009 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ make ... drivers/staging/otus/ioctl.c: In function 'usbdrv_wpa_ioctl': drivers/staging/otus/ioctl.c:2253: warning: ISO C90 forbids mixed declarations and code ... Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/otus/ioctl.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/staging/otus/ioctl.c b/drivers/staging/otus/ioctl.c index 86d9333..ebaedb7 100644 --- a/drivers/staging/otus/ioctl.c +++ b/drivers/staging/otus/ioctl.c @@ -2227,7 +2227,8 @@ int usbdrv_wpa_ioctl(struct net_device *dev, struct athr_wlan_param *zdparm) case ZD_CMD_SCAN_REQ: printk(KERN_ERR "usbdrv_wpa_ioctl: ZD_CMD_SCAN_REQ\n"); break; - case ZD_CMD_SET_GENERIC_ELEMENT: + case ZD_CMD_SET_GENERIC_ELEMENT: { + u8_t len, *wpaie; printk(KERN_ERR "usbdrv_wpa_ioctl:" " ZD_CMD_SET_GENERIC_ELEMENT\n"); @@ -2250,8 +2251,8 @@ int usbdrv_wpa_ioctl(struct net_device *dev, struct athr_wlan_param *zdparm) /* zfiWlanSetWpaIe(dev, zdparm->u.generic_elem.data, * zdparm->u.generic_elem.len); */ - u8_t len = zdparm->u.generic_elem.len; - u8_t *wpaie = (u8_t *)zdparm->u.generic_elem.data; + len = zdparm->u.generic_elem.len; + wpaie = zdparm->u.generic_elem.data; printk(KERN_ERR "wd->ap.wpaLen : % d\n", len); @@ -2273,6 +2274,7 @@ int usbdrv_wpa_ioctl(struct net_device *dev, struct athr_wlan_param *zdparm) * #endif */ break; + } /* #ifdef ZM_HOSTAPD_SUPPORT */ case ZD_CMD_GET_TSC: -- 1.7.0.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: horms@vergenet.net <horms@vergenet.net> Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/otus/80211core/cagg.c | 3 +-- drivers/staging/otus/80211core/cfunc.c | 2 -- drivers/staging/otus/80211core/cmm.c | 4 ---- drivers/staging/otus/80211core/cmmsta.c | 5 ----- drivers/staging/otus/80211core/cpsmgr.c | 2 -- drivers/staging/otus/80211core/cscanmgr.c | 2 -- drivers/staging/otus/80211core/ctxrx.c | 5 ----- drivers/staging/otus/80211core/ledmgr.c | 1 - drivers/staging/otus/hal/hpmain.c | 4 ---- drivers/staging/otus/hal/hprw.c | 1 - 10 files changed, 1 insertions(+), 28 deletions(-) diff --git a/drivers/staging/otus/80211core/cagg.c b/drivers/staging/otus/80211core/cagg.c index dbd0a5f..d11661c 100644 --- a/drivers/staging/otus/80211core/cagg.c +++ b/drivers/staging/otus/80211core/cagg.c @@ -1832,8 +1832,7 @@ u16_t zfAggRxClear(zdev_t* dev, u32_t time) struct agg_tid_rx* zfAggRxEnabled(zdev_t* dev, zbuf_t* buf) { - u16_t dst0, src[3], ac, aid, fragOff; - u8_t up; + u16_t dst0, src[3], aid; u16_t offset = 0; u16_t seq_no; u16_t frameType; diff --git a/drivers/staging/otus/80211core/cfunc.c b/drivers/staging/otus/80211core/cfunc.c index d7c49d7..e0a9f38 100644 --- a/drivers/staging/otus/80211core/cfunc.c +++ b/drivers/staging/otus/80211core/cfunc.c @@ -1194,8 +1194,6 @@ u16_t zfFindMinimumUtilizationChannelIndex(zdev_t* dev, u16_t* array, u16_t coun u8_t i; u16_t tempMinIndex, tempMinValue; - zmw_get_wlan_dev(dev); - i = 1; tempMinIndex = 0; tempMinValue = array[tempMinIndex]; diff --git a/drivers/staging/otus/80211core/cmm.c b/drivers/staging/otus/80211core/cmm.c index a6c1b41..484e753 100644 --- a/drivers/staging/otus/80211core/cmm.c +++ b/drivers/staging/otus/80211core/cmm.c @@ -346,8 +346,6 @@ u16_t zfFindSuperGElement(zdev_t* dev, zbuf_t* ...
From: horms@vergenet.net <horms@vergenet.net> Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/otus/hal/hpreg.c | 133 -------------------------------------- 1 files changed, 0 insertions(+), 133 deletions(-) diff --git a/drivers/staging/otus/hal/hpreg.c b/drivers/staging/otus/hal/hpreg.c index d9894fe..178777c 100644 --- a/drivers/staging/otus/hal/hpreg.c +++ b/drivers/staging/otus/hal/hpreg.c @@ -786,45 +786,6 @@ enum { WT1_5760_5800, }; -static REG_DMN_FREQ_BAND regDmn5GhzTurboFreq[] = { - { 5130, 5210, 5, 6, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* T1_5130_5210 */ - { 5250, 5330, 5, 6, 40, 40, DFS_FCC3, NO_PSCAN, 0, 0}, /* T1_5250_5330 */ - { 5370, 5490, 5, 6, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* T1_5370_5490 */ - { 5530, 5650, 5, 6, 40, 40, DFS_FCC3, NO_PSCAN, 0, 0}, /* T1_5530_5650 */ - - { 5150, 5190, 5, 6, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* T1_5150_5190 */ - { 5230, 5310, 5, 6, 40, 40, DFS_FCC3, NO_PSCAN, 0, 0}, /* T1_5230_5310 */ - { 5350, 5470, 5, 6, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* T1_5350_5470 */ - { 5510, 5670, 5, 6, 40, 40, DFS_FCC3, NO_PSCAN, 0, 0}, /* T1_5510_5670 */ - - { 5200, 5240, 17, 6, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* T1_5200_5240 */ - { 5200, 5240, 23, 6, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* T2_5200_5240 */ - { 5210, 5210, 17, 6, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* T1_5210_5210 */ - { 5210, 5210, 23, 0, 40, 40, NO_DFS, NO_PSCAN, 0, 0}, /* T2_5210_5210 */ - - { 5280, 5280, 23, 6, 40, 40, DFS_FCC3, PSCAN_FCC_T, 0, 0}, /* T1_5280_5280 */ - { 5280, 5280, 20, 6, 40, 40, DFS_FCC3, PSCAN_FCC_T, 0, 0}, /* T2_5280_5280 */ - { 5250, 5250, 17, 0, 40, 40, DFS_FCC3, PSCAN_FCC_T, 0, 0}, /* T1_5250_5250 */ - { 5290, 5290, 20, 0, 40, 40, DFS_FCC3, PSCAN_FCC_T, 0, 0}, /* T1_5290_5290 */ - { 5250, 5290, 20, 0, 40, 40, DFS_FCC3, PSCAN_FCC_T, 0, 0}, /* T1_5250_5290 */ - { 5250, 5290, 23, 6, 40, 40, DFS_FCC3, PSCAN_FCC_T, 0, 0}, /* T2_5250_5290 */ - - { 5540, 5660, 20, 6, 40, 40, ...
From: horms@vergenet.net <horms@vergenet.net> tcp_seq is only initialised in case where ZM_ENABLE_PERFORMANCE_EVALUATION is defined. So move the call to ZM_SEQ_DEBUG() and the decleration of tcp_seq in there too. This allows ZM_SEQ_DEBUG() to be removed from the non-ZM_ENABLE_PERFORMANCE_EVALUATION case in the header file. This resolves several compile warnings for the non-ZM_ENABLE_PERFORMANCE_EVALUATION case. However, the ZM_ENABLE_PERFORMANCE_EVALUATION case seems to be completely broken. $ gcc (Debian 4.4.2-8) 4.4.2 Copyright (C) 2009 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ make ... drivers/staging/otus/80211core/cagg.c: In function 'zfAggRxEnabled': drivers/staging/otus/80211core/cagg.c:1872: warning: left-hand operand of comma expression has no effect drivers/staging/otus/80211core/cagg.c:1872: warning: left-hand operand of comma expression has no effect drivers/staging/otus/80211core/cagg.c:1872: warning: statement with no effect ... Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/otus/80211core/cagg.c | 15 +++++++++------ drivers/staging/otus/80211core/pub_zfi.h | 1 - 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers/staging/otus/80211core/cagg.c b/drivers/staging/otus/80211core/cagg.c index d11661c..f9514c0 100644 --- a/drivers/staging/otus/80211core/cagg.c +++ b/drivers/staging/otus/80211core/cagg.c @@ -1838,7 +1838,6 @@ struct agg_tid_rx* zfAggRxEnabled(zdev_t* dev, zbuf_t* buf) u16_t frameType; u16_t frameCtrl; u16_t frameSubtype; - u32_t tcp_seq; //struct aggSta *agg_sta; #if ZM_AGG_FPGA_REORDERING struct agg_tid_rx *tid_rx; @@ -1863,13 +1862,17 @@ struct agg_tid_rx* zfAggRxEnabled(zdev_t* dev, zbuf_t* buf) return NULL; } #ifdef ...
From: Jonathan Cameron <jic23@cam.ac.uk>
This error was picked up by running the smatch static
checker over all the IIO subsytem.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/iio/industrialio-core.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/drivers/staging/iio/industrialio-core.c b/drivers/staging/iio/industrialio-core.c
index 768f448..87799b2 100644
--- a/drivers/staging/iio/industrialio-core.c
+++ b/drivers/staging/iio/industrialio-core.c
@@ -79,11 +79,14 @@ EXPORT_SYMBOL(__iio_change_event);
/* Does anyone care? */
mutex_lock(&ev_int->event_list_lock);
if (test_bit(IIO_BUSY_BIT_POS, &ev_int->handler.flags)) {
- if (ev_int->current_events == ev_int->max_events)
+ if (ev_int->current_events == ev_int->max_events) {
+ mutex_unlock(&ev_int->event_list_lock);
return 0;
+ }
ev = kmalloc(sizeof(*ev), GFP_KERNEL);
if (ev == NULL) {
ret = -ENOMEM;
+ mutex_unlock(&ev_int->event_list_lock);
goto error_ret;
}
ev->ev.id = ev_code;
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Simon Horman <horms@verge.net.au>
Increment the pointer rather than its value.
These appear to be logic errors.
Thanks to Dan Carpenter for the first hunk of this change.
Cc: Dan Carpenter <error27@gmail.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/otus/80211core/ctkip.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/otus/80211core/ctkip.c b/drivers/staging/otus/80211core/ctkip.c
index be42f7a..ca07402 100644
--- a/drivers/staging/otus/80211core/ctkip.c
+++ b/drivers/staging/otus/80211core/ctkip.c
@@ -255,7 +255,8 @@ void zfTkipInit(u8_t* key, u8_t* ta, struct zsTkipSeed* pSeed, u8_t* initIv)
zfMemoryCopy(pSeed->ta, ta, 6);
zfMemoryCopy(pSeed->tk, key, 16);
- iv16 = *initIv++;
+ iv16 = *initIv;
+ initIv++;
iv16 += *initIv<<8;
initIv++;
@@ -264,7 +265,7 @@ void zfTkipInit(u8_t* key, u8_t* ta, struct zsTkipSeed* pSeed, u8_t* initIv)
for(i=0; i<4; i++) // initiv is little endian
{
iv32 += *initIv<<(i*8);
- *initIv++;
+ initIv++;
}
pSeed->iv32 = iv32+1; // Force Recalculating on Tkip Phase1
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Jarod Wilson <jarod@redhat.com> We don't actually need most of the register defines to build, and most of the ones we don't need aren't currently interesting. We'll leave a full copy of all of them in libcrystalhd's source, and only include what we need and/or think might be interesting in the driver. Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/crystalhd/bcm_70012_regs.h |11542 ---------------------------- 1 files changed, 0 insertions(+), 11542 deletions(-) diff --git a/drivers/staging/crystalhd/bcm_70012_regs.h b/drivers/staging/crystalhd/bcm_70012_regs.h index b3b2557..6922f54 100644 --- a/drivers/staging/crystalhd/bcm_70012_regs.h +++ b/drivers/staging/crystalhd/bcm_70012_regs.h @@ -203,21 +203,6 @@ ***************************************************************************/ #define PCIE_TL_TL_CONTROL 0x00000400 /* TL_CONTROL Register */ #define PCIE_TL_TRANSACTION_CONFIGURATION 0x00000404 /* TRANSACTION_CONFIGURATION Register */ -#define PCIE_TL_WRITE_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC 0x00000408 /* WRITE_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC Register */ -#define PCIE_TL_WRITE_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC_2 0x0000040c /* WRITE_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC_2 Register */ -#define PCIE_TL_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC 0x00000410 /* DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC Register */ -#define PCIE_TL_DMA_REQUEST_LOWER_ADDRESS_DIAGNOSTIC_2 0x00000414 /* DMA_REQUEST_LOWER_ADDRESS_DIAGNOSTIC_2 Register */ -#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC 0x00000418 /* DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC Register */ -#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC 0x0000041c /* DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC Register */ -#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC 0x00000420 /* READ_DMA_SPLIT_IDS_DIAGNOSTIC Register */ -#define PCIE_TL_READ_DMA_SPLIT_LENGTH_DIAGNOSTIC 0x00000424 /* READ_DMA_SPLIT_LENGTH_DIAGNOSTIC ...
From: Jonathan Cameron <jic23@cam.ac.uk>
A second smatch detected error. First part fixes in a typo
in the comment directly above that I noticed whilst trying
to remember what this code actually does. Second part is
the actual fix. I'm fairly amazed this one never caused
trouble in testing as it is in one of the most common paths.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/iio/industrialio-core.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/iio/industrialio-core.c b/drivers/staging/iio/industrialio-core.c
index 87799b2..4ff683a 100644
--- a/drivers/staging/iio/industrialio-core.c
+++ b/drivers/staging/iio/industrialio-core.c
@@ -292,16 +292,16 @@ ssize_t iio_event_chrdev_read(struct file *filep,
mutex_unlock(&ev_int->event_list_lock);
/*
* Possible concurency issue if an update of this event is on its way
- * through. May lead to new even being removed whilst the reported event
- * was the unescalated event. In typical use case this is not a problem
- * as userspace will say read half the buffer due to a 50% full event
- * which would make the correct 100% full incorrect anyway.
+ * through. May lead to new event being removed whilst the reported
+ * event was the unescalated event. In typical use case this is not a
+ * problem as userspace will say read half the buffer due to a 50%
+ * full event which would make the correct 100% full incorrect anyway.
*/
- spin_lock(&el->shared_pointer->lock);
- if (el->shared_pointer)
+ if (el->shared_pointer) {
+ spin_lock(&el->shared_pointer->lock);
(el->shared_pointer->ev_p) = NULL;
- spin_unlock(&el->shared_pointer->lock);
-
+ spin_unlock(&el->shared_pointer->lock);
+ }
kfree(el);
return len;
--
1.7.0.1
_______________________________________________
devel mailing ...From: Németh Márton <nm127@freemail.hu> The id_table field of the struct pci_driver is constant in <linux/pci.h> so it is worth to make the initialization data also constant. The semantic match that finds this kind of pattern is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r@ disable decl_init,const_decl_init; identifier I1, I2, x; @@ struct I1 { ... const struct I2 *x; ... }; @s@ identifier r.I1, y; identifier r.x, E; @@ struct I1 y = { .x = E, }; @c@ identifier r.I2; identifier s.E; @@ const struct I2 E[] = ... ; @depends on !c@ identifier r.I2; identifier s.E; @@ + const struct I2 E[] = ...; // </smpl> Signed-off-by: Németh Márton <nm127@freemail.hu> Cc: Julia Lawall <julia@diku.dk> Cc: cocci@diku.dk Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/phison/phison.c | 2 +- drivers/staging/rar/rar_driver.c | 2 +- drivers/staging/sep/sep_driver.c | 2 +- drivers/staging/sm7xx/smtcfb.c | 2 +- drivers/staging/vme/bridges/vme_ca91cx42.c | 2 +- drivers/staging/vme/bridges/vme_tsi148.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/phison/phison.c b/drivers/staging/phison/phison.c index 3817d74..ff30cb0 100644 --- a/drivers/staging/phison/phison.c +++ b/drivers/staging/phison/phison.c @@ -69,7 +69,7 @@ static int phison_init_one(struct pci_dev *pdev, const struct pci_device_id *id) return ret; } -static struct pci_device_id phison_pci_tbl[] = { +static const struct pci_device_id phison_pci_tbl[] = { { PCI_VENDOR_ID_PHISON, PCI_DEVICE_ID_PS5000, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_STORAGE_IDE << 8, 0xffff00, 0 }, { 0, }, diff --git a/drivers/staging/rar/rar_driver.c b/drivers/staging/rar/rar_driver.c index b91a90f..a85a7da 100644 --- a/drivers/staging/rar/rar_driver.c +++ b/drivers/staging/rar/rar_driver.c @@ -71,7 +71,7 @@ static void __exit rar_exit_handler(void); static int __devinit rar_probe(struct pci_dev *pdev, const struct ...
From: Németh Márton <nm127@freemail.hu> The id_table field of the struct usb_device_id is constant in <linux/usb.h> so it is worth to make the initialization data also constant. The semantic match that finds this kind of pattern is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r@ disable decl_init,const_decl_init; identifier I1, I2, x; @@ struct I1 { ... const struct I2 *x; ... }; @s@ identifier r.I1, y; identifier r.x, E; @@ struct I1 y = { .x = E, }; @c@ identifier r.I2; identifier s.E; @@ const struct I2 E[] = ... ; @depends on !c@ identifier r.I2; identifier s.E; @@ + const struct I2 E[] = ...; // </smpl> Signed-off-by: Németh Márton <nm127@freemail.hu> Cc: Julia Lawall <julia@diku.dk> Cc: cocci@diku.dk Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/asus_oled/asus_oled.c | 2 +- drivers/staging/comedi/drivers/dt9812.c | 2 +- drivers/staging/comedi/drivers/usbdux.c | 2 +- drivers/staging/comedi/drivers/usbduxfast.c | 2 +- drivers/staging/comedi/drivers/vmk80xx.c | 2 +- drivers/staging/frontier/alphatrack.c | 2 +- drivers/staging/frontier/tranzport.c | 2 +- drivers/staging/go7007/go7007-usb.c | 2 +- drivers/staging/go7007/s2250-loader.c | 2 +- drivers/staging/line6/driver.c | 2 +- drivers/staging/otus/zdusb.c | 2 +- drivers/staging/quatech_usb2/quatech_usb2.c | 2 +- drivers/staging/rtl8192su/r8192U_core.c | 2 +- drivers/staging/rtl8192u/r8192U_core.c | 2 +- drivers/staging/serqt_usb2/serqt_usb2.c | 2 +- drivers/staging/winbond/wbusb.c | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/staging/asus_oled/asus_oled.c b/drivers/staging/asus_oled/asus_oled.c index c597fb2..cadb6f7 100644 --- a/drivers/staging/asus_oled/asus_oled.c +++ b/drivers/staging/asus_oled/asus_oled.c @@ -87,7 +87,7 @@ struct oled_dev_desc_str { }; /* table of devices that work with this driver ...
From: Minchan Kim <minchan.kim@gmail.com>
If create_device is failed, it can't free gendisk and request_queue of
preceding devices. It cause memory leak.
This patch fixes it.
Signed-off-by: Minchan Kim <minchan.kim@gmail.com>
Acked-by: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/ramzswap/ramzswap_drv.c | 21 +++++++++++++--------
1 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/ramzswap/ramzswap_drv.c b/drivers/staging/ramzswap/ramzswap_drv.c
index 7a7ead4..baf7572 100644
--- a/drivers/staging/ramzswap/ramzswap_drv.c
+++ b/drivers/staging/ramzswap/ramzswap_drv.c
@@ -1292,7 +1292,7 @@ static struct block_device_operations ramzswap_devops = {
.owner = THIS_MODULE,
};
-static void create_device(struct ramzswap *rzs, int device_id)
+static int create_device(struct ramzswap *rzs, int device_id)
{
mutex_init(&rzs->lock);
INIT_LIST_HEAD(&rzs->backing_swap_extent_list);
@@ -1301,7 +1301,7 @@ static void create_device(struct ramzswap *rzs, int device_id)
if (!rzs->queue) {
pr_err("Error allocating disk queue for device %d\n",
device_id);
- return;
+ return 0;
}
blk_queue_make_request(rzs->queue, ramzswap_make_request);
@@ -1313,7 +1313,7 @@ static void create_device(struct ramzswap *rzs, int device_id)
blk_cleanup_queue(rzs->queue);
pr_warning("Error allocating disk structure for device %d\n",
device_id);
- return;
+ return 0;
}
rzs->disk->major = ramzswap_major;
@@ -1331,6 +1331,7 @@ static void create_device(struct ramzswap *rzs, int device_id)
add_disk(rzs->disk);
rzs->init_done = 0;
+ return 1;
}
static void destroy_device(struct ramzswap *rzs)
@@ -1368,16 +1369,20 @@ static int __init ramzswap_init(void)
/* Allocate the device array and initialize each one */
pr_info("Creating %u devices ...\n", num_devices);
devices = kzalloc(num_devices * sizeof(struct ramzswap), GFP_KERNEL);
- if (!devices) {
- ret ...From: Németh Márton <nm127@freemail.hu> The id_table field of the struct i2c_driver is constant in <linux/i2c.h> so it is worth to make the initialization data also constant. The semantic match that finds this kind of pattern is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r@ disable decl_init,const_decl_init; identifier I1, I2, x; @@ struct I1 { ... const struct I2 *x; ... }; @s@ identifier r.I1, y; identifier r.x, E; @@ struct I1 y = { .x = E, }; @c@ identifier r.I2; identifier s.E; @@ const struct I2 E[] = ... ; @depends on !c@ identifier r.I2; identifier s.E; @@ + const struct I2 E[] = ...; // </smpl> Signed-off-by: Németh Márton <nm127@freemail.hu> Cc: Julia Lawall <julia@diku.dk> Cc: cocci@diku.dk Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/go7007/s2250-board.c | 2 +- drivers/staging/go7007/wis-ov7640.c | 2 +- drivers/staging/go7007/wis-saa7113.c | 2 +- drivers/staging/go7007/wis-saa7115.c | 2 +- drivers/staging/go7007/wis-sony-tuner.c | 2 +- drivers/staging/go7007/wis-tw2804.c | 2 +- drivers/staging/go7007/wis-tw9903.c | 2 +- drivers/staging/go7007/wis-uda1342.c | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/go7007/s2250-board.c b/drivers/staging/go7007/s2250-board.c index 8cf7f27..977df13 100644 --- a/drivers/staging/go7007/s2250-board.c +++ b/drivers/staging/go7007/s2250-board.c @@ -667,7 +667,7 @@ static int s2250_remove(struct i2c_client *client) return 0; } -static struct i2c_device_id s2250_id[] = { +static const struct i2c_device_id s2250_id[] = { { "s2250", 0 }, { } }; diff --git a/drivers/staging/go7007/wis-ov7640.c b/drivers/staging/go7007/wis-ov7640.c index 04d6d3a..4f0cbdd 100644 --- a/drivers/staging/go7007/wis-ov7640.c +++ b/drivers/staging/go7007/wis-ov7640.c @@ -77,7 +77,7 @@ static int wis_ov7640_remove(struct i2c_client *client) return 0; } -static struct i2c_device_id wis_ov7640_id[] = { +static const struct ...
From: Jeff Mahoney <jeffm@suse.com>
rt2860 uses skb->tail directly. This patch uses the tail pointer macros
instead.
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/rt2860/rt_linux.c | 10 +++++-----
drivers/staging/rt2860/rt_linux.h | 4 ++--
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/rt2860/rt_linux.c b/drivers/staging/rt2860/rt_linux.c
index 9357fb2..9d763b4 100644
--- a/drivers/staging/rt2860/rt_linux.c
+++ b/drivers/staging/rt2860/rt_linux.c
@@ -462,9 +462,9 @@ void *duplicate_pkt(struct rt_rtmp_adapter *pAd,
if ((skb =
__dev_alloc_skb(HdrLen + DataSize + 2, MEM_ALLOC_FLAG)) != NULL) {
skb_reserve(skb, 2);
- NdisMoveMemory(skb->tail, pHeader802_3, HdrLen);
+ NdisMoveMemory(skb_tail_pointer(skb), pHeader802_3, HdrLen);
skb_put(skb, HdrLen);
- NdisMoveMemory(skb->tail, pData, DataSize);
+ NdisMoveMemory(skb_tail_pointer(skb), pData, DataSize);
skb_put(skb, DataSize);
skb->dev = get_netdev_from_bssid(pAd, FromWhichBSSID);
pPacket = OSPKT_TO_RTPKT(skb);
@@ -515,7 +515,7 @@ void *ClonePacket(struct rt_rtmp_adapter *pAd,
pClonedPkt->dev = pRxPkt->dev;
pClonedPkt->data = pData;
pClonedPkt->len = DataSize;
- pClonedPkt->tail = pClonedPkt->data + pClonedPkt->len;
+ skb_set_tail_pointer(pClonedPkt, DataSize)
ASSERT(DataSize < 1530);
}
return pClonedPkt;
@@ -535,7 +535,7 @@ void update_os_packet_info(struct rt_rtmp_adapter *pAd,
pOSPkt->dev = get_netdev_from_bssid(pAd, FromWhichBSSID);
pOSPkt->data = pRxBlk->pData;
pOSPkt->len = pRxBlk->DataSize;
- pOSPkt->tail = pOSPkt->data + pOSPkt->len;
+ skb_set_tail_pointer(pOSPkt, pOSPkt->len);
}
void wlan_802_11_to_802_3_packet(struct rt_rtmp_adapter *pAd,
@@ -553,7 +553,7 @@ void wlan_802_11_to_802_3_packet(struct rt_rtmp_adapter *pAd,
pOSPkt->dev = get_netdev_from_bssid(pAd, FromWhichBSSID);
pOSPkt->data = pRxBlk->pData;
pOSPkt->len = ...From: Jeff Mahoney <jeffm@suse.com> rtl8192u uses -mhard-float, which doesn't exist on ia64. Since in-kernel floating-point isn't allowed, this is implied anyway. Signed-off-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/rtl8192u/Makefile | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/staging/rtl8192u/Makefile b/drivers/staging/rtl8192u/Makefile index 2d59c4e..738f4a8 100644 --- a/drivers/staging/rtl8192u/Makefile +++ b/drivers/staging/rtl8192u/Makefile @@ -3,7 +3,7 @@ NIC_SELECT = RTL8192U EXTRA_CFLAGS += -std=gnu89 EXTRA_CFLAGS += -O2 -EXTRA_CFLAGS += -mhard-float -DCONFIG_FORCE_HARD_FLOAT=y +EXTRA_CFLAGS += -DCONFIG_FORCE_HARD_FLOAT=y EXTRA_CFLAGS += -DJACKSON_NEW_8187 -DJACKSON_NEW_RX EXTRA_CFLAGS += -DTHOMAS_BEACON -DTHOMAS_TASKLET -DTHOMAS_SKB -DTHOMAS_TURBO #EXTRA_CFLAGS += -DUSB_TX_DRIVER_AGGREGATION_ENABLE -- 1.7.0.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Jeff Mahoney <jeffm@suse.com>
This patch fixes some %x pointer printing to %p.
It also uses the skb_tail_pointer and skb_mac_header macros for accessing
thos members.
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/otus/usbdrv.c | 4 ++--
drivers/staging/otus/wrap_pkt.c | 10 ++--------
2 files changed, 4 insertions(+), 10 deletions(-)
diff --git a/drivers/staging/otus/usbdrv.c b/drivers/staging/otus/usbdrv.c
index b0adbc8..5e6a120 100644
--- a/drivers/staging/otus/usbdrv.c
+++ b/drivers/staging/otus/usbdrv.c
@@ -829,7 +829,7 @@ int zfLnxRegisterVapDev(struct net_device* parentDev, u16_t vapId)
{
/* Allocate net device structure */
vap[vapId].dev = alloc_etherdev(0);
- printk("Register vap dev=%x\n", (u32_t)vap[vapId].dev);
+ printk("Register vap dev=%p\n", vap[vapId].dev);
if(vap[vapId].dev == NULL) {
printk("alloc_etherdev fail\n");
@@ -883,7 +883,7 @@ int zfLnxUnregisterVapDev(struct net_device* parentDev, u16_t vapId)
printk("Unregister VAP dev : %s\n", vap[vapId].dev->name);
if(vap[vapId].dev != NULL) {
- printk("Unregister vap dev=%x\n", (u32_t)vap[vapId].dev);
+ printk("Unregister vap dev=%p\n", vap[vapId].dev);
//
//unregister_netdevice(wds[wdsId].dev);
unregister_netdev(vap[vapId].dev);
diff --git a/drivers/staging/otus/wrap_pkt.c b/drivers/staging/otus/wrap_pkt.c
index 75bb952..a2f5cb1 100644
--- a/drivers/staging/otus/wrap_pkt.c
+++ b/drivers/staging/otus/wrap_pkt.c
@@ -58,7 +58,7 @@ void zfLnxRecv80211(zdev_t *dev, zbuf_t *buf, struct zsAdditionInfo *addInfo)
skb1 = skb_copy(buf, GFP_ATOMIC);
if (skb1 != NULL) {
skb1->dev = dev;
- skb1->mac_header = skb1->data;
+ skb_reset_mac_header(skb1);
skb1->ip_summed = CHECKSUM_NONE;
skb1->pkt_type = PACKET_OTHERHOST;
/* ETH_P_80211_RAW */
@@ -85,13 +85,7 @@ void zfLnxRecvEth(zdev_t *dev, zbuf_t *buf, u16_t ...From: Jeff Mahoney <jeffm@suse.com>
rtl8192e uses skb->tail directly. This patch uses the tail pointer macros
instead.
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/rtl8192e/r8192E_core.c | 5 ++---
drivers/staging/rtl8192e/r819xE_cmdpkt.c | 2 +-
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/rtl8192e/r8192E_core.c b/drivers/staging/rtl8192e/r8192E_core.c
index 50c7602..886105d 100644
--- a/drivers/staging/rtl8192e/r8192E_core.c
+++ b/drivers/staging/rtl8192e/r8192E_core.c
@@ -1807,7 +1807,7 @@ static short rtl8192_alloc_rx_desc_ring(struct net_device *dev)
return 0;
priv->rx_buf[i] = skb;
mapping = (dma_addr_t *)skb->cb;
- *mapping = pci_map_single(priv->pdev, skb->tail,//skb_tail_pointer(skb),
+ *mapping = pci_map_single(priv->pdev, skb_tail_pointer(skb),
priv->rxbuffersize, PCI_DMA_FROMDEVICE);
entry->BufferAddress = cpu_to_le32(*mapping);
@@ -6287,8 +6287,7 @@ static void rtl8192_rx(struct net_device *dev)
skb = new_skb;
priv->rx_buf[priv->rx_idx] = skb;
- *((dma_addr_t *) skb->cb) = pci_map_single(priv->pdev, skb->tail, priv->rxbuffersize, PCI_DMA_FROMDEVICE);
-// *((dma_addr_t *) skb->cb) = pci_map_single(priv->pdev, skb_tail_pointer(skb), priv->rxbuffersize, PCI_DMA_FROMDEVICE);
+ *((dma_addr_t *) skb->cb) = pci_map_single(priv->pdev, skb_tail_pointer(skb), priv->rxbuffersize, PCI_DMA_FROMDEVICE);
}
}
diff --git a/drivers/staging/rtl8192e/r819xE_cmdpkt.c b/drivers/staging/rtl8192e/r819xE_cmdpkt.c
index 2aaa4e1..87c334f 100644
--- a/drivers/staging/rtl8192e/r819xE_cmdpkt.c
+++ b/drivers/staging/rtl8192e/r819xE_cmdpkt.c
@@ -135,7 +135,7 @@ RT_STATUS cmpk_message_handle_tx(
* Transform from little endian to big endian
* and pending zero
...From: Jeff Mahoney <jeffm@suse.com> This driver depends on virt_to_bus working correctly, but it doesn't exist on ppc64 (and probably other arches). Signed-off-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/vme/bridges/Kconfig | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/staging/vme/bridges/Kconfig b/drivers/staging/vme/bridges/Kconfig index 023cceb..66c49f5 100644 --- a/drivers/staging/vme/bridges/Kconfig +++ b/drivers/staging/vme/bridges/Kconfig @@ -8,6 +8,7 @@ config VME_CA91CX42 config VME_TSI148 tristate "Tempe" + depends on VIRT_TO_BUS help If you say Y here you get support for the Tundra TSI148 VME bridge chip. -- 1.7.0.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/jr3_pci.c | 2 ++
drivers/staging/go7007/go7007-driver.c | 2 ++
drivers/staging/go7007/go7007-usb.c | 2 ++
drivers/staging/go7007/saa7134-go7007.c | 1 +
drivers/staging/rtl8192e/r819xE_firmware.c | 4 ++++
drivers/staging/rtl8192su/r8192S_firmware.c | 1 +
drivers/staging/slicoss/slicoss.c | 6 ++++++
drivers/staging/wlan-ng/prism2fw.c | 1 +
8 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/drivers/staging/comedi/drivers/jr3_pci.c b/drivers/staging/comedi/drivers/jr3_pci.c
index bd39784..fe5b495 100644
--- a/drivers/staging/comedi/drivers/jr3_pci.c
+++ b/drivers/staging/comedi/drivers/jr3_pci.c
@@ -954,6 +954,8 @@ out:
return result;
}
+MODULE_FIRMWARE("comedi/jr3pci.idm");
+
static int jr3_pci_detach(struct comedi_device *dev)
{
int i;
diff --git a/drivers/staging/go7007/go7007-driver.c b/drivers/staging/go7007/go7007-driver.c
index fb1345f..d42ba16 100644
--- a/drivers/staging/go7007/go7007-driver.c
+++ b/drivers/staging/go7007/go7007-driver.c
@@ -128,6 +128,8 @@ static int go7007_load_encoder(struct go7007 *go)
return rv;
}
+MODULE_FIRMWARE("go7007fw.bin");
+
/*
* Boot the encoder and register the I2C adapter if requested. Do the
* minimum initialization necessary, since the board-specific code may
diff --git a/drivers/staging/go7007/go7007-usb.c b/drivers/staging/go7007/go7007-usb.c
index baace83..ee278f6 100644
--- a/drivers/staging/go7007/go7007-usb.c
+++ b/drivers/staging/go7007/go7007-usb.c
@@ -444,6 +444,8 @@ static struct go7007_usb_board board_sensoray_2250 = {
},
};
+MODULE_FIRMWARE("go7007tv.bin");
+
static const struct usb_device_id go7007_usb_id_table[] = {
{
.match_flags = USB_DEVICE_ID_MATCH_DEVICE_AND_VERSION |
diff --git ...From: Pavel Vasilyev <pavel@pavlinux.ru> http://bugzilla.kernel.org/show_bug.cgi?id=14825 sizeof(extlen), always will be sizeof( unit32_t) or 4 It seems that something is wrong?!?! Signed-off-by: Pavel Vasilyev <pavel@pavlinux.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/dream/camera/msm_vfe7x.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/staging/dream/camera/msm_vfe7x.c b/drivers/staging/dream/camera/msm_vfe7x.c index 33ab3ac..62fd24d 100644 --- a/drivers/staging/dream/camera/msm_vfe7x.c +++ b/drivers/staging/dream/camera/msm_vfe7x.c @@ -255,8 +255,7 @@ static int vfe_7x_init(struct msm_vfe_callback *presp, extlen = sizeof(struct vfe_frame_extra); - extdata = - kmalloc(sizeof(extlen), GFP_ATOMIC); + extdata = kmalloc(extlen, GFP_ATOMIC); if (!extdata) { rc = -ENOMEM; goto init_fail; -- 1.7.0.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Ben Hutchings <ben@decadent.org.uk>
The current names "cache.image.bin" and "resident.image.bin" are far
too generic.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/sep/sep_driver.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/sep/sep_driver.c b/drivers/staging/sep/sep_driver.c
index 09346c9..96453cb 100644
--- a/drivers/staging/sep/sep_driver.c
+++ b/drivers/staging/sep/sep_driver.c
@@ -183,8 +183,8 @@ static DECLARE_WAIT_QUEUE_HEAD(sep_event);
static int sep_load_firmware(struct sep_device *sep)
{
const struct firmware *fw;
- char *cache_name = "cache.image.bin";
- char *res_name = "resident.image.bin";
+ char *cache_name = "sep/cache.image.bin";
+ char *res_name = "sep/resident.image.bin";
int error;
edbg("SEP Driver:rar_virtual is %p\n", sep->rar_addr);
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/sep/sep_driver.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/drivers/staging/sep/sep_driver.c b/drivers/staging/sep/sep_driver.c index 96453cb..8ab3be6 100644 --- a/drivers/staging/sep/sep_driver.c +++ b/drivers/staging/sep/sep_driver.c @@ -223,6 +223,9 @@ static int sep_load_firmware(struct sep_device *sep) return 0; } +MODULE_FIRMWARE("sep/cache.image.bin"); +MODULE_FIRMWARE("sep/resident.image.bin"); + /** * sep_map_and_alloc_shared_area - allocate shared block * @sep: security processor -- 1.7.0.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
Kernel has its own method called simple_strtoul() to do such things.
Here we are using simple_strtoul(value, NULL, 0) because in original function
the recognized base is 10 or 16 and input data is assumed to be unsigned.
Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/wlags49_h2/wl_main.c | 2 +-
drivers/staging/wlags49_h2/wl_profile.c | 76 +++++++++++++++---------------
drivers/staging/wlags49_h2/wl_util.c | 49 --------------------
drivers/staging/wlags49_h2/wl_util.h | 2 -
4 files changed, 39 insertions(+), 90 deletions(-)
diff --git a/drivers/staging/wlags49_h2/wl_main.c b/drivers/staging/wlags49_h2/wl_main.c
index 16764a0..cf0c384 100644
--- a/drivers/staging/wlags49_h2/wl_main.c
+++ b/drivers/staging/wlags49_h2/wl_main.c
@@ -3792,7 +3792,7 @@ static int write_int(struct file *file, const char *buffer, unsigned long count,
}
if (count > 0 ) {
proc_number[count] = 0;
- nr = wl_atoi( proc_number );
+ nr = simple_strtoul(proc_number , NULL, 0);
*(unsigned int *)data = nr;
if ( nr & 0x8000 ) { //;?kludgy but it is unclear to me were else to place this
#if DBG
diff --git a/drivers/staging/wlags49_h2/wl_profile.c b/drivers/staging/wlags49_h2/wl_profile.c
index 715f027..1e0c75f 100644
--- a/drivers/staging/wlags49_h2/wl_profile.c
+++ b/drivers/staging/wlags49_h2/wl_profile.c
@@ -383,15 +383,15 @@ void translate_option( char *buffer, struct wl_private *lp )
DbgInfo->DebugFlag |= DBG_DEFAULTS;
}
} else {
- DbgInfo->DebugFlag = wl_atoi( value ); //;?DebugFlag;
+ DbgInfo->DebugFlag = simple_strtoul(value, NULL, 0); //;?DebugFlag;
}
- DbgInfo->DebugFlag = wl_atoi( value ); //;?Delete ASAP
+ DbgInfo->DebugFlag = simple_strtoul(value, NULL, 0); //;?Delete ASAP
}
#endif /* DBG */
if ( strcmp( key, PARM_NAME_AUTH_KEY_MGMT_SUITE ) == 0 ) {
DBG_TRACE( DbgInfo, "%s, ...From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
This patch was generated by
git grep -E -l 'enalbe' drivers/staging | xargs -r perl -p -i -e 's/enalbe/enable/g'
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/otus/80211core/ccmd.c | 2 +-
drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c | 2 +-
drivers/staging/rtl8192e/ieee80211/ieee80211_wx.c | 2 +-
drivers/staging/rtl8192su/ieee80211/ieee80211_wx.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/otus/80211core/ccmd.c b/drivers/staging/otus/80211core/ccmd.c
index 8da28ee..3e3d9b5 100644
--- a/drivers/staging/otus/80211core/ccmd.c
+++ b/drivers/staging/otus/80211core/ccmd.c
@@ -1659,7 +1659,7 @@ void zfiWlanSetPacketTypePromiscuous(zdev_t *dev, u32_t setValue)
if (setValue) {
/* write register for sniffer mode */
zfHpSetSnifferMode(dev, 1);
- zm_msg0_mm(ZM_LV_1, "enalbe sniffer mode");
+ zm_msg0_mm(ZM_LV_1, "enable sniffer mode");
} else {
zfHpSetSnifferMode(dev, 0);
zm_msg0_mm(ZM_LV_0, "disalbe sniffer mode");
diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c
index acd1077..bd5e77b 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c
@@ -694,7 +694,7 @@ int ieee80211_wx_set_auth(struct ieee80211_device *ieee,
#if 1
case IW_AUTH_WPA_ENABLED:
ieee->wpa_enabled = (data->value)?1:0;
- //printk("enalbe wpa:%d\n", ieee->wpa_enabled);
+ //printk("enable wpa:%d\n", ieee->wpa_enabled);
break;
#endif
diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211_wx.c b/drivers/staging/rtl8192e/ieee80211/ieee80211_wx.c
index efd61bb..a3302d5 100644
--- a/drivers/staging/rtl8192e/ieee80211/ieee80211_wx.c
+++ b/drivers/staging/rtl8192e/ieee80211/ieee80211_wx.c
@@ -933,7 +933,7 @@ int ieee80211_wx_set_auth(struct ieee80211_device *ieee,
#if 1
...From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
This patch was generated by
git grep -E -i -l 's(le|el)ct' drivers/staging | xargs -r perl -p -i -e 's/([Ss])(le|el)ct/$1elect/'
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
.../comedi/drivers/addi-data/hwdrv_apci3xxx.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3xxx.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3xxx.c
index eec71c3..3692326 100644
--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3xxx.c
+++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3xxx.c
@@ -1206,7 +1206,7 @@ int i_APCI3XXX_InsnWriteTTLIO(struct comedi_device *dev,
if (b_Channel < 8) {
/*****************************************************************************/
- /* Read port 0 (first digital output port) and set/reset the selcted channel */
+ /* Read port 0 (first digital output port) and set/reset the selected channel */
/*****************************************************************************/
dw_Status = inl(devpriv->iobase + 80);
@@ -1228,7 +1228,7 @@ int i_APCI3XXX_InsnWriteTTLIO(struct comedi_device *dev,
if ((devpriv->ul_TTLPortConfiguration[0] & 0xFF)
== 0xFF) {
/*****************************************************************************/
- /* Read port 2 (first digital output port) and set/reset the selcted channel */
+ /* Read port 2 (first digital output port) and set/reset the selected channel */
/*****************************************************************************/
dw_Status = inl(devpriv->iobase + 112);
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
This patch was generated by
git grep -E -i -l '[Aa]quire' drivers/staging | xargs -r perl -p -i -e 's/([Aa])quire/$1cquire/'
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/mpc624.c | 2 +-
drivers/staging/comedi/drivers/ni_labpc.c | 2 +-
drivers/staging/comedi/drivers/s626.c | 2 +-
drivers/staging/comedi/drivers/usbdux.c | 2 +-
drivers/staging/comedi/drivers/usbduxfast.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/comedi/drivers/mpc624.c b/drivers/staging/comedi/drivers/mpc624.c
index cb4da2a..12e72c8 100644
--- a/drivers/staging/comedi/drivers/mpc624.c
+++ b/drivers/staging/comedi/drivers/mpc624.c
@@ -284,7 +284,7 @@ static int mpc624_ai_rinsn(struct comedi_device *dev,
outb(insn->chanspec, dev->iobase + MPC624_GNMUXCH);
/* printk("Channel %d: \n", insn->chanspec); */
if (!insn->n) {
- printk("MPC624: Warning, no data to aquire\n");
+ printk("MPC624: Warning, no data to acquire\n");
return 0;
}
diff --git a/drivers/staging/comedi/drivers/ni_labpc.c b/drivers/staging/comedi/drivers/ni_labpc.c
index dc3f398..647c9b7 100644
--- a/drivers/staging/comedi/drivers/ni_labpc.c
+++ b/drivers/staging/comedi/drivers/ni_labpc.c
@@ -1503,7 +1503,7 @@ static void handle_isa_dma(struct comedi_device *dev)
devpriv->write_byte(0x1, dev->iobase + DMATC_CLEAR_REG);
}
-/* makes sure all data aquired by board is transfered to comedi (used
+/* makes sure all data acquired by board is transfered to comedi (used
* when aquisition is terminated by stop_src == TRIG_EXT). */
static void labpc_drain_dregs(struct comedi_device *dev)
{
diff --git a/drivers/staging/comedi/drivers/s626.c b/drivers/staging/comedi/drivers/s626.c
index fdd7ab9..a3cc933 100644
--- a/drivers/staging/comedi/drivers/s626.c
+++ b/drivers/staging/comedi/drivers/s626.c
@@ -140,7 +140,7 @@ struct ...From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
This patch was generated by
git grep -l 'couter' drivers/staging | xargs -r perl -p -i -e 's/couter/counter/'
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/adl_pci9118.c | 6 +++---
drivers/staging/comedi/drivers/adv_pci1710.c | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/comedi/drivers/adl_pci9118.c b/drivers/staging/comedi/drivers/adl_pci9118.c
index 791ea83..9934a3c 100644
--- a/drivers/staging/comedi/drivers/adl_pci9118.c
+++ b/drivers/staging/comedi/drivers/adl_pci9118.c
@@ -88,9 +88,9 @@ Configuration options:
#define IORANGE_9118 64 /* I hope */
#define PCI9118_CHANLEN 255 /* len of chanlist, some source say 256, but reality looks like 255 :-( */
-#define PCI9118_CNT0 0x00 /* R/W: 8254 couter 0 */
-#define PCI9118_CNT1 0x04 /* R/W: 8254 couter 0 */
-#define PCI9118_CNT2 0x08 /* R/W: 8254 couter 0 */
+#define PCI9118_CNT0 0x00 /* R/W: 8254 counter 0 */
+#define PCI9118_CNT1 0x04 /* R/W: 8254 counter 0 */
+#define PCI9118_CNT2 0x08 /* R/W: 8254 counter 0 */
#define PCI9118_CNTCTRL 0x0c /* W: 8254 counter control */
#define PCI9118_AD_DATA 0x10 /* R: A/D data */
#define PCI9118_DA1 0x10 /* W: D/A registers */
diff --git a/drivers/staging/comedi/drivers/adv_pci1710.c b/drivers/staging/comedi/drivers/adv_pci1710.c
index 951e579..03c73a8 100644
--- a/drivers/staging/comedi/drivers/adv_pci1710.c
+++ b/drivers/staging/comedi/drivers/adv_pci1710.c
@@ -84,9 +84,9 @@ Configuration options:
#define PCI171x_DAREF 14 /* W: D/A reference control */
#define PCI171x_DI 16 /* R: digi inputs */
#define PCI171x_DO 16 /* R: digi inputs */
-#define PCI171x_CNT0 24 /* R/W: 8254 couter 0 */
-#define PCI171x_CNT1 26 /* R/W: 8254 couter 1 */
-#define PCI171x_CNT2 28 /* R/W: 8254 couter 2 */
+#define PCI171x_CNT0 24 /* R/W: 8254 counter 0 */
+#define PCI171x_CNT1 26 /* R/W: 8254 counter ...From: Roel Kluin <roel.kluin@gmail.com> CurrentMPDUDensity was designed to itself. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- .../staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c index 3a5eaa5..50f4f59 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c @@ -1342,7 +1342,7 @@ void HTUseDefaultSetting(struct ieee80211_device* ieee) pHTInfo->CurrentAMPDUFactor = pHTInfo->AMPDU_Factor; - pHTInfo->CurrentMPDUDensity = pHTInfo->CurrentMPDUDensity; + pHTInfo->CurrentMPDUDensity = pHTInfo->MPDU_Density; // Set BWOpMode register -- 1.7.0.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Wu Zhangjin <wuzhangjin@gmail.com> When scrolling the screen on the console with the 2D acceleration support, the whole system may hang. for example, when copying some files from another machine to YeeLoong netbook with the sm7xx video driver via scp and when the screen output is enabled, the system may hang. Before the bug is fixed, remove the 2D acceleration! Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com> Cc: Teddy Wang <teddy.wang@siliconmotion.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/sm7xx/Kconfig | 7 - drivers/staging/sm7xx/TODO | 1 + drivers/staging/sm7xx/smtc2d.c | 979 ---------------------------------------- drivers/staging/sm7xx/smtc2d.h | 530 ---------------------- drivers/staging/sm7xx/smtcfb.c | 129 +----- 5 files changed, 11 insertions(+), 1635 deletions(-) delete mode 100644 drivers/staging/sm7xx/smtc2d.c delete mode 100644 drivers/staging/sm7xx/smtc2d.h diff --git a/drivers/staging/sm7xx/Kconfig b/drivers/staging/sm7xx/Kconfig index 204dbfc..315102c 100644 --- a/drivers/staging/sm7xx/Kconfig +++ b/drivers/staging/sm7xx/Kconfig @@ -6,10 +6,3 @@ config FB_SM7XX select FB_CFB_IMAGEBLIT help Frame Buffer driver for the Silicon Motion SM7XX serial graphic card. - -config FB_SM7XX_ACCEL - bool "Siliconmotion Acceleration functions (EXPERIMENTAL)" - depends on FB_SM7XX && EXPERIMENTAL - help - This will compile the Trident frame buffer device with - acceleration functions. diff --git a/drivers/staging/sm7xx/TODO b/drivers/staging/sm7xx/TODO index 1f61f5e..a66d9e4 100644 --- a/drivers/staging/sm7xx/TODO +++ b/drivers/staging/sm7xx/TODO @@ -1,5 +1,6 @@ TODO: - Dual head support +- 2D acceleration support - use kernel coding style - checkpatch.pl clean - refine the code and remove unused code diff --git a/drivers/staging/sm7xx/smtc2d.c b/drivers/staging/sm7xx/smtc2d.c deleted file mode 100644 index 133b86c..0000000 --- a/drivers/staging/sm7xx/smtc2d.c +++ ...
From: Benjamin Adolphi <b.adolphi@googlemail.com>
This fixes some checkpatch issues in the adq12b comedi driver.
Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/adq12b.c | 48 +++++++++++++++---------------
1 files changed, 24 insertions(+), 24 deletions(-)
diff --git a/drivers/staging/comedi/drivers/adq12b.c b/drivers/staging/comedi/drivers/adq12b.c
index c5ed8bb..4590cac 100644
--- a/drivers/staging/comedi/drivers/adq12b.c
+++ b/drivers/staging/comedi/drivers/adq12b.c
@@ -42,23 +42,23 @@ If you do not specify any options, they will default to
option 1: I/O base address. The following table is provided as a help
of the hardware jumpers.
- address jumper JADR
- 0x300 1 (factory default)
- 0x320 2
- 0x340 3
- 0x360 4
- 0x380 5
- 0x3A0 6
+ address jumper JADR
+ 0x300 1 (factory default)
+ 0x320 2
+ 0x340 3
+ 0x360 4
+ 0x380 5
+ 0x3A0 6
option 2: unipolar/bipolar ADC selection: 0 -> bipolar, 1 -> unipolar
- selection comedi_config option JUB
- bipolar 0 2-3 (factory default)
- unipolar 1 1-2
+ selection comedi_config option JUB
+ bipolar 0 2-3 (factory default)
+ unipolar 1 1-2
option 3: single-ended/differential AI selection: 0 -> SE, 1 -> differential
- selection comedi_config option JCHA JCHB
+ selection comedi_config option JCHA JCHB
single-ended 0 1-2 1-2 (factory ...From: Benjamin Adolphi <b.adolphi@googlemail.com> This fixes some checkpatch issues and some spelling mistakes in the c6xdigio comedi driver. Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/comedi/drivers/c6xdigio.c | 57 ++++++++++++++--------------- 1 files changed, 28 insertions(+), 29 deletions(-) diff --git a/drivers/staging/comedi/drivers/c6xdigio.c b/drivers/staging/comedi/drivers/c6xdigio.c index abb0532..fb0d5fa 100644 --- a/drivers/staging/comedi/drivers/c6xdigio.c +++ b/drivers/staging/comedi/drivers/c6xdigio.c @@ -45,7 +45,7 @@ http://robot0.ge.uiuc.edu/~spong/mecha/ #include <linux/interrupt.h> #include <linux/timex.h> #include <linux/timer.h> -#include <asm/io.h> +#include <linux/io.h> #include <linux/pnp.h> #include "../comedidev.h" @@ -220,11 +220,11 @@ static int C6X_encInput(unsigned long baseAddr, unsigned channel) /* printk("Inside C6X_encInput\n"); */ enc.value = 0; - if (channel == 0) { + if (channel == 0) ppcmd = 0x48; - } else { + else ppcmd = 0x50; - } + WriteByteToHwPort(baseAddr, ppcmd); tmp = ReadByteFromHwPort(baseAddr + 1); while (((tmp & 0x80) == 0) && (timeout < C6XDIGIO_TIME_OUT)) { @@ -391,9 +391,8 @@ static int c6xdigio_ei_insn_read(struct comedi_device *dev, int n; int chan = CR_CHAN(insn->chanspec); - for (n = 0; n < insn->n; n++) { + for (n = 0; n < insn->n; n++) data[n] = (C6X_encInput(dev->iobase, chan) & 0xffffff); - } return n; } @@ -420,9 +419,9 @@ static void board_init(struct comedi_device *dev) static const struct pnp_device_id c6xdigio_pnp_tbl[] = { /* Standard LPT Printer Port */ - {.id = "PNP0400",.driver_data = 0}, + {.id = "PNP0400", .driver_data = 0}, /* ECP Printer Port */ - {.id = "PNP0401",.driver_data = 0}, + {.id = "PNP0401", .driver_data = 0}, {} }; @@ -452,15 +451,14 @@ static int c6xdigio_attach(struct comedi_device *dev, if (result < 0) return ...
From: Benjamin Adolphi <b.adolphi@googlemail.com>
This fixes some checkpatch issues in the rti800 comedi driver.
Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/rti800.c | 41 +++++++++++++++----------------
1 files changed, 20 insertions(+), 21 deletions(-)
diff --git a/drivers/staging/comedi/drivers/rti800.c b/drivers/staging/comedi/drivers/rti800.c
index 2c9d05b..f2ee528 100644
--- a/drivers/staging/comedi/drivers/rti800.c
+++ b/drivers/staging/comedi/drivers/rti800.c
@@ -32,22 +32,22 @@ Configuration options:
[0] - I/O port base address
[1] - IRQ
[2] - A/D reference
- 0 = differential
- 1 = pseudodifferential (common)
- 2 = single-ended
+ 0 = differential
+ 1 = pseudodifferential (common)
+ 2 = single-ended
[3] - A/D range
- 0 = [-10,10]
- 1 = [-5,5]
- 2 = [0,10]
+ 0 = [-10,10]
+ 1 = [-5,5]
+ 2 = [0,10]
[4] - A/D encoding
- 0 = two's complement
- 1 = straight binary
+ 0 = two's complement
+ 1 = straight binary
[5] - DAC 0 range
- 0 = [-10,10]
- 1 = [0,10]
+ 0 = [-10,10]
+ 1 = [0,10]
[6] - DAC 0 encoding
- 0 = two's complement
- 1 = straight binary
+ 0 = two's complement
+ 1 = straight binary
[7] - DAC 1 range (same as DAC 0)
[8] - DAC 1 encoding (same as DAC 0)
*/
@@ -240,9 +240,8 @@ static int rti800_ai_insn_read(struct comedi_device *dev,
data[i] = inb(dev->iobase + RTI800_ADCLO);
data[i] |= (0xf & inb(dev->iobase + RTI800_ADCHI)) << 8;
- if (devpriv->adc_coding == adc_2comp) {
+ if (devpriv->adc_coding == adc_2comp)
data[i] ^= 0x800;
- }
}
return i;
@@ -271,9 +270,9 @@ static int rti800_ao_insn_write(struct comedi_device *dev,
for (i = 0; i < insn->n; i++) {
devpriv->ao_readback[chan] = d = data[i];
- if (devpriv->dac0_coding == dac_2comp) {
+ if (devpriv->dac0_coding == ...From: Benjamin Adolphi <b.adolphi@googlemail.com>
This fixes some checkpatch issues in the pcl711 comedi driver.
Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/pcl711.c | 29 ++++++++++++-----------------
1 files changed, 12 insertions(+), 17 deletions(-)
diff --git a/drivers/staging/comedi/drivers/pcl711.c b/drivers/staging/comedi/drivers/pcl711.c
index 4914784..a499f70 100644
--- a/drivers/staging/comedi/drivers/pcl711.c
+++ b/drivers/staging/comedi/drivers/pcl711.c
@@ -207,11 +207,10 @@ static irqreturn_t pcl711_interrupt(int irq, void *d)
/* FIXME! Nothing else sets ntrig! */
if (!(--devpriv->ntrig)) {
- if (this_board->is_8112) {
+ if (this_board->is_8112)
outb(1, dev->iobase + PCL711_MODE);
- } else {
+ else
outb(0, dev->iobase + PCL711_MODE);
- }
s->async->events |= COMEDI_CB_EOA;
}
@@ -232,15 +231,15 @@ static void pcl711_set_changain(struct comedi_device *dev, int chan)
/*
* Set the correct channel. The two channel banks are switched
* using the mask value.
- * NB: To use differential channels, you should use mask = 0x30,
- * but I haven't written the support for this yet. /JJ
+ * NB: To use differential channels, you should use
+ * mask = 0x30, but I haven't written the support for this
+ * yet. /JJ
*/
- if (chan_register >= 8) {
+ if (chan_register >= 8)
chan_register = 0x20 | (chan_register & 0x7);
- } else {
+ else
chan_register |= 0x10;
- }
} else {
outb(chan_register, dev->iobase + PCL711_MUX);
}
@@ -256,15 +255,13 @@ static int pcl711_ai_insn(struct comedi_device *dev, struct comedi_subdevice *s,
for (n = 0; n < insn->n; n++) {
/*
- * Write the correct mode (software polling) and start polling by writing
- * to the trigger register
+ * Write the correct mode (software polling) and start polling
+ * by writing to the trigger register
*/
...From: Julia Lawall <julia@diku.dk> The variable s is initialized twice to the same (side effect-free) expression. Drop one initialization. A simplified version of the semantic match that finds this problem is: (http://coccinelle.lip6.fr/) // <smpl> @forall@ idexpression *x; identifier f!=ERR_PTR; @@ x = f(...) ... when != x ( x = f(...,<+...x...+>,...) | * x = f(...) ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/go7007/s2250-loader.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/staging/go7007/s2250-loader.c b/drivers/staging/go7007/s2250-loader.c index ef833e0..1de2dfb 100644 --- a/drivers/staging/go7007/s2250-loader.c +++ b/drivers/staging/go7007/s2250-loader.c @@ -139,7 +139,7 @@ failed2: static void s2250loader_disconnect(struct usb_interface *interface) { - pdevice_extension_t s = usb_get_intfdata(interface); + pdevice_extension_t s; printk(KERN_INFO "s2250: disconnect\n"); lock_kernel(); s = usb_get_intfdata(interface); -- 1.7.0.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Benjamin Adolphi <b.adolphi@googlemail.com>
This fixes all checkpatch issues in the pcl724 comedi driver.
Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/pcl724.c | 26 ++++++++++++--------------
1 files changed, 12 insertions(+), 14 deletions(-)
diff --git a/drivers/staging/comedi/drivers/pcl724.c b/drivers/staging/comedi/drivers/pcl724.c
index df1f4ef..0f103c3 100644
--- a/drivers/staging/comedi/drivers/pcl724.c
+++ b/drivers/staging/comedi/drivers/pcl724.c
@@ -17,7 +17,7 @@
[0] - IO Base
[1] - IRQ (0=disable IRQ) IRQ isn't supported at this time!
[2] -number of DIO:
- 0, 144: 144 DIO configuration
+ 0, 144: 144 DIO configuration
1, 96: 96 DIO configuration
*/
/*
@@ -137,8 +137,8 @@ static int pcl724_attach(struct comedi_device *dev, struct comedi_devconfig *it)
iorange = this_board->io_range;
if ((this_board->can_have96) && ((it->options[1] == 1)
|| (it->options[1] == 96)))
- iorange = PCL722_96_SIZE; /* PCL-724 in 96 DIO configuration */
- printk("comedi%d: pcl724: board=%s, 0x%03lx ", dev->minor,
+ iorange = PCL722_96_SIZE; /* PCL-724 in 96 DIO configuration */
+ printk(KERN_INFO "comedi%d: pcl724: board=%s, 0x%03lx ", dev->minor,
this_board->name, iobase);
if (!request_region(iobase, iorange, "pcl724")) {
printk("I/O port conflict\n");
@@ -155,16 +155,16 @@ static int pcl724_attach(struct comedi_device *dev, struct comedi_devconfig *it)
irq = it->options[1];
if (irq) { /* we want to use IRQ */
if (((1 << irq) & this_board->IRQbits) == 0) {
- printk
- (", IRQ %u is out of allowed range, DISABLING IT",
- irq);
+ printk(KERN_WARNING
+ ", IRQ %u is out of allowed range, "
+ "DISABLING IT", irq);
irq = 0; /* Bad IRQ */
} else {
if (request_irq
(irq, interrupt_pcl724, 0, "pcl724", dev)) {
- printk
- ...From: Benjamin Adolphi <b.adolphi@googlemail.com>
This fixes all checkpatch issues in the pcl725 comedi driver.
Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/pcl725.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/comedi/drivers/pcl725.c b/drivers/staging/comedi/drivers/pcl725.c
index 1da4941..60261f4 100644
--- a/drivers/staging/comedi/drivers/pcl725.c
+++ b/drivers/staging/comedi/drivers/pcl725.c
@@ -66,7 +66,7 @@ static int pcl725_attach(struct comedi_device *dev, struct comedi_devconfig *it)
unsigned long iobase;
iobase = it->options[0];
- printk("comedi%d: pcl725: 0x%04lx ", dev->minor, iobase);
+ printk(KERN_INFO "comedi%d: pcl725: 0x%04lx ", dev->minor, iobase);
if (!request_region(iobase, PCL725_SIZE, "pcl725")) {
printk("I/O port conflict\n");
return -EIO;
@@ -96,14 +96,14 @@ static int pcl725_attach(struct comedi_device *dev, struct comedi_devconfig *it)
s->insn_bits = pcl725_di_insn;
s->range_table = &range_digital;
- printk("\n");
+ printk(KERN_INFO "\n");
return 0;
}
static int pcl725_detach(struct comedi_device *dev)
{
- printk("comedi%d: pcl725: remove\n", dev->minor);
+ printk(KERN_INFO "comedi%d: pcl725: remove\n", dev->minor);
if (dev->iobase)
release_region(dev->iobase, PCL725_SIZE);
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Benjamin Adolphi <b.adolphi@googlemail.com>
This fixes all checkpatch issues in the pcl730 comedi driver.
Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/pcl730.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/comedi/drivers/pcl730.c b/drivers/staging/comedi/drivers/pcl730.c
index c9859c9..e5e7bed 100644
--- a/drivers/staging/comedi/drivers/pcl730.c
+++ b/drivers/staging/comedi/drivers/pcl730.c
@@ -99,7 +99,7 @@ static int pcl730_attach(struct comedi_device *dev, struct comedi_devconfig *it)
iobase = it->options[0];
iorange = this_board->io_range;
- printk("comedi%d: pcl730: board=%s 0x%04lx ", dev->minor,
+ printk(KERN_INFO "comedi%d: pcl730: board=%s 0x%04lx ", dev->minor,
this_board->name, iobase);
if (!request_region(iobase, iorange, "pcl730")) {
printk("I/O port conflict\n");
@@ -152,14 +152,14 @@ static int pcl730_attach(struct comedi_device *dev, struct comedi_devconfig *it)
s->range_table = &range_digital;
s->private = (void *)PCL730_DIO_LO;
- printk("\n");
+ printk(KERN_INFO "\n");
return 0;
}
static int pcl730_detach(struct comedi_device *dev)
{
- printk("comedi%d: pcl730: remove\n", dev->minor);
+ printk(KERN_INFO "comedi%d: pcl730: remove\n", dev->minor);
if (dev->iobase)
release_region(dev->iobase, this_board->io_range);
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Roel Kluin <roel.kluin@gmail.com> Read from the right status register Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/comedi/drivers/ni_660x.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_660x.c b/drivers/staging/comedi/drivers/ni_660x.c index 404d3c5..1e20414 100644 --- a/drivers/staging/comedi/drivers/ni_660x.c +++ b/drivers/staging/comedi/drivers/ni_660x.c @@ -691,13 +691,13 @@ static enum NI_660x_Register ni_gpct_to_660x_register(enum ni_gpct_register reg) ni_660x_register = G0StatusRegister; break; case NITIO_G1_Status_Reg: - ni_660x_register = G0StatusRegister; + ni_660x_register = G1StatusRegister; break; case NITIO_G2_Status_Reg: - ni_660x_register = G0StatusRegister; + ni_660x_register = G2StatusRegister; break; case NITIO_G3_Status_Reg: - ni_660x_register = G0StatusRegister; + ni_660x_register = G3StatusRegister; break; case NITIO_G0_Interrupt_Enable_Reg: ni_660x_register = G0InterruptEnable; -- 1.7.0.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Ian Abbott <abbotti@mev.co.uk>
The AI scan counter should be updated after every completed scan,
not after every channel. Keep track of current channel.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/pcl812.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/comedi/drivers/pcl812.c b/drivers/staging/comedi/drivers/pcl812.c
index 0a5bc3d..aa91273 100644
--- a/drivers/staging/comedi/drivers/pcl812.c
+++ b/drivers/staging/comedi/drivers/pcl812.c
@@ -995,7 +995,9 @@ static irqreturn_t interrupt_pcl812_ai_int(int irq, void *d)
outb(0, dev->iobase + PCL812_CLRINT); /* clear INT request */
- if (s->async->cur_chan == 0) { /* one scan done */
+ s->async->cur_chan++;
+ if (s->async->cur_chan >= devpriv->ai_n_chan) { /* one scan done */
+ s->async->cur_chan = 0;
devpriv->ai_act_scan++;
if (!(devpriv->ai_neverending))
if (devpriv->ai_act_scan >= devpriv->ai_scans) { /* all data sampled */
@@ -1021,7 +1023,9 @@ static void transfer_from_dma_buf(struct comedi_device *dev,
for (i = len; i; i--) {
comedi_buf_put(s->async, ptr[bufptr++]); /* get one sample */
- if (s->async->cur_chan == 0) {
+ s->async->cur_chan++;
+ if (s->async->cur_chan >= devpriv->ai_n_chan) {
+ s->async->cur_chan = 0;
devpriv->ai_act_scan++;
if (!devpriv->ai_neverending)
if (devpriv->ai_act_scan >= devpriv->ai_scans) { /* all data sampled */
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Ian Abbott <abbotti@mev.co.uk>
For AI commands, the scan counter should be updated after every
scan. In DMA mode, it was being updated after every repeated
segment of the channel list. In non-DMA mode, it was being updated
after every sample.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/pcl816.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/drivers/staging/comedi/drivers/pcl816.c b/drivers/staging/comedi/drivers/pcl816.c
index 852fe24..5c88ddc 100644
--- a/drivers/staging/comedi/drivers/pcl816.c
+++ b/drivers/staging/comedi/drivers/pcl816.c
@@ -202,6 +202,7 @@ struct pcl816_private {
unsigned int ai_act_chanlist[16]; /* MUX setting for actual AI operations */
unsigned int ai_act_chanlist_len; /* how long is actual MUX list */
unsigned int ai_act_chanlist_pos; /* actual position in MUX list */
+ unsigned int ai_n_chan; /* how many channels per scan */
unsigned int ai_poll_ptr; /* how many sampes transfer poll */
struct comedi_subdevice *sub_ai; /* ptr to AI subdevice */
#ifdef unused
@@ -320,7 +321,9 @@ static irqreturn_t interrupt_pcl816_ai_mode13_int(int irq, void *d)
if (++devpriv->ai_act_chanlist_pos >= devpriv->ai_act_chanlist_len)
devpriv->ai_act_chanlist_pos = 0;
- if (s->async->cur_chan == 0) {
+ s->async->cur_chan++;
+ if (s->async->cur_chan >= devpriv->ai_n_chan) {
+ s->async->cur_chan = 0;
devpriv->ai_act_scan++;
}
@@ -353,6 +356,11 @@ static void transfer_from_dma_buf(struct comedi_device *dev,
if (++devpriv->ai_act_chanlist_pos >=
devpriv->ai_act_chanlist_len) {
devpriv->ai_act_chanlist_pos = 0;
+ }
+
+ s->async->cur_chan++;
+ if (s->async->cur_chan >= devpriv->ai_n_chan) {
+ s->async->cur_chan = 0;
devpriv->ai_act_scan++;
}
@@ -647,6 +655,7 @@ static int pcl816_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
return -EINVAL;
...From: Ian Abbott <abbotti@mev.co.uk>
For AI commands, the scan counter should be updated after every
scan. It was being updated after every sample except for DMA mode
where it was being updated after every repeated segment of the
channel list.
Also AI commands with multiple channels were being terminated with
an error prematurely except in DMA mode. This was because the
driver was comparing channel numbers received from the hardware
(combined with the sample value) with the expected channel numbers
to check for a "channel dropout". This test was failing
incorrectly because the driver was not keeping the current position
within the (repeated segment of the) channel list up to date.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/pcl818.c | 31 +++++++++++++++++++++++++++----
1 files changed, 27 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/comedi/drivers/pcl818.c b/drivers/staging/comedi/drivers/pcl818.c
index d048101..40ac293 100644
--- a/drivers/staging/comedi/drivers/pcl818.c
+++ b/drivers/staging/comedi/drivers/pcl818.c
@@ -557,8 +557,14 @@ conv_finish:
comedi_event(dev, s);
return IRQ_HANDLED;
}
- if (s->async->cur_chan == 0) {
+ devpriv->act_chanlist_pos++;
+ if (devpriv->act_chanlist_pos >= devpriv->act_chanlist_len) {
+ devpriv->act_chanlist_pos = 0;
+ }
+ s->async->cur_chan++;
+ if (s->async->cur_chan >= devpriv->ai_n_chan) {
/* printk("E"); */
+ s->async->cur_chan = 0;
devpriv->ai_act_scan--;
}
@@ -627,9 +633,13 @@ static irqreturn_t interrupt_pcl818_ai_mode13_dma(int irq, void *d)
devpriv->act_chanlist_pos++;
if (devpriv->act_chanlist_pos >= devpriv->act_chanlist_len) {
- devpriv->ai_act_scan--;
devpriv->act_chanlist_pos = 0;
}
+ s->async->cur_chan++;
+ if (s->async->cur_chan >= devpriv->ai_n_chan) {
+ s->async->cur_chan = 0;
+ devpriv->ai_act_scan--;
+ }
if (!devpriv->neverending_ai)
if ...From: Ian Abbott <abbotti@mev.co.uk>
For AI commands, the internal channel list used to check incoming
data was only set up partially if the channel list contained
repeats. Set it up fully. Also the current scan position was not
updated properly when moving a block of data from the FIFO unless
a whole number of scans was moved.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/adv_pci1710.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/drivers/staging/comedi/drivers/adv_pci1710.c b/drivers/staging/comedi/drivers/adv_pci1710.c
index 03c73a8..8243386 100644
--- a/drivers/staging/comedi/drivers/adv_pci1710.c
+++ b/drivers/staging/comedi/drivers/adv_pci1710.c
@@ -724,6 +724,7 @@ static int move_block_from_fifo(struct comedi_device *dev,
devpriv->ai_act_scan++;
}
}
+ s->async->cur_chan = j;
DPRINTK("adv_pci1710 EDBG: END: move_block_from_fifo(...)\n");
return 0;
}
@@ -1230,6 +1231,12 @@ static void setup_channel_list(struct comedi_device *dev,
DPRINTK("GS: %2d. [%4x]=%4x %4x\n", i, chanprog, range,
devpriv->act_chanlist[i]);
}
+#ifdef PCI171x_PARANOIDCHECK
+ for ( ; i < n_chan; i++) { /* store remainder of channel list */
+ devpriv->act_chanlist[i] =
+ (CR_CHAN(chanlist[i]) << 12) & 0xf000;
+ }
+#endif
devpriv->ai_et_MuxVal =
CR_CHAN(chanlist[0]) | (CR_CHAN(chanlist[seglen - 1]) << 8);
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Ian Abbott <abbotti@mev.co.uk>
For AI command testing, the driver does not need to range-check
the length of the channel list as the comedi core has already
checked it.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/adv_pci1710.c | 8 --------
1 files changed, 0 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/comedi/drivers/adv_pci1710.c b/drivers/staging/comedi/drivers/adv_pci1710.c
index 8243386..394d2ea 100644
--- a/drivers/staging/comedi/drivers/adv_pci1710.c
+++ b/drivers/staging/comedi/drivers/adv_pci1710.c
@@ -1035,14 +1035,6 @@ static int pci171x_ai_cmdtest(struct comedi_device *dev,
}
}
- if (!cmd->chanlist_len) {
- cmd->chanlist_len = 1;
- err++;
- }
- if (cmd->chanlist_len > this_board->n_aichan) {
- cmd->chanlist_len = this_board->n_aichan;
- err++;
- }
if (cmd->scan_end_arg != cmd->chanlist_len) {
cmd->scan_end_arg = cmd->chanlist_len;
err++;
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Ian Abbott <abbotti@mev.co.uk>
For multi-channel AI commands, the interrupt handler is missing code to
switch to the next channel. Add some (untested) code to handle this.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/pcl812.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/comedi/drivers/pcl812.c b/drivers/staging/comedi/drivers/pcl812.c
index aa91273..d4634c4 100644
--- a/drivers/staging/comedi/drivers/pcl812.c
+++ b/drivers/staging/comedi/drivers/pcl812.c
@@ -955,6 +955,7 @@ static irqreturn_t interrupt_pcl812_ai_int(int irq, void *d)
unsigned int mask, timeout;
struct comedi_device *dev = d;
struct comedi_subdevice *s = dev->subdevices + 0;
+ unsigned int next_chan;
s->async->events = 0;
@@ -993,11 +994,18 @@ static irqreturn_t interrupt_pcl812_ai_int(int irq, void *d)
((inb(dev->iobase + PCL812_AD_HI) << 8) |
inb(dev->iobase + PCL812_AD_LO)) & mask);
+ /* Set up next channel. Added by abbotti 2010-01-20, but untested. */
+ next_chan = s->async->cur_chan + 1;
+ if (next_chan >= devpriv->ai_n_chan)
+ next_chan = 0;
+ if (devpriv->ai_chanlist[s->async->cur_chan] !=
+ devpriv->ai_chanlist[next_chan])
+ setup_range_channel(dev, s, devpriv->ai_chanlist[next_chan], 0);
+
outb(0, dev->iobase + PCL812_CLRINT); /* clear INT request */
- s->async->cur_chan++;
- if (s->async->cur_chan >= devpriv->ai_n_chan) { /* one scan done */
- s->async->cur_chan = 0;
+ s->async->cur_chan = next_chan;
+ if (next_chan == 0) { /* one scan done */
devpriv->ai_act_scan++;
if (!(devpriv->ai_neverending))
if (devpriv->ai_act_scan >= devpriv->ai_scans) { /* all data sampled */
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Ian Abbott <abbotti@mev.co.uk>
Check the channel list is valid in step 5 of the AI command test.
Split function check_and_setup_channel_list() in two. Also, remove
unnecessary chanlist_len tests in step 3 of the AI command test as the
comedi core has already checked it.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/pcl816.c | 55 ++++++++++++++++++++-----------
1 files changed, 36 insertions(+), 19 deletions(-)
diff --git a/drivers/staging/comedi/drivers/pcl816.c b/drivers/staging/comedi/drivers/pcl816.c
index 5c88ddc..9820759 100644
--- a/drivers/staging/comedi/drivers/pcl816.c
+++ b/drivers/staging/comedi/drivers/pcl816.c
@@ -214,9 +214,12 @@ struct pcl816_private {
/*
==============================================================================
*/
-static int check_and_setup_channel_list(struct comedi_device *dev,
- struct comedi_subdevice *s,
- unsigned int *chanlist, int chanlen);
+static int check_channel_list(struct comedi_device *dev,
+ struct comedi_subdevice *s,
+ unsigned int *chanlist, unsigned int chanlen);
+static void setup_channel_list(struct comedi_device *dev,
+ struct comedi_subdevice *s,
+ unsigned int *chanlist, unsigned int seglen);
static int pcl816_ai_cancel(struct comedi_device *dev,
struct comedi_subdevice *s);
static void start_pacer(struct comedi_device *dev, int mode,
@@ -566,14 +569,6 @@ static int pcl816_ai_cmdtest(struct comedi_device *dev,
}
}
- if (!cmd->chanlist_len) {
- cmd->chanlist_len = 1;
- err++;
- }
- if (cmd->chanlist_len > this_board->n_aichan) {
- cmd->chanlist_len = this_board->n_aichan;
- err++;
- }
if (cmd->scan_end_arg != cmd->chanlist_len) {
cmd->scan_end_arg = cmd->chanlist_len;
err++;
@@ -611,6 +606,14 @@ static int pcl816_ai_cmdtest(struct comedi_device *dev,
return 4;
}
+ /* step 5: complain about special chanlist ...From: Ian Abbott <abbotti@mev.co.uk>
For AI command testing, the driver does not need to range-check the
length of the channel list as the comedi core has already checked it.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/pcl818.c | 8 --------
1 files changed, 0 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/comedi/drivers/pcl818.c b/drivers/staging/comedi/drivers/pcl818.c
index 40ac293..c9d7538 100644
--- a/drivers/staging/comedi/drivers/pcl818.c
+++ b/drivers/staging/comedi/drivers/pcl818.c
@@ -1392,14 +1392,6 @@ static int ai_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
}
}
- if (!cmd->chanlist_len) {
- cmd->chanlist_len = 1;
- err++;
- }
- if (cmd->chanlist_len > s->n_chan) {
- cmd->chanlist_len = s->n_chan;
- err++;
- }
if (cmd->scan_end_arg != cmd->chanlist_len) {
cmd->scan_end_arg = cmd->chanlist_len;
err++;
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Roel Kluin <roel.kluin@gmail.com> Regardless of the condition, the branches execute the same code Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/rt2860/sta_ioctl.c | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rt2860/sta_ioctl.c b/drivers/staging/rt2860/sta_ioctl.c index d8fbe6c..de4b627 100644 --- a/drivers/staging/rt2860/sta_ioctl.c +++ b/drivers/staging/rt2860/sta_ioctl.c @@ -975,10 +975,7 @@ int rt_ioctl_giwscan(struct net_device *dev, /*================================ */ memset(&iwe, 0, sizeof(iwe)); iwe.cmd = SIOCGIWFREQ; - if (INFRA_ON(pAdapter) || ADHOC_ON(pAdapter)) - iwe.u.freq.m = pAdapter->ScanTab.BssEntry[i].Channel; - else - iwe.u.freq.m = pAdapter->ScanTab.BssEntry[i].Channel; + iwe.u.freq.m = pAdapter->ScanTab.BssEntry[i].Channel; iwe.u.freq.e = 0; iwe.u.freq.i = 0; -- 1.7.0.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Roel Kluin <roel.kluin@gmail.com> Regardless of the condition, the branches executed the same code Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/serqt_usb2/serqt_usb2.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/staging/serqt_usb2/serqt_usb2.c b/drivers/staging/serqt_usb2/serqt_usb2.c index 375a505..44f2d4e 100644 --- a/drivers/staging/serqt_usb2/serqt_usb2.c +++ b/drivers/staging/serqt_usb2/serqt_usb2.c @@ -1277,7 +1277,7 @@ static void qt_set_termios(struct tty_struct *tty, if (cflag & CSTOPB) new_LCR |= SERIAL_TWO_STOPB; else - new_LCR |= SERIAL_TWO_STOPB; + new_LCR |= SERIAL_ONE_STOPB; dbg("%s - 4\n", __func__); -- 1.7.0.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Ben Hutchings <ben@decadent.org.uk>
These functions do not modify the data they are passed.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/rt2860/rtmp.h | 6 +++---
drivers/staging/rt2870/common/rtusb_io.c | 10 +++++-----
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/rt2860/rtmp.h b/drivers/staging/rt2860/rtmp.h
index c50abf4..6c6503d 100644
--- a/drivers/staging/rt2860/rtmp.h
+++ b/drivers/staging/rt2860/rtmp.h
@@ -4043,10 +4043,10 @@ int RTUSBMultiRead(struct rt_rtmp_adapter *pAd,
u16 Offset, u8 *pData, u16 length);
int RTUSBMultiWrite(struct rt_rtmp_adapter *pAd,
- u16 Offset, u8 *pData, u16 length);
+ u16 Offset, const u8 *pData, u16 length);
int RTUSBMultiWrite_OneByte(struct rt_rtmp_adapter *pAd,
- u16 Offset, u8 *pData);
+ u16 Offset, const u8 *pData);
int RTUSBReadBBPRegister(struct rt_rtmp_adapter *pAd,
u8 Id, u8 *pValue);
@@ -4112,7 +4112,7 @@ int RTUSBSingleWrite(struct rt_rtmp_adapter *pAd,
u16 Offset, u16 Value);
int RTUSBFirmwareWrite(struct rt_rtmp_adapter *pAd,
- u8 *pFwImage, unsigned long FwLen);
+ const u8 *pFwImage, unsigned long FwLen);
int RTUSBVenderReset(struct rt_rtmp_adapter *pAd);
diff --git a/drivers/staging/rt2870/common/rtusb_io.c b/drivers/staging/rt2870/common/rtusb_io.c
index 34443f2..cf0d2f5 100644
--- a/drivers/staging/rt2870/common/rtusb_io.c
+++ b/drivers/staging/rt2870/common/rtusb_io.c
@@ -84,7 +84,7 @@ static int RTUSBFirmwareRun(struct rt_rtmp_adapter *pAd)
========================================================================
*/
int RTUSBFirmwareWrite(struct rt_rtmp_adapter *pAd,
- u8 *pFwImage, unsigned long FwLen)
+ const u8 *pFwImage, unsigned long FwLen)
{
u32 MacReg;
int Status;
@@ -167,7 +167,7 @@ int RTUSBMultiRead(struct rt_rtmp_adapter *pAd,
...From: Dan Carpenter <error27@gmail.com> I removed a misplace semicolon. It is clear from the indentation that TxPwrTracking87SE() was only supposed to be called if CheckTxPwrTracking() returned true. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/rtl8187se/r8180_core.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c index e0f13ef..1fb9e11 100644 --- a/drivers/staging/rtl8187se/r8180_core.c +++ b/drivers/staging/rtl8187se/r8180_core.c @@ -2566,7 +2566,7 @@ void watch_dog_adaptive(unsigned long data) // Tx Power Tracking on 87SE. #ifdef TX_TRACK //if( priv->bTxPowerTrack ) //lzm mod 080826 - if( CheckTxPwrTracking((struct net_device *)data)); + if (CheckTxPwrTracking((struct net_device *)data)) TxPwrTracking87SE((struct net_device *)data); #endif -- 1.7.0.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Dave Airlie <airlied@redhat.com> Add necessary include to fix build on PowerPC Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/crystalhd/crystalhd_lnx.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/staging/crystalhd/crystalhd_lnx.h b/drivers/staging/crystalhd/crystalhd_lnx.h index d3f9fc4..d338ae9 100644 --- a/drivers/staging/crystalhd/crystalhd_lnx.h +++ b/drivers/staging/crystalhd/crystalhd_lnx.h @@ -40,6 +40,7 @@ #include <linux/init.h> #include <linux/interrupt.h> #include <linux/pagemap.h> +#include <linux/vmalloc.h> #include <asm/io.h> #include <asm/irq.h> -- 1.7.0.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Alan Cox <alan@linux.intel.com>
This is another 10 bit value with the high bits clear, and where the
type doesn't get used anywhere properly anyway
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/et131x/et1310_address_map.h | 12 ------------
1 files changed, 0 insertions(+), 12 deletions(-)
diff --git a/drivers/staging/et131x/et1310_address_map.h b/drivers/staging/et131x/et1310_address_map.h
index e715e4d..fcd9681 100644
--- a/drivers/staging/et131x/et1310_address_map.h
+++ b/drivers/staging/et131x/et1310_address_map.h
@@ -451,18 +451,6 @@ typedef union _RXDMA_CSR_t {
* 31-10: unused
* 9-0: fbr ndesc
*/
-typedef union _RXDMA_FBR_NUM_DES_t {
- u32 value;
- struct {
-#ifdef _BIT_FIELDS_HTOL
- u32 unused:22; /* bits 10-31 */
- u32 fbr_ndesc:10; /* bits 0-9 */
-#else
- u32 fbr_ndesc:10; /* bits 0-9 */
- u32 unused:22; /* bits 10-31 */
-#endif
- } bits;
-} RXDMA_FBR_NUM_DES_t, *PRXDMA_FBR_NUM_DES_t;
/*
* structure for free buffer ring 0 available offset reg in rxdma address map
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Alan Cox <alan@linux.intel.com>
This is only used meaningfully as a definition, we never mask and fetch the
bits apart
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/et131x/et1310_rx.c | 8 ++++----
drivers/staging/et131x/et1310_rx.h | 15 +--------------
2 files changed, 5 insertions(+), 18 deletions(-)
diff --git a/drivers/staging/et131x/et1310_rx.c b/drivers/staging/et131x/et1310_rx.c
index 81c1a74..2600b2f 100644
--- a/drivers/staging/et131x/et1310_rx.c
+++ b/drivers/staging/et131x/et1310_rx.c
@@ -640,7 +640,7 @@ void ConfigRxDmaRegs(struct et131x_adapter *etdev)
for (entry = 0; entry < rx_local->Fbr1NumEntries; entry++) {
fbr_entry->addr_hi = rx_local->Fbr[1]->PAHigh[entry];
fbr_entry->addr_lo = rx_local->Fbr[1]->PALow[entry];
- fbr_entry->word2.bits.bi = entry;
+ fbr_entry->word2 = entry;
fbr_entry++;
}
@@ -665,7 +665,7 @@ void ConfigRxDmaRegs(struct et131x_adapter *etdev)
for (entry = 0; entry < rx_local->Fbr0NumEntries; entry++) {
fbr_entry->addr_hi = rx_local->Fbr[0]->PAHigh[entry];
fbr_entry->addr_lo = rx_local->Fbr[0]->PALow[entry];
- fbr_entry->word2.bits.bi = entry;
+ fbr_entry->word2 = entry;
fbr_entry++;
}
@@ -1126,7 +1126,7 @@ void nic_return_rfd(struct et131x_adapter *etdev, PMP_RFD rfd)
*/
next->addr_hi = rx_local->Fbr[1]->PAHigh[bi];
next->addr_lo = rx_local->Fbr[1]->PALow[bi];
- next->word2.value = bi;
+ next->word2 = bi;
writel(bump_fbr(&rx_local->local_Fbr1_full,
rx_local->Fbr1NumEntries - 1),
@@ -1144,7 +1144,7 @@ void nic_return_rfd(struct et131x_adapter *etdev, PMP_RFD rfd)
*/
next->addr_hi = rx_local->Fbr[0]->PAHigh[bi];
next->addr_lo = rx_local->Fbr[0]->PALow[bi];
- next->word2.value = bi;
+ next->word2 = bi;
writel(bump_fbr(&rx_local->local_Fbr0_full,
rx_local->Fbr0NumEntries - 1),
diff --git a/drivers/staging/et131x/et1310_rx.h ...From: Alan Cox <alan@linux.intel.com> Clean up the typdef for fbr_desc itself so we know it is done Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/et131x/et1310_rx.c | 35 +++++++++++++++++------------------ drivers/staging/et131x/et1310_rx.h | 5 +++-- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/drivers/staging/et131x/et1310_rx.c b/drivers/staging/et131x/et1310_rx.c index 2600b2f..6ae8f11 100644 --- a/drivers/staging/et131x/et1310_rx.c +++ b/drivers/staging/et131x/et1310_rx.c @@ -170,7 +170,7 @@ int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter) #endif /* Allocate an area of memory for Free Buffer Ring 1 */ - bufsize = (sizeof(FBR_DESC_t) * rx_ring->Fbr1NumEntries) + 0xfff; + bufsize = (sizeof(struct fbr_desc) * rx_ring->Fbr1NumEntries) + 0xfff; rx_ring->pFbr1RingVa = pci_alloc_consistent(adapter->pdev, bufsize, &rx_ring->pFbr1RingPa); @@ -199,7 +199,7 @@ int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter) #ifdef USE_FBR0 /* Allocate an area of memory for Free Buffer Ring 0 */ - bufsize = (sizeof(FBR_DESC_t) * rx_ring->Fbr0NumEntries) + 0xfff; + bufsize = (sizeof(struct fbr_desc) * rx_ring->Fbr0NumEntries) + 0xfff; rx_ring->pFbr0RingVa = pci_alloc_consistent(adapter->pdev, bufsize, &rx_ring->pFbr0RingPa); @@ -450,12 +450,11 @@ void et131x_rx_dma_memory_free(struct et131x_adapter *adapter) rx_ring->pFbr1RingVa = (void *)((uint8_t *) rx_ring->pFbr1RingVa - rx_ring->Fbr1offset); - bufsize = - (sizeof(FBR_DESC_t) * rx_ring->Fbr1NumEntries) + 0xfff; + bufsize = (sizeof(struct fbr_desc) * rx_ring->Fbr1NumEntries) + + 0xfff; - pci_free_consistent(adapter->pdev, - bufsize, - rx_ring->pFbr1RingVa, rx_ring->pFbr1RingPa); + pci_free_consistent(adapter->pdev, bufsize, + ...
From: Ben Hutchings <ben@decadent.org.uk> When originally introduced into staging, these drivers had custom firmware-loading code which checked a version number and CRC at the end of each blob. This reintroduces those checks, using crc-ccitt instead of custom code. The removed firmware will be added to the linux-firmware.git repository. Based on work by Darren Salt <linux@youmustbejoking.demon.co.uk>. Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Tested-By: Darren Salt <linux@youmustbejoking.demon.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/rt2860/Kconfig | 2 + drivers/staging/rt2860/common/firmware.h | 558 ------------------------- drivers/staging/rt2860/common/firmware_3070.h | 517 ----------------------- drivers/staging/rt2860/common/rtmp_mcu.c | 165 +++++--- drivers/staging/rt2860/rt_linux.c | 3 + drivers/staging/rt2860/rtmp.h | 1 + drivers/staging/rt2870/Kconfig | 2 + drivers/staging/rt3070/firmware.h | 558 ------------------------- drivers/staging/rt3090/firmware.h | 517 ----------------------- 9 files changed, 113 insertions(+), 2210 deletions(-) delete mode 100644 drivers/staging/rt2860/common/firmware.h delete mode 100644 drivers/staging/rt2860/common/firmware_3070.h delete mode 100644 drivers/staging/rt3070/firmware.h delete mode 100644 drivers/staging/rt3090/firmware.h diff --git a/drivers/staging/rt2860/Kconfig b/drivers/staging/rt2860/Kconfig index f9962b6..f3a7e47 100644 --- a/drivers/staging/rt2860/Kconfig +++ b/drivers/staging/rt2860/Kconfig @@ -3,6 +3,8 @@ config RT2860 depends on PCI && X86 && WLAN select WIRELESS_EXT select WEXT_PRIV + select CRC_CCITT + select FW_LOADER ---help--- This is an experimental driver for the Ralink 2860 and 3090 wireless chips. diff --git a/drivers/staging/rt2860/common/firmware.h b/drivers/staging/rt2860/common/firmware.h deleted file ...
From: Alan Cox <alan@linux.intel.com>
This is another set of flags as typedef that can be cleaned up.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/et131x/et1310_address_map.h | 58 +++++++++------------------
drivers/staging/et131x/et1310_rx.c | 46 ++++++++++-----------
2 files changed, 41 insertions(+), 63 deletions(-)
diff --git a/drivers/staging/et131x/et1310_address_map.h b/drivers/staging/et131x/et1310_address_map.h
index fcd9681..e39fd56 100644
--- a/drivers/staging/et131x/et1310_address_map.h
+++ b/drivers/staging/et131x/et1310_address_map.h
@@ -292,45 +292,25 @@ typedef struct _TXDMA_t { /* Location: */
/*
* structure for control status reg in rxdma address map
* Located at address 0x2000
+ *
+ * CSR
+ * 0: halt
+ * 1-3: tc
+ * 4: fbr_big_endian
+ * 5: psr_big_endian
+ * 6: pkt_big_endian
+ * 7: dma_big_endian
+ * 8-9: fbr0_size
+ * 10: fbr0_enable
+ * 11-12: fbr1_size
+ * 13: fbr1_enable
+ * 14: unused
+ * 15: pkt_drop_disable
+ * 16: pkt_done_flush
+ * 17: halt_status
+ * 18-31: unused
*/
-typedef union _RXDMA_CSR_t {
- u32 value;
- struct {
-#ifdef _BIT_FIELDS_HTOL
- u32 unused2:14; /* bits 18-31 */
- u32 halt_status:1; /* bit 17 */
- u32 pkt_done_flush:1; /* bit 16 */
- u32 pkt_drop_disable:1; /* bit 15 */
- u32 unused1:1; /* bit 14 */
- u32 fbr1_enable:1; /* bit 13 */
- u32 fbr1_size:2; /* bits 11-12 */
- u32 fbr0_enable:1; /* bit 10 */
- u32 fbr0_size:2; /* bits 8-9 */
- u32 dma_big_endian:1; /* bit 7 */
- u32 pkt_big_endian:1; /* bit 6 */
- u32 psr_big_endian:1; /* bit 5 */
- u32 fbr_big_endian:1; /* bit 4 */
- u32 tc:3; /* bits 1-3 */
- u32 halt:1; /* bit 0 */
-#else
- u32 halt:1; /* bit 0 */
- u32 tc:3; /* bits 1-3 */
- u32 fbr_big_endian:1; /* bit 4 */
- u32 psr_big_endian:1; /* bit 5 */
- u32 pkt_big_endian:1; /* bit 6 */
- u32 dma_big_endian:1; /* bit 7 */
- u32 fbr0_size:2; /* bits 8-9 */
- u32 ...From: Alan Cox <alan@linux.intel.com>
We have a clean struct of this now so turn the top level typedefs into a
struct
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/et131x/et1310_address_map.h | 8 ++++----
drivers/staging/et131x/et1310_rx.c | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/et131x/et1310_address_map.h b/drivers/staging/et131x/et1310_address_map.h
index e39fd56..9a7a4d2 100644
--- a/drivers/staging/et131x/et1310_address_map.h
+++ b/drivers/staging/et131x/et1310_address_map.h
@@ -500,7 +500,7 @@ typedef struct _TXDMA_t { /* Location: */
* Rx DMA Module of JAGCore Address Mapping
* Located at address 0x2000
*/
-typedef struct _RXDMA_t { /* Location: */
+struct rxdma_regs { /* Location: */
u32 csr; /* 0x2000 */
u32 dma_wb_base_lo; /* 0x2004 */
u32 dma_wb_base_hi; /* 0x2008 */
@@ -530,7 +530,7 @@ typedef struct _RXDMA_t { /* Location: */
u32 fbr1_full_offset; /* 0x2068 */
u32 fbr1_rd_index; /* 0x206C */
u32 fbr1_min_des; /* 0x2070 */
-} RXDMA_t, *PRXDMA_t;
+};
/* END OF RXDMA REGISTER ADDRESS MAP */
@@ -1688,9 +1688,9 @@ typedef struct _ADDRESS_MAP_t {
TXDMA_t txdma;
/* unused section of txdma address map */
u8 unused_txdma[4096 - sizeof(TXDMA_t)];
- RXDMA_t rxdma;
+ struct rxdma_regs rxdma;
/* unused section of rxdma address map */
- u8 unused_rxdma[4096 - sizeof(RXDMA_t)];
+ u8 unused_rxdma[4096 - sizeof(struct rxdma_regs)];
TXMAC_t txmac;
/* unused section of txmac address map */
u8 unused_txmac[4096 - sizeof(TXMAC_t)];
diff --git a/drivers/staging/et131x/et1310_rx.c b/drivers/staging/et131x/et1310_rx.c
index e593ad6..ee6436a 100644
--- a/drivers/staging/et131x/et1310_rx.c
+++ b/drivers/staging/et131x/et1310_rx.c
@@ -593,7 +593,7 @@ int et131x_init_recv(struct et131x_adapter *adapter)
*/
void ConfigRxDmaRegs(struct et131x_adapter *etdev)
...From: Alan Cox <alan@linux.intel.com>
This is another unused type for the bin
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/et131x/et1310_address_map.h | 21 ---------------------
1 files changed, 0 insertions(+), 21 deletions(-)
diff --git a/drivers/staging/et131x/et1310_address_map.h b/drivers/staging/et131x/et1310_address_map.h
index 9a7a4d2..f121961 100644
--- a/drivers/staging/et131x/et1310_address_map.h
+++ b/drivers/staging/et131x/et1310_address_map.h
@@ -1662,22 +1662,6 @@ typedef struct _MMC_t { /* Location: */
/* END OF MMC REGISTER ADDRESS MAP */
-/* START OF EXP ROM REGISTER ADDRESS MAP */
-
-/*
- * Expansion ROM Module of JAGCore Address Mapping
- */
-
-/* Take this out until it is not empty */
-#if 0
-typedef struct _EXP_ROM_t {
-
-} EXP_ROM_t, *PEXP_ROM_t;
-#endif
-
-/* END OF EXP ROM REGISTER ADDRESS MAP */
-
-
/*
* JAGCore Address Mapping
*/
@@ -1709,11 +1693,6 @@ typedef struct _ADDRESS_MAP_t {
/* unused section of address map */
u8 unused_[1015808];
-/* Take this out until it is not empty */
-#if 0
- EXP_ROM_t exp_rom;
-#endif
-
u8 unused_exp_rom[4096]; /* MGS-size TBD */
u8 unused__[524288]; /* unused section of address map */
} ADDRESS_MAP_t, *PADDRESS_MAP_t;
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Alan Cox <alan@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/et131x/et1310_address_map.h | 10 ++++------
drivers/staging/et131x/et131x_initpci.c | 2 +-
2 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/et131x/et1310_address_map.h b/drivers/staging/et131x/et1310_address_map.h
index f121961..16254b7 100644
--- a/drivers/staging/et131x/et1310_address_map.h
+++ b/drivers/staging/et131x/et1310_address_map.h
@@ -149,7 +149,7 @@
* GLOBAL Module of JAGCore Address Mapping
* Located at address 0x0000
*/
-typedef struct _GLOBAL_t { /* Location: */
+struct global_regs { /* Location: */
u32 txq_start_addr; /* 0x0000 */
u32 txq_end_addr; /* 0x0004 */
u32 rxq_start_addr; /* 0x0008 */
@@ -165,9 +165,7 @@ typedef struct _GLOBAL_t { /* Location: */
u32 msi_config; /* 0x0030 */
u32 loopback; /* 0x0034 */
u32 watchdog_timer; /* 0x0038 */
-} GLOBAL_t, *PGLOBAL_t;
-
-/* END OF GLOBAL REGISTER ADDRESS MAP */
+};
/* START OF TXDMA REGISTER ADDRESS MAP */
@@ -1666,9 +1664,9 @@ typedef struct _MMC_t { /* Location: */
* JAGCore Address Mapping
*/
typedef struct _ADDRESS_MAP_t {
- GLOBAL_t global;
+ struct global_regs global;
/* unused section of global address map */
- u8 unused_global[4096 - sizeof(GLOBAL_t)];
+ u8 unused_global[4096 - sizeof(struct global_regs)];
TXDMA_t txdma;
/* unused section of txdma address map */
u8 unused_txdma[4096 - sizeof(TXDMA_t)];
diff --git a/drivers/staging/et131x/et131x_initpci.c b/drivers/staging/et131x/et131x_initpci.c
index 0892b6a..e02b1cd 100644
--- a/drivers/staging/et131x/et131x_initpci.c
+++ b/drivers/staging/et131x/et131x_initpci.c
@@ -327,7 +327,7 @@ void et131x_link_detection_handler(unsigned long data)
*/
void ConfigGlobalRegs(struct et131x_adapter *etdev)
{
- struct _GLOBAL_t __iomem *regs = &etdev->regs->global;
+ struct global_regs ...From: Alan Cox <alan@linux.intel.com>
The contents of MMC_t are clean so kill off the MMC_t typedef
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/et131x/et1310_address_map.h | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/et131x/et1310_address_map.h b/drivers/staging/et131x/et1310_address_map.h
index 43bd303..446b2ac 100644
--- a/drivers/staging/et131x/et1310_address_map.h
+++ b/drivers/staging/et131x/et1310_address_map.h
@@ -1648,14 +1648,14 @@ typedef struct _MAC_STAT_t { /* Location: */
/*
* Memory Control Module of JAGCore Address Mapping
*/
-typedef struct _MMC_t { /* Location: */
+struct mmc_regs { /* Location: */
u32 mmc_ctrl; /* 0x7000 */
u32 sram_access; /* 0x7004 */
u32 sram_word1; /* 0x7008 */
u32 sram_word2; /* 0x700C */
u32 sram_word3; /* 0x7010 */
u32 sram_word4; /* 0x7014 */
-} MMC_t, *PMMC_t;
+};
/* END OF MMC REGISTER ADDRESS MAP */
@@ -1685,9 +1685,9 @@ typedef struct _ADDRESS_MAP_t {
MAC_STAT_t macStat;
/* unused section of mac stat address map */
u8 unused_mac_stat[4096 - sizeof(MAC_STAT_t)];
- MMC_t mmc;
+ struct mmc_regs mmc;
/* unused section of mmc address map */
- u8 unused_mmc[4096 - sizeof(MMC_t)];
+ u8 unused_mmc[4096 - sizeof(struct mmc_regs)];
/* unused section of address map */
u8 unused_[1015808];
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Alan Cox <alan@linux.intel.com>
All the contents are clean so kill off the top level typedefs
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/et131x/et1310_address_map.h | 8 ++++----
drivers/staging/et131x/et1310_tx.c | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/et131x/et1310_address_map.h b/drivers/staging/et131x/et1310_address_map.h
index 16254b7..43bd303 100644
--- a/drivers/staging/et131x/et1310_address_map.h
+++ b/drivers/staging/et131x/et1310_address_map.h
@@ -253,7 +253,7 @@ extern inline void add_12bit(u32 *v, int n)
* Tx DMA Module of JAGCore Address Mapping
* Located at address 0x1000
*/
-typedef struct _TXDMA_t { /* Location: */
+struct txdma_regs { /* Location: */
u32 csr; /* 0x1000 */
u32 pr_base_hi; /* 0x1004 */
u32 pr_base_lo; /* 0x1008 */
@@ -280,7 +280,7 @@ typedef struct _TXDMA_t { /* Location: */
u32 DroppedTLPCount; /* 0x105c */
u32 NewServiceComplete; /* 0x1060 */
u32 EthernetPacketCount; /* 0x1064 */
-} TXDMA_t, *PTXDMA_t;
+};
/* END OF TXDMA REGISTER ADDRESS MAP */
@@ -1667,9 +1667,9 @@ typedef struct _ADDRESS_MAP_t {
struct global_regs global;
/* unused section of global address map */
u8 unused_global[4096 - sizeof(struct global_regs)];
- TXDMA_t txdma;
+ struct txdma_regs txdma;
/* unused section of txdma address map */
- u8 unused_txdma[4096 - sizeof(TXDMA_t)];
+ u8 unused_txdma[4096 - sizeof(struct txdma_regs)];
struct rxdma_regs rxdma;
/* unused section of rxdma address map */
u8 unused_rxdma[4096 - sizeof(struct rxdma_regs)];
diff --git a/drivers/staging/et131x/et1310_tx.c b/drivers/staging/et131x/et1310_tx.c
index 977e8b3..b0cb057 100644
--- a/drivers/staging/et131x/et1310_tx.c
+++ b/drivers/staging/et131x/et1310_tx.c
@@ -200,7 +200,7 @@ void et131x_tx_dma_memory_free(struct et131x_adapter *adapter)
*/
void ConfigTxDmaRegs(struct ...From: Alan Cox <alan@linux.intel.com>
All the contents of this type are now clean, so kill the top level type
as well
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/et131x/et1310_address_map.h | 11 ++++++-----
drivers/staging/et131x/et1310_mac.c | 16 ++++++++--------
2 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/drivers/staging/et131x/et1310_address_map.h b/drivers/staging/et131x/et1310_address_map.h
index 446b2ac..11e7b65 100644
--- a/drivers/staging/et131x/et1310_address_map.h
+++ b/drivers/staging/et131x/et1310_address_map.h
@@ -1464,8 +1464,9 @@ typedef struct _MAC_t { /* Location: */
/*
* MAC STATS Module of JAGCore Address Mapping
*/
-typedef struct _MAC_STAT_t { /* Location: */
- u32 pad[32]; /* 0x6000 - 607C */
+struct macstat_regs
+{ /* Location: */
+ u32 pad[32]; /* 0x6000 - 607C */
/* Tx/Rx 0-64 Byte Frame Counter */
u32 TR64; /* 0x6080 */
@@ -1610,7 +1611,7 @@ typedef struct _MAC_STAT_t { /* Location: */
/* Carry Register Two Mask Register */
u32 Carry2M; /* 0x613C */
-} MAC_STAT_t, *PMAC_STAT_t;
+};
/* END OF MAC STAT REGISTER ADDRESS MAP */
@@ -1682,9 +1683,9 @@ typedef struct _ADDRESS_MAP_t {
MAC_t mac;
/* unused section of mac address map */
u8 unused_mac[4096 - sizeof(MAC_t)];
- MAC_STAT_t macStat;
+ struct macstat_regs macstat;
/* unused section of mac stat address map */
- u8 unused_mac_stat[4096 - sizeof(MAC_STAT_t)];
+ u8 unused_mac_stat[4096 - sizeof(struct macstat_regs)];
struct mmc_regs mmc;
/* unused section of mmc address map */
u8 unused_mmc[4096 - sizeof(struct mmc_regs)];
diff --git a/drivers/staging/et131x/et1310_mac.c b/drivers/staging/et131x/et1310_mac.c
index b8a1f20..a02bce0 100644
--- a/drivers/staging/et131x/et1310_mac.c
+++ b/drivers/staging/et131x/et1310_mac.c
@@ -384,8 +384,8 @@ void ConfigTxMacRegs(struct et131x_adapter *etdev)
void ...From: Alan Cox <alan@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/et131x/et1310_rx.c | 10 ++++------
drivers/staging/et131x/et1310_rx.h | 28 ++++++----------------------
2 files changed, 10 insertions(+), 28 deletions(-)
diff --git a/drivers/staging/et131x/et1310_rx.c b/drivers/staging/et131x/et1310_rx.c
index ee6436a..0e12709 100644
--- a/drivers/staging/et131x/et1310_rx.c
+++ b/drivers/staging/et131x/et1310_rx.c
@@ -797,21 +797,19 @@ PMP_RFD nic_rx_pkts(struct et131x_adapter *etdev)
uint16_t bindex;
u32 len;
PKT_STAT_DESC_WORD0_t Word0;
+ u32 word1;
/* RX Status block is written by the DMA engine prior to every
* interrupt. It contains the next to be used entry in the Packet
* Status Ring, and also the two Free Buffer rings.
*/
status = (PRX_STATUS_BLOCK_t) rx_local->pRxStatusVa;
+ word1 = status->Word1 >> 16; /* Get the useful bits */
- /* FIXME: tidy later when conversions complete */
- if (status->Word1.bits.PSRoffset ==
- (rx_local->local_psr_full & 0xFFF) &&
- status->Word1.bits.PSRwrap ==
- ((rx_local->local_psr_full >> 12) & 1)) {
+ /* Check the PSR and wrap bits do not match */
+ if ((word1 & 0x1FFF) == (rx_local->local_psr_full & 0x1FFF))
/* Looks like this ring is not updated yet */
return NULL;
- }
/* The packet status ring indicates that data is available. */
psr = (PPKT_STAT_DESC_t) (rx_local->pPSRingVa) +
diff --git a/drivers/staging/et131x/et1310_rx.h b/drivers/staging/et131x/et1310_rx.h
index afa670e..a46788d 100644
--- a/drivers/staging/et131x/et1310_rx.h
+++ b/drivers/staging/et131x/et1310_rx.h
@@ -211,36 +211,20 @@ typedef struct _PKT_STAT_DESC_t {
* RXSTAT_WORD1_t structure holds part of the status bits of the Rx DMA engine
* that get copied out to memory by the ET-1310. Word 3 is a 32 bit word
* which contains the Packet Status Ring available offset.
+ *
+ * bit 0-15 reserved
+ * bit 16-27 ...From: Alan Cox <alan@linux.intel.com>
Another verbose enum we don't need
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/et131x/et1310_rx.h | 5 -----
1 files changed, 0 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/et131x/et1310_rx.h b/drivers/staging/et131x/et1310_rx.h
index a46788d..2ba74b5 100644
--- a/drivers/staging/et131x/et1310_rx.h
+++ b/drivers/staging/et131x/et1310_rx.h
@@ -238,11 +238,6 @@ typedef struct _FbrLookupTable {
u32 PALow[MAX_DESC_PER_RING_RX];
} FBRLOOKUPTABLE, *PFBRLOOKUPTABLE;
-typedef enum {
- ONE_PACKET_INTERRUPT,
- FOUR_PACKET_INTERRUPT
-} eRX_INTERRUPT_STATE_t, *PeRX_INTERRUPT_STATE_t;
-
/*
* RX_RING_t is sructure representing the adaptor's local reference(s) to the
* rings
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Alan Cox <alan@linux.intel.com>
So kill off the top level type and turn it into a struct
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/et131x/et1310_rx.c | 12 ++++++------
drivers/staging/et131x/et1310_rx.h | 8 ++++----
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/staging/et131x/et1310_rx.c b/drivers/staging/et131x/et1310_rx.c
index 0e12709..7a41346 100644
--- a/drivers/staging/et131x/et1310_rx.c
+++ b/drivers/staging/et131x/et1310_rx.c
@@ -361,8 +361,8 @@ int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter)
/* Allocate an area of memory for writeback of status information */
rx_ring->pRxStatusVa = pci_alloc_consistent(adapter->pdev,
- sizeof(RX_STATUS_BLOCK_t),
- &rx_ring->pRxStatusPa);
+ sizeof(struct rx_status_block),
+ &rx_ring->pRxStatusPa);
if (!rx_ring->pRxStatusVa) {
dev_err(&adapter->pdev->dev,
"Cannot alloc memory for Status Block\n");
@@ -508,7 +508,7 @@ void et131x_rx_dma_memory_free(struct et131x_adapter *adapter)
/* Free area of memory for the writeback of status information */
if (rx_ring->pRxStatusVa) {
pci_free_consistent(adapter->pdev,
- sizeof(RX_STATUS_BLOCK_t),
+ sizeof(struct rx_status_block),
rx_ring->pRxStatusVa, rx_ring->pRxStatusPa);
rx_ring->pRxStatusVa = NULL;
@@ -614,7 +614,7 @@ void ConfigRxDmaRegs(struct et131x_adapter *etdev)
&rx_dma->dma_wb_base_hi);
writel((u32) rx_local->pRxStatusPa, &rx_dma->dma_wb_base_lo);
- memset(rx_local->pRxStatusVa, 0, sizeof(RX_STATUS_BLOCK_t));
+ memset(rx_local->pRxStatusVa, 0, sizeof(struct rx_status_block));
/* Set the address and parameters of the packet status ring into the
* 1310's registers
@@ -786,7 +786,7 @@ void et131x_rx_dma_enable(struct et131x_adapter *etdev)
PMP_RFD nic_rx_pkts(struct et131x_adapter *etdev)
{
struct _rx_ring_t *rx_local = ...From: Alan Cox <alan@linux.intel.com> All the subtypes are sane so just turn it into something struct and linux like Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/et131x/et1310_rx.c | 65 +++++++++++++++++------------------ drivers/staging/et131x/et1310_rx.h | 16 ++++---- 2 files changed, 40 insertions(+), 41 deletions(-) diff --git a/drivers/staging/et131x/et1310_rx.c b/drivers/staging/et131x/et1310_rx.c index 6719c4e..cdc9105 100644 --- a/drivers/staging/et131x/et1310_rx.c +++ b/drivers/staging/et131x/et1310_rx.c @@ -116,10 +116,9 @@ int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter) /* Alloc memory for the lookup table */ #ifdef USE_FBR0 - rx_ring->Fbr[0] = kmalloc(sizeof(FBRLOOKUPTABLE), GFP_KERNEL); + rx_ring->fbr[0] = kmalloc(sizeof(struct fbr_lookup), GFP_KERNEL); #endif - - rx_ring->Fbr[1] = kmalloc(sizeof(FBRLOOKUPTABLE), GFP_KERNEL); + rx_ring->fbr[1] = kmalloc(sizeof(struct fbr_lookup), GFP_KERNEL); /* The first thing we will do is configure the sizes of the buffer * rings. These will change based on jumbo packet support. Larger @@ -270,23 +269,23 @@ int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter) /* Save the Virtual address of this index for quick * access later */ - rx_ring->Fbr[1]->Va[index] = + rx_ring->fbr[1]->virt[index] = (uint8_t *) rx_ring->Fbr1MemVa[i] + (j * rx_ring->Fbr1BufferSize) + Fbr1Offset; /* now store the physical address in the descriptor * so the device can access it */ - rx_ring->Fbr[1]->PAHigh[index] = + rx_ring->fbr[1]->bus_high[index] = (u32) (Fbr1TempPa >> 32); - rx_ring->Fbr[1]->PALow[index] = (u32) Fbr1TempPa; + rx_ring->fbr[1]->bus_low[index] = (u32) Fbr1TempPa; Fbr1TempPa += rx_ring->Fbr1BufferSize; - rx_ring->Fbr[1]->Buffer1[index] = - rx_ring->Fbr[1]->Va[index]; - rx_ring->Fbr[1]->Buffer2[index] = - ...
From: Alan Cox <alan@linux.intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/et131x/et1310_rx.c | 49 ++++++------- drivers/staging/et131x/et1310_rx.h | 140 ++++++++++++------------------------ 2 files changed, 70 insertions(+), 119 deletions(-) diff --git a/drivers/staging/et131x/et1310_rx.c b/drivers/staging/et131x/et1310_rx.c index cdc9105..a95e6c6 100644 --- a/drivers/staging/et131x/et1310_rx.c +++ b/drivers/staging/et131x/et1310_rx.c @@ -193,7 +193,7 @@ int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter) &rx_ring->Fbr1Realpa, &rx_ring->Fbr1offset, 0x0FFF); - rx_ring->pFbr1RingVa = (void *)((uint8_t *) rx_ring->pFbr1RingVa + + rx_ring->pFbr1RingVa = (void *)((u8 *) rx_ring->pFbr1RingVa + rx_ring->Fbr1offset); #ifdef USE_FBR0 @@ -222,7 +222,7 @@ int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter) &rx_ring->Fbr0Realpa, &rx_ring->Fbr0offset, 0x0FFF); - rx_ring->pFbr0RingVa = (void *)((uint8_t *) rx_ring->pFbr0RingVa + + rx_ring->pFbr0RingVa = (void *)((u8 *) rx_ring->pFbr0RingVa + rx_ring->Fbr0offset); #endif @@ -270,7 +270,7 @@ int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter) * access later */ rx_ring->fbr[1]->virt[index] = - (uint8_t *) rx_ring->Fbr1MemVa[i] + + (u8 *) rx_ring->Fbr1MemVa[i] + (j * rx_ring->Fbr1BufferSize) + Fbr1Offset; /* now store the physical address in the descriptor @@ -319,7 +319,7 @@ int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter) u32 index = (i * FBR_CHUNKS) + j; rx_ring->fbr[0]->virt[index] = - (uint8_t *) rx_ring->Fbr0MemVa[i] + + (u8 *) rx_ring->Fbr0MemVa[i] + (j * rx_ring->Fbr0BufferSize) + Fbr0Offset; rx_ring->fbr[0]->bus_high[index] = @@ -338,7 +338,7 @@ int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter) /* Allocate an area of memory for ...
From: Alan Cox <alan@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/et131x/et131x_adapter.h | 9 ---------
1 files changed, 0 insertions(+), 9 deletions(-)
diff --git a/drivers/staging/et131x/et131x_adapter.h b/drivers/staging/et131x/et131x_adapter.h
index e4e3185..8b525b0 100644
--- a/drivers/staging/et131x/et131x_adapter.h
+++ b/drivers/staging/et131x/et131x_adapter.h
@@ -100,15 +100,6 @@
#define LO_MARK_PERCENT_FOR_PSR 15
#define LO_MARK_PERCENT_FOR_RX 15
-/* Counters for error rate monitoring */
-typedef struct _MP_ERR_COUNTERS {
- u32 PktCountTxPackets;
- u32 PktCountTxErrors;
- u32 TimerBasedTxErrors;
- u32 PktCountLastError;
- u32 ErredConsecPackets;
-} MP_ERR_COUNTERS, *PMP_ERR_COUNTERS;
-
/* RFD (Receive Frame Descriptor) */
typedef struct _MP_RFD {
struct list_head list_node;
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Alan Cox <alan@linux.intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/et131x/et131x_adapter.h | 18 ------------------ 1 files changed, 0 insertions(+), 18 deletions(-) diff --git a/drivers/staging/et131x/et131x_adapter.h b/drivers/staging/et131x/et131x_adapter.h index 8b525b0..6f7bb2d 100644 --- a/drivers/staging/et131x/et131x_adapter.h +++ b/drivers/staging/et131x/et131x_adapter.h @@ -77,25 +77,7 @@ */ #define NUM_TRAFFIC_CLASSES 1 -/* - * There are three ways of counting errors - if there are more than X errors - * in Y packets (represented by the "SAMPLE" macros), if there are more than - * N errors in a S mSec time period (the "PERIOD" macros), or if there are - * consecutive packets with errors (CONSEC_ERRORED_THRESH). This last covers - * for "Bursty" errors, and the errored packets may well not be contiguous, - * but several errors where the packet counter has changed by less than a - * small amount will cause this count to increment. - */ -#define TX_PACKETS_IN_SAMPLE 10000 -#define TX_MAX_ERRORS_IN_SAMPLE 50 - #define TX_ERROR_PERIOD 1000 -#define TX_MAX_ERRORS_IN_PERIOD 10 - -#define LINK_DETECTION_TIMER 5000 - -#define TX_CONSEC_RANGE 5 -#define TX_CONSEC_ERRORED_THRESH 10 #define LO_MARK_PERCENT_FOR_PSR 15 #define LO_MARK_PERCENT_FOR_RX 15 -- 1.7.0.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Alan Cox <alan@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/et131x/et1310_address_map.h | 23 ++++++-----------------
1 files changed, 6 insertions(+), 17 deletions(-)
diff --git a/drivers/staging/et131x/et1310_address_map.h b/drivers/staging/et131x/et1310_address_map.h
index 5fcb483..c8b22ba 100644
--- a/drivers/staging/et131x/et1310_address_map.h
+++ b/drivers/staging/et131x/et1310_address_map.h
@@ -563,23 +563,12 @@ struct rxdma_regs { /* Location: */
/*
* structure for error count reg in txmac address map
* located at address 0x3008
+ *
+ * 31-12: unused
+ * 11-8: reserved
+ * 7-4: txq_underrun
+ * 3-0: fifo_underrun
*/
-typedef union _TXMAC_ERR_CNT_t {
- u32 value;
- struct {
-#ifdef _BIT_FIELDS_HTOL
- u32 unused:20; /* bits 12-31 */
- u32 reserved:4; /* bits 8-11 */
- u32 txq_underrun:4; /* bits 4-7 */
- u32 fifo_underrun:4; /* bits 0-3 */
-#else
- u32 fifo_underrun:4; /* bits 0-3 */
- u32 txq_underrun:4; /* bits 4-7 */
- u32 reserved:4; /* bits 8-11 */
- u32 unused:20; /* bits 12-31 */
-#endif
- } bits;
-} TXMAC_ERR_CNT_t, *PTXMAC_ERR_CNT_t;
/*
* structure for max fill reg in txmac address map
@@ -682,7 +671,7 @@ typedef union _TXMAC_ERR_INT_t {
typedef struct _TXMAC_t { /* Location: */
u32 ctl; /* 0x3000 */
u32 shadow_ptr; /* 0x3004 */
- TXMAC_ERR_CNT_t err_cnt; /* 0x3008 */
+ u32 err_cnt; /* 0x3008 */
u32 max_fill; /* 0x300C */
u32 cf_param; /* 0x3010 */
u32 tx_test; /* 0x3014 */
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Alan Cox <alan@linux.intel.com>
This is another one we don't really need to do much to get rid of
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/et131x/et1310_address_map.h | 38 ++++++++-------------------
drivers/staging/et131x/et131x_isr.c | 2 +-
2 files changed, 12 insertions(+), 28 deletions(-)
diff --git a/drivers/staging/et131x/et1310_address_map.h b/drivers/staging/et131x/et1310_address_map.h
index c8b22ba..4c1e735 100644
--- a/drivers/staging/et131x/et1310_address_map.h
+++ b/drivers/staging/et131x/et1310_address_map.h
@@ -597,33 +597,17 @@ struct rxdma_regs { /* Location: */
/*
* structure for error reg in txmac address map
* located at address 0x3018
+ *
+ * 31-9: unused
+ * 8: fifo_underrun
+ * 7-6: unused
+ * 5: ctrl2_err
+ * 4: txq_underrun
+ * 3: bcnt_err
+ * 2: lseg_err
+ * 1: segnum_err
+ * 0: seg0_err
*/
-typedef union _TXMAC_ERR_t {
- u32 value;
- struct {
-#ifdef _BIT_FIELDS_HTOL
- u32 unused2:23; /* bits 9-31 */
- u32 fifo_underrun:1; /* bit 8 */
- u32 unused1:2; /* bits 6-7 */
- u32 ctrl2_err:1; /* bit 5 */
- u32 txq_underrun:1; /* bit 4 */
- u32 bcnt_err:1; /* bit 3 */
- u32 lseg_err:1; /* bit 2 */
- u32 segnum_err:1; /* bit 1 */
- u32 seg0_err:1; /* bit 0 */
-#else
- u32 seg0_err:1; /* bit 0 */
- u32 segnum_err:1; /* bit 1 */
- u32 lseg_err:1; /* bit 2 */
- u32 bcnt_err:1; /* bit 3 */
- u32 txq_underrun:1; /* bit 4 */
- u32 ctrl2_err:1; /* bit 5 */
- u32 unused1:2; /* bits 6-7 */
- u32 fifo_underrun:1; /* bit 8 */
- u32 unused2:23; /* bits 9-31 */
-#endif
- } bits;
-} TXMAC_ERR_t, *PTXMAC_ERR_t;
/*
* structure for error interrupt reg in txmac address map
@@ -675,7 +659,7 @@ typedef struct _TXMAC_t { /* Location: */
u32 max_fill; /* 0x300C */
u32 cf_param; /* 0x3010 */
u32 tx_test; /* 0x3014 */
- TXMAC_ERR_t err; /* 0x3018 */
+ u32 err; /* 0x3018 */
...From: Alan Cox <alan@linux.intel.com>
Only used for one trivial thing so turn that into something trivial instead
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/et131x/et1310_address_map.h | 39 ++++++++------------------
drivers/staging/et131x/et1310_mac.c | 9 +++---
2 files changed, 16 insertions(+), 32 deletions(-)
diff --git a/drivers/staging/et131x/et1310_address_map.h b/drivers/staging/et131x/et1310_address_map.h
index 11e7b65..5fcb483 100644
--- a/drivers/staging/et131x/et1310_address_map.h
+++ b/drivers/staging/et131x/et1310_address_map.h
@@ -538,33 +538,18 @@ struct rxdma_regs { /* Location: */
/*
* structure for control reg in txmac address map
* located at address 0x3000
+ *
+ * bits
+ * 31-8: unused
+ * 7: cklseg_disable
+ * 6: ckbcnt_disable
+ * 5: cksegnum
+ * 4: async_disable
+ * 3: fc_disable
+ * 2: mcif_disable
+ * 1: mif_disable
+ * 0: txmac_en
*/
-typedef union _TXMAC_CTL_t {
- u32 value;
- struct {
-#ifdef _BIT_FIELDS_HTOL
- u32 unused:24; /* bits 8-31 */
- u32 cklseg_diable:1; /* bit 7 */
- u32 ckbcnt_disable:1; /* bit 6 */
- u32 cksegnum:1; /* bit 5 */
- u32 async_disable:1; /* bit 4 */
- u32 fc_disable:1; /* bit 3 */
- u32 mcif_disable:1; /* bit 2 */
- u32 mif_disable:1; /* bit 1 */
- u32 txmac_en:1; /* bit 0 */
-#else
- u32 txmac_en:1; /* bit 0 */
- u32 mif_disable:1; /* bit 1 mac interface */
- u32 mcif_disable:1; /* bit 2 mem. contr. interface */
- u32 fc_disable:1; /* bit 3 */
- u32 async_disable:1; /* bit 4 */
- u32 cksegnum:1; /* bit 5 */
- u32 ckbcnt_disable:1; /* bit 6 */
- u32 cklseg_diable:1; /* bit 7 */
- u32 unused:24; /* bits 8-31 */
-#endif
- } bits;
-} TXMAC_CTL_t, *PTXMAC_CTL_t;
/*
* structure for shadow pointer reg in txmac address map
@@ -695,7 +680,7 @@ typedef union _TXMAC_ERR_INT_t {
* Tx MAC Module of JAGCore Address Mapping
*/
typedef struct _TXMAC_t { /* Location: ...From: Alan Cox <alan@linux.intel.com>
Use the proper pointer types for the higher level pointers to the rx_status
object and kill casts
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/et131x/et1310_rx.c | 21 ++++++++++-----------
drivers/staging/et131x/et1310_rx.h | 4 ++--
2 files changed, 12 insertions(+), 13 deletions(-)
diff --git a/drivers/staging/et131x/et1310_rx.c b/drivers/staging/et131x/et1310_rx.c
index 7a41346..6719c4e 100644
--- a/drivers/staging/et131x/et1310_rx.c
+++ b/drivers/staging/et131x/et1310_rx.c
@@ -360,16 +360,16 @@ int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter)
*/
/* Allocate an area of memory for writeback of status information */
- rx_ring->pRxStatusVa = pci_alloc_consistent(adapter->pdev,
+ rx_ring->rx_status_block = pci_alloc_consistent(adapter->pdev,
sizeof(struct rx_status_block),
- &rx_ring->pRxStatusPa);
- if (!rx_ring->pRxStatusVa) {
+ &rx_ring->rx_status_bus);
+ if (!rx_ring->rx_status_block) {
dev_err(&adapter->pdev->dev,
"Cannot alloc memory for Status Block\n");
return -ENOMEM;
}
rx_ring->NumRfd = NIC_DEFAULT_NUM_RFD;
- printk("PRS %lx\n", (unsigned long)rx_ring->pRxStatusPa);
+ printk("PRS %lx\n", (unsigned long)rx_ring->rx_status_bus);
/* Recv
* pci_pool_create initializes a lookaside list. After successful
@@ -506,12 +506,11 @@ void et131x_rx_dma_memory_free(struct et131x_adapter *adapter)
}
/* Free area of memory for the writeback of status information */
- if (rx_ring->pRxStatusVa) {
+ if (rx_ring->rx_status_block) {
pci_free_consistent(adapter->pdev,
- sizeof(struct rx_status_block),
- rx_ring->pRxStatusVa, rx_ring->pRxStatusPa);
-
- rx_ring->pRxStatusVa = NULL;
+ sizeof(struct rx_status_block),
+ rx_ring->rx_status_block, rx_ring->rx_status_bus);
+ rx_ring->rx_status_block = NULL;
}
/* Free receive buffer pool */
@@ -614,7 +613,7 ...From: Alan Cox <alan@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/et131x/et1310_address_map.h | 46 +++++++--------------------
drivers/staging/et131x/et1310_mac.c | 20 ++++-------
2 files changed, 19 insertions(+), 47 deletions(-)
diff --git a/drivers/staging/et131x/et1310_address_map.h b/drivers/staging/et131x/et1310_address_map.h
index ebbbc1a..9441fe6 100644
--- a/drivers/staging/et131x/et1310_address_map.h
+++ b/drivers/staging/et131x/et1310_address_map.h
@@ -843,44 +843,22 @@ typedef union _RXMAC_UNI_PF_ADDR3_t {
/*
* structure for Memory Controller Interface Control Max Segment reg in rxmac
* address map. Located at address 0x4088
+ *
+ * 31-10: reserved
+ * 9-2: max_size
+ * 1: fc_en
+ * 0: seg_en
*/
-typedef union _RXMAC_MCIF_CTRL_MAX_SEG_t {
- u32 value;
- struct {
-#ifdef _BIT_FIELDS_HTOL
- u32 reserved:22; /* bits 10-31 */
- u32 max_size:8; /* bits 2-9 */
- u32 fc_en:1; /* bit 1 */
- u32 seg_en:1; /* bit 0 */
-#else
- u32 seg_en:1; /* bit 0 */
- u32 fc_en:1; /* bit 1 */
- u32 max_size:8; /* bits 2-9 */
- u32 reserved:22; /* bits 10-31 */
-#endif
- } bits;
-} RXMAC_MCIF_CTRL_MAX_SEG_t, *PRXMAC_MCIF_CTRL_MAX_SEG_t;
/*
* structure for Memory Controller Interface Water Mark reg in rxmac address
* map. Located at address 0x408C
+ *
+ * 31-26: unused
+ * 25-16: mark_hi
+ * 15-10: unused
+ * 9-0: mark_lo
*/
-typedef union _RXMAC_MCIF_WATER_MARK_t {
- u32 value;
- struct {
-#ifdef _BIT_FIELDS_HTOL
- u32 reserved2:6; /* bits 26-31 */
- u32 mark_hi:10; /* bits 16-25 */
- u32 reserved1:6; /* bits 10-15 */
- u32 mark_lo:10; /* bits 0-9 */
-#else
- u32 mark_lo:10; /* bits 0-9 */
- u32 reserved1:6; /* bits 10-15 */
- u32 mark_hi:10; /* bits 16-25 */
- u32 reserved2:6; /* bits 26-31 */
-#endif
- } bits;
-} RXMAC_MCIF_WATER_MARK_t, *PRXMAC_MCIF_WATER_MARK_t;
/*
* structure for Rx Queue Dialog reg in rxmac ...From: Alan Cox <alan@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/et131x/et1310_address_map.h | 32 +++++++------------------
drivers/staging/et131x/et1310_mac.c | 18 ++++++--------
drivers/staging/et131x/et131x_netdev.c | 34 ++++++++++++--------------
3 files changed, 33 insertions(+), 51 deletions(-)
diff --git a/drivers/staging/et131x/et1310_address_map.h b/drivers/staging/et131x/et1310_address_map.h
index 67aef73..ebbbc1a 100644
--- a/drivers/staging/et131x/et1310_address_map.h
+++ b/drivers/staging/et131x/et1310_address_map.h
@@ -830,29 +830,15 @@ typedef union _RXMAC_UNI_PF_ADDR3_t {
/*
* structure for Packet Filter Control reg in rxmac address map
* located at address 0x4084
+ *
+ * 31-23: unused
+ * 22-16: min_pkt_size
+ * 15-4: unused
+ * 3: filter_frag_en
+ * 2: filter_uni_en
+ * 1: filter_multi_en
+ * 0: filter_broad_en
*/
-typedef union _RXMAC_PF_CTRL_t {
- u32 value;
- struct {
-#ifdef _BIT_FIELDS_HTOL
- u32 unused2:9; /* bits 23-31 */
- u32 min_pkt_size:7; /* bits 16-22 */
- u32 unused1:12; /* bits 4-15 */
- u32 filter_frag_en:1; /* bit 3 */
- u32 filter_uni_en:1; /* bit 2 */
- u32 filter_multi_en:1; /* bit 1 */
- u32 filter_broad_en:1; /* bit 0 */
-#else
- u32 filter_broad_en:1; /* bit 0 */
- u32 filter_multi_en:1; /* bit 1 */
- u32 filter_uni_en:1; /* bit 2 */
- u32 filter_frag_en:1; /* bit 3 */
- u32 unused1:12; /* bits 4-15 */
- u32 min_pkt_size:7; /* bits 16-22 */
- u32 unused2:9; /* bits 23-31 */
-#endif
- } bits;
-} RXMAC_PF_CTRL_t, *PRXMAC_PF_CTRL_t;
/*
* structure for Memory Controller Interface Control Max Segment reg in rxmac
@@ -1017,7 +1003,7 @@ typedef struct _RXMAC_t { /* Location: */
u32 multi_hash2; /* 0x4078 */
u32 multi_hash3; /* 0x407C */
u32 multi_hash4; /* 0x4080 */
- RXMAC_PF_CTRL_t pf_ctrl; /* 0x4084 */
+ u32 pf_ctrl; /* 0x4084 */
...From: Alan Cox <alan@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/et131x/et1310_address_map.h | 23 ++++++-----------------
drivers/staging/et131x/et131x_isr.c | 2 +-
2 files changed, 7 insertions(+), 18 deletions(-)
diff --git a/drivers/staging/et131x/et1310_address_map.h b/drivers/staging/et131x/et1310_address_map.h
index 9441fe6..f8a9189 100644
--- a/drivers/staging/et131x/et1310_address_map.h
+++ b/drivers/staging/et131x/et1310_address_map.h
@@ -863,23 +863,12 @@ typedef union _RXMAC_UNI_PF_ADDR3_t {
/*
* structure for Rx Queue Dialog reg in rxmac address map.
* located at address 0x4090
+ *
+ * 31-26: reserved
+ * 25-16: rd_ptr
+ * 15-10: reserved
+ * 9-0: wr_ptr
*/
-typedef union _RXMAC_RXQ_DIAG_t {
- u32 value;
- struct {
-#ifdef _BIT_FIELDS_HTOL
- u32 reserved2:6; /* bits 26-31 */
- u32 rd_ptr:10; /* bits 16-25 */
- u32 reserved1:6; /* bits 10-15 */
- u32 wr_ptr:10; /* bits 0-9 */
-#else
- u32 wr_ptr:10; /* bits 0-9 */
- u32 reserved1:6; /* bits 10-15 */
- u32 rd_ptr:10; /* bits 16-25 */
- u32 reserved2:6; /* bits 26-31 */
-#endif
- } bits;
-} RXMAC_RXQ_DIAG_t, *PRXMAC_RXQ_DIAG_t;
/*
* structure for space availiable reg in rxmac address map.
@@ -984,7 +973,7 @@ typedef struct _RXMAC_t { /* Location: */
u32 pf_ctrl; /* 0x4084 */
u32 mcif_ctrl_max_seg; /* 0x4088 */
u32 mcif_water_mark; /* 0x408C */
- RXMAC_RXQ_DIAG_t rxq_diag; /* 0x4090 */
+ u32 rxq_diag; /* 0x4090 */
RXMAC_SPACE_AVAIL_t space_avail; /* 0x4094 */
RXMAC_MIF_CTL_t mif_ctrl; /* 0x4098 */
diff --git a/drivers/staging/et131x/et131x_isr.c b/drivers/staging/et131x/et131x_isr.c
index aa36e40..5ff8665 100644
--- a/drivers/staging/et131x/et131x_isr.c
+++ b/drivers/staging/et131x/et131x_isr.c
@@ -446,7 +446,7 @@ void et131x_isr_handler(struct work_struct *work)
dev_warn(&etdev->pdev->dev,
"Enable 0x%08x, Diag ...From: Alan Cox <alan@linux.intel.com> This completes the typedef clean up of the rx specific structures, although there is plenty do on field names and the like Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/et131x/et1310_rx.c | 54 +++++++++++++++--------------- drivers/staging/et131x/et1310_rx.h | 8 ++-- drivers/staging/et131x/et131x_adapter.h | 2 +- drivers/staging/et131x/et131x_isr.c | 2 +- 4 files changed, 33 insertions(+), 33 deletions(-) diff --git a/drivers/staging/et131x/et1310_rx.c b/drivers/staging/et131x/et1310_rx.c index a95e6c6..232ceb6 100644 --- a/drivers/staging/et131x/et1310_rx.c +++ b/drivers/staging/et131x/et1310_rx.c @@ -109,10 +109,10 @@ int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter) u32 i, j; u32 bufsize; u32 pktStatRingSize, FBRChunkSize; - RX_RING_t *rx_ring; + struct rx_ring *rx_ring; /* Setup some convenience pointers */ - rx_ring = (RX_RING_t *) &adapter->RxRing; + rx_ring = &adapter->rx_ring; /* Alloc memory for the lookup table */ #ifdef USE_FBR0 @@ -162,10 +162,10 @@ int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter) } #ifdef USE_FBR0 - adapter->RxRing.PsrNumEntries = adapter->RxRing.Fbr0NumEntries + - adapter->RxRing.Fbr1NumEntries; + adapter->rx_ring.PsrNumEntries = adapter->rx_ring.Fbr0NumEntries + + adapter->rx_ring.Fbr1NumEntries; #else - adapter->RxRing.PsrNumEntries = adapter->RxRing.Fbr1NumEntries; + adapter->rx_ring.PsrNumEntries = adapter->rx_ring.Fbr1NumEntries; #endif /* Allocate an area of memory for Free Buffer Ring 1 */ @@ -338,7 +338,7 @@ int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter) /* Allocate an area of memory for FIFO of Packet Status ring entries */ pktStatRingSize = - sizeof(struct pkt_stat_desc) * adapter->RxRing.PsrNumEntries; + sizeof(struct pkt_stat_desc) * adapter->rx_ring.PsrNumEntries; ...
From: Alan Cox <alan@linux.intel.com>
This completes the structures within the txmac block so we can now
propogate a name change and type removal up a layer and clean up TXMAC as
well
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/et131x/et1310_address_map.h | 48 +++++++++------------------
drivers/staging/et131x/et1310_mac.c | 6 ++--
2 files changed, 19 insertions(+), 35 deletions(-)
diff --git a/drivers/staging/et131x/et1310_address_map.h b/drivers/staging/et131x/et1310_address_map.h
index 4c1e735..d599f31 100644
--- a/drivers/staging/et131x/et1310_address_map.h
+++ b/drivers/staging/et131x/et1310_address_map.h
@@ -612,33 +612,17 @@ struct rxdma_regs { /* Location: */
/*
* structure for error interrupt reg in txmac address map
* located at address 0x301C
+ *
+ * 31-9: unused
+ * 8: fifo_underrun
+ * 7-6: unused
+ * 5: ctrl2_err
+ * 4: txq_underrun
+ * 3: bcnt_err
+ * 2: lseg_err
+ * 1: segnum_err
+ * 0: seg0_err
*/
-typedef union _TXMAC_ERR_INT_t {
- u32 value;
- struct {
-#ifdef _BIT_FIELDS_HTOL
- u32 unused2:23; /* bits 9-31 */
- u32 fifo_underrun:1; /* bit 8 */
- u32 unused1:2; /* bits 6-7 */
- u32 ctrl2_err:1; /* bit 5 */
- u32 txq_underrun:1; /* bit 4 */
- u32 bcnt_err:1; /* bit 3 */
- u32 lseg_err:1; /* bit 2 */
- u32 segnum_err:1; /* bit 1 */
- u32 seg0_err:1; /* bit 0 */
-#else
- u32 seg0_err:1; /* bit 0 */
- u32 segnum_err:1; /* bit 1 */
- u32 lseg_err:1; /* bit 2 */
- u32 bcnt_err:1; /* bit 3 */
- u32 txq_underrun:1; /* bit 4 */
- u32 ctrl2_err:1; /* bit 5 */
- u32 unused1:2; /* bits 6-7 */
- u32 fifo_underrun:1; /* bit 8 */
- u32 unused2:23; /* bits 9-31 */
-#endif
- } bits;
-} TXMAC_ERR_INT_t, *PTXMAC_ERR_INT_t;
/*
* structure for error interrupt reg in txmac address map
@@ -652,7 +636,7 @@ typedef union _TXMAC_ERR_INT_t {
/*
* Tx MAC Module of JAGCore Address Mapping
*/
-typedef struct _TXMAC_t ...From: Alan Cox <alan@linux.intel.com>
More we don't need
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/et131x/et1310_address_map.h | 82 ++++++--------------------
drivers/staging/et131x/et1310_mac.c | 6 +-
2 files changed, 22 insertions(+), 66 deletions(-)
diff --git a/drivers/staging/et131x/et1310_address_map.h b/drivers/staging/et131x/et1310_address_map.h
index d599f31..67aef73 100644
--- a/drivers/staging/et131x/et1310_address_map.h
+++ b/drivers/staging/et131x/et1310_address_map.h
@@ -684,77 +684,33 @@ typedef union _RXMAC_CTRL_t {
/*
* structure for Wake On Lan Control and CRC 0 reg in rxmac address map
* located at address 0x4004
+ * 31-16: crc
+ * 15-12: reserved
+ * 11: ignore_pp
+ * 10: ignore_mp
+ * 9: clr_intr
+ * 8: ignore_link_chg
+ * 7: ignore_uni
+ * 6: ignore_multi
+ * 5: ignore_broad
+ * 4-0: valid_crc 4-0
*/
-typedef union _RXMAC_WOL_CTL_CRC0_t {
- u32 value;
- struct {
-#ifdef _BIT_FIELDS_HTOL
- u32 crc0:16; /* bits 16-31 */
- u32 reserve:4; /* bits 12-15 */
- u32 ignore_pp:1; /* bit 11 */
- u32 ignore_mp:1; /* bit 10 */
- u32 clr_intr:1; /* bit 9 */
- u32 ignore_link_chg:1; /* bit 8 */
- u32 ignore_uni:1; /* bit 7 */
- u32 ignore_multi:1; /* bit 6 */
- u32 ignore_broad:1; /* bit 5 */
- u32 valid_crc4:1; /* bit 4 */
- u32 valid_crc3:1; /* bit 3 */
- u32 valid_crc2:1; /* bit 2 */
- u32 valid_crc1:1; /* bit 1 */
- u32 valid_crc0:1; /* bit 0 */
-#else
- u32 valid_crc0:1; /* bit 0 */
- u32 valid_crc1:1; /* bit 1 */
- u32 valid_crc2:1; /* bit 2 */
- u32 valid_crc3:1; /* bit 3 */
- u32 valid_crc4:1; /* bit 4 */
- u32 ignore_broad:1; /* bit 5 */
- u32 ignore_multi:1; /* bit 6 */
- u32 ignore_uni:1; /* bit 7 */
- u32 ignore_link_chg:1; /* bit 8 */
- u32 clr_intr:1; /* bit 9 */
- u32 ignore_mp:1; /* bit 10 */
- u32 ignore_pp:1; /* bit 11 */
- u32 reserve:4; /* bits 12-15 */
- u32 crc0:16; /* bits 16-31 ...From: Alan Cox <alan@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/et131x/et1310_address_map.h | 23 ++++++-----------------
drivers/staging/et131x/et1310_mac.c | 2 +-
2 files changed, 7 insertions(+), 18 deletions(-)
diff --git a/drivers/staging/et131x/et1310_address_map.h b/drivers/staging/et131x/et1310_address_map.h
index f8a9189..f434b86 100644
--- a/drivers/staging/et131x/et1310_address_map.h
+++ b/drivers/staging/et131x/et1310_address_map.h
@@ -873,23 +873,12 @@ typedef union _RXMAC_UNI_PF_ADDR3_t {
/*
* structure for space availiable reg in rxmac address map.
* located at address 0x4094
+ *
+ * 31-17: reserved
+ * 16: space_avail_en
+ * 15-10: reserved
+ * 9-0: space_avail
*/
-typedef union _RXMAC_SPACE_AVAIL_t {
- u32 value;
- struct {
-#ifdef _BIT_FIELDS_HTOL
- u32 reserved2:15; /* bits 17-31 */
- u32 space_avail_en:1; /* bit 16 */
- u32 reserved1:6; /* bits 10-15 */
- u32 space_avail:10; /* bits 0-9 */
-#else
- u32 space_avail:10; /* bits 0-9 */
- u32 reserved1:6; /* bits 10-15 */
- u32 space_avail_en:1; /* bit 16 */
- u32 reserved2:15; /* bits 17-31 */
-#endif
- } bits;
-} RXMAC_SPACE_AVAIL_t, *PRXMAC_SPACE_AVAIL_t;
/*
* structure for management interface reg in rxmac address map.
@@ -974,7 +963,7 @@ typedef struct _RXMAC_t { /* Location: */
u32 mcif_ctrl_max_seg; /* 0x4088 */
u32 mcif_water_mark; /* 0x408C */
u32 rxq_diag; /* 0x4090 */
- RXMAC_SPACE_AVAIL_t space_avail; /* 0x4094 */
+ u32 space_avail; /* 0x4094 */
RXMAC_MIF_CTL_t mif_ctrl; /* 0x4098 */
RXMAC_ERROR_REG_t err_reg; /* 0x409C */
diff --git a/drivers/staging/et131x/et1310_mac.c b/drivers/staging/et131x/et1310_mac.c
index 8302098..1b4c0e6 100644
--- a/drivers/staging/et131x/et1310_mac.c
+++ b/drivers/staging/et131x/et1310_mac.c
@@ -336,7 +336,7 @@ void ConfigRxMacRegs(struct et131x_adapter *etdev)
writel(0, ...From: Alan Cox <alan@linux.intel.com> We have lots of tiny files right now that could be one Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/et131x/et1310_eeprom.c | 39 +++++++-- drivers/staging/et131x/et1310_eeprom.h | 103 --------------------- drivers/staging/et131x/et1310_jagcore.h | 94 ------------------- drivers/staging/et131x/et1310_mac.c | 17 +++- drivers/staging/et131x/et1310_mac.h | 93 ------------------- drivers/staging/et131x/et1310_phy.c | 7 +- drivers/staging/et131x/et1310_phy.h | 34 ------- drivers/staging/et131x/et1310_pm.c | 6 +- drivers/staging/et131x/et1310_pm.h | 85 ----------------- drivers/staging/et131x/et1310_rx.c | 7 +- drivers/staging/et131x/et1310_rx.h | 24 ----- drivers/staging/et131x/et1310_tx.c | 8 +-- drivers/staging/et131x/et1310_tx.h | 14 --- drivers/staging/et131x/et131x.h | 153 +++++++++++++++++++++++++++++++ drivers/staging/et131x/et131x_adapter.h | 14 +++ drivers/staging/et131x/et131x_config.h | 67 -------------- drivers/staging/et131x/et131x_initpci.c | 10 +-- drivers/staging/et131x/et131x_initpci.h | 73 --------------- drivers/staging/et131x/et131x_isr.c | 24 ++++- drivers/staging/et131x/et131x_isr.h | 65 ------------- drivers/staging/et131x/et131x_netdev.c | 7 +- drivers/staging/et131x/et131x_netdev.h | 64 ------------- drivers/staging/et131x/et131x_version.h | 9 +-- 23 files changed, 241 insertions(+), 776 deletions(-) delete mode 100644 drivers/staging/et131x/et1310_eeprom.h delete mode 100644 drivers/staging/et131x/et1310_jagcore.h delete mode 100644 drivers/staging/et131x/et1310_mac.h delete mode 100644 drivers/staging/et131x/et1310_pm.h create mode 100644 drivers/staging/et131x/et131x.h delete mode 100644 drivers/staging/et131x/et131x_config.h delete mode 100644 drivers/staging/et131x/et131x_initpci.h delete ...
From: Alan Cox <alan@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/et131x/et1310_address_map.h | 20 +++++---------------
drivers/staging/et131x/et1310_mac.c | 6 +++---
2 files changed, 8 insertions(+), 18 deletions(-)
diff --git a/drivers/staging/et131x/et1310_address_map.h b/drivers/staging/et131x/et1310_address_map.h
index f434b86..e571093 100644
--- a/drivers/staging/et131x/et1310_address_map.h
+++ b/drivers/staging/et131x/et1310_address_map.h
@@ -883,21 +883,11 @@ typedef union _RXMAC_UNI_PF_ADDR3_t {
/*
* structure for management interface reg in rxmac address map.
* located at address 0x4098
+ *
+ * 31-18: reserved
+ * 17: drop_pkt_en
+ * 16-0: drop_pkt_mask
*/
-typedef union _RXMAC_MIF_CTL_t {
- u32 value;
- struct {
-#ifdef _BIT_FIELDS_HTOL
- u32 reserve:14; /* bits 18-31 */
- u32 drop_pkt_en:1; /* bit 17 */
- u32 drop_pkt_mask:17; /* bits 0-16 */
-#else
- u32 drop_pkt_mask:17; /* bits 0-16 */
- u32 drop_pkt_en:1; /* bit 17 */
- u32 reserve:14; /* bits 18-31 */
-#endif
- } bits;
-} RXMAC_MIF_CTL_t, *PRXMAC_MIF_CTL_t;
/*
* structure for Error reg in rxmac address map.
@@ -965,7 +955,7 @@ typedef struct _RXMAC_t { /* Location: */
u32 rxq_diag; /* 0x4090 */
u32 space_avail; /* 0x4094 */
- RXMAC_MIF_CTL_t mif_ctrl; /* 0x4098 */
+ u32 mif_ctrl; /* 0x4098 */
RXMAC_ERROR_REG_t err_reg; /* 0x409C */
} RXMAC_t, *PRXMAC_t;
diff --git a/drivers/staging/et131x/et1310_mac.c b/drivers/staging/et131x/et1310_mac.c
index 1b4c0e6..a9f924d 100644
--- a/drivers/staging/et131x/et1310_mac.c
+++ b/drivers/staging/et131x/et1310_mac.c
@@ -333,7 +333,7 @@ void ConfigRxMacRegs(struct et131x_adapter *etdev)
writel(0, &pRxMac->mcif_water_mark);
/* Initialize the MIF control */
- writel(0, &pRxMac->mif_ctrl.value);
+ writel(0, &pRxMac->mif_ctrl);
/* Initialize the Space Available Register */
...From: Alan Cox <alan@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/et131x/et1310_address_map.h | 26 +++++++-------------------
drivers/staging/et131x/et131x_isr.c | 2 +-
2 files changed, 8 insertions(+), 20 deletions(-)
diff --git a/drivers/staging/et131x/et1310_address_map.h b/drivers/staging/et131x/et1310_address_map.h
index e571093..5f6a7b5 100644
--- a/drivers/staging/et131x/et1310_address_map.h
+++ b/drivers/staging/et131x/et1310_address_map.h
@@ -892,25 +892,13 @@ typedef union _RXMAC_UNI_PF_ADDR3_t {
/*
* structure for Error reg in rxmac address map.
* located at address 0x409C
+ *
+ * 31-4: unused
+ * 3: mif
+ * 2: async
+ * 1: pkt_filter
+ * 0: mcif
*/
-typedef union _RXMAC_ERROR_REG_t {
- u32 value;
- struct {
-#ifdef _BIT_FIELDS_HTOL
- u32 reserve:28; /* bits 4-31 */
- u32 mif:1; /* bit 3 */
- u32 async:1; /* bit 2 */
- u32 pkt_filter:1; /* bit 1 */
- u32 mcif:1; /* bit 0 */
-#else
- u32 mcif:1; /* bit 0 */
- u32 pkt_filter:1; /* bit 1 */
- u32 async:1; /* bit 2 */
- u32 mif:1; /* bit 3 */
- u32 reserve:28; /* bits 4-31 */
-#endif
- } bits;
-} RXMAC_ERROR_REG_t, *PRXMAC_ERROR_REG_t;
/*
* Rx MAC Module of JAGCore Address Mapping
@@ -956,7 +944,7 @@ typedef struct _RXMAC_t { /* Location: */
u32 space_avail; /* 0x4094 */
u32 mif_ctrl; /* 0x4098 */
- RXMAC_ERROR_REG_t err_reg; /* 0x409C */
+ u32 err_reg; /* 0x409C */
} RXMAC_t, *PRXMAC_t;
/* END OF RXMAC REGISTER ADDRESS MAP */
diff --git a/drivers/staging/et131x/et131x_isr.c b/drivers/staging/et131x/et131x_isr.c
index 5ff8665..87c8de6 100644
--- a/drivers/staging/et131x/et131x_isr.c
+++ b/drivers/staging/et131x/et131x_isr.c
@@ -441,7 +441,7 @@ void et131x_isr_handler(struct work_struct *work)
dev_warn(&etdev->pdev->dev,
"RXMAC interrupt, error 0x%08x. Requesting reset\n",
- ...From: Alan Cox <alan@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/et131x/et1310_address_map.h | 35 +++++++-------------------
drivers/staging/et131x/et1310_mac.c | 4 +-
drivers/staging/et131x/et131x_isr.c | 2 +-
drivers/staging/et131x/et131x_netdev.c | 14 +++++-----
4 files changed, 20 insertions(+), 35 deletions(-)
diff --git a/drivers/staging/et131x/et1310_address_map.h b/drivers/staging/et131x/et1310_address_map.h
index 5f6a7b5..1e0ffcd 100644
--- a/drivers/staging/et131x/et1310_address_map.h
+++ b/drivers/staging/et131x/et1310_address_map.h
@@ -655,31 +655,16 @@ struct txmac_regs { /* Location: */
/*
* structure for rxmac control reg in rxmac address map
* located at address 0x4000
+ *
+ * 31-7: reserved
+ * 6: rxmac_int_disable
+ * 5: async_disable
+ * 4: mif_disable
+ * 3: wol_disable
+ * 2: pkt_filter_disable
+ * 1: mcif_disable
+ * 0: rxmac_en
*/
-typedef union _RXMAC_CTRL_t {
- u32 value;
- struct {
-#ifdef _BIT_FIELDS_HTOL
- u32 reserved:25; /* bits 7-31 */
- u32 rxmac_int_disable:1; /* bit 6 */
- u32 async_disable:1; /* bit 5 */
- u32 mif_disable:1; /* bit 4 */
- u32 wol_disable:1; /* bit 3 */
- u32 pkt_filter_disable:1; /* bit 2 */
- u32 mcif_disable:1; /* bit 1 */
- u32 rxmac_en:1; /* bit 0 */
-#else
- u32 rxmac_en:1; /* bit 0 */
- u32 mcif_disable:1; /* bit 1 */
- u32 pkt_filter_disable:1; /* bit 2 */
- u32 wol_disable:1; /* bit 3 */
- u32 mif_disable:1; /* bit 4 */
- u32 async_disable:1; /* bit 5 */
- u32 rxmac_int_disable:1; /* bit 6 */
- u32 reserved:25; /* bits 7-31 */
-#endif
- } bits;
-} RXMAC_CTRL_t, *PRXMAC_CTRL_t;
/*
* structure for Wake On Lan Control and CRC 0 reg in rxmac address map
@@ -904,7 +889,7 @@ typedef union _RXMAC_UNI_PF_ADDR3_t {
* Rx MAC Module of JAGCore Address Mapping
*/
typedef struct _RXMAC_t { /* Location: */
- RXMAC_CTRL_t ...From: Alan Cox <alan@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/et131x/et1310_address_map.h | 44 ++++++++-------------------
1 files changed, 13 insertions(+), 31 deletions(-)
diff --git a/drivers/staging/et131x/et1310_address_map.h b/drivers/staging/et131x/et1310_address_map.h
index 1e0ffcd..ea746ba 100644
--- a/drivers/staging/et131x/et1310_address_map.h
+++ b/drivers/staging/et131x/et1310_address_map.h
@@ -1106,37 +1106,19 @@ typedef struct _RXMAC_t { /* Location: */
/*
* structure for Interface Status reg in mac address map.
* located at address 0x503C
+ *
+ * 31-10: reserved
+ * 9: excess_defer
+ * 8: clash
+ * 7: phy_jabber
+ * 6: phy_link_ok
+ * 5: phy_full_duplex
+ * 4: phy_speed
+ * 3: pe100x_link_fail
+ * 2: pe10t_loss_carrier
+ * 1: pe10t_sqe_error
+ * 0: pe10t_jabber
*/
-typedef union _MAC_IF_STAT_t {
- u32 value;
- struct {
-#ifdef _BIT_FIELDS_HTOL
- u32 reserved:22; /* bits 10-31 */
- u32 excess_defer:1; /* bit 9 */
- u32 clash:1; /* bit 8 */
- u32 phy_jabber:1; /* bit 7 */
- u32 phy_link_ok:1; /* bit 6 */
- u32 phy_full_duplex:1; /* bit 5 */
- u32 phy_speed:1; /* bit 4 */
- u32 pe100x_link_fail:1; /* bit 3 */
- u32 pe10t_loss_carrie:1; /* bit 2 */
- u32 pe10t_sqe_error:1; /* bit 1 */
- u32 pe10t_jabber:1; /* bit 0 */
-#else
- u32 pe10t_jabber:1; /* bit 0 */
- u32 pe10t_sqe_error:1; /* bit 1 */
- u32 pe10t_loss_carrie:1; /* bit 2 */
- u32 pe100x_link_fail:1; /* bit 3 */
- u32 phy_speed:1; /* bit 4 */
- u32 phy_full_duplex:1; /* bit 5 */
- u32 phy_link_ok:1; /* bit 6 */
- u32 phy_jabber:1; /* bit 7 */
- u32 clash:1; /* bit 8 */
- u32 excess_defer:1; /* bit 9 */
- u32 reserved:22; /* bits 10-31 */
-#endif
- } bits;
-} MAC_IF_STAT_t, *PMAC_IF_STAT_t;
/*
* structure for Mac Station Address, Part 1 reg in mac address map.
@@ -1197,7 +1179,7 @@ typedef struct _MAC_t { /* Location: */
u32 ...From: Himanshu Chauhan <Himanshu@symmetricore.com>
Signed-off-by: Himanshu Chauhan <himanshu@symmetricore.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/usbip/usbip_common.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/usbip/usbip_common.c b/drivers/staging/usbip/usbip_common.c
index ddb6f5f..57c0ff5 100644
--- a/drivers/staging/usbip/usbip_common.c
+++ b/drivers/staging/usbip/usbip_common.c
@@ -55,10 +55,7 @@ static ssize_t show_flag(struct device *dev, struct device_attribute *attr,
static ssize_t store_flag(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{
- unsigned long flag;
-
- sscanf(buf, "%lx", &flag);
- usbip_debug_flag = flag;
+ sscanf(buf, "%lx", &usbip_debug_flag);
return count;
}
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Himanshu Chauhan <himanshu@symmetricore.com>
Signed-off-by: Himanshu Chauhan <himanshu@symmetricore.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/usbip/usbip_common.c | 29 ++---------------------------
1 files changed, 2 insertions(+), 27 deletions(-)
diff --git a/drivers/staging/usbip/usbip_common.c b/drivers/staging/usbip/usbip_common.c
index 57c0ff5..3367a52 100644
--- a/drivers/staging/usbip/usbip_common.c
+++ b/drivers/staging/usbip/usbip_common.c
@@ -63,33 +63,8 @@ DEVICE_ATTR(usbip_debug, (S_IRUGO | S_IWUSR), show_flag, store_flag);
static void usbip_dump_buffer(char *buff, int bufflen)
{
- int i;
-
- if (bufflen > 128) {
- for (i = 0; i < 128; i++) {
- if (i%24 == 0)
- printk(KERN_DEBUG " ");
- printk(KERN_DEBUG "%02x ", (unsigned char) buff[i]);
- if (i%4 == 3)
- printk(KERN_DEBUG "| ");
- if (i%24 == 23)
- printk(KERN_DEBUG "\n");
- }
- printk(KERN_DEBUG "... (%d byte)\n", bufflen);
- return;
- }
-
- for (i = 0; i < bufflen; i++) {
- if (i%24 == 0)
- printk(KERN_DEBUG " ");
- printk(KERN_DEBUG "%02x ", (unsigned char) buff[i]);
- if (i%4 == 3)
- printk(KERN_DEBUG "| ");
- if (i%24 == 23)
- printk(KERN_DEBUG "\n");
- }
- printk(KERN_DEBUG "\n");
-
+ print_hex_dump(KERN_DEBUG, "usb-ip", DUMP_PREFIX_OFFSET, 16, 4,
+ buff, bufflen, false);
}
static void usbip_dump_pipe(unsigned int p)
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Himanshu Chauhan <himanshu@symmetricore.com>
This patch removes the dead uncompiled code in usbip_common.c
Signed-off-by: Himanshu Chauhan <himanshu@symmetricore.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/usbip/usbip_common.c | 54 ----------------------------------
1 files changed, 0 insertions(+), 54 deletions(-)
diff --git a/drivers/staging/usbip/usbip_common.c b/drivers/staging/usbip/usbip_common.c
index 3367a52..d819702 100644
--- a/drivers/staging/usbip/usbip_common.c
+++ b/drivers/staging/usbip/usbip_common.c
@@ -530,60 +530,6 @@ err:
}
EXPORT_SYMBOL_GPL(usbip_xmit);
-
-/* now a usrland utility should set options. */
-#if 0
-int setquickack(struct socket *socket)
-{
- mm_segment_t oldfs;
- int val = 1;
- int ret;
-
- oldfs = get_fs();
- set_fs(get_ds());
- ret = socket->ops->setsockopt(socket, SOL_TCP, TCP_QUICKACK,
- (char __user *) &val, sizeof(ret));
- set_fs(oldfs);
-
- return ret;
-}
-
-int setnodelay(struct socket *socket)
-{
- mm_segment_t oldfs;
- int val = 1;
- int ret;
-
- oldfs = get_fs();
- set_fs(get_ds());
- ret = socket->ops->setsockopt(socket, SOL_TCP, TCP_NODELAY,
- (char __user *) &val, sizeof(ret));
- set_fs(oldfs);
-
- return ret;
-}
-
-int setkeepalive(struct socket *socket)
-{
- mm_segment_t oldfs;
- int val = 1;
- int ret;
-
- oldfs = get_fs();
- set_fs(get_ds());
- ret = socket->ops->setsockopt(socket, SOL_SOCKET, SO_KEEPALIVE,
- (char __user *) &val, sizeof(ret));
- set_fs(oldfs);
-
- return ret;
-}
-
-void setreuse(struct socket *socket)
-{
- socket->sk->sk_reuse = 1;
-}
-#endif
-
struct socket *sockfd_to_socket(unsigned int sockfd)
{
struct socket *socket;
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Himanshu <himanshu@symmetricore.com> Signed-off-by: Himanshu <himanshu@symmetricore.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/usbip/Kconfig | 7 +++++++ drivers/staging/usbip/Makefile | 2 +- drivers/staging/usbip/usbip_common.c | 2 +- drivers/staging/usbip/usbip_common.h | 8 ++++---- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/drivers/staging/usbip/Kconfig b/drivers/staging/usbip/Kconfig index 350d5d6..2c1d10a 100644 --- a/drivers/staging/usbip/Kconfig +++ b/drivers/staging/usbip/Kconfig @@ -34,3 +34,10 @@ config USB_IP_HOST To compile this driver as a module, choose M here: the module will be called usbip. + +config USB_IP_DEBUG_ENABLE + bool "USB-IP Debug Enable" + depends on USB_IP_COMMON + default N + ---help--- + This enables the debug messages from the USB-IP drivers. diff --git a/drivers/staging/usbip/Makefile b/drivers/staging/usbip/Makefile index 179f421..6f2916b 100644 --- a/drivers/staging/usbip/Makefile +++ b/drivers/staging/usbip/Makefile @@ -7,6 +7,6 @@ vhci-hcd-objs := vhci_sysfs.o vhci_tx.o vhci_rx.o vhci_hcd.o obj-$(CONFIG_USB_IP_HOST) += usbip.o usbip-objs := stub_dev.o stub_main.o stub_rx.o stub_tx.o -ifeq ($(CONFIG_USB_DEBUG),y) +ifeq ($(CONFIG_USB_IP_DEBUG_ENABLE),y) EXTRA_CFLAGS += -DDEBUG endif diff --git a/drivers/staging/usbip/usbip_common.c b/drivers/staging/usbip/usbip_common.c index d819702..7a45da8 100644 --- a/drivers/staging/usbip/usbip_common.c +++ b/drivers/staging/usbip/usbip_common.c @@ -33,7 +33,7 @@ /*-------------------------------------------------------------------------*/ /* debug routines */ -#ifdef CONFIG_USB_DEBUG +#ifdef CONFIG_USB_IP_DEBUG_ENABLE unsigned long usbip_debug_flag = 0xffffffff; #else unsigned long usbip_debug_flag; diff --git a/drivers/staging/usbip/usbip_common.h b/drivers/staging/usbip/usbip_common.h index 1ca3eab..6f1dcb1 100644 --- a/drivers/staging/usbip/usbip_common.h +++ ...
From: d binderman <dcb314@hotmail.com> Fix memory leak in drivers/staging/otus Signed-off-by: David Binderman <dcb314@hotmail.com> --- drivers/staging/otus/ioctl.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/otus/ioctl.c b/drivers/staging/otus/ioctl.c index ebaedb7..8c47b1a 100644 --- a/drivers/staging/otus/ioctl.c +++ b/drivers/staging/otus/ioctl.c @@ -866,15 +866,15 @@ int usbdrvwext_giwscan(struct net_device *dev, char *current_ev = extra; char *end_buf; int i; - /* struct zsBssList BssList; */ - struct zsBssListV1 *pBssList = kmalloc(sizeof(struct zsBssListV1), - GFP_KERNEL); /* BssList = wd->sta.pBssList; */ /* zmw_get_wlan_dev(dev); */ if (macp->DeviceOpened != 1) return 0; + /* struct zsBssList BssList; */ + struct zsBssListV1 *pBssList = kmalloc(sizeof(struct zsBssListV1), + GFP_KERNEL); if (data->length == 0) end_buf = extra + IW_SCAN_MAX_DATA; else -- 1.7.0.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Larry Finger <Larry.Finger@lwfinger.net>
Cleanup the driver and fix a faulty if statement.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Tested by: Bernhard Schiffner <bernhard@schiffner-limbach.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/rtl8187se/r8180_core.c | 305 +++++++++++++-------------------
1 files changed, 122 insertions(+), 183 deletions(-)
diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c
index 1fb9e11..9c2f4d3 100644
--- a/drivers/staging/rtl8187se/r8180_core.c
+++ b/drivers/staging/rtl8187se/r8180_core.c
@@ -41,13 +41,6 @@
#include "ieee80211/dot11d.h"
-#ifndef PCI_VENDOR_ID_BELKIN
- #define PCI_VENDOR_ID_BELKIN 0x1799
-#endif
-#ifndef PCI_VENDOR_ID_DLINK
- #define PCI_VENDOR_ID_DLINK 0x1186
-#endif
-
static struct pci_device_id rtl8180_pci_id_tbl[] __devinitdata = {
{
.vendor = PCI_VENDOR_ID_REALTEK,
@@ -1421,11 +1414,9 @@ u16 N_DBPSOfRate(u16 DataRate)
return N_DBPS;
}
-//{by amy 080312
//
// Description:
// For Netgear case, they want good-looking singal strength.
-// 2004.12.05, by rcnjko.
//
long NetgearSignalStrengthTranslate(long LastSS, long CurrSS)
{
@@ -1481,7 +1472,6 @@ long TranslateToDbm8185(u8 SignalStrengthIndex)
// This is different with PerformSignalSmoothing8185 in smoothing fomula.
// No dramatic adjustion is apply because dynamic mechanism need some degree
// of correctness. Ported from 8187B.
-// 2007-02-26, by Bruce.
//
void PerformUndecoratedSignalSmoothing8185(struct r8180_priv *priv,
bool bCckRate)
@@ -1502,7 +1492,6 @@ void PerformUndecoratedSignalSmoothing8185(struct r8180_priv *priv,
priv->CurCCKRSSI = 0;
}
-//by amy 080312}
/* This is rough RX isr handling routine*/
void rtl8180_rx(struct net_device *dev)
@@ -1638,7 +1627,7 @@ void rtl8180_rx(struct net_device *dev)
}
signal=(unsigned char)(((*(priv->rxringtail+3))& ...From: Nitin Gupta <ngupta@vflare.org>
64-bit stats corruption was observed when ramzswap was
used on SMP systems. To prevent this, use separate spinlock
to protect these stats.
Also, replace stat_*() with rzs_stat*() to avoid possible
conflict with core kernel code.
Eventually, these will be converted to per-cpu counters
if this driver finds use on large scale systems and this
locking is found to affect scalability.
Signed-off-by: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/ramzswap/ramzswap_drv.c | 58 +++++++++++++++--------------
drivers/staging/ramzswap/ramzswap_drv.h | 59 ++++++++++++++++++++++++-----
drivers/staging/ramzswap/ramzswap_ioctl.h | 1 +
3 files changed, 80 insertions(+), 38 deletions(-)
diff --git a/drivers/staging/ramzswap/ramzswap_drv.c b/drivers/staging/ramzswap/ramzswap_drv.c
index baf7572..05273c0 100644
--- a/drivers/staging/ramzswap/ramzswap_drv.c
+++ b/drivers/staging/ramzswap/ramzswap_drv.c
@@ -24,7 +24,6 @@
#include <linux/genhd.h>
#include <linux/highmem.h>
#include <linux/lzo.h>
-#include <linux/mutex.h>
#include <linux/string.h>
#include <linux/swap.h>
#include <linux/swapops.h>
@@ -239,7 +238,8 @@ void ramzswap_ioctl_get_stats(struct ramzswap *rzs,
mem_used = xv_get_total_size_bytes(rzs->mem_pool)
+ (rs->pages_expand << PAGE_SHIFT);
- succ_writes = rs->num_writes - rs->failed_writes;
+ succ_writes = rzs_stat64_read(rzs, &rs->num_writes) -
+ rzs_stat64_read(rzs, &rs->failed_writes);
if (succ_writes && rs->pages_stored) {
good_compress_perc = rs->good_compress * 100
@@ -248,11 +248,12 @@ void ramzswap_ioctl_get_stats(struct ramzswap *rzs,
/ rs->pages_stored;
}
- s->num_reads = rs->num_reads;
- s->num_writes = rs->num_writes;
- s->failed_reads = rs->failed_reads;
- s->failed_writes = rs->failed_writes;
- s->invalid_io = rs->invalid_io;
+ s->num_reads = rzs_stat64_read(rzs, &rs->num_reads);
+ s->num_writes = ...From: Nitin Gupta <ngupta@vflare.org> Make sure we flush block device before freeing all metadata during reset ioctl. Signed-off-by: Nitin Gupta <ngupta@vflar.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/ramzswap/ramzswap_drv.c | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/staging/ramzswap/ramzswap_drv.c b/drivers/staging/ramzswap/ramzswap_drv.c index 05273c0..3567ee3 100644 --- a/drivers/staging/ramzswap/ramzswap_drv.c +++ b/drivers/staging/ramzswap/ramzswap_drv.c @@ -1000,6 +1000,9 @@ static void reset_device(struct ramzswap *rzs) unsigned entries_per_page; unsigned long num_table_pages, entry = 0; + /* Do not accept any new I/O request */ + rzs->init_done = 0; + if (rzs->backing_swap && !rzs->num_extents) is_backing_blkdev = 1; @@ -1073,9 +1076,6 @@ static void reset_device(struct ramzswap *rzs) rzs->disksize = 0; rzs->memlimit = 0; - - /* Back to uninitialized state */ - rzs->init_done = 0; } static int ramzswap_ioctl_init_device(struct ramzswap *rzs) @@ -1276,6 +1276,11 @@ static int ramzswap_ioctl(struct block_device *bdev, fmode_t mode, ret = -EBUSY; goto out; } + + /* Make sure all pending I/O is finished */ + if (bdev) + fsync_bdev(bdev); + ret = ramzswap_ioctl_reset_device(rzs); break; -- 1.7.0.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Nitin Gupta <ngupta@vflare.org> ramzswap block size needs to be set equal to PAGE_SIZE to avoid receiving any unaligned block I/O requests (happens due to readahead logic during swapon). These unaligned accesses produce unnecessary I/O errors, scaring users. Signed-off-by: Nitin Gupta <ngupta@vflare.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/ramzswap/ramzswap_drv.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/staging/ramzswap/ramzswap_drv.c b/drivers/staging/ramzswap/ramzswap_drv.c index 3567ee3..2021ad6 100644 --- a/drivers/staging/ramzswap/ramzswap_drv.c +++ b/drivers/staging/ramzswap/ramzswap_drv.c @@ -1335,6 +1335,10 @@ static int create_device(struct ramzswap *rzs, int device_id) * or set equal to backing swap device (if provided) */ set_capacity(rzs->disk, 0); + + blk_queue_physical_block_size(rzs->disk->queue, PAGE_SIZE); + blk_queue_logical_block_size(rzs->disk->queue, PAGE_SIZE); + add_disk(rzs->disk); rzs->init_done = 0; -- 1.7.0.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Nitin Gupta <ngupta@vflare.org>
Currently, we return 0 if create_device() fails and 1 otherwise.
Now, proper error code is returned from create_device() and the
same is propagated as module error code from ramzswap_init().
Also added some cleanups for ramzswap_init(), improving function
structure.
Signed-off-by: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/ramzswap/ramzswap_drv.c | 44 +++++++++++++++++++-----------
1 files changed, 28 insertions(+), 16 deletions(-)
diff --git a/drivers/staging/ramzswap/ramzswap_drv.c b/drivers/staging/ramzswap/ramzswap_drv.c
index 2021ad6..3035add 100644
--- a/drivers/staging/ramzswap/ramzswap_drv.c
+++ b/drivers/staging/ramzswap/ramzswap_drv.c
@@ -1300,6 +1300,8 @@ static struct block_device_operations ramzswap_devops = {
static int create_device(struct ramzswap *rzs, int device_id)
{
+ int ret = 0;
+
mutex_init(&rzs->lock);
spin_lock_init(&rzs->stat64_lock);
INIT_LIST_HEAD(&rzs->backing_swap_extent_list);
@@ -1308,7 +1310,8 @@ static int create_device(struct ramzswap *rzs, int device_id)
if (!rzs->queue) {
pr_err("Error allocating disk queue for device %d\n",
device_id);
- return 0;
+ ret = -ENOMEM;
+ goto out;
}
blk_queue_make_request(rzs->queue, ramzswap_make_request);
@@ -1320,7 +1323,8 @@ static int create_device(struct ramzswap *rzs, int device_id)
blk_cleanup_queue(rzs->queue);
pr_warning("Error allocating disk structure for device %d\n",
device_id);
- return 0;
+ ret = -ENOMEM;
+ goto out;
}
rzs->disk->major = ramzswap_major;
@@ -1342,7 +1346,9 @@ static int create_device(struct ramzswap *rzs, int device_id)
add_disk(rzs->disk);
rzs->init_done = 0;
- return 1;
+
+out:
+ return ret;
}
static void destroy_device(struct ramzswap *rzs)
@@ -1358,18 +1364,20 @@ static void destroy_device(struct ramzswap *rzs)
static int __init ramzswap_init(void)
{
- int i, ret;
+ int ret, ...From: Nitin Gupta <ngupta@vflare.org>
ramzswap_free_page() already handles the case for zero filled
pages. So, remove redundant logic for the same in ramzswap_write().
Signed-off-by: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/ramzswap/ramzswap_drv.c | 15 +++++----------
1 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/drivers/staging/ramzswap/ramzswap_drv.c b/drivers/staging/ramzswap/ramzswap_drv.c
index 3035add..7e0a3fa 100644
--- a/drivers/staging/ramzswap/ramzswap_drv.c
+++ b/drivers/staging/ramzswap/ramzswap_drv.c
@@ -593,6 +593,10 @@ static void ramzswap_free_page(struct ramzswap *rzs, size_t index)
u32 offset = rzs->table[index].offset;
if (unlikely(!page)) {
+ /*
+ * No memory is allocated for zero filled pages.
+ * Simply clear zero page flag.
+ */
if (rzs_test_flag(rzs, index, RZS_ZERO)) {
rzs_clear_flag(rzs, index, RZS_ZERO);
rzs_stat_dec(&rzs->stats.pages_zero);
@@ -789,18 +793,9 @@ static int ramzswap_write(struct ramzswap *rzs, struct bio *bio)
* is no longer referenced by any process. So, its now safe
* to free the memory that was allocated for this page.
*/
- if (rzs->table[index].page)
+ if (rzs->table[index].page || rzs_test_flag(rzs, index, RZS_ZERO))
ramzswap_free_page(rzs, index);
- /*
- * No memory is allocated for zero filled pages.
- * Simply clear zero page flag.
- */
- if (rzs_test_flag(rzs, index, RZS_ZERO)) {
- rzs_stat_dec(&rzs->stats.pages_zero);
- rzs_clear_flag(rzs, index, RZS_ZERO);
- }
-
mutex_lock(&rzs->lock);
user_mem = kmap_atomic(page, KM_USER0);
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Nitin Gupta <ngupta@vflare.org>
Currently, we crash (issue BUG_ON) if backing swap
disk size is zero. This can happen is user specified
an extended partition or simply a bad disk as backing
swap. A crash is really an unpleasant surprise to user
for such trivial problems.
Now, we check for this condition and simply fail device
initialization if this is the case.
Additional cleanups:
* use static for all functions
* remove extra newline between functions
* memset backing_swap_name to NULL on device reset
Signed-off-by: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/ramzswap/ramzswap_drv.c | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/ramzswap/ramzswap_drv.c b/drivers/staging/ramzswap/ramzswap_drv.c
index 7e0a3fa..1bca069 100644
--- a/drivers/staging/ramzswap/ramzswap_drv.c
+++ b/drivers/staging/ramzswap/ramzswap_drv.c
@@ -220,7 +220,7 @@ out:
return ret;
}
-void ramzswap_ioctl_get_stats(struct ramzswap *rzs,
+static void ramzswap_ioctl_get_stats(struct ramzswap *rzs,
struct ramzswap_ioctl_stats *s)
{
strncpy(s->backing_swap_name, rzs->backing_swap_name,
@@ -502,6 +502,14 @@ static int setup_backing_swap(struct ramzswap *rzs)
goto bad_param;
}
disksize = i_size_read(inode);
+ /*
+ * Can happen if user gives an extended partition as
+ * backing swap or simply a bad disk.
+ */
+ if (!disksize) {
+ pr_err("Error reading backing swap size.\n");
+ goto bad_param;
+ }
} else if (S_ISREG(inode->i_mode)) {
bdev = inode->i_sb->s_bdev;
if (IS_SWAPFILE(inode)) {
@@ -519,7 +527,6 @@ static int setup_backing_swap(struct ramzswap *rzs)
rzs->swap_file = swap_file;
rzs->backing_swap = bdev;
rzs->disksize = disksize;
- BUG_ON(!rzs->disksize);
return 0;
@@ -537,7 +544,7 @@ out:
* Map logical page number 'pagenum' to physical page number
* on backing swap device. For block device, this ...From: Nitin Gupta <ngupta@vflare.org> Update copyright notice. Signed-off-by: Nitin Gupta <ngupta@vflare.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/ramzswap/ramzswap_drv.c | 2 +- drivers/staging/ramzswap/ramzswap_drv.h | 2 +- drivers/staging/ramzswap/ramzswap_ioctl.h | 2 +- drivers/staging/ramzswap/xvmalloc.c | 2 +- drivers/staging/ramzswap/xvmalloc.h | 2 +- drivers/staging/ramzswap/xvmalloc_int.h | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/ramzswap/ramzswap_drv.c b/drivers/staging/ramzswap/ramzswap_drv.c index 1bca069..5e422e2 100644 --- a/drivers/staging/ramzswap/ramzswap_drv.c +++ b/drivers/staging/ramzswap/ramzswap_drv.c @@ -1,7 +1,7 @@ /* * Compressed RAM based swap device * - * Copyright (C) 2008, 2009 Nitin Gupta + * Copyright (C) 2008, 2009, 2010 Nitin Gupta * * This code is released using a dual license strategy: BSD/GPL * You can choose the licence that better fits your requirements. diff --git a/drivers/staging/ramzswap/ramzswap_drv.h b/drivers/staging/ramzswap/ramzswap_drv.h index 5b67222..c7e0e76 100644 --- a/drivers/staging/ramzswap/ramzswap_drv.h +++ b/drivers/staging/ramzswap/ramzswap_drv.h @@ -1,7 +1,7 @@ /* * Compressed RAM based swap device * - * Copyright (C) 2008, 2009 Nitin Gupta + * Copyright (C) 2008, 2009, 2010 Nitin Gupta * * This code is released using a dual license strategy: BSD/GPL * You can choose the licence that better fits your requirements. diff --git a/drivers/staging/ramzswap/ramzswap_ioctl.h b/drivers/staging/ramzswap/ramzswap_ioctl.h index 1edaeba..d26076d 100644 --- a/drivers/staging/ramzswap/ramzswap_ioctl.h +++ b/drivers/staging/ramzswap/ramzswap_ioctl.h @@ -1,7 +1,7 @@ /* * Compressed RAM based swap device * - * Copyright (C) 2008, 2009 Nitin Gupta + * Copyright (C) 2008, 2009, 2010 Nitin Gupta * * This code is released using a dual license strategy: BSD/GPL ...
From: Benjamin Adolphi <b.adolphi@googlemail.com>
This fixes all checkpatch issues in the pcm3724 comedi driver.
Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/pcm3724.c | 85 ++++++++++++++----------------
1 files changed, 40 insertions(+), 45 deletions(-)
diff --git a/drivers/staging/comedi/drivers/pcm3724.c b/drivers/staging/comedi/drivers/pcm3724.c
index 5281182..ed61030 100644
--- a/drivers/staging/comedi/drivers/pcm3724.c
+++ b/drivers/staging/comedi/drivers/pcm3724.c
@@ -121,25 +121,22 @@ static int compute_buffer(int config, int devno, struct comedi_subdevice *s)
{
/* 1 in io_bits indicates output */
if (s->io_bits & 0x0000ff) {
- if (devno == 0) {
+ if (devno == 0)
config |= BUF_A0;
- } else {
+ else
config |= BUF_A1;
- }
}
if (s->io_bits & 0x00ff00) {
- if (devno == 0) {
+ if (devno == 0)
config |= BUF_B0;
- } else {
+ else
config |= BUF_B1;
- }
}
if (s->io_bits & 0xff0000) {
- if (devno == 0) {
+ if (devno == 0)
config |= BUF_C0;
- } else {
+ else
config |= BUF_C1;
- }
}
return config;
}
@@ -155,26 +152,27 @@ static void do_3724_config(struct comedi_device *dev,
buffer_config = 0;
/* 1 in io_bits indicates output, 1 in config indicates input */
- if (!(s->io_bits & 0x0000ff)) {
+ if (!(s->io_bits & 0x0000ff))
config |= CR_A_IO;
- }
- if (!(s->io_bits & 0x00ff00)) {
+
+ if (!(s->io_bits & 0x00ff00))
config |= CR_B_IO;
- }
- if (!(s->io_bits & 0xff0000)) {
+
+ if (!(s->io_bits & 0xff0000))
config |= CR_C_IO;
- }
buffer_config = compute_buffer(0, 0, dev->subdevices);
buffer_config = compute_buffer(buffer_config, 1, (dev->subdevices) + 1);
- if (s == dev->subdevices) {
+ if (s == dev->subdevices)
port_8255_cfg = dev->iobase + _8255_CR;
- } else {
+ else
port_8255_cfg = dev->iobase + SIZE_8255 + _8255_CR;
- }
+
outb(buffer_config, dev->iobase + ...From: Benjamin Adolphi <b.adolphi@googlemail.com>
This fixes all checkpatch issues in the pcm3730 comedi driver.
Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/pcm3730.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/comedi/drivers/pcm3730.c b/drivers/staging/comedi/drivers/pcm3730.c
index 9e4adbd..22b7aae 100644
--- a/drivers/staging/comedi/drivers/pcm3730.c
+++ b/drivers/staging/comedi/drivers/pcm3730.c
@@ -73,7 +73,7 @@ static int pcm3730_attach(struct comedi_device *dev,
unsigned long iobase;
iobase = it->options[0];
- printk("comedi%d: pcm3730: 0x%04lx ", dev->minor, iobase);
+ printk(KERN_INFO "comedi%d: pcm3730: 0x%04lx ", dev->minor, iobase);
if (!request_region(iobase, PCM3730_SIZE, "pcm3730")) {
printk("I/O port conflict\n");
return -EIO;
@@ -140,14 +140,14 @@ static int pcm3730_attach(struct comedi_device *dev,
s->range_table = &range_digital;
s->private = (void *)PCM3730_DIC;
- printk("\n");
+ printk(KERN_INFO "\n");
return 0;
}
static int pcm3730_detach(struct comedi_device *dev)
{
- printk("comedi%d: pcm3730: remove\n", dev->minor);
+ printk(KERN_INFO "comedi%d: pcm3730: remove\n", dev->minor);
if (dev->iobase)
release_region(dev->iobase, PCM3730_SIZE);
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Benjamin Adolphi <b.adolphi@googlemail.com>
This fixes all checkpatch issues in the ni_660x comedi driver.
Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/ni_660x.c | 71 +++++++++++++++---------------
1 files changed, 36 insertions(+), 35 deletions(-)
diff --git a/drivers/staging/comedi/drivers/ni_660x.c b/drivers/staging/comedi/drivers/ni_660x.c
index 1e20414..f74fc5e 100644
--- a/drivers/staging/comedi/drivers/ni_660x.c
+++ b/drivers/staging/comedi/drivers/ni_660x.c
@@ -52,7 +52,9 @@ enum ni_660x_constants {
};
#define NUM_PFI_CHANNELS 40
-/* really there are only up to 3 dma channels, but the register layout allows for 4 */
+/* really there are only up to 3 dma channels, but the register layout allows
+for 4 */
+
#define MAX_DMA_CHANNEL 4
/* See Register-Level Programmer Manual page 3.1 */
@@ -198,7 +200,7 @@ struct NI_660xRegisterData {
const char *name; /* Register Name */
int offset; /* Offset from base address from GPCT chip */
enum ni_660x_register_direction direction;
- enum ni_660x_register_width size; /* 1 byte, 2 bytes, or 4 bytes */
+ enum ni_660x_register_width size; /* 1 byte, 2 bytes, or 4 bytes */
};
static const struct NI_660xRegisterData registerData[NumRegisters] = {
@@ -382,8 +384,8 @@ enum global_interrupt_config_register_bits {
};
/* Offset of the GPCT chips from the base-adress of the card */
-static const unsigned GPCT_OFFSET[2] = { 0x0, 0x800 }; /* First chip is at base-address +
- 0x00, etc. */
+/* First chip is at base-address + 0x00, etc. */
+static const unsigned GPCT_OFFSET[2] = { 0x0, 0x800 };
/* Board description*/
struct ni_660x_board {
@@ -712,7 +714,7 @@ static enum NI_660x_Register ni_gpct_to_660x_register(enum ni_gpct_register reg)
ni_660x_register = G3InterruptEnable;
break;
default:
- printk("%s: unhandled register 0x%x in switch.\n",
+ printk(KERN_WARNING "%s: ...From: Benjamin Adolphi <b.adolphi@googlemail.com>
This fixes all checkpatch issues in the ni_670x comedi driver.
Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/ni_670x.c | 32 ++++++++++++++++-------------
1 files changed, 18 insertions(+), 14 deletions(-)
diff --git a/drivers/staging/comedi/drivers/ni_670x.c b/drivers/staging/comedi/drivers/ni_670x.c
index 9b43547..1e792d5 100644
--- a/drivers/staging/comedi/drivers/ni_670x.c
+++ b/drivers/staging/comedi/drivers/ni_670x.c
@@ -93,7 +93,7 @@ static DEFINE_PCI_DEVICE_TABLE(ni_670x_pci_table) = {
{
PCI_VENDOR_ID_NATINST, 0x2c90, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {
PCI_VENDOR_ID_NATINST, 0x1920, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- /* { PCI_VENDOR_ID_NATINST, 0x0000, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, */
+ /*{ PCI_VENDOR_ID_NATINST, 0x0000, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },*/
{
0}
};
@@ -151,7 +151,7 @@ static int ni_670x_attach(struct comedi_device *dev,
int ret;
int i;
- printk("comedi%d: ni_670x: ", dev->minor);
+ printk(KERN_INFO "comedi%d: ni_670x: ", dev->minor);
ret = alloc_private(dev, sizeof(struct ni_670x_private));
if (ret < 0)
@@ -163,12 +163,12 @@ static int ni_670x_attach(struct comedi_device *dev,
ret = mite_setup(devpriv->mite);
if (ret < 0) {
- printk("error setting up mite\n");
+ printk(KERN_WARNING "error setting up mite\n");
return ret;
}
dev->board_name = thisboard->name;
dev->irq = mite_irq(devpriv->mite);
- printk(" %s", dev->board_name);
+ printk(KERN_INFO " %s", dev->board_name);
if (alloc_subdevices(dev, 2) < 0)
return -ENOMEM;
@@ -207,21 +207,22 @@ static int ni_670x_attach(struct comedi_device *dev,
s->insn_bits = ni_670x_dio_insn_bits;
s->insn_config = ni_670x_dio_insn_config;
- writel(0x10, devpriv->mite->daq_io_addr + MISC_CONTROL_OFFSET); /* Config of misc registers */
- writel(0x00, devpriv->mite->daq_io_addr + ...From: Benjamin Adolphi <b.adolphi@googlemail.com>
This fixes all checkpatch issues in the poc comedi driver.
Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/poc.c | 14 ++++++--------
1 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/comedi/drivers/poc.c b/drivers/staging/comedi/drivers/poc.c
index d23e588..8990bf2 100644
--- a/drivers/staging/comedi/drivers/poc.c
+++ b/drivers/staging/comedi/drivers/poc.c
@@ -122,22 +122,21 @@ static int poc_attach(struct comedi_device *dev, struct comedi_devconfig *it)
unsigned int iosize;
iobase = it->options[0];
- printk("comedi%d: poc: using %s iobase 0x%lx\n", dev->minor,
+ printk(KERN_INFO "comedi%d: poc: using %s iobase 0x%lx\n", dev->minor,
this_board->name, iobase);
dev->board_name = this_board->name;
if (iobase == 0) {
- printk("io base address required\n");
+ printk(KERN_WARNING "io base address required\n");
return -EINVAL;
}
iosize = this_board->iosize;
/* check if io addresses are available */
if (!request_region(iobase, iosize, "dac02")) {
- printk
- ("I/O port conflict: failed to allocate ports 0x%lx to 0x%lx\n",
- iobase, iobase + iosize - 1);
+ printk(KERN_WARNING "I/O port conflict: failed to allocate "
+ "ports 0x%lx to 0x%lx\n", iobase, iobase + iosize - 1);
return -EIO;
}
dev->iobase = iobase;
@@ -156,9 +155,8 @@ static int poc_attach(struct comedi_device *dev, struct comedi_devconfig *it)
s->insn_write = this_board->winsn;
s->insn_read = this_board->rinsn;
s->insn_bits = this_board->insnbits;
- if (s->type == COMEDI_SUBD_AO || s->type == COMEDI_SUBD_DO) {
+ if (s->type == COMEDI_SUBD_AO || s->type == COMEDI_SUBD_DO)
s->subdev_flags = SDF_WRITABLE;
- }
return 0;
}
@@ -169,7 +167,7 @@ static int poc_detach(struct comedi_device *dev)
if (dev->iobase)
release_region(dev->iobase, ...From: Benjamin Adolphi <b.adolphi@googlemail.com>
This fixes all checkpatch issues in the ni_65xx comedi driver.
Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/ni_65xx.c | 49 ++++++++++++++---------------
1 files changed, 24 insertions(+), 25 deletions(-)
diff --git a/drivers/staging/comedi/drivers/ni_65xx.c b/drivers/staging/comedi/drivers/ni_65xx.c
index bbf75eb..c223f76 100644
--- a/drivers/staging/comedi/drivers/ni_65xx.c
+++ b/drivers/staging/comedi/drivers/ni_65xx.c
@@ -26,12 +26,13 @@
/*
Driver: ni_65xx
Description: National Instruments 65xx static dio boards
-Author: Jon Grierson <jd@renko.co.uk>, Frank Mori Hess <fmhess@users.sourceforge.net>
+Author: Jon Grierson <jd@renko.co.uk>,
+ Frank Mori Hess <fmhess@users.sourceforge.net>
Status: testing
-Devices: [National Instruments] PCI-6509 (ni_65xx), PXI-6509, PCI-6510, PCI-6511,
- PXI-6511, PCI-6512, PXI-6512, PCI-6513, PXI-6513, PCI-6514, PXI-6514, PCI-6515,
- PXI-6515, PCI-6516, PCI-6517, PCI-6518, PCI-6519, PCI-6520, PCI-6521, PXI-6521,
- PCI-6528, PXI-6528
+Devices: [National Instruments] PCI-6509 (ni_65xx), PXI-6509, PCI-6510,
+ PCI-6511, PXI-6511, PCI-6512, PXI-6512, PCI-6513, PXI-6513, PCI-6514,
+ PXI-6514, PCI-6515, PXI-6515, PCI-6516, PCI-6517, PCI-6518, PCI-6519,
+ PCI-6520, PCI-6521, PXI-6521, PCI-6528, PXI-6528
Updated: Wed Oct 18 08:59:11 EDT 2006
Based on the PCI-6527 driver by ds.
@@ -418,9 +419,10 @@ static int ni_65xx_dio_insn_bits(struct comedi_device *dev,
return -EINVAL;
base_bitfield_channel = CR_CHAN(insn->chanspec);
for (j = 0; j < max_ports_per_bitfield; ++j) {
- const unsigned port_offset = ni_65xx_port_by_channel(base_bitfield_channel) + j;
+ const unsigned port_offset =
+ ni_65xx_port_by_channel(base_bitfield_channel) + j;
const unsigned port =
- sprivate(s)->base_port + port_offset;
+ sprivate(s)->base_port + port_offset;
unsigned ...From: Benjamin Adolphi <b.adolphi@googlemail.com>
This fixes all checkpatch issues in the fl512 comedi driver.
Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/fl512.c | 72 +++++++++++++++++++------------
1 files changed, 44 insertions(+), 28 deletions(-)
diff --git a/drivers/staging/comedi/drivers/fl512.c b/drivers/staging/comedi/drivers/fl512.c
index 8fca180..a10a2b0 100644
--- a/drivers/staging/comedi/drivers/fl512.c
+++ b/drivers/staging/comedi/drivers/fl512.c
@@ -76,14 +76,14 @@ static int fl512_ai_insn(struct comedi_device *dev,
unsigned long iobase = dev->iobase;
for (n = 0; n < insn->n; n++) { /* sample n times on selected channel */
- /* XXX probably can move next step out of for() loop -- will make
- * AI a little bit faster. */
+ /* XXX probably can move next step out of for() loop -- will
+ * make AI a little bit faster. */
outb(chan, iobase + 2); /* select chan */
outb(0, iobase + 3); /* start conversion */
/* XXX should test "done" flag instead of delay */
udelay(30); /* sleep 30 usec */
lo_byte = inb(iobase + 2); /* low 8 byte */
- hi_byte = inb(iobase + 3) & 0xf; /* high 4 bit and mask */
+ hi_byte = inb(iobase + 3) & 0xf; /* high 4 bit and mask */
data[n] = lo_byte + (hi_byte << 8);
}
return n;
@@ -101,8 +101,10 @@ static int fl512_ao_insn(struct comedi_device *dev,
unsigned long iobase = dev->iobase; /* get base address */
for (n = 0; n < insn->n; n++) { /* write n data set */
- outb(data[n] & 0x0ff, iobase + 4 + 2 * chan); /* write low byte */
- outb((data[n] & 0xf00) >> 8, iobase + 4 + 2 * chan); /* write high byte */
+ /* write low byte */
+ outb(data[n] & 0x0ff, iobase + 4 + 2 * chan);
+ /* write high byte */
+ outb((data[n] & 0xf00) >> 8, iobase + 4 + 2 * chan);
inb(iobase + 4 + 2 * chan); /* trig */
devpriv->ao_readback[chan] = data[n];
@@ -121,9 +123,8 @@ static int ...From: Benjamin Adolphi <b.adolphi@googlemail.com>
This fixes all checkpatch issues in the adq12b comedi driver.
Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/adq12b.c | 18 ++++++++++--------
1 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/comedi/drivers/adq12b.c b/drivers/staging/comedi/drivers/adq12b.c
index 4590cac..f3ba645 100644
--- a/drivers/staging/comedi/drivers/adq12b.c
+++ b/drivers/staging/comedi/drivers/adq12b.c
@@ -201,15 +201,16 @@ static int adq12b_attach(struct comedi_device *dev, struct comedi_devconfig *it)
unipolar = it->options[1];
differential = it->options[2];
- printk("comedi%d: adq12b called with options base=0x%03lx, %s and %s\n",
- dev->minor, iobase, (unipolar == 1) ? "unipolar" : "bipolar",
+ printk(KERN_INFO "comedi%d: adq12b called with options base=0x%03lx, "
+ "%s and %s\n", dev->minor, iobase,
+ (unipolar == 1) ? "unipolar" : "bipolar",
(differential == 1) ? "differential" : "single-ended");
/* if no address was specified, try the default 0x300 */
if (iobase == 0) {
- printk
- ("comedi%d: adq12b warning: I/O base address not specified. Trying the default 0x300.\n",
- dev->minor);
+ printk(KERN_WARNING "comedi%d: adq12b warning: I/O base "
+ "address not specified. Trying the default 0x300.\n",
+ dev->minor);
iobase = 0x300;
}
@@ -289,7 +290,7 @@ static int adq12b_attach(struct comedi_device *dev, struct comedi_devconfig *it)
s->range_table = &range_digital;
s->insn_bits = adq12b_do_insn_bits;
- printk("attached\n");
+ printk(KERN_INFO "attached\n");
return 0;
}
@@ -309,7 +310,7 @@ static int adq12b_detach(struct comedi_device *dev)
kfree(devpriv);
- printk("comedi%d: adq12b: removed\n", dev->minor);
+ printk(KERN_INFO "comedi%d: adq12b: removed\n", dev->minor);
return 0;
}
@@ -354,7 +355,8 @@ ...From: Joe Perches <joe@perches.com>
String constants that are continued on subsequent lines with \
are not good.
Fixed a "is tryied" / tried typo
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/dream/qdsp5/audio_mp3.c | 3 +--
.../rtl8187se/ieee80211/ieee80211_softmac_wx.c | 3 +--
drivers/staging/rtl8187se/r8180_core.c | 3 +--
drivers/staging/sep/sep_driver.c | 3 +--
4 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/dream/qdsp5/audio_mp3.c b/drivers/staging/dream/qdsp5/audio_mp3.c
index b95574f..7ed6e26 100644
--- a/drivers/staging/dream/qdsp5/audio_mp3.c
+++ b/drivers/staging/dream/qdsp5/audio_mp3.c
@@ -650,8 +650,7 @@ static long audio_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
&audio->read_phys,
GFP_KERNEL);
if (!audio->read_data) {
- pr_err("audio_mp3: malloc pcm \
- buf failed\n");
+ pr_err("audio_mp3: malloc pcm buf failed\n");
rc = -1;
} else {
uint8_t index;
diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac_wx.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac_wx.c
index f1d6cb4..ad42bcd 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac_wx.c
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac_wx.c
@@ -482,8 +482,7 @@ int ieee80211_wx_set_power(struct ieee80211_device *ieee,
(!ieee->enter_sleep_state) ||
(!ieee->ps_is_queue_empty)){
- printk("ERROR. PS mode is tryied to be use but\
-driver missed a callback\n\n");
+ printk("ERROR. PS mode tried to be use but driver missed a callback\n\n");
return -1;
}
diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c
index 9c2f4d3..33363c4 100644
--- a/drivers/staging/rtl8187se/r8180_core.c
+++ b/drivers/staging/rtl8187se/r8180_core.c
@@ -3813,8 +3813,7 @@ static int __init ...From: Richard Kennedy <richard@rsk.demon.co.uk>
Remove iw_handle_def private initialisations as they are no longer need
these.
Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/wlan-ng/p80211wext.c | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/wlan-ng/p80211wext.c b/drivers/staging/wlan-ng/p80211wext.c
index 63bdaaa..cc4b1ca 100644
--- a/drivers/staging/wlan-ng/p80211wext.c
+++ b/drivers/staging/wlan-ng/p80211wext.c
@@ -1744,11 +1744,7 @@ static iw_handler p80211wext_handlers[] = {
struct iw_handler_def p80211wext_handler_def = {
.num_standard = ARRAY_SIZE(p80211wext_handlers),
- .num_private = 0,
- .num_private_args = 0,
.standard = p80211wext_handlers,
- .private = NULL,
- .private_args = NULL,
.get_wireless_stats = p80211wext_get_wireless_stats
};
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: tony burrows <tony@tonyburrows.com>
This patch fixes all of the brace style warnings found by the
checkpatch.pl tool
Signed-off-by: Tony Burrows <tony@tonyburrows.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/ni_labpc.c | 36 ++++++++++++-----------------
1 files changed, 15 insertions(+), 21 deletions(-)
diff --git a/drivers/staging/comedi/drivers/ni_labpc.c b/drivers/staging/comedi/drivers/ni_labpc.c
index 647c9b7..566b791 100644
--- a/drivers/staging/comedi/drivers/ni_labpc.c
+++ b/drivers/staging/comedi/drivers/ni_labpc.c
@@ -483,12 +483,10 @@ int labpc_common_attach(struct comedi_device *dev, unsigned long iobase,
printk("comedi%d: ni_labpc: %s, io 0x%lx", dev->minor, thisboard->name,
iobase);
- if (irq) {
+ if (irq)
printk(", irq %u", irq);
- }
- if (dma_chan) {
+ if (dma_chan)
printk(", dma %u", dma_chan);
- }
printk("\n");
if (iobase == 0) {
@@ -585,8 +583,9 @@ int labpc_common_attach(struct comedi_device *dev, unsigned long iobase,
/* analog output */
s = dev->subdevices + 1;
if (thisboard->has_ao) {
-/* Could provide command support, except it only has a one sample
- * hardware buffer for analog output and no underrun flag. */
+ /* Could provide command support, except it only has a
+ * one sample hardware buffer for analog output and no
+ * underrun flag. */
s->type = COMEDI_SUBD_AO;
s->subdev_flags = SDF_READABLE | SDF_WRITABLE | SDF_GROUND;
s->n_chan = NUM_AO_CHAN;
@@ -608,7 +607,8 @@ int labpc_common_attach(struct comedi_device *dev, unsigned long iobase,
/* 8255 dio */
s = dev->subdevices + 2;
- /* if board uses io memory we have to give a custom callback function to the 8255 driver */
+ /* if board uses io memory we have to give a custom callback
+ * function to the 8255 driver */
if (thisboard->memory_mapped_io)
subdev_8255_init(dev, s, labpc_dio_mem_callback,
(unsigned long)(dev->iobase + DIO_BASE_REG));
@@ -640,14 ...From: Joe Perches <joe@perches.com> String constants that are continued on subsequent lines with \ are not good. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/rtl8192su/r8192S_phy.c | 16 ++++++++-------- drivers/staging/sep/sep_driver.c | 5 +++-- drivers/staging/slicoss/slicoss.c | 6 ++---- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/drivers/staging/rtl8192su/r8192S_phy.c b/drivers/staging/rtl8192su/r8192S_phy.c index 77ab026..63d4e5f 100644 --- a/drivers/staging/rtl8192su/r8192S_phy.c +++ b/drivers/staging/rtl8192su/r8192S_phy.c @@ -2407,8 +2407,8 @@ void PHY_SetBWModeCallback8192S(struct net_device *dev) break; default: - RT_TRACE(COMP_DBG, "SetBWModeCallback8190Pci():\ - unknown Bandwidth: %#X\n",priv->CurrentChannelBW); + RT_TRACE(COMP_DBG, "SetBWModeCallback8190Pci(): unknown Bandwidth: %#X\n", + priv->CurrentChannelBW); break; } @@ -3398,8 +3398,8 @@ void SwChnlCallback8192SUsb(struct net_device *dev) u32 delay; // bool ret; - RT_TRACE(COMP_SCAN, "==>SwChnlCallback8190Pci(), switch to channel\ - %d\n", priv->chan); + RT_TRACE(COMP_SCAN, "==>SwChnlCallback8190Pci(), switch to channel %d\n", + priv->chan); if(!priv->up) @@ -3525,8 +3525,8 @@ void SetBWModeCallback8192SUsb(struct net_device *dev) break; default: - RT_TRACE(COMP_DBG, "SetChannelBandwidth8190Pci():\ - unknown Bandwidth: %#X\n",priv->CurrentChannelBW); + RT_TRACE(COMP_DBG, "SetChannelBandwidth8190Pci(): unknown Bandwidth: %#X\n", + priv->CurrentChannelBW); break; } @@ -3660,8 +3660,8 @@ void SetBWModeCallback8192SUsbWorkItem(struct net_device *dev) break; default: - RT_TRACE(COMP_DBG, "SetBWModeCallback8192SUsbWorkItem():\ - unknown Bandwidth: %#X\n",priv->CurrentChannelBW); + RT_TRACE(COMP_DBG, "SetBWModeCallback8192SUsbWorkItem(): unknown Bandwidth: %#X\n", + ...
From: Paul Elms <paul@uprocera.co.uk>
This patch to the comedi_fops.c file fixes a brace warning found by the checkpatch.pl tool
Signed-off-by: Paul Elms <paul@uprocera.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/comedi_fops.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c
index 8117748..79653e8 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -2004,12 +2004,10 @@ void comedi_event(struct comedi_device *dev, struct comedi_subdevice *s)
if (async->cb_mask & s->async->events) {
if (comedi_get_subdevice_runflags(s) & SRF_USER) {
wake_up_interruptible(&async->wait_head);
- if (s->subdev_flags & SDF_CMD_READ) {
+ if (s->subdev_flags & SDF_CMD_READ)
kill_fasync(&dev->async_queue, SIGIO, POLL_IN);
- }
- if (s->subdev_flags & SDF_CMD_WRITE) {
+ if (s->subdev_flags & SDF_CMD_WRITE)
kill_fasync(&dev->async_queue, SIGIO, POLL_OUT);
- }
} else {
if (async->cb_func)
async->cb_func(s->async->events, async->cb_arg);
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Tim Schofield <tim@weberpafrica.com>
This is a patch to the r8180_93cx6.c file that fixes up spacing issue
warnings found by the checkpatch.pl tool
Signed-off-by: Tim Schofield <tim@weberpafrica.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/rtl8192e/r8180_93cx6.c | 63 ++++++++++++++++----------------
1 files changed, 32 insertions(+), 31 deletions(-)
diff --git a/drivers/staging/rtl8192e/r8180_93cx6.c b/drivers/staging/rtl8192e/r8180_93cx6.c
index 79f7a0f..262ed5f 100644
--- a/drivers/staging/rtl8192e/r8180_93cx6.c
+++ b/drivers/staging/rtl8192e/r8180_93cx6.c
@@ -22,7 +22,7 @@
static void eprom_cs(struct net_device *dev, short bit)
{
- if(bit)
+ if (bit)
write_nic_byte(dev, EPROM_CMD,
(1<<EPROM_CS_SHIFT) | \
read_nic_byte(dev, EPROM_CMD)); //enable EPROM
@@ -38,23 +38,23 @@ static void eprom_cs(struct net_device *dev, short bit)
static void eprom_ck_cycle(struct net_device *dev)
{
write_nic_byte(dev, EPROM_CMD,
- (1<<EPROM_CK_SHIFT) | read_nic_byte(dev,EPROM_CMD));
+ (1<<EPROM_CK_SHIFT) | read_nic_byte(dev, EPROM_CMD));
force_pci_posting(dev);
udelay(EPROM_DELAY);
write_nic_byte(dev, EPROM_CMD,
- read_nic_byte(dev, EPROM_CMD) &~ (1<<EPROM_CK_SHIFT));
+ read_nic_byte(dev, EPROM_CMD) & ~(1<<EPROM_CK_SHIFT));
force_pci_posting(dev);
udelay(EPROM_DELAY);
}
-static void eprom_w(struct net_device *dev,short bit)
+static void eprom_w(struct net_device *dev, short bit)
{
- if(bit)
+ if (bit)
write_nic_byte(dev, EPROM_CMD, (1<<EPROM_W_SHIFT) | \
- read_nic_byte(dev,EPROM_CMD));
+ read_nic_byte(dev, EPROM_CMD));
else
- write_nic_byte(dev, EPROM_CMD, read_nic_byte(dev,EPROM_CMD)\
+ write_nic_byte(dev, EPROM_CMD, read_nic_byte(dev, EPROM_CMD)\
&~(1<<EPROM_W_SHIFT));
force_pci_posting(dev);
@@ -66,10 +66,11 @@ static short eprom_r(struct net_device *dev)
{
short bit;
- bit=(read_nic_byte(dev, ...From: Yong Zhang <yong.zhang0@gmail.com> Use DECLARE_WAIT_QUEUE_HEAD_ONSTACK to make lockdep happy Signed-off-by: Yong Zhang <yong.zhang0@gmail.com> Cc: Greg Kroah-Hartman <gregkh@suse.de> Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Cc: Alexander Beregalov <a.beregalov@gmail.com> Cc: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/rt2860/rt_main_dev.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/staging/rt2860/rt_main_dev.c b/drivers/staging/rt2860/rt_main_dev.c index c3d9280..fbddb00 100644 --- a/drivers/staging/rt2860/rt_main_dev.c +++ b/drivers/staging/rt2860/rt_main_dev.c @@ -216,7 +216,7 @@ int rt28xx_close(struct net_device *dev) u32 i = 0; #ifdef RTMP_MAC_USB - DECLARE_WAIT_QUEUE_HEAD(unlink_wakeup); + DECLARE_WAIT_QUEUE_HEAD_ONSTACK(unlink_wakeup); DECLARE_WAITQUEUE(wait, current); #endif /* RTMP_MAC_USB // */ -- 1.7.0.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Chihau Chau <chihau@gmail.com>
This fixes some lines over 80 characters coding style issues.
Signed-off-by: Chihau Chau <chihau@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/samsung-laptop/samsung-laptop.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/samsung-laptop/samsung-laptop.c b/drivers/staging/samsung-laptop/samsung-laptop.c
index 4877138..dd7ea4c 100644
--- a/drivers/staging/samsung-laptop/samsung-laptop.c
+++ b/drivers/staging/samsung-laptop/samsung-laptop.c
@@ -99,7 +99,8 @@ static struct rfkill *rfk;
static int force;
module_param(force, bool, 0);
-MODULE_PARM_DESC(force, "Disable the DMI check and forces the driver to be loaded");
+MODULE_PARM_DESC(force,
+ "Disable the DMI check and forces the driver to be loaded");
static int debug;
module_param(debug, bool, S_IRUGO | S_IWUSR);
@@ -370,7 +371,8 @@ static struct dmi_system_id __initdata samsung_dmi_table[] = {
{
.ident = "N128",
.matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."),
+ DMI_MATCH(DMI_SYS_VENDOR,
+ "SAMSUNG ELECTRONICS CO., LTD."),
DMI_MATCH(DMI_PRODUCT_NAME, "N128"),
DMI_MATCH(DMI_BOARD_NAME, "N128"),
},
@@ -379,7 +381,8 @@ static struct dmi_system_id __initdata samsung_dmi_table[] = {
{
.ident = "N130",
.matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."),
+ DMI_MATCH(DMI_SYS_VENDOR,
+ "SAMSUNG ELECTRONICS CO., LTD."),
DMI_MATCH(DMI_PRODUCT_NAME, "N130"),
DMI_MATCH(DMI_BOARD_NAME, "N130"),
},
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Benjamin Adolphi <b.adolphi@googlemail.com>
This fixes all checkpatch issues in the dt2815 comedi driver.
Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/dt2815.c | 89 +++++++++++++-----------------
1 files changed, 39 insertions(+), 50 deletions(-)
diff --git a/drivers/staging/comedi/drivers/dt2815.c b/drivers/staging/comedi/drivers/dt2815.c
index d1db93c..d1a4f78 100644
--- a/drivers/staging/comedi/drivers/dt2815.c
+++ b/drivers/staging/comedi/drivers/dt2815.c
@@ -34,19 +34,19 @@ Configuration options:
[0] - I/O port base base address
[1] - IRQ (unused)
[2] - Voltage unipolar/bipolar configuration
- 0 == unipolar 5V (0V -- +5V)
- 1 == bipolar 5V (-5V -- +5V)
+ 0 == unipolar 5V (0V -- +5V)
+ 1 == bipolar 5V (-5V -- +5V)
[3] - Current offset configuration
- 0 == disabled (0mA -- +32mAV)
- 1 == enabled (+4mA -- +20mAV)
+ 0 == disabled (0mA -- +32mAV)
+ 1 == enabled (+4mA -- +20mAV)
[4] - Firmware program configuration
- 0 == program 1 (see manual table 5-4)
- 1 == program 2 (see manual table 5-4)
- 2 == program 3 (see manual table 5-4)
- 3 == program 4 (see manual table 5-4)
+ 0 == program 1 (see manual table 5-4)
+ 1 == program 2 (see manual table 5-4)
+ 2 == program 3 (see manual table 5-4)
+ 3 == program 4 (see manual table 5-4)
[5] - Analog output 0 range configuration
- 0 == voltage
- 1 == current
+ 0 == voltage
+ 1 == current
[6] - Analog output 1 range configuration (same options)
[7] - Analog output 2 range configuration (same options)
[8] - Analog output 3 range configuration (same options)
@@ -61,17 +61,11 @@ Configuration options:
#include <linux/ioport.h>
#include <linux/delay.h>
-static const struct comedi_lrange range_dt2815_ao_32_current = { 1, {
- RANGE_mA(0,
- 32)
- }
-};
+static ...From: Benjamin Adolphi <b.adolphi@googlemail.com>
This fixes all checkpatch issues in the rti802 comedi driver.
Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/rti802.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/comedi/drivers/rti802.c b/drivers/staging/comedi/drivers/rti802.c
index 2f75c73..2157edc 100644
--- a/drivers/staging/comedi/drivers/rti802.c
+++ b/drivers/staging/comedi/drivers/rti802.c
@@ -106,9 +106,9 @@ static int rti802_attach(struct comedi_device *dev, struct comedi_devconfig *it)
unsigned long iobase;
iobase = it->options[0];
- printk("comedi%d: rti802: 0x%04lx ", dev->minor, iobase);
+ printk(KERN_INFO "comedi%d: rti802: 0x%04lx ", dev->minor, iobase);
if (!request_region(iobase, RTI802_SIZE, "rti802")) {
- printk("I/O port conflict\n");
+ printk(KERN_WARNING "I/O port conflict\n");
return -EIO;
}
dev->iobase = iobase;
@@ -138,14 +138,12 @@ static int rti802_attach(struct comedi_device *dev, struct comedi_devconfig *it)
? &range_unipolar10 : &range_bipolar10;
}
- printk("\n");
-
return 0;
}
static int rti802_detach(struct comedi_device *dev)
{
- printk("comedi%d: rti802: remove\n", dev->minor);
+ printk(KERN_INFO "comedi%d: rti802: remove\n", dev->minor);
if (dev->iobase)
release_region(dev->iobase, RTI802_SIZE);
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman <gregkh@suse.de>
This fixes the build warnings in the dt3155 driver
Cc: Scott Smedley <ss@aao.gov.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/dt3155/dt3155_drv.c | 25 +++++++++++++------------
1 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/drivers/staging/dt3155/dt3155_drv.c b/drivers/staging/dt3155/dt3155_drv.c
index 6b40d42..716814e 100644
--- a/drivers/staging/dt3155/dt3155_drv.c
+++ b/drivers/staging/dt3155/dt3155_drv.c
@@ -538,8 +538,11 @@ static int dt3155_ioctl (
{
printk("DT3155: invalid IOCTL(0x%x)\n",cmd);
printk("DT3155: Valid commands (0x%x), (0x%x), (0x%x), (0x%x), (0x%x)\n",
- DT3155_GET_CONFIG, DT3155_SET_CONFIG,
- DT3155_START, DT3155_STOP, DT3155_FLUSH);
+ (unsigned int)DT3155_GET_CONFIG,
+ (unsigned int)DT3155_SET_CONFIG,
+ (unsigned int)DT3155_START,
+ (unsigned int)DT3155_STOP,
+ (unsigned int)DT3155_FLUSH);
return -EINVAL;
}
@@ -624,7 +627,8 @@ static int dt3155_ioctl (
{
printk("DT3155: invalid IOCTL(0x%x)\n",cmd);
printk("DT3155: Valid commands (0x%x), (0x%x), (0x%x), (0x%x), (0x%x)\n",
- DT3155_GET_CONFIG, DT3155_SET_CONFIG,
+ (unsigned int)DT3155_GET_CONFIG,
+ (unsigned int)DT3155_SET_CONFIG,
DT3155_START, DT3155_STOP, DT3155_FLUSH);
return -ENOSYS;
}
@@ -754,11 +758,8 @@ static int dt3155_close( struct inode *inode, struct file *filep)
* read()
*
*****************************************************/
-static int dt3155_read (
- struct file *filep,
- char *buf,
- size_t count,
- loff_t *ppos)
+static ssize_t dt3155_read(struct file *filep, char __user *buf,
+ size_t count, loff_t *ppos)
{
/* which device are we reading from? */
int minor = MINOR(filep->f_dentry->d_inode->i_rdev);
@@ -911,8 +912,8 @@ static int find_PCI (void)
* can access it. */
dt3155_lbase[ pci_index - 1 ] = ...From: Greg Kroah-Hartman <gregkh@suse.de>
Fixed a coding style issue.
Created during the keynote presentation at FOSDEM 2010
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/ssv_dnp.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/comedi/drivers/ssv_dnp.c b/drivers/staging/comedi/drivers/ssv_dnp.c
index 4918fbf..17c92a5 100644
--- a/drivers/staging/comedi/drivers/ssv_dnp.c
+++ b/drivers/staging/comedi/drivers/ssv_dnp.c
@@ -300,11 +300,11 @@ static int dnp_dio_insn_config(struct comedi_device *dev,
/* read 'old' direction of the port and set bits (out=1, in=0) */
register_buffer = inb(CSCDR);
- if (data[0] == COMEDI_OUTPUT) {
+ if (data[0] == COMEDI_OUTPUT)
register_buffer |= (1 << chan);
- } else {
+ else
register_buffer &= ~(1 << chan);
- }
+
outb(register_buffer, CSCDR);
return 1;
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman <gregkh@suse.de> This fixes up some coding style issues in the dt3155_io.h file Cc: Scott Smedley <ss@aao.gov.au> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/dt3155/dt3155_io.h | 463 ++++++++++++++++------------------- 1 files changed, 212 insertions(+), 251 deletions(-) diff --git a/drivers/staging/dt3155/dt3155_io.h b/drivers/staging/dt3155/dt3155_io.h index 67df27f..72d655d 100644 --- a/drivers/staging/dt3155/dt3155_io.h +++ b/drivers/staging/dt3155/dt3155_io.h @@ -43,258 +43,219 @@ MA 02111-1307 USA /* offsets for 32-bit memory mapped registers */ -#define EVEN_DMA_START 0x000 -#define ODD_DMA_START 0x00C -#define EVEN_DMA_STRIDE 0x018 -#define ODD_DMA_STRIDE 0x024 -#define EVEN_PIXEL_FMT 0x030 -#define ODD_PIXEL_FMT 0x034 -#define FIFO_TRIGGER 0x038 -#define XFER_MODE 0x03C -#define CSR1 0x040 -#define RETRY_WAIT_CNT 0x044 -#define INT_CSR 0x048 -#define EVEN_FLD_MASK 0x04C -#define ODD_FLD_MASK 0x050 -#define MASK_LENGTH 0x054 -#define FIFO_FLAG_CNT 0x058 -#define IIC_CLK_DUR 0x05C -#define IIC_CSR1 0x060 -#define IIC_CSR2 0x064 -#define EVEN_DMA_UPPR_LMT 0x08C -#define ODD_DMA_UPPR_LMT 0x090 - -#define CLK_DUR_VAL 0x01010101 +#define EVEN_DMA_START 0x000 +#define ODD_DMA_START 0x00C +#define EVEN_DMA_STRIDE 0x018 +#define ODD_DMA_STRIDE 0x024 +#define EVEN_PIXEL_FMT 0x030 +#define ODD_PIXEL_FMT 0x034 +#define FIFO_TRIGGER 0x038 +#define XFER_MODE 0x03C +#define CSR1 0x040 +#define RETRY_WAIT_CNT 0x044 +#define INT_CSR 0x048 +#define EVEN_FLD_MASK 0x04C +#define ODD_FLD_MASK 0x050 +#define MASK_LENGTH 0x054 +#define FIFO_FLAG_CNT 0x058 +#define IIC_CLK_DUR 0x05C +#define IIC_CSR1 0x060 +#define IIC_CSR2 0x064 +#define EVEN_DMA_UPPR_LMT 0x08C +#define ODD_DMA_UPPR_LMT 0x090 + +#define CLK_DUR_VAL 0x01010101 ...
From: Greg Kroah-Hartman <gregkh@suse.de>
Use u8 instead, that's the proper thing to do.
Cc: Scott Smedley <ss@aao.gov.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/dt3155/dt3155_drv.c | 4 +-
drivers/staging/dt3155/dt3155_drv.h | 4 +-
drivers/staging/dt3155/dt3155_io.c | 30 ++++++------
drivers/staging/dt3155/dt3155_io.h | 90 +++++++++++++++++-----------------
drivers/staging/dt3155/dt3155_isr.c | 2 +-
5 files changed, 65 insertions(+), 65 deletions(-)
diff --git a/drivers/staging/dt3155/dt3155_drv.c b/drivers/staging/dt3155/dt3155_drv.c
index 716814e..76f8a78 100644
--- a/drivers/staging/dt3155/dt3155_drv.c
+++ b/drivers/staging/dt3155/dt3155_drv.c
@@ -122,13 +122,13 @@ int dt3155_major = 0;
struct dt3155_status_s dt3155_status[ MAXBOARDS ];
/* kernel logical address of the board */
-u_char *dt3155_lbase[ MAXBOARDS ] = { NULL
+u8 *dt3155_lbase[ MAXBOARDS ] = { NULL
#if MAXBOARDS == 2
, NULL
#endif
};
/* DT3155 registers */
-u_char *dt3155_bbase = NULL; /* kernel logical address of the *
+u8 *dt3155_bbase = NULL; /* kernel logical address of the *
* buffer region */
u_int dt3155_dev_open[ MAXBOARDS ] = {0
#if MAXBOARDS == 2
diff --git a/drivers/staging/dt3155/dt3155_drv.h b/drivers/staging/dt3155/dt3155_drv.h
index 215399a..1006cf5 100644
--- a/drivers/staging/dt3155/dt3155_drv.h
+++ b/drivers/staging/dt3155/dt3155_drv.h
@@ -25,10 +25,10 @@ MA 02111-1307 USA
#define DT3155_DRV_INC
/* kernel logical address of the frame grabbers */
-extern u_char *dt3155_lbase[MAXBOARDS];
+extern u8 *dt3155_lbase[MAXBOARDS];
/* kernel logical address of ram buffer */
-extern u_char *dt3155_bbase;
+extern u8 *dt3155_bbase;
#ifdef __KERNEL__
#include <linux/wait.h>
diff --git a/drivers/staging/dt3155/dt3155_io.c b/drivers/staging/dt3155/dt3155_io.c
index 6d51686..b0f1a78 100644
--- a/drivers/staging/dt3155/dt3155_io.c
+++ ...From: Benjamin Adolphi <b.adolphi@googlemail.com>
This fixes almost all checkpatch issues in the ni_pcidio comedi driver.
Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/ni_pcidio.c | 83 +++++++++++++++-------------
1 files changed, 44 insertions(+), 39 deletions(-)
diff --git a/drivers/staging/comedi/drivers/ni_pcidio.c b/drivers/staging/comedi/drivers/ni_pcidio.c
index 2d88a5b..9d33751 100644
--- a/drivers/staging/comedi/drivers/ni_pcidio.c
+++ b/drivers/staging/comedi/drivers/ni_pcidio.c
@@ -1,8 +1,8 @@
/*
comedi/drivers/ni_pcidio.c
driver for National Instruments PCI-DIO-96/PCI-6508
- National Instruments PCI-DIO-32HS
- National Instruments PCI-6503
+ National Instruments PCI-DIO-32HS
+ National Instruments PCI-6503
COMEDI - Linux Control and Measurement Device Interface
Copyright (C) 1999,2002 David A. Schleef <ds@schleef.org>
@@ -518,7 +518,8 @@ static irqreturn_t nidio_interrupt(int irq, void *d)
ni_pcidio_print_status(status);
/* printk("buf[0]=%08x\n",*(unsigned int *)async->prealloc_buf); */
- /* printk("buf[4096]=%08x\n",*(unsigned int *)(async->prealloc_buf+4096)); */
+ /* printk("buf[4096]=%08x\n",
+ *(unsigned int *)(async->prealloc_buf+4096)); */
spin_lock_irqsave(&devpriv->mite_channel_lock, irq_flags);
if (devpriv->di_mite_chan)
@@ -526,7 +527,9 @@ static irqreturn_t nidio_interrupt(int irq, void *d)
#ifdef MITE_DEBUG
mite_print_chsr(m_status);
#endif
- /* printk("mite_bytes_transferred: %d\n",mite_bytes_transferred(mite,DI_DMA_CHAN)); */
+ /* printk("mite_bytes_transferred: %d\n",
+ mite_bytes_transferred(mite,DI_DMA_CHAN)); */
+
/* mite_dump_regs(mite); */
if (m_status & CHSR_INT) {
if (m_status & CHSR_LINKC) {
@@ -565,7 +568,8 @@ static irqreturn_t nidio_interrupt(int irq, void *d)
DPRINTK("too much work in interrupt\n");
writeb(0x00,
...From: Greg Kroah-Hartman <gregkh@suse.de>
Use u32 and u64 instead, that's the proper thing to do.
Cc: Scott Smedley <ss@aao.gov.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/dt3155/allocator.c | 4 +-
drivers/staging/dt3155/allocator.h | 2 +-
drivers/staging/dt3155/dt3155.h | 36 ++++----
drivers/staging/dt3155/dt3155_drv.c | 51 +++++-----
drivers/staging/dt3155/dt3155_drv.h | 2 +-
drivers/staging/dt3155/dt3155_io.c | 16 ++--
drivers/staging/dt3155/dt3155_io.h | 174 +++++++++++++++++-----------------
drivers/staging/dt3155/dt3155_isr.c | 52 +++++-----
drivers/staging/dt3155/dt3155_isr.h | 2 +-
9 files changed, 169 insertions(+), 170 deletions(-)
diff --git a/drivers/staging/dt3155/allocator.c b/drivers/staging/dt3155/allocator.c
index 4983c93..114e2a8 100644
--- a/drivers/staging/dt3155/allocator.c
+++ b/drivers/staging/dt3155/allocator.c
@@ -27,7 +27,7 @@
-------------------------------------------------------------------
02-Aug-2002 NJC allocator now steps in 1MB increments, rather
than doubling its size each time.
- Also, allocator_init(u_int *) now returns
+ Also, allocator_init(u32 *) now returns
(in the first arg) the size of the free
space. This is no longer consistent with
using the allocator as a module, and some changes
@@ -195,7 +195,7 @@ int allocator_free_dma(unsigned long address)
* On cleanup everything is released. If the list is not empty, that a
* problem of our clients
*/
-int allocator_init(u_long *allocator_max)
+int allocator_init(u64 *allocator_max)
{
/* check how much free memory is there */
void *remapped;
diff --git a/drivers/staging/dt3155/allocator.h b/drivers/staging/dt3155/allocator.h
index a2f90ff..4cd81bd 100644
--- a/drivers/staging/dt3155/allocator.h
+++ b/drivers/staging/dt3155/allocator.h
@@ -24,5 +24,5 @@
void allocator_free_dma(unsigned long address);
unsigned long allocator_allocate_dma(unsigned ...From: Greg Kroah-Hartman <gregkh@suse.de> This fixes up the sparse and coding style issues found in the dt3155_io.c file. No code is changed, only formatting and removing unused code. Cc: Scott Smedley <ss@aao.gov.au> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/dt3155/dt3155_io.c | 333 +++++++++++++++--------------------- 1 files changed, 136 insertions(+), 197 deletions(-) diff --git a/drivers/staging/dt3155/dt3155_io.c b/drivers/staging/dt3155/dt3155_io.c index 236d3ea..1c15604 100644 --- a/drivers/staging/dt3155/dt3155_io.c +++ b/drivers/staging/dt3155/dt3155_io.c @@ -1,236 +1,175 @@ /* + * Copyright 1996,2002,2005 Gregory D. Hager, Alfred A. Rizzi, Noah J. Cowan, + * Jason Lapenta, Scott Smedley + * + * This file is part of the DT3155 Device Driver. + * + * The DT3155 Device Driver is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * The DT3155 Device Driver is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General + * Public License for more details. + */ -Copyright 1996,2002,2005 Gregory D. Hager, Alfred A. Rizzi, Noah J. Cowan, - Jason Lapenta, Scott Smedley - -This file is part of the DT3155 Device Driver. - -The DT3155 Device Driver is free software; you can redistribute it -and/or modify it under the terms of the GNU General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The DT3155 Device Driver is distributed in the hope that it will be -useful, but WITHOUT ANY WARRANTY; without even the implied warranty -of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See ...
From: Mark Allyn <mark.a.allyn@intel.com>
Patch renames rar_driver to rar_register to clarifiy and differentiate
from rar_handler that will be submitted later
Signed-off-by: Mark Allyn <mark.a.allyn@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/rar/Makefile | 2 +-
.../staging/rar/{rar_driver.c => rar_register.c} | 2 +-
.../staging/rar/{rar_driver.h => rar_register.h} | 0
3 files changed, 2 insertions(+), 2 deletions(-)
rename drivers/staging/rar/{rar_driver.c => rar_register.c} (99%)
rename drivers/staging/rar/{rar_driver.h => rar_register.h} (100%)
diff --git a/drivers/staging/rar/Makefile b/drivers/staging/rar/Makefile
index 5422ed0..d5954cc 100644
--- a/drivers/staging/rar/Makefile
+++ b/drivers/staging/rar/Makefile
@@ -1,2 +1,2 @@
EXTRA_CFLAGS += -DLITTLE__ENDIAN
-obj-$(CONFIG_RAR_REGISTER) += rar_driver.o
+obj-$(CONFIG_RAR_REGISTER) += rar_register.o
diff --git a/drivers/staging/rar/rar_driver.c b/drivers/staging/rar/rar_register.c
similarity index 99%
rename from drivers/staging/rar/rar_driver.c
rename to drivers/staging/rar/rar_register.c
index a85a7da..51eb5a3 100644
--- a/drivers/staging/rar/rar_driver.c
+++ b/drivers/staging/rar/rar_register.c
@@ -15,7 +15,7 @@
#include <linux/pci.h>
#include <linux/firmware.h>
#include <linux/sched.h>
-#include "rar_driver.h"
+#include "rar_register.h"
/* The following defines are for the IPC process to retrieve RAR in */
diff --git a/drivers/staging/rar/rar_driver.h b/drivers/staging/rar/rar_register.h
similarity index 100%
rename from drivers/staging/rar/rar_driver.h
rename to drivers/staging/rar/rar_register.h
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman <gregkh@suse.de> It turns out that Mimio has a userspace solution for this product using libusb, and the in-kernel driver is just getting in the way now and causing problems. So they have asked that the in-kernel driver be removed. As the staging driver wasn't quite working anyway, and Mimio supports their libusb solution for all distros, I am removing the in-kernel driver. The libusb solution can be downloaded from: http://www.mimio.com/downloads/mimio_studio_software/linux.asp Cc: <mwilder@cs.nmsu.edu> Cc: Phil Hannent <phil@hannent.co.uk> Cc: Marc Rousseau <Marc.Rousseau@mimio.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/Kconfig | 2 - drivers/staging/Makefile | 1 - drivers/staging/mimio/Kconfig | 10 - drivers/staging/mimio/Makefile | 1 - drivers/staging/mimio/mimio.c | 896 ---------------------------------------- 5 files changed, 0 insertions(+), 910 deletions(-) delete mode 100644 drivers/staging/mimio/Kconfig delete mode 100644 drivers/staging/mimio/Makefile delete mode 100644 drivers/staging/mimio/mimio.c diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig index 4a2afe7..9b396bd 100644 --- a/drivers/staging/Kconfig +++ b/drivers/staging/Kconfig @@ -79,8 +79,6 @@ source "drivers/staging/rtl8192u/Kconfig" source "drivers/staging/rtl8192e/Kconfig" -source "drivers/staging/mimio/Kconfig" - source "drivers/staging/frontier/Kconfig" source "drivers/staging/dream/Kconfig" diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile index dc40493..95ef220 100644 --- a/drivers/staging/Makefile +++ b/drivers/staging/Makefile @@ -22,7 +22,6 @@ obj-$(CONFIG_R8187SE) += rtl8187se/ obj-$(CONFIG_RTL8192SU) += rtl8192su/ obj-$(CONFIG_RTL8192U) += rtl8192u/ obj-$(CONFIG_RTL8192E) += rtl8192e/ -obj-$(CONFIG_INPUT_MIMIO) += mimio/ obj-$(CONFIG_TRANZPORT) += frontier/ obj-$(CONFIG_DREAM) += dream/ ...
From: Mark Allyn <mark.a.allyn@intel.com>
Renames the directory in which the driver files
are located; again for clarity.
Signed-off-by: Mark Allyn <mark.a.allyn@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/Kconfig | 2 +-
drivers/staging/Makefile | 2 +-
drivers/staging/{rar => rar_register}/Kconfig | 0
drivers/staging/{rar => rar_register}/Makefile | 0
.../staging/{rar => rar_register}/rar_register.c | 0
.../staging/{rar => rar_register}/rar_register.h | 0
6 files changed, 2 insertions(+), 2 deletions(-)
rename drivers/staging/{rar => rar_register}/Kconfig (100%)
rename drivers/staging/{rar => rar_register}/Makefile (100%)
rename drivers/staging/{rar => rar_register}/rar_register.c (100%)
rename drivers/staging/{rar => rar_register}/rar_register.h (100%)
diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig
index 9b396bd..7696a66 100644
--- a/drivers/staging/Kconfig
+++ b/drivers/staging/Kconfig
@@ -109,7 +109,7 @@ source "drivers/staging/hv/Kconfig"
source "drivers/staging/vme/Kconfig"
-source "drivers/staging/rar/Kconfig"
+source "drivers/staging/rar_register/Kconfig"
source "drivers/staging/sep/Kconfig"
diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile
index 95ef220..ea2e70e 100644
--- a/drivers/staging/Makefile
+++ b/drivers/staging/Makefile
@@ -35,7 +35,7 @@ obj-$(CONFIG_VT6656) += vt6656/
obj-$(CONFIG_FB_UDL) += udlfb/
obj-$(CONFIG_HYPERV) += hv/
obj-$(CONFIG_VME_BUS) += vme/
-obj-$(CONFIG_RAR_REGISTER) += rar/
+obj-$(CONFIG_RAR_REGISTER) += rar_register/
obj-$(CONFIG_DX_SEP) += sep/
obj-$(CONFIG_IIO) += iio/
obj-$(CONFIG_RAMZSWAP) += ramzswap/
diff --git a/drivers/staging/rar/Kconfig b/drivers/staging/rar_register/Kconfig
similarity index 100%
rename from drivers/staging/rar/Kconfig
rename to drivers/staging/rar_register/Kconfig
diff --git a/drivers/staging/rar/Makefile ...From: Mark Allyn <mark.a.allyn@intel.com> Provides a better explanation of what this driver is for in the Kconfig file Signed-off-by: Mark Allyn <mark.a.allyn@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/rar_register/Kconfig | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/drivers/staging/rar_register/Kconfig b/drivers/staging/rar_register/Kconfig index 17f8bf3..3f73839 100644 --- a/drivers/staging/rar_register/Kconfig +++ b/drivers/staging/rar_register/Kconfig @@ -14,4 +14,17 @@ config RAR_REGISTER contents of the restricted access region control registers. + The restricted access region control registers + (rar_registers) are used to pass address and + locking information on restricted access regions + to other drivers that use restricted access regions + + The restricted access regions are regions of memory + on the Intel MID Platform that are not accessible to + the x86 processor, but are accessible to dedicated + processors on board peripheral devices. + + The purpose of the restricted access regions is to + protect sensitive data from compromise by unauthorized + programs running on the x86 processor. endmenu -- 1.7.0.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Mark Allyn <mark.a.allyn@intel.com>
Signed-off-by: Mark Allyn <mark.a.allyn@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/rar_register/rar_register.h | 115 +++++++++++++--------------
1 files changed, 55 insertions(+), 60 deletions(-)
diff --git a/drivers/staging/rar_register/rar_register.h b/drivers/staging/rar_register/rar_register.h
index 4172fbf..29ade0f 100644
--- a/drivers/staging/rar_register/rar_register.h
+++ b/drivers/staging/rar_register/rar_register.h
@@ -1,9 +1,53 @@
-/* === RAR Physical Addresses === */
-struct RAR_address_struct {
- u32 low;
- u32 high;
+/*
+ * Copyright (C) 2010 Intel Corporation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General
+ * Public License as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be
+ * useful, but WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE. See the GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ * The full GNU General Public License is included in this
+ * distribution in the file called COPYING.
+ */
+
+
+#ifndef _RAR_REGISTER_H
+#define _RAR_REGISTER_H
+
+# include <linux/types.h>
+
+/* following are used both in drivers as well as user space apps */
+enum RAR_type {
+ RAR_TYPE_VIDEO = 0,
+ RAR_TYPE_AUDIO,
+ RAR_TYPE_IMAGE,
+ RAR_TYPE_DATA
};
+#ifdef __KERNEL__
+
+/* PCI device id for controller */
+#define PCI_RAR_DEVICE_ID 0x4110
+
+/* The register_rar function is to used by other device drivers
+ * to ensure that this driver is ready. As we cannot be sure of
+ * the compile/execute order of dirvers in ...From: Mark Allyn <mark.a.allyn@intel.com> Signed-off-by: Mark Allyn <mark.a.allyn@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/rar_register/rar_register.c | 728 ++++++++++++++++----------- 1 files changed, 445 insertions(+), 283 deletions(-) diff --git a/drivers/staging/rar_register/rar_register.c b/drivers/staging/rar_register/rar_register.c index 51eb5a3..c9dcc99 100644 --- a/drivers/staging/rar_register/rar_register.c +++ b/drivers/staging/rar_register/rar_register.c @@ -1,33 +1,67 @@ -#include <linux/init.h> -#include <linux/module.h> -#include <linux/fs.h> -#include <linux/cdev.h> -#include <linux/kdev_t.h> -#include <linux/semaphore.h> -#include <linux/mm.h> -#include <linux/poll.h> -#include <linux/wait.h> -#include <linux/ioctl.h> -#include <linux/ioport.h> -#include <linux/io.h> -#include <linux/interrupt.h> -#include <linux/pagemap.h> -#include <linux/pci.h> -#include <linux/firmware.h> -#include <linux/sched.h> +/* + * rar_register.c - An Intel Restricted Access Region register driver + * + * Copyright(c) 2009 Intel Corporation. All rights reserved. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + * 02111-1307, USA. + * + * ------------------------------------------------------------------- + * 20091204 Mark Allyn ...
From: Mark Allyn <mark.a.allyn@intel.com>
Add suspend and resume functions (which are currently stubs
returning -ENOSYS)
Signed-off-by: Mark Allyn <mark.a.allyn@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/rar_register/rar_register.c | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/drivers/staging/rar_register/rar_register.c b/drivers/staging/rar_register/rar_register.c
index c9dcc99..bfc0e31 100644
--- a/drivers/staging/rar_register/rar_register.c
+++ b/drivers/staging/rar_register/rar_register.c
@@ -506,6 +506,17 @@ int register_rar(int (*callback)(void *yourparameter), void *yourparameter)
}
EXPORT_SYMBOL(register_rar);
+/* Suspend - returns -ENOSYS */
+static int rar_suspend(struct pci_dev *dev, pm_message_t state)
+{
+ return -ENOSYS;
+}
+
+static int rar_resume(struct pci_dev *dev)
+{
+ return -ENOSYS;
+}
+
/*
* This function registers the driver with the device subsystem (
* either PCI, USB, etc).
@@ -582,7 +593,9 @@ const struct pci_device_id *my_id_table = rar_pci_id_tbl;
static struct pci_driver rar_pci_driver = {
.name = "rar_register_driver",
.id_table = rar_pci_id_tbl,
- .probe = rar_probe
+ .probe = rar_probe,
+ .suspend = rar_suspend,
+ .resume = rar_resume
};
static int __init rar_init_handler(void)
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Benjamin Adolphi <b.adolphi@googlemail.com>
This fixes all checkpatch issues in the rti800 comedi driver.
Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/rti800.c | 20 +++++++++-----------
1 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/drivers/staging/comedi/drivers/rti800.c b/drivers/staging/comedi/drivers/rti800.c
index f2ee528..028ed6f 100644
--- a/drivers/staging/comedi/drivers/rti800.c
+++ b/drivers/staging/comedi/drivers/rti800.c
@@ -225,7 +225,7 @@ static int rti800_ai_insn_read(struct comedi_device *dev,
for (t = RTI800_TIMEOUT; t; t--) {
status = inb(dev->iobase + RTI800_CSR);
if (status & RTI800_OVERRUN) {
- printk("rti800: a/d overrun\n");
+ printk(KERN_WARNING "rti800: a/d overrun\n");
outb(0, dev->iobase + RTI800_CLRFLAGS);
return -EIO;
}
@@ -234,7 +234,7 @@ static int rti800_ai_insn_read(struct comedi_device *dev,
udelay(1);
}
if (t == 0) {
- printk("rti800: timeout\n");
+ printk(KERN_WARNING "rti800: timeout\n");
return -ETIME;
}
data[i] = inb(dev->iobase + RTI800_ADCLO);
@@ -335,15 +335,15 @@ static int rti800_attach(struct comedi_device *dev, struct comedi_devconfig *it)
struct comedi_subdevice *s;
iobase = it->options[0];
- printk("comedi%d: rti800: 0x%04lx ", dev->minor, iobase);
+ printk(KERN_INFO "comedi%d: rti800: 0x%04lx\n", dev->minor, iobase);
if (!request_region(iobase, RTI800_SIZE, "rti800")) {
- printk("I/O port conflict\n");
+ printk(KERN_WARNING "I/O port conflict\n");
return -EIO;
}
dev->iobase = iobase;
#ifdef DEBUG
- printk("fingerprint=%x,%x,%x,%x,%x ",
+ printk(KERN_DEBUG "fingerprint=%x,%x,%x,%x,%x ",
inb(dev->iobase + 0),
inb(dev->iobase + 1),
inb(dev->iobase + 2),
@@ -356,15 +356,15 @@ static int rti800_attach(struct comedi_device *dev, struct comedi_devconfig *it)
irq = it->options[1];
if ...From: Jochen Maes <jochen.maes@sejo.be>
Fixed Codestyle issues
Signed-off-by: Jochen Maes <jochen.maes@sejo.be>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/dream/pmem.c | 26 ++++++++++++--------------
1 files changed, 12 insertions(+), 14 deletions(-)
diff --git a/drivers/staging/dream/pmem.c b/drivers/staging/dream/pmem.c
index def6468..503ba21 100644
--- a/drivers/staging/dream/pmem.c
+++ b/drivers/staging/dream/pmem.c
@@ -37,17 +37,17 @@
* the file should not be released until put_pmem_file is called */
#define PMEM_FLAGS_BUSY 0x1
/* indicates that this is a suballocation of a larger master range */
-#define PMEM_FLAGS_CONNECTED 0x1 << 1
+#define PMEM_FLAGS_CONNECTED ( 0x1 << 1 )
/* indicates this is a master and not a sub allocation and that it is mmaped */
-#define PMEM_FLAGS_MASTERMAP 0x1 << 2
+#define PMEM_FLAGS_MASTERMAP ( 0x1 << 2 )
/* submap and unsubmap flags indicate:
* 00: subregion has never been mmaped
* 10: subregion has been mmaped, reference to the mm was taken
* 11: subretion has ben released, refernece to the mm still held
* 01: subretion has been released, reference to the mm has been released
*/
-#define PMEM_FLAGS_SUBMAP 0x1 << 3
-#define PMEM_FLAGS_UNSUBMAP 0x1 << 4
+#define PMEM_FLAGS_SUBMAP ( 0x1 << 3 )
+#define PMEM_FLAGS_UNSUBMAP ( 0x1 << 4 )
struct pmem_data {
@@ -91,7 +91,7 @@ struct pmem_region_node {
#define PMEM_DEBUG_MSGS 0
#if PMEM_DEBUG_MSGS
-#define DLOG(fmt,args...) \
+#define DLOG(fmt, args...) \
do { printk(KERN_INFO "[%s:%s:%d] "fmt, __FILE__, __func__, __LINE__, \
##args); } \
while (0)
@@ -152,7 +152,7 @@ struct pmem_info {
static struct pmem_info pmem[PMEM_MAX_DEVICES];
static int id_count;
-#define PMEM_IS_FREE(id, index) !(pmem[id].bitmap[index].allocated)
+#define PMEM_IS_FREE(id, index) ( !(pmem[id].bitmap[index].allocated) )
#define PMEM_ORDER(id, index) pmem[id].bitmap[index].order
#define ...ACK. -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Jochen Maes <jochen.maes@sejo.be>
Removed parenthesis from return statements,
split up assignment and if condition
Signed-off-by: Jochen Maes <jochen.maes@sejo.be>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/dream/camera/s5k3e2fx.c | 22 ++++++++++++----------
1 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/drivers/staging/dream/camera/s5k3e2fx.c b/drivers/staging/dream/camera/s5k3e2fx.c
index 66582af..cbd432d 100644
--- a/drivers/staging/dream/camera/s5k3e2fx.c
+++ b/drivers/staging/dream/camera/s5k3e2fx.c
@@ -743,12 +743,14 @@ static int s5k3e2fx_sensor_open_init(const struct msm_camera_sensor_info *data)
}
/* initialize AF */
- if ((rc = s5k3e2fx_i2c_write_b(s5k3e2fx_client->addr,
- 0x3146, 0x3A)) < 0)
+ rc = s5k3e2fx_i2c_write_b(s5k3e2fx_client->addr,
+ 0x3146, 0x3A)
+ if (rc < 0)
goto init_fail1;
- if ((rc = s5k3e2fx_i2c_write_b(s5k3e2fx_client->addr,
- 0x3130, 0x03)) < 0)
+ rc = s5k3e2fx_i2c_write_b(s5k3e2fx_client->addr,
+ 0x3130, 0x03)
+ if (rc < 0)
goto init_fail1;
goto init_done;
@@ -814,20 +816,20 @@ static uint16_t s5k3e2fx_get_prev_lines_pf(void)
static uint16_t s5k3e2fx_get_prev_pixels_pl(void)
{
- return (s5k3e2fx_reg_pat[S_RES_PREVIEW].size_w +
- s5k3e2fx_reg_pat[S_RES_PREVIEW].blk_p);
+ return s5k3e2fx_reg_pat[S_RES_PREVIEW].size_w +
+ s5k3e2fx_reg_pat[S_RES_PREVIEW].blk_p;
}
static uint16_t s5k3e2fx_get_pict_lines_pf(void)
{
- return (s5k3e2fx_reg_pat[S_RES_CAPTURE].size_h +
- s5k3e2fx_reg_pat[S_RES_CAPTURE].blk_l);
+ return s5k3e2fx_reg_pat[S_RES_CAPTURE].size_h +
+ s5k3e2fx_reg_pat[S_RES_CAPTURE].blk_l;
}
static uint16_t s5k3e2fx_get_pict_pixels_pl(void)
{
- return (s5k3e2fx_reg_pat[S_RES_CAPTURE].size_w +
- s5k3e2fx_reg_pat[S_RES_CAPTURE].blk_p);
+ return s5k3e2fx_reg_pat[S_RES_CAPTURE].size_w +
+ s5k3e2fx_reg_pat[S_RES_CAPTURE].blk_p;
}
static uint32_t s5k3e2fx_get_pict_max_exp_lc(void)
-- ...ACK. -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Jochen Maes <jochen.maes@sejo.be>
Fixed code style issues.
Signed-off-by: Jochen Maes <jochen.maes@sejo.be>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/dream/camera/msm_camera.c | 63 ++++++++++++++---------------
1 files changed, 30 insertions(+), 33 deletions(-)
diff --git a/drivers/staging/dream/camera/msm_camera.c b/drivers/staging/dream/camera/msm_camera.c
index 87e118d..06dba60 100644
--- a/drivers/staging/dream/camera/msm_camera.c
+++ b/drivers/staging/dream/camera/msm_camera.c
@@ -2,7 +2,7 @@
* Copyright (C) 2008-2009 QUALCOMM Incorporated.
*/
-//FIXME: most allocations need not be GFP_ATOMIC
+/* FIXME: most allocations need not be GFP_ATOMIC
/* FIXME: management of mutexes */
/* FIXME: msm_pmem_region_lookup return values */
/* FIXME: way too many copy to/from user */
@@ -76,14 +76,14 @@ static LIST_HEAD(msm_sensors);
list_del_init(&qcmd->list); \
kfree(qcmd); \
}; \
-} while(0)
+} while (0)
#define MSM_DRAIN_QUEUE(sync, name) do { \
unsigned long flags; \
spin_lock_irqsave(&(sync)->name##_lock, flags); \
MSM_DRAIN_QUEUE_NOSYNC(sync, name); \
spin_unlock_irqrestore(&(sync)->name##_lock, flags); \
-} while(0)
+} while (0)
static int check_overlap(struct hlist_head *ptype,
unsigned long paddr,
@@ -361,7 +361,7 @@ static int __msm_get_frame(struct msm_sync *sync,
if (!frame->buffer) {
pr_err("%s: cannot get frame, invalid lookup address "
"y=%x cbcr=%x offset=%d\n",
- __FUNCTION__,
+ __func__,
pphy->y_phy,
pphy->cbcr_phy,
frame->y_off);
@@ -455,7 +455,7 @@ static int msm_disable_vfe(struct msm_sync *sync, void __user *arg)
return rc;
}
-static struct msm_queue_cmd* __msm_control(struct msm_sync *sync,
+static struct msm_queue_cmd *__msm_control(struct msm_sync *sync,
struct msm_control_device_queue *queue,
struct msm_queue_cmd *qcmd,
int timeout)
@@ -592,8 +592,7 @@ end:
* ...From: Larry Finger <Larry.Finger@lwfinger.net> The TODO list includes switching this driver to use the common EEPROM routines in EEPROM_93CX. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Tested by: Bernhard Schiffner <bernhard@schiffner-limbach.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/rtl8187se/Kconfig | 1 + drivers/staging/rtl8187se/Makefile | 1 - drivers/staging/rtl8187se/TODO | 1 - drivers/staging/rtl8187se/r8180_93cx6.c | 146 ------------------------------- drivers/staging/rtl8187se/r8180_93cx6.h | 17 ++-- drivers/staging/rtl8187se/r8180_core.c | 68 +++++++++++--- 6 files changed, 61 insertions(+), 173 deletions(-) delete mode 100644 drivers/staging/rtl8187se/r8180_93cx6.c diff --git a/drivers/staging/rtl8187se/Kconfig b/drivers/staging/rtl8187se/Kconfig index e24a6f7..155a78e 100644 --- a/drivers/staging/rtl8187se/Kconfig +++ b/drivers/staging/rtl8187se/Kconfig @@ -3,6 +3,7 @@ config R8187SE depends on PCI && WLAN select WIRELESS_EXT select WEXT_PRIV + select EEPROM_93CX6 default N ---help--- If built as a module, it will be called r8187se.ko. diff --git a/drivers/staging/rtl8187se/Makefile b/drivers/staging/rtl8187se/Makefile index b395acf..e6adf91 100644 --- a/drivers/staging/rtl8187se/Makefile +++ b/drivers/staging/rtl8187se/Makefile @@ -18,7 +18,6 @@ EXTRA_CFLAGS += -DENABLE_LPS r8187se-objs := \ r8180_core.o \ - r8180_93cx6.o \ r8180_wx.o \ r8180_rtl8225z2.o \ r8185b_init.o \ diff --git a/drivers/staging/rtl8187se/TODO b/drivers/staging/rtl8187se/TODO index a762e79..704949a 100644 --- a/drivers/staging/rtl8187se/TODO +++ b/drivers/staging/rtl8187se/TODO @@ -5,7 +5,6 @@ TODO: - switch to use shared "librtl" instead of private ieee80211 stack - switch to use LIB80211 - switch to use MAC80211 -- switch to use EEPROM_93CX6 - use kernel coding style - checkpatch.pl fixes - sparse fixes diff --git ...
From: Larry Finger <Larry.Finger@lwfinger.net>
The current driver does not follow the state of the RF switch.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/rtl8187se/r8180_core.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c
index ac987d1..0b7ec6b 100644
--- a/drivers/staging/rtl8187se/r8180_core.c
+++ b/drivers/staging/rtl8187se/r8180_core.c
@@ -4238,11 +4238,12 @@ void GPIOChangeRFWorkItemCallBack(struct work_struct *work)
/* HW radio On/Off according to the value of FF51[4](config0) */
btConfig0 = btPSR = read_nic_byte(dev, CONFIG0);
- /* Turn on LED. */
- write_nic_byte(dev, PSR, btPSR | BIT3);
-
eRfPowerStateToSet = (btConfig0 & BIT4) ? eRfOn : eRfOff;
+ /* Turn LED back on when radio enabled */
+ if (eRfPowerStateToSet == eRfOn)
+ write_nic_byte(dev, PSR, btPSR | BIT3);
+
if ((priv->ieee80211->bHwRadioOff == true) &&
(eRfPowerStateToSet == eRfOn)) {
priv->ieee80211->bHwRadioOff = false;
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Svenne Krap <svenne@krap.dk>
Trivial changes to code-paths.
Signed-off-by: Svenne Krap <svenne@krap.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/wlan-ng/hfa384x_usb.c | 24 ++++++++++++++++--------
1 files changed, 16 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c
index c6a9e17..bd2eba3 100644
--- a/drivers/staging/wlan-ng/hfa384x_usb.c
+++ b/drivers/staging/wlan-ng/hfa384x_usb.c
@@ -1909,16 +1909,20 @@ int hfa384x_drvr_flashdl_enable(hfa384x_t *hw)
return -EINVAL;
/* Retrieve the buffer loc&size and timeout */
- if ((result = hfa384x_drvr_getconfig(hw, HFA384x_RID_DOWNLOADBUFFER,
- &(hw->bufinfo),
- sizeof(hw->bufinfo)))) {
+
+ result = hfa384x_drvr_getconfig(hw, HFA384x_RID_DOWNLOADBUFFER,
+ &(hw->bufinfo), sizeof(hw->bufinfo));
+ if (result) {
return result;
}
hw->bufinfo.page = le16_to_cpu(hw->bufinfo.page);
hw->bufinfo.offset = le16_to_cpu(hw->bufinfo.offset);
hw->bufinfo.len = le16_to_cpu(hw->bufinfo.len);
- if ((result = hfa384x_drvr_getconfig16(hw, HFA384x_RID_MAXLOADTIME,
- &(hw->dltimeout)))) {
+
+ result = hfa384x_drvr_getconfig16(hw, HFA384x_RID_MAXLOADTIME,
+ &(hw->dltimeout));
+
+ if (result) {
return result;
}
hw->dltimeout = le16_to_cpu(hw->dltimeout);
@@ -3073,7 +3077,9 @@ static void hfa384x_usbctlxq_run(hfa384x_t *hw)
/* Now submit the URB and update the CTLX's state
*/
- if ((result = SUBMIT_URB(&hw->ctlx_urb, GFP_ATOMIC)) == 0) {
+
+ result = SUBMIT_URB(&hw->ctlx_urb, GFP_ATOMIC);
+ if (result == 0) {
/* This CTLX is now running on the active queue */
head->state = CTLX_REQ_SUBMITTED;
@@ -3599,7 +3605,8 @@ static void hfa384x_int_rxmonitor(wlandevice_t *wlandev,
skblen - sizeof(p80211_caphdr_t));
}
- if ((skb = dev_alloc_skb(skblen)) == NULL) {
+ skb = dev_alloc_skb(skblen);
+ if (skb == NULL) {
printk(KERN_ERR
...From: Graham M Howe <gman.1352@googlemail.com>
This is a patch to ni_atmio.c file to fix up bracing style problems
found by checkpatch.pl tool
Signed-off-by: Graham M Howe <gman.1352@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/ni_atmio.c | 34 ++++++++++++++--------------
1 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/drivers/staging/comedi/drivers/ni_atmio.c b/drivers/staging/comedi/drivers/ni_atmio.c
index 8ead311..003d00b 100644
--- a/drivers/staging/comedi/drivers/ni_atmio.c
+++ b/drivers/staging/comedi/drivers/ni_atmio.c
@@ -329,11 +329,11 @@ static uint16_t ni_atmio_win_in(struct comedi_device *dev, int addr)
}
static struct pnp_device_id device_ids[] = {
- {.id = "NIC1900",.driver_data = 0},
- {.id = "NIC2400",.driver_data = 0},
- {.id = "NIC2500",.driver_data = 0},
- {.id = "NIC2600",.driver_data = 0},
- {.id = "NIC2700",.driver_data = 0},
+ {.id = "NIC1900", .driver_data = 0},
+ {.id = "NIC2400", .driver_data = 0},
+ {.id = "NIC2500", .driver_data = 0},
+ {.id = "NIC2600", .driver_data = 0},
+ {.id = "NIC2700", .driver_data = 0},
{.id = ""}
};
@@ -362,9 +362,9 @@ static int ni_atmio_detach(struct comedi_device *dev)
if (dev->iobase)
release_region(dev->iobase, NI_SIZE);
- if (dev->irq) {
+ if (dev->irq)
free_irq(dev->irq, dev);
- }
+
if (devpriv->isapnp_dev)
pnp_device_detach(devpriv->isapnp_dev);
@@ -387,8 +387,8 @@ static int ni_isapnp_find_board(struct pnp_dev **dev)
if (pnp_device_attach(isapnp_dev) < 0) {
printk
- ("ni_atmio: %s found but already active, skipping.\n",
- ni_boards[i].name);
+ ("ni_atmio: %s found but already active, skipping.\n",
+ ni_boards[i].name);
continue;
}
if (pnp_activate_dev(isapnp_dev) < 0) {
@@ -496,9 +496,9 @@ static int ni_atmio_attach(struct comedi_device *dev,
/* generic E series stuff in ni_mio_common.c */
ret = ni_E_init(dev, it);
- if (ret < 0) {
+ if ...From: Svenne Krap <svenne@krap.dk> Cleanups as suggested by checkpatch.pl utiltiy. .o's from before and after cleanup have matching SHA1s. Signed-off-by: Svenne Krap <svenne@krap.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/wlan-ng/hfa384x.h | 74 +++++++++++++++--------------- drivers/staging/wlan-ng/hfa384x_usb.c | 8 ++-- drivers/staging/wlan-ng/p80211conv.c | 23 +++++----- drivers/staging/wlan-ng/p80211conv.h | 4 +- drivers/staging/wlan-ng/p80211metadef.h | 18 ++++---- drivers/staging/wlan-ng/p80211mgmt.h | 42 +++++++++--------- drivers/staging/wlan-ng/p80211netdev.c | 7 ++- drivers/staging/wlan-ng/p80211netdev.h | 44 +++++++++--------- drivers/staging/wlan-ng/p80211req.c | 2 +- drivers/staging/wlan-ng/p80211req.h | 2 +- drivers/staging/wlan-ng/p80211types.h | 18 ++++---- drivers/staging/wlan-ng/p80211wext.c | 55 ++++++++++++----------- drivers/staging/wlan-ng/prism2fw.c | 60 ++++++++++++------------- drivers/staging/wlan-ng/prism2mgmt.c | 4 +- drivers/staging/wlan-ng/prism2mgmt.h | 48 ++++++++++---------- drivers/staging/wlan-ng/prism2mib.c | 6 +- drivers/staging/wlan-ng/prism2sta.c | 18 ++++---- 17 files changed, 217 insertions(+), 216 deletions(-) diff --git a/drivers/staging/wlan-ng/hfa384x.h b/drivers/staging/wlan-ng/hfa384x.h index 46cce81..d93e6e9 100644 --- a/drivers/staging/wlan-ng/hfa384x.h +++ b/drivers/staging/wlan-ng/hfa384x.h @@ -115,8 +115,8 @@ /* Make a 32-bit flat address from AUX format 16-bit page and offset */ #define HFA384x_ADDR_AUX_MKFLAT(p, o) \ - (((u32)(((u16)(p))&HFA384x_ADDR_AUX_PAGE_MASK)) << 7) | \ - ((u32)(((u16)(o))&HFA384x_ADDR_AUX_OFF_MASK)) + ((((u32)(((u16)(p))&HFA384x_ADDR_AUX_PAGE_MASK)) << 7) | \ + ((u32)(((u16)(o))&HFA384x_ADDR_AUX_OFF_MASK))) /* Make CMD format offset and page from a 32-bit flat address */ #define HFA384x_ADDR_CMD_MKPAGE(f) \ @@ -402,7 +402,7 @@ typedef ...
From: Larry Finger <Larry.Finger@lwfinger.net>
Remove a routine that is not used.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/rtl8187se/r8180_core.c | 37 --------------------------------
1 files changed, 0 insertions(+), 37 deletions(-)
diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c
index 0b7ec6b..5d0bffc 100644
--- a/drivers/staging/rtl8187se/r8180_core.c
+++ b/drivers/staging/rtl8187se/r8180_core.c
@@ -3165,43 +3165,6 @@ void write_phy_cck (struct net_device *dev, u8 adr, u32 data)
rtl8185_write_phy(dev, adr, data | 0x10000);
}
-/* 70*3 = 210 ms
- * I hope this is enougth
- */
-#define MAX_PHY 70
-void write_phy(struct net_device *dev, u8 adr, u8 data)
-{
- u32 phy;
- int i;
-
- phy = 0xff0000;
- phy |= adr;
- phy |= 0x80; /* this should enable writing */
- phy |= (data<<8);
-
- //PHY_ADR, PHY_R and PHY_W are contig and treated as one dword
- write_nic_dword(dev,PHY_ADR, phy);
-
- phy= 0xffff00;
- phy |= adr;
-
- write_nic_dword(dev,PHY_ADR, phy);
- for(i=0;i<MAX_PHY;i++){
- phy=read_nic_dword(dev,PHY_ADR);
- phy= phy & 0xff0000;
- phy= phy >> 16;
- if(phy == data){ //SUCCESS!
- force_pci_posting(dev);
- mdelay(3); //random value
- return;
- }else{
- force_pci_posting(dev);
- mdelay(3); //random value
- }
- }
- DMESGW ("Phy writing %x %x failed!", adr,data);
-}
-
void rtl8185_set_rate(struct net_device *dev)
{
int i;
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Larry Finger <Larry.Finger@lwfinger.net>
For the RTL8187SE, the variable priv->rf_chip is always RF_ZEBRA4
and priv->RegThreeWireMode is always HW_THREE_WIRE_SI. Remove these
2 variables.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/rtl8187se/r8180.h | 4 -
drivers/staging/rtl8187se/r8180_core.c | 90 -------
drivers/staging/rtl8187se/r8180_dm.c | 69 ++----
drivers/staging/rtl8187se/r8180_rtl8225z2.c | 232 ++++++++----------
drivers/staging/rtl8187se/r8185b_init.c | 366 ++++++---------------------
5 files changed, 192 insertions(+), 569 deletions(-)
diff --git a/drivers/staging/rtl8187se/r8180.h b/drivers/staging/rtl8187se/r8180.h
index ce82888..d15bdf6 100644
--- a/drivers/staging/rtl8187se/r8180.h
+++ b/drivers/staging/rtl8187se/r8180.h
@@ -366,7 +366,6 @@ typedef struct r8180_priv
short diversity;
u8 cs_treshold;
short rcr_csense;
- short rf_chip;
u32 key0[4];
short (*rf_set_sens)(struct net_device *dev,short sens);
void (*rf_set_chan)(struct net_device *dev,short ch);
@@ -479,9 +478,6 @@ typedef struct r8180_priv
u8 retry_rts;
u16 rts;
-//add for RF power on power off by lizhaoming 080512
- u8 RegThreeWireMode; // See "Three wire mode" defined above, 2006.05.31, by rcnjko.
-
//by amy for led
LED_STRATEGY_8185 LedStrategy;
//by amy for led
diff --git a/drivers/staging/rtl8187se/r8180_core.c b/drivers/staging/rtl8187se/r8180_core.c
index 5d0bffc..b49eed8 100644
--- a/drivers/staging/rtl8187se/r8180_core.c
+++ b/drivers/staging/rtl8187se/r8180_core.c
@@ -663,11 +663,8 @@ unsigned char STRENGTH_MAP[] = {
void rtl8180_RSSI_calc(struct net_device *dev, u8 *rssi, u8 *qual)
{
- struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
u32 temp;
u32 temp2;
- u32 temp3;
- u32 lsb;
u32 q;
u32 orig_qual;
u8 _rssi;
@@ -689,88 +686,6 @@ void rtl8180_RSSI_calc(struct net_device *dev, u8 ...From: Dan Carpenter <error27@gmail.com>
It's clear from the indent levels and the context that there are supposed to
be curly braces here.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/vt6655/card.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/vt6655/card.c b/drivers/staging/vt6655/card.c
index db78614..bf4fd49 100644
--- a/drivers/staging/vt6655/card.c
+++ b/drivers/staging/vt6655/card.c
@@ -2788,16 +2788,18 @@ void CARDvUpdateBasicTopRate (PVOID pDeviceHandler)
//Determines the highest basic rate.
for (ii = RATE_54M; ii >= RATE_6M; ii --) {
- if ( (pDevice->wBasicRate) & ((WORD)(1<<ii)) )
+ if ( (pDevice->wBasicRate) & ((WORD)(1<<ii)) ) {
byTopOFDM = ii;
break;
+ }
}
pDevice->byTopOFDMBasicRate = byTopOFDM;
for (ii = RATE_11M;; ii --) {
- if ( (pDevice->wBasicRate) & ((WORD)(1<<ii)) )
+ if ( (pDevice->wBasicRate) & ((WORD)(1<<ii)) ) {
byTopCCK = ii;
break;
+ }
if (ii == RATE_1M)
break;
}
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Larry Finger <Larry.Finger@lwfinger.net>
Remove dead code from r8185b_init.c.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/rtl8187se/r8185b_init.c | 632 +------------------------------
1 files changed, 2 insertions(+), 630 deletions(-)
diff --git a/drivers/staging/rtl8187se/r8185b_init.c b/drivers/staging/rtl8187se/r8185b_init.c
index 19b5c9f..a0ece1f 100644
--- a/drivers/staging/rtl8187se/r8185b_init.c
+++ b/drivers/staging/rtl8187se/r8185b_init.c
@@ -243,82 +243,7 @@ void SetOutputEnableOfRfPins(struct net_device *dev)
write_nic_word(dev, RFPinsEnable, 0x1bff);
}
-void
-ZEBRA_RFSerialWrite(
- struct net_device *dev,
- u32 data2Write,
- u8 totalLength,
- u8 low2high
- )
-{
- ThreeWireReg twreg;
- int i;
- u16 oval,oval2,oval3;
- u32 mask;
- u16 UshortBuffer;
-
- u8 u1bTmp;
- // RTL8187S HSSI Read/Write Function
- u1bTmp = read_nic_byte(dev, RF_SW_CONFIG);
- u1bTmp |= RF_SW_CFG_SI; //reg08[1]=1 Serial Interface(SI)
- write_nic_byte(dev, RF_SW_CONFIG, u1bTmp);
- UshortBuffer = read_nic_word(dev, RFPinsOutput);
- oval = UshortBuffer & 0xfff8; // We shall clear bit0, 1, 2 first, 2005.10.28, by rcnjko.
-
- oval2 = read_nic_word(dev, RFPinsEnable);
- oval3 = read_nic_word(dev, RFPinsSelect);
-
- // <RJ_NOTE> 3-wire should be controled by HW when we finish SW 3-wire programming. 2005.08.10, by rcnjko.
- oval3 &= 0xfff8;
-
- write_nic_word(dev, RFPinsEnable, (oval2|0x0007)); // Set To Output Enable
- write_nic_word(dev, RFPinsSelect, (oval3|0x0007)); // Set To SW Switch
- udelay(10);
-
- // Add this to avoid hardware and software 3-wire conflict.
- // 2005.03.01, by rcnjko.
- twreg.longData = 0;
- twreg.struc.enableB = 1;
- write_nic_word(dev, RFPinsOutput, (twreg.longData|oval)); // Set SI_EN (RFLE)
- udelay(2);
- twreg.struc.enableB = 0;
- write_nic_word(dev, RFPinsOutput, (twreg.longData|oval)); // Clear SI_EN ...From: Bernie Thompson <bernie@plugable.com>
Eliminate checkpatch.pl warnings and errors so later patches in series are clean
Signed-off-by: Bernie Thompson <bernie@plugable.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/udlfb/udlfb.c | 74 +++++++++++++++++++----------------------
drivers/staging/udlfb/udlfb.h | 1 -
2 files changed, 34 insertions(+), 41 deletions(-)
diff --git a/drivers/staging/udlfb/udlfb.c b/drivers/staging/udlfb/udlfb.c
index b61a3e5..d2adfe4 100644
--- a/drivers/staging/udlfb/udlfb.c
+++ b/drivers/staging/udlfb/udlfb.c
@@ -30,13 +30,13 @@
#define DRIVER_VERSION "DisplayLink Framebuffer Driver 0.4.1"
static struct fb_fix_screeninfo dlfb_fix = {
- .id = "displaylinkfb",
- .type = FB_TYPE_PACKED_PIXELS,
- .visual = FB_VISUAL_TRUECOLOR,
- .xpanstep = 0,
- .ypanstep = 0,
- .ywrapstep = 0,
- .accel = FB_ACCEL_NONE,
+ .id = "displaylinkfb",
+ .type = FB_TYPE_PACKED_PIXELS,
+ .visual = FB_VISUAL_TRUECOLOR,
+ .xpanstep = 0,
+ .ypanstep = 0,
+ .ywrapstep = 0,
+ .accel = FB_ACCEL_NONE,
};
#define NR_USB_REQUEST_I2C_SUB_IO 0x02
@@ -48,21 +48,21 @@ static struct fb_fix_screeninfo dlfb_fix = {
*/
static char *insert_command(char *buf, u8 reg, u8 val)
{
- *buf++ = 0xAF;
- *buf++ = 0x20;
- *buf++ = reg;
- *buf++ = val;
- return buf;
+ *buf++ = 0xAF;
+ *buf++ = 0x20;
+ *buf++ = reg;
+ *buf++ = val;
+ return buf;
}
static char *insert_vidreg_lock(char *buf)
{
- return insert_command(buf, 0xFF, 0x00);
+ return insert_command(buf, 0xFF, 0x00);
}
static char *insert_vidreg_unlock(char *buf)
{
- return insert_command(buf, 0xFF, 0xFF);
+ return insert_command(buf, 0xFF, 0xFF);
}
/*
@@ -71,33 +71,33 @@ static char *insert_vidreg_unlock(char *buf)
*/
static char *insert_enable_hvsync(char *buf)
{
- return ...From: Bernie Thompson <bernie@plugable.com>
Reorganize the location of a few things to be closer to related code
Signed-off-by: Bernie Thompson <bernie@plugable.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/udlfb/udlfb.c | 62 +++++++++++++++++++---------------------
drivers/staging/udlfb/udlfb.h | 3 ++
2 files changed, 32 insertions(+), 33 deletions(-)
diff --git a/drivers/staging/udlfb/udlfb.c b/drivers/staging/udlfb/udlfb.c
index d2adfe4..3306bba 100644
--- a/drivers/staging/udlfb/udlfb.c
+++ b/drivers/staging/udlfb/udlfb.c
@@ -39,8 +39,17 @@ static struct fb_fix_screeninfo dlfb_fix = {
.accel = FB_ACCEL_NONE,
};
-#define NR_USB_REQUEST_I2C_SUB_IO 0x02
-#define NR_USB_REQUEST_CHANNEL 0x12
+/*
+ * There are many DisplayLink-based products, all with unique PIDs. We are able
+ * to support all volume ones (circa 2009) with a single driver, so we match
+ * globally on VID. TODO: Probe() needs to detect when we might be running
+ * "future" chips, and bail on those, so a compatible driver can match.
+ */
+static struct usb_device_id id_table[] = {
+ {.idVendor = 0x17e9, .match_flags = USB_DEVICE_ID_MATCH_VENDOR,},
+ {},
+};
+MODULE_DEVICE_TABLE(usb, id_table);
/*
* Inserts a specific DisplayLink controller command into the provided
@@ -252,24 +261,6 @@ error:
return retval;
}
-/*
- * This is necessary before we can communicate with the display controller.
- */
-static int dlfb_select_std_channel(struct dlfb_data *dev)
-{
- int ret;
- u8 set_def_chn[] = { 0x57, 0xCD, 0xDC, 0xA7,
- 0x1C, 0x88, 0x5E, 0x15,
- 0x60, 0xFE, 0xC6, 0x97,
- 0x16, 0x3D, 0x47, 0xF2 };
-
- ret = usb_control_msg(dev->udev, usb_sndctrlpipe(dev->udev, 0),
- NR_USB_REQUEST_CHANNEL,
- (USB_DIR_OUT | USB_TYPE_VENDOR), 0, 0,
- set_def_chn, sizeof(set_def_chn), USB_CTRL_SET_TIMEOUT);
- return ret;
-}
-
/*
* Query EDID from the handware, then hand it off to fbdev's edid parse
@@ -325,18 +316,6 @@ struct ...From: Bernie Thompson <bernie@plugable.com>
Add functions to pre-allocate and free usb bulk urbs for core render path.
Udlfb currently allocates a single urb, guarded by a mutex, that is a key
bottleneck. Because udlfb sends so much data, preallocation is most efficient.
Functions will be used by new rendering functions in later patches.
Signed-off-by: Bernie Thompson <bernie@plugable.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/udlfb/udlfb.c | 192 +++++++++++++++++++++++++++++++++++++++++
drivers/staging/udlfb/udlfb.h | 35 ++++++++
2 files changed, 227 insertions(+), 0 deletions(-)
diff --git a/drivers/staging/udlfb/udlfb.c b/drivers/staging/udlfb/udlfb.c
index 3306bba..592b185 100644
--- a/drivers/staging/udlfb/udlfb.c
+++ b/drivers/staging/udlfb/udlfb.c
@@ -51,6 +51,13 @@ static struct usb_device_id id_table[] = {
};
MODULE_DEVICE_TABLE(usb, id_table);
+/* dlfb keeps a list of urbs for efficient bulk transfers */
+static void dlfb_urb_completion(struct urb *urb);
+static struct urb *dlfb_get_urb(struct dlfb_data *dev);
+static int dlfb_submit_urb(struct dlfb_data *dev, struct urb * urb, size_t len);
+static int dlfb_alloc_urb_list(struct dlfb_data *dev, int count, size_t size);
+static void dlfb_free_urb_list(struct dlfb_data *dev);
+
/*
* Inserts a specific DisplayLink controller command into the provided
* buffer.
@@ -901,6 +908,21 @@ static int dlfb_release(struct fb_info *info, int user)
return 0;
}
+/*
+ * Called when all client interfaces to start transactions have been disabled,
+ * and all references to our device instance (dlfb_data) are released.
+ * Every transaction must have a reference, so we know are fully spun down
+ */
+static void dlfb_delete(struct kref *kref)
+{
+ struct dlfb_data *dev = container_of(kref, struct dlfb_data, kref);
+
+ if (dev->backing_buffer)
+ vfree(dev->backing_buffer);
+
+ kfree(dev);
+}
+
static int dlfb_blank(int blank_mode, struct fb_info *info)
{
...From: Bernie Thompson <bernie@plugable.com>
Move to more consistent naming scheme
All udlfb functions start with udlfb_
All functions for udlfb's fbdev interface start with udlfb_ops_
All functinos for udlfb's usb interface start with udlfb_usb_
Signed-off-by: Bernie Thompson <bernie@plugable.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/udlfb/udlfb.c | 133 +++++++++++++++++++++--------------------
1 files changed, 67 insertions(+), 66 deletions(-)
diff --git a/drivers/staging/udlfb/udlfb.c b/drivers/staging/udlfb/udlfb.c
index 592b185..8d8372f 100644
--- a/drivers/staging/udlfb/udlfb.c
+++ b/drivers/staging/udlfb/udlfb.c
@@ -62,7 +62,7 @@ static void dlfb_free_urb_list(struct dlfb_data *dev);
* Inserts a specific DisplayLink controller command into the provided
* buffer.
*/
-static char *insert_command(char *buf, u8 reg, u8 val)
+static char *dlfb_set_register(char *buf, u8 reg, u8 val)
{
*buf++ = 0xAF;
*buf++ = 0x20;
@@ -71,59 +71,59 @@ static char *insert_command(char *buf, u8 reg, u8 val)
return buf;
}
-static char *insert_vidreg_lock(char *buf)
+static char *dlfb_vidreg_lock(char *buf)
{
- return insert_command(buf, 0xFF, 0x00);
+ return dlfb_set_register(buf, 0xFF, 0x00);
}
-static char *insert_vidreg_unlock(char *buf)
+static char *dlfb_vidreg_unlock(char *buf)
{
- return insert_command(buf, 0xFF, 0xFF);
+ return dlfb_set_register(buf, 0xFF, 0xFF);
}
/*
* Once you send this command, the DisplayLink framebuffer gets driven to the
* display.
*/
-static char *insert_enable_hvsync(char *buf)
+static char *dlfb_enable_hvsync(char *buf)
{
- return insert_command(buf, 0x1F, 0x00);
+ return dlfb_set_register(buf, 0x1F, 0x00);
}
-static char *insert_set_color_depth(char *buf, u8 selection)
+static char *dlfb_set_color_depth(char *buf, u8 selection)
{
- return insert_command(buf, 0x00, selection);
+ return dlfb_set_register(buf, 0x00, selection);
}
-static char ...From: Bernie Thompson <bernie@plugable.com>
Add sysfs controls for edid and performance metrics
There are 8 new files exposed in /sys/class/graphics/fb*
edid - returns 128 byte edid blog, suitable for parsing with parse-edid
metrics_bytes_identical
metrics_bytes_rendered
metrics_bytes_sent
metrics_cpu_kcycles_used
metrics_misc
and metrics_reset, which resets all perf metrics to zero
The 6 perf metrics are of type atomic_t.
So these metrics return precise results for short benchmarks, but
any test approx a minute or longer runtime may roll over.
Signed-off-by: Bernie Thompson <bernie@plugable.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/udlfb/udlfb.c | 251 +++++++++++++++++++++++++++++++++++++++++
drivers/staging/udlfb/udlfb.h | 18 +++
2 files changed, 269 insertions(+), 0 deletions(-)
diff --git a/drivers/staging/udlfb/udlfb.c b/drivers/staging/udlfb/udlfb.c
index 8d8372f..01672df 100644
--- a/drivers/staging/udlfb/udlfb.c
+++ b/drivers/staging/udlfb/udlfb.c
@@ -818,6 +818,21 @@ static void dlfb_ops_fillrect(struct fb_info *info,
}
+static void dlfb_get_edid(struct dlfb_data *dev)
+{
+ int i;
+ int ret;
+ char rbuf[2];
+
+ for (i = 0; i < sizeof(dev->edid); i++) {
+ ret = usb_control_msg(dev->udev,
+ usb_rcvctrlpipe(dev->udev, 0), (0x02),
+ (0x80 | (0x02 << 5)), i << 8, 0xA1, rbuf, 2,
+ 0);
+ dev->edid[i] = rbuf[1];
+ }
+}
+
static int dlfb_ops_ioctl(struct fb_info *info, unsigned int cmd,
unsigned long arg)
{
@@ -924,6 +939,33 @@ static void dlfb_delete(struct kref *kref)
kfree(dev);
}
+/*
+ * Check whether a video mode is supported by the DisplayLink chip
+ * We start from monitor's modes, so don't need to filter that here
+ */
+static int dlfb_is_valid_mode(struct fb_videomode *mode,
+ struct fb_info *info)
+{
+ struct dlfb_data *dev = info->par;
+
+ if (mode->xres * mode->yres > dev->sku_pixel_limit)
+ return 0;
+
+ return 1;
+}
+
+static void ...From: Bernie Thompson <bernie@plugable.com>
Rework probe to use refcounts and std functions
Because the different parts of the driver (usb, fbdev) tear down
in different orders, the driver previously could crash accessing
data that had already been freed. Refcounting system used to handle.
Reworked probe to make use of refcounts, set mode using std fbops,
and set up sysfs and pre-allocated urbs.
Signed-off-by: Bernie Thompson <bernie@plugable.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/udlfb/udlfb.c | 304 ++++++++++++++++++++++++++---------------
drivers/staging/udlfb/udlfb.h | 3 +-
2 files changed, 198 insertions(+), 109 deletions(-)
diff --git a/drivers/staging/udlfb/udlfb.c b/drivers/staging/udlfb/udlfb.c
index 01672df..8ee55c8 100644
--- a/drivers/staging/udlfb/udlfb.c
+++ b/drivers/staging/udlfb/udlfb.c
@@ -3,6 +3,7 @@
*
* Copyright (C) 2009 Roberto De Ioris <roberto@unbit.it>
* Copyright (C) 2009 Jaya Kumar <jayakumar.lkml@gmail.com>
+ * Copyright (C) 2009 Bernie Thompson <bernie@plugable.com>
*
* This file is subject to the terms and conditions of the GNU General Public
* License v2. See the file COPYING in the main directory of this archive for
@@ -27,10 +28,8 @@
#include "udlfb.h"
-#define DRIVER_VERSION "DisplayLink Framebuffer Driver 0.4.1"
-
static struct fb_fix_screeninfo dlfb_fix = {
- .id = "displaylinkfb",
+ .id = "udlfb",
.type = FB_TYPE_PACKED_PIXELS,
.visual = FB_VISUAL_TRUECOLOR,
.xpanstep = 0,
@@ -39,6 +38,13 @@ static struct fb_fix_screeninfo dlfb_fix = {
.accel = FB_ACCEL_NONE,
};
+static const u32 udlfb_info_flags = FBINFO_DEFAULT | FBINFO_READS_FAST |
+#ifdef FBINFO_VIRTFB
+ FBINFO_VIRTFB |
+#endif
+ FBINFO_HWACCEL_IMAGEBLIT | FBINFO_HWACCEL_FILLRECT |
+ FBINFO_HWACCEL_COPYAREA | FBINFO_MISC_ALWAYS_SETPAR;
+
/*
* There are many DisplayLink-based products, all with unique PIDs. We are able
* to support all ...From: Bernie Thompson <bernie@plugable.com>
Rework rendering for improved performance
Approx 10-20% gain avg across several "benchmarks": x11perf, gtkperf, glxgears
Moves from a single pre-alloc'd urb protected by a long-held mutex
To a list of (4) pre-alloc'd urbs which can be dispatched asynchonously
Improved rendering algorithm to hardware with lower CPU consumption,
fewer system memory accesses, and slightly higher compression.
Better scalability to multiple processors, especially with
multiple framebuffers active.
Signed-off-by: Bernie Thompson <bernie@plugable.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/udlfb/udlfb.c | 848 +++++++++++++++--------------------------
drivers/staging/udlfb/udlfb.h | 79 ++---
2 files changed, 344 insertions(+), 583 deletions(-)
diff --git a/drivers/staging/udlfb/udlfb.c b/drivers/staging/udlfb/udlfb.c
index 8ee55c8..22f3dc3 100644
--- a/drivers/staging/udlfb/udlfb.c
+++ b/drivers/staging/udlfb/udlfb.c
@@ -23,7 +23,6 @@
#include <linux/uaccess.h>
#include <linux/mm.h>
#include <linux/fb.h>
-#include <linux/mutex.h>
#include <linux/vmalloc.h>
#include "udlfb.h"
@@ -88,12 +87,14 @@ static char *dlfb_vidreg_unlock(char *buf)
}
/*
- * Once you send this command, the DisplayLink framebuffer gets driven to the
- * display.
+ * On/Off for driving the DisplayLink framebuffer to the display
*/
-static char *dlfb_enable_hvsync(char *buf)
+static char *dlfb_enable_hvsync(char *buf, bool enable)
{
- return dlfb_set_register(buf, 0x1F, 0x00);
+ if (enable)
+ return dlfb_set_register(buf, 0x1F, 0x00);
+ else
+ return dlfb_set_register(buf, 0x1F, 0x01);
}
static char *dlfb_set_color_depth(char *buf, u8 selection)
@@ -233,8 +234,15 @@ static int dlfb_set_video_mode(struct dlfb_data *dev,
char *wrptr;
int retval = 0;
int writesize;
+ struct urb *urb;
- buf = dev->buf;
+ if (!atomic_read(&dev->usb_active))
+ return -EPERM;
+
+ urb = dlfb_get_urb(dev);
+ if ...From: Bernie Thompson <bernie@plugable.com> Add support for fbdev mmap clients who don't send damage ioctls Because DisplayLink devices are out on the other end of usb, their "framebuffer" is just normal system memory. So memory mapped writes don't automatically trigger anything. So up to this point, standard fbdev clients who rely on mmap() will get an unchanging screen. This patch makes udlfb a client of Jaya Kumar's defio framework - which sets up page fault triggers, and those faults are accumulated and sent to udlfb on a defferred basis, to process as damage notifications for the framebuffer. Because this involves more overhead than a notification directly from the application (e.g. just passing on X DAMAGE extension notifications), a sysfs attribute is provided by udlfb to control defio support. /sys/class/graphics/fb*/use_defio - writing a "0" to this file before calling mmap() causes defio to not be initialized - instead udlfb will rely on getting damage notifications directly through the damage ioctl. There are unsolved rendering problems with defio (horizontal dead regions on framebuffer, that accumulate over time) which still needs a fix. Signed-off-by: Bernie Thompson <bernie@plugable.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/udlfb/udlfb.c | 124 ++++++++++++++++++++++++++++++++++++++++- 1 files changed, 121 insertions(+), 3 deletions(-) diff --git a/drivers/staging/udlfb/udlfb.c b/drivers/staging/udlfb/udlfb.c index 22f3dc3..939b8fa 100644 --- a/drivers/staging/udlfb/udlfb.c +++ b/drivers/staging/udlfb/udlfb.c @@ -63,6 +63,11 @@ static int dlfb_submit_urb(struct dlfb_data *dev, struct urb * urb, size_t len); static int dlfb_alloc_urb_list(struct dlfb_data *dev, int count, size_t size); static void dlfb_free_urb_list(struct dlfb_data *dev); +/* other symbols with dependents */ +#ifdef CONFIG_FB_DEFERRED_IO +static struct fb_deferred_io dlfb_defio; +#endif + /* * Inserts a specific DisplayLink controller ...
From: Bernie Thompson <bernie@plugable.com> Specify Kconfig dependencies, and include warnings for building as a module udlfb is dependent on FB_DEFERRED_IO, FB_SYS_*, and FB_MODE_HELPERS Because many kernels do not include defio (which cannot be built as a module), yet users want to be able to build udlfb as a module later, udlfb has ifdefs and these dependency warnings to help udlfb build with or without certain dependencies, but also print warnings for any lost function. Even though this kind of flexibility isn't common, we've gotten feedback from a significant portion of users that they were frustrated without it. Signed-off-by: Bernie Thompson <bernie@plugable.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/udlfb/Kconfig | 14 ++++++++++---- drivers/staging/udlfb/udlfb.c | 14 ++++++++++++++ 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/drivers/staging/udlfb/Kconfig b/drivers/staging/udlfb/Kconfig index 641692d..65bd5db 100644 --- a/drivers/staging/udlfb/Kconfig +++ b/drivers/staging/udlfb/Kconfig @@ -1,8 +1,14 @@ config FB_UDL tristate "Displaylink USB Framebuffer support" depends on FB && USB + select FB_MODE_HELPERS + select FB_SYS_FILLRECT + select FB_SYS_COPYAREA + select FB_SYS_IMAGEBLIT + select FB_SYS_FOPS + select FB_DEFERRED_IO ---help--- - This is an experimental driver for DisplayLink USB devices - that provides a framebuffer device. A normal framebuffer can - be used with this driver, or xorg can be run on the device - using it. + This is a kernel framebuffer driver for DisplayLink USB devices. + Supports fbdev clients like xf86-video-fbdev, kdrive, fbi, and + mplayer -vo fbdev. Supports all USB 2.0 era DisplayLink devices. + To compile as a module, choose M here: the module name is udlfb. diff --git a/drivers/staging/udlfb/udlfb.c b/drivers/staging/udlfb/udlfb.c index 939b8fa..baad03a 100644 --- a/drivers/staging/udlfb/udlfb.c +++ b/drivers/staging/udlfb/udlfb.c @@ ...
From: Bernie Thompson <bernie@plugable.com>
Remove last remaining printk and clarify comments
Signed-off-by: Bernie Thompson <bernie@plugable.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/udlfb/udlfb.c | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/udlfb/udlfb.c b/drivers/staging/udlfb/udlfb.c
index baad03a..8f6223c 100644
--- a/drivers/staging/udlfb/udlfb.c
+++ b/drivers/staging/udlfb/udlfb.c
@@ -83,8 +83,8 @@ static struct fb_deferred_io dlfb_defio;
#endif
/*
- * Inserts a specific DisplayLink controller command into the provided
- * buffer.
+ * All DisplayLink bulk operations start with 0xAF, followed by specific code
+ * All operations are written to buffers which then later get sent to device
*/
static char *dlfb_set_register(char *buf, u8 reg, u8 val)
{
@@ -129,6 +129,10 @@ static char *dlfb_set_base16bpp(char *wrptr, u32 base)
return dlfb_set_register(wrptr, 0x22, base);
}
+/*
+ * DisplayLink HW has separate 16bpp and 8bpp framebuffers.
+ * In 24bpp modes, the low 323 RGB bits go in the 8bpp framebuffer
+ */
static char *dlfb_set_base8bpp(char *wrptr, u32 base)
{
wrptr = dlfb_set_register(wrptr, 0x26, base >> 16);
@@ -161,7 +165,7 @@ static char *dlfb_set_register_16be(char *wrptr, u8 reg, u16 value)
* same actual count. This makes sense once you read above a couple of
* times and think about it from a hardware perspective.
*/
-static u16 lfsr16(u16 actual_count)
+static u16 dlfb_lfsr16(u16 actual_count)
{
u32 lv = 0xFFFF; /* This is the lfsr value that the hw starts with */
@@ -180,7 +184,7 @@ static u16 lfsr16(u16 actual_count)
*/
static char *dlfb_set_register_lfsr16(char *wrptr, u8 reg, u16 value)
{
- return dlfb_set_register_16(wrptr, reg, lfsr16(value));
+ return dlfb_set_register_16(wrptr, reg, dlfb_lfsr16(value));
}
/*
@@ -292,8 +296,9 @@ static int dlfb_ops_mmap(struct fb_info *info, struct vm_area_struct *vma)
...From: Randy Dunlap <randy.dunlap@oracle.com> rtl8187se needs to include semaphore.h to prevent build errors: drivers/staging/rtl8187se/ieee80211/ieee80211.h:1004: error: field 'wx_sem' has incomplete type drivers/staging/rtl8187se/ieee80211/ieee80211.h:1005: error: field 'scan_sem' has incomplete type Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/rtl8187se/ieee80211/ieee80211.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211.h b/drivers/staging/rtl8187se/ieee80211/ieee80211.h index 04a48e7..c4ab683 100644 --- a/drivers/staging/rtl8187se/ieee80211/ieee80211.h +++ b/drivers/staging/rtl8187se/ieee80211/ieee80211.h @@ -29,6 +29,7 @@ #include <linux/jiffies.h> #include <linux/timer.h> #include <linux/sched.h> +#include <linux/semaphore.h> #include <linux/wireless.h> #include <linux/ieee80211.h> -- 1.7.0.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Martyn Welch <martyn.welch@ge.com> This patch corrects author email addresses and Copyright notices as a result of the split up of the GE Fanuc joint venture. Signed-off-by: Martyn Welch <martyn.welch@gefanuc.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/vme/bridges/vme_ca91cx42.c | 4 ++-- drivers/staging/vme/bridges/vme_ca91cx42.h | 4 ++-- drivers/staging/vme/bridges/vme_tsi148.c | 4 ++-- drivers/staging/vme/devices/vme_user.c | 6 +++--- drivers/staging/vme/vme.c | 6 +++--- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/staging/vme/bridges/vme_ca91cx42.c b/drivers/staging/vme/bridges/vme_ca91cx42.c index 8072784..272cc26 100644 --- a/drivers/staging/vme/bridges/vme_ca91cx42.c +++ b/drivers/staging/vme/bridges/vme_ca91cx42.c @@ -1,8 +1,8 @@ /* * Support for the Tundra Universe I/II VME-PCI Bridge Chips * - * Author: Martyn Welch <martyn.welch@gefanuc.com> - * Copyright 2008 GE Fanuc Intelligent Platforms Embedded Systems, Inc. + * Author: Martyn Welch <martyn.welch@ge.com> + * Copyright 2008 GE Intelligent Platforms Embedded Systems, Inc. * * Based on work by Tom Armistead and Ajit Prem * Copyright 2004 Motorola Inc. diff --git a/drivers/staging/vme/bridges/vme_ca91cx42.h b/drivers/staging/vme/bridges/vme_ca91cx42.h index 95a42c2..2a9ad14 100644 --- a/drivers/staging/vme/bridges/vme_ca91cx42.h +++ b/drivers/staging/vme/bridges/vme_ca91cx42.h @@ -7,8 +7,8 @@ * Updated by Ajit Prem * Copyright 2004 Motorola Inc. * - * Further updated by Martyn Welch <martyn.welch@gefanuc.com> - * Copyright 2009 GE Fanuc Intelligent Platforms Embedded Systems, Inc. + * Further updated by Martyn Welch <martyn.welch@ge.com> + * Copyright 2009 GE Intelligent Platforms Embedded Systems, Inc. * * Derived from ca91c042.h by Michael Wyrick * diff --git a/drivers/staging/vme/bridges/vme_tsi148.c b/drivers/staging/vme/bridges/vme_tsi148.c index ed8297d..2ca5126 ...
From: Martyn Welch <martyn.welch@gefanuc.com> Check the directions in which the DMA controller is expected to operate before giving control of a resource. Signed-off-by: Martyn Welch <martyn.welch@gefanuc.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/vme/TODO | 22 ---------------------- drivers/staging/vme/bridges/vme_ca91cx42.c | 2 ++ drivers/staging/vme/bridges/vme_tsi148.c | 4 ++++ drivers/staging/vme/vme.c | 8 +++++--- drivers/staging/vme/vme.h | 10 +++++++++- drivers/staging/vme/vme_api.txt | 27 +++++++++++++++++++-------- drivers/staging/vme/vme_bridge.h | 1 + 7 files changed, 40 insertions(+), 34 deletions(-) diff --git a/drivers/staging/vme/TODO b/drivers/staging/vme/TODO index 2201ff6..bdc5f62 100644 --- a/drivers/staging/vme/TODO +++ b/drivers/staging/vme/TODO @@ -4,28 +4,6 @@ API === -DMA Resource Allocation incomplete ----------------------------------- - -The current DMA resource Allocation provides no means of selecting the -suitability of a DMA controller based on it's supported modes of operation, as -opposed to the resource allocation mechanisms for master and slave windows: - - struct vme_resource *vme_dma_request(struct device *dev); - -As opposed to: - - struct vme_resource * vme_master_request(struct device *dev, - vme_address_t aspace, vme_cycle_t cycle, vme_width_t width); - -The TSI148 can perform, VME-to-PCI, PCI-to-VME, PATTERN-to-VME, PATTERN-to-PCI, -VME-to-VME and PCI-to-PCI transfers. The CA91C142 can only provide VME-to-PCI -and PCI-to-VME. - -Add a mechanism to select a VME controller based on source/target type, -required aspace, cycle and width requirements. - - Master window broadcast select mask ----------------------------------- diff --git a/drivers/staging/vme/bridges/vme_ca91cx42.c b/drivers/staging/vme/bridges/vme_ca91cx42.c index 272cc26..7eaba35 100644 --- ...
From: Martyn Welch <martyn.welch@ge.com> At the moment the vme bridge drivers are written in a way that only allows them to support one bridge at a time. Modify the drivers to enable more than one bridge to be present per board. Signed-off-by: Martyn Welch <martyn.welch@ge.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/vme/TODO | 2 - drivers/staging/vme/bridges/vme_ca91cx42.c | 411 ++++++++++-------- drivers/staging/vme/bridges/vme_ca91cx42.h | 16 + drivers/staging/vme/bridges/vme_tsi148.c | 634 ++++++++++++++++------------ drivers/staging/vme/bridges/vme_tsi148.h | 16 + drivers/staging/vme/vme.c | 10 +- drivers/staging/vme/vme_bridge.h | 8 +- 7 files changed, 633 insertions(+), 464 deletions(-) diff --git a/drivers/staging/vme/TODO b/drivers/staging/vme/TODO index bdc5f62..83d44cb 100644 --- a/drivers/staging/vme/TODO +++ b/drivers/staging/vme/TODO @@ -47,7 +47,6 @@ Bridge Support Tempe (tsi148) -------------- -- Driver can currently only support a single bridge. - 2eSST Broadcast mode. - Mailboxes unsupported. - Improve error detection. @@ -58,7 +57,6 @@ Tempe (tsi148) Universe II (ca91c142) ---------------------- -- Driver can currently only support a single bridge. - DMA unsupported. - RMW transactions unsupported. - Location Monitors unsupported. diff --git a/drivers/staging/vme/bridges/vme_ca91cx42.c b/drivers/staging/vme/bridges/vme_ca91cx42.c index 7eaba35..c2f86a6 100644 --- a/drivers/staging/vme/bridges/vme_ca91cx42.c +++ b/drivers/staging/vme/bridges/vme_ca91cx42.c @@ -41,24 +41,6 @@ static void __exit ca91cx42_exit(void); /* Module parameters */ static int geoid; -static struct vme_bridge *ca91cx42_bridge; -static wait_queue_head_t dma_queue; -static wait_queue_head_t iack_queue; -#if 0 -static wait_queue_head_t lm_queue; -#endif -static wait_queue_head_t mbox_queue; - -static void (*lm_callback[4])(int); /* Called in ...
From: Martyn Welch <martyn.welch@ge.com>
The vme_master_resource structure contains an item called "pci_resource".
Rename to make bus agnostic.
Signed-off-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/vme/TODO | 1 -
drivers/staging/vme/bridges/vme_ca91cx42.c | 48 +++++++++++++-------------
drivers/staging/vme/bridges/vme_tsi148.c | 50 ++++++++++++++--------------
drivers/staging/vme/vme_bridge.h | 2 +-
4 files changed, 50 insertions(+), 51 deletions(-)
diff --git a/drivers/staging/vme/TODO b/drivers/staging/vme/TODO
index 83d44cb..00c0ddc 100644
--- a/drivers/staging/vme/TODO
+++ b/drivers/staging/vme/TODO
@@ -37,7 +37,6 @@ chips. They are currently not supported at all by the API.
Core
====
-- Rename vme_master_resource's "pci_resource" to be bus agnostic.
- Improve generic sanity checks (Such as does an offset and size fit within a
window and parameter checking).
diff --git a/drivers/staging/vme/bridges/vme_ca91cx42.c b/drivers/staging/vme/bridges/vme_ca91cx42.c
index c2f86a6..ae2f69c 100644
--- a/drivers/staging/vme/bridges/vme_ca91cx42.c
+++ b/drivers/staging/vme/bridges/vme_ca91cx42.c
@@ -526,8 +526,8 @@ static int ca91cx42_alloc_resource(struct vme_master_resource *image,
}
pdev = container_of(ca91cx42_bridge->parent, struct pci_dev, dev);
- existing_size = (unsigned long long)(image->pci_resource.end -
- image->pci_resource.start);
+ existing_size = (unsigned long long)(image->bus_resource.end -
+ image->bus_resource.start);
/* If the existing size is OK, return */
if (existing_size == (size - 1))
@@ -536,15 +536,15 @@ static int ca91cx42_alloc_resource(struct vme_master_resource *image,
if (existing_size != 0) {
iounmap(image->kern_base);
image->kern_base = NULL;
- if (image->pci_resource.name != ...From: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/vme/TODO | 1 -
drivers/staging/vme/bridges/vme_ca91cx42.c | 272 ++++++++++++++++++++--------
drivers/staging/vme/bridges/vme_ca91cx42.h | 13 ++
3 files changed, 213 insertions(+), 73 deletions(-)
diff --git a/drivers/staging/vme/TODO b/drivers/staging/vme/TODO
index 00c0ddc..723b67b 100644
--- a/drivers/staging/vme/TODO
+++ b/drivers/staging/vme/TODO
@@ -58,7 +58,6 @@ Universe II (ca91c142)
- DMA unsupported.
- RMW transactions unsupported.
-- Location Monitors unsupported.
- Mailboxes unsupported.
- Error Detection.
- Control of prefetch size, threshold.
diff --git a/drivers/staging/vme/bridges/vme_ca91cx42.c b/drivers/staging/vme/bridges/vme_ca91cx42.c
index ae2f69c..aeb11d5 100644
--- a/drivers/staging/vme/bridges/vme_ca91cx42.c
+++ b/drivers/staging/vme/bridges/vme_ca91cx42.c
@@ -899,6 +899,206 @@ ssize_t ca91cx42_master_write(struct vme_master_resource *image, void *buf,
return retval;
}
+/*
+ * All 4 location monitors reside at the same base - this is therefore a
+ * system wide configuration.
+ *
+ * This does not enable the LM monitor - that should be done when the first
+ * callback is attached and disabled when the last callback is removed.
+ */
+int ca91cx42_lm_set(struct vme_lm_resource *lm, unsigned long long lm_base,
+ vme_address_t aspace, vme_cycle_t cycle)
+{
+ u32 temp_base, lm_ctl = 0;
+ int i;
+ struct ca91cx42_driver *bridge;
+ struct device *dev;
+
+ bridge = lm->parent->driver_priv;
+ dev = lm->parent->parent;
+
+ /* Check the alignment of the location monitor */
+ temp_base = (u32)lm_base;
+ if (temp_base & 0xffff) {
+ dev_err(dev, "Location monitor must be aligned to 64KB "
+ "boundary");
+ return -EINVAL;
+ }
+
+ mutex_lock(&(lm->mtx));
+
+ /* If we already have a callback attached, we can't move it! */
+ for (i = 0; i < ...From: Martyn Welch <martyn.welch@ge.com>
Add support for the DMA controller in the ca91cx42 bridge.
Signed-off-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/vme/TODO | 1 -
drivers/staging/vme/bridges/Kconfig | 1 +
drivers/staging/vme/bridges/vme_ca91cx42.c | 599 ++++++++++++----------------
drivers/staging/vme/bridges/vme_ca91cx42.h | 93 +++--
4 files changed, 327 insertions(+), 367 deletions(-)
diff --git a/drivers/staging/vme/TODO b/drivers/staging/vme/TODO
index 723b67b..f0dba3e 100644
--- a/drivers/staging/vme/TODO
+++ b/drivers/staging/vme/TODO
@@ -56,7 +56,6 @@ Tempe (tsi148)
Universe II (ca91c142)
----------------------
-- DMA unsupported.
- RMW transactions unsupported.
- Mailboxes unsupported.
- Error Detection.
diff --git a/drivers/staging/vme/bridges/Kconfig b/drivers/staging/vme/bridges/Kconfig
index 66c49f5..9331064 100644
--- a/drivers/staging/vme/bridges/Kconfig
+++ b/drivers/staging/vme/bridges/Kconfig
@@ -2,6 +2,7 @@ comment "VME Bridge Drivers"
config VME_CA91CX42
tristate "Universe II"
+ depends on VIRT_TO_BUS
help
If you say Y here you get support for the Tundra CA91C142
(Universe II) VME bridge chip.
diff --git a/drivers/staging/vme/bridges/vme_ca91cx42.c b/drivers/staging/vme/bridges/vme_ca91cx42.c
index aeb11d5..eddf071 100644
--- a/drivers/staging/vme/bridges/vme_ca91cx42.c
+++ b/drivers/staging/vme/bridges/vme_ca91cx42.c
@@ -592,8 +592,8 @@ err_name:
}
/*
- * * Free and unmap PCI Resource
- * */
+ * Free and unmap PCI Resource
+ */
static void ca91cx42_free_resource(struct vme_master_resource *image)
{
iounmap(image->kern_base);
@@ -899,6 +899,261 @@ ssize_t ca91cx42_master_write(struct vme_master_resource *image, void *buf,
return retval;
}
+int ca91cx42_dma_list_add(struct vme_dma_list *list, struct vme_dma_attr *src,
+ struct vme_dma_attr *dest, size_t count)
+{
+ struct ...From: Martyn Welch <martyn.welch@ge.com>
The ca91cx42 driver currently incorrectly handles master windows, setting
and retrieving the sizing parameters incorrectly. Also, in the slave window
handling, it uses an incorrectly set variable.
Signed-off-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/vme/bridges/vme_ca91cx42.c | 25 +++++++++++++++----------
1 files changed, 15 insertions(+), 10 deletions(-)
diff --git a/drivers/staging/vme/bridges/vme_ca91cx42.c b/drivers/staging/vme/bridges/vme_ca91cx42.c
index eddf071..0348cc8 100644
--- a/drivers/staging/vme/bridges/vme_ca91cx42.c
+++ b/drivers/staging/vme/bridges/vme_ca91cx42.c
@@ -337,7 +337,7 @@ int ca91cx42_slave_set(struct vme_slave_resource *image, int enabled,
unsigned long long vme_base, unsigned long long size,
dma_addr_t pci_base, vme_address_t aspace, vme_cycle_t cycle)
{
- unsigned int i, addr = 0, granularity = 0;
+ unsigned int i, addr = 0, granularity;
unsigned int temp_ctl = 0;
unsigned int vme_bound, pci_offset;
struct ca91cx42_driver *bridge;
@@ -376,7 +376,7 @@ int ca91cx42_slave_set(struct vme_slave_resource *image, int enabled,
* Bound address is a valid address for the window, adjust
* accordingly
*/
- vme_bound = vme_base + size - granularity;
+ vme_bound = vme_base + size;
pci_offset = pci_base - vme_base;
/* XXX Need to check that vme_base, vme_bound and pci_offset aren't
@@ -609,20 +609,27 @@ int ca91cx42_master_set(struct vme_master_resource *image, int enabled,
vme_address_t aspace, vme_cycle_t cycle, vme_width_t dwidth)
{
int retval = 0;
- unsigned int i;
+ unsigned int i, granularity = 0;
unsigned int temp_ctl = 0;
unsigned long long pci_bound, vme_offset, pci_base;
struct ca91cx42_driver *bridge;
bridge = image->parent->driver_priv;
+ i = image->number;
+
+ if ((i == 0) || (i == 4))
+ granularity = 0x1000;
+ else
+ granularity = 0x10000;
+
/* Verify input data ...From: Martyn Welch <martyn.welch@ge.com>
Add support for Master Read-Modify-Write cycles on the ca91cx42.
Signed-off-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/vme/TODO | 1 -
drivers/staging/vme/bridges/vme_ca91cx42.c | 138 +++++++++++-----------------
drivers/staging/vme/bridges/vme_ca91cx42.h | 10 ++
3 files changed, 64 insertions(+), 85 deletions(-)
diff --git a/drivers/staging/vme/TODO b/drivers/staging/vme/TODO
index f0dba3e..82c222b 100644
--- a/drivers/staging/vme/TODO
+++ b/drivers/staging/vme/TODO
@@ -56,7 +56,6 @@ Tempe (tsi148)
Universe II (ca91c142)
----------------------
-- RMW transactions unsupported.
- Mailboxes unsupported.
- Error Detection.
- Control of prefetch size, threshold.
diff --git a/drivers/staging/vme/bridges/vme_ca91cx42.c b/drivers/staging/vme/bridges/vme_ca91cx42.c
index 0348cc8..1edfa44 100644
--- a/drivers/staging/vme/bridges/vme_ca91cx42.c
+++ b/drivers/staging/vme/bridges/vme_ca91cx42.c
@@ -904,6 +904,60 @@ ssize_t ca91cx42_master_write(struct vme_master_resource *image, void *buf,
return retval;
}
+unsigned int ca91cx42_master_rmw(struct vme_master_resource *image,
+ unsigned int mask, unsigned int compare, unsigned int swap,
+ loff_t offset)
+{
+ u32 pci_addr, result;
+ int i;
+ struct ca91cx42_driver *bridge;
+ struct device *dev;
+
+ bridge = image->parent->driver_priv;
+ dev = image->parent->parent;
+
+ /* Find the PCI address that maps to the desired VME address */
+ i = image->number;
+
+ /* Locking as we can only do one of these at a time */
+ mutex_lock(&(bridge->vme_rmw));
+
+ /* Lock image */
+ spin_lock(&(image->lock));
+
+ pci_addr = (u32)image->kern_base + offset;
+
+ /* Address must be 4-byte aligned */
+ if (pci_addr & 0x3) {
+ dev_err(dev, "RMW Address not 4-byte aligned\n");
+ return -EINVAL;
+ }
+
+ /* Ensure RMW Disabled whilst configuring */
+ iowrite32(0, bridge->base + ...From: Martyn Welch <martyn.welch@ge.com>
Sort out slot detection on the ca91cx42.
Signed-off-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/vme/bridges/vme_ca91cx42.c | 19 +++++--------------
1 files changed, 5 insertions(+), 14 deletions(-)
diff --git a/drivers/staging/vme/bridges/vme_ca91cx42.c b/drivers/staging/vme/bridges/vme_ca91cx42.c
index 1edfa44..ecd9179 100644
--- a/drivers/staging/vme/bridges/vme_ca91cx42.c
+++ b/drivers/staging/vme/bridges/vme_ca91cx42.c
@@ -1452,14 +1452,12 @@ static int ca91cx42_crcsr_init(struct vme_bridge *ca91cx42_bridge,
bridge = ca91cx42_bridge->driver_priv;
-/* XXX We may need to set this somehow as the Universe II does not support
- * geographical addressing.
- */
-#if 0
- if (vme_slotnum != -1)
- iowrite32(vme_slotnum << 27, bridge->base + VCSR_BS);
-#endif
slot = ca91cx42_slot_get(ca91cx42_bridge);
+
+ /* Write CSR Base Address if slot ID is supplied as a module param */
+ if (geoid)
+ iowrite32(geoid << 27, bridge->base + VCSR_BS);
+
dev_info(&pdev->dev, "CR/CSR Offset: %d\n", slot);
if (slot == 0) {
dev_err(&pdev->dev, "Slot number is unset, not configuring "
@@ -1714,10 +1712,6 @@ static int ca91cx42_probe(struct pci_dev *pdev, const struct pci_device_id *id)
if (ca91cx42_crcsr_init(ca91cx42_bridge, pdev)) {
dev_err(&pdev->dev, "CR/CSR configuration failed.\n");
- retval = -EINVAL;
-#if 0
- goto err_crcsr;
-#endif
}
/* Need to save ca91cx42_bridge pointer locally in link list for use in
@@ -1736,9 +1730,6 @@ static int ca91cx42_probe(struct pci_dev *pdev, const struct pci_device_id *id)
vme_unregister_bridge(ca91cx42_bridge);
err_reg:
ca91cx42_crcsr_exit(ca91cx42_bridge, pdev);
-#if 0
-err_crcsr:
-#endif
err_lm:
/* resources are stored in link list */
list_for_each(pos, &(ca91cx42_bridge->lm_resources)) {
--
1.7.0.1
_______________________________________________
devel mailing ...From: Martyn Welch <martyn.welch@ge.com>
Remove the code from the drivers that we are not going to implement before
submitting for review.
Signed-off-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/vme/bridges/vme_ca91cx42.c | 150 +------------
drivers/staging/vme/bridges/vme_tsi148.c | 351 +---------------------------
drivers/staging/vme/vme.c | 4 -
drivers/staging/vme/vme_bridge.h | 58 -----
4 files changed, 4 insertions(+), 559 deletions(-)
diff --git a/drivers/staging/vme/bridges/vme_ca91cx42.c b/drivers/staging/vme/bridges/vme_ca91cx42.c
index ecd9179..2795ff2 100644
--- a/drivers/staging/vme/bridges/vme_ca91cx42.c
+++ b/drivers/staging/vme/bridges/vme_ca91cx42.c
@@ -93,21 +93,6 @@ static u32 ca91cx42_IACK_irqhandler(struct ca91cx42_driver *bridge)
return CA91CX42_LINT_SW_IACK;
}
-#if 0
-int ca91cx42_bus_error_chk(int clrflag)
-{
- int tmp;
- tmp = ioread32(bridge->base + PCI_COMMAND);
- if (tmp & 0x08000000) { /* S_TA is Set */
- if (clrflag)
- iowrite32(tmp | 0x08000000,
- bridge->base + PCI_COMMAND);
- return 1;
- }
- return 0;
-}
-#endif
-
static u32 ca91cx42_VERR_irqhandler(struct ca91cx42_driver *bridge)
{
int val;
@@ -379,10 +364,6 @@ int ca91cx42_slave_set(struct vme_slave_resource *image, int enabled,
vme_bound = vme_base + size;
pci_offset = pci_base - vme_base;
- /* XXX Need to check that vme_base, vme_bound and pci_offset aren't
- * too big for registers
- */
-
if ((i == 0) || (i == 4))
granularity = 0x1000;
else
@@ -411,18 +392,6 @@ int ca91cx42_slave_set(struct vme_slave_resource *image, int enabled,
iowrite32(vme_bound, bridge->base + CA91CX42_VSI_BD[i]);
iowrite32(pci_offset, bridge->base + CA91CX42_VSI_TO[i]);
-/* XXX Prefetch stuff currently unsupported */
-#if 0
- if (vmeIn->wrPostEnable)
- temp_ctl |= CA91CX42_VSI_CTL_PWEN;
- if (vmeIn->prefetchEnable)
- temp_ctl |= ...From: Arthur Benilov <arthur.benilov@iba-group.com>
Provide vme_user_llseek() implementation.
Signed-off-by: Arthur Benilov <arthur.benilov@iba-group.com>
Signed-off-by: Vincent Bossier <vincent.bossier@iba-group.com>
Acked-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/vme/devices/vme_user.c | 35 ++++++++++++++++++++++++++++++-
1 files changed, 33 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/vme/devices/vme_user.c b/drivers/staging/vme/devices/vme_user.c
index 48d46ca..ddecbe5 100644
--- a/drivers/staging/vme/devices/vme_user.c
+++ b/drivers/staging/vme/devices/vme_user.c
@@ -400,8 +400,39 @@ static ssize_t vme_user_write(struct file *file, const char *buf, size_t count,
static loff_t vme_user_llseek(struct file *file, loff_t off, int whence)
{
- printk(KERN_ERR "Llseek currently incomplete\n");
- return -EINVAL;
+ loff_t absolute = -1;
+ unsigned int minor = MINOR(file->f_dentry->d_inode->i_rdev);
+ size_t image_size;
+
+ down(&image[minor].sem);
+ image_size = vme_get_size(image[minor].resource);
+
+ switch (whence) {
+ case SEEK_SET:
+ absolute = off;
+ break;
+ case SEEK_CUR:
+ absolute = file->f_pos + off;
+ break;
+ case SEEK_END:
+ absolute = image_size + off;
+ break;
+ default:
+ up(&image[minor].sem);
+ return -EINVAL;
+ break;
+ }
+
+ if ((absolute < 0) || (absolute >= image_size)) {
+ up(&image[minor].sem);
+ return -EINVAL;
+ }
+
+ file->f_pos = absolute;
+
+ up(&image[minor].sem);
+
+ return absolute;
}
/*
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Arthur Benilov <arthur.benilov@iba-group.com>
When requesting slave resources A16 addressing mode flag is used to find
available windows. Since the ca91cx42 bridge only supports two A16 slave windows
but four are requested, the driver fails to initialize. The flag has been
changed to A24, which is supported by all slave windows.
Signed-off-by: Arthur Benilov <arthur.benilov@iba-group.com>
Signed-off-by: Vincent Bossier <vincent.bossier@iba-group.com>
Acked-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/vme/devices/vme_user.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/drivers/staging/vme/devices/vme_user.c b/drivers/staging/vme/devices/vme_user.c
index ddecbe5..0d404f1 100644
--- a/drivers/staging/vme/devices/vme_user.c
+++ b/drivers/staging/vme/devices/vme_user.c
@@ -701,8 +701,12 @@ static int __init vme_user_probe(struct device *dev, int cur_bus, int cur_slot)
/* Request slave resources and allocate buffers (128kB wide) */
for (i = SLAVE_MINOR; i < (SLAVE_MAX + 1); i++) {
/* XXX Need to properly request attributes */
+ /* For ca91cx42 bridge there are only two slave windows
+ * supporting A16 addressing, so we request A24 supported
+ * by all windows.
+ */
image[i].resource = vme_slave_request(vme_user_bridge,
- VME_A16, VME_SCT);
+ VME_A24, VME_SCT);
if (image[i].resource == NULL) {
printk(KERN_WARNING "Unable to allocate slave "
"resource\n");
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Arthur Benilov <arthur.benilov@iba-group.com>
For VME device I/O operations on master windows the user driver tends
to use kern_buf buffer array which is not allocated. This causes an error
when reading from master window device files.
Signed-off-by: Arthur Benilov <arthur.benilov@iba-group.com>
Signed-off-by: Vincent Bossier <vincent.bossier@iba-group.com>
Acked-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/vme/devices/vme_user.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/drivers/staging/vme/devices/vme_user.c b/drivers/staging/vme/devices/vme_user.c
index 0d404f1..c60c80f 100644
--- a/drivers/staging/vme/devices/vme_user.c
+++ b/drivers/staging/vme/devices/vme_user.c
@@ -738,6 +738,14 @@ static int __init vme_user_probe(struct device *dev, int cur_bus, int cur_slot)
"resource\n");
goto err_master;
}
+ image[i].size_buf = PCI_BUF_SIZE;
+ image[i].kern_buf = kmalloc(image[i].size_buf, GFP_KERNEL);
+ if (image[i].kern_buf == NULL) {
+ printk(KERN_WARNING "Unable to allocate memory for "
+ "master window buffers\n");
+ err = -ENOMEM;
+ goto err_master_buf;
+ }
}
/* Create sysfs entries - on udev systems this creates the dev files */
@@ -791,6 +799,9 @@ err_sysfs:
/* Ensure counter set correcty to unalloc all master windows */
i = MASTER_MAX + 1;
+err_master_buf:
+ for (i = MASTER_MINOR; i < (MASTER_MAX + 1); i++)
+ kfree(image[i].kern_buf);
err_master:
while (i > MASTER_MINOR) {
i--;
@@ -826,6 +837,9 @@ static int __exit vme_user_remove(struct device *dev, int cur_bus, int cur_slot)
}
class_destroy(vme_user_sysfs_class);
+ for (i = MASTER_MINOR; i < (MASTER_MAX + 1); i++)
+ kfree(image[i].kern_buf);
+
for (i = SLAVE_MINOR; i < (SLAVE_MAX + 1); i++) {
vme_slave_set(image[i].resource, 0, 0, 0, 0, VME_A32, 0);
vme_slave_free(image[i].resource);
-- ...From: Arthur Benilov <arthur.benilov@iba-group.com> VMIVME-7805 board has a special control register that has to be used in order to activate the VME bus access via the Universe II bridge. This control register also handles endianess convertion. Signed-off-by: Arthur Benilov <arthur.benilov@iba-group.com> Signed-off-by: Vincent Bossier <vincent.bossier@iba-group.com> Acked-by: Martyn Welch <martyn.welch@ge.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/vme/Kconfig | 2 + drivers/staging/vme/Makefile | 1 + drivers/staging/vme/boards/Kconfig | 9 ++ drivers/staging/vme/boards/Makefile | 5 + drivers/staging/vme/boards/vme_vmivme7805.c | 124 +++++++++++++++++++++++++++ drivers/staging/vme/boards/vme_vmivme7805.h | 37 ++++++++ 6 files changed, 178 insertions(+), 0 deletions(-) create mode 100644 drivers/staging/vme/boards/Kconfig create mode 100644 drivers/staging/vme/boards/Makefile create mode 100644 drivers/staging/vme/boards/vme_vmivme7805.c create mode 100644 drivers/staging/vme/boards/vme_vmivme7805.h diff --git a/drivers/staging/vme/Kconfig b/drivers/staging/vme/Kconfig index ae628a5..6411ae5 100644 --- a/drivers/staging/vme/Kconfig +++ b/drivers/staging/vme/Kconfig @@ -14,4 +14,6 @@ source "drivers/staging/vme/bridges/Kconfig" source "drivers/staging/vme/devices/Kconfig" +source "drivers/staging/vme/boards/Kconfig" + endif # VME diff --git a/drivers/staging/vme/Makefile b/drivers/staging/vme/Makefile index 8c3b90e..b4ea3f8 100644 --- a/drivers/staging/vme/Makefile +++ b/drivers/staging/vme/Makefile @@ -5,3 +5,4 @@ obj-$(CONFIG_VME_BUS) += vme.o obj-y += bridges/ obj-y += devices/ +obj-y += boards/ diff --git a/drivers/staging/vme/boards/Kconfig b/drivers/staging/vme/boards/Kconfig new file mode 100644 index 0000000..7616313 --- /dev/null +++ b/drivers/staging/vme/boards/Kconfig @@ -0,0 +1,9 @@ +comment "VME Board Drivers" + +config ...
From: Graham M Howe <gman.1352@googlemail.com>
This is a patch to the ni_daq_700.c file that fixes up brace and 80 character warnings
found by the checkpatch.pl tool
Signed-off-by: Graham M Howe <gman.1352@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/ni_daq_700.c | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/staging/comedi/drivers/ni_daq_700.c b/drivers/staging/comedi/drivers/ni_daq_700.c
index ef5e118..c9b0395 100644
--- a/drivers/staging/comedi/drivers/ni_daq_700.c
+++ b/drivers/staging/comedi/drivers/ni_daq_700.c
@@ -76,13 +76,15 @@ struct dio700_board {
static const struct dio700_board dio700_boards[] = {
{
.name = "daqcard-700",
- .device_id = 0x4743, /* 0x10b is manufacturer id, 0x4743 is device id */
+ /* 0x10b is manufacturer id, 0x4743 is device id */
+ .device_id = 0x4743,
.bustype = pcmcia_bustype,
.have_dio = 1,
},
{
.name = "ni_daq_700",
- .device_id = 0x4743, /* 0x10b is manufacturer id, 0x4743 is device id */
+ /* 0x10b is manufacturer id, 0x4743 is device id */
+ .device_id = 0x4743,
.bustype = pcmcia_bustype,
.have_dio = 1,
},
@@ -309,11 +311,11 @@ int subdev_700_init(struct comedi_device *dev, struct comedi_subdevice *s,
return -ENOMEM;
CALLBACK_ARG = arg;
- if (cb == NULL) {
+ if (cb == NULL)
CALLBACK_FUNC = subdev_700_cb;
- } else {
+ else
CALLBACK_FUNC = cb;
- }
+
s->insn_bits = subdev_700_insn;
s->insn_config = subdev_700_insn_config;
@@ -345,12 +347,10 @@ int subdev_700_init_irq(struct comedi_device *dev, struct comedi_subdevice *s,
void subdev_700_cleanup(struct comedi_device *dev, struct comedi_subdevice *s)
{
- if (s->private) {
- if (subdevpriv->have_irq) {
- }
+ if (s->private)
+ if (subdevpriv->have_irq)
- kfree(s->private);
- }
+ kfree(s->private);
}
EXPORT_SYMBOL(subdev_700_init);
@@ -390,9 +390,9 @@ static int ...From: Mark Brown <broonie@opensource.wolfsonmicro.com>
Staticise a number of functions which aren't exported outside their
source files, and also add a __user annotation for the buffer in
iio_event_chrdev_read().
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/iio/industrialio-core.c | 14 +++++++-------
drivers/staging/iio/trigger_consumer.h | 4 ++--
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/staging/iio/industrialio-core.c b/drivers/staging/iio/industrialio-core.c
index 4ff683a..b456dfc 100644
--- a/drivers/staging/iio/industrialio-core.c
+++ b/drivers/staging/iio/industrialio-core.c
@@ -118,7 +118,7 @@ int iio_push_event(struct iio_dev *dev_info,
EXPORT_SYMBOL(iio_push_event);
/* Generic interrupt line interrupt handler */
-irqreturn_t iio_interrupt_handler(int irq, void *_int_info)
+static irqreturn_t iio_interrupt_handler(int irq, void *_int_info)
{
struct iio_interrupt *int_info = _int_info;
struct iio_dev *dev_info = int_info->dev_info;
@@ -252,10 +252,10 @@ void iio_remove_event_from_list(struct iio_event_handler_list *el,
}
EXPORT_SYMBOL(iio_remove_event_from_list);
-ssize_t iio_event_chrdev_read(struct file *filep,
- char *buf,
- size_t count,
- loff_t *f_ps)
+static ssize_t iio_event_chrdev_read(struct file *filep,
+ char __user *buf,
+ size_t count,
+ loff_t *f_ps)
{
struct iio_event_interface *ev_int = filep->private_data;
struct iio_detected_event_list *el;
@@ -313,7 +313,7 @@ error_ret:
return ret;
}
-int iio_event_chrdev_release(struct inode *inode, struct file *filep)
+static int iio_event_chrdev_release(struct inode *inode, struct file *filep)
{
struct iio_handler *hand = iio_cdev_to_handler(inode->i_cdev);
struct iio_event_interface *ev_int = hand->private;
@@ -335,7 +335,7 @@ int ...From: Sven Eckelmann <sven.eckelmann@gmx.de>
The code which uses the raw packet sockets was removed. The only related
dependencies are the skb and netdev handling code. This is provided by
NET in Kconfig.
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/batman-adv/Kconfig | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/staging/batman-adv/Kconfig b/drivers/staging/batman-adv/Kconfig
index 69e8fb0..1e7e0a8 100644
--- a/drivers/staging/batman-adv/Kconfig
+++ b/drivers/staging/batman-adv/Kconfig
@@ -4,7 +4,7 @@
config BATMAN_ADV
tristate "B.A.T.M.A.N. Advanced Meshing Protocol"
- depends on PROC_FS && PACKET
+ depends on PROC_FS && NET
default n
---help---
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
As in other parts of batman-adv, we should not lock while sending a packet but
keep the lock held for as short as possible. Additionally, we should check
whether the interface is active, otherwise batman_if->net_dev might not be
available ...
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Acked-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/batman-adv/device.c | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/batman-adv/device.c b/drivers/staging/batman-adv/device.c
index a3e7429..451898c 100644
--- a/drivers/staging/batman-adv/device.c
+++ b/drivers/staging/batman-adv/device.c
@@ -25,6 +25,7 @@
#include "send.h"
#include "types.h"
#include "hash.h"
+#include "hard-interface.h"
static struct class *batman_class;
@@ -206,6 +207,7 @@ ssize_t bat_device_write(struct file *file, const char __user *buff,
struct icmp_packet icmp_packet;
struct orig_node *orig_node;
struct batman_if *batman_if;
+ uint8_t dstaddr[ETH_ALEN];
unsigned long flags;
if (len < sizeof(struct icmp_packet)) {
@@ -251,9 +253,15 @@ ssize_t bat_device_write(struct file *file, const char __user *buff,
goto unlock;
batman_if = orig_node->batman_if;
+ memcpy(dstaddr, orig_node->router->addr, ETH_ALEN);
+
+ spin_unlock_irqrestore(&orig_hash_lock, flags);
if (!batman_if)
- goto unlock;
+ goto dst_unreach;
+
+ if (batman_if->if_active != IF_ACTIVE)
+ goto dst_unreach;
memcpy(icmp_packet.orig,
batman_if->net_dev->dev_addr,
@@ -261,9 +269,8 @@ ssize_t bat_device_write(struct file *file, const char __user *buff,
send_raw_packet((unsigned char *)&icmp_packet,
sizeof(struct icmp_packet),
- batman_if, orig_node->router->addr);
+ batman_if, dstaddr);
- spin_unlock_irqrestore(&orig_hash_lock, flags);
goto out;
...From: Marek Lindner <lindner_marek@yahoo.de>
The routing code has 2 sections which warn about ttl exceeded. The
corresponding warnings were identical which makes it hard to debug. In
addition, batman-adv does not need to warn about ttl exceeded in case
we encountered an echo request as this is commonly used to generate
traceroute graphs.
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/batman-adv/routing.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/batman-adv/routing.c b/drivers/staging/batman-adv/routing.c
index 09917e5..8abaa61 100644
--- a/drivers/staging/batman-adv/routing.c
+++ b/drivers/staging/batman-adv/routing.c
@@ -655,14 +655,15 @@ static int recv_icmp_ttl_exceeded(struct sk_buff *skb)
unsigned long flags;
uint8_t dstaddr[ETH_ALEN];
- icmp_packet = (struct icmp_packet *) skb->data;
- ethhdr = (struct ethhdr *) skb_mac_header(skb);
-
- printk(KERN_WARNING "batman-adv:Warning - can't send packet from %pM to %pM: ttl exceeded\n", icmp_packet->orig, icmp_packet->dst);
+ icmp_packet = (struct icmp_packet *)skb->data;
+ ethhdr = (struct ethhdr *)skb_mac_header(skb);
/* send TTL exceeded if packet is an echo request (traceroute) */
- if (icmp_packet->msg_type != ECHO_REQUEST)
+ if (icmp_packet->msg_type != ECHO_REQUEST) {
+ printk(KERN_WARNING "batman-adv:Warning - can't forward icmp packet from %pM to %pM: ttl exceeded\n",
+ icmp_packet->orig, icmp_packet->dst);
return NET_RX_DROP;
+ }
/* get routing information */
spin_lock_irqsave(&orig_hash_lock, flags);
@@ -825,7 +826,8 @@ int recv_unicast_packet(struct sk_buff *skb)
/* TTL exceeded */
if (unicast_packet->ttl < 2) {
- printk(KERN_WARNING "batman-adv:Warning - can't send packet from %pM to %pM: ttl exceeded\n", ethhdr->h_source, unicast_packet->dest);
+ printk(KERN_WARNING "batman-adv:Warning - ...From: Marek Lindner <lindner_marek@yahoo.de>
This patch removes a variable that became obsolete since the skb handling
replaced the packet handling thread.
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/batman-adv/routing.c | 2 --
drivers/staging/batman-adv/routing.h | 1 -
2 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/batman-adv/routing.c b/drivers/staging/batman-adv/routing.c
index 8abaa61..7dc9aef 100644
--- a/drivers/staging/batman-adv/routing.c
+++ b/drivers/staging/batman-adv/routing.c
@@ -35,8 +35,6 @@
DECLARE_WAIT_QUEUE_HEAD(thread_wait);
-atomic_t exit_cond;
-
void slide_own_bcast_window(struct batman_if *batman_if)
{
HASHIT(hashit);
diff --git a/drivers/staging/batman-adv/routing.h b/drivers/staging/batman-adv/routing.h
index c217241..939b8d4 100644
--- a/drivers/staging/batman-adv/routing.h
+++ b/drivers/staging/batman-adv/routing.h
@@ -22,7 +22,6 @@
#include "types.h"
extern wait_queue_head_t thread_wait;
-extern atomic_t exit_cond;
void slide_own_bcast_window(struct batman_if *batman_if);
void receive_bat_packet(struct ethhdr *ethhdr,
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Linus Luessing <linus.luessing@web.de> This fixes the bug discovered by Marek Lindner which did not allow turning on the vis-server before an interface has been added. With this patch we are using a global atomic variable for activating and deactiating the vis-server-mode, which can be used before inserting an interface. Signed-off-by: Linus Luessing <linus.luessing@web.de> Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/batman-adv/main.c | 2 + drivers/staging/batman-adv/main.h | 1 + drivers/staging/batman-adv/proc.c | 15 +++++------ drivers/staging/batman-adv/send.c | 3 +- drivers/staging/batman-adv/vis.c | 46 +++++-------------------------------- drivers/staging/batman-adv/vis.h | 2 - 6 files changed, 18 insertions(+), 51 deletions(-) diff --git a/drivers/staging/batman-adv/main.c b/drivers/staging/batman-adv/main.c index 3f78075..2e0b482 100644 --- a/drivers/staging/batman-adv/main.c +++ b/drivers/staging/batman-adv/main.c @@ -43,6 +43,7 @@ DEFINE_SPINLOCK(forw_bcast_list_lock); atomic_t originator_interval; atomic_t vis_interval; +atomic_t vis_mode; atomic_t aggregation_enabled; int16_t num_hna; int16_t num_ifs; @@ -83,6 +84,7 @@ int init_module(void) atomic_set(&originator_interval, 1000); atomic_set(&vis_interval, 1000);/* TODO: raise this later, this is only * for debugging now. */ + atomic_set(&vis_mode, VIS_TYPE_CLIENT_UPDATE); atomic_set(&aggregation_enabled, 1); /* the name should not be longer than 10 chars - see diff --git a/drivers/staging/batman-adv/main.h b/drivers/staging/batman-adv/main.h index eb6a702..deb41f5 100644 --- a/drivers/staging/batman-adv/main.h +++ b/drivers/staging/batman-adv/main.h @@ -130,6 +130,7 @@ extern spinlock_t forw_bcast_list_lock; extern atomic_t originator_interval; extern atomic_t vis_interval; +extern atomic_t vis_mode; extern atomic_t aggregation_enabled; extern int16_t num_hna; ...
From: Andrew Lunn <andrew@lunn.ch> The vis code takes a copy of the data inside the skbuf if it is interesting for us, so we always need to release the skbuf. Reported-by: Linus Luessing <linus.luessing@web.de> Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/batman-adv/routing.c | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/staging/batman-adv/routing.c b/drivers/staging/batman-adv/routing.c index 7dc9aef..d89048b 100644 --- a/drivers/staging/batman-adv/routing.c +++ b/drivers/staging/batman-adv/routing.c @@ -939,7 +939,6 @@ int recv_vis_packet(struct sk_buff *skb) struct vis_packet *vis_packet; struct ethhdr *ethhdr; int hdr_size = sizeof(struct vis_packet); - int ret; if (skb_headlen(skb) < hdr_size) return NET_RX_DROP; @@ -962,18 +961,18 @@ int recv_vis_packet(struct sk_buff *skb) case VIS_TYPE_SERVER_SYNC: /* TODO: handle fragmented skbs properly */ receive_server_sync_packet(vis_packet, skb_headlen(skb)); - ret = NET_RX_SUCCESS; break; case VIS_TYPE_CLIENT_UPDATE: /* TODO: handle fragmented skbs properly */ receive_client_update_packet(vis_packet, skb_headlen(skb)); - ret = NET_RX_SUCCESS; break; default: /* ignore unknown packet */ - ret = NET_RX_DROP; break; } - return ret; + + /* We take a copy of the data in the packet, so we should + always free the skbuf. */ + return NET_RX_DROP; } -- 1.7.0.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Marek Lindner <lindner_marek@yahoo.de>
skb_share_check() returns NULL if it can't allocate more memory but
it still frees the skbuff.
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/batman-adv/hard-interface.c | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/batman-adv/hard-interface.c b/drivers/staging/batman-adv/hard-interface.c
index f8b1ba3..0f94158 100644
--- a/drivers/staging/batman-adv/hard-interface.c
+++ b/drivers/staging/batman-adv/hard-interface.c
@@ -426,10 +426,11 @@ int batman_skb_recv(struct sk_buff *skb, struct net_device *dev,
struct net_device_stats *stats;
int ret;
- skb = skb_share_check(skb, GFP_ATOMIC);
+ skb = skb_share_check(skb, GFP_ATOMIC);
- if (skb == NULL)
- goto err_free;
+ /* skb was released by skb_share_check() */
+ if (!skb)
+ goto err_out;
/* packet should hold at least type and version */
if (unlikely(skb_headlen(skb) < 2))
@@ -444,7 +445,7 @@ int batman_skb_recv(struct sk_buff *skb, struct net_device *dev,
if (!batman_if)
goto err_free;
- stats = (struct net_device_stats *) dev_get_stats(skb->dev);
+ stats = (struct net_device_stats *)dev_get_stats(skb->dev);
if (stats) {
stats->rx_packets++;
stats->rx_bytes += skb->len;
@@ -490,6 +491,7 @@ int batman_skb_recv(struct sk_buff *skb, struct net_device *dev,
default:
ret = NET_RX_DROP;
}
+
if (ret == NET_RX_DROP)
kfree_skb(skb);
@@ -500,9 +502,9 @@ int batman_skb_recv(struct sk_buff *skb, struct net_device *dev,
return NET_RX_SUCCESS;
err_free:
- kfree_skb(skb);
- return NET_RX_DROP;
-
+ kfree_skb(skb);
+err_out:
+ return NET_RX_DROP;
}
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Marek Lindner <lindner_marek@yahoo.de>
Make sure that batman-adv does not process packets before its
initialization is complete. Some sanity checks added to the receiver
function.
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/batman-adv/hard-interface.c | 7 +++++++
drivers/staging/batman-adv/proc.c | 17 ++++++-----------
2 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/drivers/staging/batman-adv/hard-interface.c b/drivers/staging/batman-adv/hard-interface.c
index 0f94158..befd488 100644
--- a/drivers/staging/batman-adv/hard-interface.c
+++ b/drivers/staging/batman-adv/hard-interface.c
@@ -432,6 +432,9 @@ int batman_skb_recv(struct sk_buff *skb, struct net_device *dev,
if (!skb)
goto err_out;
+ if (atomic_read(&module_state) != MODULE_ACTIVE)
+ goto err_free;
+
/* packet should hold at least type and version */
if (unlikely(skb_headlen(skb) < 2))
goto err_free;
@@ -445,6 +448,10 @@ int batman_skb_recv(struct sk_buff *skb, struct net_device *dev,
if (!batman_if)
goto err_free;
+ /* discard frames on not active interfaces */
+ if (batman_if->if_active != IF_ACTIVE)
+ goto err_free;
+
stats = (struct net_device_stats *)dev_get_stats(skb->dev);
if (stats) {
stats->rx_packets++;
diff --git a/drivers/staging/batman-adv/proc.c b/drivers/staging/batman-adv/proc.c
index 0eadc6b..7de60e8 100644
--- a/drivers/staging/batman-adv/proc.c
+++ b/drivers/staging/batman-adv/proc.c
@@ -63,7 +63,7 @@ static ssize_t proc_interfaces_write(struct file *instance,
size_t count, loff_t *data)
{
char *if_string, *colon_ptr = NULL, *cr_ptr = NULL;
- int not_copied = 0, if_num = 0;
+ int not_copied = 0, if_num = 0, add_success;
struct batman_if *batman_if = NULL;
if_string = kmalloc(count, GFP_KERNEL);
@@ -109,22 ...From: Stewart Robertson <stewart_r@aliencamel.com> This is a patch to the ni_labpc.c file that fixes the brace warnings and comments over 80 characters found by the checkpatch.pl tool. Some code still goes over 80 characters because I didn't know what to do with it. Signed-off-by: Stewart Robertson <stewart_r@aliencamel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/comedi/drivers/ni_labpc.c | 231 ++++++++++++++++++----------- 1 files changed, 145 insertions(+), 86 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_labpc.c b/drivers/staging/comedi/drivers/ni_labpc.c index 566b791..bc5662e 100644 --- a/drivers/staging/comedi/drivers/ni_labpc.c +++ b/drivers/staging/comedi/drivers/ni_labpc.c @@ -90,8 +90,10 @@ NI manuals: #define DRV_NAME "ni_labpc" -#define LABPC_SIZE 32 /* size of io region used by board */ -#define LABPC_TIMER_BASE 500 /* 2 MHz master clock */ +/* size of io region used by board */ +#define LABPC_SIZE 32 +/* 2 MHz master clock */ +#define LABPC_TIMER_BASE 500 /* Registers for the lab-pc+ */ @@ -99,69 +101,110 @@ NI manuals: #define COMMAND1_REG 0x0 #define ADC_GAIN_MASK (0x7 << 4) #define ADC_CHAN_BITS(x) ((x) & 0x7) -#define ADC_SCAN_EN_BIT 0x80 /* enables multi channel scans */ +/* enables multi channel scans */ +#define ADC_SCAN_EN_BIT 0x80 #define COMMAND2_REG 0x1 -#define PRETRIG_BIT 0x1 /* enable pretriggering (used in conjunction with SWTRIG) */ -#define HWTRIG_BIT 0x2 /* enable paced conversions on external trigger */ -#define SWTRIG_BIT 0x4 /* enable paced conversions */ -#define CASCADE_BIT 0x8 /* use two cascaded counters for pacing */ +/* enable pretriggering (used in conjunction with SWTRIG) */ +#define PRETRIG_BIT 0x1 +/* enable paced conversions on external trigger */ +#define HWTRIG_BIT 0x2 +/* enable paced conversions */ +#define SWTRIG_BIT 0x4 +/* use two cascaded counters for pacing */ +#define ...
From: Benjamin Adolphi <b.adolphi@googlemail.com>
This fixes all checkpatch issues in the aio_iiro_16 comedi driver.
Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/aio_iiro_16.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/comedi/drivers/aio_iiro_16.c b/drivers/staging/comedi/drivers/aio_iiro_16.c
index 3857fd5..4baef9f 100644
--- a/drivers/staging/comedi/drivers/aio_iiro_16.c
+++ b/drivers/staging/comedi/drivers/aio_iiro_16.c
@@ -98,7 +98,7 @@ static int aio_iiro_16_attach(struct comedi_device *dev,
int iobase;
struct comedi_subdevice *s;
- printk("comedi%d: aio_iiro_16: ", dev->minor);
+ printk(KERN_INFO "comedi%d: aio_iiro_16: ", dev->minor);
dev->board_name = thisboard->name;
@@ -140,7 +140,7 @@ static int aio_iiro_16_attach(struct comedi_device *dev,
static int aio_iiro_16_detach(struct comedi_device *dev)
{
- printk("comedi%d: aio_iiro_16: remove\n", dev->minor);
+ printk(KERN_INFO "comedi%d: aio_iiro_16: remove\n", dev->minor);
if (dev->iobase)
release_region(dev->iobase, AIO_IIRO_16_SIZE);
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Benjamin Adolphi <b.adolphi@googlemail.com>
This fixes all checkpatch issues in the amplc_pc236 comedi driver.
Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/amplc_pc236.c | 46 ++++++++++++--------------
1 files changed, 21 insertions(+), 25 deletions(-)
diff --git a/drivers/staging/comedi/drivers/amplc_pc236.c b/drivers/staging/comedi/drivers/amplc_pc236.c
index 1032a81..a307d68 100644
--- a/drivers/staging/comedi/drivers/amplc_pc236.c
+++ b/drivers/staging/comedi/drivers/amplc_pc236.c
@@ -78,18 +78,18 @@ unused.
*/
/* Disable interrupt, also clear any interrupt there */
#define PCI236_INTR_DISABLE (PLX9052_INTCSR_LI1ENAB_DISABLED \
- | PLX9052_INTCSR_LI1POL_HIGH \
- | PLX9052_INTCSR_LI2POL_HIGH \
- | PLX9052_INTCSR_PCIENAB_DISABLED \
- | PLX9052_INTCSR_LI1SEL_EDGE \
- | PLX9052_INTCSR_LI1CLRINT_ASSERTED)
+ | PLX9052_INTCSR_LI1POL_HIGH \
+ | PLX9052_INTCSR_LI2POL_HIGH \
+ | PLX9052_INTCSR_PCIENAB_DISABLED \
+ | PLX9052_INTCSR_LI1SEL_EDGE \
+ | PLX9052_INTCSR_LI1CLRINT_ASSERTED)
/* Enable interrupt, also clear any interrupt there. */
#define PCI236_INTR_ENABLE (PLX9052_INTCSR_LI1ENAB_ENABLED \
- | PLX9052_INTCSR_LI1POL_HIGH \
- | PLX9052_INTCSR_LI2POL_HIGH \
- | PLX9052_INTCSR_PCIENAB_ENABLED \
- | PLX9052_INTCSR_LI1SEL_EDGE \
- | PLX9052_INTCSR_LI1CLRINT_ASSERTED)
+ | PLX9052_INTCSR_LI1POL_HIGH \
+ | PLX9052_INTCSR_LI2POL_HIGH \
+ | PLX9052_INTCSR_PCIENAB_ENABLED \
+ | PLX9052_INTCSR_LI1SEL_EDGE \
+ | PLX9052_INTCSR_LI1CLRINT_ASSERTED)
/*
* Board descriptions for Amplicon PC36AT and PCI236.
@@ -150,12 +150,13 @@ MODULE_DEVICE_TABLE(pci, pc236_pci_table);
/* this structure is for data unique to this hardware driver. If
several hardware drivers keep similar information in this structure,
- feel free to suggest moving the variable to the struct comedi_device struct. ...From: Benjamin Adolphi <b.adolphi@googlemail.com>
This fixes all checkpatch issues in the amplc_dio200 comedi driver.
Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/amplc_dio200.c | 122 ++++++++++--------------
1 files changed, 51 insertions(+), 71 deletions(-)
diff --git a/drivers/staging/comedi/drivers/amplc_dio200.c b/drivers/staging/comedi/drivers/amplc_dio200.c
index 69ab281..204f30e 100644
--- a/drivers/staging/comedi/drivers/amplc_dio200.c
+++ b/drivers/staging/comedi/drivers/amplc_dio200.c
@@ -48,8 +48,8 @@ Passing a zero for an option is the same as leaving it unspecified.
SUBDEVICES
- PC218E PC212E PC215E/PCI215
- ------------- ------------- -------------
+ PC218E PC212E PC215E/PCI215
+ ------------- ------------- -------------
Subdevices 7 6 5
0 CTR-X1 PPI-X PPI-X
1 CTR-X2 CTR-Y1 PPI-Y
@@ -59,8 +59,8 @@ SUBDEVICES
5 CTR-Z2 INTERRUPT
6 INTERRUPT
- PC214E PC272E/PCI272
- ------------- -------------
+ PC214E PC272E/PCI272
+ ------------- -------------
Subdevices 4 4
0 PPI-X PPI-X
1 PPI-Y PPI-Y
@@ -96,8 +96,8 @@ instructions are supported:
0 to 7 as follows:
0. CLK n, the counter channel's dedicated CLK input from the SK1
- connector. (N.B. for other values, the counter channel's CLKn
- pin on the SK1 connector is an output!)
+ connector. (N.B. for other values, the counter channel's CLKn
+ pin on the SK1 connector is an output!)
1. Internal 10 MHz clock.
2. Internal 1 MHz clock.
3. Internal 100 kHz clock.
@@ -105,8 +105,8 @@ instructions ...From: Frank Mori Hess <frank.hess@nist.gov> Increased timeout for digital output dma loading, due to report of it being too short for some hardware. Signed-off-by: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/comedi/drivers/ni_mio_common.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c b/drivers/staging/comedi/drivers/ni_mio_common.c index d6d49c3..bd16f91 100644 --- a/drivers/staging/comedi/drivers/ni_mio_common.c +++ b/drivers/staging/comedi/drivers/ni_mio_common.c @@ -3795,7 +3795,7 @@ static int ni_cdo_inttrig(struct comedi_device *dev, struct comedi_subdevice *s, #endif int retval = 0; unsigned i; - const unsigned timeout = 100; + const unsigned timeout = 1000; s->async->inttrig = NULL; -- 1.7.0.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Sylvain Trias <bozo@nobodix.org> Fixed a coding style issue. Signed-off-by: Sylvain Trias <bozo@nobodix.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/line6/variax.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/staging/line6/variax.c b/drivers/staging/line6/variax.c index 48d834b..58fef82 100644 --- a/drivers/staging/line6/variax.c +++ b/drivers/staging/line6/variax.c @@ -254,7 +254,7 @@ static ssize_t variax_set_active(struct device *dev, if (ret) return ret; - variax->buffer_activate[VARIAX_OFFSET_ACTIVATE] = value ? 1: 0; + variax->buffer_activate[VARIAX_OFFSET_ACTIVATE] = value ? 1 : 0; line6_send_raw_message_async(&variax->line6, variax->buffer_activate, sizeof(variax_activate)); return count; -- 1.7.0.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Randy Dunlap <randy.dunlap@oracle.com> Fix prism2fw.c printk format warning: drivers/staging/wlan-ng/prism2fw.c:209: warning: format '%d' expects type 'int', but argument 3 has type 'size_t' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/wlan-ng/prism2fw.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/staging/wlan-ng/prism2fw.c b/drivers/staging/wlan-ng/prism2fw.c index baa20a7..b576012 100644 --- a/drivers/staging/wlan-ng/prism2fw.c +++ b/drivers/staging/wlan-ng/prism2fw.c @@ -205,7 +205,7 @@ int prism2_fwtry(struct usb_device *udev, wlandevice_t *wlandev) return 1; } - printk(KERN_INFO "prism2_usb: %s will be processed, size %d\n", + printk(KERN_INFO "prism2_usb: %s will be processed, size %zu\n", PRISM2_USB_FWFILE, fw_entry->size); prism2_fwapply((const struct ihex_binrec *)fw_entry->data, wlandev); -- 1.7.0.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Randy Dunlap <randy.dunlap@oracle.com>
sparse warns that:
drivers/staging/pohmelfs/inode.c:1797: warning: initialization from incompatible pointer type
so fix pohmelfs_write_inode() to have the expected parameters.
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/pohmelfs/inode.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/staging/pohmelfs/inode.c b/drivers/staging/pohmelfs/inode.c
index eec3798..bf38280 100644
--- a/drivers/staging/pohmelfs/inode.c
+++ b/drivers/staging/pohmelfs/inode.c
@@ -396,7 +396,8 @@ int pohmelfs_remove_child(struct pohmelfs_inode *pi, struct pohmelfs_name *n)
/*
* Writeback for given inode.
*/
-static int pohmelfs_write_inode(struct inode *inode, int sync)
+static int pohmelfs_write_inode(struct inode *inode,
+ struct writeback_control *wbc)
{
struct pohmelfs_inode *pi = POHMELFS_I(inode);
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Randy Dunlap <randy.dunlap@oracle.com> The rtl8192* drivers in staging use semaphores, so they need to #include <linux/semaphore.h>. (similar to staging-rtl8187se-needs-semaphore.h.patch) drivers/staging/rtl8192e/ieee80211/ieee80211.h:2038: error: field 'ips_sem' has incomplete type drivers/staging/rtl8192e/ieee80211/ieee80211.h:2249: error: field 'wx_sem' has incomplete type drivers/staging/rtl8192e/ieee80211/ieee80211.h:2250: error: field 'scan_sem' has incomplete type drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c:442: error: implicit declaration of function 'down' drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c:500: error: implicit declaration of function 'up' drivers/staging/rtl8192e/ieee80 211/ieee80211_softmac.c:3165: error: implicit declaration of function 'sema_init' drivers/staging/rtl8192su/ieee80211/ieee80211.h:1330: error: field 'wx_sem' has incomplete type drivers/staging/rtl8192su/ieee80211/ieee80211.h:1331: error: field 'scan_sem' has incomplete type drivers/staging/rtl8192u/ieee80211/ieee80211.h:2010: error: field 'wx_sem' has incomplete type drivers/staging/rtl8192u/ieee80211/ieee80211.h:2011: error: field 'scan_sem' has incomplete type Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/rtl8192e/ieee80211/ieee80211.h | 1 + drivers/staging/rtl8192su/ieee80211/ieee80211.h | 1 + drivers/staging/rtl8192u/ieee80211/ieee80211.h | 1 + 3 files changed, 3 insertions(+), 0 deletions(-) diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211.h b/drivers/staging/rtl8192e/ieee80211/ieee80211.h index 5859f66..1f613a2 100644 --- a/drivers/staging/rtl8192e/ieee80211/ieee80211.h +++ b/drivers/staging/rtl8192e/ieee80211/ieee80211.h @@ -35,6 +35,7 @@ #endif #include <linux/timer.h> #include <linux/sched.h> +#include <linux/semaphore.h> #include <linux/delay.h> #include <linux/wireless.h> diff --git a/drivers/staging/rtl8192su/ieee80211/ieee80211.h ...
From: Jim Dog <jimdog@northern-indymedia.org>
This is a patch to the prism2usb.c that fixes one line which was over
the 80 character limit by wrapping it to a new line and removes a
commented out configuration for a ZyDAS ZD1201 device since support for
this device with this driver is now deprecated.
Signed-off-by: Jim Dog <jimdog@northern-indymedia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/wlan-ng/prism2usb.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/wlan-ng/prism2usb.c b/drivers/staging/wlan-ng/prism2usb.c
index 9dde68b..501d27f 100644
--- a/drivers/staging/wlan-ng/prism2usb.c
+++ b/drivers/staging/wlan-ng/prism2usb.c
@@ -24,8 +24,9 @@ static struct usb_device_id usb_prism_tbl[] = {
(0x066b, 0x2213, "Linksys WUSB12v1.1 11Mbps WLAN USB Adapter")},
{PRISM_USB_DEVICE
(0x067c, 0x1022, "Siemens SpeedStream 1022 11Mbps WLAN USB Adapter")},
- {PRISM_USB_DEVICE(0x049f, 0x0033,
- "Compaq/Intel W100 PRO/Wireless 11Mbps multiport WLAN Adapter")},
+ {PRISM_USB_DEVICE
+ (0x049f, 0x0033,
+ "Compaq/Intel W100 PRO/Wireless 11Mbps multiport WLAN Adapter")},
{PRISM_USB_DEVICE
(0x0411, 0x0016, "Melco WLI-USB-S11 11Mbps WLAN Adapter")},
{PRISM_USB_DEVICE
@@ -55,7 +56,6 @@ static struct usb_device_id usb_prism_tbl[] = {
(0x04f1, 0x3009, "JVC MP-XP7250 Builtin USB WLAN Adapter")},
{PRISM_USB_DEVICE(0x0846, 0x4110, "NetGear MA111")},
{PRISM_USB_DEVICE(0x03f3, 0x0020, "Adaptec AWN-8020 USB WLAN Adapter")},
-/* {PRISM_USB_DEVICE(0x0ace, 0x1201, "ZyDAS ZD1201 Wireless USB Adapter")}, */
{PRISM_USB_DEVICE(0x2821, 0x3300, "ASUS-WL140 Wireless USB Adapter")},
{PRISM_USB_DEVICE(0x2001, 0x3700, "DWL-122 Wireless USB Adapter")},
{PRISM_USB_DEVICE
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Ameya Palande <2ameya@gmail.com>
This patch does following improvements:
1. Follow kernel style for comments
2. Reorganize code for readability improvement
3. Use PCI helper macros
4. Use __devinit, __devexit, __devexit_p at necessary places
5. Mark functions and data as static when it is not exported
Signed-off-by: Ameya Palande <2ameya@gmail.com>
Cc: Naren Sankar <nsankar@broadcom.com>
Cc: Jarod Wilson <jarod@wilsonet.com>
Cc: Scott Davilla <davilla@4pi.com>
Cc: Manu Abraham <abraham.manu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/crystalhd/crystalhd_cmds.c | 4 +-
drivers/staging/crystalhd/crystalhd_lnx.c | 77 +++++++++++----------------
drivers/staging/crystalhd/crystalhd_misc.c | 3 +-
3 files changed, 35 insertions(+), 49 deletions(-)
diff --git a/drivers/staging/crystalhd/crystalhd_cmds.c b/drivers/staging/crystalhd/crystalhd_cmds.c
index 39c641d..26145a8 100644
--- a/drivers/staging/crystalhd/crystalhd_cmds.c
+++ b/drivers/staging/crystalhd/crystalhd_cmds.c
@@ -948,7 +948,7 @@ BC_STATUS crystalhd_user_close(struct crystalhd_cmd *ctx, struct crystalhd_user
*
* Called at the time of driver load.
*/
-BC_STATUS crystalhd_setup_cmd_context(struct crystalhd_cmd *ctx,
+BC_STATUS __devinit crystalhd_setup_cmd_context(struct crystalhd_cmd *ctx,
struct crystalhd_adp *adp)
{
int i = 0;
@@ -983,7 +983,7 @@ BC_STATUS crystalhd_setup_cmd_context(struct crystalhd_cmd *ctx,
*
* Called at the time of driver un-load.
*/
-BC_STATUS crystalhd_delete_cmd_context(struct crystalhd_cmd *ctx)
+BC_STATUS __devexit crystalhd_delete_cmd_context(struct crystalhd_cmd *ctx)
{
BCMLOG(BCMLOG_DBG, "Deleting Command context..\n");
diff --git a/drivers/staging/crystalhd/crystalhd_lnx.c b/drivers/staging/crystalhd/crystalhd_lnx.c
index 1f36b4d..3eac70a 100644
--- a/drivers/staging/crystalhd/crystalhd_lnx.c
+++ b/drivers/staging/crystalhd/crystalhd_lnx.c
@@ -1,28 +1,19 @@
...From: Sven-Thorsten Dietrich <sdietrich@novell.com> This fixes some RT-triggered compile errors and typos. Signed-off-by: Sven-Thorsten Dietrich <sdietrich@novell.com> Acked-by: Marek Lindner <lindner_marek@yahoo.de> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/batman-adv/device.c | 2 +- drivers/staging/iio/ring_generic.h | 3 +-- drivers/staging/iio/ring_sw.c | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/staging/batman-adv/device.c b/drivers/staging/batman-adv/device.c index 451898c..e7f4421 100644 --- a/drivers/staging/batman-adv/device.c +++ b/drivers/staging/batman-adv/device.c @@ -118,7 +118,7 @@ int bat_device_open(struct inode *inode, struct file *file) INIT_LIST_HEAD(&device_client->queue_list); device_client->queue_len = 0; device_client->index = i; - device_client->lock = __SPIN_LOCK_UNLOCKED(device_client->lock); + spin_lock_init(&device_client->lock); init_waitqueue_head(&device_client->queue_wait); file->private_data = device_client; diff --git a/drivers/staging/iio/ring_generic.h b/drivers/staging/iio/ring_generic.h index 93b91b2..09044ad 100644 --- a/drivers/staging/iio/ring_generic.h +++ b/drivers/staging/iio/ring_generic.h @@ -146,8 +146,7 @@ static inline void __iio_init_ring_buffer(struct iio_ring_buffer *ring, ring->length = length; ring->loopcount = 0; ring->shared_ev_pointer.ev_p = 0; - ring->shared_ev_pointer.lock = - __SPIN_LOCK_UNLOCKED(ring->shared_ev_pointer->loc); + spin_lock_init(&ring->shared_ev_pointer.lock); } /** diff --git a/drivers/staging/iio/ring_sw.c b/drivers/staging/iio/ring_sw.c index b746cf6..6f7f4d5 100644 --- a/drivers/staging/iio/ring_sw.c +++ b/drivers/staging/iio/ring_sw.c @@ -20,7 +20,7 @@ static inline int __iio_init_sw_ring_buffer(struct iio_sw_ring_buffer *ring, return -EINVAL; __iio_init_ring_buffer(&ring->buf, bytes_per_datum, length); - ring->use_lock = ...
From: Florian Schilhabel <florian.c.schilhabel@googlemail.com>
according to 'linux device drivers',
ENOENT, ECONNRESET, ESHUTDOWN are not real transmission errors.
also, a little cosmetics.
Signed-off-by: Florian Schilhabel <florian.c.schilhabel@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/rtl8192su/r8192U_core.c | 36 ++++++++++++++++++-------------
1 files changed, 21 insertions(+), 15 deletions(-)
diff --git a/drivers/staging/rtl8192su/r8192U_core.c b/drivers/staging/rtl8192su/r8192U_core.c
index 23d1d35..8393bc5 100644
--- a/drivers/staging/rtl8192su/r8192U_core.c
+++ b/drivers/staging/rtl8192su/r8192U_core.c
@@ -2340,25 +2340,24 @@ short rtl8192SU_tx(struct net_device *dev, struct sk_buff* skb)
skb->len, rtl8192_tx_isr, skb);
status = usb_submit_urb(tx_urb, GFP_ATOMIC);
- if (!status){
-//we need to send 0 byte packet whenever 512N bytes/64N(HIGN SPEED/NORMAL SPEED) bytes packet has been transmitted. Otherwise, it will be halt to wait for another packet. WB. 2008.08.27
+ if (!status) {
+ /*
+ * we need to send 0 byte packet whenever 512N bytes/64N(HIGN SPEED/NORMAL SPEED) bytes packet has been transmitted.
+ * Otherwise, it will be halt to wait for another packet. WB. 2008.08.27
+ */
bool bSend0Byte = false;
u8 zero = 0;
- if(udev->speed == USB_SPEED_HIGH)
- {
+ if(udev->speed == USB_SPEED_HIGH) {
if (skb->len > 0 && skb->len % 512 == 0)
bSend0Byte = true;
}
- else
- {
+ else {
if (skb->len > 0 && skb->len % 64 == 0)
bSend0Byte = true;
}
- if (bSend0Byte)
- {
-#if 1
+ if (bSend0Byte) {
tx_urb_zero = usb_alloc_urb(0,GFP_ATOMIC);
- if(!tx_urb_zero){
+ if(!tx_urb_zero) {
RT_TRACE(COMP_ERR, "can't alloc urb for zero byte\n");
return -ENOMEM;
}
@@ -2366,16 +2365,23 @@ short rtl8192SU_tx(struct net_device *dev, struct sk_buff* skb)
usb_sndbulkpipe(udev,idx_pipe), &zero,
0, tx_zero_isr, dev);
status = ...From: Florian Schilhabel <florian.c.schilhabel@googlemail.com>
currently, interface statistics look like this:
wlan0 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
inet addr:xxx.xxx.xxx.xxx Bcast:xxx.xxx.xxx.xxx Mask:xxx.xxx.xxx.xxx
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:435 errors:0 dropped:1 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:456758 (446.0 Kb) TX bytes:0 (0.0 b)
after re-enabling the tx-stats it looks like this:
wlan0 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
inet addr:xxx.xxx.xxx.xxx Bcast:xxx.xxx.xxx.xxx Mask:xxx.xxx.xxx.xxx
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1269 errors:0 dropped:1 overruns:0 frame:0
TX packets:1049 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1667442 (1.5 Mb) TX bytes:82606 (80.6 Kb)
Signed-off-by: Florian Schilhabel <florian.c.schilhabel@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
.../rtl8192su/ieee80211/ieee80211_softmac.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8192su/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192su/ieee80211/ieee80211_softmac.c
index e46f3bc..1dfc945 100644
--- a/drivers/staging/rtl8192su/ieee80211/ieee80211_softmac.c
+++ b/drivers/staging/rtl8192su/ieee80211/ieee80211_softmac.c
@@ -2145,8 +2145,8 @@ void ieee80211_softmac_xmit(struct ieee80211_txb *txb, struct ieee80211_device *
ieee80211_sta_wakeup(ieee,0);
/* update the tx status */
-// ieee->stats.tx_bytes += txb->payload_size;
-// ieee->stats.tx_packets++;
+ ieee->stats.tx_bytes += txb->payload_size;
+ ieee->stats.tx_packets++;
tcb_desc = (cb_desc *)(txb->fragments[0]->cb + MAX_DEV_ADDR_SIZE);
if(tcb_desc->bMulticast) {
ieee->stats.multicast++;
-- ...From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/serial2002.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/staging/comedi/drivers/serial2002.c b/drivers/staging/comedi/drivers/serial2002.c
index db37dcd..dd2b903 100644
--- a/drivers/staging/comedi/drivers/serial2002.c
+++ b/drivers/staging/comedi/drivers/serial2002.c
@@ -397,7 +397,7 @@ static void serial_2002_open(struct comedi_device *dev)
char port[20];
sprintf(port, "/dev/ttyS%d", devpriv->port);
- devpriv->tty = filp_open(port, 0, O_RDWR);
+ devpriv->tty = filp_open(port, O_RDWR, 0);
if (IS_ERR(devpriv->tty)) {
printk("serial_2002: file open error = %ld\n",
PTR_ERR(devpriv->tty));
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Florian Schilhabel <florian.c.schilhabel@googlemail.com>
Signed-off-by: Florian Schilhabel <florian.c.schilhabel@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/rtl8192su/TODO | 1 -
.../staging/rtl8192su/ieee80211/ieee80211_crypt.c | 19 ++++++++++---------
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/staging/rtl8192su/TODO b/drivers/staging/rtl8192su/TODO
index f11eec7..3c8da15 100644
--- a/drivers/staging/rtl8192su/TODO
+++ b/drivers/staging/rtl8192su/TODO
@@ -4,7 +4,6 @@ TODO:
- cleanup ieee80211.h
- move rtl8192su's specific code out from ieee80211.h
- abstract rtl819su's specific code
- - use list_for_each_safe() in ieee80211_crypto_deinit
- switch to use shared "librtl" instead of private ieee80211 stack
- switch to use LIB80211
- switch to use MAC80211
diff --git a/drivers/staging/rtl8192su/ieee80211/ieee80211_crypt.c b/drivers/staging/rtl8192su/ieee80211/ieee80211_crypt.c
index 521e7b9..c4640e6 100644
--- a/drivers/staging/rtl8192su/ieee80211/ieee80211_crypt.c
+++ b/drivers/staging/rtl8192su/ieee80211/ieee80211_crypt.c
@@ -226,19 +226,20 @@ out:
void __exit ieee80211_crypto_deinit(void)
{
struct list_head *ptr, *n;
+ struct ieee80211_crypto_alg *alg = NULL;
if (hcrypt == NULL)
return;
- for (ptr = hcrypt->algs.next, n = ptr->next; ptr != &hcrypt->algs;
- ptr = n, n = ptr->next) {
- struct ieee80211_crypto_alg *alg =
- (struct ieee80211_crypto_alg *) ptr;
- list_del(ptr);
- printk(KERN_DEBUG "ieee80211_crypt: unregistered algorithm "
- "'%s' (deinit)\n", alg->ops->name);
- kfree(alg);
+ list_for_each_safe(ptr, n, &hcrypt->algs) {
+ alg = list_entry(ptr, struct ieee80211_crypto_alg, list);
+ if (alg) {
+ list_del(ptr);
+ printk(KERN_DEBUG
+ "ieee80211_crypt: unregistered algorithm '%s' (deinit)\n",
+ alg->ops->name);
+ kfree(alg);
+ }
}
-
kfree(hcrypt);
}
-- ...From: d binderman <dcb314@hotmail.com>
Signed-off-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/amplc_pci224.c | 16 ++++------------
1 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/drivers/staging/comedi/drivers/amplc_pci224.c b/drivers/staging/comedi/drivers/amplc_pci224.c
index d983687..b41e5e5 100644
--- a/drivers/staging/comedi/drivers/amplc_pci224.c
+++ b/drivers/staging/comedi/drivers/amplc_pci224.c
@@ -1536,20 +1536,12 @@ static int pci224_detach(struct comedi_device *dev)
s = dev->subdevices + 0;
/* AO subdevice */
- if (s->range_table_list) {
- kfree(s->range_table_list);
- }
+ kfree(s->range_table_list);
}
if (devpriv) {
- if (devpriv->ao_readback) {
- kfree(devpriv->ao_readback);
- }
- if (devpriv->ao_scan_vals) {
- kfree(devpriv->ao_scan_vals);
- }
- if (devpriv->ao_scan_order) {
- kfree(devpriv->ao_scan_order);
- }
+ kfree(devpriv->ao_readback);
+ kfree(devpriv->ao_scan_vals);
+ kfree(devpriv->ao_scan_order);
if (devpriv->pci_dev) {
if (dev->iobase) {
comedi_pci_disable(devpriv->pci_dev);
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Alessio Igor Bogani <abogani@texware.it> BKL isn't anymore present into these files thus it is no necessary still include smp_lock.h. Signed-off-by: Alessio Igor Bogani <abogani@texware.it> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/comedi/comedi_compat32.c | 1 - drivers/staging/comedi/drivers/usbdux.c | 1 - drivers/staging/comedi/drivers/usbduxfast.c | 1 - drivers/staging/panel/panel.c | 1 - 4 files changed, 0 insertions(+), 4 deletions(-) diff --git a/drivers/staging/comedi/comedi_compat32.c b/drivers/staging/comedi/comedi_compat32.c index a9fdcda..581aa5f 100644 --- a/drivers/staging/comedi/comedi_compat32.c +++ b/drivers/staging/comedi/comedi_compat32.c @@ -26,7 +26,6 @@ #define __NO_VERSION__ #include "comedi.h" -#include <linux/smp_lock.h> #include <linux/uaccess.h> #include "comedi_compat32.h" diff --git a/drivers/staging/comedi/drivers/usbdux.c b/drivers/staging/comedi/drivers/usbdux.c index bcf46da..8942ae4 100644 --- a/drivers/staging/comedi/drivers/usbdux.c +++ b/drivers/staging/comedi/drivers/usbdux.c @@ -95,7 +95,6 @@ sampling rate. If you sample two channels you get 4kHz and so on. #include <linux/slab.h> #include <linux/input.h> #include <linux/usb.h> -#include <linux/smp_lock.h> #include <linux/fcntl.h> #include <linux/compiler.h> #include <linux/firmware.h> diff --git a/drivers/staging/comedi/drivers/usbduxfast.c b/drivers/staging/comedi/drivers/usbduxfast.c index b96cf3b..e89b818 100644 --- a/drivers/staging/comedi/drivers/usbduxfast.c +++ b/drivers/staging/comedi/drivers/usbduxfast.c @@ -44,7 +44,6 @@ #include <linux/slab.h> #include <linux/input.h> #include <linux/usb.h> -#include <linux/smp_lock.h> #include <linux/fcntl.h> #include <linux/compiler.h> #include "comedi_fc.h" diff --git a/drivers/staging/panel/panel.c b/drivers/staging/panel/panel.c index 95c93e8..377884f 100644 --- a/drivers/staging/panel/panel.c +++ ...
From: Andrea Gelmini <andrea.gelmini@gelma.net>
WARNING: braces {} are not necessary for any arm of this statement
+ if (i_Counter == 0) {
[...]
+ } else {
[...]
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
.../comedi/drivers/addi-data/addi_amcc_S5920.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/comedi/drivers/addi-data/addi_amcc_S5920.c b/drivers/staging/comedi/drivers/addi-data/addi_amcc_S5920.c
index bd7e461..97c10aa 100644
--- a/drivers/staging/comedi/drivers/addi-data/addi_amcc_S5920.c
+++ b/drivers/staging/comedi/drivers/addi-data/addi_amcc_S5920.c
@@ -173,11 +173,10 @@ int i_AddiHeaderRW_ReadEeprom(int i_NbOfWordsToRead,
} while (dw_eeprom_busy == EEPROM_BUSY);
/* Select the upper address part */
- if (i_Counter == 0) {
+ if (i_Counter == 0)
b_ReadLowByte = pb_ReadByte[0];
- } else {
+ else
b_ReadHighByte = pb_ReadByte[0];
- }
/* Sleep */
msleep(1);
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Andrea Gelmini <andrea.gelmini@gelma.net>
ERROR: code indent should use tabs where possible
+ const struct comedi_lrange *pr_AiRangelist;^I/* rangelist for A/D */$
ERROR: code indent should use tabs where possible
+ const struct comedi_lrange *pr_AoRangelist;^I/* rangelist for D/A */$
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
.../staging/comedi/drivers/addi-data/addi_common.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/comedi/drivers/addi-data/addi_common.h b/drivers/staging/comedi/drivers/addi-data/addi_common.h
index 3ab27cf..caeb6fd 100644
--- a/drivers/staging/comedi/drivers/addi-data/addi_common.h
+++ b/drivers/staging/comedi/drivers/addi-data/addi_common.h
@@ -77,8 +77,8 @@ struct addi_board {
int i_NbrAoChannel; /* num of D/A chans */
int i_AiMaxdata; /* resolution of A/D */
int i_AoMaxdata; /* resolution of D/A */
- const struct comedi_lrange *pr_AiRangelist; /* rangelist for A/D */
- const struct comedi_lrange *pr_AoRangelist; /* rangelist for D/A */
+ const struct comedi_lrange *pr_AiRangelist; /* rangelist for A/D */
+ const struct comedi_lrange *pr_AoRangelist; /* rangelist for D/A */
int i_NbrDiChannel; /* Number of DI channels */
int i_NbrDoChannel; /* Number of DO channels */
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Andrea Gelmini <andrea.gelmini@gelma.net>
ERROR: do not initialise externals to 0 or NULL
+unsigned int ui_InterruptStatus = 0;
WARNING: braces {} are not necessary for single statement blocks
+ else {
+ outl(0x6, devpriv->iobase + APCI1032_DIGITAL_IP_IRQ);
+ } /* else if(data[1] == ADDIDATA_OR) */
WARNING: braces {} are not necessary for single statement blocks
+ if (data[1] == 1) {
+ *data = ui_InterruptStatus;
+ } /* if(data[1]==1) */
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
.../comedi/drivers/addi-data/hwdrv_apci1032.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1032.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1032.c
index 27c68aa..fe06789 100644
--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1032.c
+++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1032.c
@@ -54,7 +54,7 @@ You should also find the complete GPL in the COPYING file accompanying this sour
#include "hwdrv_apci1032.h"
#include <linux/delay.h>
/* Global variables */
-unsigned int ui_InterruptStatus = 0;
+unsigned int ui_InterruptStatus;
/*
+----------------------------------------------------------------------------+
@@ -108,9 +108,9 @@ int i_APCI1032_ConfigDigitalInput(struct comedi_device *dev, struct comedi_subde
ui_TmpValue =
inl(devpriv->iobase + APCI1032_DIGITAL_IP_IRQ);
} /* if (data[1] == ADDIDATA_OR) */
- else {
+ else
outl(0x6, devpriv->iobase + APCI1032_DIGITAL_IP_IRQ);
- } /* else if(data[1] == ADDIDATA_OR) */
+ /* else if(data[1] == ADDIDATA_OR) */
} /* if( data[0] == ADDIDATA_ENABLE) */
else {
ul_Command1 = ul_Command1 & 0xFFFF0000;
@@ -221,9 +221,9 @@ int i_APCI1032_ReadMoreDigitalInput(struct comedi_device *dev, struct comedi_sub
} /* switch(ui_NoOfChannels) */
} /* if(data[1]==0) */
else {
- if (data[1] == 1) {
+ if ...From: Andrea Gelmini <andrea.gelmini@gelma.net>
ERROR: "foo * bar" should be "foo *bar"
+ uint8_t * data);
WARNING: braces {} are not necessary for single statement blocks
+ if (devpriv->s5933_config) {
+ comedi_pci_disable(devpriv->pci_dev);
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (cmd->stop_src == TRIG_COUNT) {
+ devpriv->count = cmd->chanlist_len * cmd->stop_arg;
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (cmd->stop_src == TRIG_COUNT) {
+ devpriv->ao_count = cmd->chanlist_len * cmd->stop_arg;
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (cmd->stop_src == TRIG_COUNT) {
+ devpriv->ao_count -= num_points;
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (dev->attached == 0) {
+ return IRQ_NONE;
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if ((status & (INT | EOAI | LADFUL | DAHFI | DAEMI)) == 0) {
+ comedi_error(dev, "spurious interrupt");
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (status & (DAHFI | DAEMI)) {
+ handle_ao_interrupt(dev, status);
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (async->cmd.stop_src == TRIG_COUNT) {
+ devpriv->ao_count -= num_points;
+ }
ERROR: "foo * bar" should be "foo *bar"
+ uint8_t * data)
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/cb_pcidas.c | 28 ++++++++++------------------
1 files changed, 10 insertions(+), 18 deletions(-)
diff --git a/drivers/staging/comedi/drivers/cb_pcidas.c b/drivers/staging/comedi/drivers/cb_pcidas.c
index f3e66c4..434591d 100644
--- a/drivers/staging/comedi/drivers/cb_pcidas.c
+++ b/drivers/staging/comedi/drivers/cb_pcidas.c
@@ -518,7 +518,7 @@ static int trimpot_7376_write(struct comedi_device *dev, uint8_t value);
static int ...From: Andrea Gelmini <andrea.gelmini@gelma.net>
WARNING: braces {} are not necessary for single statement blocks
+ if (devpriv->dac) {
+ comedi_pci_disable(devpriv->pci_dev);
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (inw_p(devpriv->dac + DACALIBRATION1) & SERIAL_OUT_BIT) {
+ value |= 1 << (value_width - i);
+ }
WARNING: braces {} are not necessary for single statement blocks
+ for (i = 0; i < max_num_caldacs; i++) {
+ cal2_bits |= DESELECT_CALDAC_BIT(i);
+ }
WARNING: braces {} are not necessary for single statement blocks
+ for (i = 0; i < max_num_caldacs; i++) {
+ cal2_bits |= DESELECT_CALDAC_BIT(i);
+ }
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/cb_pcidda.c | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/comedi/drivers/cb_pcidda.c b/drivers/staging/comedi/drivers/cb_pcidda.c
index 7823577..81829d6 100644
--- a/drivers/staging/comedi/drivers/cb_pcidda.c
+++ b/drivers/staging/comedi/drivers/cb_pcidda.c
@@ -410,9 +410,8 @@ static int cb_pcidda_detach(struct comedi_device *dev)
*/
if (devpriv) {
if (devpriv->pci_dev) {
- if (devpriv->dac) {
+ if (devpriv->dac)
comedi_pci_disable(devpriv->pci_dev);
- }
pci_dev_put(devpriv->pci_dev);
}
}
@@ -677,9 +676,8 @@ static unsigned int cb_pcidda_serial_in(struct comedi_device *dev)
for (i = 1; i <= value_width; i++) {
/* read bits most significant bit first */
- if (inw_p(devpriv->dac + DACALIBRATION1) & SERIAL_OUT_BIT) {
+ if (inw_p(devpriv->dac + DACALIBRATION1) & SERIAL_OUT_BIT)
value |= 1 << (value_width - i);
- }
}
return value;
@@ -716,9 +714,8 @@ static unsigned int cb_pcidda_read_eeprom(struct comedi_device *dev,
/* send serial output stream to eeprom */
cal2_bits = SELECT_EEPROM_BIT | DESELECT_REF_DAC_BIT | DUMMY_BIT;
/* deactivate caldacs (one caldac ...From: Andrea Gelmini <andrea.gelmini@gelma.net>
WARNING: braces {} are not necessary for single statement blocks
+ if (devpriv->dio_reg_base) {
+ comedi_pci_disable(devpriv->pci_dev);
+ }
WARNING: braces {} are not necessary for single statement blocks
+ for (i = 0; i < thisboard->n_8255; i++) {
+ subdev_8255_cleanup(dev, dev->subdevices + i);
+ }
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/cb_pcidio.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/comedi/drivers/cb_pcidio.c b/drivers/staging/comedi/drivers/cb_pcidio.c
index 7daad0a..38ccd10 100644
--- a/drivers/staging/comedi/drivers/cb_pcidio.c
+++ b/drivers/staging/comedi/drivers/cb_pcidio.c
@@ -283,17 +283,15 @@ static int pcidio_detach(struct comedi_device *dev)
printk("comedi%d: cb_pcidio: remove\n", dev->minor);
if (devpriv) {
if (devpriv->pci_dev) {
- if (devpriv->dio_reg_base) {
+ if (devpriv->dio_reg_base)
comedi_pci_disable(devpriv->pci_dev);
- }
pci_dev_put(devpriv->pci_dev);
}
}
if (dev->subdevices) {
int i;
- for (i = 0; i < thisboard->n_8255; i++) {
+ for (i = 0; i < thisboard->n_8255; i++)
subdev_8255_cleanup(dev, dev->subdevices + i);
- }
}
return 0;
}
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Andrea Gelmini <andrea.gelmini@gelma.net>
WARNING: braces {} are not necessary for any arm of this statement
+ if (thisboard->has_dio) {
[...]
+ } else {
[...]
WARNING: braces {} are not necessary for single statement blocks
+ if (devpriv->BADR0) {
+ comedi_pci_disable(devpriv->pci_dev);
+ }
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/cb_pcimdas.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/comedi/drivers/cb_pcimdas.c b/drivers/staging/comedi/drivers/cb_pcimdas.c
index cbbca05..2e61727 100644
--- a/drivers/staging/comedi/drivers/cb_pcimdas.c
+++ b/drivers/staging/comedi/drivers/cb_pcimdas.c
@@ -330,11 +330,10 @@ found:
s = dev->subdevices + 2;
/* digital i/o subdevice */
- if (thisboard->has_dio) {
+ if (thisboard->has_dio)
subdev_8255_init(dev, s, NULL, devpriv->BADR4);
- } else {
+ else
s->type = COMEDI_SUBD_UNUSED;
- }
printk("attached\n");
@@ -365,9 +364,8 @@ static int cb_pcimdas_detach(struct comedi_device *dev)
free_irq(dev->irq, dev);
if (devpriv) {
if (devpriv->pci_dev) {
- if (devpriv->BADR0) {
+ if (devpriv->BADR0)
comedi_pci_disable(devpriv->pci_dev);
- }
pci_dev_put(devpriv->pci_dev);
}
}
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Andrea Gelmini <andrea.gelmini@gelma.net>
WARNING: braces {} are not necessary for any arm of this statement
+ if (it->options[2]) {
[...]
+ } else {
[...]
WARNING: braces {} are not necessary for single statement blocks
+ if (devpriv->registers) {
+ comedi_pci_disable(devpriv->pci_dev);
+ }
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/cb_pcimdda.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/comedi/drivers/cb_pcimdda.c b/drivers/staging/comedi/drivers/cb_pcimdda.c
index 980fa0a..e32a317 100644
--- a/drivers/staging/comedi/drivers/cb_pcimdda.c
+++ b/drivers/staging/comedi/drivers/cb_pcimdda.c
@@ -284,11 +284,10 @@ static int attach(struct comedi_device *dev, struct comedi_devconfig *it)
s->n_chan = thisboard->ao_chans;
s->maxdata = figure_out_maxdata(thisboard->ao_bits);
/* this is hard-coded here */
- if (it->options[2]) {
+ if (it->options[2])
s->range_table = &range_bipolar10;
- } else {
+ else
s->range_table = &range_bipolar5;
- }
s->insn_write = &ao_winsn;
s->insn_read = &ao_rinsn;
@@ -337,9 +336,8 @@ static int detach(struct comedi_device *dev)
}
if (devpriv->pci_dev) {
- if (devpriv->registers) {
+ if (devpriv->registers)
comedi_pci_disable(devpriv->pci_dev);
- }
pci_dev_put(devpriv->pci_dev);
}
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Andrea Gelmini <andrea.gelmini@gelma.net>
WARNING: braces {} are not necessary for single statement blocks
+ if (dev->iobase) {
+ comedi_pci_disable(devpriv->pci_dev);
+ }
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/contec_pci_dio.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/comedi/drivers/contec_pci_dio.c b/drivers/staging/comedi/drivers/contec_pci_dio.c
index b16d652..9511814 100644
--- a/drivers/staging/comedi/drivers/contec_pci_dio.c
+++ b/drivers/staging/comedi/drivers/contec_pci_dio.c
@@ -173,9 +173,8 @@ static int contec_detach(struct comedi_device *dev)
printk("comedi%d: contec: remove\n", dev->minor);
if (devpriv && devpriv->pci_dev) {
- if (dev->iobase) {
+ if (dev->iobase)
comedi_pci_disable(devpriv->pci_dev);
- }
pci_dev_put(devpriv->pci_dev);
}
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Andrea Gelmini <andrea.gelmini@gelma.net> ERROR: code indent should use tabs where possible + NONE$ ERROR: do not initialise statics to 0 or NULL +static struct pcmcia_device *cur_dev = NULL; Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/comedi/drivers/das08_cs.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/das08_cs.c b/drivers/staging/comedi/drivers/das08_cs.c index 9b945e5..f12ef1c 100644 --- a/drivers/staging/comedi/drivers/das08_cs.c +++ b/drivers/staging/comedi/drivers/das08_cs.c @@ -34,7 +34,7 @@ This is the PCMCIA-specific support split off from the das08 driver. Options (for pcm-das08): - NONE + NONE Command support does not exist, but could be added for this board. */ @@ -52,7 +52,7 @@ Command support does not exist, but could be added for this board. #include <pcmcia/cistpl.h> #include <pcmcia/ds.h> -static struct pcmcia_device *cur_dev = NULL; +static struct pcmcia_device *cur_dev; #define thisboard ((const struct das08_board_struct *)dev->board_ptr) -- 1.7.0.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Florian Schilhabel <florian.c.schilhabel@googlemail.com> Because the Firmware is loaded from RTL8192SU/rtl8192sfw.bin, it it save, to remove it from r8192SU_HWImg.c Signed-off-by: Florian Schilhabel <florian.c.schilhabel@googlemail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/rtl8192su/r8192SU_HWImg.c | 4276 --------------------------- drivers/staging/rtl8192su/r8192SU_HWImg.h | 2 - drivers/staging/rtl8192su/r8192S_firmware.c | 125 +- drivers/staging/rtl8192su/r8192S_firmware.h | 7 - drivers/staging/rtl8192su/r8192U.h | 1 - 5 files changed, 33 insertions(+), 4378 deletions(-) diff --git a/drivers/staging/rtl8192su/r8192SU_HWImg.c b/drivers/staging/rtl8192su/r8192SU_HWImg.c index cbb6579..ba8e12c 100644 --- a/drivers/staging/rtl8192su/r8192SU_HWImg.c +++ b/drivers/staging/rtl8192su/r8192SU_HWImg.c @@ -2,4282 +2,6 @@ #include "r8192SU_HWImg.h" -u8 Rtl8192SUFwImgArray[ImgArrayLength] = ...
From: Andrea Gelmini <andrea.gelmini@gelma.net>
ERROR: do not initialise statics to 0 or NULL
+static unsigned int ui_Temp = 0;
WARNING: braces {} are not necessary for any arm of this statement
+ if (data[1]) {
[...]
+ } else
[...]
WARNING: braces {} are not necessary for single statement blocks
+ for (i = 0; i < devpriv->ui_AiNbrofChannels; i++) {
+ devpriv->ui_AiChannelList[i] = data[4 + i];
+ }
ERROR: that open brace { should be on the previous line
+ } else /* EOC */
+ {
WARNING: braces {} are not necessary for any arm of this statement
+ if (data[1]) {
[...]
+ } else {
[...]
ERROR: that open brace { should be on the previous line
+ if (insn->unused[0] == 222) /* second insn read */
+ {
WARNING: braces {} are not necessary for single statement blocks
+ for (i = 0; i < insn->n; i++) {
+ data[i] = devpriv->ui_AiReadData[i];
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (cmd->start_src != TRIG_NOW && cmd->start_src != TRIG_EXT) {
+ err++;
+ }
ERROR: that open brace { should be on the previous line
+ if (cmd->scan_begin_src == TRIG_TIMER) /* Test Delay timing */
+ {
ERROR: that open brace { should be on the previous line
+ if (cmd->convert_src == TRIG_TIMER) /* Test Acquisition timing */
+ {
WARNING: braces {} are not necessary for any arm of this statement
+ if (cmd->stop_src == TRIG_COUNT) {
[...]
+ } else {
[...]
WARNING: braces {} are not necessary for single statement blocks
+ if (devpriv->b_ExttrigEnable == APCI3120_ENABLE) {
+ i_APCI3120_ExttrigEnable(dev); /* activate EXT trigger */
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (dmalen0 > (devpriv->ui_AiDataLength)) {
+ dmalen0 = devpriv->ui_AiDataLength;
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (dmalen1 > (devpriv->ui_AiDataLength)) {
+ dmalen1 = devpriv->ui_AiDataLength;
+ }
WARNING: braces {} are not necessary for any arm of this ...From: Andrea Gelmini <andrea.gelmini@gelma.net> ERROR: Macros with complex values should be enclosed in parenthesis +#define N_WORDS 3000*64 Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/comedi/drivers/das6402.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/staging/comedi/drivers/das6402.c b/drivers/staging/comedi/drivers/das6402.c index 92487f5..a404a18 100644 --- a/drivers/staging/comedi/drivers/das6402.c +++ b/drivers/staging/comedi/drivers/das6402.c @@ -45,7 +45,7 @@ This driver has suffered bitrot. #define DAS6402_SIZE 16 -#define N_WORDS 3000*64 +#define N_WORDS (3000*64) #define STOP 0 #define START 1 -- 1.7.0.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Andrea Gelmini <andrea.gelmini@gelma.net>
WARNING: braces {} are not necessary for single statement blocks
+ if (fifo_empty) {
+ break;
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (irq) {
+ printk(", irq %u", irq);
+ }
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/das800.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/comedi/drivers/das800.c b/drivers/staging/comedi/drivers/das800.c
index ecb97cd..aadc497 100644
--- a/drivers/staging/comedi/drivers/das800.c
+++ b/drivers/staging/comedi/drivers/das800.c
@@ -399,9 +399,8 @@ static irqreturn_t das800_interrupt(int irq, void *d)
} else {
fifo_empty = 0; /* cio-das802/16 has no fifo empty status bit */
}
- if (fifo_empty) {
+ if (fifo_empty)
break;
- }
/* strip off extraneous bits for 12 bit cards */
if (thisboard->resolution == 12)
dataPoint = (dataPoint >> 4) & 0xfff;
@@ -457,9 +456,8 @@ static int das800_attach(struct comedi_device *dev, struct comedi_devconfig *it)
int board;
printk("comedi%d: das800: io 0x%lx", dev->minor, iobase);
- if (irq) {
+ if (irq)
printk(", irq %u", irq);
- }
printk("\n");
/* allocate and initialize dev->private */
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Andrea Gelmini <andrea.gelmini@gelma.net>
WARNING: braces {} are not necessary for any arm of this statement
+ if (data[0] == COMEDI_OUTPUT) {
[...]
+ } else {
[...]
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/dmm32at.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/comedi/drivers/dmm32at.c b/drivers/staging/comedi/drivers/dmm32at.c
index 9db9a46..d5cbd51 100644
--- a/drivers/staging/comedi/drivers/dmm32at.c
+++ b/drivers/staging/comedi/drivers/dmm32at.c
@@ -1048,11 +1048,10 @@ static int dmm32at_dio_insn_config(struct comedi_device *dev,
* value COMEDI_INPUT or COMEDI_OUTPUT. */
/* if output clear the bit, otherwise set it */
- if (data[0] == COMEDI_OUTPUT) {
+ if (data[0] == COMEDI_OUTPUT)
devpriv->dio_config &= ~chanbit;
- } else {
+ else
devpriv->dio_config |= chanbit;
- }
/* get access to the DIO regs */
dmm_outb(dev, DMM32AT_CNTRL, DMM32AT_DIOACC);
/* set the DIO's to the new configuration setting */
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Andrea Gelmini <andrea.gelmini@gelma.net>
ERROR: code indent should use tabs where possible
+ 0 = [-10,10]$
ERROR: code indent should use tabs where possible
+ 0 = [-10,10]$
WARNING: braces {} are not necessary for single statement blocks
+ if (stat & (DT_S_COMPOSITE_ERROR | DT_S_READY)) {
+ return stat;
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (stat & DT_S_COMPOSITE_ERROR) {
+ return stat;
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (stat & DT_S_READY) {
+ return 0;
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (stat & DT_S_COMPOSITE_ERROR) {
+ return stat;
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (stat & DT_S_READY) {
+ return 0;
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (!(stat & DT_S_READY)) {
+ printk("dt2801: !ready in dt2801_writecmd(), ignoring\n");
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (!timeout) {
+ printk("dt2801: timeout 1 status=0x%02x\n", stat);
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (!timeout) {
+ printk("dt2801: timeout 2 status=0x%02x\n", stat);
+ }
WARNING: braces {} are not necessary for any arm of this statement
+ if (stat == -ETIME) {
[...]
+ } else {
[...]
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/dt2801.c | 33 +++++++++++-------------------
1 files changed, 12 insertions(+), 21 deletions(-)
diff --git a/drivers/staging/comedi/drivers/dt2801.c b/drivers/staging/comedi/drivers/dt2801.c
index 7b9af5d..3f365ae 100644
--- a/drivers/staging/comedi/drivers/dt2801.c
+++ b/drivers/staging/comedi/drivers/dt2801.c
@@ -18,10 +18,10 @@ Configuration options:
[1] - unused
[2] - A/D reference 0=differential, 1=single-ended
[3] - A/D range
- ...From: Andrea Gelmini <andrea.gelmini@gelma.net> ERROR: trailing whitespace + * Copyright (C) 1998 Elmer.Joandi@ut.ee, +37-255-13500^I$ WARNING: Use #include <linux/io.h> instead of <asm/io.h> +#include <asm/io.h> ERROR: do not use C99 // comments +//#define ARLAN_DEBUGGING 1 ERROR: "foo * bar" should be "foo *bar" +extern int arlan_command(struct net_device * dev, int command); ERROR: trailing whitespace + $ ERROR: trailing whitespace +#define IFDEBUG( L ) if ( (L) & arlan_debug ) $ ERROR: space prohibited after that open parenthesis '(' +#define IFDEBUG( L ) if ( (L) & arlan_debug ) ERROR: space prohibited before that close parenthesis ')' +#define IFDEBUG( L ) if ( (L) & arlan_debug ) ERROR: trailing whitespace +#define ARLAN_FAKE_HDR_LEN 12 $ ERROR: space required after that ',' (ctx:VxV) + #define ARLAN_DEBUG(a,b) printk(KERN_DEBUG a, b) ^ ERROR: trailing whitespace +^I#define ARLAN_DEBUG(a,b) $ ERROR: space required after that ',' (ctx:VxV) + #define ARLAN_DEBUG(a,b) ^ ERROR: open brace '{' following struct go on the same line +struct arlan_shmem +{ ERROR: trailing whitespace + /* Header Signature */ $ ERROR: trailing whitespace + $ ERROR: trailing whitespace + $ ERROR: trailing whitespace + $ ERROR: trailing whitespace + $ ERROR: trailing whitespace + int systemId; $ ERROR: open brace '{' following struct go on the same line +struct TxParam +{ ERROR: "foo * bar" should be "foo *bar" + struct arlan_shmem __iomem * card; ERROR: "foo * bar" should be "foo *bar" + struct arlan_shmem * conf; ERROR: trailing whitespace + struct arlan_conf_stru * Conf;^I $ ERROR: "foo * bar" should be "foo *bar" + struct arlan_conf_stru * Conf; ERROR: trailing whitespace + $ ERROR: space required after that ',' (ctx:VxV) +#define READSHM(to,from,atype) {\ ^ ERROR: space required after that ',' ...
From: Andrea Gelmini <andrea.gelmini@gelma.net>
WARNING: space prohibited between function name and open parenthesis '('
+void MD4Init (MD4_CTX *);
WARNING: space prohibited between function name and open parenthesis '('
+void MD4Update (MD4_CTX *, u8 *, UINT);
WARNING: space prohibited between function name and open parenthesis '('
+void MD4Final (u8 [16], MD4_CTX *);
ERROR: do not use C99 // comments
+#endif //__MD4_H__
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/rt3070/md4.h | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/rt3070/md4.h b/drivers/staging/rt3070/md4.h
index a9cc7b0..b3fb637 100644
--- a/drivers/staging/rt3070/md4.h
+++ b/drivers/staging/rt3070/md4.h
@@ -35,8 +35,8 @@ typedef struct _MD4_CTX_ {
u8 buffer[64]; /* input buffer */
} MD4_CTX;
-void MD4Init (MD4_CTX *);
-void MD4Update (MD4_CTX *, u8 *, UINT);
-void MD4Final (u8 [16], MD4_CTX *);
+void MD4Init(MD4_CTX *);
+void MD4Update(MD4_CTX *, u8 *, UINT);
+void MD4Final(u8 [16], MD4_CTX *);
-#endif //__MD4_H__
\ No newline at end of file
+#endif /*__MD4_H__*/
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Andrea Gelmini <andrea.gelmini@gelma.net> ERROR: trailing whitespace +obj-$(CONFIG_ARLAN) += arlan.o $ Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/arlan/Makefile | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/staging/arlan/Makefile b/drivers/staging/arlan/Makefile index 9e58e5f..5a84d44 100644 --- a/drivers/staging/arlan/Makefile +++ b/drivers/staging/arlan/Makefile @@ -1,3 +1,3 @@ -obj-$(CONFIG_ARLAN) += arlan.o +obj-$(CONFIG_ARLAN) += arlan.o arlan-objs := arlan-main.o arlan-proc.o -- 1.7.0.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Andrea Gelmini <andrea.gelmini@gelma.net>
ERROR: do not use C99 // comments
+ volatile u_char radioModule;// shows EEPROM, can be overridden at 0x111
ERROR: do not use C99 // comments
+ volatile u_char defaultChannelSet; // shows EEProm, can be overriiden at 0x10A
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/arlan/arlan.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/arlan/arlan.h b/drivers/staging/arlan/arlan.h
index 19161f1..ffcd3ea 100644
--- a/drivers/staging/arlan/arlan.h
+++ b/drivers/staging/arlan/arlan.h
@@ -90,8 +90,8 @@ struct arlan_shmem {
volatile u_char hardwareType;
volatile u_char majorHardwareVersion;
volatile u_char minorHardwareVersion;
- volatile u_char radioModule;// shows EEPROM, can be overridden at 0x111
- volatile u_char defaultChannelSet; // shows EEProm, can be overriiden at 0x10A
+ volatile u_char radioModule;/* shows EEPROM, can be overridden at 0x111 */
+ volatile u_char defaultChannelSet; /* shows EEProm, can be overriiden at 0x10A */
volatile u_char _2[47];
/* Control/Status Block - 0x0080 */
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Andrea Gelmini <andrea.gelmini@gelma.net>
WARNING: Use #include <linux/io.h> instead of <asm/io.h>
+#include <asm/io.h>
WARNING: braces {} are not necessary for any arm of this statement
+ if (dev->driver) {
[...]
+ } else {
[...]
WARNING: braces {} are not necessary for single statement blocks
+ if (insn->insn == INSN_READ) {
+ data[0] = (new_data[1] >> (chan - base_bitfield_channel)) & 1;
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (async->prealloc_buf && async->prealloc_bufsz == new_size) {
+ return 0;
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (async->buf_page_list[i].virt_addr == NULL) {
+ break;
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if ((int)(async->buf_write_alloc_count + nbytes - free_end) > 0) {
+ nbytes = free_end - async->buf_write_alloc_count;
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if ((int)(async->buf_write_alloc_count + nbytes - free_end) > 0) {
+ nbytes = 0;
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (async->buf_write_ptr >= async->prealloc_bufsz) {
+ async->buf_write_ptr %= async->prealloc_bufsz;
+ }
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers.c | 30 ++++++++++++++----------------
1 files changed, 14 insertions(+), 16 deletions(-)
diff --git a/drivers/staging/comedi/drivers.c b/drivers/staging/comedi/drivers.c
index c2a632d..44d6b62 100644
--- a/drivers/staging/comedi/drivers.c
+++ b/drivers/staging/comedi/drivers.c
@@ -44,7 +44,7 @@
#include <linux/cdev.h>
#include <linux/dma-mapping.h>
-#include <asm/io.h>
+#include <linux/io.h>
#include <asm/system.h>
static int postconfig(struct comedi_device *dev);
@@ -99,11 +99,10 @@ static void cleanup_device(struct comedi_device *dev)
static void __comedi_device_detach(struct comedi_device *dev)
...From: H Hartley Sweeten <hartleys@visionengravers.com>
Commit 9c1390a923ddb6fba1cf9d7440743369140c6d8a replaced
all u_int's with u32 and u_long's with u64. Unfortunately, a u_long
is still only 32-bits so they should have been replaced with u32 also.
This can be verified by the register definitions in dt3155_io.h. It
specifically states that the memory mapped registers are 32-bit.
Fix this by changing all the u64 to u32.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Greg Kroah-Hartman <greg@kroah.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/dt3155/allocator.c | 2 +-
drivers/staging/dt3155/allocator.h | 2 +-
drivers/staging/dt3155/dt3155.h | 24 +++---
drivers/staging/dt3155/dt3155_drv.c | 28 +++---
drivers/staging/dt3155/dt3155_io.c | 16 ++--
drivers/staging/dt3155/dt3155_io.h | 174 +++++++++++++++++-----------------
drivers/staging/dt3155/dt3155_isr.c | 54 ++++++------
drivers/staging/dt3155/dt3155_isr.h | 2 +-
8 files changed, 151 insertions(+), 151 deletions(-)
diff --git a/drivers/staging/dt3155/allocator.c b/drivers/staging/dt3155/allocator.c
index 114e2a8..c74234c 100644
--- a/drivers/staging/dt3155/allocator.c
+++ b/drivers/staging/dt3155/allocator.c
@@ -195,7 +195,7 @@ int allocator_free_dma(unsigned long address)
* On cleanup everything is released. If the list is not empty, that a
* problem of our clients
*/
-int allocator_init(u64 *allocator_max)
+int allocator_init(u32 *allocator_max)
{
/* check how much free memory is there */
void *remapped;
diff --git a/drivers/staging/dt3155/allocator.h b/drivers/staging/dt3155/allocator.h
index 4cd81bd..bdf3268 100644
--- a/drivers/staging/dt3155/allocator.h
+++ b/drivers/staging/dt3155/allocator.h
@@ -24,5 +24,5 @@
void allocator_free_dma(unsigned long address);
unsigned long allocator_allocate_dma(unsigned long kilobytes, int priority);
-int allocator_init(u64 *);
+int allocator_init(u32 *);
void ...From: Chihau Chau <chihau@gmail.com>
This fixes a line over 80 characters and a brace warnings.
Signed-off-by: Chihau Chau <chihau@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/poc.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/comedi/drivers/poc.c b/drivers/staging/comedi/drivers/poc.c
index d23e588..28eba6d 100644
--- a/drivers/staging/comedi/drivers/poc.c
+++ b/drivers/staging/comedi/drivers/poc.c
@@ -136,8 +136,8 @@ static int poc_attach(struct comedi_device *dev, struct comedi_devconfig *it)
/* check if io addresses are available */
if (!request_region(iobase, iosize, "dac02")) {
printk
- ("I/O port conflict: failed to allocate ports 0x%lx to 0x%lx\n",
- iobase, iobase + iosize - 1);
+ ("I/O port conflict: failed to allocate ports 0x%lx to "
+ "0x%lx\n", iobase, iobase + iosize - 1);
return -EIO;
}
dev->iobase = iobase;
@@ -156,9 +156,8 @@ static int poc_attach(struct comedi_device *dev, struct comedi_devconfig *it)
s->insn_write = this_board->winsn;
s->insn_read = this_board->rinsn;
s->insn_bits = this_board->insnbits;
- if (s->type == COMEDI_SUBD_AO || s->type == COMEDI_SUBD_DO) {
+ if (s->type == COMEDI_SUBD_AO || s->type == COMEDI_SUBD_DO)
s->subdev_flags = SDF_WRITABLE;
- }
return 0;
}
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Benjamin Adolphi <b.adolphi@googlemail.com>
This fixes all checkpatch issues in the pcmad comedi driver.
Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/pcmad.c | 19 +++++++++----------
1 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/drivers/staging/comedi/drivers/pcmad.c b/drivers/staging/comedi/drivers/pcmad.c
index acac670..f7991a9 100644
--- a/drivers/staging/comedi/drivers/pcmad.c
+++ b/drivers/staging/comedi/drivers/pcmad.c
@@ -34,11 +34,11 @@ Configuration options:
[0] - I/O port base
[1] - unused
[2] - Analog input reference
- 0 = single ended
- 1 = differential
+ 0 = single ended
+ 1 = differential
[3] - Analog input encoding (must match jumpers)
- 0 = straight binary
- 1 = two's complement
+ 0 = straight binary
+ 1 = two's complement
*/
#include <linux/interrupt.h>
@@ -113,9 +113,8 @@ static int pcmad_ai_insn_read(struct comedi_device *dev,
data[n] = inb(dev->iobase + PCMAD_LSB);
data[n] |= (inb(dev->iobase + PCMAD_MSB) << 8);
- if (devpriv->twos_comp) {
+ if (devpriv->twos_comp)
data[n] ^= (1 << (this_board->n_ai_bits - 1));
- }
}
return n;
@@ -135,7 +134,7 @@ static int pcmad_attach(struct comedi_device *dev, struct comedi_devconfig *it)
unsigned long iobase;
iobase = it->options[0];
- printk("comedi%d: pcmad: 0x%04lx ", dev->minor, iobase);
+ printk(KERN_INFO "comedi%d: pcmad: 0x%04lx ", dev->minor, iobase);
if (!request_region(iobase, PCMAD_SIZE, "pcmad")) {
printk("I/O port conflict\n");
return -EIO;
@@ -166,11 +165,11 @@ static int pcmad_attach(struct comedi_device *dev, struct comedi_devconfig *it)
static int pcmad_detach(struct comedi_device *dev)
{
- printk("comedi%d: pcmad: remove\n", dev->minor);
+ printk(KERN_INFO "comedi%d: pcmad: remove\n", dev->minor);
- if (dev->irq) {
+ if (dev->irq)
free_irq(dev->irq, ...From: Graham M Howe <gman.1352@googlemail.com>
This is a patch to the ni_65xx.c file that fixes up a brace
warning found by the checkpatch.pl tool
Signed-off-by: Graham M Howe <gmhowe@btopenworld.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/ni_65xx.c | 31 ++++++++++++++++-------------
1 files changed, 17 insertions(+), 14 deletions(-)
diff --git a/drivers/staging/comedi/drivers/ni_65xx.c b/drivers/staging/comedi/drivers/ni_65xx.c
index bbf75eb..dad79d5 100644
--- a/drivers/staging/comedi/drivers/ni_65xx.c
+++ b/drivers/staging/comedi/drivers/ni_65xx.c
@@ -26,12 +26,13 @@
/*
Driver: ni_65xx
Description: National Instruments 65xx static dio boards
-Author: Jon Grierson <jd@renko.co.uk>, Frank Mori Hess <fmhess@users.sourceforge.net>
+Author: Jon Grierson <jd@renko.co.uk>,
+ Frank Mori Hess <fmhess@users.sourceforge.net>
Status: testing
-Devices: [National Instruments] PCI-6509 (ni_65xx), PXI-6509, PCI-6510, PCI-6511,
- PXI-6511, PCI-6512, PXI-6512, PCI-6513, PXI-6513, PCI-6514, PXI-6514, PCI-6515,
- PXI-6515, PCI-6516, PCI-6517, PCI-6518, PCI-6519, PCI-6520, PCI-6521, PXI-6521,
- PCI-6528, PXI-6528
+Devices: [National Instruments] PCI-6509 (ni_65xx), PXI-6509, PCI-6510,
+ PCI-6511, PXI-6511, PCI-6512, PXI-6512, PCI-6513, PXI-6513, PCI-6514,
+ PXI-6514, PCI-6515, PXI-6515, PCI-6516, PCI-6517, PCI-6518, PCI-6519,
+ PCI-6520, PCI-6521, PXI-6521, PCI-6528, PXI-6528
Updated: Wed Oct 18 08:59:11 EDT 2006
Based on the PCI-6527 driver by ds.
@@ -418,7 +419,8 @@ static int ni_65xx_dio_insn_bits(struct comedi_device *dev,
return -EINVAL;
base_bitfield_channel = CR_CHAN(insn->chanspec);
for (j = 0; j < max_ports_per_bitfield; ++j) {
- const unsigned port_offset = ni_65xx_port_by_channel(base_bitfield_channel) + j;
+ const unsigned port_offset =
+ ni_65xx_port_by_channel(base_bitfield_channel) + j;
const unsigned port =
sprivate(s)->base_port + port_offset;
unsigned ...From: Graham M Howe <gman.1352@googlemail.com>
This is a patch to the ni_660x.c file that fixes up the brace and 80
character issues found by the checkpatch tool
Signed-off-by: Graham M Howe <gmhowe@btopenworld.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/ni_660x.c | 48 +++++++++++++++---------------
1 files changed, 24 insertions(+), 24 deletions(-)
diff --git a/drivers/staging/comedi/drivers/ni_660x.c b/drivers/staging/comedi/drivers/ni_660x.c
index 404d3c5..df61e5a 100644
--- a/drivers/staging/comedi/drivers/ni_660x.c
+++ b/drivers/staging/comedi/drivers/ni_660x.c
@@ -52,7 +52,8 @@ enum ni_660x_constants {
};
#define NUM_PFI_CHANNELS 40
-/* really there are only up to 3 dma channels, but the register layout allows for 4 */
+/* really there are only up to 3 dma channels, but the register layout allows
+for 4 */
#define MAX_DMA_CHANNEL 4
/* See Register-Level Programmer Manual page 3.1 */
@@ -198,7 +199,7 @@ struct NI_660xRegisterData {
const char *name; /* Register Name */
int offset; /* Offset from base address from GPCT chip */
enum ni_660x_register_direction direction;
- enum ni_660x_register_width size; /* 1 byte, 2 bytes, or 4 bytes */
+ enum ni_660x_register_width size; /*1 byte, 2 bytes, or 4 bytes*/
};
static const struct NI_660xRegisterData registerData[NumRegisters] = {
@@ -382,8 +383,8 @@ enum global_interrupt_config_register_bits {
};
/* Offset of the GPCT chips from the base-adress of the card */
-static const unsigned GPCT_OFFSET[2] = { 0x0, 0x800 }; /* First chip is at base-address +
- 0x00, etc. */
+/* First chip is at base-address + 0x00, etc. */
+static const unsigned GPCT_OFFSET[2] = { 0x0, 0x800 };
/* Board description*/
struct ni_660x_board {
@@ -993,9 +994,9 @@ static int ni_660x_allocate_private(struct comedi_device *dev)
spin_lock_init(&private(dev)->mite_channel_lock);
spin_lock_init(&private(dev)->interrupt_lock);
...From: Chihau Chau <chihau@gmail.com>
This fixes some coding style issues like to use __func__ instead
__FUNCTION__, "foo *bar" instead "foo* bar" and a initial comment with
"/* */" instead "//"
Signed-off-by: Chihau Chau <chihau@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/dream/camera/msm_camera.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/dream/camera/msm_camera.c b/drivers/staging/dream/camera/msm_camera.c
index 7d93877..4f808dc 100644
--- a/drivers/staging/dream/camera/msm_camera.c
+++ b/drivers/staging/dream/camera/msm_camera.c
@@ -2,7 +2,7 @@
* Copyright (C) 2008-2009 QUALCOMM Incorporated.
*/
-//FIXME: most allocations need not be GFP_ATOMIC
+/* FIXME: most allocations need not be GFP_ATOMIC */
/* FIXME: management of mutexes */
/* FIXME: msm_pmem_region_lookup return values */
/* FIXME: way too many copy to/from user */
@@ -361,7 +361,7 @@ static int __msm_get_frame(struct msm_sync *sync,
if (!frame->buffer) {
pr_err("%s: cannot get frame, invalid lookup address "
"y=%x cbcr=%x offset=%d\n",
- __FUNCTION__,
+ __func__,
pphy->y_phy,
pphy->cbcr_phy,
frame->y_off);
@@ -455,7 +455,7 @@ static int msm_disable_vfe(struct msm_sync *sync, void __user *arg)
return rc;
}
-static struct msm_queue_cmd* __msm_control(struct msm_sync *sync,
+static struct msm_queue_cmd *__msm_control(struct msm_sync *sync,
struct msm_control_device_queue *queue,
struct msm_queue_cmd *qcmd,
int timeout)
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Alessandro Ghedini <al3xbio@gmail.com> This patch fixes all the errors and the majority of the warnings found with checkpatch.pl script in hfa384x.h, following Gábor Stefanik hints Signed-off-by: Alessandro Ghedini <al3xbio@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/wlan-ng/hfa384x.h | 182 ++++++++++++++++++++++--------------- 1 files changed, 107 insertions(+), 75 deletions(-) diff --git a/drivers/staging/wlan-ng/hfa384x.h b/drivers/staging/wlan-ng/hfa384x.h index 46cce81..5984d74 100644 --- a/drivers/staging/wlan-ng/hfa384x.h +++ b/drivers/staging/wlan-ng/hfa384x.h @@ -61,17 +61,17 @@ #include <linux/if_ether.h> /*--- Mins & Maxs -----------------------------------*/ -#define HFA384x_PORTID_MAX ((u16)7) -#define HFA384x_NUMPORTS_MAX ((u16)(HFA384x_PORTID_MAX+1)) -#define HFA384x_PDR_LEN_MAX ((u16)512) /* in bytes, from EK */ -#define HFA384x_PDA_RECS_MAX ((u16)200) /* a guess */ -#define HFA384x_PDA_LEN_MAX ((u16)1024) /* in bytes, from EK */ -#define HFA384x_SCANRESULT_MAX ((u16)31) -#define HFA384x_HSCANRESULT_MAX ((u16)31) -#define HFA384x_CHINFORESULT_MAX ((u16)16) -#define HFA384x_RID_GUESSING_MAXLEN 2048 /* I'm not really sure */ -#define HFA384x_RIDDATA_MAXLEN HFA384x_RID_GUESSING_MAXLEN -#define HFA384x_USB_RWMEM_MAXLEN 2048 +#define HFA384x_PORTID_MAX ((u16)7) +#define HFA384x_NUMPORTS_MAX ((u16)(HFA384x_PORTID_MAX+1)) +#define HFA384x_PDR_LEN_MAX ((u16)512) /* in bytes, from EK */ +#define HFA384x_PDA_RECS_MAX ((u16)200) /* a guess */ +#define HFA384x_PDA_LEN_MAX ((u16)1024) /* in bytes, from EK*/ +#define HFA384x_SCANRESULT_MAX ((u16)31) +#define HFA384x_HSCANRESULT_MAX ((u16)31) +#define HFA384x_CHINFORESULT_MAX ((u16)16) +#define HFA384x_RID_GUESSING_MAXLEN 2048 /* I'm not really sure */ +#define HFA384x_RIDDATA_MAXLEN HFA384x_RID_GUESSING_MAXLEN +#define HFA384x_USB_RWMEM_MAXLEN 2048 /*--- Support Constants -----------------------------*/ #define HFA384x_PORTTYPE_IBSS ((u16)0) @@ -114,9 +114,9 @@ ...
From: Chihau Chau <chihau@gmail.com>
This fixes some code style issues like else staments after the close
braces '}' and to use __func__ instead of __FUNCTION__.
Signed-off-by: Chihau Chau <chihau@gmail.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/dream/camera/msm_camera.c | 37 ++++++++++++++---------------
1 files changed, 18 insertions(+), 19 deletions(-)
diff --git a/drivers/staging/dream/camera/msm_camera.c b/drivers/staging/dream/camera/msm_camera.c
index 4f808dc..925e16c 100644
--- a/drivers/staging/dream/camera/msm_camera.c
+++ b/drivers/staging/dream/camera/msm_camera.c
@@ -670,7 +670,7 @@ static int msm_get_stats(struct msm_sync *sync, void __user *arg)
&(stats.fd));
if (!stats.buffer) {
pr_err("%s: msm_pmem_stats_ptov_lookup error\n",
- __FUNCTION__);
+ __func__);
rc = -EINVAL;
goto failure;
}
@@ -718,8 +718,7 @@ static int msm_get_stats(struct msm_sync *sync, void __user *arg)
buf.fmain.buffer =
(unsigned long)region.vaddr;
buf.fmain.fd = region.fd;
- }
- else {
+ } else {
pr_err("%s: pmem lookup failed\n",
__func__);
rc = -EINVAL;
@@ -838,8 +837,8 @@ static int msm_ctrl_cmd_done(struct msm_control_device *ctrl_pmsm,
kfree(qcmd);
goto end;
}
- }
- else ctrlcmd->value = NULL;
+ } else
+ ctrlcmd->value = NULL;
end:
CDBG("msm_ctrl_cmd_done: end rc = %d\n", rc);
@@ -876,7 +875,7 @@ static int msm_config_vfe(struct msm_sync *sync, void __user *arg)
MSM_PMEM_AEC_AWB, &region[0],
NUM_WB_EXP_STAT_OUTPUT_BUFFERS);
if (!axi_data.bufnum1) {
- pr_err("%s: pmem region lookup error\n", __FUNCTION__);
+ pr_err("%s: pmem region lookup error\n", __func__);
return -EINVAL;
}
axi_data.region = &region[0];
@@ -888,7 +887,7 @@ static int msm_config_vfe(struct msm_sync *sync, void __user *arg)
MSM_PMEM_AF, &region[0],
NUM_AF_STAT_OUTPUT_BUFFERS);
...From: Chihau Chau <chihau@gmail.com>
This fixes some coding style issues like include KERN_ facility levels
in some printk() and one trailing whitespace error.
Signed-off-by: Chihau Chau <chihau@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/poc.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/comedi/drivers/poc.c b/drivers/staging/comedi/drivers/poc.c
index 28eba6d..e15fbd7 100644
--- a/drivers/staging/comedi/drivers/poc.c
+++ b/drivers/staging/comedi/drivers/poc.c
@@ -122,22 +122,21 @@ static int poc_attach(struct comedi_device *dev, struct comedi_devconfig *it)
unsigned int iosize;
iobase = it->options[0];
- printk("comedi%d: poc: using %s iobase 0x%lx\n", dev->minor,
+ printk(KERN_INFO "comedi%d: poc: using %s iobase 0x%lx\n", dev->minor,
this_board->name, iobase);
dev->board_name = this_board->name;
if (iobase == 0) {
- printk("io base address required\n");
+ printk(KERN_ERR "io base address required\n");
return -EINVAL;
}
iosize = this_board->iosize;
/* check if io addresses are available */
if (!request_region(iobase, iosize, "dac02")) {
- printk
- ("I/O port conflict: failed to allocate ports 0x%lx to "
- "0x%lx\n", iobase, iobase + iosize - 1);
+ printk(KERN_ERR "I/O port conflict: failed to allocate ports "
+ "0x%lx to 0x%lx\n", iobase, iobase + iosize - 1);
return -EIO;
}
dev->iobase = iobase;
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Maurice Dawson <maurice2699@btinternet.com>
This is a patch to the ni_labpc.c file that fixes up a brace warning
found by the checkpatch.pl tool.
Signed-off-by: Maurice Dawson <maurice2699@btinternet.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/ni_labpc.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/comedi/drivers/ni_labpc.c b/drivers/staging/comedi/drivers/ni_labpc.c
index dc3f398..a01e35d 100644
--- a/drivers/staging/comedi/drivers/ni_labpc.c
+++ b/drivers/staging/comedi/drivers/ni_labpc.c
@@ -483,12 +483,10 @@ int labpc_common_attach(struct comedi_device *dev, unsigned long iobase,
printk("comedi%d: ni_labpc: %s, io 0x%lx", dev->minor, thisboard->name,
iobase);
- if (irq) {
+ if (irq)
printk(", irq %u", irq);
- }
- if (dma_chan) {
+ if (dma_chan)
printk(", dma %u", dma_chan);
- }
printk("\n");
if (iobase == 0) {
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Maurice Dawson <mauricedawson2699@googlemail.com>
This is a patch to the ni_labpc.c file that fixes up a brace warning
found by the checkpatch.pl tool
Signed-off-by: Maurice Dawson <mauricedawson2699@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/ni_labpc.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/comedi/drivers/ni_labpc.c b/drivers/staging/comedi/drivers/ni_labpc.c
index a01e35d..5dc8606 100644
--- a/drivers/staging/comedi/drivers/ni_labpc.c
+++ b/drivers/staging/comedi/drivers/ni_labpc.c
@@ -638,9 +638,8 @@ int labpc_common_attach(struct comedi_device *dev, unsigned long iobase,
s->insn_read = labpc_eeprom_read_insn;
s->insn_write = labpc_eeprom_write_insn;
- for (i = 0; i < EEPROM_SIZE; i++) {
+ for (i = 0; i < EEPROM_SIZE; i++)
devpriv->eeprom_data[i] = labpc_eeprom_read(dev, i);
- }
#ifdef LABPC_DEBUG
printk(" eeprom:");
for (i = 0; i < EEPROM_SIZE; i++) {
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Stewart Robertson <stewart_r@aliencamel.com>
This is a patch to the ni_labpc.c file that fixes suspect code indent for
conditional statements found by the checkpatch.pl tool
Signed-off-by: Stewart Robertson <stewart_r@aliencamel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/ni_labpc.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/comedi/drivers/ni_labpc.c b/drivers/staging/comedi/drivers/ni_labpc.c
index d6b5c05..ddc3b07 100644
--- a/drivers/staging/comedi/drivers/ni_labpc.c
+++ b/drivers/staging/comedi/drivers/ni_labpc.c
@@ -583,8 +583,11 @@ int labpc_common_attach(struct comedi_device *dev, unsigned long iobase,
/* analog output */
s = dev->subdevices + 1;
if (thisboard->has_ao) {
-/* Could provide command support, except it only has a one sample
- * hardware buffer for analog output and no underrun flag. */
+ /*
+ * Could provide command support, except it only has a
+ * one sample hardware buffer for analog output and no
+ * underrun flag.
+ */
s->type = COMEDI_SUBD_AO;
s->subdev_flags = SDF_READABLE | SDF_WRITABLE | SDF_GROUND;
s->n_chan = NUM_AO_CHAN;
@@ -1356,7 +1359,10 @@ static irqreturn_t labpc_interrupt(int irq, void *d)
}
if (devpriv->current_transfer == isa_dma_transfer) {
- /* if a dma terminal count of external stop trigger has occurred */
+ /*
+ * if a dma terminal count of external stop trigger
+ * has occurred
+ */
if (devpriv->status1_bits & DMATC_BIT ||
(thisboard->register_layout == labpc_1200_layout
&& devpriv->status2_bits & A1_TC_BIT)) {
--
1.7.0.1
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Maurice Dawson <mauricedawson2699@googlemail.com>
This is a patch to the ni_labpc.c file that fixes up all the brace
warnings found by the checkpatch.pl tool
Signed-off-by: Maurice Dawson <mauricedawson2699@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/drivers/ni_labpc.c | 22 ++++++++++------------
1 files changed, 10 insertions(+), 12 deletions(-)
diff --git a/drivers/staging/comedi/drivers/ni_labpc.c b/drivers/staging/comedi/drivers/ni_labpc.c
index 5dc8606..d6b5c05 100644
--- a/drivers/staging/comedi/drivers/ni_labpc.c
+++ b/drivers/staging/comedi/drivers/ni_labpc.c
@@ -642,9 +642,8 @@ int labpc_common_attach(struct comedi_device *dev, unsigned long iobase,
devpriv->eeprom_data[i] = labpc_eeprom_read(dev, i);
#ifdef LABPC_DEBUG
printk(" eeprom:");
- for (i = 0; i < EEPROM_SIZE; i++) {
+ for (i = 0; i < EEPROM_SIZE; i++)
printk(" %i:0x%x ", i, devpriv->eeprom_data[i]);
- }
printk("\n");
#endif
} else
@@ -676,9 +675,8 @@ static int labpc_attach(struct comedi_device *dev, struct comedi_devconfig *it)
case pci_bustype:
#ifdef CONFIG_COMEDI_PCI
retval = labpc_find_device(dev, it->options[0], it->options[1]);
- if (retval < 0) {
+ if (retval < 0)
return retval;
- }
retval = mite_setup(devpriv->mite);
if (retval < 0)
return retval;
@@ -1005,9 +1003,9 @@ static int labpc_ai_cmdtest(struct comedi_device *dev,
err++;
}
- if (!cmd->chanlist_len) {
+ if (!cmd->chanlist_len)
err++;
- }
+
if (cmd->scan_end_arg != cmd->chanlist_len) {
cmd->scan_end_arg = cmd->chanlist_len;
err++;
@@ -1102,9 +1100,9 @@ static int labpc_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
devpriv->write_byte(devpriv->command3_bits, dev->iobase + COMMAND3_REG);
/* initialize software conversion count */
- if (cmd->stop_src == TRIG_COUNT) {
+ if (cmd->stop_src == TRIG_COUNT)
devpriv->count = cmd->stop_arg * cmd->chanlist_len;
- }
+
/* setup ...From: Andrea Gelmini <andrea.gelmini@gelma.net>
ERROR: do not initialise externals to 0 or NULL
+int comedi_num_legacy_minors = 0;
WARNING: braces {} are not necessary for single statement blocks
+ if (s->subdev_flags & SDF_CMD_READ) {
+ kill_fasync(&dev->async_queue, SIGIO, POLL_IN);
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (s->subdev_flags & SDF_CMD_WRITE) {
+ kill_fasync(&dev->async_queue, SIGIO, POLL_OUT);
+ }
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/comedi/comedi_fops.c | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c
index 8117748..aca9674 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -63,7 +63,7 @@ module_param(comedi_debug, int, 0644);
int comedi_autoconfig = 1;
module_param(comedi_autoconfig, bool, 0444);
-int comedi_num_legacy_minors = 0;
+int comedi_num_legacy_minors;
module_param(comedi_num_legacy_minors, int, 0444);
static DEFINE_SPINLOCK(comedi_file_info_table_lock);
@@ -1510,7 +1510,7 @@ static unsigned int comedi_poll(struct file *file, poll_table * wait)
}
static ssize_t comedi_write(struct file *file, const char *buf, size_t nbytes,
- loff_t * offset)
+ loff_t *offset)
{
struct comedi_subdevice *s;
struct comedi_async *async;
@@ -1612,7 +1612,7 @@ done:
}
static ssize_t comedi_read(struct file *file, char *buf, size_t nbytes,
- loff_t * offset)
+ loff_t *offset)
{
struct comedi_subdevice *s;
struct comedi_async *async;
@@ -2004,12 +2004,10 @@ void comedi_event(struct comedi_device *dev, struct comedi_subdevice *s)
if (async->cb_mask & s->async->events) {
if (comedi_get_subdevice_runflags(s) & SRF_USER) {
wake_up_interruptible(&async->wait_head);
- if (s->subdev_flags & SDF_CMD_READ) ...From: Andrew Elwell <andrew.elwell@gmail.com>
Basic fixups in the staging/wlan-ng directory.
(First kernel patch - thanks to FOSDEM talk)
Signed-off-by: Andrew Elwell <Andrew.Elwell@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/wlan-ng/hfa384x_usb.c | 12 +++---
drivers/staging/wlan-ng/p80211conv.h | 4 +-
drivers/staging/wlan-ng/p80211metadef.h | 18 ++++----
drivers/staging/wlan-ng/p80211mgmt.h | 42 +++++++++---------
drivers/staging/wlan-ng/p80211netdev.c | 4 +-
drivers/staging/wlan-ng/p80211netdev.h | 44 ++++++++++----------
drivers/staging/wlan-ng/p80211req.c | 2 +-
drivers/staging/wlan-ng/p80211req.h | 2 +-
drivers/staging/wlan-ng/p80211types.h | 12 +++---
drivers/staging/wlan-ng/p80211wext.c | 56 ++++++++++++------------
drivers/staging/wlan-ng/prism2fw.c | 69 ++++++++++++++----------------
drivers/staging/wlan-ng/prism2mgmt.c | 30 ++++++--------
drivers/staging/wlan-ng/prism2mgmt.h | 48 +++++++++++-----------
drivers/staging/wlan-ng/prism2mib.c | 11 ++---
drivers/staging/wlan-ng/prism2sta.c | 23 +++++-----
15 files changed, 183 insertions(+), 194 deletions(-)
diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c
index 925678b..730d085 100644
--- a/drivers/staging/wlan-ng/hfa384x_usb.c
+++ b/drivers/staging/wlan-ng/hfa384x_usb.c
@@ -118,15 +118,15 @@
#include <linux/wireless.h>
#include <linux/netdevice.h>
#include <linux/timer.h>
-#include <asm/io.h>
+#include <linux/io.h>
#include <linux/delay.h>
#include <asm/byteorder.h>
-#include <asm/bitops.h>
+#include <linux/bitops.h>
#include <linux/list.h>
#include <linux/usb.h>
#include <linux/byteorder/generic.h>
-#define SUBMIT_URB(u,f) usb_submit_urb(u,f)
+#define SUBMIT_URB(u, f) usb_submit_urb(u, f)
#include "p80211types.h"
#include "p80211hdr.h"
@@ -627,7 +627,7 @@ static hfa384x_usbctlx_t *usbctlx_alloc(void)
{
...From: Andrew Elwell <andrew.elwell@gmail.com>
Signed-off-by: Andrew Elwell <Andrew.Elwell@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/wlan-ng/hfa384x_usb.c | 28 +++++++++++++++-------------
drivers/staging/wlan-ng/p80211conv.c | 14 +++++++-------
drivers/staging/wlan-ng/p80211netdev.c | 3 ++-
drivers/staging/wlan-ng/p80211wext.c | 8 ++++----
4 files changed, 28 insertions(+), 25 deletions(-)
diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c
index 730d085..d3a85f2 100644
--- a/drivers/staging/wlan-ng/hfa384x_usb.c
+++ b/drivers/staging/wlan-ng/hfa384x_usb.c
@@ -1909,18 +1909,19 @@ int hfa384x_drvr_flashdl_enable(hfa384x_t *hw)
return -EINVAL;
/* Retrieve the buffer loc&size and timeout */
- if ((result = hfa384x_drvr_getconfig(hw, HFA384x_RID_DOWNLOADBUFFER,
- &(hw->bufinfo),
- sizeof(hw->bufinfo)))) {
+ result = hfa384x_drvr_getconfig(hw, HFA384x_RID_DOWNLOADBUFFER,
+ &(hw->bufinfo), sizeof(hw->bufinfo));
+ if (result)
return result;
- }
+
hw->bufinfo.page = le16_to_cpu(hw->bufinfo.page);
hw->bufinfo.offset = le16_to_cpu(hw->bufinfo.offset);
hw->bufinfo.len = le16_to_cpu(hw->bufinfo.len);
- if ((result = hfa384x_drvr_getconfig16(hw, HFA384x_RID_MAXLOADTIME,
- &(hw->dltimeout)))) {
+ result = hfa384x_drvr_getconfig16(hw, HFA384x_RID_MAXLOADTIME,
+ &(hw->dltimeout));
+ if (result)
return result;
- }
+
hw->dltimeout = le16_to_cpu(hw->dltimeout);
pr_debug("flashdl_enable\n");
@@ -3071,9 +3072,9 @@ static void hfa384x_usbctlxq_run(hfa384x_t *hw)
hfa384x_ctlxout_callback, hw);
hw->ctlx_urb.transfer_flags |= USB_QUEUE_BULK;
- /* Now submit the URB and update the CTLX's state
- */
- if ((result = SUBMIT_URB(&hw->ctlx_urb, GFP_ATOMIC)) == 0) {
+ /* Now submit the URB and update the CTLX's state */
+ result = SUBMIT_URB(&hw->ctlx_urb, GFP_ATOMIC);
+ if (result == 0) {
/* This CTLX is ...From: Chihau Chau <chihau@gmail.com>
This fixes some code style issues like to add one space after a while or
switch statement and before a open parenthesis '(', and to include KERN_
facility level in the printk() functions.
Signed-off-by: Chihau Chau <chihau@gmail.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/dream/camera/msm_camera.c | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/dream/camera/msm_camera.c b/drivers/staging/dream/camera/msm_camera.c
index 925e16c..223918f 100644
--- a/drivers/staging/dream/camera/msm_camera.c
+++ b/drivers/staging/dream/camera/msm_camera.c
@@ -76,14 +76,14 @@ static LIST_HEAD(msm_sensors);
list_del_init(&qcmd->list); \
kfree(qcmd); \
}; \
-} while(0)
+} while (0)
#define MSM_DRAIN_QUEUE(sync, name) do { \
unsigned long flags; \
spin_lock_irqsave(&(sync)->name##_lock, flags); \
MSM_DRAIN_QUEUE_NOSYNC(sync, name); \
spin_unlock_irqrestore(&(sync)->name##_lock, flags); \
-} while(0)
+} while (0)
static int check_overlap(struct hlist_head *ptype,
unsigned long paddr,
@@ -868,7 +868,7 @@ static int msm_config_vfe(struct msm_sync *sync, void __user *arg)
return -EFAULT;
}
- switch(cfgcmd.cmd_type) {
+ switch (cfgcmd.cmd_type) {
case CMD_STATS_ENABLE:
axi_data.bufnum1 =
msm_pmem_region_lookup(&sync->stats,
@@ -1621,7 +1621,8 @@ static int msm_release_control(struct inode *node, struct file *filep)
int rc;
struct msm_control_device *ctrl_pmsm = filep->private_data;
struct msm_device *pmsm = ctrl_pmsm->pmsm;
- printk("msm_camera: RELEASE %s\n", filep->f_path.dentry->d_name.name);
+ printk(KERN_INFO "msm_camera: RELEASE %s\n",
+ filep->f_path.dentry->d_name.name);
rc = __msm_release(pmsm->sync);
if (!rc) {
MSM_DRAIN_QUEUE(&ctrl_pmsm->ctrl_q, ctrl_status_q);
@@ -1635,7 +1636,8 @@ static int msm_release_frame(struct inode *node, ...From: Chihau Chau <chihau@gmail.com> This fixes some code style issues about assignments in if conditions. Signed-off-by: Chihau Chau <chihau@gmail.com> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- drivers/staging/dream/camera/s5k3e2fx.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/dream/camera/s5k3e2fx.c b/drivers/staging/dream/camera/s5k3e2fx.c index edba198..2426f5e 100644 --- a/drivers/staging/dream/camera/s5k3e2fx.c +++ b/drivers/staging/dream/camera/s5k3e2fx.c @@ -743,12 +743,12 @@ static int s5k3e2fx_sensor_open_init(const struct msm_camera_sensor_info *data) } /* initialize AF */ - if ((rc = s5k3e2fx_i2c_write_b(s5k3e2fx_client->addr, - 0x3146, 0x3A)) < 0) + rc = s5k3e2fx_i2c_write_b(s5k3e2fx_client->addr, 0x3146, 0x3A); + if (rc < 0) goto init_fail1; - if ((rc = s5k3e2fx_i2c_write_b(s5k3e2fx_client->addr, - 0x3130, 0x03)) < 0) + rc = s5k3e2fx_i2c_write_b(s5k3e2fx_client->addr, 0x3130, 0x03); + if (rc < 0) goto init_fail1; goto init_done; -- 1.7.0.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
From: Greg Kroah-Hartman <gregkh@suse.de>
The wireless core made a number of api changes that caused
the winbond driver to break. This patch fixes those errors by
making the needed changes to the driver.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/winbond/wbusb.c | 14 +++-----------
1 files changed, 3 insertions(+), 11 deletions(-)
diff --git a/drivers/staging/winbond/wbusb.c b/drivers/staging/winbond/wbusb.c
index ecf418d..3482eec 100644
--- a/drivers/staging/winbond/wbusb.c
+++ b/drivers/staging/winbond/wbusb.c
@@ -65,17 +65,17 @@ static void hal_set_beacon_period(struct hw_data *pHwData, u16 beacon_period)
}
static int wbsoft_add_interface(struct ieee80211_hw *dev,
- struct ieee80211_if_init_conf *conf)
+ struct ieee80211_vif *vif)
{
struct wbsoft_priv *priv = dev->priv;
- hal_set_beacon_period(&priv->sHwData, conf->vif->bss_conf.beacon_int);
+ hal_set_beacon_period(&priv->sHwData, vif->bss_conf.beacon_int);
return 0;
}
static void wbsoft_remove_interface(struct ieee80211_hw *dev,
- struct ieee80211_if_init_conf *conf)
+ struct ieee80211_vif *vif)
{
printk("wbsoft_remove interface called\n");
}
@@ -92,13 +92,6 @@ static int wbsoft_get_stats(struct ieee80211_hw *hw,
return 0;
}
-static int wbsoft_get_tx_stats(struct ieee80211_hw *hw,
- struct ieee80211_tx_queue_stats *stats)
-{
- printk(KERN_INFO "%s called\n", __func__);
- return 0;
-}
-
static u64 wbsoft_prepare_multicast(struct ieee80211_hw *hw, int mc_count,
struct dev_addr_list *mc_list)
{
@@ -287,7 +280,6 @@ static const struct ieee80211_ops wbsoft_ops = {
.prepare_multicast = wbsoft_prepare_multicast,
.configure_filter = wbsoft_configure_filter,
.get_stats = wbsoft_get_stats,
- .get_tx_stats = wbsoft_get_tx_stats,
.get_tsf = wbsoft_get_tsf,
};
--
1.7.0.1
_______________________________________________
devel mailing ...