[PATCH net 1/1] hyperv: Fix a bug in netvsc_send()

2014-10-05 Thread K. Y. Srinivasan
After the packet is successfully sent, we should not touch the packet 
as it may have been freed. This patch is based on the work done by
Long Li .

David, please queue this up for stable.

Signed-off-by: K. Y. Srinivasan 
Reported-by: Sitsofe Wheeler 
---
 drivers/net/hyperv/netvsc.c |   15 ---
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c
index 977984b..7d76c95 100644
--- a/drivers/net/hyperv/netvsc.c
+++ b/drivers/net/hyperv/netvsc.c
@@ -717,6 +717,7 @@ int netvsc_send(struct hv_device *device,
unsigned int section_index = NETVSC_INVALID_INDEX;
u32 msg_size = 0;
struct sk_buff *skb;
+   u16 q_idx = packet->q_idx;
 
 
net_device = get_outbound_net_device(device);
@@ -781,24 +782,24 @@ int netvsc_send(struct hv_device *device,
 
if (ret == 0) {
atomic_inc(&net_device->num_outstanding_sends);
-   atomic_inc(&net_device->queue_sends[packet->q_idx]);
+   atomic_inc(&net_device->queue_sends[q_idx]);
 
if (hv_ringbuf_avail_percent(&out_channel->outbound) <
RING_AVAIL_PERCENT_LOWATER) {
netif_tx_stop_queue(netdev_get_tx_queue(
-   ndev, packet->q_idx));
+   ndev, q_idx));
 
if (atomic_read(&net_device->
-   queue_sends[packet->q_idx]) < 1)
+   queue_sends[q_idx]) < 1)
netif_tx_wake_queue(netdev_get_tx_queue(
-   ndev, packet->q_idx));
+   ndev, q_idx));
}
} else if (ret == -EAGAIN) {
netif_tx_stop_queue(netdev_get_tx_queue(
-   ndev, packet->q_idx));
-   if (atomic_read(&net_device->queue_sends[packet->q_idx]) < 1) {
+   ndev, q_idx));
+   if (atomic_read(&net_device->queue_sends[q_idx]) < 1) {
netif_tx_wake_queue(netdev_get_tx_queue(
-   ndev, packet->q_idx));
+   ndev, q_idx));
ret = -ENOSPC;
}
} else {
-- 
1.7.4.1

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


Re: [PATCH v2 00/25] staging: comedi: tidy up async command termination

2014-10-05 Thread Ian Abbott

On 18/09/14 19:35, H Hartley Sweeten wrote:

The comedi async commands should stop if an error/overflow happens or when
the end-of-acquisition for the command is detected. Some of the drivers
do this correctly but many don't.

The comedi_handle_events() function automatically detects the events that
would terminate a command. If the events are set it calls the subdevice
(*cancel) operation to stop the command.

Convert the drivers to use comedi_handle_events() instead of
comedi_event().
This allows removing the unnecessary cancel in the driver, if present, and
ensures that all the drivers terminate the commands if necessary.

The only drivers that still use comedi_event() are the usbdux drivers.
These
have a "cancel" in the urb completion routines that does not do what the
(*cancel) does. I'm waiting for a reply from the author to see if this can
be changed.

This series applies after:
PATCH 00/11] staging: comedi: move comedi_fc functionality into core

v2: use comedi_handle_events() instead of cfc_handle_events()

H Hartley Sweeten (25):
  staging: comedi: hwdrv_apci3200: use comedi_handle_events()
  staging: comedi: addi_apci_1032: use comedi_handle_events()
  staging: comedi: addi_apci_1564: use comedi_handle_events()
  staging: comedi: addi_apci_3xxx: use comedi_handle_events()
  staging: comedi: amplc_pc236_common: use comedi_handle_events()
  staging: comedi: comedi_parport: use comedi_handle_events()
  staging: comedi: dmm32at: use comedi_handle_events()
  staging: comedi: dt2814: use comedi_handle_events()
  staging: comedi: ni_6527: use comedi_handle_events()
  staging: comedi: ni_65xx: use comedi_handle_events()
  staging: comedi: ni_atmio16d: use comedi_handle_events()
  staging: comedi: pcl726: use comedi_handle_events()
  staging: comedi: hwdrv_apci3120: use comedi_handle_events()
  staging: comedi: hwdrv_apci3120: do comedi_handle_events() at end of
