linux-msm / qdl

BSD 3-Clause "New" or "Revised" License
196 stars 76 forks source link

About qdl_write #28

Open stellalio opened 2 years ago

stellalio commented 2 years ago

Hi,andersson

For 9655 device,after masking the fields that are not in the xml,it could download successfully for 9655 device. However, for 9607 device,after masking the fields that are not in the xml,I try to download for 05c6:9008,and found that the process of prasing,reading and erasing is smoothly,but when to the process of write,it failed.The output log is as the attachment.

I tried to add follow part: if(len == 0) { bulk.ep = qdl->out_ep; bulk.len = 0; bulk.data = data; bulk.timeout = 1000;

                    n = ioctl(qdl->fd, USBDEVFS_BULK, &bulk);
                    if(n != 0) {
                            fprintf(stderr,"ERROR: n = %d, errno = %d (%s)\n",
                                    n, errno, strerror(errno));
                            return -1;
                    }

                    return 0;
            }

And masking this part:

if (len_orig % qdl->out_maxpktsize == 0) { bulk.ep = qdl->out_ep; bulk.len = 0; bulk.data = NULL; bulk.timeout = 1000;

                    n = ioctl(qdl->fd, USBDEVFS_BULK, &bulk);
                    if (n < 0)
                            return n;
            }

After doing this ,it could download successfully for 9607 device.But it couldn't download for 9655 device,is there a way to handle these two changes so that it can be compatible with different Qualcomm devices?