[PATCH 09/10] staging: rtl8723au: Remove obfuscating wrapper ODM_ConfigMACWithHeaderFile23a()

2014-07-13 Thread Jes . Sorensen
From: Jes Sorensen 

Signed-off-by: Jes Sorensen 
---
 drivers/staging/rtl8723au/hal/odm_HWConfig.c | 7 ---
 drivers/staging/rtl8723au/hal/rtl8723a_phycfg.c  | 3 +--
 drivers/staging/rtl8723au/include/odm_HWConfig.h | 2 --
 3 files changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/staging/rtl8723au/hal/odm_HWConfig.c 
b/drivers/staging/rtl8723au/hal/odm_HWConfig.c
index b3c711a..26fbf6c 100644
--- a/drivers/staging/rtl8723au/hal/odm_HWConfig.c
+++ b/drivers/staging/rtl8723au/hal/odm_HWConfig.c
@@ -413,10 +413,3 @@ void ODM_PhyStatusQuery23a(struct dm_odm_t *pDM_Odm, 
struct phy_info *pPhyInfo,
 {
ODM_PhyStatusQuery23a_92CSeries(pDM_Odm, pPhyInfo, pPhyStatus, 
pPktinfo);
 }
-
-int ODM_ConfigMACWithHeaderFile23a(struct dm_odm_t *pDM_Odm)
-{
-   if (pDM_Odm->SupportICType == ODM_RTL8723A)
-   ODM_ReadAndConfig_MAC_REG_8723A(pDM_Odm);
-   return _SUCCESS;
-}
diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_phycfg.c 
b/drivers/staging/rtl8723au/hal/rtl8723a_phycfg.c
index 7dc2de0..bd01c10 100644
--- a/drivers/staging/rtl8723au/hal/rtl8723a_phycfg.c
+++ b/drivers/staging/rtl8723au/hal/rtl8723a_phycfg.c
@@ -425,8 +425,7 @@ int PHY_MACConfig8723A(struct rtw_adapter *Adapter)
/*  */
/*  Config MAC */
/*  */
-   if (ODM_ConfigMACWithHeaderFile23a(&pHalData->odmpriv) == _FAIL)
-   rtStatus = _FAIL;
+   ODM_ReadAndConfig_MAC_REG_8723A(&pHalData->odmpriv);
 
/*  2010.07.13 AMPDU aggregation number 9 */
/* rtw_write16(Adapter, REG_MAX_AGGR_NUM, MAX_AGGR_NUM); */
diff --git a/drivers/staging/rtl8723au/include/odm_HWConfig.h 
b/drivers/staging/rtl8723au/include/odm_HWConfig.h
index 2d0fc86..78021a8 100644
--- a/drivers/staging/rtl8723au/include/odm_HWConfig.h
+++ b/drivers/staging/rtl8723au/include/odm_HWConfig.h
@@ -152,6 +152,4 @@ ODM_PhyStatusQuery23a(
struct odm_packet_info *pPktinfo
);
 
-int ODM_ConfigMACWithHeaderFile23a(struct dm_odm_t *pDM_Odm);
-
 #endif
-- 
1.9.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 08/10] staging: rtl8723au: Remove unused ODM_MacStatusQuery23a()

2014-07-13 Thread Jes . Sorensen
From: Jes Sorensen 

Signed-off-by: Jes Sorensen 
---
 drivers/staging/rtl8723au/hal/odm_HWConfig.c | 9 -
 drivers/staging/rtl8723au/include/odm_HWConfig.h | 8 
 2 files changed, 17 deletions(-)

diff --git a/drivers/staging/rtl8723au/hal/odm_HWConfig.c 
b/drivers/staging/rtl8723au/hal/odm_HWConfig.c
index 40fea7d..b3c711a 100644
--- a/drivers/staging/rtl8723au/hal/odm_HWConfig.c
+++ b/drivers/staging/rtl8723au/hal/odm_HWConfig.c
@@ -414,15 +414,6 @@ void ODM_PhyStatusQuery23a(struct dm_odm_t *pDM_Odm, 
struct phy_info *pPhyInfo,
ODM_PhyStatusQuery23a_92CSeries(pDM_Odm, pPhyInfo, pPhyStatus, 
pPktinfo);
 }
 
-/*  For future use. */
-void ODM_MacStatusQuery23a(struct dm_odm_t *pDM_Odm, u8 *pMacStatus, u8 MacID,
-   bool bPacketMatchBSSID, bool bPacketToSelf,
-   bool bPacketBeacon)
-{
-   /*  2011/10/19 Driver team will handle in the future. */
-
-}
-
 int ODM_ConfigMACWithHeaderFile23a(struct dm_odm_t *pDM_Odm)
 {
if (pDM_Odm->SupportICType == ODM_RTL8723A)
diff --git a/drivers/staging/rtl8723au/include/odm_HWConfig.h 
b/drivers/staging/rtl8723au/include/odm_HWConfig.h
index 6fe6f70..2d0fc86 100644
--- a/drivers/staging/rtl8723au/include/odm_HWConfig.h
+++ b/drivers/staging/rtl8723au/include/odm_HWConfig.h
@@ -152,14 +152,6 @@ ODM_PhyStatusQuery23a(
struct odm_packet_info *pPktinfo
);
 
-void ODM_MacStatusQuery23a(struct dm_odm_t *pDM_Odm,
-   u8 *pMacStatus,
-   u8 MacID,
-   bool bPacketMatchBSSID,
-   bool bPacketToSelf,
-   bool bPacketBeacon
-);
-
 int ODM_ConfigMACWithHeaderFile23a(struct dm_odm_t *pDM_Odm);
 
 #endif
-- 
1.9.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 03/10] staging: rtl8723au: Eliminate wrapper ODM_ConfigRFWithHeaderFile23a()

2014-07-13 Thread Jes . Sorensen
From: Jes Sorensen 

Signed-off-by: Jes Sorensen 
---
 drivers/staging/rtl8723au/hal/odm_HWConfig.c   | 15 ---
 drivers/staging/rtl8723au/hal/odm_RegConfig8723A.c |  6 ++
 drivers/staging/rtl8723au/hal/rtl8723a_rf6052.c|  8 ++--
 drivers/staging/rtl8723au/include/odm_HWConfig.h   |  4 
 4 files changed, 4 insertions(+), 29 deletions(-)

diff --git a/drivers/staging/rtl8723au/hal/odm_HWConfig.c 
b/drivers/staging/rtl8723au/hal/odm_HWConfig.c
index 388654d..4fc0b06 100644
--- a/drivers/staging/rtl8723au/hal/odm_HWConfig.c
+++ b/drivers/staging/rtl8723au/hal/odm_HWConfig.c
@@ -423,21 +423,6 @@ void ODM_MacStatusQuery23a(struct dm_odm_t *pDM_Odm, u8 
*pMacStatus, u8 MacID,
 
 }
 
-int ODM_ConfigRFWithHeaderFile23a(struct dm_odm_t *pDM_Odm,
- enum RF_RADIO_PATH Content,
- enum RF_RADIO_PATH eRFPath)
-{
-   ODM_RT_TRACE(pDM_Odm, ODM_COMP_INIT, ODM_DBG_LOUD,
-("===>ODM_ConfigRFWithHeaderFile23a\n"));
-   if (pDM_Odm->SupportICType == ODM_RTL8723A) {
-   if (eRFPath == RF_PATH_A)
-   ODM_ReadAndConfig_RadioA_1T_8723A(pDM_Odm);
-   }
-   ODM_RT_TRACE(pDM_Odm, ODM_COMP_INIT, ODM_DBG_TRACE,
-("ODM_ConfigRFWithHeaderFile23a: Radio No %x\n", eRFPath));
-   return _SUCCESS;
-}
-
 int ODM_ConfigBBWithHeaderFile23a(struct dm_odm_t *pDM_Odm,
  enum odm_bb_config_type ConfigType)
 {
diff --git a/drivers/staging/rtl8723au/hal/odm_RegConfig8723A.c 
b/drivers/staging/rtl8723au/hal/odm_RegConfig8723A.c
index d076e14..8f883d9 100644
--- a/drivers/staging/rtl8723au/hal/odm_RegConfig8723A.c
+++ b/drivers/staging/rtl8723au/hal/odm_RegConfig8723A.c
@@ -54,8 +54,7 @@ void odm_ConfigRF_RadioA_8723A(struct dm_odm_t *pDM_Odm,
odm_ConfigRFReg_8723A(pDM_Odm, Addr, Data, RF_PATH_A,
  Addr|maskforPhySet);
ODM_RT_TRACE(pDM_Odm, ODM_COMP_INIT, ODM_DBG_LOUD,
-("===> ODM_ConfigRFWithHeaderFile23a: [RadioA] %08X 
%08X\n",
-Addr, Data));
+("===> %s: [RadioA] %08X %08X\n", __func__, Addr, Data));
 }
 
 void odm_ConfigRF_RadioB_8723A(struct dm_odm_t *pDM_Odm,
@@ -69,8 +68,7 @@ void odm_ConfigRF_RadioB_8723A(struct dm_odm_t *pDM_Odm,
odm_ConfigRFReg_8723A(pDM_Odm, Addr, Data, RF_PATH_B,
  Addr|maskforPhySet);
ODM_RT_TRACE(pDM_Odm, ODM_COMP_INIT, ODM_DBG_LOUD,
-("===> ODM_ConfigRFWithHeaderFile23a: [RadioB] %08X 
%08X\n",
-Addr, Data));
+("===> %s: [RadioB] %08X %08X\n", __func__, Addr, Data));
 }
 
 void odm_ConfigMAC_8723A(struct dm_odm_t *pDM_Odm,
diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_rf6052.c 
b/drivers/staging/rtl8723au/hal/rtl8723a_rf6052.c
index 6686a29..2dc0886 100644
--- a/drivers/staging/rtl8723au/hal/rtl8723a_rf6052.c
+++ b/drivers/staging/rtl8723au/hal/rtl8723a_rf6052.c
@@ -455,13 +455,9 @@ static int phy_RF6052_Config_ParaFile(struct rtw_adapter 
*Adapter)
/*Initialize RF fom connfiguration file*/
switch (eRFPath) {
case RF_PATH_A:
+   ODM_ReadAndConfig_RadioA_1T_8723A(&pHalData->odmpriv);
+   break;
case RF_PATH_B:
-   if (ODM_ConfigRFWithHeaderFile23a(&pHalData->odmpriv,
- (enum RF_RADIO_PATH)
- eRFPath,
- (enum RF_RADIO_PATH)
- eRFPath) == _FAIL)
-   rtStatus = _FAIL;
break;
}
 
diff --git a/drivers/staging/rtl8723au/include/odm_HWConfig.h 
b/drivers/staging/rtl8723au/include/odm_HWConfig.h
index 6b98e05..f8236ca 100644
--- a/drivers/staging/rtl8723au/include/odm_HWConfig.h
+++ b/drivers/staging/rtl8723au/include/odm_HWConfig.h
@@ -160,10 +160,6 @@ void ODM_MacStatusQuery23a(struct dm_odm_t *pDM_Odm,
bool bPacketBeacon
 );
 
-int ODM_ConfigRFWithHeaderFile23a(struct dm_odm_t *pDM_Odm,
- enum RF_RADIO_PATH Content,
- enum RF_RADIO_PATH eRFPath);
-
 int ODM_ConfigBBWithHeaderFile23a(struct dm_odm_t *pDM_Odm,
  enum odm_bb_config_type ConfigType);
 
-- 
1.9.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 01/10] staging: rtl8723au: Remove horrendous code obfuscation READ_AND_CONFIG*()

2014-07-13 Thread Jes . Sorensen
From: Jes Sorensen 

Signed-off-by: Jes Sorensen 
---
 drivers/staging/rtl8723au/hal/odm_HWConfig.c | 18 --
 1 file changed, 4 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/rtl8723au/hal/odm_HWConfig.c 
b/drivers/staging/rtl8723au/hal/odm_HWConfig.c
index 82b1b83..388654d 100644
--- a/drivers/staging/rtl8723au/hal/odm_HWConfig.c
+++ b/drivers/staging/rtl8723au/hal/odm_HWConfig.c
@@ -19,11 +19,6 @@
 
 #include "odm_precomp.h"
 
