hvc_console & interrupts: reworked patch

Hollis Blanchard hollisb at us.ibm.com
Thu Apr 15 01:15:56 EST 2004


On Apr 13, 2004, at 6:41 PM, Benjamin Herrenschmidt wrote:
>
> On Wed, 2004-04-14 at 08:28, Ryan Arnold wrote:
>> 7.) drivers/char/hvc_console.c line 328
>>
>>                 n = hvc_arch_get_chars(index, buf, count);
>>                 if (n <= 0) {
>>                         /* XXX What is that supposed to do ? */
>>                         if (n == -EPIPE)
>>                                 tty_hangup(tty);
>>                         break;
>>                 }
>>
>> On Power-5 systems the listening client adapter can go away at any
>> time,
>> meaning there would be no-one sending chars and the HV returns
>> H_Closed
>> which hvc_arch_get_chars() in arch/ppc64/hvconsole returns as 0.  So,
>> this n == -EPIPE doesn't seem to ever happen.
>>
>> It may seem strange to ignore a negative return value on
>> hvc_arch_get_chars() but I think it may be necessary.
>
> Yes. If we had some kind of hotplug, it would make sense, I don't think
> we really want to do a hangup which is a bit too drastic imho.

Hi guys, this part was me HVSI. You'll notice that only HVSI code
returns EPIPE I hope...?

It's just like a serial cable. When the serial cable is unplugged, we
lose carrier detect, and tty_hangup() is how we notify userspace. I
mentioned this in my patch the other day; it might need to change a
little bit, but I'm pretty sure it needs to stay.

--
Hollis Blanchard
IBM Linux Technology Center


** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc64-dev mailing list