Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1705139

Re: [PATCH] thunderbolt: icm: Remove Apple check for Alpine Ridge

From Mika Westerberg <mika.westerberg@linux.intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH] thunderbolt: icm: Remove Apple check for Alpine Ridge
Date 2017-08-07 09:10 +0200
Message-ID <ubKkN-56m-5@gated-at.bofh.it> (permalink)
References <ubKb9-4Nl-27@gated-at.bofh.it> <ubKb9-4Nl-25@gated-at.bofh.it>
Organization Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo

Show all headers | View raw


On Mon, Aug 07, 2017 at 02:50:49PM +0800, Kai-Heng Feng wrote:
> On Mon, Aug 7, 2017 at 12:49 PM, Kai-Heng Feng
> <kai.heng.feng@canonical.com> wrote:
> > In icm_ar_is_supported(), icm->upstream_port will be uninitialized if
> > the hardware is not an Apple one.
> >
> > The uninitialized icm->upstream_port will later be dereferenced in
> > pcie2cio_write(), causes a NULL pointer dereference issue.
> >
> > Commit f67cf491175a ("thunderbolt: Add support for Internal Connection
> > Manager (ICM)") states that all Alpine Ridge will use ICM, so I guess
> > it's safe to remove the Apple check.

Yes, Alpine Ridge uses ICM but on Apple systems we need to additional
steps to get it up and running. That's why the check is there. So no it
cannot be removed.

Is there an actual issue you are trying to solve here?
                                                                                                                                                                                                                     
> > Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> > ---
> >  drivers/thunderbolt/icm.c | 7 -------
> >  1 file changed, 7 deletions(-)
> >
> > diff --git a/drivers/thunderbolt/icm.c b/drivers/thunderbolt/icm.c
> > index bdaac1ff00a5..2ab25aac5446 100644
> > --- a/drivers/thunderbolt/icm.c
> > +++ b/drivers/thunderbolt/icm.c
> > @@ -514,13 +514,6 @@ static bool icm_ar_is_supported(struct tb *tb)
> >         struct icm *icm = tb_priv(tb);
> >
> >         /*
> > -        * Starting from Alpine Ridge we can use ICM on Apple machines
> > -        * as well. We just need to reset and re-enable it first.
> > -        */
> > -       if (!is_apple())
> > -               return true;
> > -
> > -       /*

How did you test this?

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH] thunderbolt: icm: Remove Apple check for Alpine Ridge Kai-Heng Feng <kai.heng.feng@canonical.com> - 2017-08-07 09:00 +0200
  Re: [PATCH] thunderbolt: icm: Remove Apple check for Alpine Ridge Mika Westerberg <mika.westerberg@linux.intel.com> - 2017-08-07 09:10 +0200
    Re: [PATCH] thunderbolt: icm: Remove Apple check for Alpine Ridge Kai-Heng Feng <kai.heng.feng@canonical.com> - 2017-08-07 09:30 +0200
      Re: [PATCH] thunderbolt: icm: Remove Apple check for Alpine Ridge Mika Westerberg <mika.westerberg@linux.intel.com> - 2017-08-07 10:00 +0200
        Re: [PATCH] thunderbolt: icm: Remove Apple check for Alpine Ridge Kai-Heng Feng <kai.heng.feng@canonical.com> - 2017-08-07 10:10 +0200
          Re: [PATCH] thunderbolt: icm: Remove Apple check for Alpine Ridge Mika Westerberg <mika.westerberg@linux.intel.com> - 2017-08-07 10:10 +0200

csiph-web