-#define READ_AND_CONFIG READ_AND_CONFIG_MP
-
-#define READ_AND_CONFIG_MP(ic, txt) (ODM_ReadAndConfig##txt##ic(pDM_Odm))
-#define READ_AND_CONFIG_TC(ic, txt) (ODM_ReadAndConfig_TC##txt##ic(pDM_Odm))
-
 static u8 odm_QueryRxPwrPercentage(s8 AntPower)
 {
if ((AntPower <= -100) || (AntPower >= 20))
@@ -436,12 +431,7 @@ int ODM_ConfigRFWithHeaderFile23a(struct dm_odm_t *pDM_Odm,
 ("===>ODM_ConfigRFWithHeaderFile23a\n"));
if (pDM_Odm->SupportICType == ODM_RTL8723A) {
if (eRFPath == RF_PATH_A)
-   READ_AND_CONFIG_MP(8723A, _RadioA_1T_);
-
-   ODM_RT_TRACE(pDM_Odm, ODM_COMP_INIT, ODM_DBG_LOUD,
-(" ===> ODM_ConfigRFWithHeaderFile23a() 
Radio_A:Rtl8723RadioA_1TArray\n"));
-   ODM_RT_TRACE(pDM_Odm, ODM_COMP_INIT, ODM_DBG_LOUD,
-(" ===> ODM_ConfigRFWithHeaderFile23a() 
Radio_B:Rtl8723RadioB_1TArray\n"));
+   ODM_ReadAndConfig_RadioA_1T_8723A(pDM_Odm);
}
ODM_RT_TRACE(pDM_Odm, ODM_COMP_INIT, ODM_DBG_TRACE,
 ("ODM_ConfigRFWithHeaderFile23a: Radio No %x\n", eRFPath));
@@ -453,9 +443,9 @@ int ODM_ConfigBBWithHeaderFile23a(struct dm_odm_t *pDM_Odm,
 {
if (pDM_Odm->SupportICType == ODM_RTL8723A) {
if (ConfigType == CONFIG_BB_PHY_REG)
-   READ_AND_CONFIG_MP(8723A, _PHY_REG_1T_);
+   ODM_ReadAndConfig_PHY_REG_1T_8723A(pDM_Odm);
else if (ConfigType == CONFIG_BB_AGC_TAB)
-   READ_AND_CONFIG_MP(8723A, _AGC_TAB_1T_);
+   ODM_ReadAndConfig_AGC_TAB_1T_8723A(pDM_Odm);
ODM_RT_TRACE(pDM_Odm, ODM_COMP_INIT, ODM_DBG_LOUD,
 (" ===> phy_ConfigBBWithHeaderFile() 
phy:Rtl8723AGCTAB_1TArray\n"));
ODM_RT_TRACE(pDM_Odm, ODM_COMP_INIT, ODM_DBG_LOUD,
@@ -467,6 +457,6 @@ int ODM_ConfigBBWithHeaderFile23a(struct dm_odm_t *pDM_Odm,
 int ODM_ConfigMACWithHeaderFile23a(struct dm_odm_t *pDM_Odm)
 {
if (pDM_Odm->SupportICType == ODM_RTL8723A)
-   READ_AND_CONFIG_MP(8723A, _MAC_REG_);
+   ODM_ReadAndConfig_MAC_REG_8723A(pDM_Odm);
return _SUCCESS;
 }
-- 
1.9.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 05/10] staging: rtl8723au: Remove pointless wrappers for calling odm_ConfigRFReg_8723A()

2014-07-13 Thread Jes . Sorensen
From: Jes Sorensen 

Signed-off-by: Jes Sorensen 
---
 drivers/staging/rtl8723au/hal/HalHWImg8723A_RF.c   |  5 +++--
 drivers/staging/rtl8723au/hal/odm_RegConfig8723A.c | 14 --
 drivers/staging/rtl8723au/include/odm_RegConfig8723A.h |  4 
 3 files changed, 3 insertions(+), 20 deletions(-)

diff --git a/drivers/staging/rtl8723au/hal/HalHWImg8723A_RF.c 
b/drivers/staging/rtl8723au/hal/HalHWImg8723A_RF.c
index 0f2ae05..00480f5 100644
--- a/drivers/staging/rtl8723au/hal/HalHWImg8723A_RF.c
+++ b/drivers/staging/rtl8723au/hal/HalHWImg8723A_RF.c
@@ -230,7 +230,7 @@ void ODM_ReadAndConfig_RadioA_1T_8723A(struct dm_odm_t 
*pDM_Odm)
 
/*  This (offset, data) pair meets the condition. */
if (v1 < 0xCDCDCDCD) {
-   odm_ConfigRF_RadioA_8723A(pDM_Odm, v1, v2);
+   odm_ConfigRFReg_8723A(pDM_Odm, v1, v2, RF_PATH_A, v1);
continue;
} else {
if (!CheckCondition(Array[i], hex)) {
@@ -247,7 +247,8 @@ void ODM_ReadAndConfig_RadioA_1T_8723A(struct dm_odm_t 
*pDM_Odm)
while (v2 != 0xDEAD &&
   v2 != 0xCDEF &&
   v2 != 0xCDCD && i < ArrayLen - 2) {
-   odm_ConfigRF_RadioA_8723A(pDM_Odm, v1, 
v2);
+   odm_ConfigRFReg_8723A(pDM_Odm, v1, v2,
+ RF_PATH_A, v1);
READ_NEXT_PAIR(v1, v2, i);
}
 
diff --git a/drivers/staging/rtl8723au/hal/odm_RegConfig8723A.c 
b/drivers/staging/rtl8723au/hal/odm_RegConfig8723A.c
index 70b7168..bd86b6c 100644
--- a/drivers/staging/rtl8723au/hal/odm_RegConfig8723A.c
+++ b/drivers/staging/rtl8723au/hal/odm_RegConfig8723A.c
@@ -43,20 +43,6 @@ odm_ConfigRFReg_8723A(
}
 }
 
-void odm_ConfigRF_RadioA_8723A(struct dm_odm_t *pDM_Odm, u32 Addr, u32 Data)
-{
-   odm_ConfigRFReg_8723A(pDM_Odm, Addr, Data, RF_PATH_A, Addr);
-   ODM_RT_TRACE(pDM_Odm, ODM_COMP_INIT, ODM_DBG_LOUD,
-("===> %s: [RadioA] %08X %08X\n", __func__, Addr, Data));
-}
-
-void odm_ConfigRF_RadioB_8723A(struct dm_odm_t *pDM_Odm, u32 Addr, u32 Data)
-{
-   odm_ConfigRFReg_8723A(pDM_Odm, Addr, Data, RF_PATH_B, Addr);
-   ODM_RT_TRACE(pDM_Odm, ODM_COMP_INIT, ODM_DBG_LOUD,
-("===> %s: [RadioB] %08X %08X\n", __func__, Addr, Data));
-}
-
 void odm_ConfigMAC_8723A(struct dm_odm_t *pDM_Odm,
u32 Addr,
u8  Data
diff --git a/drivers/staging/rtl8723au/include/odm_RegConfig8723A.h 
b/drivers/staging/rtl8723au/include/odm_RegConfig8723A.h
index 4ea579b..4117830 100644
--- a/drivers/staging/rtl8723au/include/odm_RegConfig8723A.h
+++ b/drivers/staging/rtl8723au/include/odm_RegConfig8723A.h
@@ -18,10 +18,6 @@
 void odm_ConfigRFReg_8723A(struct dm_odm_t *pDM_Odm, u32 Addr, u32 Data,
   enum RF_RADIO_PATH RF_PATH, u32 RegAddr);
 
-void odm_ConfigRF_RadioA_8723A(struct dm_odm_t *pDM_Odm, u32 Addr, u32 Data);
-
-void odm_ConfigRF_RadioB_8723A(struct dm_odm_t *pDM_Odm, u32 Addr, u32 Data);
-
 void odm_ConfigMAC_8723A(struct dm_odm_t *pDM_Odm, u32 Addr, u8 Data);
 
 void odm_ConfigBB_AGC_8723A(struct dm_odm_t *pDM_Odm, u32 Addr,
-- 
1.9.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 10/10] staging: rtl8723au: Remove unncessary wrapper PHY_RFConfig8723A()

2014-07-13 Thread Jes . Sorensen
From: Jes Sorensen 

Signed-off-by: Jes Sorensen 
---
 drivers/staging/rtl8723au/hal/rtl8723a_phycfg.c| 12 
 drivers/staging/rtl8723au/hal/usb_halinit.c|  4 ++--
 drivers/staging/rtl8723au/include/Hal8723APhyCfg.h |  1 -
 3 files changed, 2 insertions(+), 15 deletions(-)

diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_phycfg.c 
b/drivers/staging/rtl8723au/hal/rtl8723a_phycfg.c
index bd01c10..3d4d7ec 100644
--- a/drivers/staging/rtl8723au/hal/rtl8723a_phycfg.c
+++ b/drivers/staging/rtl8723au/hal/rtl8723a_phycfg.c
@@ -839,18 +839,6 @@ PHY_BBConfig8723A(struct rtw_adapter *Adapter)
return rtStatus;
 }
 
-int
-PHY_RFConfig8723A(struct rtw_adapter *Adapter)
-{
-   int rtStatus = _SUCCESS;
-
-   /*  */
-   /*  RF config */
-   /*  */
-   rtStatus = PHY_RF6052_Config8723A(Adapter);
-   return rtStatus;
-}
-
 static void getTxPowerIndex(struct rtw_adapter *Adapter,
u8 channel, u8 *cckPowerLevel,  u8 *ofdmPowerLevel)
 {
diff --git a/drivers/staging/rtl8723au/hal/usb_halinit.c 
b/drivers/staging/rtl8723au/hal/usb_halinit.c
index d3d7289..8a7e644 100644
--- a/drivers/staging/rtl8723au/hal/usb_halinit.c
+++ b/drivers/staging/rtl8723au/hal/usb_halinit.c
@@ -718,9 +718,9 @@ static int rtl8723au_hal_init(struct rtw_adapter *Adapter)
/*  Add for tx power by rate fine tune. We need to call the function 
after BB config. */
/*  Because the tx power by rate table is inited in BB config. */
 
-   status = PHY_RFConfig8723A(Adapter);
+   status = PHY_RF6052_Config8723A(Adapter);
if (status == _FAIL) {
-   DBG_8723A("PHY_RFConfig8723A fault !!\n");
+   DBG_8723A("PHY_RF6052_Config8723A failed!!\n");
goto exit;
}
 
diff --git a/drivers/staging/rtl8723au/include/Hal8723APhyCfg.h 
b/drivers/staging/rtl8723au/include/Hal8723APhyCfg.h
index 299598b..688f204 100644
--- a/drivers/staging/rtl8723au/include/Hal8723APhyCfg.h
+++ b/drivers/staging/rtl8723au/include/Hal8723APhyCfg.h
@@ -224,7 +224,6 @@ SetAntennaConfig92C(struct rtw_adapter *Adapter, u8 
DefaultAnt);
 
 /* MAC/BB/RF HAL config */
 int PHY_BBConfig8723A(struct rtw_adapter *Adapter);
-int PHY_RFConfig8723A(struct rtw_adapter *Adapter);
 s32 PHY_MACConfig8723A(struct rtw_adapter *padapter);
 
 #endif
-- 
1.9.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 04/10] staging: rtl8723au: Remove zero value calculation added to address

2014-07-13 Thread Jes . Sorensen
From: Jes Sorensen 

Signed-off-by: Jes Sorensen 
---
 drivers/staging/rtl8723au/hal/odm_RegConfig8723A.c | 22 --
 1 file changed, 4 insertions(+), 18 deletions(-)

diff --git a/drivers/staging/rtl8723au/hal/odm_RegConfig8723A.c 
b/drivers/staging/rtl8723au/hal/odm_RegConfig8723A.c
index 8f883d9..70b7168 100644
--- a/drivers/staging/rtl8723au/hal/odm_RegConfig8723A.c
+++ b/drivers/staging/rtl8723au/hal/odm_RegConfig8723A.c
@@ -43,30 +43,16 @@ odm_ConfigRFReg_8723A(
}
 }
 
-void odm_ConfigRF_RadioA_8723A(struct dm_odm_t *pDM_Odm,
-   u32 Addr,
-   u32 Data
-   )
+void odm_ConfigRF_RadioA_8723A(struct dm_odm_t *pDM_Odm, u32 Addr, u32 Data)
 {
-   u32  content = 0x1000; /*  RF_Content: radioa_txt */
-   u32 maskforPhySet = (u32)(content&0xE000);
-
-   odm_ConfigRFReg_8723A(pDM_Odm, Addr, Data, RF_PATH_A,
- Addr|maskforPhySet);
+   odm_ConfigRFReg_8723A(pDM_Odm, Addr, Data, RF_PATH_A, Addr);
ODM_RT_TRACE(pDM_Odm, ODM_COMP_INIT, ODM_DBG_LOUD,
 ("===> %s: [RadioA] %08X %08X\n", __func__, Addr, Data));
 }
 
-void odm_ConfigRF_RadioB_8723A(struct dm_odm_t *pDM_Odm,
-   u32 Addr,
-   u32 Data
-   )
+void odm_ConfigRF_RadioB_8723A(struct dm_odm_t *pDM_Odm, u32 Addr, u32 Data)
 {
-   u32  content = 0x1001; /*  RF_Content: radiob_txt */
-   u32 maskforPhySet = (u32)(content&0xE000);
-
-   odm_ConfigRFReg_8723A(pDM_Odm, Addr, Data, RF_PATH_B,
- Addr|maskforPhySet);
+   odm_ConfigRFReg_8723A(pDM_Odm, Addr, Data, RF_PATH_B, Addr);
ODM_RT_TRACE(pDM_Odm, ODM_COMP_INIT, ODM_DBG_LOUD,
 ("===> %s: [RadioB] %08X %08X\n", __func__, Addr, Data));
 }
-- 
1.9.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 02/10] staging: rtl8723au: Call to ODM_ConfigRFWithHeaderFile23a path is identical for RF_PATH_[AB]

2014-07-13 Thread Jes . Sorensen
From: Jes Sorensen 

Signed-off-by: Jes Sorensen 
---
 drivers/staging/rtl8723au/hal/rtl8723a_rf6052.c | 7 ---
 1 file changed, 7 deletions(-)

diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_rf6052.c 
b/drivers/staging/rtl8723au/hal/rtl8723a_rf6052.c
index c30bd23..6686a29 100644
--- a/drivers/staging/rtl8723au/hal/rtl8723a_rf6052.c
+++ b/drivers/staging/rtl8723au/hal/rtl8723a_rf6052.c
@@ -455,13 +455,6 @@ static int phy_RF6052_Config_ParaFile(struct rtw_adapter 
*Adapter)
/*Initialize RF fom connfiguration file*/
switch (eRFPath) {
case RF_PATH_A:
-   if (ODM_ConfigRFWithHeaderFile23a(&pHalData->odmpriv,
- (enum RF_RADIO_PATH)
- eRFPath,
- (enum RF_RADIO_PATH)
- eRFPath) == _FAIL)
-   rtStatus = _FAIL;
-   break;
case RF_PATH_B:
if (ODM_ConfigRFWithHeaderFile23a(&pHalData->odmpriv,
  (enum RF_RADIO_PATH)
-- 
1.9.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 06/10] staging: rtl8723au: Remove unused ODM_ReadAndConfig_PHY_REG_PG_8723A() and related code+data

2014-07-13 Thread Jes . Sorensen
From: Jes Sorensen 

Signed-off-by: Jes Sorensen 
---
 drivers/staging/rtl8723au/hal/HalHWImg8723A_BB.c   | 160 -
 drivers/staging/rtl8723au/hal/odm_RegConfig8723A.c |  28 
 .../staging/rtl8723au/include/HalHWImg8723A_BB.h   |   6 -
 .../staging/rtl8723au/include/odm_RegConfig8723A.h |   2 -
 4 files changed, 196 deletions(-)

diff --git a/drivers/staging/rtl8723au/hal/HalHWImg8723A_BB.c 
b/drivers/staging/rtl8723au/hal/HalHWImg8723A_BB.c
index 294e6a6..9d4f6be 100644
--- a/drivers/staging/rtl8723au/hal/HalHWImg8723A_BB.c
+++ b/drivers/staging/rtl8723au/hal/HalHWImg8723A_BB.c
@@ -564,163 +564,3 @@ void ODM_ReadAndConfig_PHY_REG_MP_8723A(struct dm_odm_t 
*pDM_Odm)
}
}
 }
-
-/**
-*   PHY_REG_PG.TXT
-**/
-
-static u32 Array_PHY_REG_PG_8723A[] = {
-   0xE00, 0x, 0x0A0C0C0C,
-   0xE04, 0x, 0x02040608,
-   0xE08, 0xFF00, 0x,
-   0x86C, 0xFF00, 0x,
-   0xE10, 0x, 0x0A0C0D0E,
-   0xE14, 0x, 0x02040608,
-   0xE18, 0x, 0x0A0C0D0E,
-   0xE1C, 0x, 0x02040608,
-   0x830, 0x, 0x0A0C0C0C,
-   0x834, 0x, 0x02040608,
-   0x838, 0xFF00, 0x,
-   0x86C, 0x00FF, 0x,
-   0x83C, 0x, 0x0A0C0D0E,
-   0x848, 0x, 0x02040608,
-   0x84C, 0x, 0x0A0C0D0E,
-   0x868, 0x, 0x02040608,
-   0xE00, 0x, 0x,
-   0xE04, 0x, 0x,
-   0xE08, 0xFF00, 0x,
-   0x86C, 0xFF00, 0x,
-   0xE10, 0x, 0x,
-   0xE14, 0x, 0x,
-   0xE18, 0x, 0x,
-   0xE1C, 0x, 0x,
-   0x830, 0x, 0x,
-   0x834, 0x, 0x,
-   0x838, 0xFF00, 0x,
-   0x86C, 0x00FF, 0x,
-   0x83C, 0x, 0x,
-   0x848, 0x, 0x,
-   0x84C, 0x, 0x,
-   0x868, 0x, 0x,
-   0xE00, 0x, 0x04040404,
-   0xE04, 0x, 0x00020204,
-   0xE08, 0xFF00, 0x,
-   0x86C, 0xFF00, 0x,
-   0xE10, 0x, 0x06060606,
-   0xE14, 0x, 0x00020406,
-   0xE18, 0x, 0x,
-   0xE1C, 0x, 0x,
-   0x830, 0x, 0x04040404,
-   0x834, 0x, 0x00020204,
-   0x838, 0xFF00, 0x,
-   0x86C, 0x00FF, 0x,
-   0x83C, 0x, 0x06060606,
-   0x848, 0x, 0x00020406,
-   0x84C, 0x, 0x,
-   0x868, 0x, 0x,
-   0xE00, 0x, 0x,
-   0xE04, 0x, 0x,
-   0xE08, 0xFF00, 0x,
-   0x86C, 0xFF00, 0x,
-   0xE10, 0x, 0x,
-   0xE14, 0x, 0x,
-   0xE18, 0x, 0x,
-   0xE1C, 0x, 0x,
-   0x830, 0x, 0x,
-   0x834, 0x, 0x,
-   0x838, 0xFF00, 0x,
-   0x86C, 0x00FF, 0x,
-   0x83C, 0x, 0x,
-   0x848, 0x, 0x,
-   0x84C, 0x, 0x,
-   0x868, 0x, 0x,
-   0xE00, 0x, 0x,
-   0xE04, 0x, 0x,
-   0xE08, 0xFF00, 0x,
-   0x86C, 0xFF00, 0x,
-   0xE10, 0x, 0x,
-   0xE14, 0x, 0x,
-   0xE18, 0x, 0x,
-   0xE1C, 0x, 0x,
-   0x830, 0x, 0x,
-   0x834, 0x, 0x,
-   0x838, 0xFF00, 0x,
-   0x86C, 0x00FF, 0x,
-   0x83C, 0x, 0x,
-   0x848, 0x, 0x,
-   0x84C, 0x, 0x,
-   0x868, 0x, 0x,
-   0xE00, 0x, 0x04040404,
-   0xE04, 0x, 0x00020204,
-   0xE08, 0xFF00, 0x,
-   0x86C, 0xFF00, 0x,
-   0xE10, 0x, 0x,
-   0xE14, 0x, 0x,
-   0xE18, 0x, 0x,
-   0xE1C, 0x, 0x,
-   0x830, 0x, 0x04040404,
-   0x834, 0x, 0x00020204,
-   0x838, 0xFF00, 0x,
-   0x86C, 0x00FF, 0x,
-   0x83C, 0x, 0x,
-   0x848, 0x, 0x,
-   0x84C, 0x, 0x,
-   0x868, 0x, 0x,
-   0xE00, 0x, 0x,
-   0xE04, 0x, 0x,
-   0xE08, 0xFF00, 0x,
-   0x86C, 0xFF00, 0x,
-   0xE10, 0x, 0x,
-   0xE14, 0x, 0x,
-   0xE18, 0x, 0x,
-   

[PATCH 00/10] staging-next: rtl8723au: Reducing code obfuscation

2014-07-13 Thread Jes . Sorensen
From: Jes Sorensen 

Greg,

Please find attached another smaller set of changes for the rtl8723au
driver. IT's mainly removing code obfuscation in the hal layer.

Cheers,
Jes

Jes Sorensen (10):
  staging: rtl8723au: Remove horrendous code obfuscation
READ_AND_CONFIG*()
  staging: rtl8723au: Call to ODM_ConfigRFWithHeaderFile23a path is
identical for RF_PATH_[AB]
  staging: rtl8723au: Eliminate wrapper ODM_ConfigRFWithHeaderFile23a()
  staging: rtl8723au: Remove zero value calculation added to address
  staging: rtl8723au: Remove pointless wrappers for calling
odm_ConfigRFReg_8723A()
  staging: rtl8723au: Remove unused 
ODM_ReadAndConfig_PHY_REG_PG_8723A() and related code+data
  staging: rtl8723au: Remove ugly wrapper
ODM_ConfigBBWithHeaderFile23a()
  staging: rtl8723au: Remove unused ODM_MacStatusQuery23a()
  staging: rtl8723au: Remove obfuscating wrapper
ODM_ConfigMACWithHeaderFile23a()
  staging: rtl8723au: Remove unncessary wrapper PHY_RFConfig8723A()

 drivers/staging/rtl8723au/hal/HalHWImg8723A_BB.c   | 160 -
 drivers/staging/rtl8723au/hal/HalHWImg8723A_RF.c   |   5 +-
 drivers/staging/rtl8723au/hal/odm_HWConfig.c   |  57 
 drivers/staging/rtl8723au/hal/odm_RegConfig8723A.c |  58 
 drivers/staging/rtl8723au/hal/rtl8723a_phycfg.c|  25 +---
 drivers/staging/rtl8723au/hal/rtl8723a_rf6052.c|  13 +-
 drivers/staging/rtl8723au/hal/usb_halinit.c|   4 +-
 drivers/staging/rtl8723au/include/Hal8723APhyCfg.h |   1 -
 .../staging/rtl8723au/include/HalHWImg8723A_BB.h   |   6 -
 drivers/staging/rtl8723au/include/odm.h|   8 --
 drivers/staging/rtl8723au/include/odm_HWConfig.h   |  17 ---
 .../staging/rtl8723au/include/odm_RegConfig8723A.h |   6 -
 12 files changed, 9 insertions(+), 351 deletions(-)

-- 
1.9.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 07/10] staging: rtl8723au: Remove ugly wrapper ODM_ConfigBBWithHeaderFile23a()

2014-07-13 Thread Jes . Sorensen
From: Jes Sorensen 

Signed-off-by: Jes Sorensen 
---
 drivers/staging/rtl8723au/hal/odm_HWConfig.c | 16 
 drivers/staging/rtl8723au/hal/rtl8723a_phycfg.c  | 10 ++
 drivers/staging/rtl8723au/include/odm.h  |  8 
 drivers/staging/rtl8723au/include/odm_HWConfig.h |  3 ---
 4 files changed, 2 insertions(+), 35 deletions(-)

diff --git a/drivers/staging/rtl8723au/hal/odm_HWConfig.c 
b/drivers/staging/rtl8723au/hal/odm_HWConfig.c
index 4fc0b06..40fea7d 100644
--- a/drivers/staging/rtl8723au/hal/odm_HWConfig.c
+++ b/drivers/staging/rtl8723au/hal/odm_HWConfig.c
@@ -423,22 +423,6 @@ void ODM_MacStatusQuery23a(struct dm_odm_t *pDM_Odm, u8 
*pMacStatus, u8 MacID,
 
 }
 
-int ODM_ConfigBBWithHeaderFile23a(struct dm_odm_t *pDM_Odm,
- enum odm_bb_config_type ConfigType)
-{
-   if (pDM_Odm->SupportICType == ODM_RTL8723A) {
-   if (ConfigType == CONFIG_BB_PHY_REG)
-   ODM_ReadAndConfig_PHY_REG_1T_8723A(pDM_Odm);
-   else if (ConfigType == CONFIG_BB_AGC_TAB)
-   ODM_ReadAndConfig_AGC_TAB_1T_8723A(pDM_Odm);
-   ODM_RT_TRACE(pDM_Odm, ODM_COMP_INIT, ODM_DBG_LOUD,
-(" ===> phy_ConfigBBWithHeaderFile() 
phy:Rtl8723AGCTAB_1TArray\n"));
-   ODM_RT_TRACE(pDM_Odm, ODM_COMP_INIT, ODM_DBG_LOUD,
-(" ===> phy_ConfigBBWithHeaderFile() 
agc:Rtl8723PHY_REG_1TArray\n"));
-   }
-   return _SUCCESS;
-}
-
 int ODM_ConfigMACWithHeaderFile23a(struct dm_odm_t *pDM_Odm)
 {
if (pDM_Odm->SupportICType == ODM_RTL8723A)
diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_phycfg.c 
b/drivers/staging/rtl8723au/hal/rtl8723a_phycfg.c
index 8a6ba63..7dc2de0 100644
--- a/drivers/staging/rtl8723au/hal/rtl8723a_phycfg.c
+++ b/drivers/staging/rtl8723au/hal/rtl8723a_phycfg.c
@@ -753,11 +753,7 @@ phy_BB8723a_Config_ParaFile(struct rtw_adapter *Adapter)
/*  1. Read PHY_REG.TXT BB INIT!! */
/*  We will seperate as 88C / 92C according to chip version */
/*  */
-   if (ODM_ConfigBBWithHeaderFile23a(&pHalData->odmpriv,
- CONFIG_BB_PHY_REG) == _FAIL)
-   rtStatus = _FAIL;
-   if (rtStatus != _SUCCESS)
-   goto phy_BB8190_Config_ParaFile_Fail;
+   ODM_ReadAndConfig_PHY_REG_1T_8723A(&pHalData->odmpriv);
 
/*  */
/*  20100318 Joseph: Config 2T2R to 1T2R if necessary. */
@@ -784,9 +780,7 @@ phy_BB8723a_Config_ParaFile(struct rtw_adapter *Adapter)
/*  */
/*  3. BB AGC table Initialization */
/*  */
-   if (ODM_ConfigBBWithHeaderFile23a(&pHalData->odmpriv,
- CONFIG_BB_AGC_TAB) == _FAIL)
-   rtStatus = _FAIL;
+   ODM_ReadAndConfig_AGC_TAB_1T_8723A(&pHalData->odmpriv);
 
 phy_BB8190_Config_ParaFile_Fail:
 
diff --git a/drivers/staging/rtl8723au/include/odm.h 
b/drivers/staging/rtl8723au/include/odm.h
index 183d8ff..08c6f72 100644
--- a/drivers/staging/rtl8723au/include/odm.h
+++ b/drivers/staging/rtl8723au/include/odm.h
@@ -855,14 +855,6 @@ enum odm_rf_content {
odm_radiod_txt = 0x1003
 };
 
-enum odm_bb_config_type {
-CONFIG_BB_PHY_REG,
-CONFIG_BB_AGC_TAB,
-CONFIG_BB_AGC_TAB_2G,
-CONFIG_BB_AGC_TAB_5G,
-CONFIG_BB_PHY_REG_PG,
-};
-
 /*  Status code */
 enum rt_status {
RT_STATUS_SUCCESS,
diff --git a/drivers/staging/rtl8723au/include/odm_HWConfig.h 
b/drivers/staging/rtl8723au/include/odm_HWConfig.h
index f8236ca..6fe6f70 100644
--- a/drivers/staging/rtl8723au/include/odm_HWConfig.h
+++ b/drivers/staging/rtl8723au/include/odm_HWConfig.h
@@ -160,9 +160,6 @@ void ODM_MacStatusQuery23a(struct dm_odm_t *pDM_Odm,
bool bPacketBeacon
 );
 
-int ODM_ConfigBBWithHeaderFile23a(struct dm_odm_t *pDM_Odm,
- enum odm_bb_config_type ConfigType);
-
 int ODM_ConfigMACWithHeaderFile23a(struct dm_odm_t *pDM_Odm);
 
 #endif
-- 
1.9.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: iio: adc: ad7192: fix coding style

2014-07-13 Thread Jonathan Cameron

On 12/07/14 20:16, Marcus Folkesson wrote:

Line over 80 characters. This is for Eudyptula Challenge.

Signed-off-by: Marcus Folkesson 

Sorry Marcus,

There is a level of trivial cleanup below which it's not worth
taking patches. The 80 character limit is not a hard and fast
rule. Here, if this had been picked up during review of the original
patch, or was fixed as a part of a more substantial series, I'd
have no objection taking it.  On it's own it's just too small.

Jonathan


---
  drivers/staging/iio/adc/ad7192.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/iio/adc/ad7192.c b/drivers/staging/iio/adc/ad7192.c
index 83bb44b..c25c9ab 100644
--- a/drivers/staging/iio/adc/ad7192.c
+++ b/drivers/staging/iio/adc/ad7192.c
@@ -223,7 +223,8 @@ static int ad7192_setup(struct ad7192_state *st,
id &= AD7192_ID_MASK;

if (id != st->devid)
-   dev_warn(&st->sd.spi->dev, "device ID query failed (0x%X)\n", 
id);
+   dev_warn(&st->sd.spi->dev,
+   "device ID query failed (0x%X)\n", id);

switch (pdata->clock_source_sel) {
case AD7192_CLK_EXT_MCLK1_2:



___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] drivers: Let several drivers depends on HAS_IOMEM for 'devm_ioremap_resource'

2014-07-13 Thread Lennox Wu
As I said before, some configurations don't make sense.
I don't think all of the patches are necessary.

Best,
Lennox

2014-07-13 11:45 GMT+08:00 Marek Vasut :
> On Sunday, July 13, 2014 at 05:07:10 AM, Chen Gang wrote:
>> Several drivers need 'devm_ioremap_resource' which need HAS_IOMEM enabled.
>> So let them depend on HAS_IOMEM.
>>
>> The related error (with allmodconfig under score):
>>
>> MODPOST 1365 modules
>>   ERROR: "devm_ioremap_resource" [drivers/watchdog/tegra_wdt.ko] undefined!
>>   ERROR: "devm_ioremap_resource" [drivers/watchdog/of_xilinx_wdt.ko]
>> undefined! ERROR: "devm_ioremap_resource"
>> [drivers/staging/iio/adc/mxs-lradc.ko] undefined! ERROR:
>> "devm_ioremap_resource" [drivers/pwm/pwm-clps711x.ko] undefined! ERROR:
>> "devm_ioremap_resource" [drivers/input/serio/olpc_apsp.ko] undefined!
>> ERROR: "devm_ioremap_resource" [drivers/input/serio/arc_ps2.ko] undefined!
>
> This stuff should go through different trees, so I'd suggest to split this 
> into
> multiple patches. Thanks for catching this stuff !
>
> Best regards,
> Marek Vasut
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] drivers: Let several drivers depends on HAS_IOMEM for 'devm_ioremap_resource'

2014-07-13 Thread Richard Weinberger
Am 13.07.2014 11:27, schrieb Lennox Wu:
> As I said before, some configurations don't make sense.

If such a configuration can be achieved using allmod/yesconfig it has to be 
fixed.
Chen's fixes seem reasonable as not all architectures support iomem.

Thanks,
//richard
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH V3 0/7] Drivers: scsi: storvsc: Bug fixes and improvements

2014-07-13 Thread Christoph Hellwig
The series looks good to me, although I'll probably put the commit
message for the timer patch into the comment for the eh_timed_out
handler.

Can I get another set of reviews?  I've seen Olaf has put them into the
SLES tree, so I'd expect he's done a review already?

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] drivers: Let several drivers depends on HAS_IOMEM for 'devm_ioremap_resource'

2014-07-13 Thread Chen Gang
On 07/13/2014 05:45 PM, Richard Weinberger wrote:
> Am 13.07.2014 11:27, schrieb Lennox Wu:
>> As I said before, some configurations don't make sense.
> 
> If such a configuration can be achieved using allmod/yesconfig it has to be 
> fixed.
> Chen's fixes seem reasonable as not all architectures support iomem.
>

OK, thanks. And I shall split them into several patches, although we can
understand that score may not need them.


Thanks.
-- 
Chen Gang

Open share and attitude like air water and life which God blessed
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


PLEASE HELP THEM WITH THE MONEY

2014-07-13 Thread Mrs.Isabella Caromel
Good day
Private Message to you,

Greetings to you in the name of our heavenly God. This mail might come to you 
as a surprise and the temptation to ignore it could come into your mind, but 
please, consider it as a Divine Wish of God and accept it with a deep sense of 
humility. My Name is Isabella Caromel; I escaped tsunami disaster some time ago 
which affected my spinal cord, my ear drum and claim my entire family, my 
husband and two sons. It might shock you to know, I was eventually disabled as 
a result of catastrophe that struck me. Perhaps I’m now on a wheelchair after 
all form of treatment and to no avail. Because of my present condition I 
finally decided to give a better life to the poor in the society, since it has 
determine medically that I have only about a few months to live, according to 
medical experts.

It is my legacy to build charity organizations for the less privilege since my 
health has finally confirmed deteriorated. In my present condition this project 
cannot be executed by me alone due to my ailment, so therefore I need your 
candid voluntarily support to execute the project to make this dream a reality. 
I have decided to invest my $10.6M USD to help the less privileged, therefore 
you are chosen from my heart to help receive the funds from where it was kept 
secretly to build charity organizations for the less privilege to have some 
better life.

Please I will appreciate if you can indicate interest to help actualize this 
last dream. Therefore also include your contact telephone/fax numbers, 
including personal details to be forward to the deposited firm for onward 
communication on how to transfer the funds to you. I will also provide you the 
legal documents that will enable you claim the funds, and if you are willing 
and ready to assist, please e-mail me at mrs.isabellacaro...@yahoo.com.hk 
without delay as I need to hear from you soon.

Remain blessed,
Mrs. Isabella Caromel
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] drivers/staging/iio/adc/Kconfig: Let MXS_LRADC depend on HAS_IOMEM

2014-07-13 Thread Chen Gang
MXS_LRADC need HAS_IOMEM, so let it depend on HAS_IOMEM

The related error (with allmodconfig under score):

MODPOST 1365 modules
  ERROR: "devm_ioremap_resource" [drivers/staging/iio/adc/mxs-lradc.ko] 
undefined!


Signed-off-by: Chen Gang 
---
 drivers/staging/iio/adc/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/iio/adc/Kconfig b/drivers/staging/iio/adc/Kconfig
index b87e382..4e927d2 100644
--- a/drivers/staging/iio/adc/Kconfig
+++ b/drivers/staging/iio/adc/Kconfig
@@ -94,7 +94,7 @@ config LPC32XX_ADC
 
 config MXS_LRADC
tristate "Freescale i.MX23/i.MX28 LRADC"
-   depends on ARCH_MXS || COMPILE_TEST
+   depends on (ARCH_MXS || COMPILE_TEST) && HAS_IOMEM
depends on INPUT
select STMP_DEVICE
select IIO_BUFFER
-- 
1.7.11.7
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 4/8] Drivers: scsi: storvsc: Filter WRITE_SAME_16

2014-07-13 Thread Martin K. Petersen
> "KY" == KY Srinivasan  writes:

KY> Windows hosts do support UNMAP and set the field in the
KY> EVPD. However, since the host advertises SPC-2 compliance, Linux
KY> does not even query the VPD page.
 
>> If we want to enable UNMAP in this case I'd prefer a blacklist entry
>> than trying UNMAP despite the device not advertising it.

I agree with that. We could do something like the patch below.

However, I do think it's a good idea that you guys are looking into
reporting SPC-3.


SCSI: Add a blacklist flag which enables VPD page inquiries

Despite supporting modern SCSI features some storage devices continue to
claim conformance to an older version of the SPC spec. This is done for
compatibility with legacy operating systems.

Linux by default will not attempt to read VPD pages on devices that
claim SPC-2 or older. Introduce a blacklist flag that can be used to
trigger VPD page inquiries on devices that are known to support them.

Reported-by: KY Srinivasan 
Signed-off-by: Martin K. Petersen 

diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index 4a6e4ba5a400..a5b1a224628a 100644
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -949,7 +949,9 @@ static int scsi_add_lun(struct scsi_device *sdev, unsigned 
char *inq_result,
 
sdev->eh_timeout = SCSI_DEFAULT_EH_TIMEOUT;
 
-   if (*bflags & BLIST_SKIP_VPD_PAGES)
+   if (*bflags & BLIST_TRY_VPD_PAGES)
+   sdev->try_vpd_pages = 1;
+   else if (*bflags & BLIST_SKIP_VPD_PAGES)
sdev->skip_vpd_pages = 1;
 
transport_configure_device(&sdev->sdev_gendev);
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 87566b51fcf7..31d32b9077ca 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -2701,6 +2701,11 @@ static void sd_read_write_same(struct scsi_disk *sdkp, 
unsigned char *buffer)
 
 static int sd_try_extended_inquiry(struct scsi_device *sdp)
 {
+   /* Attempt VPD inquiry if the device blacklist explicitly calls
+* for it.
+*/
+   if (sdp->try_vpd_pages)
+   return 1;
/*
 * Although VPD inquiries can go to SCSI-2 type devices,
 * some USB ones crash on receiving them, and the pages
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h
index 9aa38f7b303b..f579408620f0 100644
--- a/include/scsi/scsi_device.h
+++ b/include/scsi/scsi_device.h
@@ -155,6 +155,7 @@ struct scsi_device {
unsigned skip_ms_page_8:1;  /* do not use MODE SENSE page 0x08 */
unsigned skip_ms_page_3f:1; /* do not use MODE SENSE page 0x3f */
unsigned skip_vpd_pages:1;  /* do not read VPD pages */
+   unsigned try_vpd_pages:1;   /* attempt to read VPD pages */
unsigned use_192_bytes_for_3f:1; /* ask for 192 bytes from page 0x3f */
unsigned no_start_on_add:1; /* do not issue start on add */
unsigned allow_restart:1; /* issue START_UNIT in error handler */
diff --git a/include/scsi/scsi_devinfo.h b/include/scsi/scsi_devinfo.h
index 8670c04e199e..1fdd6fc5492b 100644
--- a/include/scsi/scsi_devinfo.h
+++ b/include/scsi/scsi_devinfo.h
@@ -34,4 +34,5 @@
 #define BLIST_SKIP_VPD_PAGES   0x400 /* Ignore SBC-3 VPD pages */
 #define BLIST_SCSI3LUN 0x800 /* Scan more than 256 LUNs
 for sequential scan */
+#define BLIST_TRY_VPD_PAGES0x1000 /* Attempt to read VPD pages */
 #endif
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] drivers: Let several drivers depends on HAS_IOMEM for 'devm_ioremap_resource'

2014-07-13 Thread Lars-Peter Clausen

On 07/13/2014 11:45 AM, Richard Weinberger wrote:

Am 13.07.2014 11:27, schrieb Lennox Wu:

As I said before, some configurations don't make sense.


If such a configuration can be achieved using allmod/yesconfig it has to be 
fixed.
Chen's fixes seem reasonable as not all architectures support iomem.


Maybe we should stub out ioremap() and friends when COMPILE_TEST is enabled to 
avoid these linker errors. That's in my opinion better than turning most of the 
'depends on COMPILE_TEST' into 'depends on COMPILE_TEST && HAS_IOMEM'. The 
issue comes up quite a lot and it is often overlooked when adding a driver that 
can be build when COMPILE_TEST is enabled.


- Lars

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] drivers: Let several drivers depends on HAS_IOMEM for 'devm_ioremap_resource'

2014-07-13 Thread Richard Weinberger
Am 13.07.2014 15:26, schrieb Lars-Peter Clausen:
> On 07/13/2014 11:45 AM, Richard Weinberger wrote:
>> Am 13.07.2014 11:27, schrieb Lennox Wu:
>>> As I said before, some configurations don't make sense.
>>
>> If such a configuration can be achieved using allmod/yesconfig it has to be 
>> fixed.
>> Chen's fixes seem reasonable as not all architectures support iomem.
> 
> Maybe we should stub out ioremap() and friends when COMPILE_TEST is enabled 
> to avoid these linker errors. That's in my opinion better than turning most 
> of the 'depends on
> COMPILE_TEST' into 'depends on COMPILE_TEST && HAS_IOMEM'. The issue comes up 
> quite a lot and it is often overlooked when adding a driver that can be build 
> when COMPILE_TEST is
> enabled.

And what should this stub do?
Except calling BUG()...

Thanks,
//richard
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] drivers: Let several drivers depends on HAS_IOMEM for 'devm_ioremap_resource'

2014-07-13 Thread Lars-Peter Clausen

On 07/13/2014 03:40 PM, Richard Weinberger wrote:

Am 13.07.2014 15:26, schrieb Lars-Peter Clausen:

On 07/13/2014 11:45 AM, Richard Weinberger wrote:

Am 13.07.2014 11:27, schrieb Lennox Wu:

As I said before, some configurations don't make sense.


If such a configuration can be achieved using allmod/yesconfig it has to be 
fixed.
Chen's fixes seem reasonable as not all architectures support iomem.


Maybe we should stub out ioremap() and friends when COMPILE_TEST is enabled to 
avoid these linker errors. That's in my opinion better than turning most of the 
'depends on
COMPILE_TEST' into 'depends on COMPILE_TEST && HAS_IOMEM'. The issue comes up 
quite a lot and it is often overlooked when adding a driver that can be build when 
COMPILE_TEST is
enabled.


And what should this stub do?
Except calling BUG()...


return NULL;

It's for compile testing, it's not meant to work at runtime.

- Lars

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] drivers/staging/iio/adc/Kconfig: Let MXS_LRADC depend on HAS_IOMEM

2014-07-13 Thread Marek Vasut
On Sunday, July 13, 2014 at 01:44:38 PM, Chen Gang wrote:
> MXS_LRADC need HAS_IOMEM, so let it depend on HAS_IOMEM
> 
> The related error (with allmodconfig under score):
> 
> MODPOST 1365 modules
>   ERROR: "devm_ioremap_resource" [drivers/staging/iio/adc/mxs-lradc.ko]
> undefined!
> 
> 
> Signed-off-by: Chen Gang 

Acked-by: Marek Vasut 

Best regards,
Marek Vasut
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] drivers: Let several drivers depends on HAS_IOMEM for 'devm_ioremap_resource'

2014-07-13 Thread Richard Weinberger
Am 13.07.2014 15:56, schrieb Lars-Peter Clausen:
> On 07/13/2014 03:40 PM, Richard Weinberger wrote:
>> Am 13.07.2014 15:26, schrieb Lars-Peter Clausen:
>>> On 07/13/2014 11:45 AM, Richard Weinberger wrote:
 Am 13.07.2014 11:27, schrieb Lennox Wu:
> As I said before, some configurations don't make sense.

 If such a configuration can be achieved using allmod/yesconfig it has to 
 be fixed.
 Chen's fixes seem reasonable as not all architectures support iomem.
>>>
>>> Maybe we should stub out ioremap() and friends when COMPILE_TEST is enabled 
>>> to avoid these linker errors. That's in my opinion better than turning most 
>>> of the 'depends on
>>> COMPILE_TEST' into 'depends on COMPILE_TEST && HAS_IOMEM'. The issue comes 
>>> up quite a lot and it is often overlooked when adding a driver that can be 
>>> build when COMPILE_TEST is
>>> enabled.
>>
>> And what should this stub do?
>> Except calling BUG()...
> 
> return NULL;
> 
> It's for compile testing, it's not meant to work at runtime.

Hm, I really don't like the idea of having a non-working kernel.
IMHO either it should build _and_ run and nothing else.
Greg, what do you think?

Thanks,
//richard
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: android: Clean up binder_send_failed_reply

2014-07-13 Thread Lucas Tanure
Kernel coding style. Remove useless else statement after return.

Signed-off-by: Lucas Tanure 
---
 drivers/staging/android/binder.c | 27 +--
 1 file changed, 13 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c
index 14714a6..eee80fb 100644
--- a/drivers/staging/android/binder.c
+++ b/drivers/staging/android/binder.c
@@ -1210,24 +1210,23 @@ static void binder_send_failed_reply(struct 
binder_transaction *t,
target_thread->return_error);
}
return;
-   } else {
-   struct binder_transaction *next = t->from_parent;
+   } 
+   struct binder_transaction *next = t->from_parent;
 
-   binder_debug(BINDER_DEBUG_FAILED_TRANSACTION,
-"send failed reply for transaction %d, 
target dead\n",
-t->debug_id);
+   binder_debug(BINDER_DEBUG_FAILED_TRANSACTION,
+"send failed reply for transaction %d, target 
dead\n",
+t->debug_id);
 
-   binder_pop_transaction(target_thread, t);
-   if (next == NULL) {
-   binder_debug(BINDER_DEBUG_DEAD_BINDER,
-"reply failed, no target thread at 
root\n");
-   return;
-   }
-   t = next;
+   binder_pop_transaction(target_thread, t);
+   if (next == NULL) {
binder_debug(BINDER_DEBUG_DEAD_BINDER,
-"reply failed, no target thread -- retry 
%d\n",
- t->debug_id);
+"reply failed, no target thread at 
root\n");
+   return;
}
+   t = next;
+   binder_debug(BINDER_DEBUG_DEAD_BINDER,
+"reply failed, no target thread -- retry %d\n",
+ t->debug_id);
}
 }
 
-- 
2.0.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] drivers: Let several drivers depends on HAS_IOMEM for 'devm_ioremap_resource'

2014-07-13 Thread Lars-Peter Clausen

On 07/13/2014 04:03 PM, Richard Weinberger wrote:

Am 13.07.2014 15:56, schrieb Lars-Peter Clausen:

On 07/13/2014 03:40 PM, Richard Weinberger wrote:

Am 13.07.2014 15:26, schrieb Lars-Peter Clausen:

On 07/13/2014 11:45 AM, Richard Weinberger wrote:

Am 13.07.2014 11:27, schrieb Lennox Wu:

As I said before, some configurations don't make sense.


If such a configuration can be achieved using allmod/yesconfig it has to be 
fixed.
Chen's fixes seem reasonable as not all architectures support iomem.


Maybe we should stub out ioremap() and friends when COMPILE_TEST is enabled to 
avoid these linker errors. That's in my opinion better than turning most of the 
'depends on
COMPILE_TEST' into 'depends on COMPILE_TEST && HAS_IOMEM'. The issue comes up 
quite a lot and it is often overlooked when adding a driver that can be build when 
COMPILE_TEST is
enabled.


And what should this stub do?
Except calling BUG()...


return NULL;

It's for compile testing, it's not meant to work at runtime.


Hm, I really don't like the idea of having a non-working kernel.
IMHO either it should build _and_ run and nothing else.
Greg, what do you think?


The kernel will still be working fine and you can run it on a system. The 
drivers which use ioremap() or similar are probably not instantiated on a 
system that does not provide HAS_IOMEM. But even if it was the driver should 
handle ioremap() returning NULL gracefully and abort the driver probe. That 
said you'll probably not run a kernel that was built with COMPILE_TEST on your 
real hardware since it contains so many drivers that are completely useless on 
your hardware. The idea of COMPILE_TEST is to have as much compile test 
exposure as possible to the code that is enabled by COMPILE_TEST. Stubbing out 
ioremap() and friends when HAS_IOMEM is not set and COMPILE_TEST is set makes 
it easier to get there.


- Lars

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] drivers: Let several drivers depends on HAS_IOMEM for 'devm_ioremap_resource'

2014-07-13 Thread Chen Gang
On 07/13/2014 11:14 AM, Chen Gang wrote:
[...]
> And also find a compiler issue, I will try to fix it, but shall not notify
> kernel mailing list, again. The related issue is below (it seems a kernel
> issue, but in fact, it is a compiler's issue):
> 
> CC [M]  drivers/staging/lustre/lustre/ptlrpc/sec.o
>   drivers/staging/lustre/lustre/ptlrpc/sec.c: In function 
> 'sptlrpc_cli_ctx_expire':
>   drivers/staging/lustre/lustre/ptlrpc/sec.c:309:13: error: 'struct 
> ptlrpc_ctx_ops' has no member named '__die'
> ctx->cc_ops->die(ctx, 0);
>^
>   drivers/staging/lustre/lustre/ptlrpc/sec.c: In function 
> 'ctx_refresh_timeout':
>   drivers/staging/lustre/lustre/ptlrpc/sec.c:594:26: error: 'struct 
> ptlrpc_ctx_ops' has no member named '__die'
>  req->rq_cli_ctx->cc_ops->die(req->rq_cli_ctx, 0);
> ^
>   make[5]: *** [drivers/staging/lustre/lustre/ptlrpc/sec.o] Error 1
>   make[4]: *** [drivers/staging/lustre/lustre/ptlrpc] Error 2
>   make[3]: *** [drivers/staging/lustre/lustre] Error 2
>   make[2]: *** [drivers/staging/lustre] Error 2
>   make[1]: *** [drivers/staging] Error 2
>   make: *** [drivers] Error 2
> 

Oh, sorry, after check related details, this is still a kernel issue,
'die' is a macro which defined by most of architectures, so can not
use this common name as a declaration in any other area.

I shall send related patch for it.

Thanks.
-- 
Chen Gang

Open share and attitude like air water and life which God blessed
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 01/16] staging: rtl8188eu: Remove unused function rtw_use_tkipkey_handler()

2014-07-13 Thread navin patidar
Signed-off-by: navin patidar 
---
 drivers/staging/rtl8188eu/core/rtw_security.c|   25 --
 drivers/staging/rtl8188eu/include/rtw_security.h |1 -
 2 files changed, 26 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_security.c 
b/drivers/staging/rtl8188eu/core/rtw_security.c
index d78def5..f9096a5 100644
--- a/drivers/staging/rtl8188eu/core/rtw_security.c
+++ b/drivers/staging/rtl8188eu/core/rtw_security.c
@@ -1679,28 +1679,3 @@ do { 
\
d##2 = TE0(s##2) ^ TE1(s##3) ^ TE2(s##0) ^ TE3(s##1) ^ rk[4 * i + 2]; \
d##3 = TE0(s##3) ^ TE1(s##0) ^ TE2(s##1) ^ TE3(s##2) ^ rk[4 * i + 3]; \
 } while (0);
-
-/**
- * omac1_aes_128 - One-Key CBC MAC (OMAC1) hash with AES-128 (aka AES-CMAC)
- * @key: 128-bit key for the hash operation
- * @data: Data buffer for which a MAC is determined
- * @data_len: Length of data buffer in bytes
- * @mac: Buffer for MAC (128 bits, i.e., 16 bytes)
- * Returns: 0 on success, -1 on failure
- *
- * This is a mode for using block cipher (AES in this case) for authentication.
- * OMAC1 was standardized with the name CMAC by NIST in a Special Publication
- * (SP) 800-38B.
- */
-void rtw_use_tkipkey_handler(void *FunctionContext)
-{
-   struct adapter *padapter = (struct adapter *)FunctionContext;
-
-
-   RT_TRACE(_module_rtl871x_security_c_, _drv_err_, 
("^^^rtw_use_tkipkey_handler ^^^\n"));
-
-   padapter->securitypriv.busetkipkey = true;
-
-   RT_TRACE(_module_rtl871x_security_c_, _drv_err_, 
("^^^rtw_use_tkipkey_handler padapter->securitypriv.busetkipkey=%d^^^\n", 
padapter->securitypriv.busetkipkey));
-
-}
diff --git a/drivers/staging/rtl8188eu/include/rtw_security.h 
b/drivers/staging/rtl8188eu/include/rtw_security.h
index 937cad8..66d60aa 100644
--- a/drivers/staging/rtl8188eu/include/rtw_security.h
+++ b/drivers/staging/rtl8188eu/include/rtw_security.h
@@ -378,6 +378,5 @@ void rtw_wep_encrypt(struct adapter *padapter, u8  
*pxmitframe);
 u32 rtw_aes_decrypt(struct adapter *padapter, u8  *precvframe);
 u32 rtw_tkip_decrypt(struct adapter *padapter, u8  *precvframe);
 void rtw_wep_decrypt(struct adapter *padapter, u8  *precvframe);
-void rtw_use_tkipkey_handler(void *FunctionContext);
 
 #endif /* __RTL871X_SECURITY_H_ */
-- 
1.7.10.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 07/16] staging: rtl8188eu: Remove unused function rtw_set_802_11_remove_wep()

2014-07-13 Thread navin patidar
Signed-off-by: navin patidar 
---
 drivers/staging/rtl8188eu/core/rtw_ioctl_set.c|   25 -
 drivers/staging/rtl8188eu/include/rtw_ioctl_set.h |1 -
 2 files changed, 26 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c 
b/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
index f4116d1..fc280ce5 100644
--- a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
+++ b/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
@@ -566,31 +566,6 @@ exit:
return ret;
 }
 
-u8 rtw_set_802_11_remove_wep(struct adapter *padapter, u32 keyindex)
-{
-   u8 ret = _SUCCESS;
-
-   if (keyindex >= 0x8000 || padapter == NULL) {
-   ret = false;
-   goto exit;
-   } else {
-   int res;
-   struct security_priv *psecuritypriv = &(padapter->securitypriv);
-   if (keyindex < 4) {
-   memset(&psecuritypriv->dot11DefKey[keyindex], 0, 16);
-   res = rtw_set_key(padapter, psecuritypriv, keyindex, 0);
-   psecuritypriv->dot11DefKeylen[keyindex] = 0;
-   if (res == _FAIL)
-   ret = _FAIL;
-   } else {
-   ret = _FAIL;
-   }
-   }
-exit:
-
-   return ret;
-}
-
 /*
 * rtw_get_cur_max_rate -
 * @adapter: pointer to struct adapter structure
diff --git a/drivers/staging/rtl8188eu/include/rtw_ioctl_set.h 
b/drivers/staging/rtl8188eu/include/rtw_ioctl_set.h
index a325326..fa9d655 100644
--- a/drivers/staging/rtl8188eu/include/rtw_ioctl_set.h
+++ b/drivers/staging/rtl8188eu/include/rtw_ioctl_set.h
@@ -35,7 +35,6 @@ u8 rtw_set_802_11_bssid_list_scan(struct adapter *adapter,
  int ssid_max_num);
 u8 rtw_set_802_11_infrastructure_mode(struct adapter *adapter,
  enum ndis_802_11_network_infra type);
-u8 rtw_set_802_11_remove_wep(struct adapter *adapter, u32 keyindex);
 u8 rtw_set_802_11_ssid(struct adapter *adapt, struct ndis_802_11_ssid *ssid);
 u16 rtw_get_cur_max_rate(struct adapter *adapter);
 int rtw_set_country(struct adapter *adapter, const char *country_code);
-- 
1.7.10.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 04/16] staging: rtl8188eu: Remove unused function rtw_validate_ssid()

2014-07-13 Thread navin patidar
Signed-off-by: navin patidar 
---
 drivers/staging/rtl8188eu/core/rtw_ioctl_set.c|   26 -
 drivers/staging/rtl8188eu/include/rtw_ioctl_set.h |1 -
 2 files changed, 27 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c 
b/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
index 09d5bf4..95c6539 100644
--- a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
+++ b/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
@@ -34,32 +34,6 @@ extern void indicate_wx_scan_complete_event(struct adapter 
*padapter);
(addr[4] == 0xff) && (addr[5] == 0xff))  ? true : false \
 )
 
-u8 rtw_validate_ssid(struct ndis_802_11_ssid *ssid)
-{
-   u8   i;
-   u8  ret = true;
-
-
-   if (ssid->SsidLength > 32) {
-   RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("ssid length 
>32\n"));
-   ret = false;
-   goto exit;
-   }
-
-   for (i = 0; i < ssid->SsidLength; i++) {
-   /* wifi, printable ascii code must be supported */
-   if (!((ssid->Ssid[i] >= 0x20) && (ssid->Ssid[i] <= 0x7e))) {
-   RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, 
("ssid has nonprintabl ascii\n"));
-   ret = false;
-   break;
-   }
-   }
-
-exit:
-
-   return ret;
-}
-
 u8 rtw_do_join(struct adapter *padapter)
 {
struct list_head *plist, *phead;
diff --git a/drivers/staging/rtl8188eu/include/rtw_ioctl_set.h 
b/drivers/staging/rtl8188eu/include/rtw_ioctl_set.h
index 525abbd..11791cb 100644
--- a/drivers/staging/rtl8188eu/include/rtw_ioctl_set.h
+++ b/drivers/staging/rtl8188eu/include/rtw_ioctl_set.h
@@ -40,7 +40,6 @@ u8 rtw_set_802_11_remove_wep(struct adapter *adapter, u32 
keyindex);
 u8 rtw_set_802_11_ssid(struct adapter *adapt, struct ndis_802_11_ssid *ssid);
 u8 rtw_set_802_11_remove_key(struct adapter *adapt,
 struct ndis_802_11_remove_key *key);
-u8 rtw_validate_ssid(struct ndis_802_11_ssid *ssid);
 u16 rtw_get_cur_max_rate(struct adapter *adapter);
 int rtw_set_country(struct adapter *adapter, const char *country_code);
 
-- 
1.7.10.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 06/16] staging: rtl8188eu: Remove unused function rtw_set_802_11_remove_key()

