Skip to content

Commit

Permalink
enic: Bug fix: align desc ring sizes to 32 descs
Browse files Browse the repository at this point in the history
Previous driver was aligning ring sizes to 16 descs, but hardware actually
wants desc ring sizes to be aligned to 32 descs.

Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com>
Signed-off-by: Scott Feldman <scofeldm@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Scott Feldman authored and David S. Miller committed Dec 24, 2009
1 parent 9959a18 commit bd24962
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/enic/enic_res.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ int enic_get_vnic_config(struct enic *enic)
min_t(u32, ENIC_MAX_WQ_DESCS,
max_t(u32, ENIC_MIN_WQ_DESCS,
c->wq_desc_count));
c->wq_desc_count &= 0xfffffff0; /* must be aligned to groups of 16 */
c->wq_desc_count &= 0xffffffe0; /* must be aligned to groups of 32 */

c->rq_desc_count =
min_t(u32, ENIC_MAX_RQ_DESCS,
max_t(u32, ENIC_MIN_RQ_DESCS,
c->rq_desc_count));
c->rq_desc_count &= 0xfffffff0; /* must be aligned to groups of 16 */
c->rq_desc_count &= 0xffffffe0; /* must be aligned to groups of 32 */

if (c->mtu == 0)
c->mtu = 1500;
Expand Down

0 comments on commit bd24962

Please sign in to comment.