Skip to contentSkip to conversation

hso: fix disable_net

PATCH In review Filip Aben 5 participants 6 messages Nov 25, 2010 – Nov 28, 2010 2 messages not in the archive

Subsystems (4)
lore
Share & tools
lore

Filip Aben

author
#0 lore raw

PATCH v2 1/1 hso: fix disable_net

The HSO driver incorrectly creates a serial device instead of a net device when disable_net is set. It shouldn't create anything for the network interface.

---

drivers/net/usb/hso.c +6 -4
index b154a94..1b755ae 100644
@@ -2994,12 +2994,14 @@ static int hso_probe(struct usb_interface *interface,
 
 	case HSO_INTF_BULK:
 		/* It's a regular bulk interface */
-		if (((port_spec & HSO_PORT_MASK) == HSO_PORT_NETWORK) &&
-		    !disable_net)
-			hso_dev = hso_create_net_device(interface, port_spec);
-		else
+		if ((port_spec & HSO_PORT_MASK) == HSO_PORT_NETWORK) { 
+			if(!disable_net)
+				hso_dev =
+				    hso_create_net_device(interface, port_spec);
+		} else {
 			hso_dev =
 			    hso_create_bulk_serial_device(interface, port_spec);
+		}
 		if (!hso_dev)
 			goto exit;
 		break;

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#1 lore raw
Quoted 5 lines · Filip Aben

The HSO driver incorrectly creates a serial device instead of a net device when disable_net is set. It shouldn't create anything for the network interface.

Please add the appropriate Reported-by-tags as well, e.g.

As this patch is meant to fix a driver crash, perhaps it should be marked for stable as well?

Thanks,
Johan

A message that is not in the archive (sent off-list or not yet received): AANLkTikODWoXB1PmB+SFbFWenYm_-o+RJ+czK9LnaXmn-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

author
#3 lore raw
Quoted 11 lines · Johan Hovold
Quoted 5 lines · Filip Aben

The HSO driver incorrectly creates a serial device instead of a net device when disable_net is set. It shouldn't create anything for the network interface.

Please add the appropriate Reported-by-tags as well, e.g.

I would have gladly done so if you included that in your comment on the previous patch :)

Quoted 4 lines

As this patch is meant to fix a driver crash, perhaps it should be marked for stable as well?

I don't think it's that critical: it only applies to people explicitly loading the module with disable_net set. But feel free to queue it up for stable.

Thanks,

Filip-

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#4 lore raw
Quoted 8 lines · Filip Aben
Quoted 4 lines · Johan Hovold

Please add the appropriate Reported-by-tags as well, e.g.

I would have gladly done so if you included that in your comment on the previous patch :)

What is stopping you from submitting a v3? :)

But perhaps David can pick those up from the thread. Not sure how this is usually dealt with on netdev.

Thanks,
Johan
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#5 lore raw
Quoted 7 lines · Johan Hovold
Quoted 6 lines · Filip Aben
Quoted 4 lines · Johan Hovold

Please add the appropriate Reported-by-tags as well, e.g.

Quoted 7 lines
Quoted 2 lines

I would have gladly done so if you included that in your comment on the previous patch :)

What is stopping you from submitting a v3? :)

But perhaps David can pick those up from the thread. Not sure how this is usually dealt with on netdev.

Automatically taken care of by patchwork:

http://patchwork.ozlabs.org/patch/73060/mbox/

A message that is not in the archive (sent off-list or not yet received): [email protected]

#7 lore raw

From: Jan Ceuleers <[email protected]>
Date: Fri, 26 Nov 2010 21:18:12 +0100

Quoted 12 lines · Johan Hovold
Quoted 11 lines · Filip Aben
Quoted 9 lines · Johan Hovold
Quoted 4 lines

Please add the appropriate Reported-by-tags as well, e.g.

I would have gladly done so if you included that in your comment on the
previous patch :)

Quoted 8 lines
Quoted 4 lines

What is stopping you from submitting a v3? :)

But perhaps David can pick those up from the thread. Not sure how this is usually dealt with on netdev.

Automatically taken care of by patchwork:

http://patchwork.ozlabs.org/patch/73060/mbox/

Right :-)

I'll apply this, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html