Re: [PATCH V8 04/10] USB: f81232: implement read IIR/MSR with endpoint

2015-03-16 Thread Johan Hovold
On Mon, Mar 16, 2015 at 11:08:29AM +0800, Peter Hung wrote: Hello, Johan Hovold 於 2015/3/14 下午 08:02 寫道: On Thu, Feb 26, 2015 at 06:02:10PM +0800, Peter Hung wrote: + if (status != sizeof(*val)) { + dev_err(port-dev, %s failed status: %d\n, __func__, status); + +

Re: [PATCH V8 04/10] USB: f81232: implement read IIR/MSR with endpoint

2015-03-16 Thread Peter Hung
Hello, Johan Hovold 於 2015/3/16 下午 04:55 寫道: On Mon, Mar 16, 2015 at 11:08:29AM +0800, Peter Hung wrote: Could you rewrite this as if (status 0) status = usb_translate_errors(status); else status = 0; In my definition the return value of

Re: [PATCH V8 04/10] USB: f81232: implement read IIR/MSR with endpoint

2015-03-15 Thread Peter Hung
Hello, Johan Hovold 於 2015/3/14 下午 08:02 寫道: On Thu, Feb 26, 2015 at 06:02:10PM +0800, Peter Hung wrote: + if (status != sizeof(*val)) { + dev_err(port-dev, %s failed status: %d\n, __func__, status); + + if (status == 0) + status = -EIO;

Re: [PATCH V8 04/10] USB: f81232: implement read IIR/MSR with endpoint

2015-03-14 Thread Johan Hovold
On Thu, Feb 26, 2015 at 06:02:10PM +0800, Peter Hung wrote: The interrupt endpoint will report current IIR. If we got IIR with MSR changed , We will do read MSR with interrupt_work worker to do f81232_read_msr() function. Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com ---