2014-07-13 Thread navin patidar
Signed-off-by: navin patidar 
---
 drivers/staging/rtl8188eu/core/rtw_ioctl_set.c|   38 -
 drivers/staging/rtl8188eu/include/rtw_ioctl_set.h |2 --
 2 files changed, 40 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c 
b/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
index 8c107f8..f4116d1 100644
--- a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
+++ b/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
@@ -591,44 +591,6 @@ exit:
return ret;
 }
 
-u8 rtw_set_802_11_remove_key(struct adapter *padapter, struct 
ndis_802_11_remove_key *key)
-{
-   u8 *pbssid;
-   struct sta_info *stainfo;
-   u8  bgroup = (key->KeyIndex & 0x400) > 0 ? false : true;
-   u8  keyIndex = (u8)key->KeyIndex & 0x03;
-   u8  ret = _SUCCESS;
-
-
-   if ((key->KeyIndex & 0xbffc) > 0) {
-   ret = _FAIL;
-   goto exit;
-   }
-
-   if (bgroup) {
-   /*  clear group key by index */
-
-   memset(&padapter->securitypriv.dot118021XGrpKey[keyIndex], 0, 
16);
-
-   /*  \todo Send a H2C Command to Firmware for removing this Key 
in CAM Entry. */
-   } else {
-   pbssid = get_bssid(&padapter->mlmepriv);
-   stainfo = rtw_get_stainfo(&padapter->stapriv, pbssid);
-   if (stainfo) {
-   /*  clear key by BSSID */
-   memset(&stainfo->dot118021x_UncstKey, 0, 16);
-
-   /*  \todo Send a H2C Command to Firmware for disable 
this Key in CAM Entry. */
-   } else {
-   ret = _FAIL;
-   goto exit;
-   }
-   }
-exit:
-
-   return ret;
-}
-
 /*
 * rtw_get_cur_max_rate -
 * @adapter: pointer to struct adapter structure
diff --git a/drivers/staging/rtl8188eu/include/rtw_ioctl_set.h 
b/drivers/staging/rtl8188eu/include/rtw_ioctl_set.h
index 9ec6456..a325326 100644
--- a/drivers/staging/rtl8188eu/include/rtw_ioctl_set.h
+++ b/drivers/staging/rtl8188eu/include/rtw_ioctl_set.h
@@ -37,8 +37,6 @@ u8 rtw_set_802_11_infrastructure_mode(struct adapter *adapter,
  enum ndis_802_11_network_infra type);
 u8 rtw_set_802_11_remove_wep(struct adapter *adapter, u32 keyindex);
 u8 rtw_set_802_11_ssid(struct adapter *adapt, struct ndis_802_11_ssid *ssid);
-u8 rtw_set_802_11_remove_key(struct adapter *adapt,
-struct ndis_802_11_remove_key *key);
 u16 rtw_get_cur_max_rate(struct adapter *adapter);
 int rtw_set_country(struct adapter *adapter, const char *country_code);
 
-- 
1.7.10.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 03/16] staging: rtl8188eu: Remove unused function rtw_set_scan_mode()

2014-07-13 Thread navin patidar
Signed-off-by: navin patidar 
---
 drivers/staging/rtl8188eu/core/rtw_ioctl_set.c|   17 -
 drivers/staging/rtl8188eu/include/rtw_ioctl_set.h |1 -
 2 files changed, 18 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c 
b/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
index 5eb21cd..09d5bf4 100644
--- a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
+++ b/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
@@ -1075,23 +1075,6 @@ u16 rtw_get_cur_max_rate(struct adapter *adapter)
 }
 
 /*
-* rtw_set_scan_mode -
-* @adapter: pointer to struct adapter structure
-* @scan_mode:
-*
-* Return _SUCCESS or _FAIL
-*/
-int rtw_set_scan_mode(struct adapter *adapter, enum rt_scan_type scan_mode)
-{
-   if (scan_mode != SCAN_ACTIVE && scan_mode != SCAN_PASSIVE)
-   return _FAIL;
-
-   adapter->mlmepriv.scan_mode = scan_mode;
-
-   return _SUCCESS;
-}
-
-/*
 * rtw_set_country -
 * @adapter: pointer to struct adapter structure
 * @country_code: string of country code
diff --git a/drivers/staging/rtl8188eu/include/rtw_ioctl_set.h 
b/drivers/staging/rtl8188eu/include/rtw_ioctl_set.h
index 7335147..525abbd 100644
--- a/drivers/staging/rtl8188eu/include/rtw_ioctl_set.h
+++ b/drivers/staging/rtl8188eu/include/rtw_ioctl_set.h
@@ -42,7 +42,6 @@ u8 rtw_set_802_11_remove_key(struct adapter *adapt,
 struct ndis_802_11_remove_key *key);
 u8 rtw_validate_ssid(struct ndis_802_11_ssid *ssid);
 u16 rtw_get_cur_max_rate(struct adapter *adapter);
-int rtw_set_scan_mode(struct adapter *adapter, enum rt_scan_type scan_mode);
 int rtw_set_country(struct adapter *adapter, const char *country_code);
 
 #endif
-- 
1.7.10.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 05/16] staging: rtl8188eu: Remove unused function rtw_set_802_11_add_key()

2014-07-13 Thread navin patidar
Signed-off-by: navin patidar 
---
 drivers/staging/rtl8188eu/core/rtw_ioctl_set.c|  352 -
 drivers/staging/rtl8188eu/include/rtw_ioctl_set.h |1 -
 2 files changed, 353 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c 
b/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
index 95c6539..8c107f8 100644
--- a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
+++ b/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
@@ -591,358 +591,6 @@ exit:
return ret;
 }
 
-u8 rtw_set_802_11_add_key(struct adapter *padapter, struct ndis_802_11_key 
*key)
-{
-   uintencryptionalgo;
-   u8 *pbssid;
-   struct sta_info *stainfo;
-   u8  bgroup = false;
-   u8  bgrouptkey = false;/* can be removed later */
-   u8  ret = _SUCCESS;
-
-
-   if (((key->KeyIndex & 0x8000) == 0) && ((key->KeyIndex & 
0x4000) > 0)) {
-   /*  It is invalid to clear bit 31 and set bit 30. If the 
miniport driver encounters this combination, */
-   /*  it must fail the request and return 
NDIS_STATUS_INVALID_DATA. */
-   RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_,
-("rtw_set_802_11_add_key: ((key->KeyIndex & 
0x8000)==0)[=%d]",
-(int)(key->KeyIndex & 0x8000) == 0));
-   RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_,
-("rtw_set_802_11_add_key:((key->KeyIndex & 
0x4000)>0)[=%d]",
-(int)(key->KeyIndex & 0x4000) > 0));
-   RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_,
-("rtw_set_802_11_add_key: key->KeyIndex=%d\n",
-(int)key->KeyIndex));
-   ret = _FAIL;
-   goto exit;
-   }
-
-   if (key->KeyIndex & 0x4000) {
-   /*  Pairwise key */
-
-   RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, 
("OID_802_11_ADD_KEY: + Pairwise key +\n"));
-
-   pbssid = get_bssid(&padapter->mlmepriv);
-   stainfo = rtw_get_stainfo(&padapter->stapriv, pbssid);
-
-   if ((stainfo != NULL) && 
(padapter->securitypriv.dot11AuthAlgrthm == dot11AuthAlgrthm_8021X)) {
-   RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_,
-
("OID_802_11_ADD_KEY:(stainfo!=NULL)&&(Adapter->securitypriv.dot11AuthAlgrthm==dot11AuthAlgrthm_8021X)\n"));
-   encryptionalgo = stainfo->dot118021XPrivacy;
-   } else {
-   RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, 
("OID_802_11_ADD_KEY: stainfo == 
NULL)||(Adapter->securitypriv.dot11AuthAlgrthm!= dot11AuthAlgrthm_8021X)\n"));
-   encryptionalgo = 
padapter->securitypriv.dot11PrivacyAlgrthm;
-   }
-
-   RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_,
-("rtw_set_802_11_add_key: (encryptionalgo==%d)!\n",
-encryptionalgo));
-   RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_,
-("rtw_set_802_11_add_key: 
(Adapter->securitypriv.dot11PrivacyAlgrthm==%d)!\n",
-padapter->securitypriv.dot11PrivacyAlgrthm));
-   RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_,
-("rtw_set_802_11_add_key: 
(Adapter->securitypriv.dot11AuthAlgrthm==%d)!\n",
-padapter->securitypriv.dot11AuthAlgrthm));
-
-   if ((stainfo != NULL))
-   RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_,
-("rtw_set_802_11_add_key: 
(stainfo->dot118021XPrivacy==%d)!\n",
-stainfo->dot118021XPrivacy));
-
-   if (key->KeyIndex & 0x00FF) {
-   /*  The key index is specified in the lower 8 bits by 
values of zero to 255. */
-   /*  The key index should be set to zero for a Pairwise 
key, and the driver should fail with */
-   /*  NDIS_STATUS_INVALID_DATA if the lower 8 bits is not 
zero */
-   RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, (" 
key->KeyIndex & 0x00FF.\n"));
-   ret = _FAIL;
-   goto exit;
-   }
-
-   /*  check BSSID */
-   if (IS_MAC_ADDRESS_BROADCAST(key->BSSID) == true) {
-   RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, 
("MacAddr_isBcst(key->BSSID)\n"));
-   ret = false;
-   goto exit;
-   }
-
-   /*  Check key length for TKIP. */
-   if ((encryptionalgo == _TKIP_) && (key->KeyLength != 32)) {
-   RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, 
("TKIP KeyLength:0x%x != 32\n", key->KeyLength));
-   ret = _FAIL;
-   goto exi

[PATCH 02/16] staging: rtl8188eu: Remove function rtw_set_channel_plan()

2014-07-13 Thread navin patidar
Signed-off-by: navin patidar 
---
 drivers/staging/rtl8188eu/core/rtw_ioctl_set.c|   15 +--
 drivers/staging/rtl8188eu/include/rtw_ioctl_set.h |1 -
 2 files changed, 1 insertion(+), 15 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c 
b/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
index 39932cb..5eb21cd 100644
--- a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
+++ b/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
@@ -1092,19 +1092,6 @@ int rtw_set_scan_mode(struct adapter *adapter, enum 
rt_scan_type scan_mode)
 }
 
 /*
-* rtw_set_channel_plan -
-* @adapter: pointer to struct adapter structure
-* @channel_plan:
-*
-* Return _SUCCESS or _FAIL
-*/
-int rtw_set_channel_plan(struct adapter *adapter, u8 channel_plan)
-{
-   /* handle by cmd_thread to sync with scan operation */
-   return rtw_set_chplan_cmd(adapter, channel_plan, 1);
-}
-
-/*
 * rtw_set_country -
 * @adapter: pointer to struct adapter structure
 * @country_code: string of country code
@@ -1130,5 +1117,5 @@ int rtw_set_country(struct adapter *adapter, const char 
*country_code)
else
DBG_88E("%s unknown country_code:%s\n", __func__, country_code);
 
-   return rtw_set_channel_plan(adapter, channel_plan);
+   return rtw_set_chplan_cmd(adapter, channel_plan, 1);
 }
diff --git a/drivers/staging/rtl8188eu/include/rtw_ioctl_set.h 
b/drivers/staging/rtl8188eu/include/rtw_ioctl_set.h
index 005ec17..7335147 100644
--- a/drivers/staging/rtl8188eu/include/rtw_ioctl_set.h
+++ b/drivers/staging/rtl8188eu/include/rtw_ioctl_set.h
@@ -43,7 +43,6 @@ u8 rtw_set_802_11_remove_key(struct adapter *adapt,
 u8 rtw_validate_ssid(struct ndis_802_11_ssid *ssid);
 u16 rtw_get_cur_max_rate(struct adapter *adapter);
 int rtw_set_scan_mode(struct adapter *adapter, enum rt_scan_type scan_mode);
-int rtw_set_channel_plan(struct adapter *adapter, u8 channel_plan);
 int rtw_set_country(struct adapter *adapter, const char *country_code);
 
 #endif
-- 
1.7.10.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 09/16] staging: rtl8188eu: Remove unused function rtw_get_timestampe_from_ie()

2014-07-13 Thread navin patidar
Signed-off-by: navin patidar 
---
 drivers/staging/rtl8188eu/core/rtw_mlme.c|5 -
 drivers/staging/rtl8188eu/include/rtw_mlme.h |1 -
 2 files changed, 6 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c 
b/drivers/staging/rtl8188eu/core/rtw_mlme.c
index 1eef47d..3314708 100644
--- a/drivers/staging/rtl8188eu/core/rtw_mlme.c
+++ b/drivers/staging/rtl8188eu/core/rtw_mlme.c
@@ -331,11 +331,6 @@ u16 rtw_get_capability(struct wlan_bssid_ex *bss)
return le16_to_cpu(val);
 }
 
-u8 *rtw_get_timestampe_from_ie(u8 *ie)
-{
-   return ie + 0;
-}
-
 u8 *rtw_get_beacon_interval_from_ie(u8 *ie)
 {
return ie + 8;
diff --git a/drivers/staging/rtl8188eu/include/rtw_mlme.h 
b/drivers/staging/rtl8188eu/include/rtw_mlme.h
index 45c22ef..75f8cf5 100644
--- a/drivers/staging/rtl8188eu/include/rtw_mlme.h
+++ b/drivers/staging/rtl8188eu/include/rtw_mlme.h
@@ -590,7 +590,6 @@ int rtw_if_up(struct adapter *padapter);
 
 
 u8 *rtw_get_capability_from_ie(u8 *ie);
-u8 *rtw_get_timestampe_from_ie(u8 *ie);
 u8 *rtw_get_beacon_interval_from_ie(u8 *ie);
 
 
-- 
1.7.10.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 11/16] staging: rtl8188eu: Rename _rtw_find_network() to rtw_find_network()

2014-07-13 Thread navin patidar
Signed-off-by: navin patidar 
---
 drivers/staging/rtl8188eu/core/rtw_mlme.c|   14 +-
 drivers/staging/rtl8188eu/include/rtw_mlme.h |5 -
 2 files changed, 1 insertion(+), 18 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c 
b/drivers/staging/rtl8188eu/core/rtw_mlme.c
index b1e406e..fcd3f5a 100644
--- a/drivers/staging/rtl8188eu/core/rtw_mlme.c
+++ b/drivers/staging/rtl8188eu/core/rtw_mlme.c
@@ -239,7 +239,7 @@ void _rtw_free_network_nolock(structmlme_priv 
*pmlmepriv, struct wlan_network *
 
Shall be calle under atomic context... to avoid possible racing 
condition...
 */
-struct wlan_network *_rtw_find_network(struct __queue *scanned_queue, u8 *addr)
+struct wlan_network *rtw_find_network(struct __queue *scanned_queue, u8 *addr)
 {
struct list_head *phead, *plist;
struct  wlan_network *pnetwork = NULL;
@@ -360,18 +360,6 @@ static void rtw_free_network_nolock(struct mlme_priv 
*pmlmepriv,
_rtw_free_network_nolock(pmlmepriv, pnetwork);
 }
 
-/*
-   return the wlan_network with the matching addr
-
-   Shall be calle under atomic context... to avoid possible racing 
condition...
-*/
-struct wlan_network *rtw_find_network(struct __queue *scanned_queue, u8 *addr)
-{
-   struct  wlan_network *pnetwork = _rtw_find_network(scanned_queue, addr);
-
-   return pnetwork;
-}
-
 int rtw_is_same_ibss(struct adapter *adapter, struct wlan_network *pnetwork)
 {
int ret = true;
diff --git a/drivers/staging/rtl8188eu/include/rtw_mlme.h 
b/drivers/staging/rtl8188eu/include/rtw_mlme.h
index 56ef600..04d3b3d 100644
--- a/drivers/staging/rtl8188eu/include/rtw_mlme.h
+++ b/drivers/staging/rtl8188eu/include/rtw_mlme.h
@@ -581,16 +581,11 @@ void _rtw_free_network(struct mlme_priv *pmlmepriv,
 void _rtw_free_network_nolock(struct mlme_priv *pmlmepriv,
  struct wlan_network *pnetwork);
 
-
-struct wlan_network *_rtw_find_network(struct __queue *scanned_queue, u8 
*addr);
-
 int rtw_if_up(struct adapter *padapter);
 
-
 u8 *rtw_get_capability_from_ie(u8 *ie);
 u8 *rtw_get_beacon_interval_from_ie(u8 *ie);
 
-
 void rtw_joinbss_reset(struct adapter *padapter);
 
 unsigned int rtw_restructure_ht_ie(struct adapter *padapter, u8 *in_ie,
-- 
1.7.10.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 08/16] staging: rtl8188eu: Remove unused function _rtw_IOL_append_WW_cmd()

2014-07-13 Thread navin patidar
Signed-off-by: navin patidar 
---
 drivers/staging/rtl8188eu/core/rtw_iol.c|   14 --
 drivers/staging/rtl8188eu/include/rtw_iol.h |2 --
 2 files changed, 16 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_iol.c 
b/drivers/staging/rtl8188eu/core/rtw_iol.c
index e6fdd32..7796287 100644
--- a/drivers/staging/rtl8188eu/core/rtw_iol.c
+++ b/drivers/staging/rtl8188eu/core/rtw_iol.c
@@ -113,20 +113,6 @@ int _rtw_IOL_append_WB_cmd(struct xmit_frame *xmit_frame, 
u16 addr, u8 value, u8
return rtw_IOL_append_cmds(xmit_frame, (u8 *)&cmd, cmd.length);
 }
 
-int _rtw_IOL_append_WW_cmd(struct xmit_frame *xmit_frame, u16 addr, u16 value, 
u16 mask)
-{
-   struct ioreg_cfg cmd = {8, IOREG_CMD_WW_REG, 0x0, 0x0, 0x0};
-
-   cmd.address = cpu_to_le16(addr);
-   cmd.data = cpu_to_le32(value);
-
-   if (mask != 0x) {
-   cmd.length = 12;
-   cmd.mask =  cpu_to_le32(mask);
-   }
-   return rtw_IOL_append_cmds(xmit_frame, (u8 *)&cmd, cmd.length);
-}
-
 int _rtw_IOL_append_WD_cmd(struct xmit_frame *xmit_frame, u16 addr, u32 value, 
u32 mask)
 {
struct ioreg_cfg cmd = {8, IOREG_CMD_WD_REG, 0x0, 0x0, 0x0};
diff --git a/drivers/staging/rtl8188eu/include/rtw_iol.h 
b/drivers/staging/rtl8188eu/include/rtw_iol.h
index ec0c6cb..80bfd06 100644
--- a/drivers/staging/rtl8188eu/include/rtw_iol.h
+++ b/drivers/staging/rtl8188eu/include/rtw_iol.h
@@ -63,8 +63,6 @@ void read_efuse_from_txpktbuf(struct adapter *adapter, int 
bcnhead,
 
 int _rtw_IOL_append_WB_cmd(struct xmit_frame *xmit_frame, u16 addr,
   u8 value, u8 mask);
-int _rtw_IOL_append_WW_cmd(struct xmit_frame *xmit_frame, u16 addr,
-  u16 value, u16 mask);
 int _rtw_IOL_append_WD_cmd(struct xmit_frame *xmit_frame, u16 addr,
   u32 value, u32 mask);
 int _rtw_IOL_append_WRF_cmd(struct xmit_frame *xmit_frame, u8 rf_path,
-- 
1.7.10.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 12/16] staging: rtl8188eu: Make _rtw_free_network() static

2014-07-13 Thread navin patidar

Signed-off-by: navin patidar 
---
 drivers/staging/rtl8188eu/core/rtw_mlme.c|2 +-
 drivers/staging/rtl8188eu/include/rtw_mlme.h |3 ---
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c 
b/drivers/staging/rtl8188eu/core/rtw_mlme.c
index fcd3f5a..6cfb729 100644
--- a/drivers/staging/rtl8188eu/core/rtw_mlme.c
+++ b/drivers/staging/rtl8188eu/core/rtw_mlme.c
@@ -194,7 +194,7 @@ exit:
return pnetwork;
 }
 
-void _rtw_free_network(struct  mlme_priv *pmlmepriv , struct wlan_network 
*pnetwork, u8 isfreeall)
+static void _rtw_free_network(struct   mlme_priv *pmlmepriv , struct 
wlan_network *pnetwork, u8 isfreeall)
 {
u32 curr_time, delta_time;
u32 lifetime = SCANQUEUE_LIFETIME;
diff --git a/drivers/staging/rtl8188eu/include/rtw_mlme.h 
b/drivers/staging/rtl8188eu/include/rtw_mlme.h
index 04d3b3d..e727cf0 100644
--- a/drivers/staging/rtl8188eu/include/rtw_mlme.h
+++ b/drivers/staging/rtl8188eu/include/rtw_mlme.h
@@ -575,9 +575,6 @@ struct wlan_network *_rtw_dequeue_network(struct __queue 
*queue);
 
 struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv);
 
-
-void _rtw_free_network(struct mlme_priv *pmlmepriv,
-  struct wlan_network *pnetwork, u8 isfreeall);
 void _rtw_free_network_nolock(struct mlme_priv *pmlmepriv,
  struct wlan_network *pnetwork);
 
-- 
1.7.10.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 13/16] staging: rtl8188eu: Remove unused function _rtw_dequeue_network()

2014-07-13 Thread navin patidar

Signed-off-by: navin patidar 
---
 drivers/staging/rtl8188eu/core/rtw_mlme.c|   19 ---
 drivers/staging/rtl8188eu/include/rtw_mlme.h |2 --
 2 files changed, 21 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c 
b/drivers/staging/rtl8188eu/core/rtw_mlme.c
index 6cfb729..5ab6752 100644
--- a/drivers/staging/rtl8188eu/core/rtw_mlme.c
+++ b/drivers/staging/rtl8188eu/core/rtw_mlme.c
@@ -142,25 +142,6 @@ exit:
return _SUCCESS;
 }
 
-struct wlan_network *_rtw_dequeue_network(struct __queue *queue)
-{
-   struct wlan_network *pnetwork;
-
-   spin_lock_bh(&queue->lock);
-
-   if (list_empty(&queue->queue)) {
-   pnetwork = NULL;
-   } else {
-   pnetwork = container_of((&queue->queue)->next, struct 
wlan_network, list);
-
-   list_del_init(&(pnetwork->list));
-   }
-
-   spin_unlock_bh(&queue->lock);
-
-   return pnetwork;
-}
-
 struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv)/* _queue 
*free_queue) */
 {
struct  wlan_network*pnetwork;
diff --git a/drivers/staging/rtl8188eu/include/rtw_mlme.h 
b/drivers/staging/rtl8188eu/include/rtw_mlme.h
index e727cf0..a234e8d 100644
--- a/drivers/staging/rtl8188eu/include/rtw_mlme.h
+++ b/drivers/staging/rtl8188eu/include/rtw_mlme.h
@@ -571,8 +571,6 @@ void _rtw_free_mlme_priv(struct mlme_priv *pmlmepriv);
 
 int _rtw_enqueue_network(struct __queue *queue, struct wlan_network *pnetwork);
 
-struct wlan_network *_rtw_dequeue_network(struct __queue *queue);
-
 struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv);
 
 void _rtw_free_network_nolock(struct mlme_priv *pmlmepriv,
-- 
1.7.10.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 10/16] staging: rtl8188eu: Rename _rtw_free_network_queue() to rtw_free_network_queue()

2014-07-13 Thread navin patidar
Signed-off-by: navin patidar 
---
 drivers/staging/rtl8188eu/core/rtw_mlme.c|8 +---
 drivers/staging/rtl8188eu/include/rtw_mlme.h |2 --
 2 files changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c 
b/drivers/staging/rtl8188eu/core/rtw_mlme.c
index 3314708..b1e406e 100644
--- a/drivers/staging/rtl8188eu/core/rtw_mlme.c
+++ b/drivers/staging/rtl8188eu/core/rtw_mlme.c
@@ -265,7 +265,7 @@ exit:
 }
 
 
-void _rtw_free_network_queue(struct adapter *padapter, u8 isfreeall)
+void rtw_free_network_queue(struct adapter *padapter, u8 isfreeall)
 {
struct list_head *phead, *plist;
struct wlan_network *pnetwork;
@@ -360,12 +360,6 @@ static void rtw_free_network_nolock(struct mlme_priv 
*pmlmepriv,
_rtw_free_network_nolock(pmlmepriv, pnetwork);
 }
 
-
-void rtw_free_network_queue(struct adapter *dev, u8 isfreeall)
-{
-   _rtw_free_network_queue(dev, isfreeall);
-}
-
 /*
return the wlan_network with the matching addr
 
diff --git a/drivers/staging/rtl8188eu/include/rtw_mlme.h 
b/drivers/staging/rtl8188eu/include/rtw_mlme.h
index 75f8cf5..56ef600 100644
--- a/drivers/staging/rtl8188eu/include/rtw_mlme.h
+++ b/drivers/staging/rtl8188eu/include/rtw_mlme.h
@@ -584,8 +584,6 @@ void _rtw_free_network_nolock(struct mlme_priv *pmlmepriv,
 
 struct wlan_network *_rtw_find_network(struct __queue *scanned_queue, u8 
*addr);
 
-void _rtw_free_network_queue(struct adapter *padapter, u8 isfreeall);
-
 int rtw_if_up(struct adapter *padapter);
 
 
-- 
1.7.10.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 14/16] staging: rtl8188eu: Remove unused function _rtw_enqueue_network()

2014-07-13 Thread navin patidar

Signed-off-by: navin patidar 
---
 drivers/staging/rtl8188eu/core/rtw_mlme.c|   15 ---
 drivers/staging/rtl8188eu/include/rtw_mlme.h |2 --
 2 files changed, 17 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c 
b/drivers/staging/rtl8188eu/core/rtw_mlme.c
index 5ab6752..2aafac3 100644
--- a/drivers/staging/rtl8188eu/core/rtw_mlme.c
+++ b/drivers/staging/rtl8188eu/core/rtw_mlme.c
@@ -127,21 +127,6 @@ void _rtw_free_mlme_priv(struct mlme_priv *pmlmepriv)
}
 }
 
-int_rtw_enqueue_network(struct __queue *queue, struct wlan_network 
*pnetwork)
-{
-   if (pnetwork == NULL)
-   goto exit;
-
-   spin_lock_bh(&queue->lock);
-
-   list_add_tail(&pnetwork->list, &queue->queue);
-
-   spin_unlock_bh(&queue->lock);
-
-exit:
-   return _SUCCESS;
-}
-
 struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv)/* _queue 
*free_queue) */
 {
struct  wlan_network*pnetwork;
diff --git a/drivers/staging/rtl8188eu/include/rtw_mlme.h 
b/drivers/staging/rtl8188eu/include/rtw_mlme.h
index a234e8d..13f8702 100644
--- a/drivers/staging/rtl8188eu/include/rtw_mlme.h
+++ b/drivers/staging/rtl8188eu/include/rtw_mlme.h
@@ -569,8 +569,6 @@ void rtw_free_mlme_priv_ie_data(struct mlme_priv 
*pmlmepriv);
 
 void _rtw_free_mlme_priv(struct mlme_priv *pmlmepriv);
 
-int _rtw_enqueue_network(struct __queue *queue, struct wlan_network *pnetwork);
-
 struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv);
 
 void _rtw_free_network_nolock(struct mlme_priv *pmlmepriv,
-- 
1.7.10.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 16/16] staging: rtl8188eu: Rename _rtw_init_mlme_priv() to rtw_init_mlme_priv()

2014-07-13 Thread navin patidar

Signed-off-by: navin patidar 
---
 drivers/staging/rtl8188eu/core/rtw_mlme.c|9 +
 drivers/staging/rtl8188eu/include/rtw_mlme.h |3 ---
 2 files changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c 
b/drivers/staging/rtl8188eu/core/rtw_mlme.c
index 7293589..c15fab2 100644
--- a/drivers/staging/rtl8188eu/core/rtw_mlme.c
+++ b/drivers/staging/rtl8188eu/core/rtw_mlme.c
@@ -35,7 +35,7 @@
 extern unsigned char   MCS_rate_2R[16];
 extern unsigned char   MCS_rate_1R[16];
 
-int _rtw_init_mlme_priv(struct adapter *padapter)
+int rtw_init_mlme_priv(struct adapter *padapter)
 {
int i;
u8  *pbuf;
@@ -302,13 +302,6 @@ u8 *rtw_get_beacon_interval_from_ie(u8 *ie)
return ie + 8;
 }
 
-int rtw_init_mlme_priv(struct adapter *padapter)
-{
-   int res;
-   res = _rtw_init_mlme_priv(padapter);/*  (pmlmepriv); */
-   return res;
-}
-
 static struct wlan_network *rtw_alloc_network(struct mlme_priv *pmlmepriv)
 {
return _rtw_alloc_network(pmlmepriv);
diff --git a/drivers/staging/rtl8188eu/include/rtw_mlme.h 
b/drivers/staging/rtl8188eu/include/rtw_mlme.h
index 2a828ec..5b1fcd2 100644
--- a/drivers/staging/rtl8188eu/include/rtw_mlme.h
+++ b/drivers/staging/rtl8188eu/include/rtw_mlme.h
@@ -562,9 +562,6 @@ void rtw_dynamic_check_timer_handlder(struct adapter 
*adapter);
 #define rtw_set_scan_deny_timer_hdl(adapter) do {} while (0)
 #define rtw_set_scan_deny(adapter, ms) do {} while (0)
 
-
-int _rtw_init_mlme_priv(struct adapter *padapter);
-
 void rtw_free_mlme_priv_ie_data(struct mlme_priv *pmlmepriv);
 
 struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv);
-- 
1.7.10.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 15/16] staging: rtl8188eu: Rename _rtw_free_mlme_priv() to rtw_free_mlme_priv()

2014-07-13 Thread navin patidar

Signed-off-by: navin patidar 
---
 drivers/staging/rtl8188eu/core/rtw_mlme.c|8 +---
 drivers/staging/rtl8188eu/include/rtw_mlme.h |2 --
 2 files changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c 
b/drivers/staging/rtl8188eu/core/rtw_mlme.c
index 2aafac3..7293589 100644
--- a/drivers/staging/rtl8188eu/core/rtw_mlme.c
+++ b/drivers/staging/rtl8188eu/core/rtw_mlme.c
@@ -117,7 +117,7 @@ void rtw_free_mlme_priv_ie_data(struct mlme_priv *pmlmepriv)
 }
 #endif
 
-void _rtw_free_mlme_priv(struct mlme_priv *pmlmepriv)
+void rtw_free_mlme_priv(struct mlme_priv *pmlmepriv)
 {
rtw_free_mlme_priv_ie_data(pmlmepriv);
 
@@ -309,12 +309,6 @@ int rtw_init_mlme_priv(struct adapter *padapter)
return res;
 }
 
-void rtw_free_mlme_priv(struct mlme_priv *pmlmepriv)
-{
-   RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("rtw_free_mlme_priv\n"));
-   _rtw_free_mlme_priv(pmlmepriv);
-}
-
 static struct wlan_network *rtw_alloc_network(struct mlme_priv *pmlmepriv)
 {
return _rtw_alloc_network(pmlmepriv);
diff --git a/drivers/staging/rtl8188eu/include/rtw_mlme.h 
b/drivers/staging/rtl8188eu/include/rtw_mlme.h
index 13f8702..2a828ec 100644
--- a/drivers/staging/rtl8188eu/include/rtw_mlme.h
+++ b/drivers/staging/rtl8188eu/include/rtw_mlme.h
@@ -567,8 +567,6 @@ int _rtw_init_mlme_priv(struct adapter *padapter);
 
 void rtw_free_mlme_priv_ie_data(struct mlme_priv *pmlmepriv);
 
-void _rtw_free_mlme_priv(struct mlme_priv *pmlmepriv);
-
 struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv);
 
 void _rtw_free_network_nolock(struct mlme_priv *pmlmepriv,
-- 
1.7.10.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] drivers: staging: lustre: Use 'force_die' instead of 'die' to avoid compiling issue

2014-07-13 Thread Chen Gang
Some of architectures have already defined 'die' as macro, so can not use
this common name as declaration in other modules, or will cause compiling
issue. So use more precise name 'force_die' (like 'wrap_bulk') instead of.

The related error (with allmodconfig under score):

CC [M]  drivers/staging/lustre/lustre/ptlrpc/sec.o
  drivers/staging/lustre/lustre/ptlrpc/sec.c: In function 
'sptlrpc_cli_ctx_expire':
  drivers/staging/lustre/lustre/ptlrpc/sec.c:309:13: error: 'struct 
ptlrpc_ctx_ops' has no member named '__die'
ctx->cc_ops->die(ctx, 0);
   ^
  drivers/staging/lustre/lustre/ptlrpc/sec.c: In function 'ctx_refresh_timeout':
  drivers/staging/lustre/lustre/ptlrpc/sec.c:594:26: error: 'struct 
ptlrpc_ctx_ops' has no member named '__die'
 req->rq_cli_ctx->cc_ops->die(req->rq_cli_ctx, 0);
^
  make[5]: *** [drivers/staging/lustre/lustre/ptlrpc/sec.o] Error 1
  make[4]: *** [drivers/staging/lustre/lustre/ptlrpc] Error 2
  make[3]: *** [drivers/staging/lustre/lustre] Error 2
  make[2]: *** [drivers/staging/lustre] Error 2
  make[1]: *** [drivers/staging] Error 2
  make: *** [drivers] Error 2


Signed-off-by: Chen Gang 
---
 drivers/staging/lustre/lustre/include/lustre_sec.h | 2 +-
 drivers/staging/lustre/lustre/ptlrpc/sec.c | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/lustre_sec.h 
b/drivers/staging/lustre/lustre/include/lustre_sec.h
index 50d2f01..1b8ec11 100644
--- a/drivers/staging/lustre/lustre/include/lustre_sec.h
+++ b/drivers/staging/lustre/lustre/include/lustre_sec.h
@@ -387,7 +387,7 @@ struct ptlrpc_ctx_ops {
/**
 * Force the \a ctx to die.
 */
-   void(*die)   (struct ptlrpc_cli_ctx *ctx,
+   void(*force_die)   (struct ptlrpc_cli_ctx *ctx,
int grace);
int (*display) (struct ptlrpc_cli_ctx *ctx,
char *buf, int bufsize);
diff --git a/drivers/staging/lustre/lustre/ptlrpc/sec.c 
b/drivers/staging/lustre/lustre/ptlrpc/sec.c
index 28ac824..bb5b4b6 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/sec.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/sec.c
@@ -305,8 +305,8 @@ EXPORT_SYMBOL(sptlrpc_cli_ctx_put);
  */
 void sptlrpc_cli_ctx_expire(struct ptlrpc_cli_ctx *ctx)
 {
-   LASSERT(ctx->cc_ops->die);
-   ctx->cc_ops->die(ctx, 0);
+   LASSERT(ctx->cc_ops->force_die);
+   ctx->cc_ops->force_die(ctx, 0);
 }
 EXPORT_SYMBOL(sptlrpc_cli_ctx_expire);
 
@@ -591,7 +591,7 @@ int ctx_refresh_timeout(void *data)
 * later than the context refresh expire time.
 */
if (rc == 0)
-   req->rq_cli_ctx->cc_ops->die(req->rq_cli_ctx, 0);
+   req->rq_cli_ctx->cc_ops->force_die(req->rq_cli_ctx, 0);
return rc;
 }
 
-- 
1.7.11.7
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[RESEND PATCH] staging: android: Clean up binder_send_failed_reply

2014-07-13 Thread Lucas Tanure
Kernel coding style. Remove useless else statement after return.

Signed-off-by: Lucas Tanure 
---
 drivers/staging/android/binder.c | 27 +--
 1 file changed, 13 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c
index 14714a6..67c9847 100644
--- a/drivers/staging/android/binder.c
+++ b/drivers/staging/android/binder.c
@@ -1210,24 +1210,23 @@ static void binder_send_failed_reply(struct 
binder_transaction *t,
target_thread->return_error);
}
return;
-   } else {
-   struct binder_transaction *next = t->from_parent;
+   }
+   struct binder_transaction *next = t->from_parent;
 
-   binder_debug(BINDER_DEBUG_FAILED_TRANSACTION,
-"send failed reply for transaction %d, 
target dead\n",
-t->debug_id);
+   binder_debug(BINDER_DEBUG_FAILED_TRANSACTION,
+   "send failed reply for transaction %d, target dead\n",
+   t->debug_id);
 
-   binder_pop_transaction(target_thread, t);
-   if (next == NULL) {
-   binder_debug(BINDER_DEBUG_DEAD_BINDER,
-"reply failed, no target thread at 
root\n");
-   return;
-   }
-   t = next;
+   binder_pop_transaction(target_thread, t);
+   if (next == NULL) {
binder_debug(BINDER_DEBUG_DEAD_BINDER,
-"reply failed, no target thread -- retry 
%d\n",
- t->debug_id);
+"reply failed, no target thread at 
root\n");
+   return;
}
+   t = next;
+   binder_debug(BINDER_DEBUG_DEAD_BINDER,
+"reply failed, no target thread -- retry %d\n",
+ t->debug_id);
}
 }
 
-- 
2.0.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] drivers: Let several drivers depends on HAS_IOMEM for 'devm_ioremap_resource'

2014-07-13 Thread Chen Gang
On 07/13/2014 10:25 PM, Lars-Peter Clausen wrote:
> On 07/13/2014 04:03 PM, Richard Weinberger wrote:
>> Am 13.07.2014 15:56, schrieb Lars-Peter Clausen:
>>> On 07/13/2014 03:40 PM, Richard Weinberger wrote:
 Am 13.07.2014 15:26, schrieb Lars-Peter Clausen:
> On 07/13/2014 11:45 AM, Richard Weinberger wrote:
>> Am 13.07.2014 11:27, schrieb Lennox Wu:
>>> As I said before, some configurations don't make sense.
>>
>> If such a configuration can be achieved using allmod/yesconfig it has to 
>> be fixed.
>> Chen's fixes seem reasonable as not all architectures support iomem.
>
> Maybe we should stub out ioremap() and friends when COMPILE_TEST is 
> enabled to avoid these linker errors. That's in my opinion better than 
> turning most of the 'depends on
> COMPILE_TEST' into 'depends on COMPILE_TEST && HAS_IOMEM'. The issue 
> comes up quite a lot and it is often overlooked when adding a driver that 
> can be build when COMPILE_TEST is
> enabled.

 And what should this stub do?
 Except calling BUG()...
>>>
>>> return NULL;
>>>
>>> It's for compile testing, it's not meant to work at runtime.
>>
>> Hm, I really don't like the idea of having a non-working kernel.
>> IMHO either it should build _and_ run and nothing else.
>> Greg, what do you think?
> 
> The kernel will still be working fine and you can run it on a system. The 
> drivers which use ioremap() or similar are probably not instantiated on a 
> system that does not provide HAS_IOMEM. But even if it was the driver should 
> handle ioremap() returning NULL gracefully and abort the driver probe. That 
> said you'll probably not run a kernel that was built with COMPILE_TEST on 
> your real hardware since it contains so many drivers that are completely 
> useless on your hardware. The idea of COMPILE_TEST is to have as much compile 
> test exposure as possible to the code that is enabled by COMPILE_TEST. 
> Stubbing out ioremap() and friends when HAS_IOMEM is not set and COMPILE_TEST 
> is set makes it easier to get there.
> 

For me, welcome Greg's idea or suggestion for it.

And also if the reply contents are wrapped (e.g. within 80 or less), that
will generate a better display under other members' email clients.


Thanks
-- 
Chen Gang

Open share and attitude like air water and life which God blessed
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 1/2] staging: vt6556: Cleanup coding style issues

2014-07-13 Thread Peter Senna Tschudin
This patch cleanup coding style issues reported by checkpatch.

Tested by compilation only.

Signed-off-by: Peter Senna Tschudin 
---
Based on latests staging-next.

 drivers/staging/vt6656/baseband.c | 28 
 1 file changed, 16 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/vt6656/baseband.c 
b/drivers/staging/vt6656/baseband.c
index c1675d5..040b232 100644
--- a/drivers/staging/vt6656/baseband.c
+++ b/drivers/staging/vt6656/baseband.c
@@ -26,9 +26,10 @@
  * Date: Jun. 5, 2002
  *
  * Functions:
- *  vnt_get_frame_time- Calculate data frame transmitting time
- *  vnt_get_phy_field   - Calculate PhyLength, PhyService and Phy Signal 
parameter for baseband Tx
- *  BBbVT3184Init  - VIA VT3184 baseband chip init code
+ * vnt_get_frame_time  - Calculate data frame transmitting time
+ * vnt_get_phy_field   - Calculate PhyLength, PhyService and Phy
+ *   Signal parameter for baseband Tx
+ * BBbVT3184Init   - VIA VT3184 baseband chip init code
  *
  * Revision History:
  *
@@ -86,7 +87,7 @@ static u8 vnt_vt3184_al2230[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00  /* 0xff */
 };
 
-//{{RobertYu:20060515, new BB setting for VT3226D0
+/* {{RobertYu:20060515, new BB setting for VT3226D0 */
 static u8 vnt_vt3184_vt3226d0[] = {
0x31, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00,
0x70, 0x45, 0x2a, 0x76, 0x00, 0x00, 0x80, 0x00, /* 0x0f */
@@ -122,8 +123,9 @@ static u8 vnt_vt3184_vt3226d0[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00  /* 0xff */
 };
 
-static const u16 awcFrameTime[MAX_RATE] =
-{10, 20, 55, 110, 24, 36, 48, 72, 96, 144, 192, 216};
+static const u16 awcFrameTime[MAX_RATE] = {
+   10, 20, 55, 110, 24, 36, 48, 72, 96, 144, 192, 216
+};
 
 /*
  * Description: Calculate data frame transmitting time
@@ -191,9 +193,9 @@ unsigned int vnt_get_frame_time(u8 preamble_type, u8 
pkt_type,
  *  tx_rate   - Tx Rate
  *  Out:
  * struct vnt_phy_field *phy
- * - pointer to Phy Length field
- * - pointer to Phy Service field
- * - pointer to Phy Signal field
+ * - pointer to Phy Length field
+ * - pointer to Phy Service field
+ * - pointer to Phy Signal field
  *
  * Return Value: none
  *
@@ -450,8 +452,9 @@ int BBbVT3184Init(struct vnt_private *priv)
priv->ldBmThreshold[2] = 0;
priv->ldBmThreshold[3] = 0;
/* Fix VT3226 DFC system timing issue */
-   vnt_mac_reg_bits_on(priv, MAC_REG_SOFTPWRCTL2, 
SOFTPWRCTL_RFLEOPT);
-   } else if ((priv->byRFType == RF_VT3342A0)) {
+   vnt_mac_reg_bits_on(priv, MAC_REG_SOFTPWRCTL2,
+   SOFTPWRCTL_RFLEOPT);
+   } else if (priv->byRFType == RF_VT3342A0) {
priv->byBBRxConf = vnt_vt3184_vt3226d0[10];
length = sizeof(vnt_vt3184_vt3226d0);
addr = vnt_vt3184_vt3226d0;
@@ -467,7 +470,8 @@ int BBbVT3184Init(struct vnt_private *priv)
priv->ldBmThreshold[2] = 0;
priv->ldBmThreshold[3] = 0;
/* Fix VT3226 DFC system timing issue */
-   vnt_mac_reg_bits_on(priv, MAC_REG_SOFTPWRCTL2, 
SOFTPWRCTL_RFLEOPT);
+   vnt_mac_reg_bits_on(priv, MAC_REG_SOFTPWRCTL2,
+   SOFTPWRCTL_RFLEOPT);
} else {
return true;
}
-- 
1.9.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 2/2] staging: vt6556: Cleanup coding style issues

2014-07-13 Thread Peter Senna Tschudin
This patch cleanup coding style issues reported by checkpatch.

Tested by compilation only.

Signed-off-by: Peter Senna Tschudin 
---
Based on latest staging-next.

 drivers/staging/vt6656/main_usb.c | 118 +-
 1 file changed, 54 insertions(+), 64 deletions(-)

diff --git a/drivers/staging/vt6656/main_usb.c 
b/drivers/staging/vt6656/main_usb.c
index 4cdf29e..13be8b2 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -62,7 +62,7 @@
 #include "int.h"
 
 /* static int msglevel = MSG_LEVEL_DEBUG; */
