linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 3/5] w35und: remove dead code from wbusb_f.h
@ 2008-10-22 16:06 Pekka J Enberg
  2008-10-23  9:47 ` Pavel Machek
  2008-10-27 18:37 ` Greg KH
  0 siblings, 2 replies; 7+ messages in thread
From: Pekka J Enberg @ 2008-10-22 16:06 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Pavel Machek, linux-kernel

From: Pekka Enberg <penberg@cs.helsinki.fi>

Remove dead code from wbusb_f.h and move the WbWLanInitialize() definition to
wblinux_f.h where it arguably belongs to. As the wbusb_f.h is now empty, we can
remove it completely.

Cc: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
---
 drivers/staging/winbond/linux/wbusb.c   |   12 ------
 drivers/staging/winbond/linux/wbusb_f.h |   25 -------------
 drivers/staging/winbond/wbhal.c         |   57 ++++++++++++++-----------------
 drivers/staging/winbond/wbhal_f.h       |    2 -
 drivers/staging/winbond/wblinux_f.h     |    3 +-
 5 files changed, 27 insertions(+), 72 deletions(-)
 delete mode 100644 drivers/staging/winbond/linux/wbusb_f.h

diff --git a/drivers/staging/winbond/linux/wbusb.c b/drivers/staging/winbond/linux/wbusb.c
index c3394bf..8b6d99c 100644
--- a/drivers/staging/winbond/linux/wbusb.c
+++ b/drivers/staging/winbond/linux/wbusb.c
@@ -296,18 +296,6 @@ void packet_came(char *pRxBufferAddress, int PacketSize)
 	ieee80211_rx_irqsafe(my_dev, skb, &rx_status);
 }
 
-unsigned char
-WbUsb_initial(phw_data_t pHwData)
-{
-	return 1;
-}
-
-
-void
-WbUsb_destroy(phw_data_t pHwData)
-{
-}
-
 static void wb35_disconnect(struct usb_interface *intf)
 {
 	struct wb35_adapter * adapter = usb_get_intfdata(intf);
diff --git a/drivers/staging/winbond/linux/wbusb_f.h b/drivers/staging/winbond/linux/wbusb_f.h
deleted file mode 100644
index a1d5946..0000000
--- a/drivers/staging/winbond/linux/wbusb_f.h
+++ /dev/null
@@ -1,25 +0,0 @@
-//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-// Copyright (c) 1996-2004 Winbond Electronic Corporation
-//
-//  Module Name:
-//    wbusb_f.h
-//
-//  Abstract:
-//    Linux driver.
-//
-//  Author:
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-unsigned char WbUsb_initial(phw_data_t pHwData);
-void WbUsb_destroy(phw_data_t pHwData);
-unsigned char WbWLanInitialize(struct wb35_adapter *adapter);
-#define	WbUsb_Stop( _A )
-
-#define WbUsb_CheckForHang( _P )
-#define WbUsb_DetectStart( _P, _I )
-
-
-
-
-
diff --git a/drivers/staging/winbond/wbhal.c b/drivers/staging/winbond/wbhal.c
index 8da441c..356bd91 100644
--- a/drivers/staging/winbond/wbhal.c
+++ b/drivers/staging/winbond/wbhal.c
@@ -37,34 +37,32 @@ u8 hal_init_hardware(phw_data_t pHwData, struct wb35_adapter * adapter)
 	pHwData->MaxReceiveLifeTime = DEFAULT_MSDU_LIFE_TIME; // Setting Rx maximum MSDU life time
 	pHwData->FragmentThreshold = DEFAULT_FRAGMENT_THRESHOLD; // Setting default fragment threshold
 
-	if (WbUsb_initial(pHwData)) {
-		pHwData->InitialResource = 1;
-		if( Wb35Reg_initial(pHwData)) {
-			pHwData->InitialResource = 2;
-			if (Wb35Tx_initial(pHwData)) {
-				pHwData->InitialResource = 3;
-				if (Wb35Rx_initial(pHwData)) {
-					pHwData->InitialResource = 4;
-					OS_TIMER_INITIAL( &pHwData->LEDTimer, hal_led_control, pHwData );
-					OS_TIMER_SET( &pHwData->LEDTimer, 1000 ); // 20060623
-
-					//
-					// For restrict to vendor's hardware
-					//
-					SoftwareSet = hal_software_set( pHwData );
-
-					#ifdef Vendor2
-					// Try to make sure the EEPROM contain
-					SoftwareSet >>= 8;
-					if( SoftwareSet != 0x82 )
-						return FALSE;
-					#endif
-
-					Wb35Rx_start( pHwData );
-					Wb35Tx_EP2VM_start( pHwData );
-
-					return TRUE;
-				}
+	pHwData->InitialResource = 1;
+	if( Wb35Reg_initial(pHwData)) {
+		pHwData->InitialResource = 2;
+		if (Wb35Tx_initial(pHwData)) {
+			pHwData->InitialResource = 3;
+			if (Wb35Rx_initial(pHwData)) {
+				pHwData->InitialResource = 4;
+				OS_TIMER_INITIAL( &pHwData->LEDTimer, hal_led_control, pHwData );
+				OS_TIMER_SET( &pHwData->LEDTimer, 1000 ); // 20060623
+
+				//
+				// For restrict to vendor's hardware
+				//
+				SoftwareSet = hal_software_set( pHwData );
+
+				#ifdef Vendor2
+				// Try to make sure the EEPROM contain
+				SoftwareSet >>= 8;
+				if( SoftwareSet != 0x82 )
+					return FALSE;
+				#endif
+
+				Wb35Rx_start( pHwData );
+				Wb35Tx_EP2VM_start( pHwData );
+
+				return TRUE;
 			}
 		}
 	}
@@ -84,7 +82,6 @@ void hal_halt(phw_data_t pHwData, void *ppa_data)
 			Wb35Rx_destroy( pHwData ); // Release the Rx
 		case 2: Wb35Tx_destroy( pHwData ); // Release the Tx
 		case 1: Wb35Reg_destroy( pHwData ); // Release the Wb35 Regisster resources
-				WbUsb_destroy( pHwData );// Release the WbUsb
 	}
 }
 
@@ -330,8 +327,6 @@ void hal_stop(  phw_data_t pHwData )
 
 	reg->D00_DmaControl &= ~0xc0000000;//Tx Off, Rx Off
 	Wb35Reg_Write( pHwData, 0x0400, reg->D00_DmaControl );
-
-	WbUsb_Stop( pHwData ); // 20051230 Add.4
 }
 
 unsigned char hal_idle(phw_data_t pHwData)
diff --git a/drivers/staging/winbond/wbhal_f.h b/drivers/staging/winbond/wbhal_f.h
index 4ecf191..9f0436b 100644
--- a/drivers/staging/winbond/wbhal_f.h
+++ b/drivers/staging/winbond/wbhal_f.h
@@ -2,12 +2,10 @@
 // Device related include
 //=====================================================================
 #ifdef WB_LINUX
-	#include "linux/wbusb_f.h"
 	#include "linux/wb35reg_f.h"
 	#include "linux/wb35tx_f.h"
 	#include "linux/wb35rx_f.h"
 #else
-	#include "wbusb_f.h"
 	#include "wb35reg_f.h"
 	#include "wb35tx_f.h"
 	#include "wb35rx_f.h"
diff --git a/drivers/staging/winbond/wblinux_f.h b/drivers/staging/winbond/wblinux_f.h
index 446ace9..1d09c65 100644
--- a/drivers/staging/winbond/wblinux_f.h
+++ b/drivers/staging/winbond/wblinux_f.h
@@ -18,6 +18,5 @@ struct net_device_stats * wb35_netdev_stats( struct net_device *netdev );
 void WBLINUX_stop(  struct wb35_adapter *adapter );
 void WbWlanHalt(  struct wb35_adapter *adapter );
 void WBLINUX_ConnectStatus(  struct wb35_adapter *adapter,  u32 flag );
-
-
+unsigned char WbWLanInitialize(struct wb35_adapter *adapter);
 
-- 
1.5.3.7


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 3/5] w35und: remove dead code from wbusb_f.h
  2008-10-22 16:06 [PATCH 3/5] w35und: remove dead code from wbusb_f.h Pekka J Enberg
@ 2008-10-23  9:47 ` Pavel Machek
  2008-10-27 18:37 ` Greg KH
  1 sibling, 0 replies; 7+ messages in thread
From: Pavel Machek @ 2008-10-23  9:47 UTC (permalink / raw)
  To: Pekka J Enberg; +Cc: Greg Kroah-Hartman, linux-kernel

On Wed 2008-10-22 19:06:41, Pekka J Enberg wrote:
> From: Pekka Enberg <penberg@cs.helsinki.fi>
> 
> Remove dead code from wbusb_f.h and move the WbWLanInitialize() definition to
> wblinux_f.h where it arguably belongs to. As the wbusb_f.h is now empty, we can
> remove it completely.
> 
> Cc: Pavel Machek <pavel@suse.cz>
> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>

ACK.

> ---
>  drivers/staging/winbond/linux/wbusb.c   |   12 ------
>  drivers/staging/winbond/linux/wbusb_f.h |   25 -------------
>  drivers/staging/winbond/wbhal.c         |   57 ++++++++++++++-----------------
>  drivers/staging/winbond/wbhal_f.h       |    2 -
>  drivers/staging/winbond/wblinux_f.h     |    3 +-
>  5 files changed, 27 insertions(+), 72 deletions(-)
>  delete mode 100644 drivers/staging/winbond/linux/wbusb_f.h
> 
> diff --git a/drivers/staging/winbond/linux/wbusb.c b/drivers/staging/winbond/linux/wbusb.c
> index c3394bf..8b6d99c 100644
> --- a/drivers/staging/winbond/linux/wbusb.c
> +++ b/drivers/staging/winbond/linux/wbusb.c
> @@ -296,18 +296,6 @@ void packet_came(char *pRxBufferAddress, int PacketSize)
>  	ieee80211_rx_irqsafe(my_dev, skb, &rx_status);
>  }
>  
> -unsigned char
> -WbUsb_initial(phw_data_t pHwData)
> -{
> -	return 1;
> -}
> -
> -
> -void
> -WbUsb_destroy(phw_data_t pHwData)
> -{
> -}
> -
>  static void wb35_disconnect(struct usb_interface *intf)
>  {
>  	struct wb35_adapter * adapter = usb_get_intfdata(intf);
> diff --git a/drivers/staging/winbond/linux/wbusb_f.h b/drivers/staging/winbond/linux/wbusb_f.h
> deleted file mode 100644
> index a1d5946..0000000
> --- a/drivers/staging/winbond/linux/wbusb_f.h
> +++ /dev/null
> @@ -1,25 +0,0 @@
> -//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> -// Copyright (c) 1996-2004 Winbond Electronic Corporation
> -//
> -//  Module Name:
> -//    wbusb_f.h
> -//
> -//  Abstract:
> -//    Linux driver.
> -//
> -//  Author:
> -//
> -//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> -
> -unsigned char WbUsb_initial(phw_data_t pHwData);
> -void WbUsb_destroy(phw_data_t pHwData);
> -unsigned char WbWLanInitialize(struct wb35_adapter *adapter);
> -#define	WbUsb_Stop( _A )
> -
> -#define WbUsb_CheckForHang( _P )
> -#define WbUsb_DetectStart( _P, _I )
> -
> -
> -
> -
> -
> diff --git a/drivers/staging/winbond/wbhal.c b/drivers/staging/winbond/wbhal.c
> index 8da441c..356bd91 100644
> --- a/drivers/staging/winbond/wbhal.c
> +++ b/drivers/staging/winbond/wbhal.c
> @@ -37,34 +37,32 @@ u8 hal_init_hardware(phw_data_t pHwData, struct wb35_adapter * adapter)
>  	pHwData->MaxReceiveLifeTime = DEFAULT_MSDU_LIFE_TIME; // Setting Rx maximum MSDU life time
>  	pHwData->FragmentThreshold = DEFAULT_FRAGMENT_THRESHOLD; // Setting default fragment threshold
>  
> -	if (WbUsb_initial(pHwData)) {
> -		pHwData->InitialResource = 1;
> -		if( Wb35Reg_initial(pHwData)) {
> -			pHwData->InitialResource = 2;
> -			if (Wb35Tx_initial(pHwData)) {
> -				pHwData->InitialResource = 3;
> -				if (Wb35Rx_initial(pHwData)) {
> -					pHwData->InitialResource = 4;
> -					OS_TIMER_INITIAL( &pHwData->LEDTimer, hal_led_control, pHwData );
> -					OS_TIMER_SET( &pHwData->LEDTimer, 1000 ); // 20060623
> -
> -					//
> -					// For restrict to vendor's hardware
> -					//
> -					SoftwareSet = hal_software_set( pHwData );
> -
> -					#ifdef Vendor2
> -					// Try to make sure the EEPROM contain
> -					SoftwareSet >>= 8;
> -					if( SoftwareSet != 0x82 )
> -						return FALSE;
> -					#endif
> -
> -					Wb35Rx_start( pHwData );
> -					Wb35Tx_EP2VM_start( pHwData );
> -
> -					return TRUE;
> -				}
> +	pHwData->InitialResource = 1;
> +	if( Wb35Reg_initial(pHwData)) {
> +		pHwData->InitialResource = 2;
> +		if (Wb35Tx_initial(pHwData)) {
> +			pHwData->InitialResource = 3;
> +			if (Wb35Rx_initial(pHwData)) {
> +				pHwData->InitialResource = 4;
> +				OS_TIMER_INITIAL( &pHwData->LEDTimer, hal_led_control, pHwData );
> +				OS_TIMER_SET( &pHwData->LEDTimer, 1000 ); // 20060623
> +
> +				//
> +				// For restrict to vendor's hardware
> +				//
> +				SoftwareSet = hal_software_set( pHwData );
> +
> +				#ifdef Vendor2
> +				// Try to make sure the EEPROM contain
> +				SoftwareSet >>= 8;
> +				if( SoftwareSet != 0x82 )
> +					return FALSE;
> +				#endif
> +
> +				Wb35Rx_start( pHwData );
> +				Wb35Tx_EP2VM_start( pHwData );
> +
> +				return TRUE;
>  			}
>  		}
>  	}
> @@ -84,7 +82,6 @@ void hal_halt(phw_data_t pHwData, void *ppa_data)
>  			Wb35Rx_destroy( pHwData ); // Release the Rx
>  		case 2: Wb35Tx_destroy( pHwData ); // Release the Tx
>  		case 1: Wb35Reg_destroy( pHwData ); // Release the Wb35 Regisster resources
> -				WbUsb_destroy( pHwData );// Release the WbUsb
>  	}
>  }
>  
> @@ -330,8 +327,6 @@ void hal_stop(  phw_data_t pHwData )
>  
>  	reg->D00_DmaControl &= ~0xc0000000;//Tx Off, Rx Off
>  	Wb35Reg_Write( pHwData, 0x0400, reg->D00_DmaControl );
> -
> -	WbUsb_Stop( pHwData ); // 20051230 Add.4
>  }
>  
>  unsigned char hal_idle(phw_data_t pHwData)
> diff --git a/drivers/staging/winbond/wbhal_f.h b/drivers/staging/winbond/wbhal_f.h
> index 4ecf191..9f0436b 100644
> --- a/drivers/staging/winbond/wbhal_f.h
> +++ b/drivers/staging/winbond/wbhal_f.h
> @@ -2,12 +2,10 @@
>  // Device related include
>  //=====================================================================
>  #ifdef WB_LINUX
> -	#include "linux/wbusb_f.h"
>  	#include "linux/wb35reg_f.h"
>  	#include "linux/wb35tx_f.h"
>  	#include "linux/wb35rx_f.h"
>  #else
> -	#include "wbusb_f.h"
>  	#include "wb35reg_f.h"
>  	#include "wb35tx_f.h"
>  	#include "wb35rx_f.h"
> diff --git a/drivers/staging/winbond/wblinux_f.h b/drivers/staging/winbond/wblinux_f.h
> index 446ace9..1d09c65 100644
> --- a/drivers/staging/winbond/wblinux_f.h
> +++ b/drivers/staging/winbond/wblinux_f.h
> @@ -18,6 +18,5 @@ struct net_device_stats * wb35_netdev_stats( struct net_device *netdev );
>  void WBLINUX_stop(  struct wb35_adapter *adapter );
>  void WbWlanHalt(  struct wb35_adapter *adapter );
>  void WBLINUX_ConnectStatus(  struct wb35_adapter *adapter,  u32 flag );
> -
> -
> +unsigned char WbWLanInitialize(struct wb35_adapter *adapter);
>  

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 3/5] w35und: remove dead code from wbusb_f.h
  2008-10-22 16:06 [PATCH 3/5] w35und: remove dead code from wbusb_f.h Pekka J Enberg
  2008-10-23  9:47 ` Pavel Machek
@ 2008-10-27 18:37 ` Greg KH
  2008-10-27 20:44   ` Pekka J Enberg
  1 sibling, 1 reply; 7+ messages in thread
From: Greg KH @ 2008-10-27 18:37 UTC (permalink / raw)
  To: Pekka J Enberg; +Cc: Pavel Machek, linux-kernel

On Wed, Oct 22, 2008 at 07:06:41PM +0300, Pekka J Enberg wrote:
> From: Pekka Enberg <penberg@cs.helsinki.fi>
> 
> Remove dead code from wbusb_f.h and move the WbWLanInitialize() definition to
> wblinux_f.h where it arguably belongs to. As the wbusb_f.h is now empty, we can
> remove it completely.
> 
> Cc: Pavel Machek <pavel@suse.cz>
> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>

This patch gives me a bunch of build errors as I don't think you are in
sync with the other changes in these files.

Care to respin it against 2.6.28-rc2?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 3/5] w35und: remove dead code from wbusb_f.h
  2008-10-27 18:37 ` Greg KH
