Testing patch for 2.4
Subsystems (2)
Marcel Holtmann
maintainerHi Folks,
I did a big rework of the Bluetooth PCMCIA part for 2.6 and as a result of it the Anycom CF-300 is now supported and the 3Com driver uses the request_firmware() interface for loading the firmware. This means that the bluefw loader is no longer needed and these cards may also work on a PowerPC platform. A hotplug package with firmware.agent script must be used and BT3CPCC.bin must be under /usr/lib/hotplug/firmware/
Attached is the result of my backport to 2.4
Documentation/Configure.help | 3 drivers/bluetooth/Makefile.lib | 3 drivers/bluetooth/bluecard_cs.c | 39 +++++++++- drivers/bluetooth/bt3c_cs.c | 147 +++++++++++++++++++++++++--------------- 4 files changed, 128 insertions(+), 64 deletions(-)
I don't have time for 2.4 testing, so I need feedback from people with the Anycom CF-300 or the 3Com card version 2.0.
Regards
Marcel
===== Documentation/Configure.help 1.239 vs edited =====
Documentation/Configure.help +0 -3
@@ -23167,9 +23167,6 @@ 3Com Bluetooth Card (3CRWB6096) HP Bluetooth Card - The HCI BT3C driver uses external firmware loader program provided in - the BlueFW package. For more information, see <http://bluez.sf.net>. - Say Y here to compile support for HCI BT3C devices into the kernel or say M to compile it as module (bt3c_cs.o).
===== drivers/bluetooth/Makefile.lib 1.1 vs edited =====
drivers/bluetooth/Makefile.lib +2 -1
@@ -1 +1,2 @@ -obj-$(CONFIG_BLUEZ_HCIBFUSB) += firmware_class.o +obj-$(CONFIG_BLUEZ_HCIBFUSB) += firmware_class.o +obj-$(CONFIG_BLUEZ_HCIBT3C) += firmware_class.o
===== drivers/bluetooth/bluecard_cs.c 1.1 vs edited =====
drivers/bluetooth/bluecard_cs.c +34 -5
@@ -174,6 +174,9 @@bluecard_info_t *info = (bluecard_info_t *)arg;unsigned int iobase = info->link.io.BasePort1; +if (!test_bit (CARD_HAS_PCCARD_ID , &(info->hw_state))) +return ; +if (test_bit (CARD_HAS_ACTIVITY_LED , &(info->hw_state))) {/* Disable activity LED */ outb (0x08 |0x20 , iobase +0x30 );
@@ -188,6 +191,9 @@ {unsigned int iobase = info->link.io.BasePort1; +if (!test_bit (CARD_HAS_PCCARD_ID , &(info->hw_state))) +return ; +if (test_bit (CARD_HAS_ACTIVITY_LED , &(info->hw_state))) {/* Enable activity LED */ outb (0x10 |0x40 , iobase +0x30 );
@@ -627,13 +633,16 @@bluecard_info_t *info = (bluecard_info_t *)(hdev->driver_data);unsigned int iobase = info->link.io.BasePort1; -bluecard_hci_set_baud_rate (hdev,DEFAULT_BAUD_RATE ); +if (test_bit (CARD_HAS_PCCARD_ID , &(info->hw_state))) +bluecard_hci_set_baud_rate (hdev,DEFAULT_BAUD_RATE );if (test_and_set_bit (HCI_RUNNING , &(hdev->flags)))return 0 ; -/* Enable LED */ -outb (0x08 |0x20 , iobase +0x30 ); +if (test_bit (CARD_HAS_PCCARD_ID , &(info->hw_state))) { +/* Enable LED */ +outb (0x08 |0x20 , iobase +0x30 ); + }return 0 ; }
@@ -649,8 +658,10 @@bluecard_hci_flush (hdev); -/* Disable LED */ -outb (0x00 , iobase +0x30 ); +if (test_bit (CARD_HAS_PCCARD_ID , &(info->hw_state))) { +/* Disable LED */ +outb (0x00 , iobase +0x30 ); + }return 0 ; }
@@ -756,6 +767,24 @@outb (0xff , iobase +REG_INTERRUPT ); info->ctrl_reg |=REG_CONTROL_INTERRUPT ;outb (info->ctrl_reg, iobase +REG_CONTROL ); + +if ((id &0x0f ) ==0x03 ) { +/* Disable RTS */ + info->ctrl_reg |=REG_CONTROL_RTS ; +outb (info->ctrl_reg, iobase +REG_CONTROL ); + +/* Set baud rate */ + info->ctrl_reg |=0x03 ; +outb (info->ctrl_reg, iobase +REG_CONTROL ); + +/* Enable RTS */ + info->ctrl_reg &= ~REG_CONTROL_RTS ; +outb (info->ctrl_reg, iobase +REG_CONTROL ); + +set_bit (XMIT_BUF_ONE_READY , &(info->tx_state)); +set_bit (XMIT_BUF_TWO_READY , &(info->tx_state)); +set_bit (XMIT_SENDING_READY , &(info->tx_state)); + }/* Start the RX buffers */ outb (REG_COMMAND_RX_BUF_ONE , iobase +REG_COMMAND );
===== drivers/bluetooth/bt3c_cs.c 1.1 vs edited =====
drivers/bluetooth/bt3c_cs.c +92 -55
192 lines not on this page · raw message