Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754654Ab1FPCa5 (ORCPT ); Wed, 15 Jun 2011 22:30:57 -0400 Received: from na3sys009aog104.obsmtp.com ([74.125.149.73]:52846 "EHLO na3sys009aog104.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752594Ab1FPCa4 convert rfc822-to-8bit (ORCPT ); Wed, 15 Jun 2011 22:30:56 -0400 From: Xiangliang Yu To: Jack Wang , "'James Bottomley'" CC: "yxlraid@gmail.com" , "lucas.demarchi@profusion.mobi" , "maciej.trela@intel.com" , "dan.j.williams@intel.com" , "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Jacky Feng Date: Wed, 15 Jun 2011 19:29:18 -0700 Subject: RE: [PATCH] [SCSI] LIBSAS: fix libsas link error issue Thread-Topic: [PATCH] [SCSI] LIBSAS: fix libsas link error issue Thread-Index: AcwrIR/qdpMMo2uOTdi6EtZ/SnmPkgAAZ5KAACgYoPAAAOfC4AABCYdAAABOEGA= Message-ID: References: <1308064628-11826-1-git-send-email-yxlraid@gmail.com> <1308065367.2401.24.camel@mulgrave> <1308117450.2329.31.camel@mulgrave> <637AF86F1A314F15B816411A580575F0@usish.com.cn> <51A55E816E3847EF97FE4E849A572717@usish.com.cn> In-Reply-To: <51A55E816E3847EF97FE4E849A572717@usish.com.cn> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 753 Lines: 15 > [Jack Wang] >It's the same, sas_ex_get_linkrate use DISCOVER response as linkrate. But the function have problem, actually, the error statement is: child->linkrate = min(parent_phy->linkrate, child->max_linkrate); its mean like this: child->linkrate = min(child_phy->linkrate, max(parent->max_linkrate,child_phy->linkrate)); and if parent->max_linkrate(3Gbps) is less than child_phy->linkrate(6Gbps), the statement will be change this: child->linkrate = child_phy->linkrate, forget the parent linkrate. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/