@ 2008-10-27 20:44   ` Pekka J Enberg
  2008-10-27 21:14     ` Greg KH
  0 siblings, 1 reply; 7+ messages in thread
From: Pekka J Enberg @ 2008-10-27 20:44 UTC (permalink / raw)
  To: Greg KH; +Cc: Pavel Machek, linux-kernel

Hi Greg,

On Wed, Oct 22, 2008 at 07:06:41PM +0300, Pekka J Enberg wrote:
> > From: Pekka Enberg <penberg@cs.helsinki.fi>
> > 
> > Remove dead code from wbusb_f.h and move the WbWLanInitialize() definition to
> > wblinux_f.h where it arguably belongs to. As the wbusb_f.h is now empty, we can
> > remove it completely.
> > 
> > Cc: Pavel Machek <pavel@suse.cz>
> > Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>

On Mon, 27 Oct 2008, Greg KH wrote:
> This patch gives me a bunch of build errors as I don't think you are in
> sync with the other changes in these files.
> 
> Care to respin it against 2.6.28-rc2?

That's strange. I rebased against 2.6.28-rc2 but didn't get any conficts 
and everything seems to build just fine. What kind of errors are you 
seeing?

I've included the rediffed patch here in case it helps. Not sure why it 
would...

		Pekka

>From cc8c4e3686389a46e552c016722e3983ef72ac00 Mon Sep 17 00:00:00 2001
From: Pekka Enberg <penberg@cs.helsinki.fi>
Date: Wed, 22 Oct 2008 18:46:33 +0300
Subject: [PATCH] w35und: remove dead code from wbusb_f.h

