Skip to contentSkip to conversation

Microsoft IntelliMouse with kernel 2.6.18 and patch-2.6.18-mh1 is broken (fix provided)

Bluez-users Andrey Jivsov 2 participants 5 messages Sep 27, 2006 – Sep 29, 2006

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

Here is my report on successfully configuring IntellMiouse. Also it's a bug report on latest bluez patch that breaks this mouse.

Microsoft IntelliMouse Explorer for Bluetooth had decent support in older version of kernel patch, I believe patch-2.6.15-mh2. I could use scroll wheel and additional buttons. The only issues that I could not solve satisfactory were smooth activation from sleep, on boot, and after a timeout. "Smooth" means without reseting the mouse every time by pressing small button on its bottom.

I decided to give a try to the latest kernel 2.6.18 with Fedora Core 5 and patch-2.6.18-mh1 with latest bluez tools. The start appeared
promising: unpatched kernel 2.6.18 with FC5 and bluez 2.25 enables IntelliMouse via Boot protocol with the resumption from sleep working! This is an improvement from earlier versions. This doesn't bring the closure, though, because the boot protocol lacks the support for scroll wheel and additional buttons.

I upgraded to bluez 3.5 but this didn't make any difference. I then patched the kernel with patch-2.6.18-mh1. This killed the mouse: the cursor would not move.

I finally was able to solve the problem by using the previous patch-2.6.15-mh2 against the 2.6.18 kernel with minor cleanup. The patch is here:

    http://www.brainhub.org/patch-2.6.18-mh1aj.bz2

Note that it will produce a few harmless warnings.

The above steps result in fully functional IntelliMouse.

Here is the rest of steps needed to fix the resumption from the sleep.

* set this in the rc.local:

/usr/local/sbin/hcid
/usr/local/bin/hidd -t 10 --connect 00:50:F2:E8:E0:71 --server /usr/local/sbin/hciconfig hci0 down
usleep 500000
/usr/local/sbin/hciconfig hci0 up

* Set this in the "sleep script":
before sleep:
/usr/local/bin/hidd --killall
echo disable > /proc/acpi/ibm/bluetooth
/sbin/rmmod hci_usb

after sleep:
/sbin/modprobe hci_usb
echo enable > /proc/acpi/ibm/bluetooth

Sleep steps above may not be needed at all with your hardware and distribution.

Many people suggested to use "hidd --connect 00:50:F2:E8:E0:71" alone. It never work for me. Seems like hciconfig hci0 down/up made the difference.

I hope this helps.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

maintainer
#1 lore raw

Hi Andrey,

Quoted 19 lines

Microsoft IntelliMouse Explorer for Bluetooth had decent support in older version of kernel patch, I believe patch-2.6.15-mh2. I could use scroll wheel and additional buttons. The only issues that I could not solve satisfactory were smooth activation from sleep, on boot, and after a timeout. "Smooth" means without reseting the mouse every time by pressing small button on its bottom.

I decided to give a try to the latest kernel 2.6.18 with Fedora Core 5 and patch-2.6.18-mh1 with latest bluez tools. The start appeared
promising: unpatched kernel 2.6.18 with FC5 and bluez 2.25 enables IntelliMouse via Boot protocol with the resumption from sleep working! This is an improvement from earlier versions. This doesn't bring the closure, though, because the boot protocol lacks the support for scroll wheel and additional buttons.

I upgraded to bluez 3.5 but this didn't make any difference. I then patched the kernel with patch-2.6.18-mh1. This killed the mouse: the cursor would not move.

Quoted 7 lines

I finally was able to solve the problem by using the previous patch-2.6.15-mh2 against the 2.6.18 kernel with minor cleanup. The patch is here:

    http://www.brainhub.org/patch-2.6.18-mh1aj.bz2

Note that it will produce a few harmless warnings.

can you send your changes against a recent 2.6.18-mhX kernel. Sending the whole patch doesn't help to identify the problem.

Regards

Marcel

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

#2 lore raw

Re: [Bluez-users] Microsoft IntelliMouse with kernel 2.6.1 and patch-2.6.18-mh1 is broken (fix provided)

Hi Marcel, here is the patch against linux-2.6.18-mh1 to fix IntelliMouse. That's the best range of changes I have time to provide: somewhere in these changes IntelliMouse was broken. I believe this happened between patch-2.6.15-mh2 and linux-2.6.18-mh1. While there are a lot of changes in these 17 files, but most of them are variable renames. I hope this helps you to narrow down the issue.

[ Does sending compressed patched works? Trying uncompressed first. ]

drivers/bluetooth/bfusb.c +160 -162
diff -ur --exclude-from=kernel-diff-exclude.txt linux-2.6.18-mh1/drivers/bluetooth/bfusb.c linux-2.6.18-my-bt/drivers/bluetooth/bfusb.c
@@ -2,7 +2,7 @@
  *
  *  AVM BlueFRITZ! USB driver
  *
- *  Copyright (C) 2003-2006  Marcel Holtmann <[email protected]>
+ *  Copyright (C) 2003  Marcel Holtmann <[email protected]>
  *
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -59,6 +59,7 @@
 
 MODULE_DEVICE_TABLE(usb, bfusb_table);
 
+
 #define BFUSB_MAX_BLOCK_SIZE	256
 
 #define BFUSB_BLOCK_TIMEOUT	3000
@@ -69,7 +70,7 @@
 #define BFUSB_MAX_BULK_TX	2
 #define BFUSB_MAX_BULK_RX	2
 
-struct bfusb_data {
+struct bfusb {
 	struct hci_dev		*hdev;
 
 	unsigned long		state;
@@ -91,136 +92,137 @@
 	struct sk_buff_head	completed_q;
 };
 
-struct bfusb_data_scb {
+struct bfusb_scb {
 	struct urb *urb;
 };
 
 static void bfusb_tx_complete(struct urb *urb, struct pt_regs *regs);
 static void bfusb_rx_complete(struct urb *urb, struct pt_regs *regs);
 
-static struct urb *bfusb_get_completed(struct bfusb_data *data)
+static struct urb *bfusb_get_completed(struct bfusb *bfusb)
 {
 	struct sk_buff *skb;
 	struct urb *urb = NULL;
 
-	BT_DBG("bfusb %p", data);
+	BT_DBG("bfusb %p", bfusb);
 
-	skb = skb_dequeue(&data->completed_q);
+	skb = skb_dequeue(&bfusb->completed_q);
 	if (skb) {
-		urb = ((struct bfusb_data_scb *) skb->cb)->urb;
+		urb = ((struct bfusb_scb *) skb->cb)->urb;
 		kfree_skb(skb);
 	}
 
 	return urb;
 }
 
-static void bfusb_unlink_urbs(struct bfusb_data *data)
+static void bfusb_unlink_urbs(struct bfusb *bfusb)
 {
 	struct sk_buff *skb;
 	struct urb *urb;
 
-	BT_DBG("bfusb %p", data);
+	BT_DBG("bfusb %p", bfusb);
 
-	while ((skb = skb_dequeue(&data->pending_q))) {
-		urb = ((struct bfusb_data_scb *) skb->cb)->urb;
+	while ((skb = skb_dequeue(&bfusb->pending_q))) {
+		urb = ((struct bfusb_scb *) skb->cb)->urb;
 		usb_kill_urb(urb);
-		skb_queue_tail(&data->completed_q, skb);
+		skb_queue_tail(&bfusb->completed_q, skb);
 	}
 
-	while ((urb = bfusb_get_completed(data)))
+	while ((urb = bfusb_get_completed(bfusb)))
 		usb_free_urb(urb);
 }
 
-static int bfusb_send_bulk(struct bfusb_data *data, struct sk_buff *skb)
+
+static int bfusb_send_bulk(struct bfusb *bfusb, struct sk_buff *skb)
 {
-	struct bfusb_data_scb *scb = (void *) skb->cb;
-	struct urb *urb = bfusb_get_completed(data);
+	struct bfusb_scb *scb = (void *) skb->cb;
+	struct urb *urb = bfusb_get_completed(bfusb);
 	int err, pipe;
 
-	BT_DBG("bfusb %p skb %p len %d", data, skb, skb->len);
+	BT_DBG("bfusb %p skb %p len %d", bfusb, skb, skb->len);
 
 	if (!urb && !(urb = usb_alloc_urb(0, GFP_ATOMIC)))
 		return -ENOMEM;
 
-	pipe = usb_sndbulkpipe(data->udev, data->bulk_out_ep);
+	pipe = usb_sndbulkpipe(bfusb->udev, bfusb->bulk_out_ep);
 
-	usb_fill_bulk_urb(urb, data->udev, pipe, skb->data, skb->len,
+	usb_fill_bulk_urb(urb, bfusb->udev, pipe, skb->data, skb->len,
 			bfusb_tx_complete, skb);
 
 	scb->urb = urb;
 
-	skb_queue_tail(&data->pending_q, skb);
+	skb_queue_tail(&bfusb->pending_q, skb);
 
 	err = usb_submit_urb(urb, GFP_ATOMIC);
 	if (err) {
 		BT_ERR("%s bulk tx submit failed urb %p err %d", 
-					data->hdev->name, urb, err);
-		skb_unlink(skb, &data->pending_q);
+					bfusb->hdev->name, urb, err);
+		skb_unlink(skb, &bfusb->pending_q);
 		usb_free_urb(urb);
 	} else
-		atomic_inc(&data->pending_tx);
+		atomic_inc(&bfusb->pending_tx);
 
 	return err;
 }
 
-static void bfusb_tx_wakeup(struct bfusb_data *data)
+static void bfusb_tx_wakeup(struct bfusb *bfusb)
 {
 	struct sk_buff *skb;
 
-	BT_DBG("bfusb %p", data);
+	BT_DBG("bfusb %p", bfusb);
 
-	if (test_and_set_bit(BFUSB_TX_PROCESS, &data->state)) {
-		set_bit(BFUSB_TX_WAKEUP, &data->state);
+	if (test_and_set_bit(BFUSB_TX_PROCESS, &bfusb->state)) {
+		set_bit(BFUSB_TX_WAKEUP, &bfusb->state);
 		return;
 	}
 
 	do {
-		clear_bit(BFUSB_TX_WAKEUP, &data->state);
+		clear_bit(BFUSB_TX_WAKEUP, &bfusb->state);
 
-		while ((atomic_read(&data->pending_tx) < BFUSB_MAX_BULK_TX) &&
-				(skb = skb_dequeue(&data->transmit_q))) {
-			if (bfusb_send_bulk(data, skb) < 0) {
-				skb_queue_head(&data->transmit_q, skb);
+		while ((atomic_read(&bfusb->pending_tx) < BFUSB_MAX_BULK_TX) &&
+				(skb = skb_dequeue(&bfusb->transmit_q))) {
+			if (bfusb_send_bulk(bfusb, skb) < 0) {
+				skb_queue_head(&bfusb->transmit_q, skb);
 				break;
 			}
 		}
 
-	} while (test_bit(BFUSB_TX_WAKEUP, &data->state));
+	} while (test_bit(BFUSB_TX_WAKEUP, &bfusb->state));
 
-	clear_bit(BFUSB_TX_PROCESS, &data->state);
+	clear_bit(BFUSB_TX_PROCESS, &bfusb->state);
 }
 
 static void bfusb_tx_complete(struct urb *urb, struct pt_regs *regs)
 {
 	struct sk_buff *skb = (struct sk_buff *) urb->context;
-	struct bfusb_data *data = (struct bfusb_data *) skb->dev;
+	struct bfusb *bfusb = (struct bfusb *) skb->dev;
 
-	BT_DBG("bfusb %p urb %p skb %p len %d", data, urb, skb, skb->len);
+	BT_DBG("bfusb %p urb %p skb %p len %d", bfusb, urb, skb, skb->len);
 
-	atomic_dec(&data->pending_tx);
+	atomic_dec(&bfusb->pending_tx);
 
-	if (!test_bit(HCI_RUNNING, &data->hdev->flags))
+	if (!test_bit(HCI_RUNNING, &bfusb->hdev->flags))
 		return;
 
 	if (!urb->status)
-		data->hdev->stat.byte_tx += skb->len;
+		bfusb->hdev->stat.byte_tx += skb->len;
 	else
-		data->hdev->stat.err_tx++;
+		bfusb->hdev->stat.err_tx++;
 
-	read_lock(&data->lock);
+	read_lock(&bfusb->lock);
 
-	skb_unlink(skb, &data->pending_q);
-	skb_queue_tail(&data->completed_q, skb);
+	skb_unlink(skb, &bfusb->pending_q);
+	skb_queue_tail(&bfusb->completed_q, skb);
 
-	bfusb_tx_wakeup(data);
+	bfusb_tx_wakeup(bfusb);
 
-	read_unlock(&data->lock);
+	read_unlock(&bfusb->lock);
 }
 
 
-static int bfusb_rx_submit(struct bfusb_data *data, struct urb *urb)
+static int bfusb_rx_submit(struct bfusb *bfusb, struct urb *urb)
 {
-	struct bfusb_data_scb *scb;
+	struct bfusb_scb *scb;
 	struct sk_buff *skb;
 	int err, pipe, size = HCI_MAX_FRAME_SIZE + 32;
 
@@ -229,29 +231,28 @@
 	if (!urb && !(urb = usb_alloc_urb(0, GFP_ATOMIC)))
 		return -ENOMEM;
 
-	skb = bt_skb_alloc(size, GFP_ATOMIC);
-	if (!skb) {
+	if (!(skb = bt_skb_alloc(size, GFP_ATOMIC))) {
 		usb_free_urb(urb);
 		return -ENOMEM;
 	}
 
-	skb->dev = (void *) data;
+	skb->dev = (void *) bfusb;
 
-	scb = (struct bfusb_data_scb *) skb->cb;
+	scb = (struct bfusb_scb *) skb->cb;
 	scb->urb = urb;
 
-	pipe = usb_rcvbulkpipe(data->udev, data->bulk_in_ep);
+	pipe = usb_rcvbulkpipe(bfusb->udev, bfusb->bulk_in_ep);
 
-	usb_fill_bulk_urb(urb, data->udev, pipe, skb->data, size,
+	usb_fill_bulk_urb(urb, bfusb->udev, pipe, skb->data, size,
 			bfusb_rx_complete, skb);
 
-	skb_queue_tail(&data->pending_q, skb);
+	skb_queue_tail(&bfusb->pending_q, skb);
 
 	err = usb_submit_urb(urb, GFP_ATOMIC);
 	if (err) {
 		BT_ERR("%s bulk rx submit failed urb %p err %d",
-					data->hdev->name, urb, err);
-		skb_unlink(skb, &data->pending_q);
+					bfusb->hdev->name, urb, err);
+		skb_unlink(skb, &bfusb->pending_q);
 		kfree_skb(skb);
 		usb_free_urb(urb);
 	}
@@ -259,15 +260,15 @@
 	return err;
 }
 
-static inline int bfusb_recv_block(struct bfusb_data *data, int hdr, unsigned char *buf, int len)
+static inline int bfusb_recv_block(struct bfusb *bfusb, int hdr, unsigned char *data, int len)
 {
-	BT_DBG("bfusb %p hdr 0x%02x data %p len %d", data, hdr, buf, len);
+	BT_DBG("bfusb %p hdr 0x%02x data %p len %d", bfusb, hdr, data, len);
 
 	if (hdr & 0x10) {
-		BT_ERR("%s error in block", data->hdev->name);
-		if (data->reassembly)
-			kfree_skb(data->reassembly);
-		data->reassembly = NULL;
+		BT_ERR("%s error in block", bfusb->hdev->name);
+		if (bfusb->reassembly)
+			kfree_skb(bfusb->reassembly);
+		bfusb->reassembly = NULL;
 		return -EIO;
 	}
 
@@ -276,46 +277,46 @@
 		unsigned char pkt_type;
 		int pkt_len = 0;
 
-		if (data->reassembly) {
-			BT_ERR("%s unexpected start block", data->hdev->name);
-			kfree_skb(data->reassembly);
-			data->reassembly = NULL;
+		if (bfusb->reassembly) {
+			BT_ERR("%s unexpected start block", bfusb->hdev->name);
+			kfree_skb(bfusb->reassembly);
+			bfusb->reassembly = NULL;
 		}
 
 		if (len < 1) {
-			BT_ERR("%s no packet type found", data->hdev->name);
+			BT_ERR("%s no packet type found", bfusb->hdev->name);
 			return -EPROTO;
 		}
 
-		pkt_type = *buf++; len--;
+		pkt_type = *data++; len--;
 
 		switch (pkt_type) {
 		case HCI_EVENT_PKT:
 			if (len >= HCI_EVENT_HDR_SIZE) {
-				struct hci_event_hdr *hdr = (struct hci_event_hdr *) buf;
+				struct hci_event_hdr *hdr = (struct hci_event_hdr *) data;
 				pkt_len = HCI_EVENT_HDR_SIZE + hdr->plen;
 			} else {
-				BT_ERR("%s event block is too short", data->hdev->name);
+				BT_ERR("%s event block is too short", bfusb->hdev->name);
 				return -EILSEQ;
 			}
 			break;
 
 		case HCI_ACLDATA_PKT:
 			if (len >= HCI_ACL_HDR_SIZE) {
-				struct hci_acl_hdr *hdr = (struct hci_acl_hdr *) buf;
+				struct hci_acl_hdr *hdr = (struct hci_acl_hdr *) data;
 				pkt_len = HCI_ACL_HDR_SIZE + __le16_to_cpu(hdr->dlen);
 			} else {
-				BT_ERR("%s data block is too short", data->hdev->name);
+				BT_ERR("%s data block is too short", bfusb->hdev->name);
 				return -EILSEQ;
 			}
 			break;
 
 		case HCI_SCODATA_PKT:
 			if (len >= HCI_SCO_HDR_SIZE) {
-				struct hci_sco_hdr *hdr = (struct hci_sco_hdr *) buf;
+				struct hci_sco_hdr *hdr = (struct hci_sco_hdr *) data;
 				pkt_len = HCI_SCO_HDR_SIZE + hdr->dlen;
 			} else {
-				BT_ERR("%s audio block is too short", data->hdev->name);
+				BT_ERR("%s audio block is too short", bfusb->hdev->name);
 				return -EILSEQ;
 			}
 			break;
@@ -323,27 +324,27 @@
 
 		skb = bt_skb_alloc(pkt_len, GFP_ATOMIC);
 		if (!skb) {
-			BT_ERR("%s no memory for the packet", data->hdev->name);
+			BT_ERR("%s no memory for the packet", bfusb->hdev->name);
 			return -ENOMEM;
 		}
 
-		skb->dev = (void *) data->hdev;
+		skb->dev = (void *) bfusb->hdev;
 		bt_cb(skb)->pkt_type = pkt_type;
 
-		data->reassembly = skb;
+		bfusb->reassembly = skb;
 	} else {
-		if (!data->reassembly) {
-			BT_ERR("%s unexpected continuation block", data->hdev->name);
+		if (!bfusb->reassembly) {
+			BT_ERR("%s unexpected continuation block", bfusb->hdev->name);
 			return -EIO;
 		}
 	}
 
 	if (len > 0)
-		memcpy(skb_put(data->reassembly, len), buf, len);
+		memcpy(skb_put(bfusb->reassembly, len), data, len);
 
 	if (hdr & 0x08) {
-		hci_recv_frame(data->reassembly);
-		data->reassembly = NULL;
+		hci_recv_frame(bfusb->reassembly);
+		bfusb->reassembly = NULL;
 	}
 
 	return 0;
@@ -352,22 +353,22 @@
 static void bfusb_rx_complete(struct urb *urb, struct pt_regs *regs)
 {
 	struct sk_buff *skb = (struct sk_buff *) urb->context;
-	struct bfusb_data *data = (struct bfusb_data *) skb->dev;
+	struct bfusb *bfusb = (struct bfusb *) skb->dev;
 	unsigned char *buf = urb->transfer_buffer;
 	int count = urb->actual_length;
 	int err, hdr, len;
 
 	BT_DBG("bfusb %p urb %p skb %p len %d", bfusb, urb, skb, skb->len);
 
-	read_lock(&data->lock);
+	read_lock(&bfusb->lock);
 
-	if (!test_bit(HCI_RUNNING, &data->hdev->flags))
+	if (!test_bit(HCI_RUNNING, &bfusb->hdev->flags))
 		goto unlock;
 
 	if (urb->status || !count)
 		goto resubmit;
 
-	data->hdev->stat.byte_rx += count;
+	bfusb->hdev->stat.byte_rx += count;
 
 	skb_put(skb, count);
 
@@ -386,89 +387,90 @@
 
 		if (count < len) {
 			BT_ERR("%s block extends over URB buffer ranges",
-					data->hdev->name);
+					bfusb->hdev->name);
 		}
 
 		if ((hdr & 0xe1) == 0xc1)
-			bfusb_recv_block(data, hdr, buf, len);
+			bfusb_recv_block(bfusb, hdr, buf, len);
 
 		count -= len;
 		buf   += len;
 	}
 
-	skb_unlink(skb, &data->pending_q);
+	skb_unlink(skb, &bfusb->pending_q);
 	kfree_skb(skb);
 
-	bfusb_rx_submit(data, urb);
+	bfusb_rx_submit(bfusb, urb);
 
-	read_unlock(&data->lock);
+	read_unlock(&bfusb->lock);
 
 	return;
 
 resubmit:
-	urb->dev = data->udev;
+	urb->dev = bfusb->udev;
 
 	err = usb_submit_urb(urb, GFP_ATOMIC);
 	if (err) {
 		BT_ERR("%s bulk resubmit failed urb %p err %d",
-					data->hdev->name, urb, err);
+					bfusb->hdev->name, urb, err);
 	}
 
 unlock:
-	read_unlock(&data->lock);
+	read_unlock(&bfusb->lock);
 }
 
+
 static int bfusb_open(struct hci_dev *hdev)
 {
-	struct bfusb_data *data = hdev->driver_data;
+	struct bfusb *bfusb = (struct bfusb *) hdev->driver_data;
 	unsigned long flags;
 	int i, err;
 
-	BT_DBG("hdev %p bfusb %p", hdev, data);
+	BT_DBG("hdev %p bfusb %p", hdev, bfusb);
 
 	if (test_and_set_bit(HCI_RUNNING, &hdev->flags))
 		return 0;
 
-	write_lock_irqsave(&data->lock, flags);
+	write_lock_irqsave(&bfusb->lock, flags);
 
-	err = bfusb_rx_submit(data, NULL);
+	err = bfusb_rx_submit(bfusb, NULL);
 	if (!err) {
 		for (i = 1; i < BFUSB_MAX_BULK_RX; i++)
-			bfusb_rx_submit(data, NULL);
+			bfusb_rx_submit(bfusb, NULL);
 	} else {
 		clear_bit(HCI_RUNNING, &hdev->flags);
 	}
 
-	write_unlock_irqrestore(&data->lock, flags);
+	write_unlock_irqrestore(&bfusb->lock, flags);
 
 	return err;
 }
 
 static int bfusb_flush(struct hci_dev *hdev)
 {
-	struct bfusb_data *data = hdev->driver_data;
+	struct bfusb *bfusb = (struct bfusb *) hdev->driver_data;
 
-	BT_DBG("hdev %p bfusb %p", hdev, data);
+	BT_DBG("hdev %p bfusb %p", hdev, bfusb);
 
-	skb_queue_purge(&data->transmit_q);
+	skb_queue_purge(&bfusb->transmit_q);
 
 	return 0;
 }
 
 static int bfusb_close(struct hci_dev *hdev)
 {
-	struct bfusb_data *data = hdev->driver_data;
+	struct bfusb *bfusb = (struct bfusb *) hdev->driver_data;
 	unsigned long flags;
 
-	BT_DBG("hdev %p bfusb %p", hdev, data);
+	BT_DBG("hdev %p bfusb %p", hdev, bfusb);
 
 	if (!test_and_clear_bit(HCI_RUNNING, &hdev->flags))
 		return 0;
 
-	write_lock_irqsave(&data->lock, flags);
-	write_unlock_irqrestore(&data->lock, flags);
+	write_lock_irqsave(&bfusb->lock, flags);
+	write_unlock_irqrestore(&bfusb->lock, flags);
 
-	bfusb_unlink_urbs(data);
+	bfusb_unlink_urbs(bfusb);
 	bfusb_flush(hdev);
 
 	return 0;
@@ -477,7 +479,7 @@
 static int bfusb_send_frame(struct sk_buff *skb)
 {
 	struct hci_dev *hdev = (struct hci_dev *) skb->dev;
-	struct bfusb_data *data;
+	struct bfusb *bfusb;
 	struct sk_buff *nskb;
 	unsigned char buf[3];
 	int sent = 0, size, count;
@@ -492,7 +494,7 @@
 	if (!test_bit(HCI_RUNNING, &hdev->flags))
 		return -EBUSY;
 
-	data = hdev->driver_data;
+	bfusb = (struct bfusb *) hdev->driver_data;
 
 	switch (bt_cb(skb)->pkt_type) {
 	case HCI_COMMAND_PKT:
@@ -512,13 +514,12 @@
 	count = skb->len;
 
 	/* Max HCI frame size seems to be 1511 + 1 */
-	nskb = bt_skb_alloc(count + 32, GFP_ATOMIC);
-	if (!nskb) {
+	if (!(nskb = bt_skb_alloc(count + 32, GFP_ATOMIC))) {
 		BT_ERR("Can't allocate memory for new packet");
 		return -ENOMEM;
 	}
 
-	nskb->dev = (void *) data;
+	nskb->dev = (void *) bfusb;
 
 	while (count) {
 		size = min_t(uint, count, BFUSB_MAX_BLOCK_SIZE);
@@ -535,18 +536,18 @@
 	}
 
 	/* Don't send frame with multiple size of bulk max packet */
-	if ((nskb->len % data->bulk_pkt_size) == 0) {
+	if ((nskb->len % bfusb->bulk_pkt_size) == 0) {
 		buf[0] = 0xdd;
 		buf[1] = 0x00;
 		memcpy(skb_put(nskb, 2), buf, 2);
 	}
 
-	read_lock(&data->lock);
+	read_lock(&bfusb->lock);
 
-	skb_queue_tail(&data->transmit_q, nskb);
-	bfusb_tx_wakeup(data);
+	skb_queue_tail(&bfusb->transmit_q, nskb);
+	bfusb_tx_wakeup(bfusb);
 
-	read_unlock(&data->lock);
+	read_unlock(&bfusb->lock);
 
 	kfree_skb(skb);
 
@@ -555,11 +556,11 @@
 
 static void bfusb_destruct(struct hci_dev *hdev)
 {
-	struct bfusb_data *data = hdev->driver_data;
+	struct bfusb *bfusb = (struct bfusb *) hdev->driver_data;
 
-	BT_DBG("hdev %p bfusb %p", hdev, data);
+	BT_DBG("hdev %p bfusb %p", hdev, bfusb);
 
-	kfree(data);
+	kfree(bfusb);
 }
 
 static int bfusb_ioctl(struct hci_dev *hdev, unsigned int cmd, unsigned long arg)
@@ -567,24 +568,25 @@
 	return -ENOIOCTLCMD;
 }
 
-static int bfusb_load_firmware(struct bfusb_data *data, unsigned char *firmware, int count)
+
+static int bfusb_load_firmware(struct bfusb *bfusb, unsigned char *firmware, int count)
 {
 	unsigned char *buf;
 	int err, pipe, len, size, sent = 0;
 
-	BT_DBG("bfusb %p udev %p", data, data->udev);
+	BT_DBG("bfusb %p udev %p", bfusb, bfusb->udev);
 
 	BT_INFO("BlueFRITZ! USB loading firmware");
 
-	pipe = usb_sndctrlpipe(data->udev, 0);
+	pipe = usb_sndctrlpipe(bfusb->udev, 0);
 
-	if (usb_control_msg(data->udev, pipe, USB_REQ_SET_CONFIGURATION,
+	if (usb_control_msg(bfusb->udev, pipe, USB_REQ_SET_CONFIGURATION,
 				0, 1, 0, NULL, 0, USB_CTRL_SET_TIMEOUT) < 0) {
 		BT_ERR("Can't change to loading configuration");
 		return -EBUSY;
 	}
 
-	data->udev->toggle[0] = data->udev->toggle[1] = 0;
+	bfusb->udev->toggle[0] = bfusb->udev->toggle[1] = 0;
 
 	buf = kmalloc(BFUSB_MAX_BLOCK_SIZE + 3, GFP_ATOMIC);
 	if (!buf) {
@@ -592,14 +594,14 @@
 		return -ENOMEM;
 	}
 
-	pipe = usb_sndbulkpipe(data->udev, data->bulk_out_ep);
+	pipe = usb_sndbulkpipe(bfusb->udev, bfusb->bulk_out_ep);
 
 	while (count) {
 		size = min_t(uint, count, BFUSB_MAX_BLOCK_SIZE + 3);
 
 		memcpy(buf, firmware + sent, size);
 
-		err = usb_bulk_msg(data->udev, pipe, buf, size,
+		err = usb_bulk_msg(bfusb->udev, pipe, buf, size,
 					&len, BFUSB_BLOCK_TIMEOUT);
 
 		if (err || (len != size)) {
@@ -611,23 +613,21 @@
 		count -= size;
 	}
 
-	err = usb_bulk_msg(data->udev, pipe, NULL, 0,
-					&len, BFUSB_BLOCK_TIMEOUT);
-	if (err < 0) {
+	if ((err = usb_bulk_msg(bfusb->udev, pipe, NULL, 0,
+				&len, BFUSB_BLOCK_TIMEOUT)) < 0) {
 		BT_ERR("Error in null packet request");
 		goto error;
 	}
 
-	pipe = usb_sndctrlpipe(data->udev, 0);
+	pipe = usb_sndctrlpipe(bfusb->udev, 0);
 
-	err = usb_control_msg(data->udev, pipe, USB_REQ_SET_CONFIGURATION,
-				0, 2, 0, NULL, 0, USB_CTRL_SET_TIMEOUT);
-	if (err < 0) {
+        if ((err = usb_control_msg(bfusb->udev, pipe, USB_REQ_SET_CONFIGURATION,
+				0, 2, 0, NULL, 0, USB_CTRL_SET_TIMEOUT)) < 0) {
 		BT_ERR("Can't change to running configuration");
 		goto error;
 	}
 
-	data->udev->toggle[0] = data->udev->toggle[1] = 0;
+	bfusb->udev->toggle[0] = bfusb->udev->toggle[1] = 0;
 
 	BT_INFO("BlueFRITZ! USB device ready");
 
@@ -637,9 +637,9 @@
 error:
 	kfree(buf);
 
-	pipe = usb_sndctrlpipe(data->udev, 0);
+	pipe = usb_sndctrlpipe(bfusb->udev, 0);
 
-	usb_control_msg(data->udev, pipe, USB_REQ_SET_CONFIGURATION,
+	usb_control_msg(bfusb->udev, pipe, USB_REQ_SET_CONFIGURATION,
 				0, 0, 0, NULL, 0, USB_CTRL_SET_TIMEOUT);
 
 	return err;
@@ -652,7 +652,7 @@
 	struct usb_host_endpoint *bulk_out_ep;
 	struct usb_host_endpoint *bulk_in_ep;
 	struct hci_dev *hdev;
-	struct bfusb_data *data;
+	struct bfusb *bfusb;
 
 	BT_DBG("intf %p id %p", intf, id);
 
@@ -672,24 +672,23 @@
 	}
 
 	/* Initialize control structure and load firmware */
-	data = kzalloc(sizeof(struct bfusb_data), GFP_KERNEL);
-	if (!data) {
+	if (!(bfusb = kzalloc(sizeof(struct bfusb), GFP_KERNEL))) {
 		BT_ERR("Can't allocate memory for control structure");
 		goto done;
 	}
 
-	data->udev = udev;
-	data->bulk_in_ep    = bulk_in_ep->desc.bEndpointAddress;
-	data->bulk_out_ep   = bulk_out_ep->desc.bEndpointAddress;
-	data->bulk_pkt_size = le16_to_cpu(bulk_out_ep->desc.wMaxPacketSize);
-
-	rwlock_init(&data->lock);
-
-	data->reassembly = NULL;
-
-	skb_queue_head_init(&data->transmit_q);
-	skb_queue_head_init(&data->pending_q);
-	skb_queue_head_init(&data->completed_q);
+	bfusb->udev = udev;
+	bfusb->bulk_in_ep    = bulk_in_ep->desc.bEndpointAddress;
+	bfusb->bulk_out_ep   = bulk_out_ep->desc.bEndpointAddress;
+	bfusb->bulk_pkt_size = le16_to_cpu(bulk_out_ep->desc.wMaxPacketSize);
+
+	rwlock_init(&bfusb->lock);
+
+	bfusb->reassembly = NULL;
+
+	skb_queue_head_init(&bfusb->transmit_q);
+	skb_queue_head_init(&bfusb->pending_q);
+	skb_queue_head_init(&bfusb->completed_q);
 
 	if (request_firmware(&firmware, "bfubase.frm", &udev->dev) < 0) {
 		BT_ERR("Firmware request failed");
@@ -698,7 +697,7 @@
 
 	BT_DBG("firmware data %p size %d", firmware->data, firmware->size);
 
-	if (bfusb_load_firmware(data, firmware->data, firmware->size) < 0) {
+	if (bfusb_load_firmware(bfusb, firmware->data, firmware->size) < 0) {
 		BT_ERR("Firmware loading failed");
 		goto release;
 	}
@@ -712,10 +711,10 @@
 		goto error;
 	}
 
-	data->hdev = hdev;
+	bfusb->hdev = hdev;
 
 	hdev->type = HCI_USB;
-	hdev->driver_data = data;
+	hdev->driver_data = bfusb;
 	SET_HCIDEV_DEV(hdev, &intf->dev);
 
 	hdev->open     = bfusb_open;
@@ -733,7 +732,7 @@
 		goto error;
 	}
 
-	usb_set_intfdata(intf, data);
+	usb_set_intfdata(intf, bfusb);
 
 	return 0;
 
@@ -741,7 +740,7 @@
 	release_firmware(firmware);
 
 error:
-	kfree(data);
+	kfree(bfusb);
 
 done:
 	return -EIO;
@@ -749,8 +748,8 @@
 
 static void bfusb_disconnect(struct usb_interface *intf)
 {
-	struct bfusb_data *data = usb_get_intfdata(intf);
-	struct hci_dev *hdev = data->hdev;
+	struct bfusb *bfusb = usb_get_intfdata(intf);
+	struct hci_dev *hdev = bfusb->hdev;
 
 	BT_DBG("intf %p", intf);
 
@@ -780,8 +779,7 @@
 
 	BT_INFO("BlueFRITZ! USB driver ver %s", VERSION);
 
-	err = usb_register(&bfusb_driver);
-	if (err < 0)
+	if ((err = usb_register(&bfusb_driver)) < 0)
 		BT_ERR("Failed to register BlueFRITZ! USB driver");
 
 	return err;
drivers/bluetooth/hci_ldisc.c +8 -5
diff -ur --exclude-from=kernel-diff-exclude.txt linux-2.6.18-mh1/drivers/bluetooth/hci_ldisc.c linux-2.6.18-my-bt/drivers/bluetooth/hci_ldisc.c
@@ -241,11 +241,15 @@
 
 static void hci_uart_destruct(struct hci_dev *hdev)
 {
+	struct hci_uart *hu;
+
 	if (!hdev)
 		return;
 
 	BT_DBG("%s", hdev->name);
-	kfree(hdev->driver_data);
+
+	hu = (struct hci_uart *) hdev->driver_data;
+	kfree(hu);
 }
 
 /* ------ LDISC part ------ */
@@ -268,7 +272,7 @@
 		return -EEXIST;
 
 	if (!(hu = kzalloc(sizeof(struct hci_uart), GFP_KERNEL))) {
-		BT_ERR("Can't allocate control structure");
+		BT_ERR("Can't allocate controll structure");
 		return -ENFILE;
 	}
 
@@ -356,7 +360,7 @@
  *     
  * Return Value:    None
  */
-static void hci_uart_tty_receive(struct tty_struct *tty, const u8 *data, char *flags, int count)
+static void hci_uart_tty_receive(struct tty_struct *tty, const __u8 *data, char *flags, int count)
 {
 	struct hci_uart *hu = (void *)tty->disc_data;
 
@@ -371,8 +375,7 @@
 	hu->hdev->stat.byte_rx += count;
 	spin_unlock(&hu->rx_lock);
 
-	if (test_and_clear_bit(TTY_THROTTLED, &tty->flags) &&
-					tty->driver->unthrottle)
+	if (test_and_clear_bit(TTY_THROTTLED,&tty->flags) && tty->driver->unthrottle)
 		tty->driver->unthrottle(tty);
 }
 
drivers/bluetooth/hci_usb.c +0 -3
diff -ur --exclude-from=kernel-diff-exclude.txt linux-2.6.18-mh1/drivers/bluetooth/hci_usb.c linux-2.6.18-my-bt/drivers/bluetooth/hci_usb.c
@@ -96,9 +96,6 @@
 	/* Ericsson with non-standard id */
 	{ USB_DEVICE(0x0bdb, 0x1002) },
 
-	/* Canyon CN-BTU1 with HID interfaces */
-	{ USB_DEVICE(0x0c10, 0x0000), .driver_info = HCI_RESET },
-
 	{ }	/* Terminating entry */
 };
 
drivers/bluetooth/hci_vhci.c +49 -50

263 lines not on this page · raw message

include/net/bluetooth/hci_core.h +0 -6
diff -ur --exclude-from=kernel-diff-exclude.txt linux-2.6.18-mh1/include/net/bluetooth/hci_core.h linux-2.6.18-my-bt/include/net/bluetooth/hci_core.h
@@ -165,10 +165,6 @@
 	struct timer_list disc_timer;
 	struct timer_list idle_timer;
 
-	struct work_struct work;
-
-	struct device	dev;
-
 	struct hci_dev	*hdev;
 	void		*l2cap_data;
 	void		*sco_data;
@@ -416,8 +412,6 @@
 
 int hci_register_sysfs(struct hci_dev *hdev);
 void hci_unregister_sysfs(struct hci_dev *hdev);
-void hci_conn_add_sysfs(struct hci_conn *conn);
-void hci_conn_del_sysfs(struct hci_conn *conn);
 
 #define SET_HCIDEV_DEV(hdev, pdev) ((hdev)->parent = (pdev))
 
include/net/bluetooth/hci.h +1 -4
diff -ur --exclude-from=kernel-diff-exclude.txt linux-2.6.18-mh1/include/net/bluetooth/hci.h linux-2.6.18-my-bt/include/net/bluetooth/hci.h
@@ -44,13 +44,12 @@
 #define HCI_NOTIFY_VOICE_SETTING	3
 
 /* HCI device types */
-#define HCI_VIRTUAL	0
+#define HCI_VHCI	0
 #define HCI_USB		1
 #define HCI_PCCARD	2
 #define HCI_UART	3
 #define HCI_RS232	4
 #define HCI_PCI		5
-#define HCI_SDIO	6
 
 /* HCI device quirks */
 enum {
@@ -340,8 +339,6 @@
 
 #define OCF_INQUIRY_CANCEL	0x0002
 
-#define OCF_EXIT_PERIODIC_INQ	0x0004
-
 #define OCF_LINK_KEY_REPLY	0x000B
 struct hci_cp_link_key_reply {
 	bdaddr_t bdaddr;
include/net/bluetooth/l2cap.h +12 -128

206 lines not on this page · raw message

Makefile +1 -1
diff -ur --exclude-from=kernel-diff-exclude.txt linux-2.6.18-mh1/Makefile linux-2.6.18-my-bt/Makefile
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 6
 SUBLEVEL = 18
-EXTRAVERSION = -mh1
+EXTRAVERSION = -mh1aj
 NAME=Avast! A bilge rat!
 
 # *DOCUMENTATION*
net/bluetooth/bnep/bnep.h +14 -14
diff -ur --exclude-from=kernel-diff-exclude.txt linux-2.6.18-mh1/net/bluetooth/bnep/bnep.h linux-2.6.18-my-bt/net/bluetooth/bnep/bnep.h
@@ -86,29 +86,29 @@
 #define BNEP_EXT_HEADER	 0x80
 
 struct bnep_setup_conn_req {
-	__u8  type;
-	__u8  ctrl;
-	__u8  uuid_size;
-	__u8  service[0];
+	__u8   type;
+	__u8   ctrl;
+	__u8   uuid_size;
+	__u8   service[0];
 } __attribute__((packed));
 
 struct bnep_set_filter_req {
-	__u8  type;
-	__u8  ctrl;
-	__u16 len;
-	__u8  list[0];
+	__u8   type;
+	__u8   ctrl;
+	__le16 len;
+	__u8   list[0];
 } __attribute__((packed));
 
 struct bnep_control_rsp {
-	__u8  type;
-	__u8  ctrl;
-	__u16 resp;
+	__u8   type;
+	__u8   ctrl;
+	__le16 resp;
 } __attribute__((packed));
 
 struct bnep_ext_hdr {
-	__u8  type;
-	__u8  len;
-	__u8  data[0];
+	__u8   type;
+	__u8   len;
+	__u8   data[0];
 } __attribute__((packed));
 
 /* BNEP ioctl defines */
net/bluetooth/bnep/core.c +2 -24
diff -ur --exclude-from=kernel-diff-exclude.txt linux-2.6.18-mh1/net/bluetooth/bnep/core.c linux-2.6.18-my-bt/net/bluetooth/bnep/core.c
@@ -51,7 +51,6 @@
 #include <asm/unaligned.h>
 
 #include <net/bluetooth/bluetooth.h>
-#include <net/bluetooth/hci_core.h>
 #include <net/bluetooth/l2cap.h>
 
 #include "bnep.h"
@@ -516,26 +515,6 @@
 	return 0;
 }
 
-static struct device *bnep_get_device(struct bnep_session *session)
-{
-	bdaddr_t *src = &bt_sk(session->sock->sk)->src;
-	bdaddr_t *dst = &bt_sk(session->sock->sk)->dst;
-	struct hci_dev *hdev;
-	struct hci_conn *conn;
-
-	hdev = hci_get_route(dst, src);
-	if (!hdev)
-		return NULL;
-
-	conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, dst);
-	if (!conn)
-		return NULL;
-
-	hci_dev_put(hdev);
-
-	return &conn->dev;
-}
-
 int bnep_add_connection(struct bnep_connadd_req *req, struct socket *sock)
 {
 	struct net_device *dev;
@@ -555,6 +534,7 @@
 	if (!dev)
 		return -ENOMEM;
 
+
 	down_write(&bnep_session_sem);
 
 	ss = __bnep_get_session(dst);
@@ -571,7 +551,7 @@
 	memcpy(s->eh.h_source, &dst, ETH_ALEN);
 	memcpy(dev->dev_addr, s->eh.h_dest, ETH_ALEN);
 
-	s->dev   = dev;
+	s->dev = dev;
 	s->sock  = sock;
 	s->role  = req->role;
 	s->state = BT_CONNECTED;
@@ -588,8 +568,6 @@
 	bnep_set_default_proto_filter(s);
 #endif
 
-	SET_NETDEV_DEV(dev, bnep_get_device(s));
-
 	err = register_netdev(dev);
 	if (err) {
 		goto failed;
net/bluetooth/hci_conn.c +1 -7
diff -ur --exclude-from=kernel-diff-exclude.txt linux-2.6.18-mh1/net/bluetooth/hci_conn.c linux-2.6.18-my-bt/net/bluetooth/hci_conn.c
@@ -179,8 +179,6 @@
 	if (hdev->notify)
 		hdev->notify(hdev, HCI_NOTIFY_CONN_ADD);
 
-	hci_conn_add_sysfs(conn);
-
 	tasklet_enable(&hdev->tx_task);
 
 	return conn;
@@ -213,8 +211,6 @@
 
 	tasklet_disable(&hdev->tx_task);
 
-	hci_conn_del_sysfs(conn);
-
 	hci_conn_hash_del(hdev, conn);
 	if (hdev->notify)
 		hdev->notify(hdev, HCI_NOTIFY_CONN_DEL);
@@ -225,9 +221,7 @@
 
 	hci_dev_put(hdev);
 
-	/* will free via device release */
-	put_device(&conn->dev);
-
+	kfree(conn);
 	return 0;
 }
 
net/bluetooth/hci_core.c +1 -1
diff -ur --exclude-from=kernel-diff-exclude.txt linux-2.6.18-mh1/net/bluetooth/hci_core.c linux-2.6.18-my-bt/net/bluetooth/hci_core.c
@@ -850,7 +850,7 @@
 	hdev->pkt_type  = (HCI_DM1 | HCI_DH1 | HCI_HV1);
 	hdev->link_mode = (HCI_LM_ACCEPT);
 
-	hdev->idle_timeout = HCI_IDLE_TIMEOUT;
+	hdev->idle_timeout = 0;
 	hdev->sniff_max_interval = 800;
 	hdev->sniff_min_interval = 80;
 
net/bluetooth/hci_event.c +0 -1
diff -ur --exclude-from=kernel-diff-exclude.txt linux-2.6.18-mh1/net/bluetooth/hci_event.c linux-2.6.18-my-bt/net/bluetooth/hci_event.c
@@ -62,7 +62,6 @@
 
 	switch (ocf) {
 	case OCF_INQUIRY_CANCEL:
-	case OCF_EXIT_PERIODIC_INQ:
 		status = *((__u8 *) skb->data);
 
 		if (status) {
net/bluetooth/hci_sysfs.c +19 -98

171 lines not on this page · raw message

net/bluetooth/hidp/core.c +0 -25
diff -ur --exclude-from=kernel-diff-exclude.txt linux-2.6.18-mh1/net/bluetooth/hidp/core.c linux-2.6.18-my-bt/net/bluetooth/hidp/core.c
@@ -41,7 +41,6 @@
 #include "hid.h"
 
 #include <net/bluetooth/bluetooth.h>
-#include <net/bluetooth/hci_core.h>
 #include <net/bluetooth/l2cap.h>
 
 #include "hidp.h"
@@ -573,26 +572,6 @@
 	return 0;
 }
 
-static struct device *hidp_get_device(struct hidp_session *session)
-{
-	bdaddr_t *src = &bt_sk(session->ctrl_sock->sk)->src;
-	bdaddr_t *dst = &bt_sk(session->ctrl_sock->sk)->dst;
-	struct hci_dev *hdev;
-	struct hci_conn *conn;
-
-	hdev = hci_get_route(dst, src);
-	if (!hdev)
-		return NULL;
-
-	conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, dst);
-	if (!conn)
-		return NULL;
-
-	hci_dev_put(hdev);
-
-	return &conn->dev;
-}
-
 static inline void hidp_setup_input(struct hidp_session *session, struct hidp_connadd_req *req)
 {
 	struct input_dev *input = session->input;
@@ -631,8 +610,6 @@
 		input->relbit[0] |= BIT(REL_WHEEL);
 	}
 
-	input->cdev.dev = hidp_get_device(session);
-
 	input->event = hidp_input_event;
 
 	input_register_device(input);
@@ -660,8 +637,6 @@
 	strncpy(hid->phys, batostr(&src), 64);
 	strncpy(hid->uniq, batostr(&dst), 64);
 
-	hid->dev = hidp_get_device(session);
-
 	hid->send = hid_send_report;
 
 	hid_register_device(hid);
net/bluetooth/l2cap.c +142 -1019

1,325 lines not on this page · raw message

net/bluetooth/rfcomm/tty.c +1 -20
diff -ur --exclude-from=kernel-diff-exclude.txt linux-2.6.18-mh1/net/bluetooth/rfcomm/tty.c linux-2.6.18-my-bt/net/bluetooth/rfcomm/tty.c

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

Part of the diff is not shown here. View the raw message.

maintainer
#3 lore raw

Re: [Bluez-users] Microsoft IntelliMouse with kernel 2.6.1 and patch-2.6.18-mh1 is broken (fix provided)

Hi Andrey,

Quoted 6 lines

here is the patch against linux-2.6.18-mh1 to fix IntelliMouse. That's the best range of changes I have time to provide:
somewhere in these changes IntelliMouse was broken. I believe this happened between patch-2.6.15-mh2 and linux-2.6.18-mh1. While there are a lot of changes in these 17 files, but most of them are variable renames. I hope this helps you to narrow down the issue.

I only care about changes in net/bluetooth/hidp/. All others are not relevant. Can't you show me your changes from that directory.

Quoted 1 line

[ Does sending compressed patched works? Trying uncompressed first. ]

Keep them uncompressed, then I can read them in my email client.

Regards

Marcel

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

#4 lore raw

Re: [Bluez-users] Microsoft IntelliMouse with kernel 2.6.1 and patch-2.6.18-mh1 is broken (fix provided)

Quoted 7 lines · Marcel Holtmann

Hi Andrey,

Quoted 1 line

here is the patch against linux-2.6.18-mh1 to fix IntelliMouse. That's the best range of changes I have time to provide: somewhere in these changes IntelliMouse was broken. I believe this happened between patch-2.6.15-mh2 and linux-2.6.18-mh1. While there are a lot of changes in these 17 files, but most of them are variable renames. I hope this helps you to narrow down the issue.

I only care about changes in net/bluetooth/hidp/. All others are not relevant. Can't you show me your changes from that directory.

Marcel, there is only one file changed in this directory: net/bluetooth/hidp/core.c. The changes are rollback of hidp_get_device call.

Thank you.

net/bluetooth/hidp/core.c +0 -25
diff -ur --exclude-from=kernel-diff-exclude.txt linux-2.6.18-mh1/net/bluetooth/hidp/core.c linux-2.6.18-my-bt/net/bluetooth/hidp/core.c
@@ -41,7 +41,6 @@
 #include "hid.h"
 
 #include <net/bluetooth/bluetooth.h>
-#include <net/bluetooth/hci_core.h>
 #include <net/bluetooth/l2cap.h>
 
 #include "hidp.h"
@@ -573,26 +572,6 @@
 	return 0;
 }
 
-static struct device *hidp_get_device(struct hidp_session *session)
-{
-	bdaddr_t *src = &bt_sk(session->ctrl_sock->sk)->src;
-	bdaddr_t *dst = &bt_sk(session->ctrl_sock->sk)->dst;
-	struct hci_dev *hdev;
-	struct hci_conn *conn;
-
-	hdev = hci_get_route(dst, src);
-	if (!hdev)
-		return NULL;
-
-	conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, dst);
-	if (!conn)
-		return NULL;
-
-	hci_dev_put(hdev);
-
-	return &conn->dev;
-}
-
 static inline void hidp_setup_input(struct hidp_session *session, struct hidp_connadd_req *req)
 {
 	struct input_dev *input = session->input;
@@ -631,8 +610,6 @@
 		input->relbit[0] |= BIT(REL_WHEEL);
 	}
 
-	input->cdev.dev = hidp_get_device(session);
-
 	input->event = hidp_input_event;
 
 	input_register_device(input);
@@ -660,8 +637,6 @@
 	strncpy(hid->phys, batostr(&src), 64);
 	strncpy(hid->uniq, batostr(&dst), 64);
 
-	hid->dev = hidp_get_device(session);
-
 	hid->send = hid_send_report;
 
 	hid_register_device(hid);

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users