wctc4xxp: Ensure the descriptors are zeroed out on start.

If system conditions prevent the card from loading the firmware without
touching all the descriptors in the ring, it's possible for
wctc4xxp_cleanup_descriptor_ring to attempt cleanup of a command that was never
submitted resulting in the following BUG.

  wctc4xxp 0000:02:0a.0: Failed to load firmware.
  BUG: unable to handle kernel paging request at c109556c
  IP: [<f9faa83e>] wctc4xxp_cleanup_descriptor_ring+0x8c/0x148 [wctc4xxp]

Reported-by: Xavier Carcelle <xcarcelle@avencall.com>
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
This commit is contained in:
Shaun Ruffell 2013-05-28 11:52:07 -05:00
parent e2f492595c
commit 040ba6f43a

View File

@ -866,6 +866,7 @@ wctc4xxp_initialize_descriptor_ring(struct pci_dev *pdev,
memset(dr->desc, 0, (sizeof(*d) + dr->padding) * DRING_SIZE);
for (i = 0; i < DRING_SIZE; ++i) {
d = wctc4xxp_descriptor(dr, i);
memset(d, 0, sizeof(*d));
d->des1 = cpu_to_le32(des1);
}