diff options
-rw-r--r-- | drivers/net/sb1250-mac.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/sb1250-mac.c b/drivers/net/sb1250-mac.c index 0f828da0339d..cb4ea4158457 100644 --- a/drivers/net/sb1250-mac.c +++ b/drivers/net/sb1250-mac.c | |||
@@ -750,7 +750,14 @@ static void sbdma_initctx(sbmacdma_t *d, | |||
750 | d->sbdma_maxdescr = maxdescr; | 750 | d->sbdma_maxdescr = maxdescr; |
751 | 751 | ||
752 | d->sbdma_dscrtable = (sbdmadscr_t *) | 752 | d->sbdma_dscrtable = (sbdmadscr_t *) |
753 | kmalloc(d->sbdma_maxdescr*sizeof(sbdmadscr_t), GFP_KERNEL); | 753 | kmalloc((d->sbdma_maxdescr+1)*sizeof(sbdmadscr_t), GFP_KERNEL); |
754 | |||
755 | /* | ||
756 | * The descriptor table must be aligned to at least 16 bytes or the | ||
757 | * MAC will corrupt it. | ||
758 | */ | ||
759 | d->sbdma_dscrtable = (sbdmadscr_t *) | ||
760 | ALIGN((unsigned long)d->sbdma_dscrtable, sizeof(sbdmadscr_t)); | ||
754 | 761 | ||
755 | memset(d->sbdma_dscrtable,0,d->sbdma_maxdescr*sizeof(sbdmadscr_t)); | 762 | memset(d->sbdma_dscrtable,0,d->sbdma_maxdescr*sizeof(sbdmadscr_t)); |
756 | 763 | ||