interrupt
  staging: comedi: addi_apci_2032: use comedi_handle_events()
  staging: comedi: amplc_dio200_common: use comedi_handle_events()
  staging: comedi: comedi_test: use comedi_handle_events()
  staging: comedi: me4000: use comedi_handle_events()
  staging: comedi: pcl711: use comedi_handle_events()
  staging: comedi: pcmmio: use comedi_handle_events()
  staging: comedi: pcmuio: use comedi_handle_events()
  staging: comedi: s626: use comedi_handle_events()
  staging: comedi: rtd520: clear FIFO when canceling async command
  staging: comedi: rtd520: use comedi_handle_events()
  staging: comedi: amplc_pci230: use comedi_handle_events()

.../comedi/drivers/addi-data/hwdrv_apci3120.c  | 15 +-
.../comedi/drivers/addi-data/hwdrv_apci3200.c  |  3 +-
drivers/staging/comedi/drivers/addi_apci_1032.c|  2 +-
drivers/staging/comedi/drivers/addi_apci_1564.c|  2 +-
drivers/staging/comedi/drivers/addi_apci_2032.c|  8 +---
drivers/staging/comedi/drivers/addi_apci_3xxx.c|  2 +-
.../staging/comedi/drivers/amplc_dio200_common.c   | 10 +---
.../staging/comedi/drivers/amplc_pc236_common.c|  2 +-
drivers/staging/comedi/drivers/amplc_pci230.c  | 48 +++
drivers/staging/comedi/drivers/comedi_parport.c|  2 +-
drivers/staging/comedi/drivers/comedi_test.c   |  7 +--
drivers/staging/comedi/drivers/dmm32at.c   |  3 +-
drivers/staging/comedi/drivers/dt2814.c|  2 +-
drivers/staging/comedi/drivers/me4000.c|  3 +-
drivers/staging/comedi/drivers/ni_6527.c   |  2 +-
drivers/staging/comedi/drivers/ni_65xx.c   |  2 +-
drivers/staging/comedi/drivers/ni_atmio16d.c   |  2 +-
drivers/staging/comedi/drivers/pcl711.c|  6 +--
drivers/staging/comedi/drivers/pcl726.c|  2 +-
drivers/staging/comedi/drivers/pcmmio.c| 16 ++-
drivers/staging/comedi/drivers/pcmuio.c| 16 ++-
drivers/staging/comedi/drivers/rtd520.c| 56
+++---
drivers/staging/comedi/drivers/s626.c  | 14 +-
23 files changed, 57 insertions(+), 168 deletions(-)



Reviewed-by: Ian Abbott 

--
-=( Ian Abbott @ MEV Ltd.E-mail: )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587 )=-
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 00/23] staging: comedi: remove cfc_handle_events()

2014-10-05 Thread Ian Abbott

On 18/09/14 19:11, H Hartley Sweeten wrote:

The inline function cfc_handle_events() is just a wrapper around the
comedi core function comedi_handle_events(). Convert all the drivers
to use the core function directly and remove the wrapper.

This series applies after:
PATCH 00/11] staging: comedi: move comedi_fc functionality into core

H Hartley Sweeten (23):
  staging: comedi: adl_pci9111: use comedi_handle_events()
  staging: comedi: adl_pci9118: use comedi_handle_events()
  staging: comedi: adv_pci1710: use comedi_handle_events()
  staging: comedi: amplc_pci224: use comedi_handle_events()
  staging: comedi: cb_pcidas: use comedi_handle_events()
  staging: comedi: cb_pcidas64: use comedi_handle_events()
  staging: comedi: das16: use comedi_handle_events()
  staging: comedi: das16m1: use comedi_handle_events()
  staging: comedi: das800: use comedi_handle_events()
  staging: comedi: das1800: use comedi_handle_events()
  staging: comedi: dt282x: use comedi_handle_events()
  staging: comedi: dt3000: use comedi_handle_events()
  staging: comedi: gsc_hpdi: use comedi_handle_events()
  staging: comedi: ni_660x: use comedi_handle_events()
  staging: comedi: ni_at_a2150: use comedi_handle_events()
  staging: comedi: ni_labpc_common: use comedi_handle_events()
  staging: comedi: ni_mio_common: use comedi_handle_events()
  staging: comedi: ni_pcidio: use comedi_handle_events()
  staging: comedi: pcl812: use comedi_handle_events()
  staging: comedi: pcl816: use comedi_handle_events()
  staging: comedi: pcl818: use comedi_handle_events()
  staging: comedi: quatech_daqp_cs: use comedi_handle_events()
  staging: comedi: comedi_fc.h: remove cfc_handle_events()

drivers/staging/comedi/drivers/adl_pci9111.c |  4 ++--
drivers/staging/comedi/drivers/adl_pci9118.c |  2 +-
drivers/staging/comedi/drivers/adv_pci1710.c | 14 +++---
drivers/staging/comedi/drivers/amplc_pci224.c|  4 ++--
drivers/staging/comedi/drivers/cb_pcidas.c   |  4 ++--
drivers/staging/comedi/drivers/cb_pcidas64.c |  4 ++--
drivers/staging/comedi/drivers/comedi_fc.h   |  6 --
drivers/staging/comedi/drivers/das16.c   |  2 +-
drivers/staging/comedi/drivers/das16m1.c |  2 +-
drivers/staging/comedi/drivers/das1800.c |  4 ++--
drivers/staging/comedi/drivers/das800.c  |  4 ++--
drivers/staging/comedi/drivers/dt282x.c  |  4 ++--
drivers/staging/comedi/drivers/dt3000.c  |  2 +-
drivers/staging/comedi/drivers/gsc_hpdi.c|  2 +-
drivers/staging/comedi/drivers/ni_660x.c |  2 +-
drivers/staging/comedi/drivers/ni_at_a2150.c |  6 +++---
drivers/staging/comedi/drivers/ni_labpc_common.c |  6 +++---
drivers/staging/comedi/drivers/ni_mio_common.c   | 12 ++--
drivers/staging/comedi/drivers/ni_pcidio.c   |  2 +-
drivers/staging/comedi/drivers/pcl812.c  |  2 +-
drivers/staging/comedi/drivers/pcl816.c  |  4 ++--
drivers/staging/comedi/drivers/pcl818.c  |  2 +-
drivers/staging/comedi/drivers/quatech_daqp_cs.c |  2 +-
23 files changed, 45 insertions(+), 51 deletions(-)


Reviewed-by: Ian Abbott 

--
-=( Ian Abbott @ MEV Ltd.E-mail: )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587 )=-
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 0/8] staging: comedi: remove cfc_bytes_per_scan()

2014-10-05 Thread Ian Abbott

On 18/09/14 19:41, H Hartley Sweeten wrote:

The inline function cfc_bytes_per_scan() is just a wrapper around the
comedi core function comedi_bytes_per_scan(). Convert all the drivers
to use the core function directly and remove the wrapper.

This series applies after:
PATCH 00/11] staging: comedi: move comedi_fc functionality into core

H Hartley Sweeten (8):
  staging: comedi: amplc_pci224: use comedi_bytes_per_scan()
  staging: comedi: amplc_pci230: use comedi_bytes_per_scan()
  staging: comedi: das16: use comedi_bytes_per_scan()
  staging: comedi: mite: use comedi_bytes_per_scan()
  staging: comedi: pcl812: use comedi_bytes_per_scan()
  staging: comedi: pcl816: use comedi_bytes_per_scan()
  staging: comedi: pcl818: use comedi_bytes_per_scan()
  staging: comedi: comedi_fc.h: remove cfc_bytes_per_scan()

drivers/staging/comedi/drivers/amplc_pci224.c | 2 +-
drivers/staging/comedi/drivers/amplc_pci230.c | 2 +-
drivers/staging/comedi/drivers/comedi_fc.h| 5 -
drivers/staging/comedi/drivers/das16.c| 2 +-
drivers/staging/comedi/drivers/mite.c | 2 +-
drivers/staging/comedi/drivers/pcl812.c   | 6 +++---
drivers/staging/comedi/drivers/pcl816.c   | 2 +-
drivers/staging/comedi/drivers/pcl818.c   | 2 +-
8 files changed, 9 insertions(+), 14 deletions(-)


Reviewed-by: Ian Abbott 

--
-=( Ian Abbott @ MEV Ltd.E-mail: )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587 )=-
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 0/2] staging: comedi: remove cfc_inc_scan_progress()

2014-10-05 Thread Ian Abbott

On 18/09/14 19:46, H Hartley Sweeten wrote:

The inline function cfc_inc_scan_progress() is just a wrapper around
the comedi core function comedi_inc_scan_progress(). Convert all the
drivers to use the core function directly and remove the wrapper.

This series applies after:
PATCH 00/11] staging: comedi: move comedi_fc functionality into core

H Hartley Sweeten (2):
  staging: comedi: mite: use comedi_inc_scan_progress()
  staging: comedi: comedi_fc.h: remove cfc_inc_scan_progress()

drivers/staging/comedi/drivers/comedi_fc.h | 6 --
drivers/staging/comedi/drivers/mite.c  | 2 +-
2 files changed, 1 insertion(+), 7 deletions(-)


Reviewed-by: Ian Abbott 

--
-=( Ian Abbott @ MEV Ltd.E-mail: )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587 )=-
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH net 1/1] hyperv: Fix a bug in netvsc_send()

2014-10-05 Thread David Miller
From: "K. Y. Srinivasan" 
Date: Sun,  5 Oct 2014 10:42:51 -0700

> After the packet is successfully sent, we should not touch the packet 
> as it may have been freed. This patch is based on the work done by
> Long Li .
> 
> David, please queue this up for stable.
> 
> Signed-off-by: K. Y. Srinivasan 
> Reported-by: Sitsofe Wheeler 

Applied and queued up for -stable.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


STOP CONTACTING ANY OFFICE FOR FUNDS

2014-10-05 Thread Mrs Sherry Williams
Attn: My Dear

I am Mr.Howard V. Keighler , I am US citizen, 48 years Old. I reside here in  
Florida. My residential address is as follows.  1675 Glencove Avenue, Palm Bay, 
Florida 32907  United States, I am one of those that took part in the 
Compensation in Nigeria many years ago and they refused to pay me, I had paid 
over $50,000 while in the US, trying to get my payment all to no avail.

So I decided to travel to WASHINGTON D.C with all my compensation documents, 
And I was directed by the ( F B I) Director to contact Mr.Abiola David, who his 
a representative of the ( F B I ) and a member of the COMPENSATION AWARD 
COMMITTEE, currently in Nigeria. and I contacted him and he explained 
everything to me. He said
whoever is contacting us through emails are fake.

He took me to the paying bank for the claim of my Compensation payment. Right 
now I am the most happiest man on earth because I have received my compensation 
funds of $2.5 Million Us Dollars Moreover, Akin Morgan, showed me the full 
information of those that are yet to receive their payments and I saw your name 
as one of the beneficiaries, and your email address, that is why I decided to 
email you to stop dealing with those people, they are not with your fund, they 
are only making money out of you. I will advise you to contact Akin Morgan.



You have to contact him directly on this information below.

COMPENSATION AWARD HOUSE
Name: Akin Morgan
Email: akinmorgan0...@yahoo.com.sg
Phone Number:+2347019007798


You really have to stop dealing with those people that are contacting you and 
telling you that your fund is with them, it is not in any way with them, they 
are only taking advantage of you and they will dry you up until you have 
nothing.

The only money I paid after I met Akin Morgan was just $560 for the paper 
works, take note of that.

Once again stop contacting those people, I will advise you to contact Akin 
Morgan so that he can help you to deliver your fund instead of dealing with 
those liars that will be turning you around asking for different kind of money 
to complete your transaction.
Mr.Howard V. Keighler
Thank You and Be Blessed.


Address: 1675 Glencove Avenue,
Palm Bay, Florida 32907
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel