From patchwork Fri Nov 6 08:42:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Robert_Deli=C3=ABn?= X-Patchwork-Id: 7567481 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 95F019F71A for ; Fri, 6 Nov 2015 08:42:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A680020766 for ; Fri, 6 Nov 2015 08:42:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5C30D20742 for ; Fri, 6 Nov 2015 08:42:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1032812AbbKFIm0 (ORCPT ); Fri, 6 Nov 2015 03:42:26 -0500 Received: from smtp.danego.net ([195.246.116.61]:56044 "EHLO smtp.danego.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1032269AbbKFImZ convert rfc822-to-8bit (ORCPT ); Fri, 6 Nov 2015 03:42:25 -0500 Received: from POBOX.postoffice.danego.net ([195.246.116.58]) by smtp.danego.net (IceWarp 10.4.0) with ESMTP (SSL) id TTW50617; Fri, 06 Nov 2015 09:42:17 +0100 Received: from POBOX.postoffice.danego.net ([fe80::4811:b556:2cb4:7393]) by POBOX.postoffice.danego.net ([fe80::4811:b556:2cb4:7393%17]) with mapi id 14.01.0438.000; Fri, 6 Nov 2015 09:42:26 +0100 From: =?iso-8859-1?Q?Robert_Deli=EBn?= To: "linux-wireless@vger.kernel.org" CC: "kvalo@qca.qualcomm.com" Subject: [PATCH 1/1] ath6kl: Fix SDIO broken scatter hif-scatter Thread-Topic: [PATCH 1/1] ath6kl: Fix SDIO broken scatter hif-scatter Thread-Index: AQHRGG4GO1ZWcaqtz0Oh2Plg12eylQ== Date: Fri, 6 Nov 2015 08:42:26 +0000 Message-ID: <6EA3E0BCC03CC34B89B01BD57ECBC718B17AFE41@POBOX.postoffice.danego.net> Accept-Language: en-US, en-GB, nl-NL Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [212.61.72.242] MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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