From owner-svn-src-stable@FreeBSD.ORG Tue Jun 25 07:17:10 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id A43DDE71; Tue, 25 Jun 2013 07:17:10 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 97D4117B6; Tue, 25 Jun 2013 07:17:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5P7HAwX010173; Tue, 25 Jun 2013 07:17:10 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5P7HAp1010172; Tue, 25 Jun 2013 07:17:10 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201306250717.r5P7HAp1010172@svn.freebsd.org> From: Alexander Motin Date: Tue, 25 Jun 2013 07:17:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r252199 - stable/9/sbin/camcontrol X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Jun 2013 07:17:10 -0000 Author: mav Date: Tue Jun 25 07:17:10 2013 New Revision: 252199 URL: http://svnweb.freebsd.org/changeset/base/252199 Log: MFC r251743: Improve firmware download status check. Previous check was insufficient for ATA since it ignored transport errors like command timeouts, while for SCSI it was just wrong. Modified: stable/9/sbin/camcontrol/fwdownload.c Directory Properties: stable/9/sbin/camcontrol/ (props changed) Modified: stable/9/sbin/camcontrol/fwdownload.c ============================================================================== --- stable/9/sbin/camcontrol/fwdownload.c Tue Jun 25 07:11:07 2013 (r252198) +++ stable/9/sbin/camcontrol/fwdownload.c Tue Jun 25 07:17:10 2013 (r252199) @@ -370,17 +370,15 @@ fw_download_img(struct cam_device *cam_d } if (!sim_mode) { /* Execute the command. */ - if (cam_send_ccb(cam_dev, ccb) < 0) { + if (cam_send_ccb(cam_dev, ccb) < 0 || + (ccb->ccb_h.status & CAM_STATUS_MASK) != + CAM_REQ_CMP) { warnx("Error writing image to device"); if (printerrors) cam_error_print(cam_dev, ccb, CAM_ESF_ALL, CAM_EPF_ALL, stderr); goto bailout; } - if (ccb->ataio.res.status != 0 /*&& !last_pkt*/) { - cam_error_print(cam_dev, ccb, CAM_ESF_ALL, - CAM_EPF_ALL, stderr); - } } /* Prepare next round. */ pkt_count++;