Hi Robert,
On Fri, Nov 6, 2015 at 7:42 PM, Robert Deliƫn <[email protected]> wrote:
> This patch fixes broken hif-scatter in ath6kl SDIO. It is not my work; I have
> found it as a difference between two Digi distributed Kernel source trees. No
> commit comment was recorded. I am sure there are better/nicer/cleaner way,
> but copying it as I found it is yet another difference less in the future.
> Feel free to use it in any way you see fit.
>
> Signed-off-by: Robert Delien <[email protected]>
Did you ever re-send this patch? It looks like a fairly important fix
and was never applied.
Thanks,
Julian Calaby
>
>
> Index: drivers/net/wireless/ath/ath6kl/sdio.c
> ===================================================================
> --- drivers/net/wireless/ath/ath6kl/sdio.c (revision 715)
> +++ drivers/net/wireless/ath/ath6kl/sdio.c (revision 716)
> @@ -222,6 +222,7 @@
> struct mmc_data *data)
> {
> struct scatterlist *sg;
> + struct hif_scatter_item *scat_list;
> int i;
>
> data->blksz = HIF_MBOX_BLOCK_SIZE;
> @@ -240,14 +241,14 @@
> sg = scat_req->sgentries;
> sg_init_table(sg, scat_req->scat_entries);
>
> + scat_list = &scat_req->scat_list[0];
> +
> /* assemble SG list */
> - for (i = 0; i < scat_req->scat_entries; i++, sg++) {
> + for (i = 0; i < scat_req->scat_entries; i++, sg++, scat_list++) {
> ath6kl_dbg(ATH6KL_DBG_SCATTER, "%d: addr:0x%p, len:%d\n",
> - i, scat_req->scat_list[i].buf,
> - scat_req->scat_list[i].len);
> + i, scat_list->buf, scat_list->len);
>
> - sg_set_buf(sg, scat_req->scat_list[i].buf,
> - scat_req->scat_list[i].len);
> + sg_set_buf(sg, scat_list->buf, scat_list->len);
> }
>
> /* set scatter-gather table for request */
> @@ -348,7 +349,7 @@
> int i, scat_req_sz, scat_list_sz, sg_sz, buf_sz;
> u8 *virt_buf;
>
> - scat_list_sz = (n_scat_entry - 1) * sizeof(struct hif_scatter_item);
> + scat_list_sz = n_scat_entry * sizeof(struct hif_scatter_item);
> scat_req_sz = sizeof(*s_req) + scat_list_sz;
>
> if (!virt_scat)
> Index: drivers/net/wireless/ath/ath6kl/hif.h
> ===================================================================
> --- drivers/net/wireless/ath/ath6kl/hif.h (revision 715)
> +++ drivers/net/wireless/ath/ath6kl/hif.h (revision 716)
> @@ -197,9 +197,9 @@
> /* bounce buffer for upper layers to copy to/from */
> u8 *virt_dma_buf;
>
> - struct hif_scatter_item scat_list[1];
> + u32 scat_q_depth;
>
> - u32 scat_q_depth;
> + struct hif_scatter_item scat_list[0];
> };
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Julian Calaby
Email: [email protected]
Profile: http://www.google.com/profiles/julian.calaby/
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html