Jeff Garzik
f281233d3e
SCSI host lock push-down
...
Move the mid-layer's ->queuecommand() invocation from being locked
with the host lock to being unlocked to facilitate speeding up the
critical path for drivers who don't need this lock taken anyway.
The patch below presents a simple SCSI host lock push-down as an
equivalent transformation. No locking or other behavior should change
with this patch. All existing bugs and locking orders are preserved.
Additionally, add one parameter to queuecommand,
struct Scsi_Host *
and remove one parameter from queuecommand,
void (*done)(struct scsi_cmnd *)
Scsi_Host* is a convenient pointer that most host drivers need anyway,
and 'done' is redundant to struct scsi_cmnd->scsi_done.
Minimal code disturbance was attempted with this change. Most drivers
needed only two one-line modifications for their host lock push-down.
Signed-off-by: Jeff Garzik <jgarzik@redhat.com >
Acked-by: James Bottomley <James.Bottomley@suse.de >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2010-11-16 13:33:23 -08:00
Julia Lawall
61241d97db
drivers/staging: delete double assignment
...
Delete successive assignments to the same location. In three of the cases,
the two assignments are identical. In the case of the file
rt2860/common/cmm_aes.c, the assigned variable i is never used, so both
assignments are dropped.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/ )
// <smpl>
@@
expression i;
@@
*i = ...;
i = ...;
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2010-11-09 14:05:22 -08:00
Greg Kroah-Hartman
e4c5bf8e3d
Merge 'staging-next' to Linus's tree
...
This merges the staging-next tree to Linus's tree and resolves
some conflicts that were present due to changes in other trees that were
affected by files here.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2010-10-28 09:44:56 -07:00
Greg Kroah-Hartman
8ee48db6be
Staging: hv: remove struct vmbus_channel_interface
...
Now that no one uses this structure, remove it, and channel_interface.c
(which is now empty) and the function, vmbus_get_interface() which is
not needed anymore either.
Cc: Haiyang Zhang <haiyangz@microsoft.com >
Cc: Hank Janssen <hjanssen@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2010-10-21 10:03:44 -07:00
Greg Kroah-Hartman
036a257b0d
Staging: hv: remove Open from struct vmbus_channel_interface
...
No one calls it anymore, so remove it.
Cc: Haiyang Zhang <haiyangz@microsoft.com >
Cc: Hank Janssen <hjanssen@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2010-10-21 10:00:19 -07:00
Greg Kroah-Hartman
60f841ac36
Staging: hv: storvsc: call vmbus_open directly
...
Don't do the interface indirection, it's not needed at all.
Cc: Haiyang Zhang <haiyangz@microsoft.com >
Cc: Hank Janssen <hjanssen@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2010-10-21 09:59:06 -07:00
Greg Kroah-Hartman
81c92f43e7
Staging: hv: netvsc: call vmbus_open directly
...
Don't do the interface indirection, it's not needed at all.
Cc: Haiyang Zhang <haiyangz@microsoft.com >
Cc: Hank Janssen <hjanssen@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2010-10-21 09:58:42 -07:00
Greg Kroah-Hartman
36ceadfc65
Staging: hv: channel: export vmbus_open to modules
...
Drivers need to call this directly, so export it, like other
vmbus functions.
Cc: Haiyang Zhang <haiyangz@microsoft.com >
Cc: Hank Janssen <hjanssen@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2010-10-21 09:58:21 -07:00
Greg Kroah-Hartman
ba9bf63080
Staging: hv: remove Close from struct vmbus_channel_interface
...
No one calls it anymore, so remove it.
Cc: Haiyang Zhang <haiyangz@microsoft.com >
Cc: Hank Janssen <hjanssen@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2010-10-21 09:54:42 -07:00
Greg Kroah-Hartman
1fb9dff04c
Staging: hv: netvsc: call vmbus_close directly
...
Don't do the interface indirection, it's not needed at all.
Cc: Haiyang Zhang <haiyangz@microsoft.com >
Cc: Hank Janssen <hjanssen@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2010-10-21 09:53:31 -07:00
Greg Kroah-Hartman
1382e0178e
Staging: hv: storvsc: call vmbus_close directly
...
Don't do the interface indirection, it's not needed at all.
Cc: Haiyang Zhang <haiyangz@microsoft.com >
Cc: Hank Janssen <hjanssen@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2010-10-21 09:53:11 -07:00
Greg Kroah-Hartman
70bfa30786
Staging: hv: channel: export vmbus_close to modules
...
Drivers need to call this directly, so export it, like other
vmbus functions.
Cc: Haiyang Zhang <haiyangz@microsoft.com >
Cc: Hank Janssen <hjanssen@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2010-10-21 09:52:22 -07:00
Greg Kroah-Hartman
5dd30f5170
Staging: hv: remove SendPacket from struct vmbus_channel_interface
...
No one calls it anymore, so remove it.
Cc: Haiyang Zhang <haiyangz@microsoft.com >
Cc: Hank Janssen <hjanssen@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2010-10-21 09:48:39 -07:00
Greg Kroah-Hartman
b60d71e2b6
Staging: hv: storvsc: call vmbus_sendpacket directly
...
Don't do the interface indirection, it's not needed at all.
Cc: Haiyang Zhang <haiyangz@microsoft.com >
Cc: Hank Janssen <hjanssen@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2010-10-21 09:43:56 -07:00
Greg Kroah-Hartman
5a4df29058
Staging: hv: netvsc: call vmbus_sendpacket directly
...
Don't do the interface indirection, it's not needed at all.
Cc: Haiyang Zhang <haiyangz@microsoft.com >
Cc: Hank Janssen <hjanssen@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2010-10-21 09:43:24 -07:00
Greg Kroah-Hartman
b3289aa819
Staging: hv: remove SendPacketPageBuffer from struct vmbus_channel_interface
...
No one calls it anymore, so remove it.
Cc: Haiyang Zhang <haiyangz@microsoft.com >
Cc: Hank Janssen <hjanssen@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2010-10-21 09:34:43 -07:00
Greg Kroah-Hartman
ff3f8eece2
Staging: hv: netvsc: call vmbus_sendpacket_pagebuffer directly
...
Don't do the interface indirection, it's not needed at all.
Cc: Haiyang Zhang <haiyangz@microsoft.com >
Cc: Hank Janssen <hjanssen@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2010-10-21 09:32:46 -07:00
Greg Kroah-Hartman
713efeb4db
Staging: hv: channel: export vmbus_sendpacket_pagebuffer to modules
...
Drivers need to call this directly, so export it, like other
vmbus functions.
Cc: Haiyang Zhang <haiyangz@microsoft.com >
Cc: Hank Janssen <hjanssen@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2010-10-21 09:29:54 -07:00
Greg Kroah-Hartman
58d53f9e73
Staging: hv: remove SendPacketMultiPageBuffer from struct vmbus_channel_interface
...
No one calls it anymore, so remove it.
Cc: Haiyang Zhang <haiyangz@microsoft.com >
Cc: Hank Janssen <hjanssen@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2010-10-21 09:28:30 -07:00
Greg Kroah-Hartman
51255071af
Staging: hv: storvsc: call vmbus_sendpacket_multipagebuffer directly
...
Don't do the interface indirection, it's not needed at all.
Cc: Haiyang Zhang <haiyangz@microsoft.com >
Cc: Hank Janssen <hjanssen@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2010-10-21 09:26:50 -07:00
Greg Kroah-Hartman
4cb106faf1
Staging: hv: channel: export vmbus_sendpacket_multipagebuffer to modules
...
Drivers need to call this directly, so export it, like other
vmbus functions.
Cc: Haiyang Zhang <haiyangz@microsoft.com >
Cc: Hank Janssen <hjanssen@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2010-10-21 09:23:59 -07:00
Greg Kroah-Hartman
22ff5c9166
Staging: hv: remove RecvPacket from struct vmbus_channel_interface
...
No one calls it anymore, so remove it.
Cc: Haiyang Zhang <haiyangz@microsoft.com >
Cc: Hank Janssen <hjanssen@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2010-10-21 09:16:54 -07:00
Greg Kroah-Hartman
50ea95dfa2
Staging: hv: storvsc: call vmbus_recvpacket directly
...
Don't do the interface indirection, it's not needed at all.
Cc: Haiyang Zhang <haiyangz@microsoft.com >
Cc: Hank Janssen <hjanssen@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2010-10-21 09:15:14 -07:00
Greg Kroah-Hartman
559f816e13
Staging: hv: remove RecvPacketRaw from struct vmbus_channel_interface
...
No one calls it anymore, so remove it.
Cc: Haiyang Zhang <haiyangz@microsoft.com >
Cc: Hank Janssen <hjanssen@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2010-10-21 09:11:00 -07:00
Greg Kroah-Hartman
9f630068e8
Staging: hv: netvsc: call vmbus_receivepacket_raw directly
...
Don't do the interface indirection, it's not needed at all.
Cc: Haiyang Zhang <haiyangz@microsoft.com >
Cc: Hank Janssen <hjanssen@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2010-10-21 09:09:48 -07:00
Greg Kroah-Hartman
adaee6bd45
Staging: hv: channel: export vmbus_receivepacket_raw to modules
...
Drivers need to call this directly, so export it, like other
vmbus functions.
Cc: Haiyang Zhang <haiyangz@microsoft.com >
Cc: Hank Janssen <hjanssen@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2010-10-21 09:09:23 -07:00
Greg Kroah-Hartman
cae5b843c8
Staging: hv: rename context to channel in struct hv_device
...
As it really is a channel, not a "context" name it so.
This also entailed making a few more functions typesafe as they were
sending a struct vmbus_channel pointer as a void pointer.
There are still a few more that need to be converted (the osd callbacks
are one), but this is good for now.
Cc: Haiyang Zhang <haiyangz@microsoft.com >
Cc: Hank Janssen <hjanssen@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2010-10-21 09:05:27 -07:00
Greg Kroah-Hartman
7053a27a4c
Staging: hv: make *context a real pointer in struct hv_device
...
This is really the struct vmbus_channel for the device, not a void
pointer, so use the real structure to ensure type safety everywhere.
Cc: Haiyang Zhang <haiyangz@microsoft.com >
Cc: Hank Janssen <hjanssen@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2010-10-21 08:55:36 -07:00
Greg Kroah-Hartman
d068cb4f6f
Staging: hv: remove EstablishGpadl from struct vmbus_channel_interface
...
No one calls it anymore, so remove it.
Cc: Haiyang Zhang <haiyangz@microsoft.com >
Cc: Hank Janssen <hjanssen@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2010-10-21 08:50:16 -07:00
Greg Kroah-Hartman
81f1620357
Staging: hv: netvsc: call vmbus_establish_gpadl directly
...
Don't do the interface indirection, it's not needed at all.
Cc: Haiyang Zhang <haiyangz@microsoft.com >
Cc: Hank Janssen <hjanssen@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2010-10-21 08:48:19 -07:00
Greg Kroah-Hartman
98873724aa
Staging: hv: channel: export vmbus_establish_gpadl to modules
...
Drivers need to call this directly, so export it, like other
vmbus functions.
Cc: Haiyang Zhang <haiyangz@microsoft.com >
Cc: Hank Janssen <hjanssen@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2010-10-21 08:47:43 -07:00
Greg Kroah-Hartman
a787705720
Staging: hv: remove TeardownGpadl from struct vmbus_channel_interface
...
No one calls it anymore, so remove it.
Cc: Haiyang Zhang <haiyangz@microsoft.com >
Cc: Hank Janssen <hjanssen@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2010-10-21 08:42:55 -07:00
Greg Kroah-Hartman
314bf1d12a
Staging: hv: netvsc: call vmbus_teardown_gpadl directly
...
Don't do the interface indirection, it's not needed at all.
Cc: Haiyang Zhang <haiyangz@microsoft.com >
Cc: Hank Janssen <hjanssen@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2010-10-21 08:40:55 -07:00
Greg Kroah-Hartman
18726d7a60
Staging: hv: channel: export vmbus_teardown_gpadl to modules
...
Drivers need to call this directly, so export it, like other vmbus
functions.
Cc: Haiyang Zhang <haiyangz@microsoft.com >
Cc: Hank Janssen <hjanssen@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2010-10-21 08:39:59 -07:00
Greg Kroah-Hartman
150b19d430
Staging: hv: make get_channel_info static
...
This is done by moving it to the only .c file it is used in.
This also allowed us to delete the channel_interface.h file, as it's no
longer needed.
Cc: Haiyang Zhang <haiyangz@microsoft.com >
Cc: Hank Janssen <hjanssen@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2010-10-20 16:07:11 -07:00
Greg Kroah-Hartman
a4e91ed24b
Staging: hv: vmbus_drv: remove vmbus_child_device_get_info
...
Just make the call to get_channel_info() directly.
Cc: Haiyang Zhang <haiyangz@microsoft.com >
Cc: Hank Janssen <hjanssen@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2010-10-20 16:02:49 -07:00
Greg Kroah-Hartman
e957bda0f4
Staging: hv: remove GetChannelInfo from struct vmbus_driver
...
It was only set to one value, so just make the call to
get_channel_info() directly.
Cc: Haiyang Zhang <haiyangz@microsoft.com >
Cc: Hank Janssen <hjanssen@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2010-10-20 16:00:37 -07:00
Greg Kroah-Hartman
40bc5360d7
Staging: hv: remove GetInfo pointer from struct vmbus_channel_interface
...
It's only set by one thing, and never called.
Cc: Haiyang Zhang <haiyangz@microsoft.com >
Cc: Hank Janssen <hjanssen@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2010-10-20 15:57:19 -07:00
Greg Kroah-Hartman
ee00966818
Staging: hv: remove VmbusGetChannelInfo
...
It's not needed, make the function pointer point to get_channel_info()
instead.
Cc: Haiyang Zhang <haiyangz@microsoft.com >
Cc: Hank Janssen <hjanssen@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2010-10-20 15:55:36 -07:00
Greg Kroah-Hartman
50fe56d248
Staging: hv: make alloc_channel static
...
It's only used in one file, and is a pretty generic name.
Cc: Haiyang Zhang <haiyangz@microsoft.com >
Cc: Hank Janssen <hjanssen@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2010-10-20 15:51:57 -07:00
Haiyang Zhang
e98cb27681
staging: hv: Convert camel cased functions in channel_mgmt.c to lower case
...
Convert camel cased functions in channel_mgmt.c to lower case
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com >
Signed-off-by: Hank Janssen <hjanssen@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2010-10-15 12:45:30 -07:00
Haiyang Zhang
188963ec75
staging: hv: Convert camel cased local variable names in channel_mgmt.c to lower case
...
Convert camel cased local variable names in channel_mgmt.c to lower case
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com >
Signed-off-by: Hank Janssen <hjanssen@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2010-10-15 12:45:30 -07:00
Haiyang Zhang
277997032b
staging: hv: Convert camel cased parameter in channel_interface.h to lower case
...
Convert camel cased parameter in channel_interface.h to lower case
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com >
Signed-off-by: Hank Janssen <hjanssen@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2010-10-15 12:45:30 -07:00
Haiyang Zhang
53e4f1e656
staging: hv: Convert camel cased function names in channel_interface.c to lower cases
...
Convert camel cased function names in channel_interface.c to lower cases
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com >
Signed-off-by: Hank Janssen <hjanssen@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2010-10-15 12:45:29 -07:00
Haiyang Zhang
9de050c420
staging: hv: Convert camel cased local variables in channel_interface.c to lower cases
...
Convert camel cased local variables in channel_interface.c to lower cases
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com >
Signed-off-by: Hank Janssen <hjanssen@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2010-10-15 12:45:29 -07:00
Hank Janssen
99c8da0f4f
staging: hv: Doubled ringbuffer size for Hyper-v network driver
...
Double the default network ringsize buffer for Hyper-V network driver.
In very heavily loaded systems the there is a chance you run out of
ringbuffer space and error out.
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com >
Signed-off-by: Hank Janssen <hjanssen@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2010-10-12 10:50:41 -07:00
Tracey Dent
cf5901b3f1
Staging: hv: Makefile: replace the use of <module>-objs with <module>-y
...
Changed <module>-objs to <module>-y in Makefile.
Signed-off-by: Tracey Dent <tdent48227@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2010-10-08 07:23:48 -07:00
Haiyang Zhang
fff41b2e30
staging: hv: Rename camel cased functions in channel.c to lowercase
...
Rename camel cased functions in channel.c to lowercase
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com >
Signed-off-by: Hank Janssen <hjanssen@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2010-10-07 14:43:02 -07:00
Haiyang Zhang
39d70a4ab1
staging: hv: Remove camel case variables in channel.c
...
Rename camel case variables in channel.c and changed them to
lowercase.
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com >
Signed-off-by: Hank Janssen <hjanssen@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de >
2010-10-05 11:42:19 -07:00
Arnd Bergmann
2a48fc0ab2
block: autoconvert trivial BKL users to private mutex
...
The block device drivers have all gained new lock_kernel
calls from a recent pushdown, and some of the drivers
were already using the BKL before.
This turns the BKL into a set of per-driver mutexes.
Still need to check whether this is safe to do.
file=$1
name=$2
if grep -q lock_kernel ${file} ; then
if grep -q 'include.*linux.mutex.h' ${file} ; then
sed -i '/include.*<linux\/smp_lock.h>/d' ${file}
else
sed -i 's/include.*<linux\/smp_lock.h>.*$/include <linux\/mutex.h>/g' ${file}
fi
sed -i ${file} \
-e "/^#include.*linux.mutex.h/,$ {
1,/^\(static\|int\|long\)/ {
/^\(static\|int\|long\)/istatic DEFINE_MUTEX(${name}_mutex);
} }" \
-e "s/\(un\)*lock_kernel\>[ ]*()/mutex_\1lock(\&${name}_mutex)/g" \
-e '/[ ]*cycle_kernel_lock();/d'
else
sed -i -e '/include.*\<smp_lock.h\>/d' ${file} \
-e '/cycle_kernel_lock()/d'
fi
Signed-off-by: Arnd Bergmann <arnd@arndb.de >
2010-10-05 15:01:10 +02:00