From nobody@FreeBSD.org  Tue Jul 20 12:23:53 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6ECD9106566B
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 20 Jul 2010 12:23:53 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 5EC988FC19
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 20 Jul 2010 12:23:53 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o6KCNqDH021581
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 20 Jul 2010 12:23:52 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id o6KCNqBe021573;
	Tue, 20 Jul 2010 12:23:52 GMT
	(envelope-from nobody)
Message-Id: <201007201223.o6KCNqBe021573@www.freebsd.org>
Date: Tue, 20 Jul 2010 12:23:52 GMT
From: Petr Lampa <lampa@fit.vutbr.cz>
To: freebsd-gnats-submit@FreeBSD.org
Subject: twa driver doesn't pass proper max. io size to cam
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         148785
>Category:       kern
>Synopsis:       [twa] [patch] twa driver doesn't pass proper max. io size to cam
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    delphij
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jul 20 12:30:01 UTC 2010
>Closed-Date:    Mon Sep 13 23:18:25 UTC 2010
>Last-Modified:  Mon Sep 13 23:18:25 UTC 2010
>Originator:     Petr Lampa
>Release:        STABLE8
>Organization:
BUT FIT
>Environment:
FreeBSD XXX 8.1-PRERELEASE FreeBSD 8.1-PRERELEASE #6: Tue Jul 20 13:58:44 CEST 2010     XXX:/usr/src/sys/i386/compile/VIDEO5  i386

>Description:
LSI/3ware cards are able to process 128KB requests (TW_CL_MAX_IO_SIZE), but the twa driver doesn't set maxio field in XPT_PATH_INQ request, so cam will use DFLTPHYS (64KB).
>How-To-Repeat:

>Fix:
One line change at XPT_PATH_INQ processing in tw_osl_cam.c (line 453):

*** tw_osl_cam.c        2010-07-20 14:06:37.000000000 +0200
--- /root/tw_osl_cam.c  2010-07-20 14:06:24.000000000 +0200
***************
*** 450,455 ****
--- 450,456 ----
                path_inq->transport_version = 2;
                path_inq->protocol = PROTO_SCSI;
                path_inq->protocol_version = SCSI_REV_2;
+               path_inq->maxio = TW_CL_MAX_IO_SIZE;
                ccb_h->status = CAM_REQ_CMP;
                xpt_done(ccb);
                break;

Functionality verified both with 9500 and 9650SE.

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-scsi 
Responsible-Changed-By: brucec 
Responsible-Changed-When: Fri Aug 20 10:10:04 UTC 2010 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=148785 
State-Changed-From-To: open->patched 
State-Changed-By: delphij 
State-Changed-When: Mon Sep 13 23:16:56 UTC 2010 
State-Changed-Why:  
This issue have been fixed in HEAD and RELENG_8. 


Responsible-Changed-From-To: freebsd-scsi->delphij 
Responsible-Changed-By: delphij 
Responsible-Changed-When: Mon Sep 13 23:16:56 UTC 2010 
Responsible-Changed-Why:  
Take. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=148785 
State-Changed-From-To: patched->closed 
State-Changed-By: delphij 
State-Changed-When: Mon Sep 13 23:17:31 UTC 2010 
State-Changed-Why:  
*sign* I really meant to mark this as closed since RELENG_7 
doesn't offer maxio capability (introduced in r195534). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=148785 
>Unformatted:
