summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKyle McMartin <kyle@redhat.com>2011-06-23 15:29:02 -0400
committerKyle McMartin <kyle@redhat.com>2011-06-23 15:29:02 -0400
commit4cc6bd7c83f6ea93fd81a1c2d0fe0ebcb89a3bba (patch)
treee5c717d0d4605ad8f1030aa52e380515233abb4c
parent472d463edc710bf8ab662030e3b36b9927f69089 (diff)
downloadkernel-4cc6bd7c83f6ea93fd81a1c2d0fe0ebcb89a3bba.tar.gz
kernel-4cc6bd7c83f6ea93fd81a1c2d0fe0ebcb89a3bba.tar.xz
kernel-4cc6bd7c83f6ea93fd81a1c2d0fe0ebcb89a3bba.zip
iwlagn-fix-dma-direction.patch
-rw-r--r--iwlagn-fix-dma-direction.patch55
-rw-r--r--kernel.spec3
2 files changed, 58 insertions, 0 deletions
diff --git a/iwlagn-fix-dma-direction.patch b/iwlagn-fix-dma-direction.patch
new file mode 100644
index 000000000..741276bf5
--- /dev/null
+++ b/iwlagn-fix-dma-direction.patch
@@ -0,0 +1,55 @@
+diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c b/drivers/net/wireless/iwlwifi/iwl-tx.c
+index 686e176..11da90a 100644
+--- a/drivers/net/wireless/iwlwifi/iwl-tx.c
++++ b/drivers/net/wireless/iwlwifi/iwl-tx.c
+@@ -126,7 +126,7 @@ static inline u8 iwl_tfd_get_num_tbs(struct iwl_tfd *tfd)
+ }
+
+ static void iwlagn_unmap_tfd(struct iwl_priv *priv, struct iwl_cmd_meta *meta,
+- struct iwl_tfd *tfd)
++ struct iwl_tfd *tfd, enum dma_data_direction dma_dir)
+ {
+ struct pci_dev *dev = priv->pci_dev;
+ int i;
+@@ -151,7 +151,7 @@ static void iwlagn_unmap_tfd(struct iwl_priv *priv, struct iwl_cmd_meta *meta,
+ /* Unmap chunks, if any. */
+ for (i = 1; i < num_tbs; i++)
+ pci_unmap_single(dev, iwl_tfd_tb_get_addr(tfd, i),
+- iwl_tfd_tb_get_len(tfd, i), PCI_DMA_TODEVICE);
++ iwl_tfd_tb_get_len(tfd, i), dma_dir);
+ }
+
+ /**
+@@ -167,7 +167,8 @@ void iwlagn_txq_free_tfd(struct iwl_priv *priv, struct iwl_tx_queue *txq)
+ struct iwl_tfd *tfd_tmp = txq->tfds;
+ int index = txq->q.read_ptr;
+
+- iwlagn_unmap_tfd(priv, &txq->meta[index], &tfd_tmp[index]);
++ iwlagn_unmap_tfd(priv, &txq->meta[index], &tfd_tmp[index],
++ PCI_DMA_TODEVICE);
+
+ /* free SKB */
+ if (txq->txb) {
+@@ -700,10 +701,11 @@ int iwl_enqueue_hcmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd)
+ if (!(cmd->dataflags[i] & IWL_HCMD_DFL_NOCOPY))
+ continue;
+ phys_addr = pci_map_single(priv->pci_dev, (void *)cmd->data[i],
+- cmd->len[i], PCI_DMA_TODEVICE);
++ cmd->len[i], PCI_DMA_BIDIRECTIONAL);
+ if (pci_dma_mapping_error(priv->pci_dev, phys_addr)) {
+ iwlagn_unmap_tfd(priv, out_meta,
+- &txq->tfds[q->write_ptr]);
++ &txq->tfds[q->write_ptr],
++ PCI_DMA_BIDIRECTIONAL);
+ idx = -ENOMEM;
+ goto out;
+ }
+@@ -807,7 +809,7 @@ void iwl_tx_cmd_complete(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb)
+ cmd = txq->cmd[cmd_index];
+ meta = &txq->meta[cmd_index];
+
+- iwlagn_unmap_tfd(priv, meta, &txq->tfds[index]);
++ iwlagn_unmap_tfd(priv, meta, &txq->tfds[index], PCI_DMA_BIDIRECTIONAL);
+
+ /* Input error checking is done when commands are added to queue. */
+ if (meta->flags & CMD_WANT_SKB) {
diff --git a/kernel.spec b/kernel.spec
index f60082659..953731923 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -691,6 +691,7 @@ Patch12204: linux-2.6-enable-more-pci-autosuspend.patch
Patch12205: runtime_pm_fixups.patch
Patch12303: dmar-disable-when-ricoh-multifunction.patch
+Patch12304: iwlagn-fix-dma-direction.patch
%endif
@@ -1265,6 +1266,7 @@ ApplyPatch neuter_intel_microcode_load.patch
# rhbz#605888
ApplyPatch dmar-disable-when-ricoh-multifunction.patch
+ApplyPatch iwlagn-fix-dma-direction.patch
# END OF PATCH APPLICATIONS
@@ -1880,6 +1882,7 @@ fi
- Linux 3.0-rc4-git3
- Drop linux-3.0-fix-uts-release.patch, and instead just perl the Makefile
- linux-2.6-silence-noise.patch: fix context
+- iwlagn-fix-dma-direction.patch: fix DMAR errors (for me at least)
* Wed Jun 22 2011 Kyle McMartin <kmcmartin@redhat.com> 3.0-0.rc4.git0.2
- Re-enable debuginfo generation. Thanks to Richard Jones for noticing... no