netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net 1/2] caif: Fix typo in Vendor/Product-ID for CAIF modems
@ 2012-01-17 13:03 Sjur Brændeland
  2012-01-17 13:03 ` [PATCH net 2/2] caif: Remove bad WARN_ON in caif_dev Sjur Brændeland
  2012-01-17 15:47 ` [PATCH net 1/2] caif: Fix typo in Vendor/Product-ID for CAIF modems David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Sjur Brændeland @ 2012-01-17 13:03 UTC (permalink / raw)
  To: netdev, David Miller; +Cc: Sjur Brændeland

Fix typo for the Vendor/Product Id for ST-Ericsson CAIF modems.
Discovery is based on fixed USB vendor 0x04cc (ST-Ericsson),
product-id 0x230f (NCM).

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
---
 net/caif/caif_usb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/caif/caif_usb.c b/net/caif/caif_usb.c
index 5fc9eca..32ff5f2 100644
--- a/net/caif/caif_usb.c
+++ b/net/caif/caif_usb.c
@@ -27,7 +27,7 @@ MODULE_LICENSE("GPL");
 #define CFUSB_ALIGNMENT 4	/* Number of bytes to align. */
 #define CFUSB_MAX_HEADLEN (CFUSB_PAD_DESCR_SZ + CFUSB_ALIGNMENT-1)
 #define STE_USB_VID 0x04cc	/* USB Product ID for ST-Ericsson */
-#define STE_USB_PID_CAIF 0x2306	/* Product id for CAIF Modems */
+#define STE_USB_PID_CAIF 0x230f	/* Product id for CAIF Modems */
 
 struct cfusbl {
 	struct cflayer layer;
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH net 2/2] caif: Remove bad WARN_ON in caif_dev
  2012-01-17 13:03 [PATCH net 1/2] caif: Fix typo in Vendor/Product-ID for CAIF modems Sjur Brændeland
@ 2012-01-17 13:03 ` Sjur Brændeland
  2012-01-17 15:47   ` David Miller
  2012-01-17 15:47 ` [PATCH net 1/2] caif: Fix typo in Vendor/Product-ID for CAIF modems David Miller
  1 sibling, 1 reply; 4+ messages in thread
From: Sjur Brændeland @ 2012-01-17 13:03 UTC (permalink / raw)
  To: netdev, David Miller; +Cc: Sjur Brændeland

Remove WARN_ON and bad handling of SKB without destructor callback
in caif_flow_cb. SKB without destructor cannot be handled as an
error case.

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
---
 net/caif/caif_dev.c |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/net/caif/caif_dev.c b/net/caif/caif_dev.c
index 61570ee..673728a 100644
--- a/net/caif/caif_dev.c
+++ b/net/caif/caif_dev.c
@@ -146,15 +146,17 @@ void caif_flow_cb(struct sk_buff *skb)
 	spin_lock_bh(&caifd->flow_lock);
 	send_xoff = caifd->xoff;
 	caifd->xoff = 0;
-	if (!WARN_ON(caifd->xoff_skb_dtor == NULL)) {
-		WARN_ON(caifd->xoff_skb != skb);
-		dtor = caifd->xoff_skb_dtor;
-		caifd->xoff_skb = NULL;
-		caifd->xoff_skb_dtor = NULL;
-	}
+	dtor = caifd->xoff_skb_dtor;
+
+	if (WARN_ON(caifd->xoff_skb != skb))
+		skb = NULL;
+
+	caifd->xoff_skb = NULL;
+	caifd->xoff_skb_dtor = NULL;
+
 	spin_unlock_bh(&caifd->flow_lock);
 
-	if (dtor)
+	if (dtor && skb)
 		dtor(skb);
 
 	if (send_xoff)
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH net 1/2] caif: Fix typo in Vendor/Product-ID for CAIF modems
  2012-01-17 13:03 [PATCH net 1/2] caif: Fix typo in Vendor/Product-ID for CAIF modems Sjur Brændeland
  2012-01-17 13:03 ` [PATCH net 2/2] caif: Remove bad WARN_ON in caif_dev Sjur Brændeland
@ 2012-01-17 15:47 ` David Miller
  1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2012-01-17 15:47 UTC (permalink / raw)
  To: sjur.brandeland; +Cc: netdev

From: Sjur Brændeland <sjur.brandeland@stericsson.com>
Date: Tue, 17 Jan 2012 14:03:13 +0100

> Fix typo for the Vendor/Product Id for ST-Ericsson CAIF modems.
> Discovery is based on fixed USB vendor 0x04cc (ST-Ericsson),
> product-id 0x230f (NCM).
> 
> Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>

Applied.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net 2/2] caif: Remove bad WARN_ON in caif_dev
  2012-01-17 13:03 ` [PATCH net 2/2] caif: Remove bad WARN_ON in caif_dev Sjur Brændeland
@ 2012-01-17 15:47   ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2012-01-17 15:47 UTC (permalink / raw)
  To: sjur.brandeland; +Cc: netdev

From: Sjur Brændeland <sjur.brandeland@stericsson.com>
Date: Tue, 17 Jan 2012 14:03:14 +0100

> Remove WARN_ON and bad handling of SKB without destructor callback
> in caif_flow_cb. SKB without destructor cannot be handled as an
> error case.
> 
> Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>

Applied.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-01-17 15:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-17 13:03 [PATCH net 1/2] caif: Fix typo in Vendor/Product-ID for CAIF modems Sjur Brændeland
2012-01-17 13:03 ` [PATCH net 2/2] caif: Remove bad WARN_ON in caif_dev Sjur Brændeland
2012-01-17 15:47   ` David Miller
2012-01-17 15:47 ` [PATCH net 1/2] caif: Fix typo in Vendor/Product-ID for CAIF modems David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).