lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <000101d644c9$e06bba40$a1432ec0$@samsung.com>
Date:   Wed, 17 Jun 2020 22:38:01 +0530
From:   "M Tamseel Shams" <m.shams@...sung.com>
To:     "'Robin Murphy'" <robin.murphy@....com>, <kgene@...nel.org>,
        <krzk@...nel.org>, <gregkh@...uxfoundation.org>, <jslaby@...e.com>
Cc:     <linux-samsung-soc@...r.kernel.org>,
        <linux-serial@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <alim.akhtar@...sung.com>, <linux-arm-kernel@...ts.infradead.org>
Subject: RE: [RFC PATCH] serial: samsung: Re-factors UART IRQ resource for
 various Samsung SoC

Hi Robin,

> -----Original Message-----
> From: Robin Murphy <robin.murphy@....com>
> Sent: Monday, June 15, 2020 6:43 PM
> To: Tamseel Shams <m.shams@...sung.com>; kgene@...nel.org;
> krzk@...nel.org; gregkh@...uxfoundation.org; jslaby@...e.com
> Cc: linux-samsung-soc@...r.kernel.org; linux-serial@...r.kernel.org; linux-
> kernel@...r.kernel.org; alim.akhtar@...sung.com; linux-arm-
> kernel@...ts.infradead.org
> Subject: Re: [RFC PATCH] serial: samsung: Re-factors UART IRQ resource for
> various Samsung SoC
> 
> On 2020-06-15 13:26, Tamseel Shams wrote:
> >   	else {
> >   		port->irq = ret;
> >   		ourport->rx_irq = ret;
> > -		ourport->tx_irq = ret + 1;
> > +		if (ourport->info->irq_cnt == 1)
> > +			ourport->tx_irq = ret;
> > +		else
> > +			ourport->tx_irq = ret + 1;
> >   	}
> >
> > -	ret = platform_get_irq(platdev, 1);
> > -	if (ret > 0)
> > -		ourport->tx_irq = ret;
> > +	if (ourport->info->irq_cnt != 1) {
> > +		ret = platform_get_irq(platdev, 1);
> > +		if (ret > 0)
> > +			ourport->tx_irq = ret;
> 
> FWIW, if you're not going to do anything in the error case then you may as well
> just call platform_get_irq_optional() unconditionally.
> 
> Robin.
> 
My intention behind not using 'platform_get_irq_optional' was that it does not prints the error when the 2nd interrupt resource is missing for the older UART's. I am just using it to give information to the user in error case. I can use 'platform_get_irq_optional' too.

Thanks & Regards
Tamseel

> > +	}
> >   	/*
> >   	 * DMA is currently supported only on DT platforms, if DMA properties
> >   	 * are specified.
> > @@ -2387,6 +2393,7 @@ static struct s3c24xx_serial_drv_data
> s3c2410_serial_drv_data = {
> >   		.name		= "Samsung S3C2410 UART",
> >   		.type		= PORT_S3C2410,
> >   		.fifosize	= 16,
> > +		.irq_cnt	= 2,
> >   		.rx_fifomask	= S3C2410_UFSTAT_RXMASK,
> >   		.rx_fifoshift	= S3C2410_UFSTAT_RXSHIFT,
> >   		.rx_fifofull	= S3C2410_UFSTAT_RXFULL,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