qlge: Relax alignment on TX harware queue.
authorRon Mercer <ron.mercer@qlogic.com>
Wed, 10 Jun 2009 15:49:33 +0000 (15:49 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 11 Jun 2009 09:37:04 +0000 (02:37 -0700)
The alignment was on size of queue boundary, but the hardware
only requires 4-byte alignment.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/qlge/qlge.h
drivers/net/qlge/qlge_main.c

index 5eb52ca089801f371866f8c5de4733eb2691232f..b1ddfd1b8d53c2e64d48282260f21a63e47c524a 100644 (file)
@@ -27,6 +27,8 @@
                           "%s: " fmt, __func__, ##args);  \
        } while (0)
 
+#define WQ_ADDR_ALIGN  0x3     /* 4 byte alignment */
+
 #define QLGE_VENDOR_ID    0x1077
 #define QLGE_DEVICE_ID_8012    0x8012
 #define QLGE_DEVICE_ID_8000    0x8000
index 024c7343ada0c777aaf34f45566c76cf731f3007..17d512c6bc36688db79076b3fb10888fda713a77 100644 (file)
@@ -2237,7 +2237,7 @@ static int ql_alloc_tx_resources(struct ql_adapter *qdev,
                                 &tx_ring->wq_base_dma);
 
        if ((tx_ring->wq_base == NULL)
-           || tx_ring->wq_base_dma & (tx_ring->wq_size - 1)) {
+               || tx_ring->wq_base_dma & WQ_ADDR_ALIGN) {
                QPRINTK(qdev, IFUP, ERR, "tx_ring alloc failed.\n");
                return -ENOMEM;
        }