Re: [PATCH 1/1] PCI: Fix Extend ACS configurability

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

 



On Wed, Jan 08, 2025 at 07:13:34PM -0800, Tushar Dave wrote:
> > Yes, but X in config_acs should copy the FW value not the value
> > modified by disable_acs_redir_param
> 
> I see your point. In that case (for the last hunk in my patch) something
> like this should work IMO.
> 
> -       /* If mask is 0 then we copy the bit from the firmware setting. */
> -       caps->ctrl = (caps->ctrl & ~mask) | (caps->fw_ctrl & mask);
> -       caps->ctrl |= flags;
> +       /* For unchanged ACS bits 'x' or 'X', copy the bits from the
> firmware setting. */
> +        if (!acs_mask)
> +                caps->ctrl = caps->fw_ctrl;
> +
> +       caps->ctrl &= ~mask;
> +       caps->ctrl |= (flags & mask);
> 
> Wish I can have better condition check instead of 'if (!acs_mask)' but let
> me know your thoughts.

It should be per-bit surely? I think the original logic was the right
idea, just the bit logic had the wrong operators..

Jason




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux