socsvn commit: r224833 - in
soc2011/oleksandr/oleksandr-head/head/sys/dev: ata usb/storage
oleksandr at FreeBSD.org
oleksandr at FreeBSD.org
Tue Aug 2 10:56:37 UTC 2011
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 <dev/ata/ata-all.h>
#include <dev/pci/pcivar.h>
#include <ata_if.h>
+#include <sys/fail.h>
#ifdef ATA_CAM
#include <cam/cam.h>
@@ -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 <sys/callout.h>
#include <sys/malloc.h>
#include <sys/priv.h>
+#include <sys/fail.h>
#include <dev/usb/usb.h>
#include <dev/usb/usbdi.h>
@@ -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;
More information about the svn-soc-all
mailing list