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: <9edb1178-7454-eb3f-60a5-d3f73d01c9d6@linux.intel.com>
Date:   Mon, 19 Sep 2022 10:44:03 +0200
From:   Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
To:     Richard Fitzgerald <rf@...nsource.cirrus.com>, vkoul@...nel.org,
        yung-chuan.liao@...ux.intel.com, sanyog.r.kale@...el.com
Cc:     patches@...nsource.cirrus.com, alsa-devel@...a-project.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] soundwire: bus: Fix wrong port number in
 sdw_handle_slave_alerts()



On 9/17/22 16:02, Richard Fitzgerald wrote:
> for_each_set_bit() gives the bit-number counting from 0 (LSbit==0).
> When processing INTSTAT2, bit 0 is DP4 so the port number is (bit + 4).
> Likewise for INTSTAT3 bit 0 is DP11 so port number is (bit + 11).
> 
> Signed-off-by: Richard Fitzgerald <rf@...nsource.cirrus.com>

Another thing that never worked, but no one has used port interrupts so
far. I only used it for PRBS tests in early enabling some 3 years ago,
and it was for port 2 IIRC.

Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>

> ---
>  drivers/soundwire/bus.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c
> index 8eded1a55227..df0ae869ee51 100644
> --- a/drivers/soundwire/bus.c
> +++ b/drivers/soundwire/bus.c
> @@ -1622,7 +1622,7 @@ static int sdw_handle_slave_alerts(struct sdw_slave *slave)
>  			port = buf2[0] & SDW_SCP_INTSTAT2_PORT4_10;
>  			for_each_set_bit(bit, &port, 8) {
>  				/* scp2 ports start from 4 */
> -				port_num = bit + 3;
> +				port_num = bit + 4;
>  				sdw_handle_port_interrupt(slave,
>  						port_num,
>  						&port_status[port_num]);
> @@ -1634,7 +1634,7 @@ static int sdw_handle_slave_alerts(struct sdw_slave *slave)
>  			port = buf2[1] & SDW_SCP_INTSTAT3_PORT11_14;
>  			for_each_set_bit(bit, &port, 8) {
>  				/* scp3 ports start from 11 */
> -				port_num = bit + 10;
> +				port_num = bit + 11;
>  				sdw_handle_port_interrupt(slave,
>  						port_num,
>  						&port_status[port_num]);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