Skip to content

Commit

Permalink
qlge: Relax alignment on TX harware queue.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ron Mercer authored and David S. Miller committed Jun 11, 2009
1 parent 0ed586d commit 88c55e3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions drivers/net/qlge/qlge.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/qlge/qlge_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 88c55e3

Please sign in to comment.