From owner-svn-soc-all@FreeBSD.ORG Tue Aug 2 10:56:37 2011 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from socsvn.FreeBSD.org (unknown [IPv6:2001:4f8:fff6::2f]) by hub.freebsd.org (Postfix) with SMTP id 9D88D1065679 for ; Tue, 2 Aug 2011 10:56:35 +0000 (UTC) (envelope-from oleksandr@FreeBSD.org) Received: by socsvn.FreeBSD.org (sSMTP sendmail emulation); Tue, 02 Aug 2011 10:56:35 +0000 Date: Tue, 02 Aug 2011 10:56:35 +0000 From: oleksandr@FreeBSD.org To: svn-soc-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <20110802105635.9D88D1065679@hub.freebsd.org> Cc: Subject: socsvn commit: r224833 - in soc2011/oleksandr/oleksandr-head/head/sys/dev: ata usb/storage X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Aug 2011 10:56:37 -0000 Author: oleksandr Date: Tue Aug 2 10:56:35 2011 New Revision: 224833 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=224833 Log: New method of testing error via fail point Modified: soc2011/oleksandr/oleksandr-head/head/sys/dev/ata/ata-all.c soc2011/oleksandr/oleksandr-head/head/sys/dev/usb/storage/umass.c Modified: soc2011/oleksandr/oleksandr-head/head/sys/dev/ata/ata-all.c ============================================================================== --- soc2011/oleksandr/oleksandr-head/head/sys/dev/ata/ata-all.c Tue Aug 2 09:43:27 2011 (r224832) +++ soc2011/oleksandr/oleksandr-head/head/sys/dev/ata/ata-all.c Tue Aug 2 10:56:35 2011 (r224833) @@ -50,6 +50,7 @@ #include #include #include +#include #ifdef ATA_CAM #include @@ -1553,7 +1554,6 @@ struct ata_channel *ch = device_get_softc(dev); union ccb *ccb = request->ccb; int fatalerr = 0; - ccb->ccb_h.status_test=CAM_REQ_INVALID; if (ch->requestsense) { ata_cam_process_sense(dev, request); return; @@ -1612,6 +1612,8 @@ (ccb->ccb_h.flags & CAM_DIS_AUTOSENSE) == 0) ata_cam_request_sense(dev, request); else { + KFAIL_POINT_CODE(DEBUG_FP, fail_atadevice, + ccb->ccb_h.status=RETURN_VALUE); ata_free_request(request); xpt_done(ccb); } Modified: soc2011/oleksandr/oleksandr-head/head/sys/dev/usb/storage/umass.c ============================================================================== --- soc2011/oleksandr/oleksandr-head/head/sys/dev/usb/storage/umass.c Tue Aug 2 09:43:27 2011 (r224832) +++ soc2011/oleksandr/oleksandr-head/head/sys/dev/usb/storage/umass.c Tue Aug 2 10:56:35 2011 (r224833) @@ -120,6 +120,7 @@ #include #include #include +#include #include #include @@ -2563,7 +2564,6 @@ maxsector = scsi_4btoul(rcap->addr) - 1; scsi_ulto4b(maxsector, rcap->addr); } - ccb->ccb_h.status_test = CAM_REQ_CMP_ERR; /* * We have to add SVPD_UNIT_SERIAL_NUMBER to the list * of pages supported by the device - otherwise, CAM @@ -2585,6 +2585,8 @@ page_list->length++; } } + KFAIL_POINT_CODE(DEBUG_FP, fail_usbdevice, + ccb->ccb_h.status = RETURN_VALUE); xpt_done(ccb); break;