Re: first try to send data with pi433 on Raspberry Pi

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 19, 2017 at 07:59:33PM +0100, Oliver Graute wrote:
> On 12/12/17, Marcin Ciupak wrote:
> > 
> > this is due to fact that pi433_write returns 0 on successful copy while
> > it should return 'copied' value. So it is a bug :)
> > 
> > '0' means nothing was copied so userpsace calls pi433_write again and
> > again, data is put to fifo and when it is full it goes to abort and
> > returns -EAGAIN and logs message write to fifo failed: 0x0
> 
> indeed you are right. I changed the return value and the error is gone!
> 
> +++ b/drivers/staging/pi433/pi433_if.c
> @@ -845,7 +845,7 @@ static irqreturn_t DIO1_irq_handler(int irq, void *dev_id)
>  	wake_up_interruptible(&device->tx_wait_queue);
>  	dev_dbg(device->dev, "write: generated new msg with %d bytes.", copied);
>  
> -	return 0;
> +	return copied;
> 
> If this is the only change here I can provide a patch. 
> 
> Best regards,
> 
> Oliver
Yes, please provide the patch if you can. You can use Reported-by me.

Thanks,
Marcin
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux