Linux bluetooth development
 help / color / mirror / Atom feed
From: Tedd Ho-Jeong An <tedd.an@intel.com>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: "linux-bluetooth@vger.kernel.org" <linux-bluetooth@vger.kernel.org>
Subject: Re: [PATCH v4] Bluetooth: btusb: Add routine for applying Intel DDC parameters
Date: Fri, 12 Jun 2015 11:02:45 -0700	[thread overview]
Message-ID: <20150612110245.3f216445@tedd-fedora-vm> (raw)
In-Reply-To: <8903C22A-6194-40CA-A787-D7E79A67322A@holtmann.org>

Hi Marcel,

On Fri, 12 Jun 2015 11:36:16 +0200
Marcel Holtmann <marcel@holtmann.org> wrote:

> Hi Tedd,
> 
> > @@ -2244,7 +2248,66 @@ done:
> > 
> > 	clear_bit(BTUSB_BOOTLOADER, &data->flags);
> > 
> > +	/* Once the device is running in operational mode, it needs to apply
> > +	 * the device configuration(DDC) parameters to the device.
> > +	 */
> > +	snprintf(fwname, sizeof(fwname), "intel/ibt-11-%u.ddc", dev_revid);
> 
> I would actually just move creating the DDC filename above instead of bothering to introduce a new dev_revid variable.
> 
> > +
> > +	/* Device can work without DDC parameters so even if it fails to load
> > +	 * the file, no need to fail the setup.
> > +	 */
> > +	err = request_firmware_direct(&fw, fwname, &hdev->dev);
> 
> Why _direct compared to the other one?

If the DDC file doesn't exist, then request_firmware() displays the following extra message:

[ 2193.141256] bluetooth hci0: Direct firmware load for intel/ibt-11-5.ddc failed with error -2

I thought its not necessary to display and give a negative impression since the device can work without DDC file.

The request_firmware_direct() suppress the error message and this is the comment from the function says it is useful for optional firmware. 

 * This function works pretty much like request_firmware(), but this doesn't
 * fall back to usermode helper even if the firmware couldn't be loaded
 * directly from fs.  Hence it's useful for loading optional firmwares, which
 * aren't always present, without extra long timeouts of udev.

Functionally, both works fine.

> 
> > +	if (err < 0) {
> > +		BT_ERR("failed to open the ddc file: %s", fwname);
> > +		return 0;
> > +	}
> > +
> > +	BT_INFO("%s: Intel DDC file opened: %s", hdev->name, fwname);
> > +
> > +	fw_ptr = fw->data;
> > +
> > +	/* DDC file contains DDC parameters in HCI Command format. */
> 
> Did we agree on that? I think we did not. We just want the plain DDC parameters. We might have crossed our messages here. I prefer plain DDC key value pairs in the file.
> 

Thanks for clarification. :)

> > 
> 
> Regards
> 
> Marcel
> 

Regards,
Tedd

      reply	other threads:[~2015-06-12 18:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-10 22:01 [PATCH v4] Bluetooth: btusb: Add routine for applying Intel DDC parameters Tedd Ho-Jeong An
2015-06-12  9:36 ` Marcel Holtmann
2015-06-12 18:02   ` Tedd Ho-Jeong An [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=20150612110245.3f216445@tedd-fedora-vm \
    --to=tedd.an@intel.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=marcel@holtmann.org \
    /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