mbox series

[v2,0/2] Fix two bugs of switchtec module

Message ID 1555339302-31829-1-git-send-email-wesley.sheng@microchip.com
Headers show
Series Fix two bugs of switchtec module | expand

Message

Wesley Sheng April 15, 2019, 2:41 p.m. UTC
Hi, Everyone,

This patch series fix two bugs of switchtec module.

The first is introduced by device spec definition issue: the maximum
supported PCIe function number by hardware should be 255 instead of 
the false number of 48. Rectify it in driver and for backward 
compatible, a new ioctl and corresponding data structure are created,
while keep the deprecated one.

The second is MRPC event unintentionally masked at corner case.
Fix this bug by skipping the mask operation for MRPC event in event ISR
like what we already do for LINK event.

Regard,
Wesley

--

Changed since v1:
  - rewrapped the commit message of [PATCH 1/2] into one paragraph

--

Wesley Sheng (2):
  switchtec: Fix false maximum supported PCIe function number issue
  switchtec: Fix unintended mask of MRPC event

 drivers/pci/switch/switchtec.c       | 42 +++++++++++++++++++++++++-----------
 include/linux/switchtec.h            |  2 +-
 include/uapi/linux/switchtec_ioctl.h | 13 ++++++++++-
 3 files changed, 42 insertions(+), 15 deletions(-)

Comments

Logan Gunthorpe April 15, 2019, 3:51 p.m. UTC | #1
On 2019-04-15 8:41 a.m., Wesley Sheng wrote:
> Hi, Everyone,
> 
> This patch series fix two bugs of switchtec module.
> 
> The first is introduced by device spec definition issue: the maximum
> supported PCIe function number by hardware should be 255 instead of 
> the false number of 48. Rectify it in driver and for backward 
> compatible, a new ioctl and corresponding data structure are created,
> while keep the deprecated one.
> 
> The second is MRPC event unintentionally masked at corner case.
> Fix this bug by skipping the mask operation for MRPC event in event ISR
> like what we already do for LINK event.
> 
> Regard,
> Wesley
> 
> --
> 
> Changed since v1:
>   - rewrapped the commit message of [PATCH 1/2] into one paragraph

Probably should have collected my Reviewed-by tag into the patches as
well. I still approve this series:

Reviewed-by: Logan Gunthorpe <logang@deltatee.com>

Thanks,

Logan
Bjorn Helgaas April 18, 2019, 1:55 p.m. UTC | #2
On Mon, Apr 15, 2019 at 10:41:40PM +0800, Wesley Sheng wrote:
> Hi, Everyone,
> 
> This patch series fix two bugs of switchtec module.
> 
> The first is introduced by device spec definition issue: the maximum
> supported PCIe function number by hardware should be 255 instead of 
> the false number of 48. Rectify it in driver and for backward 
> compatible, a new ioctl and corresponding data structure are created,
> while keep the deprecated one.
> 
> The second is MRPC event unintentionally masked at corner case.
> Fix this bug by skipping the mask operation for MRPC event in event ISR
> like what we already do for LINK event.
> 
> Regard,
> Wesley
> 
> --
> 
> Changed since v1:
>   - rewrapped the commit message of [PATCH 1/2] into one paragraph
> 
> --
> 
> Wesley Sheng (2):
>   switchtec: Fix false maximum supported PCIe function number issue
>   switchtec: Fix unintended mask of MRPC event
> 
>  drivers/pci/switch/switchtec.c       | 42 +++++++++++++++++++++++++-----------
>  include/linux/switchtec.h            |  2 +-
>  include/uapi/linux/switchtec_ioctl.h | 13 ++++++++++-
>  3 files changed, 42 insertions(+), 15 deletions(-)

Applied to pci/switchtec for v5.2, thanks!