-static int  msglevel=MSG_LEVEL_INFO;
+static int msglevel = MSG_LEVEL_INFO;
 
 /*
  * define module options
@@ -75,18 +75,18 @@ MODULE_AUTHOR(DRIVER_AUTHOR);
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION(DEVICE_FULL_DRV_NAM);
 
-#define DEVICE_PARAM(N,D) \
-static int N[MAX_UINTS]=OPTION_DEFAULT;\
-module_param_array(N, int, NULL, 0);\
-MODULE_PARM_DESC(N, D);
+#define DEVICE_PARAM(N, D) \
+   static int N[MAX_UINTS] = OPTION_DEFAULT;   \
+   module_param_array(N, int, NULL, 0);\
+   MODULE_PARM_DESC(N, D)
 
-#define RX_DESC_DEF0 64
-DEVICE_PARAM(RxDescriptors0,"Number of receive usb desc buffer");
+#define RX_DESC_DEF0 64
+DEVICE_PARAM(RxDescriptors0, "Number of receive usb desc buffer");
 
-#define TX_DESC_DEF0 64
-DEVICE_PARAM(TxDescriptors0,"Number of transmit usb desc buffer");
+#define TX_DESC_DEF0 64
+DEVICE_PARAM(TxDescriptors0, "Number of transmit usb desc buffer");
 
-#define CHANNEL_DEF 6
+#define CHANNEL_DEF 6
 DEVICE_PARAM(Channel, "Channel number");
 
 /* PreambleType[] is the preamble length used for transmit.
@@ -177,13 +177,12 @@ static struct usb_device_id vt6656_table[] = {
 /* frequency list (map channels to frequencies) */
 /*
 static const long frequency_list[] = {
-2412, 2417, 2422, 2427, 2432, 2437, 2442, 2447, 2452, 2457, 2462, 2467, 
2472, 2484,
-4915, 4920, 4925, 4935, 4940, 4945, 4960, 4980,
-5035, 5040, 5045, 5055, 5060, 5080, 5170, 5180, 5190, 5200, 5210, 5220, 
5230, 5240,
-5260, 5280, 5300, 5320, 5500, 5520, 5540, 5560, 5580, 5600, 5620, 5640, 
5660, 5680,
-5700, 5745, 5765, 5785, 5805, 5825
-   };
-
+   2412, 2417, 2422, 2427, 2432, 2437, 2442, 2447, 2452, 2457, 2462, 2467,
+   2472, 2484, 4915, 4920, 4925, 4935, 4940, 4945, 4960, 4980, 5035, 5040,
+   5045, 5055, 5060, 5080, 5170, 5180, 5190, 5200, 5210, 5220, 5230, 5240,
+   5260, 5280, 5300, 5320, 5500, 5520, 5540, 5560, 5580, 5600, 5620, 5640,
+   5660, 5680, 5700, 5745, 5765, 5785, 5805, 5825
+};
 */
 
 static int vt6656_probe(struct usb_interface *intf,
@@ -206,16 +205,16 @@ static void usb_device_reset(struct vnt_private *pDevice);
 
 static void
 device_set_options(struct vnt_private *pDevice) {
-pDevice->cbTD = TX_DESC_DEF0;
-pDevice->cbRD = RX_DESC_DEF0;
-pDevice->byShortRetryLimit = SHORT_RETRY_DEF;
-pDevice->byLongRetryLimit = LONG_RETRY_DEF;
-pDevice->op_mode = NL80211_IFTYPE_UNSPECIFIED;
-pDevice->byBBType = BBP_TYPE_DEF;
-pDevice->byPacketType = pDevice->byBBType;
-pDevice->byAutoFBCtrl = AUTO_FB_0;
-pDevice->byPreambleType = 0;
-pDevice->bExistSWNetAddr = false;
+   pDevice->cbTD = TX_DESC_DEF0;
+   pDevice->cbRD = RX_DESC_DEF0;
+   pDevice->byShortRetryLimit = SHORT_RETRY_DEF;
+   pDevice->byLongRetryLimit = LONG_RETRY_DEF;
+   pDevice->op_mode = NL80211_IFTYPE_UNSPECIFIED;
+   pDevice->byBBType = BBP_TYPE_DEF;
+   pDevice->byPacketType = pDevice->byBBType;
+   pDevice->byAutoFBCtrl = AUTO_FB_0;
+   pDevice->byPreambleType = 0;
+   pDevice->bExistSWNetAddr = false;
 }
 
 /*
@@ -383,38 +382,40 @@ static int device_init_registers(struct vnt_private 
*pDevice)
/* load vt3266 calibration parameters in EEPROM */
if (pDevice->byRFType == RF_VT3226D0) {
if ((pDevice->abyEEPROM[EEP_OFS_MAJOR_VER] == 0x1) &&
-   (pDevice->abyEEPROM[EEP_OFS_MINOR_VER] >= 0x4)) {
+  (pDevice->abyEEPROM[EEP_OFS_MINOR_VER] >= 0x4)) {
 
byCalibTXIQ = pDevice->abyEEPROM[EEP_OFS_CALIB_TX_IQ];
byCalibTXDC = pDevice->abyEEPROM[EEP_OFS_CALIB_TX_DC];
byCalibRXIQ = pDevice->abyEEPROM[EEP_OFS_CALIB_RX_IQ];
if (byCalibTXIQ || byCalibTXDC || byCalibRXIQ) {
-   /* CR255, enable TX/RX IQ and DC compensation mode */
+   /* CR255, enable TX/RX IQ and
+  DC compensation mode */
vnt_control_out_u8(pDevice,
-   MESSAGE_REQUEST_BBREG,
-   0xff,
-   0x03);
-   /* CR251, TX I/Q Imbalance Calibration */
+  MESSAGE_REQUEST_BBREG,
+  

[PATCH] staging: vt6556: Cleanup coding style issues

2014-07-13 Thread Peter Senna Tschudin
This patch cleanup coding style issues reported by checkpatch.

Additionally this typedef was removed from card.h:

typedef enum _CARD_PHY_TYPE {
PHY_TYPE_AUTO = 0,
PHY_TYPE_11B,
PHY_TYPE_11G,
PHY_TYPE_11A
} CARD_PHY_TYPE, *PCARD_PHY_TYPE;

Tested by compilation only.

Signed-off-by: Peter Senna Tschudin 
---
Done against latest staging-next.

 drivers/staging/vt6656/card.c | 19 ---
 drivers/staging/vt6656/card.h | 13 +++--
 2 files changed, 11 insertions(+), 21 deletions(-)

diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c
index ea06b63..f469d68 100644
--- a/drivers/staging/vt6656/card.c
+++ b/drivers/staging/vt6656/card.c
@@ -55,11 +55,12 @@
 #include "key.h"
 #include "usbpipe.h"
 
-//const u16 cwRXBCNTSFOff[MAX_RATE] =
-//{17, 34, 96, 192, 34, 23, 17, 11, 8, 5, 4, 3};
+/* const u16 cwRXBCNTSFOff[MAX_RATE] =
+   {17, 34, 96, 192, 34, 23, 17, 11, 8, 5, 4, 3}; */
 
-static const u16 cwRXBCNTSFOff[MAX_RATE] =
-{192, 96, 34, 17, 34, 23, 17, 11, 8, 5, 4, 3};
+static const u16 cwRXBCNTSFOff[MAX_RATE] = {
+   192, 96, 34, 17, 34, 23, 17, 11, 8, 5, 4, 3
+};
 
 /*
  * Description: Set NIC media channel
@@ -477,7 +478,7 @@ void vnt_update_top_rates(struct vnt_private *priv)
}
 
priv->byTopCCKBasicRate = top_cck;
- }
+}
 
 int vnt_ofdm_min_rate(struct vnt_private *priv)
 {
@@ -673,9 +674,7 @@ void vnt_reset_next_tbtt(struct vnt_private *priv, u16 
beacon_interval)
data[7] = (u8)(next_tbtt >> 56);
 
vnt_control_out(priv, MESSAGE_TYPE_SET_TSFTBTT,
-   MESSAGE_REQUEST_TBTT, 0, 8, data);
-
-   return;
+   MESSAGE_REQUEST_TBTT, 0, 8, data);
 }
 
 /*
@@ -710,11 +709,9 @@ void vnt_update_next_tbtt(struct vnt_private *priv, u64 
tsf,
data[7] = (u8)(tsf >> 56);
 
vnt_control_out(priv, MESSAGE_TYPE_SET_TSFTBTT,
-   MESSAGE_REQUEST_TBTT, 0, 8, data);
+   MESSAGE_REQUEST_TBTT, 0, 8, data);
 
dev_dbg(&priv->usb->dev, "%s TBTT: %8llx\n", __func__, tsf);
-
-   return;
 }
 
 /*
diff --git a/drivers/staging/vt6656/card.h b/drivers/staging/vt6656/card.h
index 5b7cc5a..03fc167 100644
--- a/drivers/staging/vt6656/card.h
+++ b/drivers/staging/vt6656/card.h
@@ -32,16 +32,9 @@
 
 /* init card type */
 
-typedef enum _CARD_PHY_TYPE {
-PHY_TYPE_AUTO = 0,
-PHY_TYPE_11B,
-PHY_TYPE_11G,
-PHY_TYPE_11A
-} CARD_PHY_TYPE, *PCARD_PHY_TYPE;
-
-#define CB_MAX_CHANNEL_24G  14
-#define CB_MAX_CHANNEL_5G   42 /* add channel9(5045MHz), 41==>42 */
-#define CB_MAX_CHANNEL  (CB_MAX_CHANNEL_24G+CB_MAX_CHANNEL_5G)
+#define CB_MAX_CHANNEL_24G 14
+#define CB_MAX_CHANNEL_5G  42 /* add channel9(5045MHz), 41==>42 */
+#define CB_MAX_CHANNEL (CB_MAX_CHANNEL_24G + CB_MAX_CHANNEL_5G)
 
 struct vnt_private;
 
-- 
1.9.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [RESEND PATCH] staging: android: Clean up binder_send_failed_reply

2014-07-13 Thread Greg Kroah-Hartman
On Sun, Jul 13, 2014 at 11:49:29AM -0300, Lucas Tanure wrote:
> Kernel coding style. Remove useless else statement after return.
> 
> Signed-off-by: Lucas Tanure 
> ---
>  drivers/staging/android/binder.c | 27 +--
>  1 file changed, 13 insertions(+), 14 deletions(-)

Why the "RESEND"?  What was wrong with the first patch?  What is
different with this one?

confused,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: vt6556: Cleanup coding style issues

2014-07-13 Thread Peter Senna Tschudin
This patch cleanup coding style issues reported by checkpatch.

This patch change the following enums:
 - typedef enum __device_msg_level
 - typedef enum __DEVICE_NDIS_STATUS

Tested by compilation only.

Signed-off-by: Peter Senna Tschudin 
---
Made against latest staging-next.
 drivers/staging/vt6656/channel.c |  5 +++--
 drivers/staging/vt6656/device.h  | 27 +--
 2 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/drivers/staging/vt6656/channel.c b/drivers/staging/vt6656/channel.c
index fb1838e..4a53f1a 100644
--- a/drivers/staging/vt6656/channel.c
+++ b/drivers/staging/vt6656/channel.c
@@ -28,8 +28,9 @@
  *
  *
  * Revision History:
- *  01-18-2005  RobertYu:  remove the for loop searching in 
ChannelValid,
- * change ChannelRuleTab to lookup-type, 
reorder table items.
+ * 01-18-2005  RobertYu:   remove the for loop searching in
+ * ChannelValid, change ChannelRuleTab
+ * to lookup-type, reorder table items.
  *
  *
  */
diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index 789c55d..e3acf2f 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -187,13 +187,13 @@
 
 #define DBG_PRT(l, p, args...) { if (l <= msglevel) printk(p, ##args); }
 
-typedef enum __device_msg_level {
+enum {
MSG_LEVEL_ERR = 0,/* Errors causing abnormal operation */
MSG_LEVEL_NOTICE = 1, /* Errors needing user notification */
MSG_LEVEL_INFO = 2,   /* Normal message. */
MSG_LEVEL_VERBOSE = 3,/* Will report all trival errors. */
MSG_LEVEL_DEBUG = 4   /* Only for debug purpose. */
-} DEVICE_MSG_LEVEL, *PDEVICE_MSG_LEVEL;
+};
 
 #define DEVICE_INIT_COLD   0x0 /* cold init */
 #define DEVICE_INIT_RESET  0x1 /* reset init or Dx to D0 power remain */
@@ -268,13 +268,12 @@ struct vnt_interrupt_buffer {
 
 /*++ NDIS related */
 
-typedef enum __DEVICE_NDIS_STATUS {
-STATUS_SUCCESS = 0,
-STATUS_FAILURE,
-STATUS_RESOURCES,
-STATUS_PENDING,
-} DEVICE_NDIS_STATUS, *PDEVICE_NDIS_STATUS;
-
+enum {
+   STATUS_SUCCESS = 0,
+   STATUS_FAILURE,
+   STATUS_RESOURCES,
+   STATUS_PENDING,
+};
 
 /* flags for options */
 #define DEVICE_FLAGS_UNPLUG  0x0001UL
@@ -443,11 +442,11 @@ struct vnt_private {
struct ieee80211_low_level_stats low_stats;
 };
 
-#define ADD_ONE_WITH_WRAP_AROUND(uVar, uModulo) {   \
-if ((uVar) >= ((uModulo) - 1))  \
-(uVar) = 0; \
-else\
-(uVar)++;   \
+#define ADD_ONE_WITH_WRAP_AROUND(uVar, uModulo) {  \
+   if ((uVar) >= ((uModulo) - 1))  \
+   (uVar) = 0; \
+   else\
+   (uVar)++;   \
 }
 
 #define fMP_DISCONNECTED0x0002
-- 
1.9.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [RESEND PATCH] staging: android: Clean up binder_send_failed_reply

2014-07-13 Thread Lucas Tanure
I missed on trailing whitespace in first patch.
Didn't saw a ERROR: trailing whitespace in the first patch.

Sorry,
Thanks

--
Lucas Tanure
+55 (19) 988176559
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [RESEND PATCH] staging: android: Clean up binder_send_failed_reply

2014-07-13 Thread Greg Kroah-Hartman
On Sun, Jul 13, 2014 at 01:38:45PM -0300, Lucas Tanure wrote:
> I missed on trailing whitespace in first patch.
> Didn't saw a ERROR: trailing whitespace in the first patch.

Ok.  Please, always say that this is a 'v2' patch, and what the
difference is between this one, and the previous version, otherwise I
have no idea what to do here.

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: Anybody working on ced1401?

2014-07-13 Thread Greg KH
On Fri, Jun 27, 2014 at 05:11:45PM +0200, Luca Ellero wrote:
> Hi Greg,
> 
> On 27/06/2014 16:55, Greg KH wrote:
> >On Fri, Jun 27, 2014 at 03:04:43PM +0200, Luca Ellero wrote:
> >>Il 26/06/2014 21:23, Greg KH ha scritto:
> >>>On Thu, Jun 26, 2014 at 09:36:17AM +0200, Alois Schloegl wrote:
> On 2014-06-18 13:33, Kristina Martšenko wrote:
> >Hi Alois,
> >
> >I'm helping Greg do a bit of cleanup in the staging tree. I noticed that
> >nobody seems to have worked towards moving ced1401 out of staging in
> >over a year. Are there any plans to clean it up and move it out soon?
> >Because otherwise we're going to have to delete the driver, as we don't
> >want staging to become a permanent place for unfinished code.
> >
> >Thanks,
> >Kristina
> >
> 
> 
> Hi Kristina,
> 
> 
> thanks for the notice. Please, give me some time for checking here how
> we want to go forward with this.
> >>>
> >>>What do you mean by this?  You all have had a lot of time, with no real
> >>>progress at all?  How about we delete the driver and if you decide to
> >>>continue to work on it, we can revert that deletion and go from there?
> >>>
> >>>thanks,
> >>>
> >>>greg k-h
> >>
> >>Hi,
> >>I have a hundred patches for this driver ready to send.
> >
> >Why have you not sent them previously?  What is preventing you to send
> >them?
> 
> Because it's only for a few weeks that I've been working on them.
> 
> >>They basically convert all "camelCase" and "Hungarian notation" names to
> >>Linux convention and fix some checkpatch errors (no logic is modified).
> >
> >Do you have this hardware to test the code with?  Do you want to work on
> >getting this driver merged out of the staging tree?
> 
> I used to have one CED1401, but unfortunately I don't have it any more.
> Anyway if Alois (or someone else) can test the patches it would be
> great. I can do a bit more work to get this driver out of staging.

As you don't have the hardware anymore, does it make much sense to keep
working on the driver?  I'd recommend just deleting it, if someone shows
up with the hardware later, we can always revert it.

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v3 1/5] staging:iio:hmc5843: Added regmap support

2014-07-13 Thread Jonathan Cameron

On 08/07/14 14:38, Josef Gajdusek wrote:

This patch changes hmc5843.c to use regmap. This provides transparent caching
to the code as well as abstraction necessary to add support for SPI-based
hmc5983.

Signed-off-by: Josef Gajdusek 

Applied to the togreg branch of iio.git.

Ideally we would have had a short history of the patch below the --- for
each of the patches (or a summary in the cover letter).

Thanks,

---
  drivers/staging/iio/magnetometer/Kconfig   |   1 +
  drivers/staging/iio/magnetometer/hmc5843.c | 140 +++--
  2 files changed, 96 insertions(+), 45 deletions(-)

diff --git a/drivers/staging/iio/magnetometer/Kconfig 
b/drivers/staging/iio/magnetometer/Kconfig
index 34634da..ad88d61 100644
--- a/drivers/staging/iio/magnetometer/Kconfig
+++ b/drivers/staging/iio/magnetometer/Kconfig
@@ -8,6 +8,7 @@ config SENSORS_HMC5843
depends on I2C
select IIO_BUFFER
select IIO_TRIGGERED_BUFFER
+   select REGMAP_I2C
help
  Say Y here to add support for the Honeywell HMC5843, HMC5883 and
  HMC5883L 3-Axis Magnetometer (digital compass).
diff --git a/drivers/staging/iio/magnetometer/hmc5843.c 
b/drivers/staging/iio/magnetometer/hmc5843.c
index d4f4dd9..a458160 100644
--- a/drivers/staging/iio/magnetometer/hmc5843.c
+++ b/drivers/staging/iio/magnetometer/hmc5843.c
@@ -21,6 +21,7 @@

  #include 
  #include 
+#include 
  #include 
  #include 
  #include 
@@ -34,6 +35,7 @@
  #define HMC5843_DATA_OUT_MSB_REGS 0x03
  #define HMC5843_STATUS_REG0x09
  #define HMC5843_ID_REG0x0a
+#define HMC5843_ID_END 0x0c

  enum hmc5843_ids {
HMC5843_ID,
@@ -49,6 +51,7 @@ enum hmc5843_ids {
  #define HMC5843_RANGE_GAIN_OFFSET 0x05
  #define HMC5843_RANGE_GAIN_DEFAULT0x01
  #define HMC5843_RANGE_GAINS   8
+#define HMC5843_RANGE_GAIN_MASK0xe0

  /* Device status */
  #define HMC5843_DATA_READY0x01
@@ -68,6 +71,7 @@ enum hmc5843_ids {
  #define HMC5843_RATE_OFFSET   0x02
  #define HMC5843_RATE_DEFAULT  0x04
  #define HMC5843_RATES 7
+#define HMC5843_RATE_MASK  0x1c

  /* Device measurement configuration */
  #define HMC5843_MEAS_CONF_NORMAL  0x00
@@ -121,10 +125,7 @@ struct hmc5843_chip_info {
  struct hmc5843_data {
struct i2c_client *client;
struct mutex lock;
-   u8 rate;
-   u8 meas_conf;
-   u8 operating_mode;
-   u8 range;
+   struct regmap *regmap;
const struct hmc5843_chip_info *variant;
__be16 buffer[8]; /* 3x 16-bit channels + padding + 64-bit timestamp */
  };
@@ -135,10 +136,8 @@ static s32 hmc5843_set_mode(struct hmc5843_data *data, u8 
operating_mode)
int ret;

mutex_lock(&data->lock);
-   ret = i2c_smbus_write_byte_data(data->client, HMC5843_MODE_REG,
-   operating_mode & HMC5843_MODE_MASK);
-   if (ret >= 0)
-   data->operating_mode = operating_mode;
+   ret = regmap_update_bits(data->regmap, HMC5843_MODE_REG,
+   HMC5843_MODE_MASK, operating_mode);
mutex_unlock(&data->lock);

return ret;
@@ -146,15 +145,15 @@ static s32 hmc5843_set_mode(struct hmc5843_data *data, u8 
operating_mode)

  static int hmc5843_wait_measurement(struct hmc5843_data *data)
  {
-   s32 result;
int tries = 150;
+   int val;
+   int ret;

while (tries-- > 0) {
-   result = i2c_smbus_read_byte_data(data->client,
-   HMC5843_STATUS_REG);
-   if (result < 0)
-   return result;
-   if (result & HMC5843_DATA_READY)
+   ret = regmap_read(data->regmap, HMC5843_STATUS_REG, &val);
+   if (ret < 0)
+   return ret;
+   if (val & HMC5843_DATA_READY)
break;
msleep(20);
}
@@ -171,20 +170,20 @@ static int hmc5843_wait_measurement(struct hmc5843_data 
*data)
  static int hmc5843_read_measurement(struct hmc5843_data *data,
int idx, int *val)
  {
-   s32 result;
__be16 values[3];
+   int ret;

mutex_lock(&data->lock);
-   result = hmc5843_wait_measurement(data);
-   if (result < 0) {
+   ret = hmc5843_wait_measurement(data);
+   if (ret < 0) {
mutex_unlock(&data->lock);
-   return result;
+   return ret;
}
-   result = i2c_smbus_read_i2c_block_data(data->client,
-   HMC5843_DATA_OUT_MSB_REGS, sizeof(values), (u8 *) values);
+   ret = regmap_bulk_read(data->regmap, HMC5843_DATA_OUT_MSB_REGS,
+   values, sizeof(values));
mutex_unlock(&data->lock);
-   if (result < 0)
-   return -EINVAL;
+  

RE: [PATCH V3 0/7] Drivers: scsi: storvsc: Bug fixes and improvements

2014-07-13 Thread KY Srinivasan


> -Original Message-
> From: Christoph Hellwig [mailto:h...@infradead.org]
> Sent: Sunday, July 13, 2014 2:51 AM
> To: KY Srinivasan
> Cc: jasow...@redhat.com; a...@canonical.com; linux-
> ker...@vger.kernel.org; de...@linuxdriverproject.org; oher...@suse.com;
> jbottom...@parallels.com; h...@infradead.org; linux-s...@vger.kernel.org
> Subject: Re: [PATCH V3 0/7] Drivers: scsi: storvsc: Bug fixes and
> improvements
> 
> The series looks good to me, although I'll probably put the commit message
> for the timer patch into the comment for the eh_timed_out handler.

Do you want me to send the patch out with the additional comments. Would
you be checking these in.

K. Y
> 
> Can I get another set of reviews?  I've seen Olaf has put them into the SLES
> tree, so I'd expect he's done a review already?

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v3 2/5] staging:iio:hmc5843: Split hmc5843.c to multiple files

2014-07-13 Thread Jonathan Cameron

On 08/07/14 14:39, Josef Gajdusek wrote:

This patch splits hmc5843.c to multiple files - the interface-agnostic
hmc5843_core.c, i2c specific hmc5843_i2c.c and header file hmc5843.h. This is
another step to add support of SPI-enabled hmc5983.

Signed-off-by: Josef Gajdusek 

Something rather odd is going on when I try to apply this patch to my tree.
It simply refuses to apply and patch -p1  thinks part of it has already
happened. I'm too confused to figure it out at this time on a Sunday.
For now I'm backing out patch 1 as well.

Jonathan

---
  drivers/staging/iio/magnetometer/Kconfig|  16 +-
  drivers/staging/iio/magnetometer/Makefile   |   3 +-
  drivers/staging/iio/magnetometer/hmc5843.c  | 702 
  drivers/staging/iio/magnetometer/hmc5843.h  |  75 +++
  drivers/staging/iio/magnetometer/hmc5843_core.c | 598 
  drivers/staging/iio/magnetometer/hmc5843_i2c.c  | 106 
  6 files changed, 793 insertions(+), 707 deletions(-)
  delete mode 100644 drivers/staging/iio/magnetometer/hmc5843.c
  create mode 100644 drivers/staging/iio/magnetometer/hmc5843.h
  create mode 100644 drivers/staging/iio/magnetometer/hmc5843_core.c
  create mode 100644 drivers/staging/iio/magnetometer/hmc5843_i2c.c

diff --git a/drivers/staging/iio/magnetometer/Kconfig 
b/drivers/staging/iio/magnetometer/Kconfig
index ad88d61..28c2612 100644
--- a/drivers/staging/iio/magnetometer/Kconfig
+++ b/drivers/staging/iio/magnetometer/Kconfig
@@ -5,15 +5,23 @@ menu "Magnetometer sensors"

  config SENSORS_HMC5843
tristate "Honeywell HMC5843/5883/5883L 3-Axis Magnetometer"
-   depends on I2C
+   depends on (I2C || SPI_MASTER)
select IIO_BUFFER
select IIO_TRIGGERED_BUFFER
-   select REGMAP_I2C
+   select SENSORS_HMC5843_I2C if (I2C)
help
  Say Y here to add support for the Honeywell HMC5843, HMC5883 and
  HMC5883L 3-Axis Magnetometer (digital compass).

- To compile this driver as a module, choose M here: the module
- will be called hmc5843.
+ This driver can also be compiled as a set of modules.
+ If so, these modules will be created:
+ - hmc5843_core (core functions)
+ - hmc5843_i2c (support for HMC5843, HMC5883 and HMC5883L)
+
+config SENSORS_HMC5843_I2C
+   tristate
+   depends on I2C
+   depends on SENSORS_HMC5843
+   select REGMAP_I2C

  endmenu
diff --git a/drivers/staging/iio/magnetometer/Makefile 
b/drivers/staging/iio/magnetometer/Makefile
index f9bfb2e..65baf1c 100644
--- a/drivers/staging/iio/magnetometer/Makefile
+++ b/drivers/staging/iio/magnetometer/Makefile
@@ -2,4 +2,5 @@
  # Makefile for industrial I/O Magnetometer sensors
  #

-obj-$(CONFIG_SENSORS_HMC5843)  += hmc5843.o
+obj-$(CONFIG_SENSORS_HMC5843)  += hmc5843_core.o
+obj-$(CONFIG_SENSORS_HMC5843_I2C)  += hmc5843_i2c.o
diff --git a/drivers/staging/iio/magnetometer/hmc5843.c 
b/drivers/staging/iio/magnetometer/hmc5843.c
deleted file mode 100644
index a458160..000
--- a/drivers/staging/iio/magnetometer/hmc5843.c
+++ /dev/null
@@ -1,702 +0,0 @@
-/*  Copyright (C) 2010 Texas Instruments
-Author: Shubhrajyoti Datta 
-Acknowledgement: Jonathan Cameron  for valuable inputs.
-
-Support for HMC5883 and HMC5883L by Peter Meerwald .
-
-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., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#define HMC5843_CONFIG_REG_A   0x00
-#define HMC5843_CONFIG_REG_B   0x01
-#define HMC5843_MODE_REG   0x02
-#define HMC5843_DATA_OUT_MSB_REGS  0x03
-#define HMC5843_STATUS_REG 0x09
-#define HMC5843_ID_REG 0x0a
-#define HMC5843_ID_END 0x0c
-
-enum hmc5843_ids {
-   HMC5843_ID,
-   HMC5883_ID,
-   HMC5883L_ID,
-};
-
-/*
- * Range gain settings in (+-)Ga
- * Beware: HMC5843 and HMC5883 have different recommended sensor field
- * ranges; default corresponds to +-1.0 Ga and +-1.3 Ga, respectively
- */
-#define HMC5843_RANGE_GAIN_OFFSET  0x05
-#define HMC5843_RANGE_GAIN_DEFAULT 0x01
-#define HMC5843_RANGE_GAINS8
-#define HMC5843_RANGE_GAIN_MASK  

Re: [PATCH] drivers/staging/iio/adc/Kconfig: Let MXS_LRADC depend on HAS_IOMEM

2014-07-13 Thread Jonathan Cameron

On 13/07/14 14:27, Marek Vasut wrote:

On Sunday, July 13, 2014 at 01:44:38 PM, Chen Gang wrote:

MXS_LRADC need HAS_IOMEM, so let it depend on HAS_IOMEM

The related error (with allmodconfig under score):

 MODPOST 1365 modules
   ERROR: "devm_ioremap_resource" [drivers/staging/iio/adc/mxs-lradc.ko]
undefined!


Signed-off-by: Chen Gang 


Acked-by: Marek Vasut 

Applied to the togreg branch of iio.git.

Thanks,


Best regards,
Marek Vasut



___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


RE: [PATCH 4/8] Drivers: scsi: storvsc: Filter WRITE_SAME_16

2014-07-13 Thread KY Srinivasan


> -Original Message-
> From: Martin K. Petersen [mailto:martin.peter...@oracle.com]
> Sent: Sunday, July 13, 2014 5:59 AM
> To: KY Srinivasan
> Cc: h...@infradead.org; James Bottomley; linux-ker...@vger.kernel.org;
> de...@linuxdriverproject.org; a...@canonical.com; sta...@vger.kernel.org;
> linux-s...@vger.kernel.org; oher...@suse.com; jasow...@redhat.com
> Subject: Re: [PATCH 4/8] Drivers: scsi: storvsc: Filter WRITE_SAME_16
> 
> > "KY" == KY Srinivasan  writes:
> 
> KY> Windows hosts do support UNMAP and set the field in the EVPD.
> KY> However, since the host advertises SPC-2 compliance, Linux does not
> KY> even query the VPD page.
> 
> >> If we want to enable UNMAP in this case I'd prefer a blacklist entry
> >> than trying UNMAP despite the device not advertising it.
> 
> I agree with that. We could do something like the patch below.
> 
> However, I do think it's a good idea that you guys are looking into reporting
> SPC-3.

Thanks Martin; this patch would address our present issues. I will get some 
testing done
and report back.

Regards,

K. Y
> 
> 
> SCSI: Add a blacklist flag which enables VPD page inquiries
> 
> Despite supporting modern SCSI features some storage devices continue to
> claim conformance to an older version of the SPC spec. This is done for
> compatibility with legacy operating systems.
> 
> Linux by default will not attempt to read VPD pages on devices that claim
> SPC-2 or older. Introduce a blacklist flag that can be used to trigger VPD 
> page
> inquiries on devices that are known to support them.
> 
> Reported-by: KY Srinivasan 
> Signed-off-by: Martin K. Petersen 
> 
> diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index
> 4a6e4ba5a400..a5b1a224628a 100644
> --- a/drivers/scsi/scsi_scan.c
> +++ b/drivers/scsi/scsi_scan.c
> @@ -949,7 +949,9 @@ static int scsi_add_lun(struct scsi_device *sdev,
> unsigned char *inq_result,
> 
>   sdev->eh_timeout = SCSI_DEFAULT_EH_TIMEOUT;
> 
> - if (*bflags & BLIST_SKIP_VPD_PAGES)
> + if (*bflags & BLIST_TRY_VPD_PAGES)
> + sdev->try_vpd_pages = 1;
> + else if (*bflags & BLIST_SKIP_VPD_PAGES)
>   sdev->skip_vpd_pages = 1;
> 
>   transport_configure_device(&sdev->sdev_gendev);
> diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index
> 87566b51fcf7..31d32b9077ca 100644
> --- a/drivers/scsi/sd.c
> +++ b/drivers/scsi/sd.c
> @@ -2701,6 +2701,11 @@ static void sd_read_write_same(struct scsi_disk
> *sdkp, unsigned char *buffer)
> 
>  static int sd_try_extended_inquiry(struct scsi_device *sdp)  {
> + /* Attempt VPD inquiry if the device blacklist explicitly calls
> +  * for it.
> +  */
> + if (sdp->try_vpd_pages)
> + return 1;
>   /*
>* Although VPD inquiries can go to SCSI-2 type devices,
>* some USB ones crash on receiving them, and the pages diff --git
> a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index
> 9aa38f7b303b..f579408620f0 100644
> --- a/include/scsi/scsi_device.h
> +++ b/include/scsi/scsi_device.h
> @@ -155,6 +155,7 @@ struct scsi_device {
>   unsigned skip_ms_page_8:1;  /* do not use MODE SENSE page 0x08
> */
>   unsigned skip_ms_page_3f:1; /* do not use MODE SENSE page 0x3f
> */
>   unsigned skip_vpd_pages:1;  /* do not read VPD pages */
> + unsigned try_vpd_pages:1;   /* attempt to read VPD pages */
>   unsigned use_192_bytes_for_3f:1; /* ask for 192 bytes from page
> 0x3f */
>   unsigned no_start_on_add:1; /* do not issue start on add */
>   unsigned allow_restart:1; /* issue START_UNIT in error handler */
> diff --git a/include/scsi/scsi_devinfo.h b/include/scsi/scsi_devinfo.h index
> 8670c04e199e..1fdd6fc5492b 100644
> --- a/include/scsi/scsi_devinfo.h
> +++ b/include/scsi/scsi_devinfo.h
> @@ -34,4 +34,5 @@
>  #define BLIST_SKIP_VPD_PAGES 0x400 /* Ignore SBC-3 VPD pages
> */
>  #define BLIST_SCSI3LUN   0x800 /* Scan more than 256
> LUNs
>for sequential scan */
> +#define BLIST_TRY_VPD_PAGES  0x1000 /* Attempt to read VPD
> pages */
>  #endif
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 2/2] staging: vt6556: Cleanup coding style issues

2014-07-13 Thread Greg KH
On Sun, Jul 13, 2014 at 05:39:55PM +0200, Peter Senna Tschudin wrote:
> This patch cleanup coding style issues reported by checkpatch.
> 
> Tested by compilation only.
> 
> Signed-off-by: Peter Senna Tschudin 
> ---
> Based on latest staging-next.

You just sent me 4 patches, all with the same subject (but at least 2 of
them had the order in which to apply them in, which is nice.)

Please redo these such that they have a unique subject, and I can tell
which order to apply them in, as I really have no idea about the second
two.

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] drivers: staging: lustre: Use 'force_die' instead of 'die' to avoid compiling issue

2014-07-13 Thread Greg Kroah-Hartman
On Sun, Jul 13, 2014 at 10:50:55PM +0800, Chen Gang wrote:
> Some of architectures have already defined 'die' as macro, so can not use
> this common name as declaration in other modules, or will cause compiling
> issue. So use more precise name 'force_die' (like 'wrap_bulk') instead of.
> 
> The related error (with allmodconfig under score):
> 
> CC [M]  drivers/staging/lustre/lustre/ptlrpc/sec.o
>   drivers/staging/lustre/lustre/ptlrpc/sec.c: In function 
> 'sptlrpc_cli_ctx_expire':
>   drivers/staging/lustre/lustre/ptlrpc/sec.c:309:13: error: 'struct 
> ptlrpc_ctx_ops' has no member named '__die'
> ctx->cc_ops->die(ctx, 0);
>^
>   drivers/staging/lustre/lustre/ptlrpc/sec.c: In function 
> 'ctx_refresh_timeout':
>   drivers/staging/lustre/lustre/ptlrpc/sec.c:594:26: error: 'struct 
> ptlrpc_ctx_ops' has no member named '__die'
>  req->rq_cli_ctx->cc_ops->die(req->rq_cli_ctx, 0);
> ^
>   make[5]: *** [drivers/staging/lustre/lustre/ptlrpc/sec.o] Error 1
>   make[4]: *** [drivers/staging/lustre/lustre/ptlrpc] Error 2
>   make[3]: *** [drivers/staging/lustre/lustre] Error 2
>   make[2]: *** [drivers/staging/lustre] Error 2
>   make[1]: *** [drivers/staging] Error 2
>   make: *** [drivers] Error 2
> 
> 
> Signed-off-by: Chen Gang 
> ---
>  drivers/staging/lustre/lustre/include/lustre_sec.h | 2 +-
>  drivers/staging/lustre/lustre/ptlrpc/sec.c | 6 +++---
>  2 files changed, 4 insertions(+), 4 deletions(-)

This doesn't apply to my tree, can you please refresh it against the
staging-next branch of staging.git so that I can apply it?

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [RESEND PATCH] staging: android: Clean up binder_send_failed_reply

2014-07-13 Thread Greg Kroah-Hartman
On Sun, Jul 13, 2014 at 11:49:29AM -0300, Lucas Tanure wrote:
> Kernel coding style. Remove useless else statement after return.
> 
> Signed-off-by: Lucas Tanure 
> ---
>  drivers/staging/android/binder.c | 27 +--
>  1 file changed, 13 insertions(+), 14 deletions(-)

You didn't compile this patch :(

Or if you did, you ignored the fact that it now adds a warning to the
kernel build process, which is not allowed.  Please fix this up and
resend.

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH V2 2/4] staging: vt6556: Cleanup coding style issues

2014-07-13 Thread Peter Senna Tschudin
This patch cleanup coding style issues reported by checkpatch.

Tested by compilation only.

Signed-off-by: Peter Senna Tschudin 
---
Cahnges from V1:
 - Sent all patches in a series

Made against latest staging-next.

 drivers/staging/vt6656/main_usb.c | 118 +-
 1 file changed, 54 insertions(+), 64 deletions(-)

diff --git a/drivers/staging/vt6656/main_usb.c 
b/drivers/staging/vt6656/main_usb.c
index 4cdf29e..13be8b2 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -62,7 +62,7 @@
 #include "int.h"
 
 /* static int msglevel = MSG_LEVEL_DEBUG; */
-static int  msglevel=MSG_LEVEL_INFO;
+static int msglevel = MSG_LEVEL_INFO;
 
 /*
  * define module options
@@ -75,18 +75,18 @@ MODULE_AUTHOR(DRIVER_AUTHOR);
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION(DEVICE_FULL_DRV_NAM);
 
-#define DEVICE_PARAM(N,D) \
-static int N[MAX_UINTS]=OPTION_DEFAULT;\
-module_param_array(N, int, NULL, 0);\
-MODULE_PARM_DESC(N, D);
+#define DEVICE_PARAM(N, D) \
+   static int N[MAX_UINTS] = OPTION_DEFAULT;   \
+   module_param_array(N, int, NULL, 0);\
+   MODULE_PARM_DESC(N, D)
 
-#define RX_DESC_DEF0 64
-DEVICE_PARAM(RxDescriptors0,"Number of receive usb desc buffer");
+#define RX_DESC_DEF0 64
+DEVICE_PARAM(RxDescriptors0, "Number of receive usb desc buffer");
 
-#define TX_DESC_DEF0 64
-DEVICE_PARAM(TxDescriptors0,"Number of transmit usb desc buffer");
+#define TX_DESC_DEF0 64
+DEVICE_PARAM(TxDescriptors0, "Number of transmit usb desc buffer");
 
-#define CHANNEL_DEF 6
+#define CHANNEL_DEF 6
 DEVICE_PARAM(Channel, "Channel number");
 
 /* PreambleType[] is the preamble length used for transmit.
@@ -177,13 +177,12 @@ static struct usb_device_id vt6656_table[] = {
 /* frequency list (map channels to frequencies) */
 /*
 static const long frequency_list[] = {
-2412, 2417, 2422, 2427, 2432, 2437, 2442, 2447, 2452, 2457, 2462, 2467, 
2472, 2484,
-4915, 4920, 4925, 4935, 4940, 4945, 4960, 4980,
-5035, 5040, 5045, 5055, 5060, 5080, 5170, 5180, 5190, 5200, 5210, 5220, 
5230, 5240,
-5260, 5280, 5300, 5320, 5500, 5520, 5540, 5560, 5580, 5600, 5620, 5640, 
5660, 5680,
-5700, 5745, 5765, 5785, 5805, 5825
-   };
-
+   2412, 2417, 2422, 2427, 2432, 2437, 2442, 2447, 2452, 2457, 2462, 2467,
+   2472, 2484, 4915, 4920, 4925, 4935, 4940, 4945, 4960, 4980, 5035, 5040,
+   5045, 5055, 5060, 5080, 5170, 5180, 5190, 5200, 5210, 5220, 5230, 5240,
+   5260, 5280, 5300, 5320, 5500, 5520, 5540, 5560, 5580, 5600, 5620, 5640,
+   5660, 5680, 5700, 5745, 5765, 5785, 5805, 5825
+};
 */
 
 static int vt6656_probe(struct usb_interface *intf,
@@ -206,16 +205,16 @@ static void usb_device_reset(struct vnt_private *pDevice);
 
 static void
 device_set_options(struct vnt_private *pDevice) {
-pDevice->cbTD = TX_DESC_DEF0;
-pDevice->cbRD = RX_DESC_DEF0;
-pDevice->byShortRetryLimit = SHORT_RETRY_DEF;
-pDevice->byLongRetryLimit = LONG_RETRY_DEF;
-pDevice->op_mode = NL80211_IFTYPE_UNSPECIFIED;
-pDevice->byBBType = BBP_TYPE_DEF;
-pDevice->byPacketType = pDevice->byBBType;
-pDevice->byAutoFBCtrl = AUTO_FB_0;
-pDevice->byPreambleType = 0;
-pDevice->bExistSWNetAddr = false;
+   pDevice->cbTD = TX_DESC_DEF0;
+   pDevice->cbRD = RX_DESC_DEF0;
+   pDevice->byShortRetryLimit = SHORT_RETRY_DEF;
+   pDevice->byLongRetryLimit = LONG_RETRY_DEF;
+   pDevice->op_mode = NL80211_IFTYPE_UNSPECIFIED;
+   pDevice->byBBType = BBP_TYPE_DEF;
+   pDevice->byPacketType = pDevice->byBBType;
+   pDevice->byAutoFBCtrl = AUTO_FB_0;
+   pDevice->byPreambleType = 0;
+   pDevice->bExistSWNetAddr = false;
 }
 
 /*
@@ -383,38 +382,40 @@ static int device_init_registers(struct vnt_private 
*pDevice)
/* load vt3266 calibration parameters in EEPROM */
if (pDevice->byRFType == RF_VT3226D0) {
if ((pDevice->abyEEPROM[EEP_OFS_MAJOR_VER] == 0x1) &&
-   (pDevice->abyEEPROM[EEP_OFS_MINOR_VER] >= 0x4)) {
+  (pDevice->abyEEPROM[EEP_OFS_MINOR_VER] >= 0x4)) {
 
byCalibTXIQ = pDevice->abyEEPROM[EEP_OFS_CALIB_TX_IQ];
byCalibTXDC = pDevice->abyEEPROM[EEP_OFS_CALIB_TX_DC];
byCalibRXIQ = pDevice->abyEEPROM[EEP_OFS_CALIB_RX_IQ];
if (byCalibTXIQ || byCalibTXDC || byCalibRXIQ) {
-   /* CR255, enable TX/RX IQ and DC compensation mode */
+   /* CR255, enable TX/RX IQ and
+  DC compensation mode */
vnt_control_out_u8(pDevice,
-   MESSAGE_REQUEST_BBREG,
-   0xff,
-   0x03);
-   /* CR251, TX I/Q Imbalance Calibration */
+  

[PATCH V2 3/4] staging: vt6556: Cleanup coding style issues

2014-07-13 Thread Peter Senna Tschudin
This patch cleanup coding style issues reported by checkpatch.

Additionally this typedef was removed from card.h:

typedef enum _CARD_PHY_TYPE {
PHY_TYPE_AUTO = 0,
PHY_TYPE_11B,
PHY_TYPE_11G,
PHY_TYPE_11A
} CARD_PHY_TYPE, *PCARD_PHY_TYPE;

Tested by compilation only.

Signed-off-by: Peter Senna Tschudin 
---
Cahnges from V1:
 - Sent all patches in a series

Made against latest staging-next.

 drivers/staging/vt6656/card.c | 19 ---
 drivers/staging/vt6656/card.h | 13 +++--
 2 files changed, 11 insertions(+), 21 deletions(-)

diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c
index ea06b63..f469d68 100644
--- a/drivers/staging/vt6656/card.c
+++ b/drivers/staging/vt6656/card.c
@@ -55,11 +55,12 @@
 #include "key.h"
 #include "usbpipe.h"
 
-//const u16 cwRXBCNTSFOff[MAX_RATE] =
-//{17, 34, 96, 192, 34, 23, 17, 11, 8, 5, 4, 3};
+/* const u16 cwRXBCNTSFOff[MAX_RATE] =
+   {17, 34, 96, 192, 34, 23, 17, 11, 8, 5, 4, 3}; */
 
-static const u16 cwRXBCNTSFOff[MAX_RATE] =
-{192, 96, 34, 17, 34, 23, 17, 11, 8, 5, 4, 3};
+static const u16 cwRXBCNTSFOff[MAX_RATE] = {
+   192, 96, 34, 17, 34, 23, 17, 11, 8, 5, 4, 3
+};
 
 /*
  * Description: Set NIC media channel
@@ -477,7 +478,7 @@ void vnt_update_top_rates(struct vnt_private *priv)
}
 
priv->byTopCCKBasicRate = top_cck;
- }
+}
 
 int vnt_ofdm_min_rate(struct vnt_private *priv)
 {
@@ -673,9 +674,7 @@ void vnt_reset_next_tbtt(struct vnt_private *priv, u16 
beacon_interval)
data[7] = (u8)(next_tbtt >> 56);
 
vnt_control_out(priv, MESSAGE_TYPE_SET_TSFTBTT,
-   MESSAGE_REQUEST_TBTT, 0, 8, data);
-
-   return;
+   MESSAGE_REQUEST_TBTT, 0, 8, data);
 }
 
 /*
@@ -710,11 +709,9 @@ void vnt_update_next_tbtt(struct vnt_private *priv, u64 
tsf,
data[7] = (u8)(tsf >> 56);
 
vnt_control_out(priv, MESSAGE_TYPE_SET_TSFTBTT,
-   MESSAGE_REQUEST_TBTT, 0, 8, data);
+   MESSAGE_REQUEST_TBTT, 0, 8, data);
 
dev_dbg(&priv->usb->dev, "%s TBTT: %8llx\n", __func__, tsf);
-
-   return;
 }
 
 /*
diff --git a/drivers/staging/vt6656/card.h b/drivers/staging/vt6656/card.h
index 5b7cc5a..03fc167 100644
--- a/drivers/staging/vt6656/card.h
+++ b/drivers/staging/vt6656/card.h
@@ -32,16 +32,9 @@
 
 /* init card type */
 
-typedef enum _CARD_PHY_TYPE {
-PHY_TYPE_AUTO = 0,
-PHY_TYPE_11B,
-PHY_TYPE_11G,
-PHY_TYPE_11A
-} CARD_PHY_TYPE, *PCARD_PHY_TYPE;
-
-#define CB_MAX_CHANNEL_24G  14
-#define CB_MAX_CHANNEL_5G   42 /* add channel9(5045MHz), 41==>42 */
-#define CB_MAX_CHANNEL  (CB_MAX_CHANNEL_24G+CB_MAX_CHANNEL_5G)
+#define CB_MAX_CHANNEL_24G 14
+#define CB_MAX_CHANNEL_5G  42 /* add channel9(5045MHz), 41==>42 */
+#define CB_MAX_CHANNEL (CB_MAX_CHANNEL_24G + CB_MAX_CHANNEL_5G)
 
 struct vnt_private;
 
-- 
1.9.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH V2 4/4] staging: vt6556: Cleanup coding style issues

2014-07-13 Thread Peter Senna Tschudin
This patch cleanup coding style issues reported by checkpatch.

This patch change the following enums:
 - typedef enum __device_msg_level
 - typedef enum __DEVICE_NDIS_STATUS

Tested by compilation only.

Signed-off-by: Peter Senna Tschudin 
---
Cahnges from V1:
 - Sent all patches in a series

Made against latest staging-next.

 drivers/staging/vt6656/channel.c |  5 +++--
 drivers/staging/vt6656/device.h  | 27 +--
 2 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/drivers/staging/vt6656/channel.c b/drivers/staging/vt6656/channel.c
index fb1838e..4a53f1a 100644
--- a/drivers/staging/vt6656/channel.c
+++ b/drivers/staging/vt6656/channel.c
@@ -28,8 +28,9 @@
  *
  *
  * Revision History:
- *  01-18-2005  RobertYu:  remove the for loop searching in 
ChannelValid,
- * change ChannelRuleTab to lookup-type, 
reorder table items.
+ * 01-18-2005  RobertYu:   remove the for loop searching in
+ * ChannelValid, change ChannelRuleTab
+ * to lookup-type, reorder table items.
  *
  *
  */
diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index 789c55d..e3acf2f 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -187,13 +187,13 @@
 
 #define DBG_PRT(l, p, args...) { if (l <= msglevel) printk(p, ##args); }
 
-typedef enum __device_msg_level {
+enum {
MSG_LEVEL_ERR = 0,/* Errors causing abnormal operation */
MSG_LEVEL_NOTICE = 1, /* Errors needing user notification */
MSG_LEVEL_INFO = 2,   /* Normal message. */
MSG_LEVEL_VERBOSE = 3,/* Will report all trival errors. */
MSG_LEVEL_DEBUG = 4   /* Only for debug purpose. */
-} DEVICE_MSG_LEVEL, *PDEVICE_MSG_LEVEL;
+};
 
 #define DEVICE_INIT_COLD   0x0 /* cold init */
 #define DEVICE_INIT_RESET  0x1 /* reset init or Dx to D0 power remain */
@@ -268,13 +268,12 @@ struct vnt_interrupt_buffer {
 
 /*++ NDIS related */
 
-typedef enum __DEVICE_NDIS_STATUS {
-STATUS_SUCCESS = 0,
-STATUS_FAILURE,
-STATUS_RESOURCES,
-STATUS_PENDING,
-} DEVICE_NDIS_STATUS, *PDEVICE_NDIS_STATUS;
-
+enum {
+   STATUS_SUCCESS = 0,
+   STATUS_FAILURE,
+   STATUS_RESOURCES,
+   STATUS_PENDING,
+};
 
 /* flags for options */
 #define DEVICE_FLAGS_UNPLUG  0x0001UL
@@ -443,11 +442,11 @@ struct vnt_private {
struct ieee80211_low_level_stats low_stats;
 };
 
-#define ADD_ONE_WITH_WRAP_AROUND(uVar, uModulo) {   \
-if ((uVar) >= ((uModulo) - 1))  \
-(uVar) = 0; \
-else\
-(uVar)++;   \
+#define ADD_ONE_WITH_WRAP_AROUND(uVar, uModulo) {  \
+   if ((uVar) >= ((uModulo) - 1))  \
+   (uVar) = 0; \
+   else\
+   (uVar)++;   \
 }
 
 #define fMP_DISCONNECTED0x0002
-- 
1.9.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH V2 1/4] staging: vt6556: Cleanup coding style issues

2014-07-13 Thread Peter Senna Tschudin
This patch cleanup coding style issues reported by checkpatch.

Tested by compilation only.

Signed-off-by: Peter Senna Tschudin 
---
Cahnges from V1:
 - Sent all patches in a series

Made against latest staging-next.

 drivers/staging/vt6656/baseband.c | 28 
 1 file changed, 16 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/vt6656/baseband.c 
b/drivers/staging/vt6656/baseband.c
index c1675d5..040b232 100644
--- a/drivers/staging/vt6656/baseband.c
+++ b/drivers/staging/vt6656/baseband.c
@@ -26,9 +26,10 @@
  * Date: Jun. 5, 2002
  *
  * Functions:
- *  vnt_get_frame_time- Calculate data frame transmitting time
- *  vnt_get_phy_field   - Calculate PhyLength, PhyService and Phy Signal 
parameter for baseband Tx
- *  BBbVT3184Init  - VIA VT3184 baseband chip init code
+ * vnt_get_frame_time  - Calculate data frame transmitting time
+ * vnt_get_phy_field   - Calculate PhyLength, PhyService and Phy
+ *   Signal parameter for baseband Tx
+ * BBbVT3184Init   - VIA VT3184 baseband chip init code
  *
  * Revision History:
  *
@@ -86,7 +87,7 @@ static u8 vnt_vt3184_al2230[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00  /* 0xff */
 };
 
-//{{RobertYu:20060515, new BB setting for VT3226D0
+/* {{RobertYu:20060515, new BB setting for VT3226D0 */
 static u8 vnt_vt3184_vt3226d0[] = {
0x31, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00,
0x70, 0x45, 0x2a, 0x76, 0x00, 0x00, 0x80, 0x00, /* 0x0f */
@@ -122,8 +123,9 @@ static u8 vnt_vt3184_vt3226d0[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00  /* 0xff */
 };
 
-static const u16 awcFrameTime[MAX_RATE] =
-{10, 20, 55, 110, 24, 36, 48, 72, 96, 144, 192, 216};
+static const u16 awcFrameTime[MAX_RATE] = {
+   10, 20, 55, 110, 24, 36, 48, 72, 96, 144, 192, 216
+};
 
 /*
  * Description: Calculate data frame transmitting time
@@ -191,9 +193,9 @@ unsigned int vnt_get_frame_time(u8 preamble_type, u8 
pkt_type,
  *  tx_rate   - Tx Rate
  *  Out:
  * struct vnt_phy_field *phy
- * - pointer to Phy Length field
- * - pointer to Phy Service field
- * - pointer to Phy Signal field
+ * - pointer to Phy Length field
+ * - pointer to Phy Service field
+ * - pointer to Phy Signal field
  *
  * Return Value: none
  *
@@ -450,8 +452,9 @@ int BBbVT3184Init(struct vnt_private *priv)
priv->ldBmThreshold[2] = 0;
priv->ldBmThreshold[3] = 0;
/* Fix VT3226 DFC system timing issue */
-   vnt_mac_reg_bits_on(priv, MAC_REG_SOFTPWRCTL2, 
SOFTPWRCTL_RFLEOPT);
-   } else if ((priv->byRFType == RF_VT3342A0)) {
+   vnt_mac_reg_bits_on(priv, MAC_REG_SOFTPWRCTL2,
+   SOFTPWRCTL_RFLEOPT);
+   } else if (priv->byRFType == RF_VT3342A0) {
priv->byBBRxConf = vnt_vt3184_vt3226d0[10];
length = sizeof(vnt_vt3184_vt3226d0);
addr = vnt_vt3184_vt3226d0;
@@ -467,7 +470,8 @@ int BBbVT3184Init(struct vnt_private *priv)
priv->ldBmThreshold[2] = 0;
priv->ldBmThreshold[3] = 0;
/* Fix VT3226 DFC system timing issue */
-   vnt_mac_reg_bits_on(priv, MAC_REG_SOFTPWRCTL2, 
SOFTPWRCTL_RFLEOPT);
+   vnt_mac_reg_bits_on(priv, MAC_REG_SOFTPWRCTL2,
+   SOFTPWRCTL_RFLEOPT);
} else {
return true;
}
-- 
1.9.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


RE: [PATCH 2/2] staging: comedi: addi_apci_1564: use addi_watchdog module to init watchdog subdevice

2014-07-13 Thread Hartley Sweeten
On Saturday, July 12, 2014 3:44 PM, Chase Southwood wrote:
> Use the addi_watchdog module to provide support for the watchdog
> subdevice.
>
> Also, rearrange the subdevice init blocks so that the order makes sense.
> Digital input/output subdevices and subdevices for DI/DO interrupt
> support, followed by timer/counter/watchdog subdevices is the new order.
>
> Signed-off-by: Chase Southwood 
> Cc: Ian Abbott 
> Cc: H Hartley Sweeten 
> ---
>  drivers/staging/comedi/drivers/addi_apci_1564.c | 34 
> +++--
>  1 file changed, 20 insertions(+), 14 deletions(-)

Chase,

You should also add the dependency for the addi watchdog module
to the Kconfig.

Regards,
Hartley
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] drivers: Let several drivers depends on HAS_IOMEM for 'devm_ioremap_resource'

2014-07-13 Thread Greg Kroah-Hartman
On Sun, Jul 13, 2014 at 04:25:06PM +0200, Lars-Peter Clausen wrote:
> On 07/13/2014 04:03 PM, Richard Weinberger wrote:
> >Am 13.07.2014 15:56, schrieb Lars-Peter Clausen:
> >>On 07/13/2014 03:40 PM, Richard Weinberger wrote:
> >>>Am 13.07.2014 15:26, schrieb Lars-Peter Clausen:
> On 07/13/2014 11:45 AM, Richard Weinberger wrote:
> >Am 13.07.2014 11:27, schrieb Lennox Wu:
> >>As I said before, some configurations don't make sense.
> >
> >If such a configuration can be achieved using allmod/yesconfig it has to 
> >be fixed.
> >Chen's fixes seem reasonable as not all architectures support iomem.
> 
> Maybe we should stub out ioremap() and friends when COMPILE_TEST is 
> enabled to avoid these linker errors. That's in my opinion better than 
> turning most of the 'depends on
> COMPILE_TEST' into 'depends on COMPILE_TEST && HAS_IOMEM'. The issue 
> comes up quite a lot and it is often overlooked when adding a driver that 
> can be build when COMPILE_TEST is
> enabled.
> >>>
> >>>And what should this stub do?
> >>>Except calling BUG()...
> >>
> >>return NULL;
> >>
> >>It's for compile testing, it's not meant to work at runtime.
> >
> >Hm, I really don't like the idea of having a non-working kernel.
> >IMHO either it should build _and_ run and nothing else.
> >Greg, what do you think?
> 
> The kernel will still be working fine and you can run it on a system. The
> drivers which use ioremap() or similar are probably not instantiated on a
> system that does not provide HAS_IOMEM. But even if it was the driver should
> handle ioremap() returning NULL gracefully and abort the driver probe. That
> said you'll probably not run a kernel that was built with COMPILE_TEST on
> your real hardware since it contains so many drivers that are completely
> useless on your hardware. The idea of COMPILE_TEST is to have as much
> compile test exposure as possible to the code that is enabled by
> COMPILE_TEST. Stubbing out ioremap() and friends when HAS_IOMEM is not set
> and COMPILE_TEST is set makes it easier to get there.

I run my kernels with COMPILE_TEST enabled as I need to build test
things that I don't happen to use.

I like the 'return NULL' option for this, it hits us all the time, might
as well fix it properly like this so that we don't have to deal with
Kconfig changes everywhere.

Also put a big "This platform does not support IOMEM" error printk in
there, so that people have a chance to figure out what is going on if
they happen to run such a driver on a platform that can't support it.

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH V2 1/4] staging: vt6556: Cleanup coding style issues

2014-07-13 Thread Greg KH
On Sun, Jul 13, 2014 at 09:11:18PM +0200, Peter Senna Tschudin wrote:
> This patch cleanup coding style issues reported by checkpatch.
> 
> Tested by compilation only.
> 
> Signed-off-by: Peter Senna Tschudin 
> ---
> Cahnges from V1:
>  - Sent all patches in a series

Why did you forget the other thing that I asked you to change?

I can't take these as-is, sorry, please go back and re-read what I
wrote...

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] drivers: Let several drivers depends on HAS_IOMEM for 'devm_ioremap_resource'

2014-07-13 Thread Richard Weinberger
Am 13.07.2014 21:22, schrieb Greg Kroah-Hartman:
> On Sun, Jul 13, 2014 at 04:25:06PM +0200, Lars-Peter Clausen wrote:
>> On 07/13/2014 04:03 PM, Richard Weinberger wrote:
>>> Am 13.07.2014 15:56, schrieb Lars-Peter Clausen:
 On 07/13/2014 03:40 PM, Richard Weinberger wrote:
> Am 13.07.2014 15:26, schrieb Lars-Peter Clausen:
>> On 07/13/2014 11:45 AM, Richard Weinberger wrote:
>>> Am 13.07.2014 11:27, schrieb Lennox Wu:
 As I said before, some configurations don't make sense.
>>>
>>> If such a configuration can be achieved using allmod/yesconfig it has 
>>> to be fixed.
>>> Chen's fixes seem reasonable as not all architectures support iomem.
>>
>> Maybe we should stub out ioremap() and friends when COMPILE_TEST is 
>> enabled to avoid these linker errors. That's in my opinion better than 
>> turning most of the 'depends on
>> COMPILE_TEST' into 'depends on COMPILE_TEST && HAS_IOMEM'. The issue 
>> comes up quite a lot and it is often overlooked when adding a driver 
>> that can be build when COMPILE_TEST is
>> enabled.
>
> And what should this stub do?
> Except calling BUG()...

 return NULL;

 It's for compile testing, it's not meant to work at runtime.
>>>
>>> Hm, I really don't like the idea of having a non-working kernel.
>>> IMHO either it should build _and_ run and nothing else.
>>> Greg, what do you think?
>>
>> The kernel will still be working fine and you can run it on a system. The
>> drivers which use ioremap() or similar are probably not instantiated on a
>> system that does not provide HAS_IOMEM. But even if it was the driver should
>> handle ioremap() returning NULL gracefully and abort the driver probe. That
>> said you'll probably not run a kernel that was built with COMPILE_TEST on
>> your real hardware since it contains so many drivers that are completely
>> useless on your hardware. The idea of COMPILE_TEST is to have as much
>> compile test exposure as possible to the code that is enabled by
>> COMPILE_TEST. Stubbing out ioremap() and friends when HAS_IOMEM is not set
>> and COMPILE_TEST is set makes it easier to get there.
> 
> I run my kernels with COMPILE_TEST enabled as I need to build test
> things that I don't happen to use.
> 
> I like the 'return NULL' option for this, it hits us all the time, might
> as well fix it properly like this so that we don't have to deal with
> Kconfig changes everywhere.
> 
> Also put a big "This platform does not support IOMEM" error printk in
> there, so that people have a chance to figure out what is going on if
> they happen to run such a driver on a platform that can't support it.

Maybe we could add COMPILE_TEST to the version string too?
Just to detect such kernels fast in user bug reports...

Thanks,
//richard
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [RESEND PATCH] staging: android: Clean up binder_send_failed_reply

2014-07-13 Thread Lucas Tanure
Sorry,
I didn't know. I will fix.

Thanks
--
Lucas Tanure
+55 (19) 988176559


On Sun, Jul 13, 2014 at 4:07 PM, Greg Kroah-Hartman
 wrote:
> On Sun, Jul 13, 2014 at 11:49:29AM -0300, Lucas Tanure wrote:
>> Kernel coding style. Remove useless else statement after return.
>>
>> Signed-off-by: Lucas Tanure 
>> ---
>>  drivers/staging/android/binder.c | 27 +--
>>  1 file changed, 13 insertions(+), 14 deletions(-)
>
> You didn't compile this patch :(
>
> Or if you did, you ignored the fact that it now adds a warning to the
> kernel build process, which is not allowed.  Please fix this up and
> resend.
>
> thanks,
>
> greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] drivers: Let several drivers depends on HAS_IOMEM for 'devm_ioremap_resource'

2014-07-13 Thread Greg Kroah-Hartman
On Sun, Jul 13, 2014 at 09:33:38PM +0200, Richard Weinberger wrote:
> Am 13.07.2014 21:22, schrieb Greg Kroah-Hartman:
> > On Sun, Jul 13, 2014 at 04:25:06PM +0200, Lars-Peter Clausen wrote:
> >> On 07/13/2014 04:03 PM, Richard Weinberger wrote:
> >>> Am 13.07.2014 15:56, schrieb Lars-Peter Clausen:
>  On 07/13/2014 03:40 PM, Richard Weinberger wrote:
> > Am 13.07.2014 15:26, schrieb Lars-Peter Clausen:
> >> On 07/13/2014 11:45 AM, Richard Weinberger wrote:
> >>> Am 13.07.2014 11:27, schrieb Lennox Wu:
>  As I said before, some configurations don't make sense.
> >>>
> >>> If such a configuration can be achieved using allmod/yesconfig it has 
> >>> to be fixed.
> >>> Chen's fixes seem reasonable as not all architectures support iomem.
> >>
> >> Maybe we should stub out ioremap() and friends when COMPILE_TEST is 
> >> enabled to avoid these linker errors. That's in my opinion better than 
> >> turning most of the 'depends on
> >> COMPILE_TEST' into 'depends on COMPILE_TEST && HAS_IOMEM'. The issue 
> >> comes up quite a lot and it is often overlooked when adding a driver 
> >> that can be build when COMPILE_TEST is
> >> enabled.
> >
> > And what should this stub do?
> > Except calling BUG()...
> 
>  return NULL;
> 
>  It's for compile testing, it's not meant to work at runtime.
> >>>
> >>> Hm, I really don't like the idea of having a non-working kernel.
> >>> IMHO either it should build _and_ run and nothing else.
> >>> Greg, what do you think?
> >>
> >> The kernel will still be working fine and you can run it on a system. The
> >> drivers which use ioremap() or similar are probably not instantiated on a
> >> system that does not provide HAS_IOMEM. But even if it was the driver 
> >> should
> >> handle ioremap() returning NULL gracefully and abort the driver probe. That
> >> said you'll probably not run a kernel that was built with COMPILE_TEST on
> >> your real hardware since it contains so many drivers that are completely
> >> useless on your hardware. The idea of COMPILE_TEST is to have as much
> >> compile test exposure as possible to the code that is enabled by
> >> COMPILE_TEST. Stubbing out ioremap() and friends when HAS_IOMEM is not set
> >> and COMPILE_TEST is set makes it easier to get there.
> > 
> > I run my kernels with COMPILE_TEST enabled as I need to build test
> > things that I don't happen to use.
> > 
> > I like the 'return NULL' option for this, it hits us all the time, might
> > as well fix it properly like this so that we don't have to deal with
> > Kconfig changes everywhere.
> > 
> > Also put a big "This platform does not support IOMEM" error printk in
> > there, so that people have a chance to figure out what is going on if
> > they happen to run such a driver on a platform that can't support it.
> 
> Maybe we could add COMPILE_TEST to the version string too?
> Just to detect such kernels fast in user bug reports...

What kind of bug report are you going to get?
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] drivers: staging: lustre: Use 'force_die' instead of 'die' to avoid compiling issue

2014-07-13 Thread Chen Gang
On 07/14/2014 03:05 AM, Greg Kroah-Hartman wrote:
> On Sun, Jul 13, 2014 at 10:50:55PM +0800, Chen Gang wrote:
>> Some of architectures have already defined 'die' as macro, so can not use
>> this common name as declaration in other modules, or will cause compiling
>> issue. So use more precise name 'force_die' (like 'wrap_bulk') instead of.
>>
>> The related error (with allmodconfig under score):
>>
>> CC [M]  drivers/staging/lustre/lustre/ptlrpc/sec.o
>>   drivers/staging/lustre/lustre/ptlrpc/sec.c: In function 
>> 'sptlrpc_cli_ctx_expire':
>>   drivers/staging/lustre/lustre/ptlrpc/sec.c:309:13: error: 'struct 
>> ptlrpc_ctx_ops' has no member named '__die'
>> ctx->cc_ops->die(ctx, 0);
>>^
>>   drivers/staging/lustre/lustre/ptlrpc/sec.c: In function 
>> 'ctx_refresh_timeout':
>>   drivers/staging/lustre/lustre/ptlrpc/sec.c:594:26: error: 'struct 
>> ptlrpc_ctx_ops' has no member named '__die'
>>  req->rq_cli_ctx->cc_ops->die(req->rq_cli_ctx, 0);
>> ^
>>   make[5]: *** [drivers/staging/lustre/lustre/ptlrpc/sec.o] Error 1
>>   make[4]: *** [drivers/staging/lustre/lustre/ptlrpc] Error 2
>>   make[3]: *** [drivers/staging/lustre/lustre] Error 2
>>   make[2]: *** [drivers/staging/lustre] Error 2
>>   make[1]: *** [drivers/staging] Error 2
>>   make: *** [drivers] Error 2
>>
>>
>> Signed-off-by: Chen Gang 
>> ---
>>  drivers/staging/lustre/lustre/include/lustre_sec.h | 2 +-
>>  drivers/staging/lustre/lustre/ptlrpc/sec.c | 6 +++---
>>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> This doesn't apply to my tree, can you please refresh it against the
> staging-next branch of staging.git so that I can apply it?
> 

OK, I shall go to that tree and send patch for it (I shall finish within
2 days).

Thanks.
-- 
Chen Gang

Open share and attitude like air water and life which God blessed
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] Staging: rtl8821ae: fix coding style issues in cam.c Fix all coding style error and warnings in cam.c reported by checkpatch.pl

2014-07-13 Thread Joerg C. Meyer
Signed-off-by: Joerg C. Meyer 
---
 drivers/staging/rtl8821ae/cam.c | 57 +++--
 1 file changed, 27 insertions(+), 30 deletions(-)

diff --git a/drivers/staging/rtl8821ae/cam.c b/drivers/staging/rtl8821ae/cam.c
index 3bc6b3d..835bc3b 100644
--- a/drivers/staging/rtl8821ae/cam.c
+++ b/drivers/staging/rtl8821ae/cam.c
@@ -68,12 +68,12 @@ static void rtl_cam_program_entry(struct ieee80211_hw *hw, 
u32 entry_no,
target_command);
 
RT_TRACE(COMP_SEC, DBG_LOUD,
-("WRITE %x: %x \n",
+("WRITE %x: %x\n",
  rtlpriv->cfg->maps[WCAMI], target_content));
RT_TRACE(COMP_SEC, DBG_LOUD,
 ("The Key ID is %d\n", entry_no));
RT_TRACE(COMP_SEC, DBG_LOUD,
-("WRITE %x: %x \n",
+("WRITE %x: %x\n",
  rtlpriv->cfg->maps[RWCAM], target_command));
 
} else if (entry_i == 1) {
@@ -89,9 +89,9 @@ static void rtl_cam_program_entry(struct ieee80211_hw *hw, 
u32 entry_no,
target_command);
 
RT_TRACE(COMP_SEC, DBG_LOUD,
-("WRITE A4: %x \n", target_content));
+("WRITE A4: %x\n", target_content));
RT_TRACE(COMP_SEC, DBG_LOUD,
-("WRITE A0: %x \n", target_command));
+("WRITE A0: %x\n", target_command));
 
} else {
 
@@ -109,9 +109,9 @@ static void rtl_cam_program_entry(struct ieee80211_hw *hw, 
u32 entry_no,
udelay(100);
 
RT_TRACE(COMP_SEC, DBG_LOUD,
-("WRITE A4: %x \n", target_content));
+("WRITE A4: %x\n", target_content));
RT_TRACE(COMP_SEC, DBG_LOUD,
-("WRITE A0: %x \n", target_command));
+("WRITE A0: %x\n", target_command));
}
}
 
@@ -127,8 +127,7 @@ u8 rtl_cam_add_one_entry(struct ieee80211_hw *hw, u8 
*mac_addr,
struct rtl_priv *rtlpriv = rtl_priv(hw);
 
RT_TRACE(COMP_SEC, DBG_DMESG,
-("EntryNo:%x, ulKeyId=%x, ulEncAlg=%x, "
- "ulUseDK=%x MacAddr %pM\n",
+   ("EntryNo:%x, ulKeyId=%x, ulEncAlg=%x, ulUseDK=%x MacAddr %pM\n",
  ul_entry_idx, ul_key_id, ul_enc_alg,
  ul_default_key, mac_addr));
 
@@ -138,21 +137,20 @@ u8 rtl_cam_add_one_entry(struct ieee80211_hw *hw, u8 
*mac_addr,
return 0;
}
 
-   if (ul_default_key == 1) {
+   if (ul_default_key == 1)
us_config = CFG_VALID | ((u16) (ul_enc_alg) << 2);
-   } else {
+   else
us_config = CFG_VALID | ((ul_enc_alg) << 2) | ul_key_id;
-   }
 
rtl_cam_program_entry(hw, ul_entry_idx, mac_addr,
  (u8 *) key_content, us_config);
 
-   RT_TRACE(COMP_SEC, DBG_DMESG, ("end \n"));
+   RT_TRACE(COMP_SEC, DBG_DMESG, ("end\n"));
 
return 1;
 
 }
-//EXPORT_SYMBOL(rtl_cam_add_one_entry);
+/* EXPORT_SYMBOL(rtl_cam_add_one_entry); */
 
 int rtl_cam_delete_one_entry(struct ieee80211_hw *hw,
 u8 *mac_addr, u32 ul_key_id)
@@ -169,14 +167,14 @@ int rtl_cam_delete_one_entry(struct ieee80211_hw *hw,
rtl_write_dword(rtlpriv, rtlpriv->cfg->maps[RWCAM], ul_command);
 
RT_TRACE(COMP_SEC, DBG_DMESG,
-("rtl_cam_delete_one_entry(): WRITE A4: %x \n", 0));
+("rtl_cam_delete_one_entry(): WRITE A4: %x\n", 0));
RT_TRACE(COMP_SEC, DBG_DMESG,
-("rtl_cam_delete_one_entry(): WRITE A0: %x \n", ul_command));
+("rtl_cam_delete_one_entry(): WRITE A0: %x\n", ul_command));
 
return 0;
 
 }
