Re: [PATCH v4 1/2] tty: serial: qcom_geni_serial: IRQ cleanup

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

 



Quoting Greg KH (2019-11-06 04:16:00)
> On Tue, Nov 05, 2019 at 05:00:12PM -0800, Stephen Boyd wrote:
> > Quoting Greg KH (2019-11-05 09:17:05)
> > > On Tue, Nov 05, 2019 at 03:27:15PM +0530, Akash Asthana wrote:
> > > > @@ -1307,7 +1307,21 @@ static int qcom_geni_serial_probe(struct platform_device *pdev)
> > > >       port->handle_rx = console ? handle_rx_console : handle_rx_uart;
> > > >       if (!console)
> > > >               device_create_file(uport->dev, &dev_attr_loopback);
> > > > -     return uart_add_one_port(drv, uport);
> > > > +
> > > > +     ret = uart_add_one_port(drv, uport);
> > > > +     if (ret)
> > > > +             return ret;
> > > 
> > > What is going to remove the sysfs file you just created above (in a racy
> > > way, it's broken and needs to be fixed, but that's a different issue
> > > here...)?
> > > 
> > > 
> > > > +
> > > > +     irq_set_status_flags(uport->irq, IRQ_NOAUTOEN);
> > > > +     ret = devm_request_irq(uport->dev, uport->irq, qcom_geni_serial_isr,
> > > > +                     IRQF_TRIGGER_HIGH, port->name, uport);
> > > > +     if (ret) {
> > > > +             dev_err(uport->dev, "Failed to get IRQ ret %d\n", ret);
> > > > +             uart_remove_one_port(drv, uport);
> > > > +             return ret;
> > > 
> > > Does this remove the sysfs file?
> > > 
> > 
> > The loopback file isn't documented. It isn't removed when the driver is
> > removed either. Can we just remove the whole thing? It would be nicer if
> > that sort of thing was supported in the tty layer somehow. Is it?
> 
> I don't know what that file does, so yes, please delete it :)
> 
> And as for support in the tty layer itself, if you figure out what it
> does, sure, we can add support if needed.
> 

I think it may be supported in the tty layer with TIOCM_LOOP already.
Akash, can you confirm?





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux