aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-07 15:23:31 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-07 15:23:31 -0400
commit9fa0853a85a3a4067e4ad0aaa5d90984c2dd21b5 (patch)
treeac90f6535bc053b3859dc050cbbd577a0a1ef95b /drivers
parentef93127e4c7b4b8d46421045641048397eaac43d (diff)
parentcf4328cd949c2086091c62c5685f1580fe9b55e4 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: [NET]: rfkill: add support for input key to control wireless radio [NET] net/core: Fix error handling [TG3]: Update version and reldate. [TG3]: Eliminate spurious interrupts. [TG3]: Add ASPM workaround. [Bluetooth] Correct SCO buffer for another Broadcom based dongle [Bluetooth] Add support for Targus ACB10US USB dongle [Bluetooth] Disconnect L2CAP connection after last RFCOMM DLC [Bluetooth] Check that device is in rfcomm_dev_list before deleting [Bluetooth] Use in-kernel sockets API [Bluetooth] Attach host adapters to the Bluetooth bus [Bluetooth] Fix L2CAP and HCI setsockopt() information leaks
Diffstat (limited to 'drivers')
-rw-r--r--drivers/bluetooth/hci_usb.c6
-rw-r--r--drivers/net/tg3.c40
-rw-r--r--drivers/net/tg3.h10
3 files changed, 52 insertions, 4 deletions
diff --git a/drivers/bluetooth/hci_usb.c b/drivers/bluetooth/hci_usb.c
index 406af579ac3a..b0238b46dded 100644
--- a/drivers/bluetooth/hci_usb.c
+++ b/drivers/bluetooth/hci_usb.c
@@ -114,10 +114,16 @@ static struct usb_device_id blacklist_ids[] = {
114 { USB_DEVICE(0x0a5c, 0x200a), .driver_info = HCI_RESET | HCI_WRONG_SCO_MTU }, 114 { USB_DEVICE(0x0a5c, 0x200a), .driver_info = HCI_RESET | HCI_WRONG_SCO_MTU },
115 { USB_DEVICE(0x0a5c, 0x2009), .driver_info = HCI_BCM92035 }, 115 { USB_DEVICE(0x0a5c, 0x2009), .driver_info = HCI_BCM92035 },
116 116
117 /* Broadcom BCM2045 */
118 { USB_DEVICE(0x0a5c, 0x2101), .driver_info = HCI_WRONG_SCO_MTU },
119
117 /* IBM/Lenovo ThinkPad with Broadcom chip */ 120 /* IBM/Lenovo ThinkPad with Broadcom chip */
118 { USB_DEVICE(0x0a5c, 0x201e), .driver_info = HCI_WRONG_SCO_MTU }, 121 { USB_DEVICE(0x0a5c, 0x201e), .driver_info = HCI_WRONG_SCO_MTU },
119 { USB_DEVICE(0x0a5c, 0x2110), .driver_info = HCI_WRONG_SCO_MTU }, 122 { USB_DEVICE(0x0a5c, 0x2110), .driver_info = HCI_WRONG_SCO_MTU },
120 123
124 /* Targus ACB10US */
125 { USB_DEVICE(0x0a5c, 0x2100), .driver_info = HCI_RESET },
126
121 /* ANYCOM Bluetooth USB-200 and USB-250 */ 127 /* ANYCOM Bluetooth USB-200 and USB-250 */
122 { USB_DEVICE(0x0a5c, 0x2111), .driver_info = HCI_RESET }, 128 { USB_DEVICE(0x0a5c, 0x2111), .driver_info = HCI_RESET },
123 129
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 59d6e74a4a5f..e5e901ecd808 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -64,8 +64,8 @@
64 64
65#define DRV_MODULE_NAME "tg3" 65#define DRV_MODULE_NAME "tg3"
66#define PFX DRV_MODULE_NAME ": " 66#define PFX DRV_MODULE_NAME ": "
67#define DRV_MODULE_VERSION "3.75" 67#define DRV_MODULE_VERSION "3.76"
68#define DRV_MODULE_RELDATE "March 23, 2007" 68#define DRV_MODULE_RELDATE "May 5, 2007"
69 69
70#define TG3_DEF_MAC_MODE 0 70#define TG3_DEF_MAC_MODE 0
71#define TG3_DEF_RX_MODE 0 71#define TG3_DEF_RX_MODE 0
@@ -3019,6 +3019,16 @@ static int tg3_setup_phy(struct tg3 *tp, int force_reset)
3019 } 3019 }
3020 } 3020 }
3021 3021
3022 if (tp->tg3_flags & TG3_FLAG_ASPM_WORKAROUND) {
3023 u32 val = tr32(PCIE_PWR_MGMT_THRESH);
3024 if (!netif_carrier_ok(tp->dev))
3025 val = (val & ~PCIE_PWR_MGMT_L1_THRESH_MSK) |
3026 tp->pwrmgmt_thresh;
3027 else
3028 val |= PCIE_PWR_MGMT_L1_THRESH_MSK;
3029 tw32(PCIE_PWR_MGMT_THRESH, val);
3030 }
3031
3022 return err; 3032 return err;
3023} 3033}
3024 3034
@@ -3580,8 +3590,12 @@ static irqreturn_t tg3_interrupt(int irq, void *dev_id)
3580 * Writing non-zero to intr-mbox-0 additional tells the 3590 * Writing non-zero to intr-mbox-0 additional tells the
3581 * NIC to stop sending us irqs, engaging "in-intr-handler" 3591 * NIC to stop sending us irqs, engaging "in-intr-handler"
3582 * event coalescing. 3592 * event coalescing.
3593 *
3594 * Flush the mailbox to de-assert the IRQ immediately to prevent
3595 * spurious interrupts. The flush impacts performance but
3596 * excessive spurious interrupts can be worse in some cases.
3583 */ 3597 */
3584 tw32_mailbox(MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW, 0x00000001); 3598 tw32_mailbox_f(MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW, 0x00000001);
3585 if (tg3_irq_sync(tp)) 3599 if (tg3_irq_sync(tp))
3586 goto out; 3600 goto out;
3587 sblk->status &= ~SD_STATUS_UPDATED; 3601 sblk->status &= ~SD_STATUS_UPDATED;
@@ -3625,8 +3639,12 @@ static irqreturn_t tg3_interrupt_tagged(int irq, void *dev_id)
3625 * writing non-zero to intr-mbox-0 additional tells the 3639 * writing non-zero to intr-mbox-0 additional tells the
3626 * NIC to stop sending us irqs, engaging "in-intr-handler" 3640 * NIC to stop sending us irqs, engaging "in-intr-handler"
3627 * event coalescing. 3641 * event coalescing.
3642 *
3643 * Flush the mailbox to de-assert the IRQ immediately to prevent
3644 * spurious interrupts. The flush impacts performance but
3645 * excessive spurious interrupts can be worse in some cases.
3628 */ 3646 */
3629 tw32_mailbox(MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW, 0x00000001); 3647 tw32_mailbox_f(MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW, 0x00000001);
3630 if (tg3_irq_sync(tp)) 3648 if (tg3_irq_sync(tp))
3631 goto out; 3649 goto out;
3632 if (netif_rx_schedule_prep(dev)) { 3650 if (netif_rx_schedule_prep(dev)) {
@@ -10004,6 +10022,8 @@ static void __devinit tg3_get_eeprom_hw_cfg(struct tg3 *tp)
10004 tp->tg3_flags &= ~TG3_FLAG_EEPROM_WRITE_PROT; 10022 tp->tg3_flags &= ~TG3_FLAG_EEPROM_WRITE_PROT;
10005 tp->tg3_flags2 |= TG3_FLG2_IS_NIC; 10023 tp->tg3_flags2 |= TG3_FLG2_IS_NIC;
10006 } 10024 }
10025 if (tr32(VCPU_CFGSHDW) & VCPU_CFGSHDW_ASPM_DBNC)
10026 tp->tg3_flags |= TG3_FLAG_ASPM_WORKAROUND;
10007 return; 10027 return;
10008 } 10028 }
10009 10029
@@ -10131,6 +10151,14 @@ static void __devinit tg3_get_eeprom_hw_cfg(struct tg3 *tp)
10131 /* bootcode if bit 18 is set */ 10151 /* bootcode if bit 18 is set */
10132 if (cfg2 & (1 << 18)) 10152 if (cfg2 & (1 << 18))
10133 tp->tg3_flags2 |= TG3_FLG2_SERDES_PREEMPHASIS; 10153 tp->tg3_flags2 |= TG3_FLG2_SERDES_PREEMPHASIS;
10154
10155 if (tp->tg3_flags2 & TG3_FLG2_PCI_EXPRESS) {
10156 u32 cfg3;
10157
10158 tg3_read_mem(tp, NIC_SRAM_DATA_CFG_3, &cfg3);
10159 if (cfg3 & NIC_SRAM_ASPM_DEBOUNCE)
10160 tp->tg3_flags |= TG3_FLAG_ASPM_WORKAROUND;
10161 }
10134 } 10162 }
10135} 10163}
10136 10164
@@ -10998,6 +11026,10 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
10998 */ 11026 */
10999 tp->tg3_flags &= ~TG3_FLAG_WOL_ENABLE; 11027 tp->tg3_flags &= ~TG3_FLAG_WOL_ENABLE;
11000 11028
11029 if (tp->tg3_flags & TG3_FLAG_ASPM_WORKAROUND)
11030 tp->pwrmgmt_thresh = tr32(PCIE_PWR_MGMT_THRESH) &
11031 PCIE_PWR_MGMT_L1_THRESH_MSK;
11032
11001 return err; 11033 return err;
11002} 11034}
11003 11035
diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h
index dcdfc084966c..4d334cf5a243 100644
--- a/drivers/net/tg3.h
+++ b/drivers/net/tg3.h
@@ -1150,6 +1150,9 @@
1150#define VCPU_STATUS_INIT_DONE 0x04000000 1150#define VCPU_STATUS_INIT_DONE 0x04000000
1151#define VCPU_STATUS_DRV_RESET 0x08000000 1151#define VCPU_STATUS_DRV_RESET 0x08000000
1152 1152
1153#define VCPU_CFGSHDW 0x00005104
1154#define VCPU_CFGSHDW_ASPM_DBNC 0x00001000
1155
1153/* Mailboxes */ 1156/* Mailboxes */
1154#define GRCMBOX_BASE 0x00005600 1157#define GRCMBOX_BASE 0x00005600
1155#define GRCMBOX_INTERRUPT_0 0x00005800 /* 64-bit */ 1158#define GRCMBOX_INTERRUPT_0 0x00005800 /* 64-bit */
@@ -1507,6 +1510,8 @@
1507#define PCIE_TRANS_CFG_1SHOT_MSI 0x20000000 1510#define PCIE_TRANS_CFG_1SHOT_MSI 0x20000000
1508#define PCIE_TRANS_CFG_LOM 0x00000020 1511#define PCIE_TRANS_CFG_LOM 0x00000020
1509 1512
1513#define PCIE_PWR_MGMT_THRESH 0x00007d28
1514#define PCIE_PWR_MGMT_L1_THRESH_MSK 0x0000ff00
1510 1515
1511#define TG3_EEPROM_MAGIC 0x669955aa 1516#define TG3_EEPROM_MAGIC 0x669955aa
1512#define TG3_EEPROM_MAGIC_FW 0xa5000000 1517#define TG3_EEPROM_MAGIC_FW 0xa5000000
@@ -1593,6 +1598,9 @@
1593#define SHASTA_EXT_LED_MAC 0x00010000 1598#define SHASTA_EXT_LED_MAC 0x00010000
1594#define SHASTA_EXT_LED_COMBO 0x00018000 1599#define SHASTA_EXT_LED_COMBO 0x00018000
1595 1600
1601#define NIC_SRAM_DATA_CFG_3 0x00000d3c
1602#define NIC_SRAM_ASPM_DEBOUNCE 0x00000002
1603
1596#define NIC_SRAM_RX_MINI_BUFFER_DESC 0x00001000 1604#define NIC_SRAM_RX_MINI_BUFFER_DESC 0x00001000
1597 1605
1598#define NIC_SRAM_DMA_DESC_POOL_BASE 0x00002000 1606#define NIC_SRAM_DMA_DESC_POOL_BASE 0x00002000
@@ -2200,6 +2208,7 @@ struct tg3 {
2200#define TG3_FLAG_USE_LINKCHG_REG 0x00000008 2208#define TG3_FLAG_USE_LINKCHG_REG 0x00000008
2201#define TG3_FLAG_USE_MI_INTERRUPT 0x00000010 2209#define TG3_FLAG_USE_MI_INTERRUPT 0x00000010
2202#define TG3_FLAG_ENABLE_ASF 0x00000020 2210#define TG3_FLAG_ENABLE_ASF 0x00000020
2211#define TG3_FLAG_ASPM_WORKAROUND 0x00000040
2203#define TG3_FLAG_POLL_SERDES 0x00000080 2212#define TG3_FLAG_POLL_SERDES 0x00000080
2204#define TG3_FLAG_MBOX_WRITE_REORDER 0x00000100 2213#define TG3_FLAG_MBOX_WRITE_REORDER 0x00000100
2205#define TG3_FLAG_PCIX_TARGET_HWBUG 0x00000200 2214#define TG3_FLAG_PCIX_TARGET_HWBUG 0x00000200
@@ -2288,6 +2297,7 @@ struct tg3 {
2288 u32 grc_local_ctrl; 2297 u32 grc_local_ctrl;
2289 u32 dma_rwctrl; 2298 u32 dma_rwctrl;
2290 u32 coalesce_mode; 2299 u32 coalesce_mode;
2300 u32 pwrmgmt_thresh;
2291 2301
2292 /* PCI block */ 2302 /* PCI block */
2293 u16 pci_chip_rev_id; 2303 u16 pci_chip_rev_id;