-//EXPORT_SYMBOL(rtl_cam_delete_one_entry);
+/* EXPORT_SYMBOL(rtl_cam_delete_one_entry); */
 
 void rtl_cam_reset_all_entry(struct ieee80211_hw *hw)
 {
@@ -186,7 +184,7 @@ void rtl_cam_reset_all_entry(struct ieee80211_hw *hw)
ul_command = BIT(31) | BIT(30);
rtl_write_dword(rtlpriv, rtlpriv->cfg->maps[RWCAM], ul_command);
 }
-//EXPORT_SYMBOL(rtl_cam_reset_all_entry);
+/* EXPORT_SYMBOL(rtl_cam_reset_all_entry); */
 
 void rtl_cam_mark_invalid(struct ieee80211_hw *hw, u8 uc_index)
 {
@@ -223,11 +221,11 @@ void rtl_cam_mark_invalid(struct ieee80211_hw *hw, u8 
uc_index)
rtl_write_dword(rtlpriv, rtlpriv->cfg->maps[RWCAM], ul_command);
 
RT_TRACE(COMP_SEC, DBG_DMESG,
-("rtl_cam_mark_invalid(): WRITE A4: %x \n", ul_content));
+("rtl_cam_mark_invalid(): WRITE A4: %x\n", ul_content));
RT_TRACE(COMP_SEC, DBG_DMESG,
-("

Re: [PATCH] drivers: staging: lustre: Use 'force_die' instead of 'die' to avoid compiling issue

2014-07-13 Thread Chen Gang
On 07/14/2014 05:41 AM, Chen Gang wrote:
> On 07/14/2014 03:05 AM, Greg Kroah-Hartman wrote:
>> On Sun, Jul 13, 2014 at 10:50:55PM +0800, Chen Gang wrote:
>>> Some of architectures have already defined 'die' as macro, so can not use
>>> this common name as declaration in other modules, or will cause compiling
>>> issue. So use more precise name 'force_die' (like 'wrap_bulk') instead of.
>>>
>>> The related error (with allmodconfig under score):
>>>
>>> CC [M]  drivers/staging/lustre/lustre/ptlrpc/sec.o
>>>   drivers/staging/lustre/lustre/ptlrpc/sec.c: In function 
>>> 'sptlrpc_cli_ctx_expire':
>>>   drivers/staging/lustre/lustre/ptlrpc/sec.c:309:13: error: 'struct 
>>> ptlrpc_ctx_ops' has no member named '__die'
>>> ctx->cc_ops->die(ctx, 0);
>>>^
>>>   drivers/staging/lustre/lustre/ptlrpc/sec.c: In function 
>>> 'ctx_refresh_timeout':
>>>   drivers/staging/lustre/lustre/ptlrpc/sec.c:594:26: error: 'struct 
>>> ptlrpc_ctx_ops' has no member named '__die'
>>>  req->rq_cli_ctx->cc_ops->die(req->rq_cli_ctx, 0);
>>> ^
>>>   make[5]: *** [drivers/staging/lustre/lustre/ptlrpc/sec.o] Error 1
>>>   make[4]: *** [drivers/staging/lustre/lustre/ptlrpc] Error 2
>>>   make[3]: *** [drivers/staging/lustre/lustre] Error 2
>>>   make[2]: *** [drivers/staging/lustre] Error 2
>>>   make[1]: *** [drivers/staging] Error 2
>>>   make: *** [drivers] Error 2
>>>
>>>
>>> Signed-off-by: Chen Gang 
>>> ---
>>>  drivers/staging/lustre/lustre/include/lustre_sec.h | 2 +-
>>>  drivers/staging/lustre/lustre/ptlrpc/sec.c | 6 +++---
>>>  2 files changed, 4 insertions(+), 4 deletions(-)
>>
>> This doesn't apply to my tree, can you please refresh it against the
>> staging-next branch of staging.git so that I can apply it?
>>


After checkout, I get the same patch, the related git link:

  "git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git".

The related new patch is in attachment, please check, thanks.


> 
> OK, I shall go to that tree and send patch for it (I shall finish within
> 2 days).


Thanks.
-- 
Chen Gang

Open share and attitude like air water and life which God blessed
>From 2c5239e3f52206f7a54814d39fc42aed4afe788f Mon Sep 17 00:00:00 2001
From: Chen Gang 
Date: Mon, 14 Jul 2014 06:21:57 +0800
Subject: [PATCH v2] drivers: staging: lustre: Use 'force_die' instead of 'die' to avoid compiling issue

Some of architectures have already defined 'die' as macro, so can not use
this common name as declaration in other modules, or will cause compiling
issue. So use more precise name 'force_die' (like 'wrap_bulk') instead of.

The related error (with allmodconfig under score):

CC [M]  drivers/staging/lustre/lustre/ptlrpc/sec.o
  drivers/staging/lustre/lustre/ptlrpc/sec.c: In function 'sptlrpc_cli_ctx_expire':
  drivers/staging/lustre/lustre/ptlrpc/sec.c:309:13: error: 'struct ptlrpc_ctx_ops' has no member named '__die'
ctx->cc_ops->die(ctx, 0);
   ^
  drivers/staging/lustre/lustre/ptlrpc/sec.c: In function 'ctx_refresh_timeout':
  drivers/staging/lustre/lustre/ptlrpc/sec.c:594:26: error: 'struct ptlrpc_ctx_ops' has no member named '__die'
 req->rq_cli_ctx->cc_ops->die(req->rq_cli_ctx, 0);
^
  make[5]: *** [drivers/staging/lustre/lustre/ptlrpc/sec.o] Error 1
  make[4]: *** [drivers/staging/lustre/lustre/ptlrpc] Error 2
  make[3]: *** [drivers/staging/lustre/lustre] Error 2
  make[2]: *** [drivers/staging/lustre] Error 2
  make[1]: *** [drivers/staging] Error 2
  make: *** [drivers] Error 2


Signed-off-by: Chen Gang 
---
 drivers/staging/lustre/lustre/include/lustre_sec.h | 2 +-
 drivers/staging/lustre/lustre/ptlrpc/sec.c | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/lustre_sec.h b/drivers/staging/lustre/lustre/include/lustre_sec.h
index bf3ee39..1b8ec11 100644
--- a/drivers/staging/lustre/lustre/include/lustre_sec.h
+++ b/drivers/staging/lustre/lustre/include/lustre_sec.h
@@ -387,7 +387,7 @@ struct ptlrpc_ctx_ops {
 	/**
 	 * Force the \a ctx to die.
 	 */
-	void(*die)	 (struct ptlrpc_cli_ctx *ctx,
+	void(*force_die)   (struct ptlrpc_cli_ctx *ctx,
 int grace);
 	int (*display) (struct ptlrpc_cli_ctx *ctx,
 char *buf, int bufsize);
diff --git a/drivers/staging/lustre/lustre/ptlrpc/sec.c b/drivers/staging/lustre/lustre/ptlrpc/sec.c
index 28ac824..bb5b4b6 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/sec.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/sec.c
@@ -305,8 +305,8 @@ EXPORT_SYMBOL(sptlrpc_cli_ctx_put);
  */
 void sptlrpc_cli_ctx_expire(struct ptlrpc_cli_ctx *ctx)
 {
-	LASSERT(ctx->cc_ops->die);
-	ctx->cc_ops->die(ctx, 0);
+	LASSERT(ctx->cc_ops->force_die);
+	ctx->cc_ops->force_die(ctx, 0);
 }
 EXPORT_SYMBOL(sptlrpc_cli_ctx_expire);
 
@@ -591,7 +591,7 @@ int ctx_refresh_timeout(void *data)
 	 * later than the context refresh expire time.
 	 */
 	if (rc == 0)
-		req->rq_cli_ctx->cc_ops->die(req->rq_cli_ctx, 

Re: [PATCH] drivers: staging: lustre: Use 'force_die' instead of 'die' to avoid compiling issue

2014-07-13 Thread Chen Gang
On 07/14/2014 06:31 AM, Chen Gang wrote:
> On 07/14/2014 05:41 AM, Chen Gang wrote:
>> On 07/14/2014 03:05 AM, Greg Kroah-Hartman wrote:
>>> On Sun, Jul 13, 2014 at 10:50:55PM +0800, Chen Gang wrote:
 Some of architectures have already defined 'die' as macro, so can not use
 this common name as declaration in other modules, or will cause compiling
 issue. So use more precise name 'force_die' (like 'wrap_bulk') instead of.

 The related error (with allmodconfig under score):

 CC [M]  drivers/staging/lustre/lustre/ptlrpc/sec.o
   drivers/staging/lustre/lustre/ptlrpc/sec.c: In function 
 'sptlrpc_cli_ctx_expire':
   drivers/staging/lustre/lustre/ptlrpc/sec.c:309:13: error: 'struct 
 ptlrpc_ctx_ops' has no member named '__die'
 ctx->cc_ops->die(ctx, 0);
^
   drivers/staging/lustre/lustre/ptlrpc/sec.c: In function 
 'ctx_refresh_timeout':
   drivers/staging/lustre/lustre/ptlrpc/sec.c:594:26: error: 'struct 
 ptlrpc_ctx_ops' has no member named '__die'
  req->rq_cli_ctx->cc_ops->die(req->rq_cli_ctx, 0);
 ^
   make[5]: *** [drivers/staging/lustre/lustre/ptlrpc/sec.o] Error 1
   make[4]: *** [drivers/staging/lustre/lustre/ptlrpc] Error 2
   make[3]: *** [drivers/staging/lustre/lustre] Error 2
   make[2]: *** [drivers/staging/lustre] Error 2
   make[1]: *** [drivers/staging] Error 2
   make: *** [drivers] Error 2


 Signed-off-by: Chen Gang 
 ---
  drivers/staging/lustre/lustre/include/lustre_sec.h | 2 +-
  drivers/staging/lustre/lustre/ptlrpc/sec.c | 6 +++---
  2 files changed, 4 insertions(+), 4 deletions(-)
>>>
>>> This doesn't apply to my tree, can you please refresh it against the
>>> staging-next branch of staging.git so that I can apply it?
>>>
> 
> 
> After checkout, I get the same patch, the related git link:
> 
>   "git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git".

Oh, sorry, maybe I need:

  "git clone -b staging-next 
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git"

And I shall try again, and finish within 2 days.

Thanks.

> 
> The related new patch is in attachment, please check, thanks.
> 
> 
>>
>> OK, I shall go to that tree and send patch for it (I shall finish within
>> 2 days).
> 
> 
> Thanks.
> 


-- 
Chen Gang

Open share and attitude like air water and life which God blessed
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] Staging: rtl8821ae: fix coding style issues in cam.c Fix all coding style error and warnings in cam.c reported by checkpatch.pl

2014-07-13 Thread Greg KH
On Sun, Jul 13, 2014 at 11:47:57PM +0200, Joerg C. Meyer wrote:
> Signed-off-by: Joerg C. Meyer 

Your changelog body ended up in the Subject: line (that happens if you
don't put a blank line after the first line in your git commit.

Also, you don't say _what_ issues you fixed here, please be specific.

And if you fix more than one "type" of thing, please break that up into
multiple patches, as you are only allowed to do one-thing-per-patch.

Care to try this again?

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] drivers: staging: lustre: Use 'force_die' instead of 'die' to avoid compiling issue

2014-07-13 Thread Greg Kroah-Hartman
On Mon, Jul 14, 2014 at 06:38:24AM +0800, Chen Gang wrote:
> On 07/14/2014 06:31 AM, Chen Gang wrote:
> > On 07/14/2014 05:41 AM, Chen Gang wrote:
> >> On 07/14/2014 03:05 AM, Greg Kroah-Hartman wrote:
> >>> On Sun, Jul 13, 2014 at 10:50:55PM +0800, Chen Gang wrote:
>  Some of architectures have already defined 'die' as macro, so can not use
>  this common name as declaration in other modules, or will cause compiling
>  issue. So use more precise name 'force_die' (like 'wrap_bulk') instead 
>  of.
> 
>  The related error (with allmodconfig under score):
> 
>  CC [M]  drivers/staging/lustre/lustre/ptlrpc/sec.o
>    drivers/staging/lustre/lustre/ptlrpc/sec.c: In function 
>  'sptlrpc_cli_ctx_expire':
>    drivers/staging/lustre/lustre/ptlrpc/sec.c:309:13: error: 'struct 
>  ptlrpc_ctx_ops' has no member named '__die'
>  ctx->cc_ops->die(ctx, 0);
> ^
>    drivers/staging/lustre/lustre/ptlrpc/sec.c: In function 
>  'ctx_refresh_timeout':
>    drivers/staging/lustre/lustre/ptlrpc/sec.c:594:26: error: 'struct 
>  ptlrpc_ctx_ops' has no member named '__die'
>   req->rq_cli_ctx->cc_ops->die(req->rq_cli_ctx, 0);
>  ^
>    make[5]: *** [drivers/staging/lustre/lustre/ptlrpc/sec.o] Error 1
>    make[4]: *** [drivers/staging/lustre/lustre/ptlrpc] Error 2
>    make[3]: *** [drivers/staging/lustre/lustre] Error 2
>    make[2]: *** [drivers/staging/lustre] Error 2
>    make[1]: *** [drivers/staging] Error 2
>    make: *** [drivers] Error 2
> 
> 
>  Signed-off-by: Chen Gang 
>  ---
>   drivers/staging/lustre/lustre/include/lustre_sec.h | 2 +-
>   drivers/staging/lustre/lustre/ptlrpc/sec.c | 6 +++---
>   2 files changed, 4 insertions(+), 4 deletions(-)
> >>>
> >>> This doesn't apply to my tree, can you please refresh it against the
> >>> staging-next branch of staging.git so that I can apply it?
> >>>
> > 
> > 
> > After checkout, I get the same patch, the related git link:
> > 
> >   "git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git".
> 
> Oh, sorry, maybe I need:
> 
>   "git clone -b staging-next 
> git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git"
> 
> And I shall try again, and finish within 2 days.

Yes, you need the staging-next branch.

You can take your original clone of:
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git

and then just check out the staging-next branch in it:
git checkout -t -b staging-next origin/staging-next

no need to do another full clone.

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] drivers: staging: lustre: Use 'force_die' instead of 'die' to avoid compiling issue

2014-07-13 Thread Chen Gang
On 07/14/2014 06:50 AM, Greg Kroah-Hartman wrote:
> On Mon, Jul 14, 2014 at 06:38:24AM +0800, Chen Gang wrote:
>> On 07/14/2014 06:31 AM, Chen Gang wrote:
>>> On 07/14/2014 05:41 AM, Chen Gang wrote:
 On 07/14/2014 03:05 AM, Greg Kroah-Hartman wrote:
> On Sun, Jul 13, 2014 at 10:50:55PM +0800, Chen Gang wrote:
>> Some of architectures have already defined 'die' as macro, so can not use
>> this common name as declaration in other modules, or will cause compiling
>> issue. So use more precise name 'force_die' (like 'wrap_bulk') instead 
>> of.
>>
>> The related error (with allmodconfig under score):
>>
>> CC [M]  drivers/staging/lustre/lustre/ptlrpc/sec.o
>>   drivers/staging/lustre/lustre/ptlrpc/sec.c: In function 
>> 'sptlrpc_cli_ctx_expire':
>>   drivers/staging/lustre/lustre/ptlrpc/sec.c:309:13: error: 'struct 
>> ptlrpc_ctx_ops' has no member named '__die'
>> ctx->cc_ops->die(ctx, 0);
>>^
>>   drivers/staging/lustre/lustre/ptlrpc/sec.c: In function 
>> 'ctx_refresh_timeout':
>>   drivers/staging/lustre/lustre/ptlrpc/sec.c:594:26: error: 'struct 
>> ptlrpc_ctx_ops' has no member named '__die'
>>  req->rq_cli_ctx->cc_ops->die(req->rq_cli_ctx, 0);
>> ^
>>   make[5]: *** [drivers/staging/lustre/lustre/ptlrpc/sec.o] Error 1
>>   make[4]: *** [drivers/staging/lustre/lustre/ptlrpc] Error 2
>>   make[3]: *** [drivers/staging/lustre/lustre] Error 2
>>   make[2]: *** [drivers/staging/lustre] Error 2
>>   make[1]: *** [drivers/staging] Error 2
>>   make: *** [drivers] Error 2
>>
>>
>> Signed-off-by: Chen Gang 
>> ---
>>  drivers/staging/lustre/lustre/include/lustre_sec.h | 2 +-
>>  drivers/staging/lustre/lustre/ptlrpc/sec.c | 6 +++---
>>  2 files changed, 4 insertions(+), 4 deletions(-)
>
> This doesn't apply to my tree, can you please refresh it against the
> staging-next branch of staging.git so that I can apply it?
>
>>>
>>>
>>> After checkout, I get the same patch, the related git link:
>>>
>>>   "git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git".
>>
>> Oh, sorry, maybe I need:
>>
>>   "git clone -b staging-next 
>> git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git"
>>
>> And I shall try again, and finish within 2 days.
> 
> Yes, you need the staging-next branch.
> 
> You can take your original clone of:
>   git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
> 
> and then just check out the staging-next branch in it:
>   git checkout -t -b staging-next origin/staging-next
> 
> no need to do another full clone.
> 

OK, thanks. I will finish it within this night (Chinese region).

Thanks.
-- 
Chen Gang

Open share and attitude like air water and life which God blessed
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v3] staging: android: Clean up else statement from binder_send_failed_reply

2014-07-13 Thread Lucas Tanure
Kernel coding style. Remove useless else statement after return.
Changes from v1 and v2: Fix warning for mixed declarations and code.
Declaration of "struct binder_transaction *next" made outside of while,
and initialized with NULL. 

Signed-off-by: Lucas Tanure 
---
 drivers/staging/android/binder.c | 28 ++--
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c
index 14714a6..574f529 100644
--- a/drivers/staging/android/binder.c
+++ b/drivers/staging/android/binder.c
@@ -1183,6 +1183,7 @@ static void binder_send_failed_reply(struct 
binder_transaction *t,
 uint32_t error_code)
 {
struct binder_thread *target_thread;
+   struct binder_transaction *next = NULL;
 
BUG_ON(t->flags & TF_ONE_WAY);
while (1) {
@@ -1210,24 +1211,23 @@ static void binder_send_failed_reply(struct 
binder_transaction *t,
target_thread->return_error);
}
return;
-   } else {
-   struct binder_transaction *next = t->from_parent;
+   }
+   next = t->from_parent;
 
-   binder_debug(BINDER_DEBUG_FAILED_TRANSACTION,
-"send failed reply for transaction %d, 
target dead\n",
-t->debug_id);
+   binder_debug(BINDER_DEBUG_FAILED_TRANSACTION,
+"send failed reply for transaction %d, target 
dead\n",
+t->debug_id);
 
-   binder_pop_transaction(target_thread, t);
-   if (next == NULL) {
-   binder_debug(BINDER_DEBUG_DEAD_BINDER,
-"reply failed, no target thread at 
root\n");
-   return;
-   }
-   t = next;
+   binder_pop_transaction(target_thread, t);
+   if (next == NULL) {
binder_debug(BINDER_DEBUG_DEAD_BINDER,
-"reply failed, no target thread -- retry 
%d\n",
- t->debug_id);
+"reply failed, no target thread at 
root\n");
+   return;
}
+   t = next;
+   binder_debug(BINDER_DEBUG_DEAD_BINDER,
+"reply failed, no target thread -- retry %d\n",
+ t->debug_id);
}
 }
 
-- 
2.0.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v3] staging: android: Clean up else statement from binder_send_failed_reply

2014-07-13 Thread Greg Kroah-Hartman
On Sun, Jul 13, 2014 at 08:25:13PM -0300, Lucas Tanure wrote:
> Kernel coding style. Remove useless else statement after return.
> Changes from v1 and v2: Fix warning for mixed declarations and code.
> Declaration of "struct binder_transaction *next" made outside of while,
> and initialized with NULL. 

Why did you initialize it with NULL?  It's not needed to do this, right?

4th time's a charm?

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v4] staging: android: Clean up else statement from binder_send_failed_reply

2014-07-13 Thread Lucas Tanure
Kernel coding style. Remove useless else statement after return.
Changes from v1 and v2: Fix warning for mixed declarations and code.
Declaration of "struct binder_transaction *next" made outside of while.

Changes from v3: Removed initialization to NULL for next variable.

Signed-off-by: Lucas Tanure 
---
 drivers/staging/android/binder.c | 28 ++--
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c
index 14714a6..4f34dc0 100644
--- a/drivers/staging/android/binder.c
+++ b/drivers/staging/android/binder.c
@@ -1183,6 +1183,7 @@ static void binder_send_failed_reply(struct 
binder_transaction *t,
 uint32_t error_code)
 {
struct binder_thread *target_thread;
+   struct binder_transaction *next;
 
BUG_ON(t->flags & TF_ONE_WAY);
while (1) {
@@ -1210,24 +1211,23 @@ static void binder_send_failed_reply(struct 
binder_transaction *t,
target_thread->return_error);
}
return;
-   } else {
-   struct binder_transaction *next = t->from_parent;
+   }
+   next = t->from_parent;
 
-   binder_debug(BINDER_DEBUG_FAILED_TRANSACTION,
-"send failed reply for transaction %d, 
target dead\n",
-t->debug_id);
+   binder_debug(BINDER_DEBUG_FAILED_TRANSACTION,
+"send failed reply for transaction %d, target 
dead\n",
+t->debug_id);
 
-   binder_pop_transaction(target_thread, t);
-   if (next == NULL) {
-   binder_debug(BINDER_DEBUG_DEAD_BINDER,
-"reply failed, no target thread at 
root\n");
-   return;
-   }
-   t = next;
+   binder_pop_transaction(target_thread, t);
+   if (next == NULL) {
binder_debug(BINDER_DEBUG_DEAD_BINDER,
-"reply failed, no target thread -- retry 
%d\n",
- t->debug_id);
+"reply failed, no target thread at 
root\n");
+   return;
}
+   t = next;
+   binder_debug(BINDER_DEBUG_DEAD_BINDER,
+"reply failed, no target thread -- retry %d\n",
+ t->debug_id);
}
 }
 
-- 
2.0.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v3] staging: android: Clean up else statement from binder_send_failed_reply

2014-07-13 Thread Lucas Tanure
Ok. I will do it.
4th could be the right one =p.

Thanks for your time
Cheers

--
Lucas Tanure
+55 (19) 988176559


On Sun, Jul 13, 2014 at 9:13 PM, Greg Kroah-Hartman
 wrote:
> On Sun, Jul 13, 2014 at 08:25:13PM -0300, Lucas Tanure wrote:
>> Kernel coding style. Remove useless else statement after return.
>> Changes from v1 and v2: Fix warning for mixed declarations and code.
>> Declaration of "struct binder_transaction *next" made outside of while,
>> and initialized with NULL.
>
> Why did you initialize it with NULL?  It's not needed to do this, right?
>
> 4th time's a charm?
>
> thanks,
>
> greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


