From ffc18afa11f32d59839b5f3c605c64c63d38c218 Mon Sep 17 00:00:00 2001 From: Jonathan Cameron Date: Mon, 12 Oct 2009 19:18:09 +0100 Subject: Staging: iio: Fix missing include linux/sched.h include was removed form linux/poll.h by commmit a99bbaf5ee6bad1aca0c88ea65ec6e5373e86184 Required for definition of TASK_INTERRUPTIBLE amongst others From: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- drivers/staging/iio/industrialio-core.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers') diff --git a/drivers/staging/iio/industrialio-core.c b/drivers/staging/iio/industrialio-core.c index 1fa18f255814..8b67c17237e0 100644 --- a/drivers/staging/iio/industrialio-core.c +++ b/drivers/staging/iio/industrialio-core.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include "iio.h" #include "trigger_consumer.h" -- cgit v1.2.2 From 4377a026500a3f59e9c41c23d03e55ff2e712379 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 12 Oct 2009 14:58:16 -0700 Subject: Staging: comedi: fix sched.h build breakage commit d43c36dc removed sched.h from interrupt.h. This broke some of the comedi drivers. This patch fixes this. Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/me_daq.c | 1 + drivers/staging/comedi/drivers/ni_mio_common.c | 1 + drivers/staging/comedi/drivers/ni_pcidio.c | 1 + 3 files changed, 3 insertions(+) (limited to 'drivers') diff --git a/drivers/staging/comedi/drivers/me_daq.c b/drivers/staging/comedi/drivers/me_daq.c index 2cda7ad1d32f..80e192d2e77e 100644 --- a/drivers/staging/comedi/drivers/me_daq.c +++ b/drivers/staging/comedi/drivers/me_daq.c @@ -51,6 +51,7 @@ from http://www.comedi.org */ #include +#include #include "../comedidev.h" #include "comedi_pci.h" diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c b/drivers/staging/comedi/drivers/ni_mio_common.c index e3ffb067ead1..753ee0512342 100644 --- a/drivers/staging/comedi/drivers/ni_mio_common.c +++ b/drivers/staging/comedi/drivers/ni_mio_common.c @@ -62,6 +62,7 @@ /* #define DEBUG_STATUS_B */ #include +#include #include "8255.h" #include "mite.h" #include "comedi_fc.h" diff --git a/drivers/staging/comedi/drivers/ni_pcidio.c b/drivers/staging/comedi/drivers/ni_pcidio.c index 52b2eca9e73d..d544698f2414 100644 --- a/drivers/staging/comedi/drivers/ni_pcidio.c +++ b/drivers/staging/comedi/drivers/ni_pcidio.c @@ -70,6 +70,7 @@ comedi_nonfree_firmware tarball available from http://www.comedi.org /* #define DEBUG_FLAGS */ #include +#include #include "../comedidev.h" #include "mite.h" -- cgit v1.2.2 From db8fd2887c80ef7d2c8d98d2b9e626ded5e43444 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 12 Oct 2009 14:59:33 -0700 Subject: Staging: b3dfg: fix sched.h build breakage commit d43c36dc removed sched.h from interrupt.h. This broke the b3dfg driver. This patch fixes this. Signed-off-by: Greg Kroah-Hartman --- drivers/staging/b3dfg/b3dfg.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers') diff --git a/drivers/staging/b3dfg/b3dfg.c b/drivers/staging/b3dfg/b3dfg.c index 94c5d27d24d7..cda26bb493b3 100644 --- a/drivers/staging/b3dfg/b3dfg.c +++ b/drivers/staging/b3dfg/b3dfg.c @@ -36,6 +36,7 @@ #include #include #include +#include static unsigned int b3dfg_nbuf = 2; -- cgit v1.2.2 From 8037cdade734383a8b2ef501e6d39645f8954073 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 12 Oct 2009 14:59:56 -0700 Subject: Staging: poch: fix sched.h build breakage commit d43c36dc removed sched.h from interrupt.h. This broke the poch driver. This patch fixes this. Signed-off-by: Greg Kroah-Hartman --- drivers/staging/poch/poch.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers') diff --git a/drivers/staging/poch/poch.c b/drivers/staging/poch/poch.c index 0d111ddfabb2..2eb8e3d43c4d 100644 --- a/drivers/staging/poch/poch.c +++ b/drivers/staging/poch/poch.c @@ -20,6 +20,7 @@ #include #include #include +#include #include "poch.h" -- cgit v1.2.2 From 6af783c8ba3418a8ffc50f1266d9b1e35a3322db Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 12 Oct 2009 15:00:08 -0700 Subject: Staging: vme: fix sched.h build breakage commit d43c36dc removed sched.h from interrupt.h. This broke the vme drivers. This patch fixes them. Signed-off-by: Greg Kroah-Hartman --- drivers/staging/vme/bridges/vme_ca91cx42.c | 1 + drivers/staging/vme/bridges/vme_tsi148.c | 1 + 2 files changed, 2 insertions(+) (limited to 'drivers') diff --git a/drivers/staging/vme/bridges/vme_ca91cx42.c b/drivers/staging/vme/bridges/vme_ca91cx42.c index 3d2a84c45829..e139eaeaa174 100644 --- a/drivers/staging/vme/bridges/vme_ca91cx42.c +++ b/drivers/staging/vme/bridges/vme_ca91cx42.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/staging/vme/bridges/vme_tsi148.c b/drivers/staging/vme/bridges/vme_tsi148.c index 8960fa9ee7aa..00fe0803c21c 100644 --- a/drivers/staging/vme/bridges/vme_tsi148.c +++ b/drivers/staging/vme/bridges/vme_tsi148.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include -- cgit v1.2.2 From 4439c9353589f4def506b94f8f6344433333a4b9 Mon Sep 17 00:00:00 2001 From: Jeff Mahoney Date: Mon, 12 Oct 2009 17:10:34 -0400 Subject: staging: Complete sched.h removal from interrupt.h Commit d43c36dc removed sched.h from interrupt.h and distributed sched.h to users which needed it. This finishes it up for staging. Signed-off-by: Jeff Mahoney Signed-off-by: Greg Kroah-Hartman --- drivers/staging/hv/osd.c | 1 + drivers/staging/iio/industrialio-core.c | 1 + drivers/staging/sep/sep_driver.c | 1 + 3 files changed, 3 insertions(+) (limited to 'drivers') diff --git a/drivers/staging/hv/osd.c b/drivers/staging/hv/osd.c index 8fe543bd9910..3a4793a0fd05 100644 --- a/drivers/staging/hv/osd.c +++ b/drivers/staging/hv/osd.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/staging/iio/industrialio-core.c b/drivers/staging/iio/industrialio-core.c index 8b67c17237e0..768f44894d08 100644 --- a/drivers/staging/iio/industrialio-core.c +++ b/drivers/staging/iio/industrialio-core.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include "iio.h" #include "trigger_consumer.h" diff --git a/drivers/staging/sep/sep_driver.c b/drivers/staging/sep/sep_driver.c index 87f8a1192762..f890a16096c0 100644 --- a/drivers/staging/sep/sep_driver.c +++ b/drivers/staging/sep/sep_driver.c @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include -- cgit v1.2.2 From b9d2dde0556cde38105033cb39841658d81921d2 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 12 Oct 2009 15:38:17 +0100 Subject: Staging: et131x: Correct WRAP bit handling add_10bit loses the existing wrap value Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- drivers/staging/et131x/et1310_rx.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'drivers') diff --git a/drivers/staging/et131x/et1310_rx.c b/drivers/staging/et131x/et1310_rx.c index 8f2e91fa0a86..10e21db57ac3 100644 --- a/drivers/staging/et131x/et1310_rx.c +++ b/drivers/staging/et131x/et1310_rx.c @@ -1177,12 +1177,20 @@ void et131x_handle_recv_interrupt(struct et131x_adapter *etdev) static inline u32 bump_fbr(u32 *fbr, u32 limit) { - u32 v = *fbr; - add_10bit(&v, 1); - if (v > limit) - v = (*fbr & ~ET_DMA10_MASK) ^ ET_DMA10_WRAP; - *fbr = v; - return v; + u32 v = *fbr; + v++; + /* This works for all cases where limit < 1024. The 1023 case + works because 1023++ is 1024 which means the if condition is not + taken but the carry of the bit into the wrap bit toggles the wrap + value correctly */ + if ((v & ET_DMA10_MASK) > limit) { + v &= ~ET_DMA10_MASK; + v ^= ET_DMA10_WRAP; + } + /* For the 1023 case */ + v &= (ET_DMA10_MASK|ET_DMA10_WRAP); + *fbr = v; + return v; } /** -- cgit v1.2.2 From 317c68c04d53198f38314d29ba28b8fc632eccab Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 12 Oct 2009 15:38:26 +0100 Subject: Staging: et131x: Fix the add_10bit macro Duh.. we need to preserve the wrap bit when adding. Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- drivers/staging/et131x/et1310_address_map.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/staging/et131x/et1310_address_map.h b/drivers/staging/et131x/et1310_address_map.h index 6294d3814e72..2c3d65a622a7 100644 --- a/drivers/staging/et131x/et1310_address_map.h +++ b/drivers/staging/et131x/et1310_address_map.h @@ -223,7 +223,7 @@ typedef union _TXDMA_PR_NUM_DES_t { extern inline void add_10bit(u32 *v, int n) { - *v = INDEX10(*v + n); + *v = INDEX10(*v + n) | (*v & ET_DMA10_WRAP); } /* -- cgit v1.2.2 From 5f267996eb4501b45beecdfe7c9a9af714fc083f Mon Sep 17 00:00:00 2001 From: Jeff Mahoney Date: Mon, 12 Oct 2009 20:28:11 -0400 Subject: staging: more sched.h fixes This patch contains more sched.h additions for drivers that built fine under x86_64 but not i386 for some reason. Signed-off-by: Jeff Mahoney Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rt2860/common/cmm_info.c | 1 + drivers/staging/rt2860/rt_linux.c | 1 + drivers/staging/rt3090/common/cmm_info.c | 1 + drivers/staging/rt3090/rt_linux.c | 1 + 4 files changed, 4 insertions(+) (limited to 'drivers') diff --git a/drivers/staging/rt2860/common/cmm_info.c b/drivers/staging/rt2860/common/cmm_info.c index 9d589c240ed0..019cc4474ce8 100644 --- a/drivers/staging/rt2860/common/cmm_info.c +++ b/drivers/staging/rt2860/common/cmm_info.c @@ -25,6 +25,7 @@ ************************************************************************* */ +#include #include "../rt_config.h" INT Show_SSID_Proc( diff --git a/drivers/staging/rt2860/rt_linux.c b/drivers/staging/rt2860/rt_linux.c index b396a9b570e2..ed27b8545a1b 100644 --- a/drivers/staging/rt2860/rt_linux.c +++ b/drivers/staging/rt2860/rt_linux.c @@ -25,6 +25,7 @@ ************************************************************************* */ +#include #include "rt_config.h" ULONG RTDebugLevel = RT_DEBUG_ERROR; diff --git a/drivers/staging/rt3090/common/cmm_info.c b/drivers/staging/rt3090/common/cmm_info.c index 5be0714666cb..3e51e98b474c 100644 --- a/drivers/staging/rt3090/common/cmm_info.c +++ b/drivers/staging/rt3090/common/cmm_info.c @@ -34,6 +34,7 @@ --------- ---------- ---------------------------------------------- */ +#include #include "../rt_config.h" diff --git a/drivers/staging/rt3090/rt_linux.c b/drivers/staging/rt3090/rt_linux.c index d2241ecdf583..9b94aa6eb904 100644 --- a/drivers/staging/rt3090/rt_linux.c +++ b/drivers/staging/rt3090/rt_linux.c @@ -25,6 +25,7 @@ ************************************************************************* */ +#include #include "rt_config.h" ULONG RTDebugLevel = RT_DEBUG_ERROR; -- cgit v1.2.2 From 0af49167b1e5ba154e90d2c454bf4624ee47df80 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Wed, 14 Oct 2009 02:19:22 +0100 Subject: Staging: rt2860sta: prevent a panic when disabling when associated This fixes a panic which is triggered when the hardware "disappears" from beneath the driver, i.e. when wireless is toggled off via Fn-F2 on various EeePC models. Ref. bug report http://bugzilla.kernel.org/show_bug.cgi?id=13390 panic http://bugzilla.kernel.org/attachment.cgi?id=21928 Signed-off-by: Darren Salt Cc: stable Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rt2860/common/cmm_data_2860.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers') diff --git a/drivers/staging/rt2860/common/cmm_data_2860.c b/drivers/staging/rt2860/common/cmm_data_2860.c index fb1735533b74..857ff450b6c9 100644 --- a/drivers/staging/rt2860/common/cmm_data_2860.c +++ b/drivers/staging/rt2860/common/cmm_data_2860.c @@ -363,6 +363,8 @@ int RtmpPCIMgmtKickOut( ULONG SwIdx = pAd->MgmtRing.TxCpuIdx; pTxD = (PTXD_STRUC) pAd->MgmtRing.Cell[SwIdx].AllocVa; + if (!pTxD) + return 0; pAd->MgmtRing.Cell[SwIdx].pNdisPacket = pPacket; pAd->MgmtRing.Cell[SwIdx].pNextNdisPacket = NULL; -- cgit v1.2.2