Remove dead code from wbusb_f.h and move the WbWLanInitialize() definition to
wblinux_f.h where it arguably belongs to. As the wbusb_f.h is now empty, we can
remove it completely.

Cc: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
---
 drivers/staging/winbond/linux/wbusb.c   |   12 ------
 drivers/staging/winbond/linux/wbusb_f.h |   25 -------------
 drivers/staging/winbond/wbhal.c         |   57 ++++++++++++++-----------------
 drivers/staging/winbond/wbhal_f.h       |    2 -
 drivers/staging/winbond/wblinux_f.h     |    3 +-
 5 files changed, 27 insertions(+), 72 deletions(-)
 delete mode 100644 drivers/staging/winbond/linux/wbusb_f.h

diff --git a/drivers/staging/winbond/linux/wbusb.c b/drivers/staging/winbond/linux/wbusb.c
index 3519e5b..a4403d2 100644
--- a/drivers/staging/winbond/linux/wbusb.c
+++ b/drivers/staging/winbond/linux/wbusb.c
@@ -307,18 +307,6 @@ void packet_came(char *pRxBufferAddress, int PacketSize)
 	ieee80211_rx_irqsafe(my_dev, skb, &rx_status);
 }
 
-unsigned char
-WbUsb_initial(phw_data_t pHwData)
-{
-	return 1;
-}
-
-
-void
-WbUsb_destroy(phw_data_t pHwData)
-{
-}
-
 static void wb35_disconnect(struct usb_interface *intf)
 {
 	struct wb35_adapter * adapter = usb_get_intfdata(intf);
diff --git a/drivers/staging/winbond/linux/wbusb_f.h b/drivers/staging/winbond/linux/wbusb_f.h
deleted file mode 100644
index a1d5946..0000000
--- a/drivers/staging/winbond/linux/wbusb_f.h
+++ /dev/null
@@ -1,25 +0,0 @@
-//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-// Copyright (c) 1996-2004 Winbond Electronic Corporation
-//
-//  Module Name:
-//    wbusb_f.h
-//
-//  Abstract:
-//    Linux driver.
-//
-//  Author:
-//
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-unsigned char WbUsb_initial(phw_data_t pHwData);
-void WbUsb_destroy(phw_data_t pHwData);
-unsigned char WbWLanInitialize(struct wb35_adapter *adapter);
-#define	WbUsb_Stop( _A )
-
-#define WbUsb_CheckForHang( _P )
-#define WbUsb_DetectStart( _P, _I )
-
-
-
-
-
diff --git a/drivers/staging/winbond/wbhal.c b/drivers/staging/winbond/wbhal.c
index 8da441c..356bd91 100644
--- a/drivers/staging/winbond/wbhal.c
+++ b/drivers/staging/winbond/wbhal.c
@@ -37,34 +37,32 @@ u8 hal_init_hardware(phw_data_t pHwData, struct wb35_adapter * adapter)
 	pHwData->MaxReceiveLifeTime = DEFAULT_MSDU_LIFE_TIME; // Setting Rx maximum MSDU life time
 	pHwData->FragmentThreshold = DEFAULT_FRAGMENT_THRESHOLD; // Setting default fragment threshold
 
-	if (WbUsb_initial(pHwData)) {
-		pHwData->InitialResource = 1;
-		if( Wb35Reg_initial(pHwData)) {
-			pHwData->InitialResource = 2;
-			if (Wb35Tx_initial(pHwData)) {
-				pHwData->InitialResource = 3;
-				if (Wb35Rx_initial(pHwData)) {
-					pHwData->InitialResource = 4;
-					OS_TIMER_INITIAL( &pHwData->LEDTimer, hal_led_control, pHwData );
-					OS_TIMER_SET( &pHwData->LEDTimer, 1000 ); // 20060623
-
-					//
-					// For restrict to vendor's hardware
-					//
-					SoftwareSet = hal_software_set( pHwData );
-
-					#ifdef Vendor2
-					// Try to make sure the EEPROM contain
-					SoftwareSet >>= 8;
-					if( SoftwareSet != 0x82 )
-						return FALSE;
-					#endif
-
-					Wb35Rx_start( pHwData );
-					Wb35Tx_EP2VM_start( pHwData );
-
-					return TRUE;
-				}
+	pHwData->InitialResource = 1;
+	if( Wb35Reg_initial(pHwData)) {
+		pHwData->InitialResource = 2;
+		if (Wb35Tx_initial(pHwData)) {
+			pHwData->InitialResource = 3;
+			if (Wb35Rx_initial(pHwData)) {
+				pHwData->InitialResource = 4;
+				OS_TIMER_INITIAL( &pHwData->LEDTimer, hal_led_control, pHwData );
+				OS_TIMER_SET( &pHwData->LEDTimer, 1000 ); // 20060623
+
+				//
+				// For restrict to vendor's hardware
+				//
+				SoftwareSet = hal_software_set( pHwData );
+
+				#ifdef Vendor2
+				// Try to make sure the EEPROM contain
+				SoftwareSet >>= 8;
+				if( SoftwareSet != 0x82 )
+					return FALSE;
+				#endif
+
+				Wb35Rx_start( pHwData );
+				Wb35Tx_EP2VM_start( pHwData );
+
+				return TRUE;
 			}
 		}
 	}
@@ -84,7 +82,6 @@ void hal_halt(phw_data_t pHwData, void *ppa_data)
 			Wb35Rx_destroy( pHwData ); // Release the Rx
 		case 2: Wb35Tx_destroy( pHwData ); // Release the Tx
 		case 1: Wb35Reg_destroy( pHwData ); // Release the Wb35 Regisster resources
-				WbUsb_destroy( pHwData );// Release the WbUsb
 	}
 }
 
@@ -330,8 +327,6 @@ void hal_stop(  phw_data_t pHwData )
 
 	reg->D00_DmaControl &= ~0xc0000000;//Tx Off, Rx Off
 	Wb35Reg_Write( pHwData, 0x0400, reg->D00_DmaControl );
-
-	WbUsb_Stop( pHwData ); // 20051230 Add.4
 }
 
 unsigned char hal_idle(phw_data_t pHwData)
diff --git a/drivers/staging/winbond/wbhal_f.h b/drivers/staging/winbond/wbhal_f.h
index 4ecf191..9f0436b 100644
--- a/drivers/staging/winbond/wbhal_f.h
+++ b/drivers/staging/winbond/wbhal_f.h
@@ -2,12 +2,10 @@
 // Device related include
 //=====================================================================
 #ifdef WB_LINUX
-	#include "linux/wbusb_f.h"
 	#include "linux/wb35reg_f.h"
 	#include "linux/wb35tx_f.h"
 	#include "linux/wb35rx_f.h"
 #else
-	#include "wbusb_f.h"
 	#include "wb35reg_f.h"
 	#include "wb35tx_f.h"
 	#include "wb35rx_f.h"
diff --git a/drivers/staging/winbond/wblinux_f.h b/drivers/staging/winbond/wblinux_f.h
index 446ace9..1d09c65 100644
--- a/drivers/staging/winbond/wblinux_f.h
+++ b/drivers/staging/winbond/wblinux_f.h
@@ -18,6 +18,5 @@ struct net_device_stats * wb35_netdev_stats( struct net_device *netdev );
 void WBLINUX_stop(  struct wb35_adapter *adapter );
 void WbWlanHalt(  struct wb35_adapter *adapter );
 void WBLINUX_ConnectStatus(  struct wb35_adapter *adapter,  u32 flag );
-
-
+unsigned char WbWLanInitialize(struct wb35_adapter *adapter);
 
-- 
1.5.3.7


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 3/5] w35und: remove dead code from wbusb_f.h
  2008-10-27 20:44   ` Pekka J Enberg
@ 2008-10-27 21:14     ` Greg KH
  2008-10-27 21:34       ` Pekka J Enberg
  0 siblings, 1 reply; 7+ messages in thread
From: Greg KH @ 2008-10-27 21:14 UTC (permalink / raw)
  To: Pekka J Enberg; +Cc: Pavel Machek, linux-kernel

On Mon, Oct 27, 2008 at 10:44:19PM +0200, Pekka J Enberg wrote:
> Hi Greg,
> 
> On Wed, Oct 22, 2008 at 07:06:41PM +0300, Pekka J Enberg wrote:
> > > From: Pekka Enberg <penberg@cs.helsinki.fi>
> > > 
> > > Remove dead code from wbusb_f.h and move the WbWLanInitialize() definition to
> > > wblinux_f.h where it arguably belongs to. As the wbusb_f.h is now empty, we can
> > > remove it completely.
> > > 
> > > Cc: Pavel Machek <pavel@suse.cz>
> > > Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
> 
> On Mon, 27 Oct 2008, Greg KH wrote:
> > This patch gives me a bunch of build errors as I don't think you are in
> > sync with the other changes in these files.
> > 
> > Care to respin it against 2.6.28-rc2?
> 
> That's strange. I rebased against 2.6.28-rc2 but didn't get any conficts 
> and everything seems to build just fine. What kind of errors are you 
> seeing?
> 
> I've included the rediffed patch here in case it helps. Not sure why it 
> would...

I still get the following errors with this patch applied:

  CC [M]  drivers/staging/winbond/./linux/wb35reg.o
drivers/staging/winbond/./linux/wb35reg.c: In function ‘Wb35Reg_BurstWrite’:
drivers/staging/winbond/./linux/wb35reg.c:29: error: implicit declaration of function ‘wb_usb_alloc_urb’
drivers/staging/winbond/./linux/wb35reg.c:29: warning: assignment makes pointer from integer without a cast
drivers/staging/winbond/./linux/wb35reg.c: In function ‘Wb35Reg_Write’:
drivers/staging/winbond/./linux/wb35reg.c:178: warning: assignment makes pointer from integer without a cast
drivers/staging/winbond/./linux/wb35reg.c: In function ‘Wb35Reg_WriteWithCallbackValue’:
drivers/staging/winbond/./linux/wb35reg.c:238: warning: assignment makes pointer from integer without a cast
drivers/staging/winbond/./linux/wb35reg.c: In function ‘Wb35Reg_Read’:
drivers/staging/winbond/./linux/wb35reg.c:345: warning: assignment makes pointer from integer without a cast
drivers/staging/winbond/./linux/wb35reg.c: In function ‘Wb35Reg_EP0VM’:
drivers/staging/winbond/./linux/wb35reg.c:437: error: implicit declaration of function ‘wb_usb_submit_urb’
make[2]: *** [drivers/staging/winbond/./linux/wb35reg.o] Error 1

This seems to be because wb_usb_submit_urb() and alloc_urb() are in the
drivers/staging/winbond/linux/wbusb_f.h file when it is removed.

I'll go fix this up by adding another patch removing these entries.
Don't know how they got in here, odd.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 3/5] w35und: remove dead code from wbusb_f.h
  2008-10-27 21:14     ` Greg KH