RE: [PATCH 4/8] Drivers: scsi: storvsc: Filter WRITE_SAME_16

2014-07-13 Thread KY Srinivasan


> -Original Message-
> From: KY Srinivasan
> Sent: Sunday, July 13, 2014 11:50 AM
> To: 'Martin K. Petersen'
> Cc: h...@infradead.org; James Bottomley; linux-ker...@vger.kernel.org;
> de...@linuxdriverproject.org; a...@canonical.com; sta...@vger.kernel.org;
> linux-s...@vger.kernel.org; oher...@suse.com; jasow...@redhat.com
> Subject: RE: [PATCH 4/8] Drivers: scsi: storvsc: Filter WRITE_SAME_16
> 
> 
> 
> > -Original Message-
> > From: Martin K. Petersen [mailto:martin.peter...@oracle.com]
> > Sent: Sunday, July 13, 2014 5:59 AM
> > To: KY Srinivasan
> > Cc: h...@infradead.org; James Bottomley; linux-ker...@vger.kernel.org;
> > de...@linuxdriverproject.org; a...@canonical.com;
> > sta...@vger.kernel.org; linux-s...@vger.kernel.org; oher...@suse.com;
> > jasow...@redhat.com
> > Subject: Re: [PATCH 4/8] Drivers: scsi: storvsc: Filter WRITE_SAME_16
> >
> > > "KY" == KY Srinivasan  writes:
> >
> > KY> Windows hosts do support UNMAP and set the field in the EVPD.
> > KY> However, since the host advertises SPC-2 compliance, Linux does
> > KY> not even query the VPD page.
> >
> > >> If we want to enable UNMAP in this case I'd prefer a blacklist
> > >> entry than trying UNMAP despite the device not advertising it.
> >
> > I agree with that. We could do something like the patch below.
> >
> > However, I do think it's a good idea that you guys are looking into
> > reporting SPC-3.
> 
> Thanks Martin; this patch would address our present issues. I will get some
> testing done and report back.

How should we force the flag (BLIST_TRY_VPD_PAGES) to be set.

K. Y
> 
> Regards,
> 
> K. Y
> >
> >
> > SCSI: Add a blacklist flag which enables VPD page inquiries
> >
> > Despite supporting modern SCSI features some storage devices continue
> > to claim conformance to an older version of the SPC spec. This is done
> > for compatibility with legacy operating systems.
> >
> > Linux by default will not attempt to read VPD pages on devices that
> > claim
> > SPC-2 or older. Introduce a blacklist flag that can be used to trigger
> > VPD page inquiries on devices that are known to support them.
> >
> > Reported-by: KY Srinivasan 
> > Signed-off-by: Martin K. Petersen 
> >
> > diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index
> > 4a6e4ba5a400..a5b1a224628a 100644
> > --- a/drivers/scsi/scsi_scan.c
> > +++ b/drivers/scsi/scsi_scan.c
> > @@ -949,7 +949,9 @@ static int scsi_add_lun(struct scsi_device *sdev,
> > unsigned char *inq_result,
> >
> > sdev->eh_timeout = SCSI_DEFAULT_EH_TIMEOUT;
> >
> > -   if (*bflags & BLIST_SKIP_VPD_PAGES)
> > +   if (*bflags & BLIST_TRY_VPD_PAGES)
> > +   sdev->try_vpd_pages = 1;
> > +   else if (*bflags & BLIST_SKIP_VPD_PAGES)
> > sdev->skip_vpd_pages = 1;
> >
> > transport_configure_device(&sdev->sdev_gendev);
> > diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index
> > 87566b51fcf7..31d32b9077ca 100644
> > --- a/drivers/scsi/sd.c
> > +++ b/drivers/scsi/sd.c
> > @@ -2701,6 +2701,11 @@ static void sd_read_write_same(struct scsi_disk
> > *sdkp, unsigned char *buffer)
> >
> >  static int sd_try_extended_inquiry(struct scsi_device *sdp)  {
> > +   /* Attempt VPD inquiry if the device blacklist explicitly calls
> > +* for it.
> > +*/
> > +   if (sdp->try_vpd_pages)
> > +   return 1;
> > /*
> >  * Although VPD inquiries can go to SCSI-2 type devices,
> >  * some USB ones crash on receiving them, and the pages diff --git
> > a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index
> > 9aa38f7b303b..f579408620f0 100644
> > --- a/include/scsi/scsi_device.h
> > +++ b/include/scsi/scsi_device.h
> > @@ -155,6 +155,7 @@ struct scsi_device {
> > unsigned skip_ms_page_8:1;  /* do not use MODE SENSE page 0x08
> > */
> > unsigned skip_ms_page_3f:1; /* do not use MODE SENSE page 0x3f
> > */
> > unsigned skip_vpd_pages:1;  /* do not read VPD pages */
> > +   unsigned try_vpd_pages:1;   /* attempt to read VPD pages */
> > unsigned use_192_bytes_for_3f:1; /* ask for 192 bytes from page
> 0x3f
> > */
> > unsigned no_start_on_add:1; /* do not issue start on add */
> > unsigned allow_restart:1; /* issue START_UNIT in error handler */
> > diff --git a/include/scsi/scsi_devinfo.h b/include/scsi/scsi_devinfo.h
> > index 8670c04e199e..1fdd6fc5492b 100644
> > --- a/include/scsi/scsi_devinfo.h
> > +++ b/include/scsi/scsi_devinfo.h
> > @@ -34,4 +34,5 @@
> >  #define BLIST_SKIP_VPD_PAGES   0x400 /* Ignore SBC-3 VPD pages
> > */
> >  #define BLIST_SCSI3LUN 0x800 /* Scan more than 256
> > LUNs
> >  for sequential scan */
> > +#define BLIST_TRY_VPD_PAGES0x1000 /* Attempt to read VPD
> > pages */
> >  #endif
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] xillybus: place 'else' on same line as '}'

2014-07-13 Thread Jeremiah Mahler
Place 'else' on same line as closing brace '}' as per
Documentation/CodingStyle.  Fixes 1 error found by checkpatch.pl.

Signed-off-by: Jeremiah Mahler 
---
 drivers/staging/xillybus/xillybus_core.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/xillybus/xillybus_core.c 
b/drivers/staging/xillybus/xillybus_core.c
index ab6502c..7de4c11 100644
--- a/drivers/staging/xillybus/xillybus_core.c
+++ b/drivers/staging/xillybus/xillybus_core.c
@@ -546,8 +546,7 @@ static int xilly_setupchannels(struct xilly_endpoint *ep,
channel->rd_buffers = buffers;
rc = xilly_get_dma_buffers(ep, &rd_alloc, buffers,
   bufnum, bytebufsize);
-   }
-   else if (channelnum > 0) {
+   } else if (channelnum > 0) {
channel->num_wr_buffers = bufnum;
 
channel->seekable = seekable;
-- 
2.0.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 2/2] staging: comedi: addi_apci_1564: use addi_watchdog module to init watchdog subdevice

2014-07-13 Thread Chase Southwood
On Sun, Jul 13, 2014 at 2:17 PM, Hartley Sweeten
 wrote:
> On Saturday, July 12, 2014 3:44 PM, Chase Southwood wrote:
>> Use the addi_watchdog module to provide support for the watchdog
>> subdevice.
>>
>> Also, rearrange the subdevice init blocks so that the order makes sense.
>> Digital input/output subdevices and subdevices for DI/DO interrupt
>> support, followed by timer/counter/watchdog subdevices is the new order.
>>
>> Signed-off-by: Chase Southwood 
>> Cc: Ian Abbott 
>> Cc: H Hartley Sweeten 
>> ---
>>  drivers/staging/comedi/drivers/addi_apci_1564.c | 34 
>> +++--
>>  1 file changed, 20 insertions(+), 14 deletions(-)
>
> Chase,
>
> You should also add the dependency for the addi watchdog module
> to the Kconfig.
>

Hello, Hartley!

The select statement for COMEDI_ADDI_WATCHDOG was added to Kconfig for
the addi_apci_1564 driver in commit
8851362:

From: Arnd Bergmann 
Date: Tue, 3 Jun 2014 12:29:29 +0200
Subject: [PATCH] staging: comedi: addi_apci_1564: add addi_watchdog dependency

Signed-off-by: Arnd Bergmann 
Cc: H Hartley Sweeten 
Acked-by: Ian Abbott 
Signed-off-by: Greg Kroah-Hartman 

This is because the driver has already been using
addi_watchdog_reset() and I had forgotten to add the select to the
Kconfig when I added that function call, so Arnd added it when a
randconfig build error turned up later.  Sorry for the
confusion.

Thanks,
Chase

> Regards,
> Hartley
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


RE: [PATCH 4/8] Drivers: scsi: storvsc: Filter WRITE_SAME_16

2014-07-13 Thread KY Srinivasan


> -Original Message-
> From: driverdev-devel-boun...@linuxdriverproject.org [mailto:driverdev-
> devel-boun...@linuxdriverproject.org] On Behalf Of KY Srinivasan
> Sent: Sunday, July 13, 2014 7:38 PM
> To: Martin K. Petersen
> Cc: linux-s...@vger.kernel.org; jasow...@redhat.com; linux-
> ker...@vger.kernel.org; sta...@vger.kernel.org; oher...@suse.com;
> h...@infradead.org; James Bottomley; a...@canonical.com;
> de...@linuxdriverproject.org
> Subject: RE: [PATCH 4/8] Drivers: scsi: storvsc: Filter WRITE_SAME_16
> 
> 
> 
> > -Original Message-
> > From: KY Srinivasan
> > Sent: Sunday, July 13, 2014 11:50 AM
> > To: 'Martin K. Petersen'
> > Cc: h...@infradead.org; James Bottomley; linux-ker...@vger.kernel.org;
> > de...@linuxdriverproject.org; a...@canonical.com;
> > sta...@vger.kernel.org; linux-s...@vger.kernel.org; oher...@suse.com;
> > jasow...@redhat.com
> > Subject: RE: [PATCH 4/8] Drivers: scsi: storvsc: Filter WRITE_SAME_16
> >
> >
> >
> > > -Original Message-
> > > From: Martin K. Petersen [mailto:martin.peter...@oracle.com]
> > > Sent: Sunday, July 13, 2014 5:59 AM
> > > To: KY Srinivasan
> > > Cc: h...@infradead.org; James Bottomley;
> > > linux-ker...@vger.kernel.org; de...@linuxdriverproject.org;
> > > a...@canonical.com; sta...@vger.kernel.org;
> > > linux-s...@vger.kernel.org; oher...@suse.com; jasow...@redhat.com
> > > Subject: Re: [PATCH 4/8] Drivers: scsi: storvsc: Filter
> > > WRITE_SAME_16
> > >
> > > > "KY" == KY Srinivasan  writes:
> > >
> > > KY> Windows hosts do support UNMAP and set the field in the EVPD.
> > > KY> However, since the host advertises SPC-2 compliance, Linux does
> > > KY> not even query the VPD page.
> > >
> > > >> If we want to enable UNMAP in this case I'd prefer a blacklist
> > > >> entry than trying UNMAP despite the device not advertising it.
> > >
> > > I agree with that. We could do something like the patch below.
> > >
> > > However, I do think it's a good idea that you guys are looking into
> > > reporting SPC-3.
> >
> > Thanks Martin; this patch would address our present issues. I will get
> > some testing done and report back.
> 
> How should we force the flag (BLIST_TRY_VPD_PAGES) to be set.

Once I force the flag set, it works. Thanks Martin.

K. Y
> 
> K. Y
> >
> > Regards,
> >
> > K. Y
> > >
> > >
> > > SCSI: Add a blacklist flag which enables VPD page inquiries
> > >
> > > Despite supporting modern SCSI features some storage devices
> > > continue to claim conformance to an older version of the SPC spec.
> > > This is done for compatibility with legacy operating systems.
> > >
> > > Linux by default will not attempt to read VPD pages on devices that
> > > claim
> > > SPC-2 or older. Introduce a blacklist flag that can be used to
> > > trigger VPD page inquiries on devices that are known to support them.
> > >
> > > Reported-by: KY Srinivasan 
> > > Signed-off-by: Martin K. Petersen 
> > >
> > > diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
> > > index 4a6e4ba5a400..a5b1a224628a 100644
> > > --- a/drivers/scsi/scsi_scan.c
> > > +++ b/drivers/scsi/scsi_scan.c
> > > @@ -949,7 +949,9 @@ static int scsi_add_lun(struct scsi_device
> > > *sdev, unsigned char *inq_result,
> > >
> > >   sdev->eh_timeout = SCSI_DEFAULT_EH_TIMEOUT;
> > >
> > > - if (*bflags & BLIST_SKIP_VPD_PAGES)
> > > + if (*bflags & BLIST_TRY_VPD_PAGES)
> > > + sdev->try_vpd_pages = 1;
> > > + else if (*bflags & BLIST_SKIP_VPD_PAGES)
> > >   sdev->skip_vpd_pages = 1;
> > >
> > >   transport_configure_device(&sdev->sdev_gendev);
> > > diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index
> > > 87566b51fcf7..31d32b9077ca 100644
> > > --- a/drivers/scsi/sd.c
> > > +++ b/drivers/scsi/sd.c
> > > @@ -2701,6 +2701,11 @@ static void sd_read_write_same(struct
> > > scsi_disk *sdkp, unsigned char *buffer)
> > >
> > >  static int sd_try_extended_inquiry(struct scsi_device *sdp)  {
> > > + /* Attempt VPD inquiry if the device blacklist explicitly calls
> > > +  * for it.
> > > +  */
> > > + if (sdp->try_vpd_pages)
> > > + return 1;
> > >   /*
> > >* Although VPD inquiries can go to SCSI-2 type devices,
> > >* some USB ones crash on receiving them, and the pages diff --git
> > > a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index
> > > 9aa38f7b303b..f579408620f0 100644
> > > --- a/include/scsi/scsi_device.h
> > > +++ b/include/scsi/scsi_device.h
> > > @@ -155,6 +155,7 @@ struct scsi_device {
> > >   unsigned skip_ms_page_8:1;  /* do not use MODE SENSE page 0x08
> > > */
> > >   unsigned skip_ms_page_3f:1; /* do not use MODE SENSE page 0x3f
> > > */
> > >   unsigned skip_vpd_pages:1;  /* do not read VPD pages */
> > > + unsigned try_vpd_pages:1;   /* attempt to read VPD pages */
> > >   unsigned use_192_bytes_for_3f:1; /* ask for 192 bytes from page
> > 0x3f
> > > */
> > >   unsigned no_start_on_add:1; /* do not issue start on add */
> > >   unsigned allow_restart:1; /* issue START_UNIT in err

Re: [PATCH V3 1/7] Drivers: scsi: storvsc: Change the limits to reflect the values on the host

2014-07-13 Thread Hannes Reinecke

On 07/12/2014 06:48 PM, K. Y. Srinivasan wrote:

Hyper-V hosts can support multiple targets and multiple channels and larger 
number of
LUNs per target. Update the code to reflect this. With this patch we can 
correctly
enumerate all the paths in a multi-path storage environment.

In this version of the patch I have addressed comments from
Christoph Hellwig 

Signed-off-by: K. Y. Srinivasan 
Cc: 
---
  drivers/scsi/storvsc_drv.c |   47 +---
  1 files changed, 31 insertions(+), 16 deletions(-)

diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index 9969fa1..8938b13 100644
--- a/drivers/scsi/storvsc_drv.c
+++ b/drivers/scsi/storvsc_drv.c
@@ -330,17 +330,17 @@ static int storvsc_timeout = 180;

  static void storvsc_on_channel_callback(void *context);

-/*
- * In Hyper-V, each port/path/target maps to 1 scsi host adapter.  In
- * reality, the path/target is not used (ie always set to 0) so our
- * scsi host adapter essentially has 1 bus with 1 target that contains
- * up to 256 luns.
- */
-#define STORVSC_MAX_LUNS_PER_TARGET64
-#define STORVSC_MAX_TARGETS1
-#define STORVSC_MAX_CHANNELS   1
+#define STORVSC_MAX_LUNS_PER_TARGET255
+#define STORVSC_MAX_TARGETS2
+#define STORVSC_MAX_CHANNELS   8

+#define STORVSC_FC_MAX_LUNS_PER_TARGET 255
+#define STORVSC_FC_MAX_TARGETS 128
+#define STORVSC_FC_MAX_CHANNELS8

+#define STORVSC_IDE_MAX_LUNS_PER_TARGET64
+#define STORVSC_IDE_MAX_TARGETS1
+#define STORVSC_IDE_MAX_CHANNELS   1

  struct storvsc_cmd_request {
struct list_head entry;
Limiting max_lun to 255 will make the driver to _not_ respond to 
LUNs higher than that; ie Well-known LUN won't work here.
Also the SCSI stack will be using REPORT LUNS anyway since you're 
advertising SPC-2 compliance. So your driver runs into issues if 
Hyper-V would ever return more than 256 LUNs with the REPORT LUN 
command or if any of the LUNs has an addressing scheme other than

'0x00'.
I would suggest to raise this to the technical limit (ie the largest 
LUN which the _protocol_ supports) and let REPORT LUNS deal with the 
actual LUNs.


Cheers,

Hannes
--
Dr. Hannes Reinecke   zSeries & Storage
h...@suse.de  +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH V3 2/7] Drivers: scsi: storvsc: Set cmd_per_lun to reflect value supported by the Host

2014-07-13 Thread Hannes Reinecke

On 07/12/2014 06:48 PM, K. Y. Srinivasan wrote:

Set cmd_per_lun to reflect value supported by the Host.
In this version of the patch I have addressed comments from
Christoph Hellwig 

Signed-off-by: K. Y. Srinivasan 
Cc: 
---
  drivers/scsi/storvsc_drv.c |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index 8938b13..cebcef7 100644
--- a/drivers/scsi/storvsc_drv.c
+++ b/drivers/scsi/storvsc_drv.c
@@ -1690,7 +1690,7 @@ static struct scsi_host_template scsi_driver = {
.slave_alloc =  storvsc_device_alloc,
.slave_destroy =storvsc_device_destroy,
.slave_configure =  storvsc_device_configure,
-   .cmd_per_lun =  1,
+   .cmd_per_lun =  255,
.can_queue =STORVSC_MAX_IO_REQUESTS*STORVSC_MAX_TARGETS,
.this_id =  -1,
/* no use setting to 0 since ll_blk_rw reset it to 1 */


Reviewed-by: Hannes Reinecke 

Cheers,

Hannes
--
Dr. Hannes Reinecke   zSeries & Storage
h...@suse.de  +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH V3 4/7] Drivers: scsi: storvsc: Fix a bug in handling VMBUS protocol version

2014-07-13 Thread Hannes Reinecke

On 07/12/2014 06:48 PM, K. Y. Srinivasan wrote:

Based on the negotiated VMBUS protocol version, we adjust the size of the 
storage
protocol messages. The two sizes we currently handle are pre-win8 and post-win8.
In WS2012 R2, we are negotiating higher VMBUS protocol version than the win8
version. Make adjustments to correctly handle this.

In this version of the patch I have addressed comments from
Christoph Hellwig 

Signed-off-by: K. Y. Srinivasan 
Cc: 
---
  drivers/scsi/storvsc_drv.c |   17 ++---
  1 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index 8f8847e..7e8a642 100644
--- a/drivers/scsi/storvsc_drv.c
+++ b/drivers/scsi/storvsc_drv.c
@@ -1752,19 +1752,22 @@ static int storvsc_probe(struct hv_device *device,
 * set state to properly communicate with the host.
 */

-   if (vmbus_proto_version == VERSION_WIN8) {
-   sense_buffer_size = POST_WIN7_STORVSC_SENSE_BUFFER_SIZE;
-   vmscsi_size_delta = 0;
-   vmstor_current_major = VMSTOR_WIN8_MAJOR;
-   vmstor_current_minor = VMSTOR_WIN8_MINOR;
-   } else {
+   switch (vmbus_proto_version) {
+   case VERSION_WS2008:
+   case VERSION_WIN7:
sense_buffer_size = PRE_WIN8_STORVSC_SENSE_BUFFER_SIZE;
vmscsi_size_delta = sizeof(struct vmscsi_win8_extension);
vmstor_current_major = VMSTOR_WIN7_MAJOR;
vmstor_current_minor = VMSTOR_WIN7_MINOR;
+   break;
+   default:
+   sense_buffer_size = POST_WIN7_STORVSC_SENSE_BUFFER_SIZE;
+   vmscsi_size_delta = 0;
+   vmstor_current_major = VMSTOR_WIN8_MAJOR;
+   vmstor_current_minor = VMSTOR_WIN8_MINOR;
+   break;
}

-
if (dev_id->driver_data == SFC_GUID)
scsi_driver.can_queue = (STORVSC_MAX_IO_REQUESTS *
 STORVSC_FC_MAX_TARGETS);


Reviewed-by: Hannes Reinecke 

Cheers,

Hannes
--
Dr. Hannes Reinecke   zSeries & Storage
h...@suse.de  +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH V3 3/7] Drivers: scsi: storvsc: Filter commands based on the storage protocol version

2014-07-13 Thread Hannes Reinecke

On 07/12/2014 06:48 PM, K. Y. Srinivasan wrote:

Going forward it is possible that some of the commands that are not currently
implemented will be implemented on future Windows hosts. Even if they are not
implemented, we are told the host will corrrectly handle unsupported
commands (by returning appropriate return code and sense information).
Make command filtering depend on the host version.

In this version of the patch I have addressed comments from
Christoph Hellwig 

Signed-off-by: K. Y. Srinivasan 
Cc: 
---
  drivers/scsi/storvsc_drv.c |   16 +---
  1 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index cebcef7..8f8847e 100644
--- a/drivers/scsi/storvsc_drv.c
+++ b/drivers/scsi/storvsc_drv.c
@@ -1553,9 +1553,19 @@ static int storvsc_queuecommand(struct Scsi_Host *host, 
struct scsi_cmnd *scmnd)
struct vmscsi_request *vm_srb;
struct stor_mem_pools *memp = scmnd->device->hostdata;

-   if (!storvsc_scsi_cmd_ok(scmnd)) {
-   scmnd->scsi_done(scmnd);
-   return 0;
+   if (vmstor_current_major <= VMSTOR_WIN8_MAJOR) {
+   /*
+* On legacy hosts filter unimplemented commands.
+* Future hosts are expected to correctly handle
+* unsupported commands. Furthermore, it is
+* possible that some of the currently
+* unsupported commands maybe supported in
+* future versions of the host.
+*/
+   if (!storvsc_scsi_cmd_ok(scmnd)) {
+   scmnd->scsi_done(scmnd);
+   return 0;
+   }
}

request_size = sizeof(struct storvsc_cmd_request);


Reviewed-by: Hannes Reinecke 

Cheers,

Hannes
--
Dr. Hannes Reinecke   zSeries & Storage
h...@suse.de  +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 5/7] Drivers: scsi: storvsc: Implement a timedout handler

2014-07-13 Thread Hannes Reinecke

On 07/12/2014 06:48 PM, K. Y. Srinivasan wrote:

On Azure, we have seen instances of unbounded I/O latencies. To deal with
this issue, implement handler that can reset the timeout. Note that the
host gaurantees that it will respond to each command that has been issued.


Signed-off-by: K. Y. Srinivasan 
Cc: 
---
  drivers/scsi/storvsc_drv.c |   10 ++
  1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index 7e8a642..3516761 100644
--- a/drivers/scsi/storvsc_drv.c
+++ b/drivers/scsi/storvsc_drv.c
@@ -33,6 +33,7 @@
  #include 
  #include 
  #include 
+#include 
  #include 
  #include 
  #include 
@@ -1518,6 +1519,14 @@ static int storvsc_host_reset_handler(struct scsi_cmnd 
*scmnd)
return SUCCESS;
  }

+static enum blk_eh_timer_return storvsc_timeout_handler(struct scsi_cmnd 
*scmnd)
+{
+   /*
+* The host will respond; ask for more time.
+*/
+   return BLK_EH_RESET_TIMER;
+}
+
  static bool storvsc_scsi_cmd_ok(struct scsi_cmnd *scmnd)
  {
bool allowed = true;
@@ -1697,6 +1706,7 @@ static struct scsi_host_template scsi_driver = {
.bios_param =   storvsc_get_chs,
.queuecommand = storvsc_queuecommand,
.eh_host_reset_handler =storvsc_host_reset_handler,
+   .eh_timed_out = storvsc_timeout_handler,
.slave_alloc =  storvsc_device_alloc,
.slave_destroy =storvsc_device_destroy,
.slave_configure =  storvsc_device_configure,


Reviewed-by: Hannes Reinecke 

Cheers,

Hannes
--
Dr. Hannes Reinecke   zSeries & Storage
h...@suse.de  +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 7/7] drivers: scsi: storvsc: Correctly handle TEST_UNIT_READY failure

2014-07-13 Thread Hannes Reinecke

On 07/12/2014 06:48 PM, K. Y. Srinivasan wrote:

On some Windows hosts on FC SANs, TEST_UNIT_READY can return SRB_STATUS_ERROR.
Correctly handle this. Note that there is sufficient sense information to
support scsi error handling even in this case.

In this version of the patch I have addressed comments from
Christoph Hellwig 

Signed-off-by: K. Y. Srinivasan 
Cc: 
---
  drivers/scsi/storvsc_drv.c |7 +++
  1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index 9342ba4..29d0329 100644
--- a/drivers/scsi/storvsc_drv.c
+++ b/drivers/scsi/storvsc_drv.c
@@ -1018,6 +1018,13 @@ static void storvsc_handle_error(struct vmscsi_request 
*vm_srb,
case ATA_12:
set_host_byte(scmnd, DID_PASSTHROUGH);
break;
+   /*
+* On Some Windows hosts TEST_UNIT_READY command can return
+* SRB_STATUS_ERROR, let the upper level code deal with it
+* based on the sense information.
+*/
+   case TEST_UNIT_READY:
+   break;
default:
set_host_byte(scmnd, DID_TARGET_FAILURE);
}


Reviewed-by: Hannes Reinecke 

Cheers,

Hannes
--
Dr. Hannes Reinecke   zSeries & Storage
h...@suse.de  +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 6/7] drivers: scsi: storvsc: Set srb_flags in all cases

2014-07-13 Thread Hannes Reinecke

On 07/12/2014 06:48 PM, K. Y. Srinivasan wrote:

Correctly set SRB flags for all valid I/O directions. Some IHV drivers on the
Windows host require this. The host validates the command and SRB flags
prior to passing the command down to native driver stack.

Signed-off-by: K. Y. Srinivasan 
Cc: 
---
  drivers/scsi/storvsc_drv.c |   12 +---
  1 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index 3516761..9342ba4 100644
--- a/drivers/scsi/storvsc_drv.c
+++ b/drivers/scsi/storvsc_drv.c
@@ -1599,26 +1599,24 @@ static int storvsc_queuecommand(struct Scsi_Host *host, 
struct scsi_cmnd *scmnd)
vm_srb = &cmd_request->vstor_packet.vm_srb;
vm_srb->win8_extension.time_out_value = 60;

+   vm_srb->win8_extension.srb_flags |=
+   (SRB_FLAGS_QUEUE_ACTION_ENABLE |
+   SRB_FLAGS_DISABLE_SYNCH_TRANSFER);

/* Build the SRB */
switch (scmnd->sc_data_direction) {
case DMA_TO_DEVICE:
vm_srb->data_in = WRITE_TYPE;
vm_srb->win8_extension.srb_flags |= SRB_FLAGS_DATA_OUT;
-   vm_srb->win8_extension.srb_flags |=
-   (SRB_FLAGS_QUEUE_ACTION_ENABLE |
-   SRB_FLAGS_DISABLE_SYNCH_TRANSFER);
break;
case DMA_FROM_DEVICE:
vm_srb->data_in = READ_TYPE;
vm_srb->win8_extension.srb_flags |= SRB_FLAGS_DATA_IN;
-   vm_srb->win8_extension.srb_flags |=
-   (SRB_FLAGS_QUEUE_ACTION_ENABLE |
-   SRB_FLAGS_DISABLE_SYNCH_TRANSFER);
break;
default:
vm_srb->data_in = UNKNOWN_TYPE;
-   vm_srb->win8_extension.srb_flags = 0;
+   vm_srb->win8_extension.srb_flags |= (SRB_FLAGS_DATA_IN |
+SRB_FLAGS_DATA_OUT);
break;
}



Reviewed-by: Hannes Reinecke 

Cheers,

Hannes
--
Dr. Hannes Reinecke   zSeries & Storage
h...@suse.de  +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] xillybus: place 'else' on same line as '}'

2014-07-13 Thread Eli Billauer

Hi,

Thanks for this.

And since I looked at the part in Codingstyle that deals with if-else, I 
found another few mistakes regarding braces around a single statement. 
The rules say, it turns out, that if one of the clauses in an if-else is 
longer than one statement, both clauses should be wrapped with braces. 
This rule is broken in lines 162, 536 and 613 of the same file.


To avoid possible conflicts, I'll wait for this patch to be applied, and 
submit my corrections after that.


Regards,
   Eli


On 14/07/14 06:07, Jeremiah Mahler wrote:

Place 'else' on same line as closing brace '}' as per
Documentation/CodingStyle.  Fixes 1 error found by checkpatch.pl.

Signed-off-by: Jeremiah Mahler
---
  drivers/staging/xillybus/xillybus_core.c | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/xillybus/xillybus_core.c 
b/drivers/staging/xillybus/xillybus_core.c
index ab6502c..7de4c11 100644
--- a/drivers/staging/xillybus/xillybus_core.c
+++ b/drivers/staging/xillybus/xillybus_core.c
@@ -546,8 +546,7 @@ static int xilly_setupchannels(struct xilly_endpoint *ep,
channel->rd_buffers = buffers;
rc = xilly_get_dma_buffers(ep,&rd_alloc, buffers,
   bufnum, bytebufsize);
-   }
-   else if (channelnum>  0) {
+   } else if (channelnum>  0) {
channel->num_wr_buffers = bufnum;

channel->seekable = seekable;
   


___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel