lkml.org 
[lkml]   [2011]   [Jun]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH] [SCSI] LIBSAS: fix libsas link error issue
    From
    Date
    On Tue, 2011-06-14 at 23:17 +0800, yxlraid@gmail.com wrote:
    > From: Xiangliang Yu <yuxiangl@marvell.com>
    >
    > -- The value of child link rate should is minimum of link rate, or
    > command will fail if child link rate is bigger than parent link rate.
    >
    > Signed-off-by: Xiangliang Yu <yuxiangl@marvell.com>
    > ---
    > drivers/scsi/libsas/sas_expander.c | 2 +-
    > 1 files changed, 1 insertions(+), 1 deletions(-)
    >
    > diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c
    > index 874e29d..6ccca09 100644
    > --- a/drivers/scsi/libsas/sas_expander.c
    > +++ b/drivers/scsi/libsas/sas_expander.c
    > @@ -638,7 +638,7 @@ static void sas_ex_get_linkrate(struct domain_device *parent,
    > sas_port_add_phy(port, phy->phy);
    > }
    > }
    > - child->linkrate = min(parent_phy->linkrate, child->max_linkrate);
    > + child->linkrate = min(parent_phy->linkrate, child->min_linkrate);

    This patch doesn't look right. It will clamp the phy to the minimum
    possible link rate. The child is supposed to support everywhere between
    child->min_linkrate and child->max_linkrate. The reason why we pick the
    max is because we should use that if the parent supports it, and fall
    back only if the parent isn't capable.

    James




    \
     
     \ /
      Last update: 2011-06-14 17:31    [W:0.020 / U:0.424 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site