RE: [PATCH v10 3/3] Bluetooth: hci_uart: Support firmware download for Marvell

2016-05-05 Thread Amitkumar Karwar
Hi Alan,

> From: One Thousand Gnomes [mailto:gno...@lxorguk.ukuu.org.uk]
> Sent: Thursday, May 05, 2016 8:53 PM
> To: Amitkumar Karwar
> Cc: linux-blueto...@vger.kernel.org; linux-kernel@vger.kernel.org;
> Ganapathi Bhat
> Subject: Re: [PATCH v10 3/3] Bluetooth: hci_uart: Support firmware
> download for Marvell
> 
> > +/* Send ACK/NAK to the device */
> > +static void mrvl_send_ack(struct hci_uart *hu, unsigned char ack) {
> > +   struct tty_struct *tty = hu->tty;
> > +
> > +   tty->ops->write(tty, , sizeof(ack)); }
> 
> You don't know if the device has a write method, and it should be
> locked.
> This should go via your ldisc not directly.
> 

Thanks for review. We will take care of this.

Regards,
Amitkumar


RE: [PATCH v10 3/3] Bluetooth: hci_uart: Support firmware download for Marvell

2016-05-05 Thread Amitkumar Karwar
Hi Alan,

> From: One Thousand Gnomes [mailto:gno...@lxorguk.ukuu.org.uk]
> Sent: Thursday, May 05, 2016 8:53 PM
> To: Amitkumar Karwar
> Cc: linux-blueto...@vger.kernel.org; linux-kernel@vger.kernel.org;
> Ganapathi Bhat
> Subject: Re: [PATCH v10 3/3] Bluetooth: hci_uart: Support firmware
> download for Marvell
> 
> > +/* Send ACK/NAK to the device */
> > +static void mrvl_send_ack(struct hci_uart *hu, unsigned char ack) {
> > +   struct tty_struct *tty = hu->tty;
> > +
> > +   tty->ops->write(tty, , sizeof(ack)); }
> 
> You don't know if the device has a write method, and it should be
> locked.
> This should go via your ldisc not directly.
> 

Thanks for review. We will take care of this.

Regards,
Amitkumar


Re: [PATCH v10 3/3] Bluetooth: hci_uart: Support firmware download for Marvell

2016-05-05 Thread One Thousand Gnomes
> +/* Send ACK/NAK to the device */
> +static void mrvl_send_ack(struct hci_uart *hu, unsigned char ack)
> +{
> + struct tty_struct *tty = hu->tty;
> +
> + tty->ops->write(tty, , sizeof(ack));
> +}

You don't know if the device has a write method, and it should be locked.
This should go via your ldisc not directly.

Alan


Re: [PATCH v10 3/3] Bluetooth: hci_uart: Support firmware download for Marvell

2016-05-05 Thread One Thousand Gnomes
> +/* Send ACK/NAK to the device */
> +static void mrvl_send_ack(struct hci_uart *hu, unsigned char ack)
> +{
> + struct tty_struct *tty = hu->tty;
> +
> + tty->ops->write(tty, , sizeof(ack));
> +}

You don't know if the device has a write method, and it should be locked.
This should go via your ldisc not directly.

Alan