@ 2008-10-27 21:34       ` Pekka J Enberg
  2008-10-27 22:07         ` Greg KH
  0 siblings, 1 reply; 7+ messages in thread
From: Pekka J Enberg @ 2008-10-27 21:34 UTC (permalink / raw)
  To: Greg KH; +Cc: Pavel Machek, linux-kernel

On Mon, 27 Oct 2008, Greg KH wrote:
> This seems to be because wb_usb_submit_urb() and alloc_urb() are in the
> drivers/staging/winbond/linux/wbusb_f.h file when it is removed.
> 
> I'll go fix this up by adding another patch removing these entries.
> Don't know how they got in here, odd.

That's because I forgot to send the following patch. Sorry about that.

		Pekka

>From 564d8ad6fd7b72ac7b5c10ebc56b5c3180cd9cc0 Mon Sep 17 00:00:00 2001
From: Pekka Enberg <penberg@cs.helsinki.fi>
Date: Wed, 22 Oct 2008 18:29:13 +0300
Subject: [PATCH] w35und: usb urb wrapper removal

This patch removes the useless wb_usb_{submit|alloc}_urb() wrappers from driver
code.

Cc: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
---
 drivers/staging/winbond/linux/wb35reg.c |   10 +++++-----
 drivers/staging/winbond/linux/wb35rx.c  |    4 ++--
 drivers/staging/winbond/linux/wb35tx.c  |    8 ++++----
 drivers/staging/winbond/linux/wbusb_f.h |    3 ---
 4 files changed, 11 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/winbond/linux/wb35reg.c b/drivers/staging/winbond/linux/wb35reg.c
