Skip to contentSkip to conversation

btsdio: fix tx error path

PATCH In review Tomas Winkler 3 participants 5 messages Oct 6, 2008 – Feb 2, 2009 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 btsdio: fix tx error path

This patch fixes accumulating of the header
in case packet was requeued in the error path.

Cc Marcel Holtmann <[email protected]>
---
 drivers/bluetooth/btsdio.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/bluetooth/btsdio.c +1 -0
index 58630cc..c422e89 100644
@@ -91,6 +91,7 @@ static int btsdio_tx_packet(struct btsdio_data *data, struct sk_buff *skb)
 
 	err = sdio_writesb(data->func, REG_TDAT, skb->data, skb->len);
 	if (err < 0) {
+		skb_pull(skb, 4);
 		sdio_writeb(data->func, 0x01, REG_PC_WRT, NULL);
 		return err;
 	}
Signature · 9 lines
1.5.4.3

---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
maintainer
#1 lore raw

Hi Tomas,

Quoted 14 lines

This patch fixes accumulating of the header
in case packet was requeued in the error path.

Cc Marcel Holtmann <[email protected]>
---
 drivers/bluetooth/btsdio.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/bluetooth/btsdio.c +0 -0
index 58630cc..c422e89 100644

drivers/bluetooth/btsdio.c static int btsdio_tx_packet(struct btsdio_data *data, struct sk_buff *skb) · line 97

Quoted 7 lines
drivers/bluetooth/btsdio.c +1 -0
@@ -91,6 +91,7 @@ static int btsdio_tx_packet(struct btsdio_data *data, struct sk_buff *skb)
 
 	err = sdio_writesb(data->func, REG_TDAT, skb->data, skb->len);
 	if (err < 0) {
+		skb_pull(skb, 4);
 		sdio_writeb(data->func, 0x01, REG_PC_WRT, NULL);
 		return err;
 	}

thanks, but I already fixed that one manually in my tree :)

Regards

Marcel

#2 lore raw
Quoted 20 lines

-----Original Message-----
From: Marcel Holtmann [mailto:[email protected]]
Sent: Monday, October 06, 2008 2:02 PM
To: Winkler, Tomas
Cc: [email protected]; [email protected]
Subject: Re: [PATCH V2] btsdio: fix tx error path

Hi Tomas,

Quoted 9 lines

This patch fixes accumulating of the header
in case packet was requeued in the error path.

Cc Marcel Holtmann <[email protected]>
---
 drivers/bluetooth/btsdio.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
Quoted 5 lines

drivers/bluetooth/btsdio.c static int btsdio_tx_packet(struct btsdio_data

Quoted 5 lines
drivers/bluetooth/btsdio.c +0 -0
index 58630cc..c422e89 100644
@@ -91,6 +91,7 @@ static int btsdio_tx_packet(struct btsdio_data

*data,

Quoted 10 lines

struct sk_buff *skb)

drivers/bluetooth/btsdio.c static int btsdio_tx_packet(struct btsdio_data *data, struct sk_buff *skb) · line 97

Quoted 7 lines
drivers/bluetooth/btsdio.c +1 -0
 	err =3D sdio_writesb(data->func, REG_TDAT, skb->data, skb->len);
 	if (err < 0) {
+		skb_pull(skb, 4);
 		sdio_writeb(data->func, 0x01, REG_PC_WRT, NULL);
 		return err;
 	}

thanks, but I already fixed that one manually in my tree :)

Yeah I guessed that, resubmitted just for the protocol. Tomas

---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.

#3 lore raw
In reply to Marcel Holtmann
Quoted 26 lines · Marcel Holtmann

Hi Tomas,

Quoted 14 lines

This patch fixes accumulating of the header
in case packet was requeued in the error path.

Cc Marcel Holtmann <[email protected]>
---
 drivers/bluetooth/btsdio.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/bluetooth/btsdio.c +0 -0
index 58630cc..c422e89 100644

drivers/bluetooth/btsdio.c static int btsdio_tx_packet(struct btsdio_data *data, struct sk_buff *skb) · line 97

Quoted 7 lines
drivers/bluetooth/btsdio.c +1 -0
@@ -91,6 +91,7 @@ static int btsdio_tx_packet(struct btsdio_data *data, struct sk_buff *skb)
 
      err = sdio_writesb(data->func, REG_TDAT, skb->data, skb->len);
      if (err < 0) {
+             skb_pull(skb, 4);
              sdio_writeb(data->func, 0x01, REG_PC_WRT, NULL);
              return err;
      }

thanks, but I already fixed that one manually in my tree :)

Quoted 3 lines

Regards

Marcel

Would you mind to queue it for 27 stable? I'm always hitting this and I guess I'm not only one.
http://marc.info/?l=linux-bluetooth&m=122513647106365&w=2

Thanks
Tomas

maintainer
#4 lore raw

Hi Tomas,

Quoted 24 lines
Quoted 24 lines
Quoted 14 lines

This patch fixes accumulating of the header
in case packet was requeued in the error path.

Cc Marcel Holtmann <[email protected]>
---
 drivers/bluetooth/btsdio.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/bluetooth/btsdio.c +0 -0
index 58630cc..c422e89 100644

drivers/bluetooth/btsdio.c static int btsdio_tx_packet(struct btsdio_data *data, struct sk_buff *skb) · line 97

Quoted 7 lines
drivers/bluetooth/btsdio.c +1 -0
@@ -91,6 +91,7 @@ static int btsdio_tx_packet(struct btsdio_data *data, struct sk_buff *skb)
 
      err = sdio_writesb(data->func, REG_TDAT, skb->data, skb->len);
      if (err < 0) {
+             skb_pull(skb, 4);
              sdio_writeb(data->func, 0x01, REG_PC_WRT, NULL);
              return err;
      }

thanks, but I already fixed that one manually in my tree :)

Quoted 7 lines
Quoted 3 lines

Regards

Marcel

Would you mind to queue it for 27 stable? I'm always hitting this and I guess I'm not only one.
http://marc.info/?l=linux-bluetooth&m=122513647106365&w=2

since besides development hardware, nobody really has this issue and I think it doesn't really justify pushing this to -stable. However this is up to the -stable guys and you can just sent it to [email protected] by yourself if you wanna have it included. Just point them to

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff_plain;h=7644d63d1348ec044ccd8f775fefe5eb7cbcac69

and explain you reason for adding it to -stable.

Regards

Marcel