From wollman@nfs-prod-0.csail.mit.edu  Tue Jun 26 02:08:11 2012
Return-Path: <wollman@nfs-prod-0.csail.mit.edu>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 7553A106566B
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 26 Jun 2012 02:08:11 +0000 (UTC)
	(envelope-from wollman@nfs-prod-0.csail.mit.edu)
Received: from nfs-prod-0.csail.mit.edu (nfs-prod-0.csail.mit.edu [128.30.113.117])
	by mx1.freebsd.org (Postfix) with ESMTP id 397FE8FC0A
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 26 Jun 2012 02:08:11 +0000 (UTC)
Received: from nfs-prod-0.csail.mit.edu (localhost [127.0.0.1])
	by nfs-prod-0.csail.mit.edu (8.14.5/8.14.5) with ESMTP id q5Q1uBU1003200
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 25 Jun 2012 21:56:11 -0400 (EDT)
	(envelope-from wollman@nfs-prod-0.csail.mit.edu)
Received: (from wollman@localhost)
	by nfs-prod-0.csail.mit.edu (8.14.5/8.14.5/Submit) id q5Q1uB8C003199;
	Mon, 25 Jun 2012 21:56:11 -0400 (EDT)
	(envelope-from wollman)
Message-Id: <201206260156.q5Q1uB8C003199@nfs-prod-0.csail.mit.edu>
Date: Mon, 25 Jun 2012 21:56:11 -0400 (EDT)
From: Garrett Wollman <wollman@csail.mit.edu>
Reply-To: Garrett Wollman <wollman@csail.mit.edu>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [mps] [cam] SAS bus scan generates thousands of lines to log
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         169431
>Category:       kern
>Synopsis:       [mps] [cam] SAS bus scan generates thousands of lines to log
>Confidential:   no
>Severity:       non-critical
>Priority:       high
>Responsible:    freebsd-scsi
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jun 26 02:10:07 UTC 2012
>Closed-Date:    Mon Jul 02 21:55:26 UTC 2012
>Last-Modified:  Tue Jul 10 06:20:09 UTC 2012
>Originator:     Garrett Wollman
>Release:        FreeBSD 9.0-STABLE amd64
>Organization:
MIT Computer Science & Artificial Intelligence Lab
>Environment:
System: FreeBSD nfs-prod-0.csail.mit.edu 9.0-STABLE FreeBSD 9.0-STABLE #6 r237562M: Mon Jun 25 13:22:45 EDT 2012 wollman@xyz.csail.mit.edu:/usr/obj/usr/src/sys/CSAIL amd64

Local changes to sources do not affect mps driver.
Only special tunable set is:

	hw.mps.max_chains=4096

...as in previous testing (under 9.0 with a backported driver) we were
able to exhaust the default limit of 2048.

>Description:

When scanning for devices connected to an LSI SAS2116 controller using
the mps(4) driver, thousands of lines like this are generated on the
console:

Jun 25 19:21:20 nfs-prod-0 kernel: (probe752:mps0:0:753:0): INQUIRY. CDB: 12 0 0 0 24 0 
Jun 25 19:21:20 nfs-prod-0 kernel: (probe752:mps0:0:753:0): CAM status: Invalid Target ID
Jun 25 19:21:20 nfs-prod-0 kernel: (probe752:mps0:0:753:0): Error 22, Unretryable error
Jun 25 19:21:20 nfs-prod-0 kernel: (probe753:mps0:0:754:0): INQUIRY. CDB: 12 0 0 0 24 0 
Jun 25 19:21:20 nfs-prod-0 kernel: (probe753:mps0:0:754:0): CAM status: Invalid Target ID
Jun 25 19:21:20 nfs-prod-0 kernel: (probe753:mps0:0:754:0): Error 22, Unretryable error
Jun 25 19:21:20 nfs-prod-0 kernel: (probe754:mps0:0:755:0): INQUIRY. CDB: 12 0 0 0 24 0 
Jun 25 19:21:20 nfs-prod-0 kernel: (probe754:mps0:0:755:0): CAM status: Invalid Target ID
Jun 25 19:21:20 nfs-prod-0 kernel: (probe754:mps0:0:755:0): Error 22, Unretryable error

This is new with the 9.1 kernel; 9.0 did not do this even with the
backported driver.

The drives are ultimately found and attached normally.

>How-To-Repeat:

Cause a bus rescan (e.g., by plugging a disk shelf into one of the ports
on the controller).

>Fix:
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-scsi 
Responsible-Changed-By: wollman 
Responsible-Changed-When: Tue Jun 26 04:52:48 UTC 2012 
Responsible-Changed-Why:  
CAM/HBA issues go to freebsd-scsi 

http://www.freebsd.org/cgi/query-pr.cgi?pr=169431 
State-Changed-From-To: open->closed 
State-Changed-By: ken 
State-Changed-When: Mon Jul 2 21:54:20 UTC 2012 
State-Changed-Why:  
Fixed in head in change 237683, stable/9 in change 237876, and stable/8 in 
change 237877. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=169431 

From: Randy Bush <randy@psg.com>
To: bug-followup@FreeBSD.org, wollman@csail.mit.edu
Cc:  
Subject: Re: kern/169431: [mps] [cam] SAS bus scan generates thousands of
 lines to log
Date: Tue, 10 Jul 2012 15:18:15 +0900

 problem exists with hpt on releng_9 cvsupped as of today
>Unformatted:
