diff for duplicates of <1491584978.2136.21.camel@redhat.com> diff --git a/a/1.txt b/N1/1.txt index ff88e42..5a3ac26 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -21,71 +21,71 @@ Dan > Cc: Marcel Holtmann <marcel@holtmann.org> > Cc: Gustavo Padovan <gustavo@padovan.org> > Cc: Johan Hedberg <johan.hedberg@gmail.com> -> Cc: linux-bluetooth@vger.kernel.org +> Cc: linux-bluetooth at vger.kernel.org > --- > v2: > - Use IS_ENABLED() to fix module build > -> drivers/bluetooth/hci_ll.c | 261 +> ?drivers/bluetooth/hci_ll.c | 261 > ++++++++++++++++++++++++++++++++++++++++++++- -> 1 file changed, 260 insertions(+), 1 deletion(-) +> ?1 file changed, 260 insertions(+), 1 deletion(-) > > diff --git a/drivers/bluetooth/hci_ll.c b/drivers/bluetooth/hci_ll.c > index 02692fe30279..77648adfd5c9 100644 > --- a/drivers/bluetooth/hci_ll.c > +++ b/drivers/bluetooth/hci_ll.c > @@ -34,20 +34,23 @@ -> #include <linux/sched.h> -> #include <linux/types.h> -> #include <linux/fcntl.h> +> ?#include <linux/sched.h> +> ?#include <linux/types.h> +> ?#include <linux/fcntl.h> > +#include <linux/firmware.h> -> #include <linux/interrupt.h> -> #include <linux/ptrace.h> -> #include <linux/poll.h> -> -> #include <linux/slab.h> +> ?#include <linux/interrupt.h> +> ?#include <linux/ptrace.h> +> ?#include <linux/poll.h> +> ? +> ?#include <linux/slab.h> > -#include <linux/tty.h> -> #include <linux/errno.h> -> #include <linux/string.h> -> #include <linux/signal.h> -> #include <linux/ioctl.h> +> ?#include <linux/errno.h> +> ?#include <linux/string.h> +> ?#include <linux/signal.h> +> ?#include <linux/ioctl.h> > +#include <linux/serdev.h> -> #include <linux/skbuff.h> +> ?#include <linux/skbuff.h> > +#include <linux/ti_wilink_st.h> -> -> #include <net/bluetooth/bluetooth.h> -> #include <net/bluetooth/hci_core.h> +> ? +> ?#include <net/bluetooth/bluetooth.h> +> ?#include <net/bluetooth/hci_core.h> > +#include <linux/gpio/consumer.h> -> -> #include "hci_uart.h" -> +> ? +> ?#include "hci_uart.h" +> ? > @@ -76,6 +79,12 @@ struct hcill_cmd { -> u8 cmd; -> } __packed; -> +> ? u8 cmd; +> ?} __packed; +> ? > +struct ll_device { > + struct hci_uart hu; > + struct serdev_device *serdev; > + struct gpio_desc *enable_gpio; > +}; > + -> struct ll_struct { -> unsigned long rx_state; -> unsigned long rx_count; +> ?struct ll_struct { +> ? unsigned long rx_state; +> ? unsigned long rx_count; > @@ -136,6 +145,9 @@ static int ll_open(struct hci_uart *hu) -> -> hu->priv = ll; -> +> ? +> ? hu->priv = ll; +> ? > + if (hu->serdev) > + serdev_device_open(hu->serdev); > + -> return 0; -> } -> +> ? return 0; +> ?} +> ? > @@ -164,6 +176,13 @@ static int ll_close(struct hci_uart *hu) -> -> kfree_skb(ll->rx_skb); -> +> ? +> ? kfree_skb(ll->rx_skb); +> ? > + if (hu->serdev) { > + struct ll_device *lldev = > serdev_device_get_drvdata(hu->serdev); @@ -94,14 +94,14 @@ Dan > + serdev_device_close(hu->serdev); > + } > + -> hu->priv = NULL; -> -> kfree(ll); +> ? hu->priv = NULL; +> ? +> ? kfree(ll); > @@ -505,9 +524,245 @@ static struct sk_buff *ll_dequeue(struct > hci_uart *hu) -> return skb_dequeue(&ll->txq); -> } -> +> ? return skb_dequeue(&ll->txq); +> ?} +> ? > +#if IS_ENABLED(CONFIG_SERIAL_DEV_BUS) > +static int read_local_version(struct hci_dev *hdev) > +{ @@ -115,7 +115,7 @@ Dan > + if (IS_ERR(skb)) { > + bt_dev_err(hdev, "Reading TI version information > failed (%ld)", -> + PTR_ERR(skb)); +> + ???PTR_ERR(skb)); > + err = PTR_ERR(skb); > + goto out; > + } @@ -166,30 +166,30 @@ Dan > + maj_ver |= 0x0008; > + > + snprintf(bts_scr_name, sizeof(bts_scr_name), -> + "ti-connectivity/TIInit_%d.%d.%d.bts", -> + chip, maj_ver, min_ver); +> + ?"ti-connectivity/TIInit_%d.%d.%d.bts", +> + ?chip, maj_ver, min_ver); > + > + err = request_firmware(&fw, bts_scr_name, &lldev->serdev- > >dev); > + if (err || !fw->data || !fw->size) { > + bt_dev_err(lldev->hu.hdev, "request_firmware > failed(errno %d) for %s", -> + err, bts_scr_name); +> + ???err, bts_scr_name); > + return -EINVAL; > + } > + ptr = (void *)fw->data; > + len = fw->size; > + /* bts_header to remove out magic number and -> + * version -> + */ +> + ?* version +> + ?*/ > + ptr += sizeof(struct bts_header); > + len -= sizeof(struct bts_header); > + > + while (len > 0 && ptr) { > + bt_dev_dbg(lldev->hu.hdev, " action size %d, type %d > ", -> + ((struct bts_action *)ptr)->size, -> + ((struct bts_action *)ptr)->type); +> + ???((struct bts_action *)ptr)->size, +> + ???((struct bts_action *)ptr)->type); > + > + action_ptr = &(((struct bts_action *)ptr)->data[0]); > + @@ -199,7 +199,7 @@ Dan > + cmd = (struct hci_command *)action_ptr; > + if (cmd->opcode == 0xff36) { > + /* ignore remote change -> + * baud rate HCI VS command */ +> + ?* baud rate HCI VS command */ > + bt_dev_warn(lldev->hu.hdev, "change > remote baud rate command in firmware"); > + break; @@ -217,7 +217,7 @@ Dan > + } > + kfree_skb(skb); > + break; -> + case ACTION_WAIT_EVENT: /* wait */ +> + case ACTION_WAIT_EVENT:??/* wait */ > + /* no need to wait as command was > synchronous */ > + bt_dev_dbg(lldev->hu.hdev, "W"); @@ -356,25 +356,25 @@ Dan > +#define ll_setup NULL > +#endif > + -> static const struct hci_uart_proto llp = { -> .id = HCI_UART_LL, -> .name = "LL", +> ?static const struct hci_uart_proto llp = { +> ? .id = HCI_UART_LL, +> ? .name = "LL", > + .setup = ll_setup, -> .open = ll_open, -> .close = ll_close, -> .recv = ll_recv, +> ? .open = ll_open, +> ? .close = ll_close, +> ? .recv = ll_recv, > @@ -518,10 +773,14 @@ static const struct hci_uart_proto llp = { -> -> int __init ll_init(void) -> { +> ? +> ?int __init ll_init(void) +> ?{ > + serdev_device_driver_register(&hci_ti_drv); > + -> return hci_uart_register_proto(&llp); -> } -> -> int __exit ll_deinit(void) -> { +> ? return hci_uart_register_proto(&llp); +> ?} +> ? +> ?int __exit ll_deinit(void) +> ?{ > + serdev_device_driver_unregister(&hci_ti_drv); > + -> return hci_uart_unregister_proto(&llp); -> } +> ? return hci_uart_unregister_proto(&llp); +> ?} diff --git a/a/content_digest b/N1/content_digest index 0e75c34..d4f4baa 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,19 +1,8 @@ "ref\020170407143516.9945-1-robh@kernel.org\0" - "From\0Dan Williams <dcbw@redhat.com>\0" - "Subject\0Re: [PATCH v2 3/4] bluetooth: hci_uart: add LL protocol serdev driver support\0" + "From\0dcbw@redhat.com (Dan Williams)\0" + "Subject\0[PATCH v2 3/4] bluetooth: hci_uart: add LL protocol serdev driver support\0" "Date\0Fri, 07 Apr 2017 12:09:38 -0500\0" - "To\0Rob Herring <robh@kernel.org>" - Marcel Holtmann <marcel@holtmann.org> - " linux-bluetooth@vger.kernel.org\0" - "Cc\0linux-arm-kernel@lists.infradead.org" - Gustavo Padovan <gustavo@padovan.org> - Johan Hedberg <johan.hedberg@gmail.com> - Mark Rutland <mark.rutland@arm.com> - Wei Xu <xuwei5@hisilicon.com> - Eyal Reizer <eyalr@ti.com> - Satish Patel <satish.patel@linaro.org> - netdev@vger.kernel.org - " devicetree@vger.kernel.org\0" + "To\0linux-arm-kernel@lists.infradead.org\0" "\00:1\0" "b\0" "On Fri, 2017-04-07 at 09:35 -0500, Rob Herring wrote:\n" @@ -39,71 +28,71 @@ "> Cc: Marcel Holtmann <marcel@holtmann.org>\n" "> Cc: Gustavo Padovan <gustavo@padovan.org>\n" "> Cc: Johan Hedberg <johan.hedberg@gmail.com>\n" - "> Cc: linux-bluetooth@vger.kernel.org\n" + "> Cc: linux-bluetooth at vger.kernel.org\n" "> ---\n" "> v2:\n" "> - Use IS_ENABLED() to fix module build\n" "> \n" - "> \302\240drivers/bluetooth/hci_ll.c | 261\n" + "> ?drivers/bluetooth/hci_ll.c | 261\n" "> ++++++++++++++++++++++++++++++++++++++++++++-\n" - "> \302\2401 file changed, 260 insertions(+), 1 deletion(-)\n" + "> ?1 file changed, 260 insertions(+), 1 deletion(-)\n" "> \n" "> diff --git a/drivers/bluetooth/hci_ll.c b/drivers/bluetooth/hci_ll.c\n" "> index 02692fe30279..77648adfd5c9 100644\n" "> --- a/drivers/bluetooth/hci_ll.c\n" "> +++ b/drivers/bluetooth/hci_ll.c\n" "> @@ -34,20 +34,23 @@\n" - "> \302\240#include <linux/sched.h>\n" - "> \302\240#include <linux/types.h>\n" - "> \302\240#include <linux/fcntl.h>\n" + "> ?#include <linux/sched.h>\n" + "> ?#include <linux/types.h>\n" + "> ?#include <linux/fcntl.h>\n" "> +#include <linux/firmware.h>\n" - "> \302\240#include <linux/interrupt.h>\n" - "> \302\240#include <linux/ptrace.h>\n" - "> \302\240#include <linux/poll.h>\n" - "> \302\240\n" - "> \302\240#include <linux/slab.h>\n" + "> ?#include <linux/interrupt.h>\n" + "> ?#include <linux/ptrace.h>\n" + "> ?#include <linux/poll.h>\n" + "> ?\n" + "> ?#include <linux/slab.h>\n" "> -#include <linux/tty.h>\n" - "> \302\240#include <linux/errno.h>\n" - "> \302\240#include <linux/string.h>\n" - "> \302\240#include <linux/signal.h>\n" - "> \302\240#include <linux/ioctl.h>\n" + "> ?#include <linux/errno.h>\n" + "> ?#include <linux/string.h>\n" + "> ?#include <linux/signal.h>\n" + "> ?#include <linux/ioctl.h>\n" "> +#include <linux/serdev.h>\n" - "> \302\240#include <linux/skbuff.h>\n" + "> ?#include <linux/skbuff.h>\n" "> +#include <linux/ti_wilink_st.h>\n" - "> \302\240\n" - "> \302\240#include <net/bluetooth/bluetooth.h>\n" - "> \302\240#include <net/bluetooth/hci_core.h>\n" + "> ?\n" + "> ?#include <net/bluetooth/bluetooth.h>\n" + "> ?#include <net/bluetooth/hci_core.h>\n" "> +#include <linux/gpio/consumer.h>\n" - "> \302\240\n" - "> \302\240#include \"hci_uart.h\"\n" - "> \302\240\n" + "> ?\n" + "> ?#include \"hci_uart.h\"\n" + "> ?\n" "> @@ -76,6 +79,12 @@ struct hcill_cmd {\n" - "> \302\240\tu8 cmd;\n" - "> \302\240} __packed;\n" - "> \302\240\n" + "> ?\tu8 cmd;\n" + "> ?} __packed;\n" + "> ?\n" "> +struct ll_device {\n" "> +\tstruct hci_uart hu;\n" "> +\tstruct serdev_device *serdev;\n" "> +\tstruct gpio_desc *enable_gpio;\n" "> +};\n" "> +\n" - "> \302\240struct ll_struct {\n" - "> \302\240\tunsigned long rx_state;\n" - "> \302\240\tunsigned long rx_count;\n" + "> ?struct ll_struct {\n" + "> ?\tunsigned long rx_state;\n" + "> ?\tunsigned long rx_count;\n" "> @@ -136,6 +145,9 @@ static int ll_open(struct hci_uart *hu)\n" - "> \302\240\n" - "> \302\240\thu->priv = ll;\n" - "> \302\240\n" + "> ?\n" + "> ?\thu->priv = ll;\n" + "> ?\n" "> +\tif (hu->serdev)\n" "> +\t\tserdev_device_open(hu->serdev);\n" "> +\n" - "> \302\240\treturn 0;\n" - "> \302\240}\n" - "> \302\240\n" + "> ?\treturn 0;\n" + "> ?}\n" + "> ?\n" "> @@ -164,6 +176,13 @@ static int ll_close(struct hci_uart *hu)\n" - "> \302\240\n" - "> \302\240\tkfree_skb(ll->rx_skb);\n" - "> \302\240\n" + "> ?\n" + "> ?\tkfree_skb(ll->rx_skb);\n" + "> ?\n" "> +\tif (hu->serdev) {\n" "> +\t\tstruct ll_device *lldev =\n" "> serdev_device_get_drvdata(hu->serdev);\n" @@ -112,14 +101,14 @@ "> +\t\tserdev_device_close(hu->serdev);\n" "> +\t}\n" "> +\n" - "> \302\240\thu->priv = NULL;\n" - "> \302\240\n" - "> \302\240\tkfree(ll);\n" + "> ?\thu->priv = NULL;\n" + "> ?\n" + "> ?\tkfree(ll);\n" "> @@ -505,9 +524,245 @@ static struct sk_buff *ll_dequeue(struct\n" "> hci_uart *hu)\n" - "> \302\240\treturn skb_dequeue(&ll->txq);\n" - "> \302\240}\n" - "> \302\240\n" + "> ?\treturn skb_dequeue(&ll->txq);\n" + "> ?}\n" + "> ?\n" "> +#if IS_ENABLED(CONFIG_SERIAL_DEV_BUS)\n" "> +static int read_local_version(struct hci_dev *hdev)\n" "> +{\n" @@ -133,7 +122,7 @@ "> +\tif (IS_ERR(skb)) {\n" "> +\t\tbt_dev_err(hdev, \"Reading TI version information\n" "> failed (%ld)\",\n" - "> +\t\t\t\302\240\302\240\302\240PTR_ERR(skb));\n" + "> +\t\t\t???PTR_ERR(skb));\n" "> +\t\terr = PTR_ERR(skb);\n" "> +\t\tgoto out;\n" "> +\t}\n" @@ -184,30 +173,30 @@ "> +\t\tmaj_ver |= 0x0008;\n" "> +\n" "> +\tsnprintf(bts_scr_name, sizeof(bts_scr_name),\n" - "> +\t\t\302\240\"ti-connectivity/TIInit_%d.%d.%d.bts\",\n" - "> +\t\t\302\240chip, maj_ver, min_ver);\n" + "> +\t\t?\"ti-connectivity/TIInit_%d.%d.%d.bts\",\n" + "> +\t\t?chip, maj_ver, min_ver);\n" "> +\n" "> +\terr = request_firmware(&fw, bts_scr_name, &lldev->serdev-\n" "> >dev);\n" "> +\tif (err || !fw->data || !fw->size) {\n" "> +\t\tbt_dev_err(lldev->hu.hdev, \"request_firmware\n" "> failed(errno %d) for %s\",\n" - "> +\t\t\t\302\240\302\240\302\240err, bts_scr_name);\n" + "> +\t\t\t???err, bts_scr_name);\n" "> +\t\treturn -EINVAL;\n" "> +\t}\n" "> +\tptr = (void *)fw->data;\n" "> +\tlen = fw->size;\n" "> +\t/* bts_header to remove out magic number and\n" - "> +\t\302\240* version\n" - "> +\t\302\240*/\n" + "> +\t?* version\n" + "> +\t?*/\n" "> +\tptr += sizeof(struct bts_header);\n" "> +\tlen -= sizeof(struct bts_header);\n" "> +\n" "> +\twhile (len > 0 && ptr) {\n" "> +\t\tbt_dev_dbg(lldev->hu.hdev, \" action size %d, type %d\n" "> \",\n" - "> +\t\t\t\302\240\302\240\302\240((struct bts_action *)ptr)->size,\n" - "> +\t\t\t\302\240\302\240\302\240((struct bts_action *)ptr)->type);\n" + "> +\t\t\t???((struct bts_action *)ptr)->size,\n" + "> +\t\t\t???((struct bts_action *)ptr)->type);\n" "> +\n" "> +\t\taction_ptr = &(((struct bts_action *)ptr)->data[0]);\n" "> +\n" @@ -217,7 +206,7 @@ "> +\t\t\tcmd = (struct hci_command *)action_ptr;\n" "> +\t\t\tif (cmd->opcode == 0xff36) {\n" "> +\t\t\t\t/* ignore remote change\n" - "> +\t\t\t\t\302\240* baud rate HCI VS command */\n" + "> +\t\t\t\t?* baud rate HCI VS command */\n" "> +\t\t\t\tbt_dev_warn(lldev->hu.hdev, \"change\n" "> remote baud rate command in firmware\");\n" "> +\t\t\t\tbreak;\n" @@ -235,7 +224,7 @@ "> +\t\t\t}\n" "> +\t\t\tkfree_skb(skb);\n" "> +\t\t\tbreak;\n" - "> +\t\tcase ACTION_WAIT_EVENT:\302\240\302\240/* wait */\n" + "> +\t\tcase ACTION_WAIT_EVENT:??/* wait */\n" "> +\t\t\t/* no need to wait as command was\n" "> synchronous */\n" "> +\t\t\tbt_dev_dbg(lldev->hu.hdev, \"W\");\n" @@ -374,27 +363,27 @@ "> +#define ll_setup NULL\n" "> +#endif\n" "> +\n" - "> \302\240static const struct hci_uart_proto llp = {\n" - "> \302\240\t.id\t\t= HCI_UART_LL,\n" - "> \302\240\t.name\t\t= \"LL\",\n" + "> ?static const struct hci_uart_proto llp = {\n" + "> ?\t.id\t\t= HCI_UART_LL,\n" + "> ?\t.name\t\t= \"LL\",\n" "> +\t.setup\t\t= ll_setup,\n" - "> \302\240\t.open\t\t= ll_open,\n" - "> \302\240\t.close\t\t= ll_close,\n" - "> \302\240\t.recv\t\t= ll_recv,\n" + "> ?\t.open\t\t= ll_open,\n" + "> ?\t.close\t\t= ll_close,\n" + "> ?\t.recv\t\t= ll_recv,\n" "> @@ -518,10 +773,14 @@ static const struct hci_uart_proto llp = {\n" - "> \302\240\n" - "> \302\240int __init ll_init(void)\n" - "> \302\240{\n" + "> ?\n" + "> ?int __init ll_init(void)\n" + "> ?{\n" "> +\tserdev_device_driver_register(&hci_ti_drv);\n" "> +\n" - "> \302\240\treturn hci_uart_register_proto(&llp);\n" - "> \302\240}\n" - "> \302\240\n" - "> \302\240int __exit ll_deinit(void)\n" - "> \302\240{\n" + "> ?\treturn hci_uart_register_proto(&llp);\n" + "> ?}\n" + "> ?\n" + "> ?int __exit ll_deinit(void)\n" + "> ?{\n" "> +\tserdev_device_driver_unregister(&hci_ti_drv);\n" "> +\n" - "> \302\240\treturn hci_uart_unregister_proto(&llp);\n" - "> \302\240}" + "> ?\treturn hci_uart_unregister_proto(&llp);\n" + > ?} -6502293cea9594504a304d0d3192a60bd9644b62425db0f950d8c3961bf9e3ab +48e6c3c3d05b8e76eb1ab6b022468f2f79a601920498b9841fafe5d4b3dc2eee
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.