index d716c19..4467c7a 100644
--- a/drivers/staging/winbond/linux/wb35reg.c
+++ b/drivers/staging/winbond/linux/wb35reg.c
@@ -26,7 +26,7 @@ Wb35Reg_BurstWrite(phw_data_t pHwData, u16 RegisterNo, u32 * pRegisterData, u8 N
 	// Trying to use burst write function if use new hardware
 	UrbSize = sizeof(struct wb35_reg_queue) + DataSize + sizeof(struct usb_ctrlrequest);
 	OS_MEMORY_ALLOC( (void* *)&reg_queue, UrbSize );
-	urb = wb_usb_alloc_urb(0);
+	urb = usb_alloc_urb(0, GFP_ATOMIC);
 	if( urb && reg_queue ) {
 		reg_queue->DIRECT = 2;// burst write register
 		reg_queue->INDEX = RegisterNo;
@@ -175,7 +175,7 @@ Wb35Reg_Write(  phw_data_t pHwData,  u16 RegisterNo,  u32 RegisterValue )
 	// update the register by send urb request------------------------------------
 	UrbSize = sizeof(struct wb35_reg_queue) + sizeof(struct usb_ctrlrequest);
 	OS_MEMORY_ALLOC( (void* *)&reg_queue, UrbSize );
-	urb = wb_usb_alloc_urb(0);
+	urb = usb_alloc_urb(0, GFP_ATOMIC);
 	if (urb && reg_queue) {
 		reg_queue->DIRECT = 1;// burst write register
 		reg_queue->INDEX = RegisterNo;
@@ -235,7 +235,7 @@ Wb35Reg_WriteWithCallbackValue( phw_data_t pHwData, u16 RegisterNo, u32 Register
 	// update the register by send urb request------------------------------------
 	UrbSize = sizeof(struct wb35_reg_queue) + sizeof(struct usb_ctrlrequest);
 	OS_MEMORY_ALLOC((void* *) &reg_queue, UrbSize );
-	urb = wb_usb_alloc_urb(0);
+	urb = usb_alloc_urb(0, GFP_ATOMIC);
 	if (urb && reg_queue) {
 		reg_queue->DIRECT = 1;// burst write register
 		reg_queue->INDEX = RegisterNo;
@@ -342,7 +342,7 @@ Wb35Reg_Read(phw_data_t pHwData, u16 RegisterNo,  u32 * pRegisterValue )
 	// update the variable by send Urb to read register ------------------------------------
 	UrbSize = sizeof(struct wb35_reg_queue) + sizeof(struct usb_ctrlrequest);
 	OS_MEMORY_ALLOC( (void* *)&reg_queue, UrbSize );
-	urb = wb_usb_alloc_urb(0);
+	urb = usb_alloc_urb(0, GFP_ATOMIC);
 	if( urb && reg_queue )
 	{
 		reg_queue->DIRECT = 0;// read register
@@ -434,7 +434,7 @@ Wb35Reg_EP0VM(phw_data_t pHwData )
 
 	reg->EP0vm_state = VM_RUNNING;
 
-	ret = wb_usb_submit_urb( urb );
+	ret = usb_submit_urb(urb, GFP_ATOMIC);
 
 	if (ret < 0) {
 #ifdef _PE_REG_DUMP_
diff --git a/drivers/staging/winbond/linux/wb35rx.c b/drivers/staging/winbond/linux/wb35rx.c
index 4fee835..e5ec29c 100644
--- a/drivers/staging/winbond/linux/wb35rx.c
+++ b/drivers/staging/winbond/linux/wb35rx.c
@@ -70,7 +70,7 @@ void Wb35Rx(  phw_data_t pHwData )
 
 	pWb35Rx->EP3vm_state = VM_RUNNING;
 
-	retv = wb_usb_submit_urb(urb);
+	retv = usb_submit_urb(urb, GFP_ATOMIC);
 
 	if (retv != 0) {
 		printk("Rx URB sending error\n");
@@ -168,7 +168,7 @@ unsigned char Wb35Rx_initial(phw_data_t pHwData)
 	// Initial the Buffer Queue
 	Wb35Rx_reset_descriptor( pHwData );
 
-	pWb35Rx->RxUrb = wb_usb_alloc_urb(0);
+	pWb35Rx->RxUrb = usb_alloc_urb(0, GFP_ATOMIC);
 	return (!!pWb35Rx->RxUrb);
 }
 
diff --git a/drivers/staging/winbond/linux/wb35tx.c b/drivers/staging/winbond/linux/wb35tx.c
index 8de0783..0a51d39 100644
--- a/drivers/staging/winbond/linux/wb35tx.c
+++ b/drivers/staging/winbond/linux/wb35tx.c
@@ -65,7 +65,7 @@ void Wb35Tx(phw_data_t pHwData)
 			  Wb35Tx_complete, pHwData);
 
 	pWb35Tx->EP4vm_state = VM_RUNNING;
-	retv = wb_usb_submit_urb( pUrb );
+	retv = usb_submit_urb(pUrb, GFP_ATOMIC);
 	if (retv<0) {
 		printk("EP4 Tx Irp sending error\n");
 		goto cleanup;
@@ -134,11 +134,11 @@ unsigned char Wb35Tx_initial(phw_data_t pHwData)
 {
 	PWB35TX pWb35Tx = &pHwData->Wb35Tx;
 
-	pWb35Tx->Tx4Urb = wb_usb_alloc_urb(0);
+	pWb35Tx->Tx4Urb = usb_alloc_urb(0, GFP_ATOMIC);
 	if (!pWb35Tx->Tx4Urb)
 		return FALSE;
 
-	pWb35Tx->Tx2Urb = wb_usb_alloc_urb(0);
+	pWb35Tx->Tx2Urb = usb_alloc_urb(0, GFP_ATOMIC);
 	if (!pWb35Tx->Tx2Urb)
 	{
 		usb_free_urb( pWb35Tx->Tx4Urb );
@@ -240,7 +240,7 @@ void Wb35Tx_EP2VM(phw_data_t pHwData)
 			  pltmp, MAX_INTERRUPT_LENGTH, Wb35Tx_EP2VM_complete, pHwData, 32);
 
 	pWb35Tx->EP2vm_state = VM_RUNNING;
-	retv = wb_usb_submit_urb( pUrb );
+	retv = usb_submit_urb(pUrb, GFP_ATOMIC);
 
 	if (retv < 0) {
 		#ifdef _PE_TX_DUMP_
diff --git a/drivers/staging/winbond/linux/wbusb_f.h b/drivers/staging/winbond/linux/wbusb_f.h
index 0392707..5225fa4 100644
--- a/drivers/staging/winbond/linux/wbusb_f.h
+++ b/drivers/staging/winbond/linux/wbusb_f.h
@@ -22,9 +22,6 @@ int wb35_probe(struct usb_interface *intf,const struct usb_device_id *id_table);
 void wb35_disconnect(struct usb_interface *intf);
 
 
-#define wb_usb_submit_urb(_A) usb_submit_urb(_A, GFP_ATOMIC)
-#define wb_usb_alloc_urb(_A) usb_alloc_urb(_A, GFP_ATOMIC)
-
 #define WbUsb_CheckForHang( _P )
 #define WbUsb_DetectStart( _P, _I )
 
-- 
1.5.3.7


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 3/5] w35und: remove dead code from wbusb_f.h
  2008-10-27 21:34       ` Pekka J Enberg
@ 2008-10-27 22:07         ` Greg KH
  0 siblings, 0 replies; 7+ messages in thread
From: Greg KH @ 2008-10-27 22:07 UTC (permalink / raw)
  To: Pekka J Enberg; +Cc: Pavel Machek, linux-kernel

On Mon, Oct 27, 2008 at 11:34:49PM +0200, Pekka J Enberg wrote:
> On Mon, 27 Oct 2008, Greg KH wrote:
> > This seems to be because wb_usb_submit_urb() and alloc_urb() are in the
> > drivers/staging/winbond/linux/wbusb_f.h file when it is removed.
> > 
> > I'll go fix this up by adding another patch removing these entries.
> > Don't know how they got in here, odd.
> 
> That's because I forgot to send the following patch. Sorry about that.

Heh, I already did this on my own.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-10-27 22:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-22 16:06 [PATCH 3/5] w35und: remove dead code from wbusb_f.h Pekka J Enberg
2008-10-23  9:47 ` Pavel Machek
2008-10-27 18:37 ` Greg KH
2008-10-27 20:44   ` Pekka J Enberg
2008-10-27 21:14     ` Greg KH
2008-10-27 21:34       ` Pekka J Enberg
2008-10-27 22:07         ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).