Re: Fwd: HSO driver patch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

>> I tried contacting authors of the driver mentioned in the source file
>> and also in the MAINTAINERS file,
>> but haven't received any reply so I am sending this to this mailing
>> list. If I should use another one,
>> plese advise me which one.
>
> Can you use the scripts/get_maintainer.pl tool to determine the correct
> mailing list to send these to,

$ ./scripts/get_maintainer.pl 0001-Reverse-the-order-in-disconnect.patch

Jan Dumon <j.dumon@xxxxxxxxxx> (maintainer:HSO 3G MODEM DRIVER)
linux-usb@xxxxxxxxxxxxxxx (open list:USB NETWORKING DR...)
netdev@xxxxxxxxxxxxxxx (open list:NETWORKING DRIVERS)
linux-kernel@xxxxxxxxxxxxxxx (open list)

> and send them in a format we can apply them in?

$ scripts/checkpatch.pl 0001-Reverse-the-order-in-disconnect.patch
total: 0 errors, 0 warnings, 0 checks, 12 lines checked
0001-Reverse-the-order-in-disconnect.patch has no obvious style
problems and is ready for submission.

$ scripts/checkpatch.pl
0002-Stop-also-serial-queue-when-device-is-unplugged.patch
total: 0 errors, 0 warnings, 0 checks, 7 lines checked
0002-Stop-also-serial-queue-when-device-is-unplugged.patch has no
obvious style problems and is ready for submission.

Is this O.K.?

> We will be glad to queue them up, no need to get the option
> maintainer's response for basic stuff.

Thank you and BR,
Matej
From f560b127ca9bb7c52106f0f83091e6c5e0e90b09 Mon Sep 17 00:00:00 2001
From: Matej Kupljen <matej.kupljen@xxxxxxxx>
Date: Wed, 28 Sep 2016 18:37:23 +0200
Subject: [PATCH] Reverse the order in disconnect

When the device is disconnected, we first need to set interface
data to NULL and then do the freeing of resources to avoid race
conditions.

Signed-off-by: Matej Kupljen <matej.kupljen@xxxxxxxx>
---
 drivers/net/usb/hso.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c
index b0df61f..16aef06 100644
--- a/drivers/net/usb/hso.c
+++ b/drivers/net/usb/hso.c
@@ -3013,10 +3013,10 @@ exit:
 /* device removed, cleaning up */
 static void hso_disconnect(struct usb_interface *interface)
 {
-	hso_free_interface(interface);
-
 	/* remove reference of our private data */
 	usb_set_intfdata(interface, NULL);
+
+	hso_free_interface(interface);
 }
 
 static void async_get_intf(struct work_struct *data)
-- 
2.7.4

From 95cfca26bbcbb021e9327c03f8edf2ed0878de75 Mon Sep 17 00:00:00 2001
From: Matej Kupljen <matej.kupljen@xxxxxxxx>
Date: Wed, 5 Oct 2016 13:08:31 +0200
Subject: [PATCH] Stop also serial queue when device is unplugged

We need to also stop serial port when the device is unplugged,
the network part is already stopped.

Signed-off-by: Matej Kupljen <matej.kupljen@xxxxxxxx>
---
 drivers/net/usb/hso.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c
index 16aef06..efd1fef 100644
--- a/drivers/net/usb/hso.c
+++ b/drivers/net/usb/hso.c
@@ -3157,6 +3157,7 @@ static void hso_free_interface(struct usb_interface *interface)
 			mutex_lock(&serial->parent->mutex);
 			serial->parent->usb_gone = 1;
 			mutex_unlock(&serial->parent->mutex);
+			hso_stop_serial_device(serial->parent);
 			cancel_work_sync(&serial_table[i]->async_put_intf);
 			cancel_work_sync(&serial_table[i]->async_get_intf);
 			hso_serial_tty_unregister(serial);
-- 
2.7.4


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux