aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-02-26 02:22:42 -0500
committerDavid S. Miller <davem@davemloft.net>2010-02-26 02:22:42 -0500
commit04488734806948624dabc4514f96f14cd75b9a50 (patch)
tree74f3a3c10a7177a5f86398b83ad7bf0569fe8b89 /drivers
parent54831a83bfe656c4c54e287c734c6b0ccaa3719b (diff)
parentc4d49794ff2838038fd9756eae39c39a5a685833 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/e1000/e1000_main.c19
-rw-r--r--drivers/net/sfc/falcon_boards.c45
-rw-r--r--drivers/net/sfc/mcdi.c2
-rw-r--r--drivers/net/tc35815.c1
-rw-r--r--drivers/net/usb/cdc_ether.c5
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-5000.c8
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.h2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-tx.c22
10 files changed, 78 insertions, 30 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 319c2b5281e9..8be6faee43e6 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -4005,11 +4005,21 @@ check_page:
4005 } 4005 }
4006 } 4006 }
4007 4007
4008 if (!buffer_info->dma) 4008 if (!buffer_info->dma) {
4009 buffer_info->dma = pci_map_page(pdev, 4009 buffer_info->dma = pci_map_page(pdev,
4010 buffer_info->page, 0, 4010 buffer_info->page, 0,
4011 buffer_info->length, 4011 buffer_info->length,
4012 PCI_DMA_FROMDEVICE); 4012 PCI_DMA_FROMDEVICE);
4013 if (pci_dma_mapping_error(pdev, buffer_info->dma)) {
4014 put_page(buffer_info->page);
4015 dev_kfree_skb(skb);
4016 buffer_info->page = NULL;
4017 buffer_info->skb = NULL;
4018 buffer_info->dma = 0;
4019 adapter->alloc_rx_buff_failed++;
4020 break; /* while !buffer_info->skb */
4021 }
4022 }
4013 4023
4014 rx_desc = E1000_RX_DESC(*rx_ring, i); 4024 rx_desc = E1000_RX_DESC(*rx_ring, i);
4015 rx_desc->buffer_addr = cpu_to_le64(buffer_info->dma); 4025 rx_desc->buffer_addr = cpu_to_le64(buffer_info->dma);
@@ -4100,6 +4110,13 @@ map_skb:
4100 skb->data, 4110 skb->data,
4101 buffer_info->length, 4111 buffer_info->length,
4102 PCI_DMA_FROMDEVICE); 4112 PCI_DMA_FROMDEVICE);
4113 if (pci_dma_mapping_error(pdev, buffer_info->dma)) {
4114 dev_kfree_skb(skb);
4115 buffer_info->skb = NULL;
4116 buffer_info->dma = 0;
4117 adapter->alloc_rx_buff_failed++;
4118 break; /* while !buffer_info->skb */
4119 }
4103 4120
4104 /* 4121 /*
4105 * XXX if it was allocated cleanly it will never map to a 4122 * XXX if it was allocated cleanly it will never map to a
diff --git a/drivers/net/sfc/falcon_boards.c b/drivers/net/sfc/falcon_boards.c
index bf0b96af5334..5712fddd72f2 100644
--- a/drivers/net/sfc/falcon_boards.c
+++ b/drivers/net/sfc/falcon_boards.c
@@ -29,6 +29,15 @@
29#define FALCON_BOARD_SFN4111T 0x51 29#define FALCON_BOARD_SFN4111T 0x51
30#define FALCON_BOARD_SFN4112F 0x52 30#define FALCON_BOARD_SFN4112F 0x52
31 31
32/* Board temperature is about 15°C above ambient when air flow is
33 * limited. */
34#define FALCON_BOARD_TEMP_BIAS 15
35
36/* SFC4000 datasheet says: 'The maximum permitted junction temperature
37 * is 125°C; the thermal design of the environment for the SFC4000
38 * should aim to keep this well below 100°C.' */
39#define FALCON_JUNC_TEMP_MAX 90
40
32/***************************************************************************** 41/*****************************************************************************
33 * Support for LM87 sensor chip used on several boards 42 * Support for LM87 sensor chip used on several boards
34 */ 43 */
@@ -548,16 +557,16 @@ fail_hwmon:
548static u8 sfe4002_lm87_channel = 0x03; /* use AIN not FAN inputs */ 557static u8 sfe4002_lm87_channel = 0x03; /* use AIN not FAN inputs */
549 558
550static const u8 sfe4002_lm87_regs[] = { 559static const u8 sfe4002_lm87_regs[] = {
551 LM87_IN_LIMITS(0, 0x83, 0x91), /* 2.5V: 1.8V +/- 5% */ 560 LM87_IN_LIMITS(0, 0x7c, 0x99), /* 2.5V: 1.8V +/- 10% */
552 LM87_IN_LIMITS(1, 0x51, 0x5a), /* Vccp1: 1.2V +/- 5% */ 561 LM87_IN_LIMITS(1, 0x4c, 0x5e), /* Vccp1: 1.2V +/- 10% */
553 LM87_IN_LIMITS(2, 0xb6, 0xca), /* 3.3V: 3.3V +/- 5% */ 562 LM87_IN_LIMITS(2, 0xac, 0xd4), /* 3.3V: 3.3V +/- 10% */
554 LM87_IN_LIMITS(3, 0xb0, 0xc9), /* 5V: 4.6-5.2V */ 563 LM87_IN_LIMITS(3, 0xac, 0xd4), /* 5V: 5.0V +/- 10% */
555 LM87_IN_LIMITS(4, 0xb0, 0xe0), /* 12V: 11-14V */ 564 LM87_IN_LIMITS(4, 0xac, 0xe0), /* 12V: 10.8-14V */
556 LM87_IN_LIMITS(5, 0x44, 0x4b), /* Vccp2: 1.0V +/- 5% */ 565 LM87_IN_LIMITS(5, 0x3f, 0x4f), /* Vccp2: 1.0V +/- 10% */
557 LM87_AIN_LIMITS(0, 0xa0, 0xb2), /* AIN1: 1.66V +/- 5% */ 566 LM87_AIN_LIMITS(0, 0x98, 0xbb), /* AIN1: 1.66V +/- 10% */
558 LM87_AIN_LIMITS(1, 0x91, 0xa1), /* AIN2: 1.5V +/- 5% */ 567 LM87_AIN_LIMITS(1, 0x8a, 0xa9), /* AIN2: 1.5V +/- 10% */
559 LM87_TEMP_INT_LIMITS(10, 60), /* board */ 568 LM87_TEMP_INT_LIMITS(0, 80 + FALCON_BOARD_TEMP_BIAS),
560 LM87_TEMP_EXT1_LIMITS(10, 70), /* Falcon */ 569 LM87_TEMP_EXT1_LIMITS(0, FALCON_JUNC_TEMP_MAX),
561 0 570 0
562}; 571};
563 572
@@ -619,14 +628,14 @@ static int sfe4002_init(struct efx_nic *efx)
619static u8 sfn4112f_lm87_channel = 0x03; /* use AIN not FAN inputs */ 628static u8 sfn4112f_lm87_channel = 0x03; /* use AIN not FAN inputs */
620 629
621static const u8 sfn4112f_lm87_regs[] = { 630static const u8 sfn4112f_lm87_regs[] = {
622 LM87_IN_LIMITS(0, 0x83, 0x91), /* 2.5V: 1.8V +/- 5% */ 631 LM87_IN_LIMITS(0, 0x7c, 0x99), /* 2.5V: 1.8V +/- 10% */
623 LM87_IN_LIMITS(1, 0x51, 0x5a), /* Vccp1: 1.2V +/- 5% */ 632 LM87_IN_LIMITS(1, 0x4c, 0x5e), /* Vccp1: 1.2V +/- 10% */
624 LM87_IN_LIMITS(2, 0xb6, 0xca), /* 3.3V: 3.3V +/- 5% */ 633 LM87_IN_LIMITS(2, 0xac, 0xd4), /* 3.3V: 3.3V +/- 10% */
625 LM87_IN_LIMITS(4, 0xb0, 0xe0), /* 12V: 11-14V */ 634 LM87_IN_LIMITS(4, 0xac, 0xe0), /* 12V: 10.8-14V */
626 LM87_IN_LIMITS(5, 0x44, 0x4b), /* Vccp2: 1.0V +/- 5% */ 635 LM87_IN_LIMITS(5, 0x3f, 0x4f), /* Vccp2: 1.0V +/- 10% */
627 LM87_AIN_LIMITS(1, 0x91, 0xa1), /* AIN2: 1.5V +/- 5% */ 636 LM87_AIN_LIMITS(1, 0x8a, 0xa9), /* AIN2: 1.5V +/- 10% */
628 LM87_TEMP_INT_LIMITS(10, 60), /* board */ 637 LM87_TEMP_INT_LIMITS(0, 60 + FALCON_BOARD_TEMP_BIAS),
629 LM87_TEMP_EXT1_LIMITS(10, 70), /* Falcon */ 638 LM87_TEMP_EXT1_LIMITS(0, FALCON_JUNC_TEMP_MAX),
630 0 639 0
631}; 640};
632 641
diff --git a/drivers/net/sfc/mcdi.c b/drivers/net/sfc/mcdi.c
index 86610db2cff5..c48669c77414 100644
--- a/drivers/net/sfc/mcdi.c
+++ b/drivers/net/sfc/mcdi.c
@@ -127,7 +127,7 @@ static int efx_mcdi_poll(struct efx_nic *efx)
127 efx_dword_t reg; 127 efx_dword_t reg;
128 128
129 /* Check for a reboot atomically with respect to efx_mcdi_copyout() */ 129 /* Check for a reboot atomically with respect to efx_mcdi_copyout() */
130 rc = efx_mcdi_poll_reboot(efx); 130 rc = -efx_mcdi_poll_reboot(efx);
131 if (rc) 131 if (rc)
132 goto out; 132 goto out;
133 133
diff --git a/drivers/net/tc35815.c b/drivers/net/tc35815.c
index d838d4015c63..a2c635ecdab8 100644
--- a/drivers/net/tc35815.c
+++ b/drivers/net/tc35815.c
@@ -1437,7 +1437,6 @@ static int tc35815_do_interrupt(struct net_device *dev, u32 status, int limit)
1437 /* Transmit complete. */ 1437 /* Transmit complete. */
1438 lp->lstats.tx_ints++; 1438 lp->lstats.tx_ints++;
1439 tc35815_txdone(dev); 1439 tc35815_txdone(dev);
1440 netif_wake_queue(dev);
1441 if (ret < 0) 1440 if (ret < 0)
1442 ret = 0; 1441 ret = 0;
1443 } 1442 }
diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c
index 3486e8ca039a..c8cdb7f30adc 100644
--- a/drivers/net/usb/cdc_ether.c
+++ b/drivers/net/usb/cdc_ether.c
@@ -582,6 +582,11 @@ static const struct usb_device_id products [] = {
582 USB_CDC_SUBCLASS_MDLM, USB_CDC_PROTO_NONE), 582 USB_CDC_SUBCLASS_MDLM, USB_CDC_PROTO_NONE),
583 .driver_info = (unsigned long) &mbm_info, 583 .driver_info = (unsigned long) &mbm_info,
584}, { 584}, {
585 /* Ericsson C3607w ver 2 */
586 USB_DEVICE_AND_INTERFACE_INFO(0x0bdb, 0x190b, USB_CLASS_COMM,
587 USB_CDC_SUBCLASS_MDLM, USB_CDC_PROTO_NONE),
588 .driver_info = (unsigned long) &mbm_info,
589}, {
585 /* Toshiba F3507g */ 590 /* Toshiba F3507g */
586 USB_DEVICE_AND_INTERFACE_INFO(0x0930, 0x130b, USB_CLASS_COMM, 591 USB_DEVICE_AND_INTERFACE_INFO(0x0930, 0x130b, USB_CLASS_COMM,
587 USB_CDC_SUBCLASS_MDLM, USB_CDC_PROTO_NONE), 592 USB_CDC_SUBCLASS_MDLM, USB_CDC_PROTO_NONE),
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index aebe8c51d3e1..b07874f7da7f 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -2008,7 +2008,7 @@ static void iwl4965_rx_reply_tx(struct iwl_priv *priv,
2008 IWL_DEBUG_TX_REPLY(priv, "Retry scheduler reclaim scd_ssn " 2008 IWL_DEBUG_TX_REPLY(priv, "Retry scheduler reclaim scd_ssn "
2009 "%d index %d\n", scd_ssn , index); 2009 "%d index %d\n", scd_ssn , index);
2010 freed = iwl_tx_queue_reclaim(priv, txq_id, index); 2010 freed = iwl_tx_queue_reclaim(priv, txq_id, index);
2011 priv->stations[sta_id].tid[tid].tfds_in_queue -= freed; 2011 iwl_free_tfds_in_queue(priv, sta_id, tid, freed);
2012 2012
2013 if (priv->mac80211_registered && 2013 if (priv->mac80211_registered &&
2014 (iwl_queue_space(&txq->q) > txq->q.low_mark) && 2014 (iwl_queue_space(&txq->q) > txq->q.low_mark) &&
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
index f3d662c8cbcf..2cf92a51f041 100644
--- a/drivers/net/wireless/iwlwifi/iwl-5000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
@@ -1116,7 +1116,7 @@ static void iwl5000_rx_reply_tx(struct iwl_priv *priv,
1116 scd_ssn , index, txq_id, txq->swq_id); 1116 scd_ssn , index, txq_id, txq->swq_id);
1117 1117
1118 freed = iwl_tx_queue_reclaim(priv, txq_id, index); 1118 freed = iwl_tx_queue_reclaim(priv, txq_id, index);
1119 priv->stations[sta_id].tid[tid].tfds_in_queue -= freed; 1119 iwl_free_tfds_in_queue(priv, sta_id, tid, freed);
1120 1120
1121 if (priv->mac80211_registered && 1121 if (priv->mac80211_registered &&
1122 (iwl_queue_space(&txq->q) > txq->q.low_mark) && 1122 (iwl_queue_space(&txq->q) > txq->q.low_mark) &&
@@ -1144,16 +1144,14 @@ static void iwl5000_rx_reply_tx(struct iwl_priv *priv,
1144 tx_resp->failure_frame); 1144 tx_resp->failure_frame);
1145 1145
1146 freed = iwl_tx_queue_reclaim(priv, txq_id, index); 1146 freed = iwl_tx_queue_reclaim(priv, txq_id, index);
1147 if (ieee80211_is_data_qos(tx_resp->frame_ctrl)) 1147 iwl_free_tfds_in_queue(priv, sta_id, tid, freed);
1148 priv->stations[sta_id].tid[tid].tfds_in_queue -= freed;
1149 1148
1150 if (priv->mac80211_registered && 1149 if (priv->mac80211_registered &&
1151 (iwl_queue_space(&txq->q) > txq->q.low_mark)) 1150 (iwl_queue_space(&txq->q) > txq->q.low_mark))
1152 iwl_wake_queue(priv, txq_id); 1151 iwl_wake_queue(priv, txq_id);
1153 } 1152 }
1154 1153
1155 if (ieee80211_is_data_qos(tx_resp->frame_ctrl)) 1154 iwl_txq_check_empty(priv, sta_id, tid, txq_id);
1156 iwl_txq_check_empty(priv, sta_id, tid, txq_id);
1157 1155
1158 if (iwl_check_bits(status, TX_ABORT_REQUIRED_MSK)) 1156 if (iwl_check_bits(status, TX_ABORT_REQUIRED_MSK))
1159 IWL_ERR(priv, "TODO: Implement Tx ABORT REQUIRED!!!\n"); 1157 IWL_ERR(priv, "TODO: Implement Tx ABORT REQUIRED!!!\n");
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index d390eef2efe5..728410083cb8 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -2787,8 +2787,8 @@ int iwl_mac_config(struct ieee80211_hw *hw, u32 changed)
2787 if ((le16_to_cpu(priv->staging_rxon.channel) != ch)) 2787 if ((le16_to_cpu(priv->staging_rxon.channel) != ch))
2788 priv->staging_rxon.flags = 0; 2788 priv->staging_rxon.flags = 0;
2789 2789
2790 iwl_set_rxon_ht(priv, ht_conf);
2791 iwl_set_rxon_channel(priv, conf->channel); 2790 iwl_set_rxon_channel(priv, conf->channel);
2791 iwl_set_rxon_ht(priv, ht_conf);
2792 2792
2793 iwl_set_flags_for_band(priv, conf->channel->band); 2793 iwl_set_flags_for_band(priv, conf->channel->band);
2794 spin_unlock_irqrestore(&priv->lock, flags); 2794 spin_unlock_irqrestore(&priv->lock, flags);
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
index 8f0c564e68b0..1b0701b876c3 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -451,6 +451,8 @@ void iwl_hw_txq_ctx_free(struct iwl_priv *priv);
451int iwl_hw_tx_queue_init(struct iwl_priv *priv, 451int iwl_hw_tx_queue_init(struct iwl_priv *priv,
452 struct iwl_tx_queue *txq); 452 struct iwl_tx_queue *txq);
453int iwl_txq_update_write_ptr(struct iwl_priv *priv, struct iwl_tx_queue *txq); 453int iwl_txq_update_write_ptr(struct iwl_priv *priv, struct iwl_tx_queue *txq);
454void iwl_free_tfds_in_queue(struct iwl_priv *priv,
455 int sta_id, int tid, int freed);
454int iwl_tx_queue_init(struct iwl_priv *priv, struct iwl_tx_queue *txq, 456int iwl_tx_queue_init(struct iwl_priv *priv, struct iwl_tx_queue *txq,
455 int slots_num, u32 txq_id); 457 int slots_num, u32 txq_id);
456void iwl_tx_queue_free(struct iwl_priv *priv, int txq_id); 458void iwl_tx_queue_free(struct iwl_priv *priv, int txq_id);
diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c b/drivers/net/wireless/iwlwifi/iwl-tx.c
index d365d13e3291..6eff3d4d0616 100644
--- a/drivers/net/wireless/iwlwifi/iwl-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-tx.c
@@ -120,6 +120,20 @@ int iwl_txq_update_write_ptr(struct iwl_priv *priv, struct iwl_tx_queue *txq)
120EXPORT_SYMBOL(iwl_txq_update_write_ptr); 120EXPORT_SYMBOL(iwl_txq_update_write_ptr);
121 121
122 122
123void iwl_free_tfds_in_queue(struct iwl_priv *priv,
124 int sta_id, int tid, int freed)
125{
126 if (priv->stations[sta_id].tid[tid].tfds_in_queue >= freed)
127 priv->stations[sta_id].tid[tid].tfds_in_queue -= freed;
128 else {
129 IWL_ERR(priv, "free more than tfds_in_queue (%u:%d)\n",
130 priv->stations[sta_id].tid[tid].tfds_in_queue,
131 freed);
132 priv->stations[sta_id].tid[tid].tfds_in_queue = 0;
133 }
134}
135EXPORT_SYMBOL(iwl_free_tfds_in_queue);
136
123/** 137/**
124 * iwl_tx_queue_free - Deallocate DMA queue. 138 * iwl_tx_queue_free - Deallocate DMA queue.
125 * @txq: Transmit queue to deallocate. 139 * @txq: Transmit queue to deallocate.
@@ -1131,6 +1145,7 @@ int iwl_tx_queue_reclaim(struct iwl_priv *priv, int txq_id, int index)
1131 struct iwl_queue *q = &txq->q; 1145 struct iwl_queue *q = &txq->q;
1132 struct iwl_tx_info *tx_info; 1146 struct iwl_tx_info *tx_info;
1133 int nfreed = 0; 1147 int nfreed = 0;
1148 struct ieee80211_hdr *hdr;
1134 1149
1135 if ((index >= q->n_bd) || (iwl_queue_used(q, index) == 0)) { 1150 if ((index >= q->n_bd) || (iwl_queue_used(q, index) == 0)) {
1136 IWL_ERR(priv, "Read index for DMA queue txq id (%d), index %d, " 1151 IWL_ERR(priv, "Read index for DMA queue txq id (%d), index %d, "
@@ -1145,13 +1160,16 @@ int iwl_tx_queue_reclaim(struct iwl_priv *priv, int txq_id, int index)
1145 1160
1146 tx_info = &txq->txb[txq->q.read_ptr]; 1161 tx_info = &txq->txb[txq->q.read_ptr];
1147 iwl_tx_status(priv, tx_info->skb[0]); 1162 iwl_tx_status(priv, tx_info->skb[0]);
1163
1164 hdr = (struct ieee80211_hdr *)tx_info->skb[0]->data;
1165 if (hdr && ieee80211_is_data_qos(hdr->frame_control))
1166 nfreed++;
1148 tx_info->skb[0] = NULL; 1167 tx_info->skb[0] = NULL;
1149 1168
1150 if (priv->cfg->ops->lib->txq_inval_byte_cnt_tbl) 1169 if (priv->cfg->ops->lib->txq_inval_byte_cnt_tbl)
1151 priv->cfg->ops->lib->txq_inval_byte_cnt_tbl(priv, txq); 1170 priv->cfg->ops->lib->txq_inval_byte_cnt_tbl(priv, txq);
1152 1171
1153 priv->cfg->ops->lib->txq_free_tfd(priv, txq); 1172 priv->cfg->ops->lib->txq_free_tfd(priv, txq);
1154 nfreed++;
1155 } 1173 }
1156 return nfreed; 1174 return nfreed;
1157} 1175}
@@ -1559,7 +1577,7 @@ void iwl_rx_reply_compressed_ba(struct iwl_priv *priv,
1559 if (txq->q.read_ptr != (ba_resp_scd_ssn & 0xff)) { 1577 if (txq->q.read_ptr != (ba_resp_scd_ssn & 0xff)) {
1560 /* calculate mac80211 ampdu sw queue to wake */ 1578 /* calculate mac80211 ampdu sw queue to wake */
1561 int freed = iwl_tx_queue_reclaim(priv, scd_flow, index); 1579 int freed = iwl_tx_queue_reclaim(priv, scd_flow, index);
1562 priv->stations[sta_id].tid[tid].tfds_in_queue -= freed; 1580 iwl_free_tfds_in_queue(priv, sta_id, tid, freed);
1563 1581
1564 if ((iwl_queue_space(&txq->q) > txq->q.low_mark) && 1582 if ((iwl_queue_space(&txq->q) > txq->q.low_mark) &&
1565 priv->mac80211_registered && 1583 priv->mac80211_registered &&