Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
Browse files Browse the repository at this point in the history
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6:
  Staging: fix wireless drivers depends
  Staging: wireless drivers Kconfig change
  Staging: android: mark subsystem as broken
  Staging: remove stlc45xx driver
  Staging: rtl8187se/rtl8192e/rtl8192su: allow module unload
  Staging: vt6656: fix the memory free bug in vntwusb_disconnect()
  Staging: Panel: prevent driver from calling misc_deregister twice on same ressource
  Staging: hv: fix oops in vmbus - missing #include
  Staging: hv: fix oops in vmbus - netvsc list_head
  Staging: hv: fix oops in vmbus - udev events
  Staging: hv: Fix vmbus load hang caused by faulty data packing
  Staging: hv: Fix null pointer error after vmbus loading
  Staging: hv TODO patches
  • Loading branch information
Linus Torvalds committed Oct 31, 2009
2 parents eb2890c + b881c6c commit b6727b1
Show file tree
Hide file tree
Showing 36 changed files with 75 additions and 3,462 deletions.
2 changes: 0 additions & 2 deletions drivers/staging/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@ source "drivers/staging/dst/Kconfig"

source "drivers/staging/pohmelfs/Kconfig"

source "drivers/staging/stlc45xx/Kconfig"

source "drivers/staging/b3dfg/Kconfig"

source "drivers/staging/phison/Kconfig"
Expand Down
1 change: 0 additions & 1 deletion drivers/staging/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ obj-$(CONFIG_ANDROID) += android/
obj-$(CONFIG_ANDROID) += dream/
obj-$(CONFIG_DST) += dst/
obj-$(CONFIG_POHMELFS) += pohmelfs/
obj-$(CONFIG_STLC45XX) += stlc45xx/
obj-$(CONFIG_B3DFG) += b3dfg/
obj-$(CONFIG_IDE_PHISON) += phison/
obj-$(CONFIG_PLAN9AUTH) += p9auth/
Expand Down
1 change: 1 addition & 0 deletions drivers/staging/android/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ menu "Android"

config ANDROID
bool "Android Drivers"
depends on BROKEN
default N
---help---
Enable support for various drivers needed on the Android platform
Expand Down
3 changes: 2 additions & 1 deletion drivers/staging/hv/ChannelMgmt.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#define _CHANNEL_MGMT_H_

#include <linux/list.h>
#include <linux/timer.h>
#include "RingBuffer.h"
#include "VmbusChannelInterface.h"
#include "VmbusPacketFormat.h"
Expand Down Expand Up @@ -54,7 +55,7 @@ enum vmbus_channel_message_type {
ChannelMessageViewRangeRemove = 18,
#endif
ChannelMessageCount
} __attribute__((packed));
};

struct vmbus_channel_message_header {
enum vmbus_channel_message_type MessageType;
Expand Down
10 changes: 4 additions & 6 deletions drivers/staging/hv/NetVsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1052,7 +1052,7 @@ static void NetVscOnReceive(struct hv_device *Device,
*/
spin_lock_irqsave(&netDevice->receive_packet_list_lock, flags);
while (!list_empty(&netDevice->ReceivePacketList)) {
list_move_tail(&netDevice->ReceivePacketList, &listHead);
list_move_tail(netDevice->ReceivePacketList.next, &listHead);
if (++count == vmxferpagePacket->RangeCount + 1)
break;
}
Expand All @@ -1071,7 +1071,7 @@ static void NetVscOnReceive(struct hv_device *Device,
/* Return it to the freelist */
spin_lock_irqsave(&netDevice->receive_packet_list_lock, flags);
for (i = count; i != 0; i--) {
list_move_tail(&listHead,
list_move_tail(listHead.next,
&netDevice->ReceivePacketList);
}
spin_unlock_irqrestore(&netDevice->receive_packet_list_lock,
Expand All @@ -1085,8 +1085,7 @@ static void NetVscOnReceive(struct hv_device *Device,
}

/* Remove the 1st packet to represent the xfer page packet itself */
xferpagePacket = list_entry(&listHead, struct xferpage_packet,
ListEntry);
xferpagePacket = (struct xferpage_packet*)listHead.next;
list_del(&xferpagePacket->ListEntry);

/* This is how much we can satisfy */
Expand All @@ -1102,8 +1101,7 @@ static void NetVscOnReceive(struct hv_device *Device,

/* Each range represents 1 RNDIS pkt that contains 1 ethernet frame */
for (i = 0; i < (count - 1); i++) {
netvscPacket = list_entry(&listHead, struct hv_netvsc_packet,
ListEntry);
netvscPacket = (struct hv_netvsc_packet*)listHead.next;
list_del(&netvscPacket->ListEntry);

/* Initialize the netvsc packet */
Expand Down
6 changes: 6 additions & 0 deletions drivers/staging/hv/TODO
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
TODO:
- fix remaining checkpatch warnings and errors
- use of /** when it is not a kerneldoc header
- remove RingBuffer.c to us in-kernel ringbuffer functions instead.
- audit the vmbus to verify it is working properly with the
driver model
- convert vmbus driver interface function pointer tables
to constant, a.k.a vmbus_ops
- see if the vmbus can be merged with the other virtual busses
in the kernel
- audit the network driver
- use existing net_device_stats struct in network device
- checking for carrier inside open is wrong, network device API
confusion??
- audit the block driver
- audit the scsi driver

Expand Down
1 change: 1 addition & 0 deletions drivers/staging/hv/osd.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#ifndef _OSD_H_
#define _OSD_H_

#include <linux/workqueue.h>

/* Defines */
#define ALIGN_UP(value, align) (((value) & (align-1)) ? \
Expand Down
28 changes: 5 additions & 23 deletions drivers/staging/hv/vmbus_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -507,12 +507,12 @@ static struct hv_device *vmbus_child_device_create(struct hv_guid *type,

child_device_obj = &child_device_ctx->device_obj;
child_device_obj->context = context;
memcpy(&child_device_obj->deviceType, &type, sizeof(struct hv_guid));
memcpy(&child_device_obj->deviceInstance, &instance,
memcpy(&child_device_obj->deviceType, type, sizeof(struct hv_guid));
memcpy(&child_device_obj->deviceInstance, instance,
sizeof(struct hv_guid));

memcpy(&child_device_ctx->class_id, &type, sizeof(struct hv_guid));
memcpy(&child_device_ctx->device_id, &instance, sizeof(struct hv_guid));
memcpy(&child_device_ctx->class_id, type, sizeof(struct hv_guid));
memcpy(&child_device_ctx->device_id, instance, sizeof(struct hv_guid));

DPRINT_EXIT(VMBUS_DRV);

Expand All @@ -537,18 +537,7 @@ static int vmbus_child_device_register(struct hv_device *root_device_obj,
DPRINT_DBG(VMBUS_DRV, "child device (%p) registering",
child_device_ctx);

/* Make sure we are not registered already */
if (strlen(dev_name(&child_device_ctx->device)) != 0) {
DPRINT_ERR(VMBUS_DRV,
"child device (%p) already registered - busid %s",
child_device_ctx,
dev_name(&child_device_ctx->device));

ret = -1;
goto Cleanup;
}

/* Set the device bus id. Otherwise, device_register()will fail. */
/* Set the device name. Otherwise, device_register() will fail. */
dev_set_name(&child_device_ctx->device, "vmbus_0_%d",
atomic_inc_return(&device_num));

Expand All @@ -573,7 +562,6 @@ static int vmbus_child_device_register(struct hv_device *root_device_obj,
DPRINT_INFO(VMBUS_DRV, "child device (%p) registered",
&child_device_ctx->device);

Cleanup:
DPRINT_EXIT(VMBUS_DRV);

return ret;
Expand Down Expand Up @@ -623,8 +611,6 @@ static void vmbus_child_device_destroy(struct hv_device *device_obj)
static int vmbus_uevent(struct device *device, struct kobj_uevent_env *env)
{
struct device_context *device_ctx = device_to_device_context(device);
int i = 0;
int len = 0;
int ret;

DPRINT_ENTER(VMBUS_DRV);
Expand All @@ -644,8 +630,6 @@ static int vmbus_uevent(struct device *device, struct kobj_uevent_env *env)
device_ctx->class_id.data[14],
device_ctx->class_id.data[15]);

env->envp_idx = i;
env->buflen = len;
ret = add_uevent_var(env, "VMBUS_DEVICE_CLASS_GUID={"
"%02x%02x%02x%02x-%02x%02x-%02x%02x-"
"%02x%02x%02x%02x%02x%02x%02x%02x}",
Expand Down Expand Up @@ -691,8 +675,6 @@ static int vmbus_uevent(struct device *device, struct kobj_uevent_env *env)
if (ret)
return ret;

env->envp[env->envp_idx] = NULL;

DPRINT_EXIT(VMBUS_DRV);

return 0;
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/otus/Kconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
config OTUS
tristate "Atheros OTUS 802.11n USB wireless support"
depends on USB && WLAN_80211 && MAC80211
depends on USB && WLAN && MAC80211
default N
---help---
Enable support for Atheros 802.11n USB hardware:
Expand Down
13 changes: 10 additions & 3 deletions drivers/staging/panel/panel.c
Original file line number Diff line number Diff line change
Expand Up @@ -2071,11 +2071,15 @@ static void panel_detach(struct parport *port)
return;
}

if (keypad_enabled && keypad_initialized)
if (keypad_enabled && keypad_initialized) {
misc_deregister(&keypad_dev);
keypad_initialized = 0;
}

if (lcd_enabled && lcd_initialized)
if (lcd_enabled && lcd_initialized) {
misc_deregister(&lcd_dev);
lcd_initialized = 0;
}

parport_release(pprt);
parport_unregister_device(pprt);
Expand Down Expand Up @@ -2211,13 +2215,16 @@ static void __exit panel_cleanup_module(void)
del_timer(&scan_timer);

if (pprt != NULL) {
if (keypad_enabled)
if (keypad_enabled) {
misc_deregister(&keypad_dev);
keypad_initialized = 0;
}

if (lcd_enabled) {
panel_lcd_print("\x0cLCD driver " PANEL_VERSION
"\nunloaded.\x1b[Lc\x1b[Lb\x1b[L-");
misc_deregister(&lcd_dev);
lcd_initialized = 0;
}

/* TODO: free all input signals */
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/rt2860/Kconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
config RT2860
tristate "Ralink 2860 wireless support"
depends on PCI && X86 && WLAN_80211
depends on PCI && X86 && WLAN
---help---
This is an experimental driver for the Ralink 2860 wireless chip.
2 changes: 1 addition & 1 deletion drivers/staging/rt2870/Kconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
config RT2870
tristate "Ralink 2870/3070 wireless support"
depends on USB && X86 && WLAN_80211
depends on USB && X86 && WLAN
---help---
This is an experimental driver for the Ralink xx70 wireless chips.
2 changes: 1 addition & 1 deletion drivers/staging/rt3090/Kconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
config RT3090
tristate "Ralink 3090 wireless support"
depends on PCI && X86 && WLAN_80211
depends on PCI && X86 && WLAN
---help---
This is an experimental driver for the Ralink 3090 wireless chip.
2 changes: 1 addition & 1 deletion drivers/staging/rtl8187se/Kconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
config RTL8187SE
tristate "RealTek RTL8187SE Wireless LAN NIC driver"
depends on PCI
depends on PCI && WLAN
depends on WIRELESS_EXT
default N
---help---
4 changes: 1 addition & 3 deletions drivers/staging/rtl8187se/ieee80211/ieee80211_crypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,8 @@ void ieee80211_crypt_deinit_entries(struct ieee80211_device *ieee,

list_del(ptr);

if (entry->ops) {
if (entry->ops)
entry->ops->deinit(entry->priv);
module_put(entry->ops->owner);
}
kfree(entry);
}
}
Expand Down
4 changes: 1 addition & 3 deletions drivers/staging/rtl8187se/ieee80211/ieee80211_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,8 @@ void free_ieee80211(struct net_device *dev)
for (i = 0; i < WEP_KEYS; i++) {
struct ieee80211_crypt_data *crypt = ieee->crypt[i];
if (crypt) {
if (crypt->ops) {
if (crypt->ops)
crypt->ops->deinit(crypt->priv);
module_put(crypt->ops->owner);
}
kfree(crypt);
ieee->crypt[i] = NULL;
}
Expand Down
12 changes: 4 additions & 8 deletions drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -2839,16 +2839,12 @@ static int ieee80211_wpa_set_encryption(struct ieee80211_device *ieee,
goto skip_host_crypt;

ops = ieee80211_get_crypto_ops(param->u.crypt.alg);
if (ops == NULL && strcmp(param->u.crypt.alg, "WEP") == 0) {
request_module("ieee80211_crypt_wep");
if (ops == NULL && strcmp(param->u.crypt.alg, "WEP") == 0)
ops = ieee80211_get_crypto_ops(param->u.crypt.alg);
} else if (ops == NULL && strcmp(param->u.crypt.alg, "TKIP") == 0) {
request_module("ieee80211_crypt_tkip");
else if (ops == NULL && strcmp(param->u.crypt.alg, "TKIP") == 0)
ops = ieee80211_get_crypto_ops(param->u.crypt.alg);
} else if (ops == NULL && strcmp(param->u.crypt.alg, "CCMP") == 0) {
request_module("ieee80211_crypt_ccmp");
else if (ops == NULL && strcmp(param->u.crypt.alg, "CCMP") == 0)
ops = ieee80211_get_crypto_ops(param->u.crypt.alg);
}
if (ops == NULL) {
printk("unknown crypto alg '%s'\n", param->u.crypt.alg);
param->u.crypt.err = IEEE_CRYPT_ERR_UNKNOWN_ALG;
Expand All @@ -2869,7 +2865,7 @@ static int ieee80211_wpa_set_encryption(struct ieee80211_device *ieee,
}
memset(new_crypt, 0, sizeof(struct ieee80211_crypt_data));
new_crypt->ops = ops;
if (new_crypt->ops && try_module_get(new_crypt->ops->owner))
if (new_crypt->ops)
new_crypt->priv =
new_crypt->ops->init(param->u.crypt.idx);

Expand Down
17 changes: 5 additions & 12 deletions drivers/staging/rtl8187se/ieee80211/ieee80211_wx.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,12 +331,10 @@ int ieee80211_wx_set_encode(struct ieee80211_device *ieee,
return -ENOMEM;
memset(new_crypt, 0, sizeof(struct ieee80211_crypt_data));
new_crypt->ops = ieee80211_get_crypto_ops("WEP");
if (!new_crypt->ops) {
request_module("ieee80211_crypt_wep");
if (!new_crypt->ops)
new_crypt->ops = ieee80211_get_crypto_ops("WEP");
}

if (new_crypt->ops && try_module_get(new_crypt->ops->owner))
if (new_crypt->ops)
new_crypt->priv = new_crypt->ops->init(key);

if (!new_crypt->ops || !new_crypt->priv) {
Expand Down Expand Up @@ -483,7 +481,7 @@ int ieee80211_wx_set_encode_ext(struct ieee80211_device *ieee,
struct iw_encode_ext *ext = (struct iw_encode_ext *)extra;
int i, idx, ret = 0;
int group_key = 0;
const char *alg, *module;
const char *alg;
struct ieee80211_crypto_ops *ops;
struct ieee80211_crypt_data **crypt;

Expand Down Expand Up @@ -539,15 +537,12 @@ int ieee80211_wx_set_encode_ext(struct ieee80211_device *ieee,
switch (ext->alg) {
case IW_ENCODE_ALG_WEP:
alg = "WEP";
module = "ieee80211_crypt_wep";
break;
case IW_ENCODE_ALG_TKIP:
alg = "TKIP";
module = "ieee80211_crypt_tkip";
break;
case IW_ENCODE_ALG_CCMP:
alg = "CCMP";
module = "ieee80211_crypt_ccmp";
break;
default:
IEEE80211_DEBUG_WX("%s: unknown crypto alg %d\n",
Expand All @@ -558,10 +553,8 @@ int ieee80211_wx_set_encode_ext(struct ieee80211_device *ieee,
// printk("8-09-08-9=====>%s, alg name:%s\n",__func__, alg);

ops = ieee80211_get_crypto_ops(alg);
if (ops == NULL) {
request_module(module);
if (ops == NULL)
ops = ieee80211_get_crypto_ops(alg);
}
if (ops == NULL) {
IEEE80211_DEBUG_WX("%s: unknown crypto alg %d\n",
dev->name, ext->alg);
Expand All @@ -581,7 +574,7 @@ int ieee80211_wx_set_encode_ext(struct ieee80211_device *ieee,
goto done;
}
new_crypt->ops = ops;
if (new_crypt->ops && try_module_get(new_crypt->ops->owner))
if (new_crypt->ops)
new_crypt->priv = new_crypt->ops->init(idx);
if (new_crypt->priv == NULL) {
kfree(new_crypt);
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/rtl8192e/Kconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
config RTL8192E
tristate "RealTek RTL8192E Wireless LAN NIC driver"
depends on PCI
depends on PCI && WLAN
depends on WIRELESS_EXT
default N
---help---
8 changes: 1 addition & 7 deletions drivers/staging/rtl8192e/ieee80211/ieee80211_crypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,8 @@ void ieee80211_crypt_deinit_entries(struct ieee80211_device *ieee,

list_del(ptr);

if (entry->ops) {
if (entry->ops)
entry->ops->deinit(entry->priv);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
module_put(entry->ops->owner);
#else
__MOD_DEC_USE_COUNT(entry->ops->owner);
#endif
}
kfree(entry);
}
}
Expand Down
Loading

0 comments on commit b6727b1

Please sign in to comment.