From owner-freebsd-scsi@FreeBSD.ORG Sun Jan 23 05:54:17 2011 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 12F5B106566B for ; Sun, 23 Jan 2011 05:54:17 +0000 (UTC) (envelope-from mj@feral.com) Received: from ns1.feral.com (ns1.feral.com [192.67.166.1]) by mx1.freebsd.org (Postfix) with ESMTP id AD3C18FC0C for ; Sun, 23 Jan 2011 05:54:16 +0000 (UTC) Received: from [192.168.1.100] (m206-63.dsl.tsoft.com [198.144.206.63]) by ns1.feral.com (8.14.4/8.14.3) with ESMTP id p0N5sFXY035510; Sat, 22 Jan 2011 21:54:15 -0800 (PST) (envelope-from mj@feral.com) Message-ID: <4D3BC293.4010808@feral.com> Date: Sat, 22 Jan 2011 21:54:27 -0800 From: Matthew Jacob Organization: Feral Software User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 To: pz-freebsd-scsi@ziemba.us References: In-Reply-To: Content-Type: multipart/mixed; boundary="------------070101080802070005040808" X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.2.6 (ns1.feral.com [192.67.166.1]); Sat, 22 Jan 2011 21:54:15 -0800 (PST) Cc: freebsd-scsi@freebsd.org Subject: Re: rescan causes offlined tape to reload X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Jan 2011 05:54:17 -0000 This is a multi-part message in MIME format. --------------070101080802070005040808 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 1/20/2011 2:33 PM, G. Paul Ziemba wrote: The basic gist of the error is that during the probe sequence a command is likely coming back with ASC 0x04 ASCQ 0x02 (Logical unit not ready, initializing command required). Unfortunately, this causes camperiphscsisenseerror to issue scsi_start_stop command. Why this did not occur before I am a little baffled about because the same code was in place in the time frame you had it 'working'. See if the attached patch helps --------------070101080802070005040808 Content-Type: text/plain; name="no_auto_start.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="no_auto_start.patch" Index: sys/cam/cam_periph.c =================================================================== --- sys/cam/cam_periph.c (revision 217716) +++ sys/cam/cam_periph.c (working copy) @@ -1525,36 +1525,43 @@ *action_string = "Unretryable error"; break; case SS_START: - { - int le; + if (SID_TYPE(&cgd.inq_data) != T_SEQUENTIAL) { + int le; - /* - * Send a start unit command to the device, and - * then retry the command. - */ - *action_string = "Attempting to start unit"; - periph->flags |= CAM_PERIPH_RECOVERY_INPROG; + /* + * Send a start unit command to the device, and + * then retry the command. + */ + *action_string = "Attempting to start unit"; + periph->flags |= CAM_PERIPH_RECOVERY_INPROG; - /* - * Check for removable media and set - * load/eject flag appropriately. - */ - if (SID_IS_REMOVABLE(&cgd.inq_data)) - le = TRUE; - else - le = FALSE; + /* + * Check for removable media and set + * load/eject flag appropriately. + */ + if (SID_IS_REMOVABLE(&cgd.inq_data)) + le = TRUE; + else + le = FALSE; - scsi_start_stop(&ccb->csio, - /*retries*/1, - camperiphdone, - MSG_SIMPLE_Q_TAG, - /*start*/TRUE, - /*load/eject*/le, - /*immediate*/FALSE, - SSD_FULL_SIZE, - /*timeout*/50000); + scsi_start_stop(&ccb->csio, + /*retries*/1, + camperiphdone, + MSG_SIMPLE_Q_TAG, + /*start*/TRUE, + /*load/eject*/le, + /*immediate*/FALSE, + SSD_FULL_SIZE, + /*timeout*/50000); + } else { + xpt_free_ccb(orig_ccb); + ccb->ccb_h.status |= CAM_DEV_QFRZN; + *action_string = "Will not autostart a " + "sequential access device"; + err_action = SS_FAIL; + error = EIO; + } break; - } case SS_TUR: { /* --------------070101080802070005040808--