Skip to contentSkip to conversation

b43: DMA: debug rings alignment

PATCH New Rafał Miłecki 2 participants 5 messages Mar 14, 2013 – Mar 15, 2013 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 b43: DMA: debug rings alignment

---
ISE: can you try this with your card? Provide output including "DBG" messages please.
Hope it compiles.

---
 drivers/net/wireless/b43/dma.c |   15 +++++++++++++++
 1 file changed, 15 insertions(+)
drivers/net/wireless/b43/dma.c +15 -0
index 38bc5a7..30da6ce 100644
@@ -915,6 +915,21 @@ struct b43_dmaring *b43_setup_dmaring(struct b43_wldev *dev,
 	ring->last_injected_overflow = jiffies;
 #endif
 
+	if (type == B43_DMA_64BIT) {
+		u32 tmp;
+		if (for_tx) {
+			b43_write32(dev, ring->mmio_base + B43_DMA64_TXRINGLO, 0xff0);
+			tmp = b43_read32(dev, ring->mmio_base + B43_DMA64_TXRINGLO);
+			pr_info("[DBG] Testing TX on ring 0x%X: 0x%X\n", ring->mmio_base, tmp);
+		} else {
+			b43_write32(dev, ring->mmio_base + B43_DMA64_RXRINGLO, 0xff0);
+			tmp = b43_read32(dev, ring->mmio_base + B43_DMA64_RXRINGLO);
+			pr_info("[DBG] Testing RX on ring 0x%X: 0x%X\n", ring->mmio_base, tmp);
+		}
+	} else {
+		pr_err("[DBG] Whoops, it's not 64b DMA engine!\n");
+	}
+
 	if (for_tx) {
 		/* Assumption: B43_TXRING_SLOTS can be divided by TX_SLOTS_PER_FRAME */
 		BUILD_BUG_ON(B43_TXRING_SLOTS % TX_SLOTS_PER_FRAME != 0);
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 1/1 b43: DMA: debug rings alignment

Quoted 26 lines · On Thursday 14 Mar 2013 21:41:21 Rafa? Mi?ecki wrote:

index 38bc5a7..30da6ce 100644

drivers/net/wireless/b43/dma.c +6 -0
@@ -915,6 +915,21 @@ struct b43_dmaring *b43_setup_dmaring(struct b43_wldev
 *dev, ring->last_injected_overflow = jiffies;
 #endif
 
+       if (type == B43_DMA_64BIT) {
+               u32 tmp;
+               if (for_tx) {
+                       b43_write32(dev, ring->mmio_base +
 B43_DMA64_TXRINGLO, 0xff0); +                       tmp = b43_read32(dev,
 ring->mmio_base + B43_DMA64_TXRINGLO);
+                       pr_info("[DBG] Testing TX on ring 0x%X: 0x%X\n",
 ring->mmio_base, tmp); +               } else {
+                       b43_write32(dev, ring->mmio_base +

B43_DMA64_RXRINGLO, 0xff0); + tmp = b43_read32(dev,
ring->mmio_base + B43_DMA64_RXRINGLO);
+ pr_info("[DBG] Testing RX on ring 0x%X: 0x%X\n",
ring->mmio_base, tmp); + }

drivers/net/wireless/b43/dma.c +4 -0
+       } else {
+               pr_err("[DBG] Whoops, it's not 64b DMA engine!\n");
+       }
+
        if (for_tx) {
                /* Assumption: B43_TXRING_SLOTS can be divided by
Quoted 2 lines

TX_SLOTS_PER_FRAME */ BUILD_BUG_ON(B43_TXRING_SLOTS % TX_SLOTS_PER_FRAME != 0);

Will start testing now...

Signature · 1 line
-- isedev
#2 lore raw

PATCH 1/1 b43: DMA: debug rings alignment

Quoted 30 lines · On Thursday 14 Mar 2013 21:58:18 ISE Development wrote:
Quoted 29 lines · On Thursday 14 Mar 2013 21:41:21 Rafa? Mi?ecki wrote:

index 38bc5a7..30da6ce 100644

drivers/net/wireless/b43/dma.c +0 -0
@@ -915,6 +915,21 @@ struct b43_dmaring *b43_setup_dmaring(struct

b43_wldev
*dev, ring->last_injected_overflow = jiffies;

#endif

drivers/net/wireless/b43/dma.c +4 -0
+       if (type == B43_DMA_64BIT) {
+               u32 tmp;
+               if (for_tx) {
+                       b43_write32(dev, ring->mmio_base +

B43_DMA64_TXRINGLO, 0xff0); + tmp = b43_read32(dev,
ring->mmio_base + B43_DMA64_TXRINGLO);
+ pr_info("[DBG] Testing TX on ring 0x%X: 0x%X\n",
ring->mmio_base, tmp); + } else {
+ b43_write32(dev, ring->mmio_base +
B43_DMA64_RXRINGLO, 0xff0); + tmp = b43_read32(dev,
ring->mmio_base + B43_DMA64_RXRINGLO);
+ pr_info("[DBG] Testing RX on ring 0x%X: 0x%X\n",
ring->mmio_base, tmp); + }

drivers/net/wireless/b43/dma.c +4 -0
+       } else {
+               pr_err("[DBG] Whoops, it's not 64b DMA engine!\n");
+       }
+
 
        if (for_tx) {
Quoted 7 lines
Quoted 5 lines
                /* Assumption: B43_TXRING_SLOTS can be divided by

TX_SLOTS_PER_FRAME */ BUILD_BUG_ON(B43_TXRING_SLOTS % TX_SLOTS_PER_FRAME !=
0);

Will start testing now...

Here's the output:

[38667.424687] b43-phy0 debug: [DBG] Testing TX on ring 0x200: 0x0
[38667.424733] b43-phy0 debug: [DBG] Testing TX on ring 0x240: 0x0
[38667.424787] b43-phy0 debug: [DBG] Testing TX on ring 0x280: 0x0
[38667.424840] b43-phy0 debug: [DBG] Testing TX on ring 0x2C0: 0x0
[38667.424894] b43-phy0 debug: [DBG] Testing TX on ring 0x300: 0x0
[38667.424948] b43-phy0 debug: [DBG] Testing RX on ring 0x200: 0x0
Signature · 1 line
-- isedev
#3 lore raw

PATCH 1/1 b43: DMA: debug rings alignment

Quoted 43 lines · On Thursday 14 Mar 2013 23:32:23 ISE Development wrote:
Quoted 34 lines · On Thursday 14 Mar 2013 21:58:18 ISE Development wrote:
Quoted 33 lines · On Thursday 14 Mar 2013 21:41:21 Rafa? Mi?ecki wrote:

index 38bc5a7..30da6ce 100644

drivers/net/wireless/b43/dma.c +0 -0
@@ -915,6 +915,21 @@ struct b43_dmaring *b43_setup_dmaring(struct

b43_wldev
*dev, ring->last_injected_overflow = jiffies;

#endif

drivers/net/wireless/b43/dma.c +4 -0
+       if (type == B43_DMA_64BIT) {
+               u32 tmp;
+               if (for_tx) {
+                       b43_write32(dev, ring->mmio_base +

B43_DMA64_TXRINGLO, 0xff0);
+ tmp = b43_read32(dev, ring->mmio_base +
B43_DMA64_TXRINGLO);
+ pr_info("[DBG] Testing TX on ring 0x%X: 0x%X\n",
ring->mmio_base, tmp);

drivers/net/wireless/b43/dma.c +2 -0
+               } else {
+                       b43_write32(dev, ring->mmio_base +

B43_DMA64_RXRINGLO, 0xff0);
+ tmp = b43_read32(dev, ring->mmio_base +
B43_DMA64_RXRINGLO);
+ pr_info("[DBG] Testing RX on ring 0x%X: 0x%X\n",
ring->mmio_base, tmp);

drivers/net/wireless/b43/dma.c +5 -0
+               }
+       } else {
+               pr_err("[DBG] Whoops, it's not 64b DMA engine!\n");
+       }
+
 
        if (for_tx) {
Quoted 7 lines
Quoted 5 lines
                /* Assumption: B43_TXRING_SLOTS can be divided by

TX_SLOTS_PER_FRAME */ BUILD_BUG_ON(B43_TXRING_SLOTS % TX_SLOTS_PER_FRAME !=
0);

Will start testing now...

Quoted 8 lines

Here's the output:

[38667.424687] b43-phy0 debug: [DBG] Testing TX on ring 0x200: 0x0
[38667.424733] b43-phy0 debug: [DBG] Testing TX on ring 0x240: 0x0
[38667.424787] b43-phy0 debug: [DBG] Testing TX on ring 0x280: 0x0
[38667.424840] b43-phy0 debug: [DBG] Testing TX on ring 0x2C0: 0x0
[38667.424894] b43-phy0 debug: [DBG] Testing TX on ring 0x300: 0x0
[38667.424948] b43-phy0 debug: [DBG] Testing RX on ring 0x200: 0x0

Other than that, similar error sequence:

- hits slot 138 on ring 3, then out of order errors
- hits slot 208 on ring 1, then out of order errors
- AP times out connection (to be expected)

Signature · 1 line
-- isedev
#4 lore raw

PATCH 1/1 b43: DMA: debug rings alignment

In reply to ISE Development

2013/3/14 ISE Development <[email protected]>:

Quoted 11 lines · On Thursday 14 Mar 2013 21:58:18 ISE Development wrote:
Quoted 1 line

Will start testing now...

Here's the output:

[38667.424687] b43-phy0 debug: [DBG] Testing TX on ring 0x200: 0x0
[38667.424733] b43-phy0 debug: [DBG] Testing TX on ring 0x240: 0x0
[38667.424787] b43-phy0 debug: [DBG] Testing TX on ring 0x280: 0x0
[38667.424840] b43-phy0 debug: [DBG] Testing TX on ring 0x2C0: 0x0
[38667.424894] b43-phy0 debug: [DBG] Testing TX on ring 0x300: 0x0
[38667.424948] b43-phy0 debug: [DBG] Testing RX on ring 0x200: 0x0

Whoops, so this hardware doesn't support unaligned addressing (address based, not index based). My alternative solution won't even apply in this case. Thanks for testing.

Signature · 1 line
Rafa?