On Thu, Jan 4, 2018 at 11:36 AM, Mario Kicherer <dev@xxxxxxxxxxxx> wrote: > Hi, > > at least the driver in this Android kernel also only increases by > NV_FRAGMENT_SIZE: > > https://github.com/anyc/linux-zenwatch3/blob/master/drivers/net/wireless/wcnss/wcnss_wlan.c#L2413 It also appears to skip the first 4 bytes of the firmware, but again I tried this with my board and still no successful firmware boot, so I don't know if the change makes any material difference... > On 04.01.2018 11:44, Will Newton wrote: >> >> Hi, >> >> I'm running into some issues with getting this driver running on an >> msm8909. The firmware loading code looks a little odd to me so I would >> just like to check it is doing the right thing: >> >> >> >> data = fw->data; >> left = fw->size; >> >> req->hdr.type = WCNSS_DOWNLOAD_NV_REQ; >> req->hdr.len = sizeof(*req) + NV_FRAGMENT_SIZE; >> >> req->last = 0; >> req->frag_size = NV_FRAGMENT_SIZE; >> >> req->seq = 0; >> do { >> if (left <= NV_FRAGMENT_SIZE) { >> req->last = 1; >> req->frag_size = left; >> req->hdr.len = sizeof(*req) + left; >> } >> >> memcpy(req->fragment, data, req->frag_size); >> >> ret = rpmsg_send(wcnss->channel, req, req->hdr.len); >> if (ret < 0) { >> dev_err(wcnss->dev, "failed to send smd >> packet\n"); >> goto release_fw; >> } >> >> /* Increment for next fragment */ >> req->seq++; >> >> data += req->hdr.len; >> left -= NV_FRAGMENT_SIZE; >> } while (left > 0); >> >> data is incremented by req->hdr.len which includes sizeof(*req) which >> seems wrong, e.g. it should perhaps increment by req->frag_size. Or am >> I missing some subtlety here? >> >> Strangely it doesn't seem to matter if I change that code, either way >> my firmware startup fails... >> > -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html