Re: Printf hangs when internal buffer of driver is temporarily full

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

 



> which happens when the driver's internal buffer is temporarily full.
> I would have expected that the TTY layer or the libc implementation of
> printf would requery write_room automatically and thus would notice

How is it going to magically notice ?

> after a while that there is space again, but this doesn't seem to happen.
> Eventually the printf function returns after a very long timeout but without
> that the remaining characters have been printed.

You need to wake it up and tell it there is room in your completion
interrupts. It will then think about retrying.

> I based my code mainly on the ifx6x60-driver and I looked at other similar
> drivers as well, but I can't see that they are using a different strategy.
> 
> In a dated driver book it was suggested that write_room and write should
> always return at least one.

I would suggest recycling that book 8)

Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux