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] [thread-next>] [day] [month] [year] [list]
Message-ID: <4F44B95E.3030307@linux.intel.com>
Date:	Wed, 22 Feb 2012 01:46:06 -0800
From:	Darren Hart <dvhart@...ux.intel.com>
To:	Alan Cox <alan@...rguk.ukuu.org.uk>
CC:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Tomoya MORINAGA <tomoya.rohm@...il.com>,
	Feng Tang <feng.tang@...el.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Alan Cox <alan@...ux.intel.com>, linux-serial@...r.kernel.org
Subject: Re: [PATCH 2/4] pch_uart: Add Fish River Island II uart clock quirks



On 02/22/2012 12:52 AM, Alan Cox wrote:
>> +	/* Setup UART clock, checking for board specific clocks. */
>> +	uartclk = DEFAULT_UARTCLK;
>> +
>> +	board_name = dmi_get_system_info(DMI_BOARD_NAME);
>> +	if (board_name && strstr(board_name, "CM-iTC"))
>> +		uartclk = CMITC_UARTCLK;
>> +
>> +	board_name = dmi_get_system_info(DMI_PRODUCT_NAME);
>> +	if (board_name && strstr(board_name, "Fish River Island II"))
>> +		uartclk = FRI2_UARTCLK;
>> +
>> +	port->uartclk = uartclk;
> 
> This is confusing, you load product name into a variable called
> board_name ?? perhaps "name" would be clearer ?

OK, done.

> 
>>  
>>  	if (options)
>>  		uart_parse_options(options, &baud, &parity, &bits, &flow);
>> @@ -1566,12 +1580,16 @@ static struct eg20t_port *pch_uart_init_port(struct pci_dev *pdev,
>>  	if (!rxbuf)
>>  		goto init_port_free_txbuf;
>>  
>> +	/* Setup UART clock, checking for board specific clocks. */
>>  	uartclk = DEFAULT_UARTCLK;
>>  
>> -	/* quirk for CM-iTC board */
>>  	board_name = dmi_get_system_info(DMI_BOARD_NAME);
>>  	if (board_name && strstr(board_name, "CM-iTC"))
>> -		uartclk = 192000000; /* 192.0MHz */
>> +		uartclk = CMITC_UARTCLK;
>> +
>> +	board_name = dmi_get_system_info(DMI_PRODUCT_NAME);
>> +	if (board_name && strstr(board_name, "Fish River Island II"))
>> +		uartclk = FRI2_UARTCLK;
> 
> And we have two locations so this is going to get missed on updates. Can
> we have one function for this please ?

Right, bad dvhart. Done. That cleans things up nicely. I'll resend as V2
after considering your 0/4 response....

-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