Linux bluetooth development
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: bluez-users@lists.sourceforge.net
Subject: Re: [Bluez-users] Re: BT3C_CS broken in kernel 2.6.14? [Also with 2.6.15]
Date: Wed, 04 Jan 2006 12:57:37 +0100	[thread overview]
Message-ID: <1136375857.13931.23.camel@localhost> (raw)
In-Reply-To: <1136374995.13931.21.camel@localhost>

[-- Attachment #1: Type: text/plain, Size: 729 bytes --]

Hi Antti,

> > > remember what the real problem or even the solution was when it came up
> > > on LKML. Try to do some research on LKML by yourself and also check the
> > > latest 2.6.14-git10 kernel.
> > 
> >   I tried now with 2.6.15 - Still not fixed. Can you point me to these LKML 
> > postings? I couldn't find then (tried searching with keywords bt3c, bluetooth 
> > and firmware - the latter two were too broad and the first did not give 
> > anything useful.)
> 
> it must have been something with the atmel_cs and request_firmware(),
> because the atmel_cs and bt3c_cs drivers had the same problem.

and maybe the attached patch helps. I haven't tested it, but it compiles
fine with my latest kernel.

Regards

Marcel


[-- Attachment #2: patch --]
[-- Type: text/x-patch, Size: 1192 bytes --]

diff --git a/drivers/bluetooth/bt3c_cs.c b/drivers/bluetooth/bt3c_cs.c
index d2a0add..d6b021b 100644
--- a/drivers/bluetooth/bt3c_cs.c
+++ b/drivers/bluetooth/bt3c_cs.c
@@ -480,18 +480,6 @@ static int bt3c_hci_ioctl(struct hci_dev
 /* ======================== Card services HCI interaction ======================== */
 
 
-static struct device *bt3c_device(void)
-{
-	static struct device dev = {
-		.bus_id = "pcmcia",
-	};
-	kobject_set_name(&dev.kobj, "bt3c");
-	kobject_init(&dev.kobj);
-
-	return &dev;
-}
-
-
 static int bt3c_load_firmware(bt3c_info_t *info, unsigned char *firmware, int count)
 {
 	char *ptr = (char *) firmware;
@@ -580,6 +568,7 @@ static int bt3c_open(bt3c_info_t *info)
 {
 	const struct firmware *firmware;
 	struct hci_dev *hdev;
+	client_handle_t handle;
 	int err;
 
 	spin_lock_init(&(info->lock));
@@ -611,8 +600,10 @@ static int bt3c_open(bt3c_info_t *info)
 
 	hdev->owner = THIS_MODULE;
 
+	handle = info->link.handle;
+
 	/* Load firmware */
-	err = request_firmware(&firmware, "BT3CPCC.bin", bt3c_device());
+	err = request_firmware(&firmware, "BT3CPCC.bin", &handle_to_dev(handle));
 	if (err < 0) {
 		BT_ERR("Firmware request failed");
 		goto error;

  reply	other threads:[~2006-01-04 11:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-07 11:29 [Bluez-users] BT3C_CS broken in kernel 2.6.14? Antti Mäkelä
2005-11-07 13:43 ` Marcel Holtmann
2006-01-04 11:22   ` [Bluez-users] Re: BT3C_CS broken in kernel 2.6.14? [Also with 2.6.15] Antti Mäkelä
2006-01-04 11:43     ` Marcel Holtmann
2006-01-04 11:57       ` Marcel Holtmann [this message]
2006-01-04 13:09         ` Antti Mäkelä

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=1136375857.13931.23.camel@localhost \
    --to=marcel@holtmann.org \
    --cc=bluez-users@lists.sourceforge.net \
    /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