linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "K, Kiran" <kiran.k@intel.com>
To: Marcel Holtmann <marcel@holtmann.org>, Kiran K <kiraank@gmail.com>
Cc: linux-bluetooth <linux-bluetooth@vger.kernel.org>,
	"Narasimman, Sathish" <sathish.narasimman@intel.com>,
	"Tumkur Narayan, Chethan" <chethan.tumkur.narayan@intel.com>,
	"Srivatsa, Ravishankar" <ravishankar.srivatsa@intel.com>
Subject: RE: [PATCH v5 1/2] Bluetooth: btusb: use usb vid/pid for initializing hal callbacks
Date: Sat, 3 Oct 2020 13:17:28 +0000	[thread overview]
Message-ID: <DM6PR11MB31464DDCB9BDA1110F888E5CF50E0@DM6PR11MB3146.namprd11.prod.outlook.com> (raw)
In-Reply-To: <5B30E5BC-6631-40C3-8EDE-C69E62064D35@holtmann.org>

Hi Marcel,

> -----Original Message-----
> From: Marcel Holtmann <marcel@holtmann.org>
> Sent: Saturday, October 3, 2020 1:57 PM
> To: Kiran K <kiraank@gmail.com>
> Cc: linux-bluetooth <linux-bluetooth@vger.kernel.org>; Narasimman, Sathish
> <sathish.narasimman@intel.com>; Tumkur Narayan, Chethan
> <chethan.tumkur.narayan@intel.com>; Srivatsa, Ravishankar
> <ravishankar.srivatsa@intel.com>; K, Kiran <kiran.k@intel.com>
> Subject: Re: [PATCH v5 1/2] Bluetooth: btusb: use usb vid/pid for initializing
> hal callbacks
> 
> Hi Kiran,
> 
> > For Intel controllers, use vid/pid for initalizing hardware
> > abstraction layer callbacks to avoid defining new quirk flags for new
> products.
> >
> > Signed-off-by: Kiran K <kiran.k@intel.com>
> > ---
> > Changes in v5:
> > * Use usb vid/pid combination to identify controller type istead of
> > using flags
> >
> > Changes in previous versions:
> > None. This is a new patch created part of v5
> >
> > drivers/bluetooth/btusb.c | 79
> > ++++++++++++++++++++++++++++-------------------
> > 1 file changed, 48 insertions(+), 31 deletions(-)
> >
> > diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
> > index 1005b6e..e2cd78d 100644
> > --- a/drivers/bluetooth/btusb.c
> > +++ b/drivers/bluetooth/btusb.c
> > @@ -3969,13 +3969,21 @@ static int btusb_probe(struct usb_interface
> *intf,
> > 	init_usb_anchor(&data->ctrl_anchor);
> > 	spin_lock_init(&data->rxlock);
> >
> > -	if (id->driver_info & BTUSB_INTEL_NEW) {
> > -		data->recv_event = btusb_recv_event_intel;
> > -		data->recv_bulk = btusb_recv_bulk_intel;
> > -		set_bit(BTUSB_BOOTLOADER, &data->flags);
> > -	} else {
> > -		data->recv_event = hci_recv_frame;
> > -		data->recv_bulk = btusb_recv_bulk;
> > +	data->recv_event = hci_recv_frame;
> > +	data->recv_bulk = btusb_recv_bulk;
> > +
> > +	if (id->idVendor == 0x8087) {
> > +		switch (id->idProduct) {
> > +		case 0x0025:
> > +		case 0x0026:
> > +		case 0x0029:
> > +		case 0x0a2b:
> > +		case 0x0aaa:
> > +			data->recv_event = btusb_recv_event_intel;
> > +			data->recv_bulk = btusb_recv_bulk_intel;
> > +			set_bit(BTUSB_BOOTLOADER, &data->flags);
> > +			break;
> > +		}
> > 	}
> 
> please don’t do this. This is exactly what I didn’t want. Listing PID in the
> device table and then also again in the probe callback is bound to be error
> prone.
> 

Got your point. I will send the fix with BTUSB_INTEL_NEWGEN as discussed earlier.  Thanks.

> Regards
> 
> Marcel

Regards,
Kiran



      reply	other threads:[~2020-10-03 13:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-03  8:02 [PATCH v5 1/2] Bluetooth: btusb: use usb vid/pid for initializing hal callbacks Kiran K
2020-10-03  8:02 ` [PATCH v5 2/2] Bluetooth: btintel: Add *setup* function for new generation Intel controllers Kiran K
2020-10-03  8:27 ` [PATCH v5 1/2] Bluetooth: btusb: use usb vid/pid for initializing hal callbacks Marcel Holtmann
2020-10-03 13:17   ` K, Kiran [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM6PR11MB31464DDCB9BDA1110F888E5CF50E0@DM6PR11MB3146.namprd11.prod.outlook.com \
    --to=kiran.k@intel.com \
    --cc=chethan.tumkur.narayan@intel.com \
    --cc=kiraank@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=marcel@holtmann.org \
    --cc=ravishankar.srivatsa@intel.com \
    --cc=sathish.narasimman@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).